diff --git a/jero-web/src/views/documentTools/virtualList/components/editModel.vue b/jero-web/src/views/documentTools/virtualList/components/editModel.vue index d49fae519..958997538 100644 --- a/jero-web/src/views/documentTools/virtualList/components/editModel.vue +++ b/jero-web/src/views/documentTools/virtualList/components/editModel.vue @@ -196,12 +196,10 @@ :title="$t('certificationType')">{{$t('certificationType')}} - + diff --git a/jero-web/src/views/projectManagement/components/listEditModel.vue b/jero-web/src/views/projectManagement/components/listEditModel.vue index ea24f8b41..8e8a60291 100644 --- a/jero-web/src/views/projectManagement/components/listEditModel.vue +++ b/jero-web/src/views/projectManagement/components/listEditModel.vue @@ -143,12 +143,11 @@ :title="$t('certificationType')">{{$t('certificationType')}} - + diff --git a/jero-web/src/views/projectManagement/components/listOfRegulations.vue b/jero-web/src/views/projectManagement/components/listOfRegulations.vue index e551f0dce..e6a513714 100644 --- a/jero-web/src/views/projectManagement/components/listOfRegulations.vue +++ b/jero-web/src/views/projectManagement/components/listOfRegulations.vue @@ -151,6 +151,10 @@ @click="deleteLib(record)"> {{ $t('deleteLib') }} + + + + {{ text && text.length > 10 ? text.slice(0, 9) + '...' : text }} @@ -239,7 +243,7 @@ - + @@ -307,10 +311,10 @@ import ImportFile from '@/components/ImportFile/index' import listAddModel from './listAddModel' import listEditModel from './listEditModel' - import uploadFile from '@/components/uploadFile/file' import batSetting from './batSetting' import transferList from './transferList' import fixedPlate from './fixedPlateForm' + import resultReportedUpload from './resultReportedUpload' import globalAdvancedQuery from '@/components/globalAdvancedQuery/index' import { getAction, postAction, downloadFile, deleteAction } from '@/api/manage' import moment from 'moment' @@ -324,10 +328,10 @@ listAddModel, listEditModel, batSetting, - uploadFile, transferList, globalAdvancedQuery, - fixedPlate + fixedPlate, + resultReportedUpload }, data() { return { @@ -600,7 +604,7 @@ scopedSlots: { customRender: 'operation' } } ], - columnsFile: [ + columnsFileAll: [ { title: this.$t('deliverableTemplate'), dataIndex: 'fileName', @@ -608,6 +612,13 @@ width: 260, ellipsis: true }, + { + title: this.$t('resultReported'), + dataIndex: 'fileName', + align: 'center', + width: 260, + ellipsis: true + }, { title: this.$t('operation'), align: 'center', @@ -653,6 +664,7 @@ ] }, queryParam: {}, + fileTitle: '', url: { addModelList: '/project/projectLawsInventoryEO/queryPageDummy', queryConditionInventory: '/project/projectLawsInventoryEO/queryConditionInventory', @@ -675,6 +687,7 @@ downLoadFileUrl: window._CONFIG['domianPreviewURL'] + '/sys/common/download', loading: false, dataSource: [], + isResultReported: false, // fieldList | array |✔| 需要查询的列集合示例如下,type类型有:date/datetime/string/int/number fieldList: [ { @@ -733,6 +746,27 @@ } this.getList() }, + computed: { + columnsFile() { + let columnResult = JSON.parse(JSON.stringify(this.columnsFileAll)) + if (!this.isResultReported) { + for (var i = 0; i < columnResult.length; i++) { + if (columnResult[i].title === this.$t('resultReported')) { + columnResult.splice(i, 1) + i-- + } + } + } else if (this.isResultReported) { + for (var i = 0; i < columnResult.length; i++) { + if (columnResult[i].title === this.$t('deliverableTemplate')) { + columnResult.splice(i, 1) + i-- + } + } + } + return columnResult + } + }, methods: { ...mapGetters(['userInfo']), handleModule() { @@ -1091,7 +1125,7 @@ }) setTimeout(() => { this.confirmLoading = true - this.startProcess(this.dataSource[i],index) + this.startProcess(this.dataSource[i], index) }, 500) } } @@ -1101,23 +1135,23 @@ }) }, - startProcess(value,index) { + startProcess(value, index) { let query = { type: 1, msg: JSON.stringify(value).replace(/\"/g, '\''), projectNameId: this.$route.query.projectNameId, projectName: this.$route.query.projectName, - projectLawsInventoryId:value.id, + projectLawsInventoryId: value.id, taskAffirmDueDate: this.formInline.taskAffirmDueDate } postAction('/workFlow/startProcess', query).then((res) => { if (res.success) { - this.completeTask(value, res.result,index) + this.completeTask(value, res.result, index) } }) }, - completeTask(value, taskId,index) { + completeTask(value, taskId, index) { let handlingTime = moment(new Date()).format('YYYY-MM-DD HH:mm:ss') value.handlingTime = handlingTime let query = { @@ -1127,7 +1161,7 @@ } postAction('/workFlow/completeTask', query).then((res) => { if (res.success) { - if (index == this.selectedRowKeys.length){ + if (index == this.selectedRowKeys.length) { this.visible = false this.selectedRowKeys = [] this.$message.success(this.$t('OperationSuccessful')) @@ -1291,7 +1325,14 @@ downloadFile('/sys/common/downLoadFile', item.fileName, { id: item.id }) }, - clickButtonToUpload(item) { + clickButtonToUpload(item, num) { + if (num == 1) { + this.isResultReported = true + this.fileTitle = this.$t('resultReported') + } else { + this.isResultReported = false + this.fileTitle = this.$t('deliverableTemplate') + } this.loading = true this.visibleFile = true getAction('sys/common/getFileInfos', { id: item }).then((res) => { @@ -1330,31 +1371,8 @@ }, resultReportedClick(val) { - this.clickButtonToUploadFile() - }, - clickButtonToUploadFile(item) { - this.$refs.uploadFile.perentHandleFunc() - this.$refs.uploadFile.visible = true - this.uploadName = item - getAction('sys/common/getFileInfos', { id: this.formInline[item] }).then((res) => { - if (res.success) { - this.$refs.uploadFile.perentHandleFunc(res.result) - } else { - this.$refs.uploadFile.perentHandleFunc() - } - }) - }, - /** 上传文件的回调 */ - uploadSuccess(data) { - let attIdList = [] - if (data && data.length > 0) { - data.map(item => { - attIdList.push(item.id || data.name) - }) - } - /** 赋值给当前对应的表单文件 */ - this.formInline[this.uploadName] = attIdList.join(',') - this.formInline = { ...this.formInline } + this.clickButtonToUpload(val, 1) + // this.$refs.resultReportedUploadRef.clickButtonToUploadFile(val) } } }