From 2d445a7f255343099b4647ea5ce51d2980768003 Mon Sep 17 00:00:00 2001 From: quanyawei <401863037@qq.com> Date: Thu, 28 Sep 2023 16:45:41 +0800 Subject: [PATCH] fix:立行立改 --- src/views/toCarryOutLegislativeReforms/delay/index.vue | 6 +- src/views/toCarryOutLegislativeReforms/reform/index.vue | 6 +- src/views/toCarryOutLegislativeReforms/components/newWorkOrder.vue | 24 +++++++++++- src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue | 28 +++++++++++--- src/views/toCarryOutLegislativeReforms/summaryPage/index.vue | 34 ++++++++--------- 5 files changed, 66 insertions(+), 32 deletions(-) diff --git a/src/views/toCarryOutLegislativeReforms/components/newWorkOrder.vue b/src/views/toCarryOutLegislativeReforms/components/newWorkOrder.vue index fb2d0cc..32b228b 100644 --- a/src/views/toCarryOutLegislativeReforms/components/newWorkOrder.vue +++ b/src/views/toCarryOutLegislativeReforms/components/newWorkOrder.vue @@ -1,6 +1,6 @@ <template> <div> - <el-dialog :title="title" :visible.sync="visible" width="900px" center :before-close="close"> + <el-dialog :title="title" :visible.sync="visible" top="30px" width="900px" center :before-close="close"> <div> <el-form ref="ruleForm" :disabled="pageState==='detail'" label-width="100px" :model="formData" class="demo-form-inline" :rules="rules"> <el-row> @@ -109,7 +109,7 @@ v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" - :preview-src-list="fileBaseList" + :preview-src-list="getPreviewImages(file.fileId,fileBaseList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> @@ -147,6 +147,7 @@ import uploadFile from '@/components/UploadExcel/index' import bus from '@/Bus' import requestObj from '@/utils/request' +import _ from 'lodash' export default { components: { uploadFile }, props: { @@ -261,6 +262,25 @@ }) }, methods: { + getPreviewImages(index, list) { + let startIndex = 0 + const chechList = _.cloneDeep(list) + chechList.forEach((item, i) => { + const str = item.substring(item.lastIndexOf('/') + 1) + console.log('str', str) + if (Number(str) === Number(index)) { + startIndex = i + } + }) + + console.log('index', index) + console.log('startIndex', startIndex) + var imgList = [...list] + if (index === 0) return imgList + var start = imgList.splice(startIndex) + var remain = imgList.splice(0, startIndex) + return start.concat(remain) + }, openVideo(item) { console.log('item', item) this.dialogImageUrl = item.url diff --git a/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue b/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue index 4c00f47..575969e 100644 --- a/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue +++ b/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue @@ -1,6 +1,6 @@ <template> <div> - <el-dialog :title="dialogData.title" :visible.sync="visible" width="900px" center :before-close="close"> + <el-dialog :title="dialogData.title" top="30px" :visible.sync="visible" width="900px" center :before-close="close"> <div slot="title" class="titBox"> <div>{{ parentFormData.allocationNum }}</div> <div>{{ dialogData.title }}</div> @@ -36,7 +36,7 @@ v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" - :preview-src-list="fileBaseList" + :preview-src-list="getPreviewImages(file.id,fileBaseList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> @@ -101,7 +101,7 @@ v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" - :preview-src-list="fileChangeList" + :preview-src-list="getPreviewImages(file.id,fileChangeList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> @@ -136,7 +136,7 @@ v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" - :preview-src-list="fileApproveList" + :preview-src-list="getPreviewImages(file.id,fileApproveList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> @@ -169,7 +169,7 @@ v-if="file.fileType ===1" style="width: 100px; height: 100px" :src="file.url" - :preview-src-list="fileDelayList" + :preview-src-list="getPreviewImages(file.id,fileDelayList)" :initial-index="index" /> <video v-else :src="file.url" style="width: 100px; height: 100px" @click="openVideo(file)"> @@ -260,7 +260,7 @@ return { centerDialogVisible: true, workForme: { - isChange: '', + isChange: 0, changeName: '', changeDescribe: '' }, @@ -372,6 +372,22 @@ }) }, methods: { + getPreviewImages(index, list) { + let startIndex = 0 + const chechList = _.cloneDeep(list) + chechList.forEach((item, i) => { + const str = item.substring(item.lastIndexOf('/') + 1) + if (Number(str) === Number(index)) { + startIndex = i + } + }) + console.log('startIndex', startIndex) + var imgList = [...list] + if (index === 0) return imgList + var start = imgList.splice(startIndex) + var remain = imgList.splice(0, startIndex) + return start.concat(remain) + }, openVideo(item) { console.log('item', item) this.dialogImageUrl = item.url diff --git a/src/views/toCarryOutLegislativeReforms/delay/index.vue b/src/views/toCarryOutLegislativeReforms/delay/index.vue index bee5f52..2a98af6 100644 --- a/src/views/toCarryOutLegislativeReforms/delay/index.vue +++ b/src/views/toCarryOutLegislativeReforms/delay/index.vue @@ -130,9 +130,9 @@ background :current-page="pagination.currentPage" :page-sizes="pagination.pageSizes" - :page-size="pagination.PageSize" + :page-size="pagination.pageSize" :total="pagination.totalCount" - layout="sizes,prev, pager, next, jumper" + layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" @current-change="handleCurrentChange" /> @@ -202,7 +202,7 @@ // ��������������������� handleSizeChange(val) { // ��������������������������� - this.pagination.PageSize = val + this.pagination.pageSize = val // ��������������������������������������������������������������������������� this.pagination.currentPage = 1 this.handleSearch() diff --git a/src/views/toCarryOutLegislativeReforms/reform/index.vue b/src/views/toCarryOutLegislativeReforms/reform/index.vue index 5af2319..f3515e1 100644 --- a/src/views/toCarryOutLegislativeReforms/reform/index.vue +++ b/src/views/toCarryOutLegislativeReforms/reform/index.vue @@ -162,9 +162,9 @@ background :current-page="pagination.currentPage" :page-sizes="pagination.pageSizes" - :page-size="pagination.PageSize" + :page-size="pagination.pageSize" :total="pagination.totalCount" - layout="sizes,prev, pager, next, jumper" + layout="total, sizes, prev, pager, next, jumper" @size-change="handleSizeChange" @current-change="handleCurrentChange" /> @@ -403,7 +403,7 @@ // ��������������������� handleSizeChange(val) { // ��������������������������� - this.pagination.PageSize = val + this.pagination.pageSize = val // ��������������������������������������������������������������������������� this.pagination.currentPage = 1 this.handleSearch() diff --git a/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue b/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue index 7b84de2..cb5917f 100644 --- a/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue +++ b/src/views/toCarryOutLegislativeReforms/summaryPage/index.vue @@ -25,20 +25,20 @@ </div> <div class="agentSummary"> <div class="circle"> - <span>������������</span> - <span>{{ responeForm.total }}</span> + <div>������������</div> + <div>{{ responeForm.total }}</div> </div> <div class="circle"> - <span>���������</span> - <span>{{ responeForm.total }}</span> + <div>���������</div> + <div>{{ responeForm.unComplete }}</div> </div> <div class="circle"> - <span>���������</span> - <span>{{ responeForm.complete }}</span> + <div>���������</div> + <div>{{ responeForm.complete }}</div> </div> <div class="circle"> - <span>������</span> - <span>{{ responeForm.overdue }}</span> + <div>������</div> + <div>{{ responeForm.overdue }}</div> </div> </div> <div class="overviewAndDetails"> @@ -343,7 +343,7 @@ margin-top: 20px; @for $i from 1 to length($bgcolorlist) + 1 { - div:nth-child(#{$i}) { + .circle:nth-child(#{$i}) { background-repeat: no-repeat; background-size: cover; background-position: center center; @@ -359,15 +359,13 @@ width: 200px; height: 90px; align-items: center; - padding-top: 20px; - - span { - margin: 10px 20px; - display: block; - color: rgba(255, 255, 255, 1); - font-size: 20px; - font-weight: 700; - } + color: rgba(255, 255, 255, 1); + font-size: 20px; + font-weight: 700; + display: flex; + justify-content: center; + flex-wrap: wrap; + flex-direction: column; } } -- Gitblit v1.8.0