scorpio преди 2 години
родител
ревизия
95c9d6cb20
променени са 2 файла, в които са добавени 24 реда и са изтрити 3 реда
  1. 1 1
      src/App.vue
  2. 23 2
      src/views/home/component/params/params4.vue

+ 1 - 1
src/App.vue

@@ -12,7 +12,7 @@ export default {
   data() {
     return {
       data: '',
-      type: '3'
+      type: "333"
     }
   },
   created() {

+ 23 - 2
src/views/home/component/params/params4.vue

@@ -204,7 +204,7 @@ export default {
         size: 'mini',
         addBtn: false,
         viewBtn: true,
-        delBtn: false,
+        delBtn: true,
         editBtnText: '上传',
         viewBtnText: '预览',
         refreshBtn: false,
@@ -295,7 +295,7 @@ export default {
       }
     },
     /**
-     * 打开上传文件夹
+     * 打开上传文件夹
      * @param row
      */
     openFile(row) {
@@ -321,7 +321,28 @@ export default {
         return sub
       })
     },
+    rowDel(row, index, done) {
+      console.log(row)
+      if (!Object.hasOwn(row, 'file')) {
+        this.$message.error('暂无文件')
+        return
+      }
 
+      this.$confirm('确定将选择数据删除?', {
+        type: 'warning'
+      }).then(res => {
+        if (res === 'confirm') {
+            this.$api.project.fileRemove({ids: row.pid, type:3}).then(res => {
+              if (res.code === 200){
+                this.$message.success(res.msg)
+                this.proinfo()
+              } else {
+                this.$message.error(res.msg)
+              }
+            })
+        }
+      })
+    },
     clear() {
       this.currentRow = null
     },