| | |
| | | <el-divider /> |
| | | </div> |
| | | <div class="cataLogContent"> |
| | | <div class="left_Tree"> |
| | | <div class="left_Tree subpage_Div"> |
| | | <div style="width:auto"> |
| | | <el-tree |
| | | ref="tree" |
| | |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="right_menu"> |
| | | |
| | | <div style="display:flex;justify-content:space-between"> |
| | | <el-breadcrumb separator="/"> |
| | | <div class="right_menu subpage_Div"> |
| | | <div style="display:flex;justify-content:right;align-items: center;padding-bottom: 14px"> |
| | | <el-breadcrumb separator="/" style="display: none"> |
| | | <el-breadcrumb-item :to="{ path: '/' }">{{ |
| | | $t('dataManage.dictionaryManageObj.particulars') |
| | | }}</el-breadcrumb-item> |
| | |
| | | |
| | | <div> |
| | | <el-button |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="mini" |
| | | >向上移动</el-button> |
| | | <el-button |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="mini" |
| | | >向下移动</el-button> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(1)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | >新增同级</el-button> |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.insert')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(2)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="mini" |
| | | >新增子级</el-button> |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.subInsert')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="setDelNode()" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | >删除</el-button> |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.delete')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.moveUp')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.moveDown')}}</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | <el-divider /> |
| | | <div class="dividing-line"></div> |
| | | <!-- <el-divider />--> |
| | | <div class="form_box"> |
| | | <el-form |
| | | :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | label-width="130px" |
| | | > |
| | | <el-form-item |
| | | prop="enName" |
| | |
| | | <el-input |
| | | clear="el_input" |
| | | v-model="itemdetail.enName" |
| | | :placeholder="$t('operatManage.menuSetObj.enNameHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.cnName" |
| | | :placeholder="$t('operatManage.menuSetObj.cnNameHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.icon')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.icon" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item--> |
| | | <!-- :label="$t('operatManage.menuSetObj.icon')"--> |
| | | <!-- :label-width="formLabelWidth"--> |
| | | <!-- >--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="itemdetail.icon"--> |
| | | <!-- :placeholder="$t('operatManage.menuSetObj.iconHolder')"--> |
| | | <!-- autocomplete="off"--> |
| | | <!-- ></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item |
| | | prop="isShow" |
| | | :label="$t('operatManage.menuSetObj.isShow')" |
| | |
| | | > |
| | | <el-select |
| | | style="width: 400px" |
| | | :popper-append-to-body="false" |
| | | v-model="itemdetail.isShow" |
| | | placeholder="" |
| | | :placeholder="$t('operatManage.menuSetObj.show')" |
| | | > |
| | | <el-option |
| | | v-for="item in options1" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('operatManage.menuSetObj.hiddeen')" value="0" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.isshow')" value="1" /> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options1"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.url" |
| | | :placeholder="$t('operatManage.menuSetObj.menuUrlHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.perms" |
| | | :placeholder="$t('operatManage.menuSetObj.permsHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | </el-form-item> |
| | |
| | | > |
| | | <el-select |
| | | style="width: 400px" |
| | | :popper-append-to-body="false" |
| | | v-model="itemdetail.type" |
| | | :placeholder="$t('common.choose')" |
| | | :placeholder="$t('operatManage.menuSetObj.typeHolder')" |
| | | > |
| | | <el-option |
| | | v-for="item in options2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | <el-option :label="$t('operatManage.menuSetObj.rootpath')" value="0" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.menu')" value="1" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.button')" value="2" /> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options2"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="itemdetail.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('operatManage.menuSetObj.bakHolder')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <div |
| | | class="btnBox" |
| | | v-if="menuStatus.update" |
| | | > |
| | | <el-button |
| | | style=" |
| | | background: #409eff; |
| | | color: white; |
| | | border: 1px solid #409eff; |
| | | " |
| | | @click="updMenu('itemdetail')" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | <el-button @click="reset('itemdetail')">{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | <div v-if="menuStatus.update"> |
| | | <el-form-item> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="updMenu('itemdetail')" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="reset('itemdetail')" |
| | | >{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | |
| | | <el-dialog |
| | | :title="$t('common.append')" |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | label-position="top" |
| | | > |
| | | <el-form-item |
| | | prop="enName" |
| | |
| | | <el-input |
| | | v-model="ruleForm.enName" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.enName')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.cnName" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.cnName')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.icon" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.icon')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="ruleForm.isShow" |
| | | placeholder="" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('operatManage.menuSetObj.isShow')" |
| | | > |
| | | <el-option |
| | | v-for="item in options1" |
| | |
| | | <el-input |
| | | v-model="ruleForm.url" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.menuUrl')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | <el-input |
| | | v-model="ruleForm.perms" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.authorize')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="ruleForm.type" |
| | | :placeholder="$t('common.choose')" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('operatManage.menuSetObj.type')" |
| | | > |
| | | <el-option |
| | | v-for="item in options2" |
| | |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.bak')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | |
| | | type: null, |
| | | bak: '', |
| | | }, |
| | | rules: { |
| | | rules : { |
| | | enName: [ |
| | | { required: true, message: '请输入英文名称', trigger: 'blur' }, |
| | | { required: true, message: this.$t('operatManage.menuSetObj.enNameHolder'), trigger: 'blur' }, |
| | | ], |
| | | cnName: [ |
| | | { required: true, message: '请输入中文名称', trigger: 'blur' }, |
| | | { required: true, message: this.$t('operatManage.menuSetObj.cnNameHolder'), trigger: 'blur' }, |
| | | ], |
| | | |
| | | isShow: [ |
| | | { |
| | | required: true, |
| | | message: '请选择是否显示', |
| | | message: this.$t('operatManage.menuSetObj.show'), |
| | | trigger: 'change', |
| | | }, |
| | | ], |
| | | type: [ |
| | | { |
| | | required: true, |
| | | message: '请选择节点类型', |
| | | message: this.$t('operatManage.menuSetObj.typeHolder'), |
| | | trigger: 'change', |
| | | }, |
| | | ], |
| | | }, |
| | | // 下拉的option里面的value定义成0,1,不能定义成’0’,'1’字符串, |
| | | // 如果要定义成字符串,后台需要返回的也是字符串 |
| | | options1: [ |
| | | { |
| | | value: 0, |
| | | label: '隐藏', |
| | | label:this.$t('operatManage.menuSetObj.hiddeen') |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: '显示', |
| | | label:this.$t('operatManage.menuSetObj.isshow') |
| | | }, |
| | | ], |
| | | options2: [ |
| | | { |
| | | value: 0, |
| | | label: '根目录', |
| | | label:this.$t('operatManage.menuSetObj.rootpath') |
| | | // label: '根目录', |
| | | }, |
| | | { |
| | | value: 1, |
| | | label: '菜单', |
| | | label:this.$t('operatManage.menuSetObj.menu') |
| | | // label: '菜单', |
| | | }, |
| | | { |
| | | value: 2, |
| | | label: '按钮', |
| | | label:this.$t('operatManage.menuSetObj.button') |
| | | // label: '按钮', |
| | | }, |
| | | ], |
| | | newNode: null, |
| | |
| | | this.ruleForm.level = data.level + 1; |
| | | }, |
| | | resetForm(formName) { |
| | | this.dialogFormVisible = false; |
| | | this.$nextTick(() => { |
| | | this.$refs[formName].resetFields(); |
| | | this.ruleForm = {}; |
| | | }); |
| | | this.$confirm("关闭后无法保存,是否关闭?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false; |
| | | this.$nextTick(() => { |
| | | this.$refs[formName].resetFields(); |
| | | this.ruleForm = {}; |
| | | }); |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | submitForm(formName) { |
| | | this.$nextTick(() => { |
| | |
| | | this.getMenuTree(); |
| | | return; |
| | | } else { |
| | | alert('调整失败,请重试!'); |
| | | this.$message.error('调整失败,请重试!'); |
| | | } |
| | | }) |
| | | .catch(() => { |
| | | alert('修改失败,请重试!'); |
| | | this.$message.error('调整失败,请重试!'); |
| | | }); |
| | | }, |
| | | handleNodeClick(data, node) { |
| | | this.newNode = node; |
| | | this.backUpData = JSON.stringify(data); |
| | | this.itemdetail = JSON.parse(JSON.stringify(data)); |
| | | this.itemdetail.isShow = this.itemdetail.isShow.toString(); |
| | | this.itemdetail.type = this.itemdetail.type.toString(); |
| | | }, |
| | | updMenu(formName) { |
| | | this.$nextTick(() => { |
| | |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.$router.go(0); |
| | | this.getMenuTree(); |
| | | this.itemdetail = {}; |
| | | this.dialogFormVisible = false; |
| | |
| | | }, 500); |
| | | }) |
| | | .catch((res) => { |
| | | alert('修改失败,请重试!'); |
| | | this.$message.error('调整失败,请重试!'); |
| | | this.fullscreenLoading = false; |
| | | }); |
| | | } else { |
| | |
| | | } |
| | | }, |
| | | showPermsMenu(res) { |
| | | |
| | | switch (res.tag) { |
| | | case '/delete': |
| | | this.menuStatus.delete = true; |
| | |
| | | getPerms() { |
| | | var val = this.$store.state.currentPerms; |
| | | var permsEntity = this.$store.state.permsEntity; |
| | | |
| | | if (permsEntity.length == 0) { |
| | | getPerms().then((res) => { |
| | | if (res.code == 200) { |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.$confirm("关闭后无法保存,是否关闭?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getMenuTree(); |
| | |
| | | .menuSettings_box { |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | position: absolute; |
| | | padding: 0.5% 1%; |
| | | |
| | | .cataLogContent { |
| | | width: 100%; |
| | | height: 92%; |
| | |
| | | justify-content: space-between; |
| | | .left_Tree { |
| | | width: 15%; |
| | | height: 91%; |
| | | border: 1px solid white; |
| | | //height: 91%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | .el-icon-circle-plus { |
| | | color: gray; |
| | | } |
| | | .el-icon-delete-solid { |
| | | color: gray; |
| | | } |
| | | border-right: 1px solid #dcdfe6; |
| | | } |
| | | .right_menu { |
| | | width: 80%; |
| | | height: 91%; |
| | | border: 1px solid white; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow: auto; |
| | | .form_box { |
| | | box-sizing: border-box; |
| | | padding-top: 22px; |
| | | width: 100%; |
| | | .el-input { |
| | | width: 400px; |
| | | } |
| | | |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | .btnBox{ |
| | | |
| | | .el-card-define { |
| | | height: 100%; |
| | | background: #303030; |
| | | border: 1px solid gray; |
| | | padding: 1px; |
| | | } |
| | | /deep/ .el-input__inner { |
| | | background-color: transparent !important; |
| | | border: 1px solid; |
| | | color: white; |
| | | } |
| | | /deep/ .el-dialog { |
| | | background: #303030; |
| | | } |
| | | /deep/.el-range-editor.is-active, |
| | | .el-range-editor.is-active:hover, |
| | | .el-select .el-input.is-focus .el-input__inner { |
| | | border: 1px solid; |
| | | } |
| | | /deep/.el-dialog__title { |
| | | color: white; |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | |
| | | /*里面的代码可以根据自己需求去进行更改*/ |
| | | /* 设置滚动条的样式 */ |
| | | ::-webkit-scrollbar { |
| | | width: 4px; |
| | | } |
| | | /* 滚动槽 */ |
| | | ::-webkit-scrollbar-track { |
| | | -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.3); |
| | | border-radius: 10px; |
| | | } |
| | | /* 滚动条滑块 */ |
| | | ::-webkit-scrollbar-thumb { |
| | | border-radius: 10px; |
| | | background: #8b8b8b; |
| | | -webkit-box-shadow: inset006pxrgba(0, 0, 0, 0.5); |
| | | } |
| | | ::-webkit-scrollbar-thumb:window-inactive { |
| | | background: #8b8b8b; |
| | | height: 289px; |
| | | } |
| | | } |
| | | </style> |
| | | <style lang="less"> |
| | | .el-select-dropdown { |
| | | background: #303030; |
| | | border-color: white; |
| | | } |
| | | //右侧和下方的白边 |
| | | .el-scrollbar__wrap { |
| | | margin-bottom: -20px !important; |
| | | margin-right: -20px !important; |
| | | } |
| | | .el-select-dropdown__item.hover, |
| | | .el-select-dropdown__item:hover { |
| | | background: rgba(255, 255, 255, 0.3); |
| | | } |
| | | .el-select-dropdown__item { |
| | | color: white; |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |
| | | } |
| | | </style> |