From a5a27e231cb2aa2c2a045df11ad90e5eda547ae9 Mon Sep 17 00:00:00 2001
From: 田源 <lastanimals@163.com>
Date: 星期二, 05 十一月 2024 18:11:59 +0800
Subject: [PATCH] 密级传参问题,以及同步整合代码

---
 Source/plt-web/plt-web-ui/src/views/authority/secure/classification/index.vue |   24 ++++++++++++++++--------
 1 files changed, 16 insertions(+), 8 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/src/views/authority/secure/classification/index.vue b/Source/plt-web/plt-web-ui/src/views/authority/secure/classification/index.vue
index d87b584..86fe00f 100644
--- a/Source/plt-web/plt-web-ui/src/views/authority/secure/classification/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/authority/secure/classification/index.vue
@@ -1,4 +1,4 @@
-<template>
+ <template>
   <el-container>
     <basic-container style="height: calc(100vh - 118px);width: 100%;">
       <avue-form ref="form" v-model="form" :option="formOption" @submit="saveHandler"></avue-form>
@@ -7,7 +7,7 @@
 </template>
 
 <script>
-import {deleteLog, getPeroid, savePeriod} from "@/api/system/log/logBasic";
+import {getSecretGradeConfig, saveSecretGrade} from "@/api/authority/secure/classification";
 
 export default {
   name: "index",
@@ -36,18 +36,26 @@
     }
   },
   created() {
-    this.getPeroid()
+    this.getSecretGradeConfig()
   },
   methods:{
-    getPeroid:function (){
-      getPeroid().then(res => {
-        //this.form=res.data.data;
+    getSecretGradeConfig:function (){
+      getSecretGradeConfig().then(res => {
+        if(res.data.obj.userSecuritySwith){
+          this.form.type=[0]
+        }
+        if(res.data.obj.ipSecuritySwith){
+          this.form.type.push(1)
+        }
       }).catch(error => {
       })
     },
     saveHandler:function (form,done){
-      debugger;
-      savePeriod({'type':this.form.type}).then(res => {
+      const params={
+        userSecuritySwith:this.form.type.includes(0),
+        ipSecuritySwith:this.form.type.includes(1)
+      }
+      saveSecretGrade(params).then(res => {
         if (res.data.success) {
           this.$message.success('淇濆瓨鎴愬姛')
         }

--
Gitblit v1.9.3