From 354cad3d3ab22ba147169beb6a0f6f51b9bab3a8 Mon Sep 17 00:00:00 2001 From: wangting <wangting@vci-tech.com> Date: 星期三, 08 一月 2025 09:07:22 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- Source/plt-web/plt-web-ui/src/views/authority/secure/classification/index.vue | 148 ++++++++++++++++++++++++------------------------- 1 files changed, 72 insertions(+), 76 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 308c333..0e133e6 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,50 +1,81 @@ -<template> + <template> <el-container> - - <el-aside> - <basic-container> - <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> - <div class="headerCon"> - <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">鍒涘缓 - </el-button> - <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">淇敼 - </el-button> - <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">鍒犻櫎 - </el-button> - <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">瀵煎嚭 - </el-button> - <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">瀵煎叆 - </el-button> - <el-button class="smallBtn" plain size="small" type="primary" - @click="checkViewClickHandler">鏌ョ湅浣跨敤鑼冨洿 - </el-button> - </div> - <!-- 宸︿晶鏍� --> - <div style="height: calc(100vh - 280px);"> - <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> - <span slot-scope="{ node, data }" class="el-tree-node__label"> - <span style="font-size: 15px"> - <i class="el-icon-s-promotion"></i> - {{ (node || {}).label }} - </span> - </span> - </avue-tree> - </div> - </div> - </basic-container> - </el-aside> - - <el-main> - <basic-container> - </basic-container> - </el-main> - + <basic-container style="height: calc(100vh - 118px);width: 100%;"> + <avue-form ref="form" v-model="form" :option="formOption" @submit="saveHandler"></avue-form> + </basic-container> </el-container> </template> <script> +import {getSecretGradeConfig, saveSecretGrade} from "@/api/authority/secure/classification"; +import {mapGetters} from "vuex"; + export default { - name: "index" + name: "index", + data: function () { + return { + form:{ + type:[], + }, + } + }, + computed: { + ...mapGetters(["permission"]), + permissionList() { + return { + saveBtn: this.vaildData(this.permission[this.$route.query.id].SAVE, false), + }; + }, + formOption() { + return { + submitBtn: this.permissionList.saveBtn, + submitText:"淇濆瓨", + emptyBtn: false, + menuPosition:'left', + column: [{ + label: '鐢ㄦ埛\\鏈哄櫒瀵嗙骇鍋滃惎鐢ㄩ厤缃�', + labelWidth:185, + prop: 'type', + span: 24, + type: 'checkbox', + dicData: [ + { label: '鐢ㄦ埛瀵嗙骇', value: 0 }, + { label: '鏈哄櫒瀵嗙骇', value: 1 }, + ] + }] + } + } + }, + created() { + this.getSecretGradeConfig() + }, + methods:{ + 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){ + 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('淇濆瓨鎴愬姛') + } + done() + }).catch(error=>{ + done() + }); + }, + } } </script> @@ -53,40 +84,5 @@ .el-scrollbar__wrap { overflow: auto !important; } - .headerCon{ - .el-button{ - width: 82px; - } - } } - -.headerCon { - display: flex; - flex-wrap: wrap; - margin-bottom: 5px; - - .el-button + .el-button { - margin-left: 5px; - } - - .el-button { - margin-top: 5px; - } -} - -.headerCon > .el-button:nth-child(4) { - margin-left: 0; -} - -.headerCon > .el-button:nth-child(7) { - margin-left: 0; -} - - -.smallBtn { - width: 82px; - text-align: center; - padding-left: 4.5px; -} - </style> -- Gitblit v1.9.3