From 158629c4bc4794184ad99509e4fad804ee4dafbd Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Tue, 14 Nov 2023 10:30:49 +0800 Subject: [PATCH] fix:立行立改添加修改责任单位 --- src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue | 254 +++++++++++++++++++++++++------------------------- 1 files changed, 126 insertions(+), 128 deletions(-) diff --git a/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue b/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue index 575969e..f1c3aa0 100644 --- a/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue +++ b/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue @@ -8,37 +8,26 @@ <div> <div v-if="dialogData.pageType !=='delay'" class="stepsList"> <el-steps :space="200" :active="parentFormData.approveList.length+1" align-center> - <el-step - v-for="(item,index) in setepList" - :key="index" - :title="'' + item.createName + ' ' + item.stateName" - :description="item.createTime" - /> + <el-step v-for="(item,index) in setepList" :key="index" :title="'' + item.createName + ' ' + item.stateName" :description="item.createTime" /> </el-steps> </div> <div class="inforData"> - <el-descriptions title="������������" :column="parseInt('4')"> + <el-descriptions title="������������"> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.escalationTime }}</el-descriptions-item> - <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.pollutePosition }}</el-descriptions-item> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ unitIdFormatter }}</el-descriptions-item> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ polluteTypeFormatter }}</el-descriptions-item> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ dictObj.changeEnum[parentFormData.changeType] }}</el-descriptions-item> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.changeDay }}</el-descriptions-item> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ updataUnitIdFormatter }}</el-descriptions-item> <el-descriptions-item label="���������" label-class-name="itemSpan">{{ parentFormData.escalationName }}</el-descriptions-item> + <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.pollutePosition }}</el-descriptions-item> </el-descriptions> <el-descriptions :column="parseInt('1')"> <el-descriptions-item label="������������" label-class-name="itemSpan" :content-style="{'width': '80%'}">{{ parentFormData.problemDescribe }}</el-descriptions-item> <el-descriptions-item label="������" label-class-name="itemSpan" :content-style="{'width': '80%'}"> <div> <div v-for="(file,index) in fileBaseListCover" :key="file.id+index" class="block"> - <el-image - v-if="file.fileType ===1" - style="width: 100px; height: 100px" - :src="file.url" - :preview-src-list="getPreviewImages(file.id,fileBaseList)" - :initial-index="index" - /> + <el-image v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" :preview-src-list="getPreviewImages(file.id,fileBaseList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> ������������������������ video ��������� </video> @@ -63,12 +52,7 @@ </el-form-item> </div> <el-form-item label="������������:"> - <el-input - v-model="workForme.changeDescribe" - type="textarea" - :autosize="{ minRows: 2, maxRows: 4}" - placeholder="���������������" - /> + <el-input v-model="workForme.changeDescribe" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="���������������" /> </el-form-item> <el-row> <el-form-item label="������:"> @@ -82,7 +66,8 @@ <!-- ������������ --> <div v-if="(dialogData.pageType ==='detail'||dialogData.pageType ==='approve' )&& parentFormData.state >=30"> <el-row class="rectificationContent"> - <el-col :span="12"><div class="grid-content bg-purple" /> + <el-col :span="12"> + <div class="grid-content bg-purple" /> <el-descriptions title="������������" :column="parseInt('2')"> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.changeType }}</el-descriptions-item> <el-descriptions-item label="���������" label-class-name="itemSpan">{{ parentFormData.changeName }}</el-descriptions-item> @@ -91,19 +76,17 @@ <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.changeDescribe }}</el-descriptions-item> </el-descriptions> </el-col> - <el-col :span="12"><div class="grid-content bg-purple-light" /> + <el-col :span="12"> + <div class="grid-content bg-purple-light" /> <el-row> - <el-col :span="3" style="margin-top: 40px;font-size: 15px;color: #101010;"><div class="grid-content bg-purple" />���������</el-col> - <el-col :span="21"><div class="grid-content bg-purple-light" /> + <el-col :span="3" style="margin-top: 40px;font-size: 15px;color: #101010;"> + <div class="grid-content bg-purple" />��������� + </el-col> + <el-col :span="21"> + <div class="grid-content bg-purple-light" /> <div> <div v-for="(file,index) in fileChangeListCover" :key="file.id+index" class="block"> - <el-image - v-if="file.fileType ===1" - style="width: 100px; height: 100px" - :src="file.url" - :preview-src-list="getPreviewImages(file.id,fileChangeList)" - :initial-index="index" - /> + <el-image v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" :preview-src-list="getPreviewImages(file.id,fileChangeList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> ������������������������ video ��������� </video> @@ -117,7 +100,8 @@ <!-- ������������ --> <div v-if="dialogData.pageType ==='detail'&& parentFormData.state>30"> <el-row class="rectificationContent"> - <el-col :span="12"><div class="grid-content bg-purple" /> + <el-col :span="12"> + <div class="grid-content bg-purple" /> <el-descriptions title="������������" :column="2"> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.checkScore }}</el-descriptions-item> </el-descriptions> @@ -125,20 +109,18 @@ <el-descriptions-item label="������" label-class-name="itemSpan">{{ parentFormData.checkDescribe }}</el-descriptions-item> </el-descriptions> </el-col> - <el-col :span="12"><div class="grid-content bg-purple-light" /> + <el-col :span="12"> + <div class="grid-content bg-purple-light" /> <el-row> - <el-col :span="3" style="margin-top: 40px;font-size: 15px;color: #101010;"><div class="grid-content bg-purple" />���������</el-col> - <el-col :span="21"><div class="grid-content bg-purple-light" /> + <el-col :span="3" style="margin-top: 40px;font-size: 15px;color: #101010;"> + <div class="grid-content bg-purple" />��������� + </el-col> + <el-col :span="21"> + <div class="grid-content bg-purple-light" /> <div> <div> <div v-for="(file,index) in fileApproveListCover" :key="file.id+index" class="block"> - <el-image - v-if="file.fileType ===1" - style="width: 100px; height: 100px" - :src="file.url" - :preview-src-list="getPreviewImages(file.id,fileApproveList)" - :initial-index="index" - /> + <el-image v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" :preview-src-list="getPreviewImages(file.id,fileApproveList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> ������������������������ video ��������� </video> @@ -153,30 +135,30 @@ <!-- ������������ --> <div v-if="(dialogData.pageType ==='delay' && (dialogData.pageState ==='view' ||dialogData.pageState ==='edit'))"> <el-row class="rectificationContent"> - <el-col :span="12"><div class="grid-content bg-purple" /> + <el-col :span="12"> + <div class="grid-content bg-purple" /> <el-descriptions title="������������" :column="1"> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.extensionNum }}</el-descriptions-item> <el-descriptions-item label="������������" label-class-name="itemSpan">{{ parentFormData.remake }}</el-descriptions-item> </el-descriptions> </el-col> - <el-col :span="12"><div class="grid-content bg-purple-light" /> + <el-col :span="12"> + <div class="grid-content bg-purple-light" /> <el-row> - <el-col :span="3" style="margin-top: 40px;font-size: 15px;color: #101010;"><div class="grid-content bg-purple" />���������</el-col> - <el-col :span="21"><div class="grid-content bg-purple-light" /> + <el-col :span="3" style="margin-top: 40px;font-size: 15px;color: #101010;"> + <div class="grid-content bg-purple" />��������� + </el-col> + <el-col :span="21"> + <div class="grid-content bg-purple-light" /> <div> <div v-for="(file,index) in fileDelayListCover" :key="file.id+index" class="block"> - <el-image - v-if="file.fileType ===1" - style="width: 100px; height: 100px" - :src="file.url" - :preview-src-list="getPreviewImages(file.id,fileDelayList)" - :initial-index="index" - /> + <el-image v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" :preview-src-list="getPreviewImages(file.id,fileDelayList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> ������������������������ video ��������� </video> </div> - </div></el-col> + </div> + </el-col> </el-row> </el-col> </el-row> @@ -188,12 +170,7 @@ <el-input v-model="approveForm.checkScore" style="width: 120px;" size="mini" /> </el-form-item> <el-form-item label="������:"> - <el-input - v-model="approveForm.checkDescribe" - type="textarea" - :autosize="{ minRows: 2, maxRows: 4}" - placeholder="���������������" - /> + <el-input v-model="approveForm.checkDescribe" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="���������������" /> </el-form-item> <el-form-item label="������:"> <uploadFile :upload-url="uploadTermExcelUrl" :sys-code="dialogData.sysCode" /> @@ -207,12 +184,7 @@ <el-input v-model="delayForm.extensionNum" style="width: 200px;" /> </el-form-item> <el-form-item label="������������:"> - <el-input - v-model="delayForm.remake" - type="textarea" - :autosize="{ minRows: 2, maxRows: 4}" - placeholder="���������������" - /> + <el-input v-model="delayForm.remake" type="textarea" :autosize="{ minRows: 2, maxRows: 4}" placeholder="���������������" /> </el-form-item> <el-form-item label="������:"> <uploadFile :upload-url="uploadTermExcelUrl" :sys-code="dialogData.sysCode" /> @@ -230,13 +202,7 @@ </el-dialog> <el-dialog :visible.sync="videoVisible" width="600px" :modal-append-to-body="false" :destroy-on-close="true" @close="handleCancel"> <div style="text-align: center;"> - <video - ref="video" - style="width: 300px;height: 500px" - :src="dialogImageUrl" - controls - autoplay - /> + <video ref="video" style="width: 300px;height: 500px" :src="dialogImageUrl" controls autoplay /> </div> </el-dialog> </div> @@ -272,9 +238,7 @@ remake: '', extensionNum: '' }, - rectificationFromData: { - - }, + rectificationFromData: {}, dialogVisibleMainGraph: false, hasFile: '', setepListAdd: { @@ -287,9 +251,7 @@ { createName: '', stateName: '������', createTime: '' }, { createName: '', stateName: '������', createTime: '' } ], - set3: [ - { createName: '', stateName: '������', createTime: '' } - ] + set3: [{ createName: '', stateName: '������', createTime: '' }] }, unitList: [], polluteList: [], @@ -316,16 +278,26 @@ console.log('parentFormData.approveList', this.dialogData.parentFormData) return this.dialogData.parentFormData }, - updataUnitIdFormatter: function() { - const data = this.unitList.find(item => item && item.unitId === this.dialogData.parentFormData.escalationUnitId) + updataUnitIdFormatter: function () { + const data = this.unitList.find( + item => + item && + item.unitId === this.dialogData.parentFormData.escalationUnitId + ) return data ? data.unitName : '' }, - unitIdFormatter: function() { - const data = this.unitList.find(item => item && item.unitId === this.dialogData.parentFormData.unitId) + unitIdFormatter: function () { + const data = this.unitList.find( + item => item && item.unitId === this.dialogData.parentFormData.unitId + ) return data ? data.unitName : '' }, - polluteTypeFormatter: function() { - const data = this.polluteList.find(item => item && parseInt(item.dataKey) === this.dialogData.parentFormData.polluteType) + polluteTypeFormatter: function () { + const data = this.polluteList.find( + item => + item && + parseInt(item.dataKey) === this.dialogData.parentFormData.polluteType + ) return data ? data.dataValue : '' }, setepList() { @@ -346,7 +318,7 @@ } }, watch: { - 'parentFormData': { + parentFormData: { handler(newVal) { this.searchthisFileList(newVal) }, @@ -363,7 +335,7 @@ console.log('fileList', fileList) this.fileList = [] if (fileList.length > 0) { - fileList.map((item) => { + fileList.map(item => { if (item.response) { this.fileList.push(item.response.data) } @@ -401,11 +373,16 @@ if (newVal.fileBaseList && newVal.fileBaseList.length > 0) { newVal.fileBaseList.forEach(item => { if (item.fileType === 1) { - this.fileBaseList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������ + this.fileBaseList.push( + `${requestObj.baseUrl}/file/preview/${item.fileId}` + ) // ������ } this.fileBaseListCover.push({ - url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, + url: + item.fileType === 1 + ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` + : `${requestObj.baseUrl}/file/preview/${item.fileId}`, fileType: item.fileType, id: item.fileId }) @@ -415,10 +392,15 @@ if (newVal.fileChangeList && newVal.fileChangeList.length > 0) { newVal.fileChangeList.forEach(item => { if (item.fileType === 1) { - this.fileChangeList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������ + this.fileChangeList.push( + `${requestObj.baseUrl}/file/preview/${item.fileId}` + ) // ������ } this.fileChangeListCover.push({ - url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, + url: + item.fileType === 1 + ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` + : `${requestObj.baseUrl}/file/preview/${item.fileId}`, fileType: item.fileType, id: item.fileId }) @@ -427,11 +409,18 @@ if (newVal.fileApproveList && newVal.fileApproveList.length > 0) { newVal.fileApproveList.forEach(item => { if (item.fileType === 1) { - this.fileApproveList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������ + this.fileApproveList.push( + `${requestObj.baseUrl}/file/preview/${item.fileId}` + ) // ������ } - this.fileApproveList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������ + this.fileApproveList.push( + `${requestObj.baseUrl}/file/preview/${item.fileId}` + ) // ������ this.fileApproveListCover.push({ - url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, + url: + item.fileType === 1 + ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` + : `${requestObj.baseUrl}/file/preview/${item.fileId}`, fileType: item.fileType, id: item.fileId }) @@ -440,11 +429,18 @@ if (newVal.fileList && newVal.fileList.length > 0) { newVal.fileList.forEach(item => { if (item.fileType === 1) { - this.fileDelayList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������ + this.fileDelayList.push( + `${requestObj.baseUrl}/file/preview/${item.fileId}` + ) // ������ } - this.fileDelayList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������ + this.fileDelayList.push( + `${requestObj.baseUrl}/file/preview/${item.fileId}` + ) // ������ this.fileDelayListCover.push({ - url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`, + url: + item.fileType === 1 + ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` + : `${requestObj.baseUrl}/file/preview/${item.fileId}`, fileType: item.fileType, id: item.fileId }) @@ -459,7 +455,7 @@ this.$request({ url: '/allocation/unit', method: 'get' - }).then((res) => { + }).then(res => { this.unitList = res.data }) }, @@ -471,7 +467,7 @@ id: this.dialogData.parentFormData.id, state: state } - }).then((res) => { + }).then(res => { if (res.code === 0) { this.$emit('update:visible', false) this.$emit('handeleSumit') @@ -488,32 +484,32 @@ if (this.dialogData.pageType === 'work') { api = '/allocation/change' data = { - 'allocationId': this.dialogData.parentFormData.allocationId, + allocationId: this.dialogData.parentFormData.allocationId, ...this.workForme, - 'fileChangeList': this.fileList, + fileChangeList: this.fileList, state: 30 } } else if (this.dialogData.pageType === 'approve') { api = '/allocation/check' data = { - 'allocationId': this.dialogData.parentFormData.allocationId, + allocationId: this.dialogData.parentFormData.allocationId, ...this.approveForm, - 'fileApproveList': this.fileList, + fileApproveList: this.fileList, state: state } } else if (this.dialogData.pageType === 'delay') { api = '/allocation/applyfor' data = { - 'allocationId': this.dialogData.parentFormData.allocationId, + allocationId: this.dialogData.parentFormData.allocationId, ...this.delayForm, - 'fileList': this.fileList + fileList: this.fileList } } this.$request({ url: api, method: 'post', data: data - }).then((res) => { + }).then(res => { if (res.code === 0) { this.$emit('update:visible', false) this.$emit('handeleSumit') @@ -526,7 +522,7 @@ this.$request({ url: '/allocation/contaminate', method: 'get' - }).then((res) => { + }).then(res => { this.polluteList = res.data }) } @@ -535,14 +531,14 @@ </script> <style lang="scss" scoped> -.titBox{ +.titBox { position: relative; font-size: 18px; - div:first-child{ + div:first-child { position: absolute; left: 10px; } - div{ + div { display: inline-block; } } @@ -550,26 +546,28 @@ border-bottom: 1px dashed rgba(187, 187, 187, 1); padding-bottom: 10px; } -.inforData{ +.inforData { margin-top: 20px; border-bottom: 1px dashed rgba(187, 187, 187, 1); padding-bottom: 10px; - font-size: 15px!important; - color: rgba(16, 16, 16, 1)!important; + font-size: 15px !important; + color: rgba(16, 16, 16, 1) !important; } - /deep/.itemSpan{ - width: 70px; - text-align: right; - font-size: 15px; - color: rgba(16, 16, 16, 1); - } - .rectification ,.examineAndApprove,.rectificationContent{ - margin-top: 20px; - border-bottom: 1px dashed rgba(187, 187, 187, 1); - margin-bottom: 10px; - } - .block { - display: inline-block; - margin-right: 10px; +/deep/.itemSpan { + width: 70px; + text-align: right; + font-size: 15px; + color: rgba(16, 16, 16, 1); +} +.rectification, +.examineAndApprove, +.rectificationContent { + margin-top: 20px; + border-bottom: 1px dashed rgba(187, 187, 187, 1); + margin-bottom: 10px; +} +.block { + display: inline-block; + margin-right: 10px; } </style> -- Gitblit v1.8.0