From d0e11209f678cf424a7196239ba4d048522653cc Mon Sep 17 00:00:00 2001 From: "zyx.net" Date: Mon, 14 Aug 2023 16:40:26 +0800 Subject: [PATCH] =?UTF-8?q?OTA=E7=AE=A1=E7=90=86=E5=B8=83=E5=B1=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- jero-web/src/common/lang/en-us.js | 2 +- jero-web/src/common/lang/zh-cn.js | 1 + .../components/applyforrematch.vue | 233 ++++++++++ .../components/batSetting.vue | 266 +++++++++++ .../otaAuthentication/components/detil.vue | 415 +++++++++++++++++- .../components/historyTable.vue | 39 ++ .../components/rejectReason.vue | 223 ++++++++++ .../otaAuthentication/components/remark.vue | 222 ++++++++++ 8 files changed, 1386 insertions(+), 15 deletions(-) create mode 100644 jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue create mode 100644 jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue create mode 100644 jero-web/src/views/otamanagement/otaAuthentication/components/historyTable.vue create mode 100644 jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue create mode 100644 jero-web/src/views/otamanagement/otaAuthentication/components/remark.vue diff --git a/jero-web/src/common/lang/en-us.js b/jero-web/src/common/lang/en-us.js index b69f3f62f..4c66fa8b5 100644 --- a/jero-web/src/common/lang/en-us.js +++ b/jero-web/src/common/lang/en-us.js @@ -1938,5 +1938,5 @@ module.exports = { matchingstate:'Matching state', issuenotice:'Issue notice', applyforrematch:'Apply for rematch', - + notificationsent:'Is a notification sent?', } \ No newline at end of file diff --git a/jero-web/src/common/lang/zh-cn.js b/jero-web/src/common/lang/zh-cn.js index 4462d9563..c40c93f4b 100644 --- a/jero-web/src/common/lang/zh-cn.js +++ b/jero-web/src/common/lang/zh-cn.js @@ -3894,4 +3894,5 @@ module.exports = { matchingstate:'匹配状态', issuenotice:'下发通知', applyforrematch:'申请重新匹配', + notificationsent:'是否下发通知?', } \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue new file mode 100644 index 000000000..152319db9 --- /dev/null +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/applyforrematch.vue @@ -0,0 +1,233 @@ + + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue new file mode 100644 index 000000000..b2ed17ab1 --- /dev/null +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/batSetting.vue @@ -0,0 +1,266 @@ + + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue index 978fcb7a5..49ac97222 100644 --- a/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/detil.vue @@ -33,7 +33,7 @@ v-model="queryParam.influencestatute"> - @@ -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, '"') + }) + } + 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; +} \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/historyTable.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/historyTable.vue new file mode 100644 index 000000000..4c6a80a74 --- /dev/null +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/historyTable.vue @@ -0,0 +1,39 @@ + + + + + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue new file mode 100644 index 000000000..c28ae29c5 --- /dev/null +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/rejectReason.vue @@ -0,0 +1,223 @@ + + + + + + + \ No newline at end of file diff --git a/jero-web/src/views/otamanagement/otaAuthentication/components/remark.vue b/jero-web/src/views/otamanagement/otaAuthentication/components/remark.vue new file mode 100644 index 000000000..afb9d6452 --- /dev/null +++ b/jero-web/src/views/otamanagement/otaAuthentication/components/remark.vue @@ -0,0 +1,222 @@ + + + + + + + \ No newline at end of file