scorpio %!s(int64=2) %!d(string=hai) anos
pai
achega
e5d6195f26
Modificáronse 2 ficheiros con 35 adicións e 74 borrados
  1. 3 0
      src/api/common.js
  2. 32 74
      src/views/home/component/params/params4.vue

+ 3 - 0
src/api/common.js

@@ -23,5 +23,8 @@ export default {
   },
   getButtons() {
     return fetch('/blade-system/menu/buttons', { clientId: website.clientId })
+  },
+  fileUpdate(params) {
+    return fetch('/wutong-file/file/submit', params, 'post', 'json')
   }
 }

+ 32 - 74
src/views/home/component/params/params4.vue

@@ -47,9 +47,20 @@
         </template>
       </avue-crud>
     </div>
-    <el-dialog v-model="show">
+    <el-dialog v-model="show" width="500px" title="文号提取" @close="clear">
       <div>
-        <uploads max="1" :auto="true" :data="{ type: 1, toStutus: 2 }" />
+        <div class="bold font-16">{{ currentRow.file.originalFileName }}</div>
+        <el-input
+          class="mt-20"
+          v-model="currentRow.file.copyNumber"
+          placeholder="附件清晰度或手写原因导致文号提取失败,请进行手动填写"
+        ></el-input>
+        <div class="mt-20 full-width flex flex-justify-end">
+          <el-button plain type="primary" @click="show = false"
+            >取 消</el-button
+          >
+          <el-button type="primary" @click="updateCopyNumber">确定</el-button>
+        </div>
       </div>
     </el-dialog>
     <el-image-viewer
@@ -61,14 +72,10 @@
 </template>
 
 <script>
-import uploads from '@/components/uploads.vue'
 import api from '@/api/index.js'
 
 export default {
   name: 'params4',
-  components: {
-    uploads
-  },
   props: {
     info: {
       type: Object,
@@ -230,6 +237,10 @@ export default {
       })
     },
     edit(row) {
+      if (!Object.hasOwn(row, 'file')) {
+        this.$message.error('暂无文件')
+        return
+      }
       this.show = true
       this.currentRow = row
     },
@@ -251,8 +262,8 @@ export default {
       this.$router.push({
         path: '/home/files',
         query: {
-          id: item,
-          projectId: this.newDetail.projectId
+          id: item.folderId,
+          projectId: item.projectId
         }
       })
     },
@@ -305,80 +316,27 @@ export default {
         return sub
       })
     },
-    refreshChange() {
-      this.onLoad()
-    },
-    rowSave(row, done, loading) {
-      const data = {
-        projectInfoId: this.info.id
-      }
-      this.$api.projects.meeting.save(Object.assign(row, data)).then(
-        res => {
-          if (res.code === 200) {
-            this.$message.success(res.msg)
-          } else {
-            this.$message.error(res.msg)
-          }
-          done(row)
-          this.onLoad()
-        },
-        error => {
-          window.console.log(error)
-          loading()
-        }
-      )
-    },
-    rowUpdate(row, index, done, loading) {
-      const data = {
-        projectInfoId: this.info.id
-      }
-      this.$api.projects.meeting.update(Object.assign(row, data)).then(
-        res => {
-          if (res.code === 200) {
-            this.$message.success(res.msg)
-          } else {
-            this.$message.error(res.msg)
-          }
-          done(row)
-          this.onLoad()
-        },
-        error => {
-          window.console.log(error)
-          loading()
-        }
-      )
+
+    clear() {
+      this.currentRow = null
     },
-    rowDel(row, index, done) {
-      this.$confirm('确定将选择数据删除?', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning'
-      })
-        .then(() => {
-          return this.$api.projects.meeting.removeList({ ids: row.id })
-        })
-        .then(() => {
-          this.$message({
-            type: 'success',
-            message: '操作成功!'
-          })
-          // 数据回调进行刷新
-          done(row)
-          this.onLoad()
+    /**
+     * 更新文号
+     */
+    updateCopyNumber() {
+      this.$api.common
+        .fileUpdate({
+          id: this.currentRow.fileId,
+          copyNumber: this.currentRow.file.copyNumber
         })
-        .catch(() => {})
-    },
-    changeEdit(res) {
-      res.edit = !res.edit
-      if (res.edit === false) {
-        this.$api.project.proUpdate(this.newDetail).then(res => {
+        .then(res => {
           if (res.code === 200) {
+            this.show = false
             this.$message.success(res.msg)
           } else {
             this.$message.error(res.msg)
           }
         })
-      }
     }
   }
 }