From 31636073e0330e0f94adca0c17c6629b2fab45c5 Mon Sep 17 00:00:00 2001
From: quanyawei <401863037@qq.com>
Date: Sun, 08 Oct 2023 11:54:05 +0800
Subject: [PATCH] fix:接口修改
---
src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue | 46 ++++++++++++++++++++++++++++++++++++----------
1 files changed, 36 insertions(+), 10 deletions(-)
diff --git a/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue b/src/views/toCarryOutLegislativeReforms/components/workOrderInformation.vue
index 78f1045..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)">
@@ -80,7 +80,7 @@
</div>
</div>
<!-- ������������ -->
- <div v-if="dialogData.pageType ==='detail' && parentFormData.state >=30">
+ <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-descriptions title="������������" :column="parseInt('2')">
@@ -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
@@ -384,8 +400,10 @@
searchthisFileList(newVal) {
if (newVal.fileBaseList && newVal.fileBaseList.length > 0) {
newVal.fileBaseList.forEach(item => {
- // const srcApi = item.fileType === 1 ? api + 'preview/' : api + 'preview/cover/'
- this.fileBaseList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������
+ if (item.fileType === 1) {
+ 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}`,
fileType: item.fileType,
@@ -396,7 +414,9 @@
}
if (newVal.fileChangeList && newVal.fileChangeList.length > 0) {
newVal.fileChangeList.forEach(item => {
- this.fileChangeList.push(`${requestObj.baseUrl}/file/preview/${item.fileId}`) // ������
+ if (item.fileType === 1) {
+ 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}`,
fileType: item.fileType,
@@ -406,6 +426,9 @@
}
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.fileApproveListCover.push({
url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`,
@@ -416,6 +439,9 @@
}
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.fileDelayListCover.push({
url: item.fileType === 1 ? `${requestObj.baseUrl}/file/preview/cover/${item.fileId}` : `${requestObj.baseUrl}/file/preview/${item.fileId}`,
--
Gitblit v1.8.0