浏览代码

flot terminer

scorpio 2 年之前
父节点
当前提交
c83bf656b8
共有 2 个文件被更改,包括 9 次插入4 次删除
  1. 4 0
      src/views/home/component/dash.vue
  2. 5 4
      src/views/home/component/dispatch.vue

+ 4 - 0
src/views/home/component/dash.vue

@@ -794,6 +794,10 @@ export default {
      * 项目结转
      */
     projectCarry() {
+      if (this.selectList.length === 0) {
+        this.$message.error('请先选择要结转的项目')
+        return
+      }
       this.$api.project
         .projectCarry({ ids: this.selectList.join(',') })
         .then(res => {

+ 5 - 4
src/views/home/component/dispatch.vue

@@ -122,7 +122,7 @@
     </div>
     <el-image-viewer
       v-if="showImage"
-      :url-list="srcList"
+      :url-list="preList"
       :initial-index="imageIndex"
       @close="showImage = false"
     />
@@ -167,6 +167,7 @@ export default {
   },
   data() {
     return {
+      preList: [],
       projectId: '',
       btnTitle: '编辑',
       showImage: false,
@@ -290,6 +291,7 @@ export default {
       })
     },
     showImageView(res, index) {
+      this.preList = this.srcList
       this.imageIndex = index
       this.showImage = true
     },
@@ -317,7 +319,6 @@ export default {
       if (type === 'view') {
         this.previewFile(this.form)
       } else if (type === 'edit') {
-        console.log(this.form)
         if (!Object.hasOwn(this.form, 'fileFolder')) {
           this.$message.error('暂无文件')
           return
@@ -345,8 +346,8 @@ export default {
         })
         window.open(routeData.href, '_blank')
       } else {
-        this.srcList.length = 0
-        this.srcList.push(item.fileFolder.url)
+        this.preList.length = 0
+        this.preList.push(item.fileFolder.url)
         this.showImage = true
       }
     },