Przeglądaj źródła

装置审计信息 - “新增”操作默认带出本装置

wangggziwen 8 miesięcy temu
rodzic
commit
4642fe2227
1 zmienionych plików z 7 dodań i 3 usunięć
  1. 7 3
      ruoyi-ui/src/views/rc/audit/index.vue

+ 7 - 3
ruoyi-ui/src/views/rc/audit/index.vue

@@ -280,6 +280,7 @@ import { listAudit, getAudit, delAudit, addAudit, updateAudit } from "@/api/rc/a
 import { listDept } from "@/api/system/dept";
 import { getToken } from "@/utils/auth";
 import { addCommonfile, allFileList, delCommonfile, updateCommonfile } from "@/api/rc/commonfile";
+import { getUserDeptId } from "@/api/system/user";
 
 export default {
   name: "Audit",
@@ -497,9 +498,12 @@ export default {
     },
     /** 新增按钮操作 */
     handleAdd() {
-      this.reset();
-      this.open = true;
-      this.title = "添加审计记录";
+      getUserDeptId().then(response => {
+        this.reset();
+        this.form.deptId = [response.data];
+        this.open = true;
+        this.title = "添加审计记录";
+      });
     },
     /** 修改按钮操作 */
     handleUpdate(row) {