OTA管理布局

This commit is contained in:
zyx.net
2023-08-14 16:40:26 +08:00
parent 6e99653709
commit d0e11209f6
8 changed files with 1386 additions and 15 deletions
+1 -1
View File
@@ -1938,5 +1938,5 @@ module.exports = {
matchingstate:'Matching state',
issuenotice:'Issue notice',
applyforrematch:'Apply for rematch',
notificationsent:'Is a notification sent?',
}
+1
View File
@@ -3894,4 +3894,5 @@ module.exports = {
matchingstate:'匹配状态',
issuenotice:'下发通知',
applyforrematch:'申请重新匹配',
notificationsent:'是否下发通知',
}
@@ -0,0 +1,233 @@
<!--重新匹配-->
<template>
<a-modal
:title="$t('applyforrematch')"
:width="600"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('projectVersion')">
{{$t('projectVersion')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectVersion">
<a-select
class="box-input propbox"
style="width: 90%"
v-model='formInline.projectVersion'
:placeholder="$t('PleaseSelect')+$t('projectVersion')">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in projectVersionList"
:key="key"
:label="item"
:value="item">
<span class="itemOption" :title=" item ">
{{ item }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction, putAction } from '@/api/manage'
import moment from 'moment'
export default {
name: 'settingList',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
transittime:false,
returntime:false,
propflag: false,
projectVersionList:[],
formInline: {
bazt:undefined,
batjsj:'',
tgthsj:'',
bz:'',
},
rules: {
projectVersion: [
{
required: true,
message: this.$t('projectVersion') + this.$t('cannotEmpty'),
trigger: 'change'
}
],
// batjsj: [
// {
// required: true,
// message: this.$t('filingtime') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
// bz: [
// { min: 1, max: 500, message: this.$t('cantExeed') + '500' + this.$t('characters'), trigger: 'blur' }
// ],
// tgthsj: [
// {
// required: true,
// message: this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
},
ids: ''
}
},
mounted() {
},
methods: {
edit(row) {
this.ids = row
this.visible = true
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
...this.formInline,
ids:this.ids
}
this.confirmLoading = true
// postAction('ota/otaBaSjList/batchRecord', query).then((res) => {
// if (res.success) {
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.confirmLoading = false
// this.$emit('getList')
// } else {
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
}
})
},
handleCancel() {
this.formInline = {}
this.ids = ''
this.visible = false
},
// dateChange(item) {
// this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
// }
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 90%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 144px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 90%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 3px;
}
</style>
@@ -0,0 +1,266 @@
<!--批量设置-->
<template>
<a-modal
:title="$t('BatchSetting')"
:width="600"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('projectVersion')">
{{$t('projectVersion')}}</span>
</div>
<a-form-model-item class="itemModel" prop="projectVersion">
<a-select
class="box-input propbox"
style="width: 90%"
v-model='formInline.projectVersion'
:placeholder="$t('PleaseSelect')+$t('projectVersion')">
<!-- <a-select-option :value="null">{{$t('pleaseSelect')}}</a-select-option>-->
<a-select-option v-for="(item, key) in projectVersionList"
:key="key"
:label="item"
:value="item">
<span class="itemOption" :title=" item ">
{{ item }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('CertificationProgress')">
{{$t('CertificationProgress')}}</span>
</div>
<a-form-model-item class="itemModel" prop="bazt">
<j-dict-select-tag class="box-input" v-model="formInline.certificationProgress"
:placeholder="$t('PleaseSelect')+$t('CertificationProgress')"
:type="'select'"
style="width: 90%"
:triggerChange="false" :dictCode="'certification_progress'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('remarks')">
{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="bz">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
v-model="formInline.bz"
style="width: 90%"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction, putAction } from '@/api/manage'
import moment from 'moment'
export default {
name: 'settingList',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
transittime:false,
returntime:false,
propflag: false,
formInline: {
bazt:undefined,
batjsj:'',
tgthsj:'',
bz:'',
},
projectVersionList:[],
rules: {
// bazt: [
// {
// required: true,
// message: this.$t('recordstatus') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
// batjsj: [
// {
// required: true,
// message: this.$t('filingtime') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
// bz: [
// { min: 1, max: 500, message: this.$t('cantExeed') + '500' + this.$t('characters'), trigger: 'blur' }
// ],
// tgthsj: [
// {
// required: true,
// message: this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
},
ids: ''
}
},
mounted() {
},
methods: {
edit(row) {
this.ids = row
this.visible = true
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
...this.formInline,
ids:this.ids
}
this.confirmLoading = true
// postAction('ota/otaBaSjList/batchRecord', query).then((res) => {
// if (res.success) {
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.confirmLoading = false
// this.$emit('getList')
// } else {
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
}
})
},
handleCancel() {
this.formInline = {}
this.ids = ''
this.visible = false
},
// dateChange(item) {
// this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
// }
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 90%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 144px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 90%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 3px;
}
</style>
@@ -33,7 +33,7 @@
v-model="queryParam.influencestatute"></a-input>
</div>
</a-col>
<template v-if="toggleSearchStatus">
<template v-if="toggleSearchStatus && vehicleType== 'all'">
<a-col :md="6" :sm="8">
<div class="box-title-text">
<div class="title-text" :title="$t('vehicleType')">
@@ -60,7 +60,7 @@
</template>
<span style="float: right;overflow: hidden;margin-right: 11px" class="table-page-search-submitButtons">
<a-col :md="6" :sm="24">
<a @click="handleToggleSearch">
<a @click="handleToggleSearch" v-if="vehicleType== 'all'">
{{ !toggleSearchStatus ? $t('open') : $t('away') }}
<a-icon :type="toggleSearchStatus ? 'up' : 'down'" />
</a>
@@ -71,7 +71,7 @@
</a-row>
</a-form>
</div>
<a-divider />
<a-divider style='margin-top: -10px;'/>
<div style='height:100%'>
<div style='display:flex'>
<div>
@@ -100,68 +100,144 @@
</div>
</div>
</div>
<!-- 全部导出-->
<div v-if="vehicleType== 'all'" class="table-operator" style='margin-bottom: 19px;text-align: left;margin-top: 20px;'>
<div class="operator-text" @click="handleExportManage"
v-has="'otadetail:export'">
<a-icon type="export" :rotate="-90" />
{{ $t('export') }}
</div>
<!-- 全部下发通知-->
<div class="operator-text" @click="issuenotice"
v-has="'otadetail:Issuenotice'">
<a-icon type="sound" />
{{ $t('issuenotice') }}
</div>
<!-- 列表设置-->
<!-- v-if="!this.$route.query.it"-->
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmClassName"
placement="bottomRight" >
<template slot="title" id="popconfirmmize">
<div style="max-height:360px;overflow:scroll;overflow-x: auto;width: 211px">
<a-checkbox
style="margin-bottom: 22px;"
v-if="customizeList && customizeList.length"
v-model="checkAll"
:indeterminate="indeterminate"
@change="onCheckAllChange"
>{{ $t('selectAll') }}
</a-checkbox>
<a-checkbox-group @change="Change" v-model="checkedList" class="customize-text">
<a-checkbox class="customize-text-title" :disabled="item.disabled" v-for="(item, key) in customizeList"
:key="key" :value="item.field">{{ item.db_field_txt }}
</a-checkbox>
</a-checkbox-group>
<div class="drawer-bootom-button">
<a-button @click="cancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmitcustomize" type="primary" :loading="confirmLoading">{{ $t('determine') }}
</a-button>
</div>
</div>
</template>
<div class="operator-text" style="position: relative" @click="getcustomize">
<a-icon type="setting"/>
{{ $t('customize') }}
</div>
</a-popconfirm>
</div>
<!-- studio导出-->
<div v-else class="table-operator" style='margin-bottom: 19px;text-align: left;margin-top: 20px;'>
<div class="operator-text" @click="handleExportManage"
v-has="'otad:export'">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
<!-- studio批量设置-->
<div class="operator-text" @click="BatchSetting"
v-has="'otad:batchsetting'">
<a-icon type="setting" />
{{ $t('BatchSetting') }}
</div>
<!-- studio申请重新匹配-->
<div class="operator-text" @click="applyforrematch"
v-has="'otad:rematch'">
<a-icon type="rollback" />
{{ $t('applyforrematch') }}
</div>
<!-- studio保存-->
<div class="operator-text" @click="preservation"
v-has="'otad:save'">
<a-icon type="check-circle" />
{{ $t('preservation') }}
</div>
<!-- studio提交-->
<div class="operator-text" @click="submit"
v-has="'otad-submit'">
<a-icon type="check-circle" />
{{ $t('submit') }}
</div>
<!-- manger导出-->
<div class="operator-text" @click="handleExportManage"
v-has="'otaman:export'">
<a-icon type="export" :rotate="-90"/>
{{ $t('export') }}
</div>
<!-- manger确认-->
<div class="operator-text" @click="confirm"
v-has="'otaman:confirm'">
<a-icon type="check-circle" />
{{ $t('confirm') }}
</div>
<!-- manger退回-->
<div class="operator-text" @click="sendBack"
v-has="'otaman:return'">
<a-icon type="rollback" />
{{ $t('sendBack') }}
</div>
<!-- 列表设置-->
<!-- v-if="!this.$route.query.it"-->
<a-popconfirm :visible="customizevisible" overlayClassName="popconfirmClassName"
placement="bottomRight" >
<template slot="title" id="popconfirmmize">
<div style="max-height:360px;overflow:scroll;overflow-x: auto;width: 211px">
<a-checkbox
style="margin-bottom: 22px;"
v-if="customizeList && customizeList.length"
v-model="checkAll"
:indeterminate="indeterminate"
@change="onCheckAllChange"
>{{ $t('selectAll') }}
</a-checkbox>
<a-checkbox-group @change="Change" v-model="checkedList" class="customize-text">
<a-checkbox class="customize-text-title" :disabled="item.disabled" v-for="(item, key) in customizeList"
:key="key" :value="item.field">{{ item.db_field_txt }}
</a-checkbox>
</a-checkbox-group>
<div class="drawer-bootom-button">
<a-button @click="cancel" style="margin-right: 16px">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmitcustomize" type="primary" :loading="confirmLoading">{{ $t('determine') }}
</a-button>
</div>
</div>
</template>
<div class="operator-text" style="position: relative" @click="getcustomize">
<a-icon type="setting"/>
{{ $t('customize') }}
</div>
</a-popconfirm>
</div>
<div>
<a-table ref="table" size="middle" :components="drag(columns, 'columns')" :loading="loading" :pagination="false"
:scroll="{ x: '100%', y: 'calc(100vh - 140px)' }" rowKey="id" :data-source="dataSource"
:row-selection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }" :columns="vehicleType== 'all' ? columns : columnstype">
<!-- -->
<span slot="operation" slot-scope="text,record">
<a class="text-operation" @click="detailclick(record)">{{ $t('See') }}</a>
</span>
<!-- 历史记录-->
<template slot="operation" slot-scope="text, record">
<a-button class="action-dict" @click="UpdateLog(record)">{{$t('historicalrecord')}}</a-button>
</template>
<!-- 编辑-->
<template slot="remarks" slot-scope="text, record">
<span @click="getremark(record)">{{text}}</span>
</template>
</a-table>
<div class="page" v-if="dataSource && dataSource.length > 0">
<a-pagination :show-total="total => $t('total') + ` ${total} ` + $t('strip')" show-quick-jumper show-size-changer
@@ -169,6 +245,56 @@
@showSizeChange="SizeChange" />
</div>
</div>
<batSetting :url="url" @getList="getList" ref="batSettingRef"/>
<applyforrematch :url="url" @getList="getList" ref="applyforrematchRef"/>
<rejectReason :url="url" @getList="getList" ref="rejectReasonRef"/>
<remark @remarkForm='remarkForm' ref="remarkRef"/>
<!-- 历史记录-->
<a-modal
:title="$t('historicalrecord')"
:width="900"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<historyTable :columnshistory='columnshistory' :dataSourcehistory='dataSourcehistory'></historyTable>
<!-- <a-table-->
<!-- class="table"-->
<!-- :columns="columnshistory"-->
<!-- :pagination="false"-->
<!-- :scroll="{y: 400}"-->
<!-- :data-source="dataSourcehistory"-->
<!-- :loading="loading"-->
<!-- >-->
<!-- <span slot="content" slot-scope="text,record">-->
<!-- <a-tooltip placement="topLeft">-->
<!-- <template slot="title">-->
<!-- <span v-html="text"></span>-->
<!-- </template>-->
<!-- <span v-html="text"></span>-->
<!-- </a-tooltip>-->
<!-- </span>-->
<!-- <span slot="detailText" slot-scope="text,record">-->
<!-- <span class="text" :title="text">-->
<!-- {{text && text.length > 10?text.slice(0,9)+'...':text}}-->
<!-- </span>-->
<!-- </span>-->
<!-- </a-table>-->
<div class="page" v-if="dataSourcehistory.length > 0">
<a-pagination
:show-total="total => $t('total')+` ${total} `+$t('strip')"
show-quick-jumper
show-size-changer
:page-size.sync="pageSizehistory"
:total="total"
:current="pageNohistory"
@change="onChangehistory"
@showSizeChange="SizeChangehistory"
/>
</div>
</a-modal>
</a-card>
</template>
@@ -178,11 +304,21 @@ import { mapGetters } from 'vuex'
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
import ImportFile from '@/components/ImportFileData/index'
import moment from 'moment'
import batSetting from './batSetting'
import applyforrematch from './applyforrematch'
import rejectReason from './rejectReason'
import historyTable from './historyTable.vue'
import remark from './remark.vue'
export default {
name: 'index',
components: {
ImportFile
ImportFile,
batSetting,
applyforrematch,
rejectReason,
historyTable,
remark,
},
mixins: [ResizeHeader, ResizeColumnProvide],
data() {
@@ -199,13 +335,19 @@ export default {
visible: false,
loading: false,
toggleSearchStatus: false,
customizevisible: false,
dataSource: [],
selectedRowKeys: [],
selectedRowKeysRecord: [],
// checkedList: ['nio_number', 'params_name', 'operation'],
checkedList: [],
customizeList:[],
serialNumber: '',
total: 0,
pageSize: 10,
pageNo: 1,
pageNohistory: 1,
pageSizehistory: 10,
CategoryTreeList: [],
softwareversionList: [],
softwareplatform: [],
@@ -213,6 +355,24 @@ export default {
marketList: [],
queryParam: {},
formInline: {},
dataSourcehistory: [],
columnshistory: [
{
title: this.$t('OperationDetails'),
dataIndex: 'logContent',
align: 'left',
width: 320,
ellipsis: true,
scopedSlots: { customRender: 'content' }
},
{
title: this.$t('OperationTime'),
dataIndex: 'createTime',
align: 'left',
ellipsis: true,
width: 180
}
],
rules: {
whetherTobring: [
{
@@ -398,7 +558,15 @@ export default {
align: 'left',
width: 170,
ellipsis: true,
dataIndex: 'remarks'
dataIndex: 'remarks',
scopedSlots: { customRender: 'remarks' }
},
{
title: this.$t('operation'),
align: 'left',
width: 170,
ellipsis: true,
scopedSlots: { customRender: 'operation' }
},
],
userInfoQuery: {},
@@ -507,15 +675,88 @@ export default {
},
// 下发通知
issuenotice(){
let _this = this
this.$confirm({
content: _this.$t('notificationsent'),
onOk() {
// let query = {
// configDataList: configDataList,
// paramsManifestId: _this.paramsManifest.id
// }
// postAction(_this.url.add, query).then((res) => {
// if (res.success) {
// _this.$message.success(_this.$t('OperationSuccessful'))
// _this.GetgetTableList()
// } else {
// _this.$message.warning(_this.$t('operationFailed'))
// }
// })
}
})
},
// 批量设置
BatchSetting(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let content = []
this.$refs.batSettingRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 申请重新匹配
applyforrematch(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
let content = []
this.$refs.applyforrematchRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 历史记录
UpdateLog(val) {
this.visible = true
this.paramsReportDetailId = val.id
this.bussLogList(val)
},
onChangehistory(page, pageSize) {
this.pageNohistory = page
this.bussLogList()
},
SizeChangehistory(page, pageSize) {
this.pageNohistory = 1
this.pageSizehistory = pageSize
this.bussLogList()
},
bussLogList(val) {
let query = {
pageNo: this.pageNohistory,
pageSize: this.pageSizehistory,
paramsManifestId: this.$route.query.id,
paramsCollectManifestId: this.paramsReportDetailId
}
this.loading = true
getAction('paramsCollectManifestLog/paramsCollectManifestLogEO/page', query).then((res) => {
if (res.success) {
this.dataSourcehistory = res.result.records
if (this.dataSourcehistory && this.dataSourcehistory.length > 0) {
this.dataSourcehistory.forEach(val => {
val.logContent = val.logContent.replace(/\"/g, '<span class=\'textData\'>"</span>')
})
}
this.total = res.result.total
this.loading = false
} else {
this.loading = false
}
})
},
handleOk() {
this.pageNohistory = 1
this.visible = false
},
handleCancel() {
this.pageNohistory = 1
this.visible = false
},
// 保存
preservation(){
@@ -523,15 +764,155 @@ export default {
},
// 提交
submit(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
// this.$refs.rejectReasonRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 确认
confirm(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
// this.$refs.rejectReasonRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 退回
sendBack(){
if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
this.$refs.rejectReasonRef.edit(JSON.parse(JSON.stringify(this.selectedRowKeys)))
} else {
this.$message.warning(this.$t('selectLeastOne'))
}
},
// 备注编辑
getremark(item){
this.$refs.remarkRef.edit(JSON.parse(JSON.stringify(item)))
},
remarkForm(data,val){
console.log(data)
// 根据id匹配
this.dataSource.forEach(item => {
if(item.id == val){
item.remark = data
}
})
},
getcustomize() {
this.customizevisible = true
},
cancel() {
this.customizevisible = false
},
getcustomizeList(item){
let params = {
paramsManifestId: this.$route.query.id,
flag: '8'
}
getAction('report/detail/getHeader', params).then((res) => {
if (res.success) {
let List = []
let sList = []
res.result.forEach((item,index) => {
if(!item.type){
if(item.headFieldCn == '操作'){
item.field = 'operation'
item.disabled = true
}else if(item.headFieldCn == 'NIO编号' || item.headFieldCn == '参数名称'){
item.disabled = true
}
List.push(item)
}
if(item.type) {
sList.push(item)
}
})
this.customizeList = List
this.statuList = sList
}
})
if(item){
console.log(item)
this.checkedList = item
}
},
Change() {
this.selectedValue = this.checkedList
},
onCheckAllChange(e) {
let selectedValue = ['nio_number', 'params_name', 'operation']
this.checkedList = e.target.checked ? this.customizeList.map(item => item.field) : selectedValue
this.selectedValue = this.checkedList
this.indeterminate = false
},
handleSubmitcustomize() {
let list = []
let uniqueArray = this.selectedValue.filter((item, index, array) => {
return array.indexOf(item) === index
})
uniqueArray.forEach(item => {
this.customizeList.forEach((val, index) => {
if (item == val.field) {
// val.sort = index + 1
val.dbFieldName = val.db_field_name
val.dbFieldTxt = val.db_field_txt
list.push(val)
}
})
})
this.confirmLoading = true
let headCustomEOList = JSON.parse(JSON.stringify(list)).concat(this.statuList)
let query = {
headCustomEOList: headCustomEOList
}
postAction('head/headCustomEO/add', query).then((res) => {
if (res.success) {
this.confirmLoading = false
this.$message.success(this.$t('OperationSuccessful'))
this.customizevisible = false
this.getHeader()
} else {
this.$message.warning(this.$t('operationFailed'))
this.confirmLoading = false
this.customizevisible = false
}
})
},
getHeader() {
getAction('head/headCustomEO/list', {
moduleFlag: 'ota'
}).then((res) => {
if (res.success) {
if(res.result && res.result.length > 0){
this.columnsAll = res.result
}else{
this.columnsAll = this.columns
}
for (let j = 0; j < this.columnsAll.length; j++) {
for (let i = 0; i < this.column.length; i++) {
if (this.column[i].dataIndex == this.columnsAll[j].dataIndex) {
this.columnsAll[j] = this.column[i]
}
}
}
if(this.vehicleType != 'all'){
this.columnsAll.push({
title: this.$t('operation'),
align: 'left',
fixed: 'right',
width: 120,
scopedSlots: { customRender: 'operation' }
})
}
this.loading = false
this.JLoading = false
} else {
this.JLoading = false
this.loading = false
}
})
},
onChange(value, dateString) {
if (this.queryParams.softwarereleasetime && this.queryParams.softwarereleasetime.length > 0) {
@@ -621,4 +1002,10 @@ export default {
::v-deep .ant-table-placeholder {
margin-top: 8px !important;
}
::v-deep .popconfirmClassName .ant-popover-buttons{
display: none !important;
}
::v-deep .popconfirmClassName .anticon-exclamation-circle {
display: none !important;
}
</style>
@@ -0,0 +1,39 @@
<template>
<a-table
:components="drag(columnshistory,'columnshistory')"
class="table"
:columns="columnshistory"
:pagination="false"
:scroll="{x: '100%',y: 400}"
:data-source="dataSourcehistory"
:loading="loading"
>
<span slot="content" slot-scope="text,record">
<a-tooltip placement="topLeft">
<template slot="title">
<span v-html="text"></span>
</template>
<span v-html="text"></span>
</a-tooltip>
</span>
<span slot="detailText" slot-scope="text,record">
<span class="text" :title="text">
{{text && text.length > 10?text.slice(0,9)+'...':text}}
</span>
</span>
</a-table>
</template>
<script>
import { ResizeHeader, ResizeColumnProvide } from '@/mixins/header'
export default {
name: 'historyTable.vue',
props:['columnshistory','dataSourcehistory'],
mixins:[ResizeHeader, ResizeColumnProvide],
}
</script>
<style scoped>
</style>
@@ -0,0 +1,223 @@
<!--拒绝原因-->
<template>
<a-modal
:title="$t('rejectReason')"
:width="600"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
<span class="title-text-text" :title="$t('rejectReason')">
{{$t('rejectReason')}}</span>
</div>
<a-form-model-item class="itemModel" prop="rejectReason">
<a-textarea :placeholder="$t('pleaseEnter')+$t('rejectReason')"
v-model="formInline.rejectReason"
style="width: 90%"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction, putAction } from '@/api/manage'
import moment from 'moment'
export default {
name: 'settingList',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
transittime:false,
returntime:false,
propflag: false,
formInline: {
bazt:undefined,
batjsj:'',
tgthsj:'',
bz:'',
},
rules: {
rejectReason: [
{
required: true,
message: this.$t('rejectReason') + this.$t('cannotEmpty'),
trigger: 'blur'
}
],
// batjsj: [
// {
// required: true,
// message: this.$t('filingtime') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
// bz: [
// { min: 1, max: 500, message: this.$t('cantExeed') + '500' + this.$t('characters'), trigger: 'blur' }
// ],
// tgthsj: [
// {
// required: true,
// message: this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
},
ids: ''
}
},
mounted() {
},
methods: {
edit(row) {
if(row){
this.ids = row
}
this.visible = true
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
...this.formInline,
ids:this.ids
}
this.confirmLoading = true
// postAction('ota/otaBaSjList/batchRecord', query).then((res) => {
// if (res.success) {
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.confirmLoading = false
// this.$emit('getList')
// } else {
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
}
})
},
handleCancel() {
this.formInline = {}
this.ids = ''
this.visible = false
},
// dateChange(item) {
// this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
// }
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 90%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 144px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 90%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 3px;
}
</style>
@@ -0,0 +1,222 @@
<!--批量设置-->
<template>
<a-modal
:title="$t('BatchSetting')"
:width="600"
:visible="visible"
:confirm-loading="confirmLoading"
:maskClosable="false"
@ok="handleOk"
@cancel="handleCancel"
>
<a-form-model :model="formInline" class="formAdd" :rules="rules" ref="ruleForm">
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<!-- <span class="Required">*</span>-->
<span class="title-text-text" :title="$t('remarks')">
{{$t('remarks')}}</span>
</div>
<a-form-model-item class="itemModel" prop="bz">
<a-textarea :placeholder="$t('pleaseEnter')+$t('remarks')"
v-model="formInline.bz"
style="width: 90%"
:rows="4"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-form-model>
</a-modal>
</template>
<script>
import { getAction, postAction, putAction } from '@/api/manage'
import moment from 'moment'
export default {
name: 'settingList',
props: ['url'],
data() {
return {
visible: false,
confirmLoading: false,
transittime:false,
returntime:false,
propflag: false,
formInline: {
bazt:undefined,
batjsj:'',
tgthsj:'',
bz:'',
},
projectVersionList:[],
rules: {
// bazt: [
// {
// required: true,
// message: this.$t('recordstatus') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
// batjsj: [
// {
// required: true,
// message: this.$t('filingtime') + this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
// bz: [
// { min: 1, max: 500, message: this.$t('cantExeed') + '500' + this.$t('characters'), trigger: 'blur' }
// ],
// tgthsj: [
// {
// required: true,
// message: this.$t('cannotEmpty'),
// trigger: 'change'
// }
// ],
},
ids: ''
}
},
mounted() {
},
methods: {
edit(row) {
this.ids = row
this.visible = true
this.$nextTick(() => {
this.formInline = {}
this.$refs.ruleForm.clearValidate()
})
},
handleOk() {
this.$refs.ruleForm.validate(valid => {
if (valid) {
let query = {
...this.formInline,
ids:this.ids
}
this.confirmLoading = true
// postAction('ota/otaBaSjList/batchRecord', query).then((res) => {
// if (res.success) {
// this.$message.success(this.$t('OperationSuccessful'))
// this.visible = false
// this.confirmLoading = false
// this.$emit('remarkForm',this.formInline,this.ids)
// } else {
// this.$message.warning(this.$t('operationFailed'))
// this.confirmLoading = false
// }
// })
}
})
},
handleCancel() {
this.formInline = {}
this.ids = ''
this.visible = false
},
// dateChange(item) {
// this.formInline[item.db_field_name] = this.formInline[item.db_field_name] ? moment(this.formInline[item.db_field_name]).format('YYYY-MM-DD') : ''
// }
}
}
</script>
<style>
.formAdd .ant-form-item-label {
width: 130px;
}
.formAdd .ant-form-item-control-wrapper {
display: inline-block;
width: 100%;
}
/*.formAdd .ant-form-item {*/
/* margin-bottom: 20px;*/
/*}*/
.itemModel .ant-form-item-control-wrapper {
width: 90%;
}
.box-input .ant-select-selection--single {
height: 38px;
}
.box-input .ant-select-selection--multiple {
height: 38px;
}
.box-input .ant-select-selection__rendered {
line-height: 38px;
height: 38px;
}
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li {
margin-top: 6px;
}
.box-input .ant-calendar-picker {
line-height: 38px;
height: 38px;
}
.box-input .ant-calendar-picker-input {
height: 38px;
}
.box-input .ant-input-number-input-wrap {
line-height: 38px;
height: 38px;
}
</style>
<style scoped>
.box-title-text {
line-height: 1.4;
display: flex;
}
.title-text {
width: 144px;
text-align: right;
display: inline-block;
font-weight: 500;
font-size: 14px;
margin-right: 16px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
height: 42px;
line-height: 42px;
}
.box-input {
display: inline-block;
height: 38px;
width: 90%;
}
.itemModel {
width: calc(100% - 130px);
display: inline-block;
margin-top: 2px;
}
.title-text-text {
margin-top: 9px;
}
.formAdd {
margin-bottom: 40px;
}
.Required {
color: red;
margin-right: 3px;
}
</style>