Procházet zdrojové kódy

归档文件时间设置

duy před 2 roky
rodič
revize
5b3f436342

+ 22 - 0
src/api/manager/wbsprivate.js

@@ -200,4 +200,26 @@ export const delAprojectTab = (primaryKeyIds,projectId) => {
       projectId
     }
   })
+}
+//新增元素业务时间表
+export const saveTabusstime = (colId,colKey,tableId) => {
+  return request({
+    url: '/api/blade-manager/tabbusstimeinfo/save-tabusstime-info',
+    method: 'post',
+    data: {
+      colId,
+      colKey,
+      tableId
+    }
+  })
+}
+//删除元素业务时间表
+export const removeTabusstime = (ids) => {
+  return request({
+    url: '/api/blade-manager/tabbusstimeinfo/remove',
+    method: 'post',
+    params: {
+      ids
+    }
+  })
 }

+ 22 - 9
src/views/manager/projectinfo/archiveTime.vue

@@ -61,7 +61,7 @@
                                 <el-table-column align="center" label="操作" width="200">
                                 <template slot-scope="scope">
                                     <el-button
-                                    v-if="!scope.row.isFile"
+                                    v-if="scope.row.isBussTime!==2"
                                     type="primary"
                                     size="small"
                                     plain
@@ -91,7 +91,7 @@
 <script>
 
 import { dictionary } from "@/api/manager/archivetree";
-import {tabTypeLazyTree} from "@/api/manager/wbsprivate";
+import {tabTypeLazyTree,saveTabusstime,removeTabusstime} from "@/api/manager/wbsprivate";
 import {getTableElments} from "@/api/manager/wbstree";
 
 
@@ -240,17 +240,30 @@ export default {
            
         },
         //设置为文件日期
-        setFiledate(row){
-            if(!row.isFile){
-                this.$set(row, "isFile", true);
+        async setFiledate(row){
+            if(row.isBussTime!==2){
+                this.$set(row, "isBussTime", 2);
+            }
+            let colId=row.id
+            let colKey=row.tableElementKey
+            let tableId=this.curData.initTableId
+            const { data: res } = await saveTabusstime(colId,colKey,tableId)
+            console.log(res);
+            if (res.code == 200) {
+              this.$message.success(res.msg)
             }
             
         },
         //取消设置
-        quitFiledate(row){
-      
-            if(row.isFile){
-                this.$set(row, "isFile", false);
+        async quitFiledate(row){
+            let ids=row.tableElementKey
+            const { data: res } = await removeTabusstime(ids)
+            console.log(res);
+            if (res.code == 200) {
+              this.$message.success(res.msg)
+            }
+            if(row.isBussTime==2){
+                this.$set(row, "isBussTime", 1);
             }
            
         }