| | |
| | | <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"; |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data: function () { |
| | | return { |
| | | form:{ |
| | | type:[], |
| | | }, |
| | | formOption:{ |
| | | submitBtn: true, |
| | | 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> |
| | | |
| | |
| | | .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> |