| | |
| | | > |
| | | </el-tree> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="right_menu subpage_Div"> |
| | | |
| | | <div style="display:flex;justify-content:space-between"> |
| | | <el-breadcrumb separator="/"> |
| | | <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> |
| | |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >新增同级</el-button> |
| | | >{{$t('operatManage.menuSetObj.insert')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >新增子级</el-button> |
| | | >{{$t('operatManage.menuSetObj.subInsert')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="setDelNode()" |
| | |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >删除</el-button> |
| | | >{{$t('operatManage.menuSetObj.delete')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small" |
| | | >向上移动</el-button> |
| | | >{{$t('operatManage.menuSetObj.moveUp')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small" |
| | | >向下移动</el-button> |
| | | >{{$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')" |
| | |
| | | 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> |
| | |
| | | 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 |
| | | size="small" |
| | | type="info" |
| | | @click="updMenu('itemdetail')" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @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 |
| | |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:100%" |
| | | 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 |
| | |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:100%" |
| | | 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.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; |
| | |
| | | } |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.$confirm("关闭后无法保存,是否关闭?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getMenuTree(); |
| | |
| | | .menuSettings_box { |
| | | height: 98%; |
| | | width: 98%; |
| | | padding: 1%; |
| | | padding: 0.5% 1%; |
| | | |
| | | .cataLogContent { |
| | | width: 100%; |
| | |
| | | justify-content: space-between; |
| | | .left_Tree { |
| | | width: 15%; |
| | | height: 91%; |
| | | //height: 91%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | border-right: 1px solid #dcdfe6; |
| | | } |
| | | .right_menu { |
| | | width: 80%; |
| | |
| | | overflow: auto; |
| | | .form_box { |
| | | box-sizing: border-box; |
| | | padding-top: 22px; |
| | | width: 100%; |
| | | .el-input { |
| | | width: 400px; |
| | |
| | | } |
| | | } |
| | | } |
| | | .btnBox{ |
| | | |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |
| | | } |
| | | </style> |
| | | |