| | |
| | | <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> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import {deleteLog, getPeroid, savePeriod} from "@/api/system/log/logBasic"; |
| | | import {getSecretGradeConfig, saveSecretGrade} from "@/api/authority/secure/classification"; |
| | | import {mapGetters} from "vuex"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | form:{ |
| | | type:[], |
| | | }, |
| | | formOption:{ |
| | | submitBtn: true, |
| | | } |
| | | }, |
| | | 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', |
| | |
| | | { label: '机器密级', value: 1 }, |
| | | ] |
| | | }] |
| | | }, |
| | | } |
| | | } |
| | | }, |
| | | 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('保存成功') |
| | | } |