| | |
| | | <template> |
| | | <div class="menuSettings_box"> |
| | | <My-bread |
| | | :list="[ |
| | | <My-bread :list="[ |
| | | `${$t('operatManage.operatManage')}`, |
| | | `${$t('operatManage.organizationManage')}`, |
| | | ]" |
| | | ></My-bread> |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="left_Tree"> |
| | | <el-card class="el-card-define"> |
| | | <div class="card_tree"> |
| | | <div class="cataLogContent"> |
| | | <div class="left_Tree subpage_Div"> |
| | | <div style="min-width:200px"> |
| | | <el-tree |
| | | ref="tree" |
| | | :props="defaultProps" |
| | | node-key="id" |
| | | :data="depList" |
| | | :expand-on-click-node="false" |
| | | :default-expand-all="true" |
| | | draggable |
| | | :default-expanded-keys=openKey |
| | | @node-click="handleNodeClick" |
| | | @node-drag-start="handleDragStart" |
| | | @node-drag-end="handleDrop" |
| | | > |
| | | <span class="custom-tree-node" slot-scope="{ node, data }"> |
| | | <span>{{ node.label }}</span> |
| | | <span class="btnBox"> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | type="text" |
| | | size="mini" |
| | | @click="() => append(node, data)" |
| | | > |
| | | <i class="el-icon-circle-plus"></i> |
| | | </el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | type="text" |
| | | size="mini" |
| | | @click="() => remove(node, data)" |
| | | > |
| | | <i class="el-icon-delete-solid"></i> |
| | | </el-button> |
| | | </span> |
| | | </span> |
| | | </el-tree> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | <div class="right_menu"> |
| | | <el-card class="el-card-define"> |
| | | <el-breadcrumb separator="/"> |
| | | <el-breadcrumb-item :to="{ path: '/' }">{{ |
| | | </div> |
| | | <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> |
| | | </el-breadcrumb> |
| | | <el-divider /> |
| | | |
| | | </el-breadcrumb> |
| | | <div> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(1)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | 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="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="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> |
| | | <div class="dividing-line"></div> |
| | | <div class="form_box"> |
| | | <el-form :model="itemdetail" ref="itemdetail" :rules="rules"> |
| | | <!-- <el-divider class="eldivider" />--> |
| | | <el-form label-width="130px" |
| | | :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | > |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.name" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="itemdetail.name" |
| | | autocomplete="off" |
| | | style="max-width: 400px;" |
| | | :placeholder="$t('userManage.orgManageObj.nameHolder')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.abbreviation')" |
| | |
| | | <el-input |
| | | v-model="itemdetail.sname" |
| | | autocomplete="off" |
| | | :placeholder="$t('userManage.orgManageObj.abbreviationHolder')" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.unitCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.code" autocomplete="off"></el-input> |
| | | <el-input |
| | | disabled |
| | | v-model="itemdetail.code" |
| | | autocomplete="off" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.organizationCode')" |
| | |
| | | <el-input |
| | | v-model="itemdetail.uncode" |
| | | autocomplete="off" |
| | | :placeholder="$t('userManage.orgManageObj.organizationCodeHolder')" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.cmpanyAddress')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.addr" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="itemdetail.addr" |
| | | autocomplete="off" |
| | | :placeholder="$t('userManage.orgManageObj.cmpanyAddressHolder')" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.continformation')" |
| | |
| | | <el-input |
| | | v-model="itemdetail.contact" |
| | | autocomplete="off" |
| | | :placeholder="$t('userManage.orgManageObj.continformationHolder')" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.fax')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.fax" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="itemdetail.fax" |
| | | :placeholder="$t('userManage.orgManageObj.faxHolder')" |
| | | autocomplete="off" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.EMail')" |
| | |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.email" |
| | | :placeholder="$t('userManage.orgManageObj.EMailHolder')" |
| | | autocomplete="off" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.postalCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.post" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="itemdetail.post" |
| | | :placeholder="$t('userManage.orgManageObj.postalCodeHolder')" |
| | | autocomplete="off" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.WebsiteAddress')" |
| | |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.website" |
| | | :placeholder="$t('userManage.orgManageObj.WebsiteAddressHolder')" |
| | | autocomplete="off" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.remarks')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="itemdetail.bak" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="itemdetail.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('userManage.orgManageObj.remarksHolder')" |
| | | style="max-width: 400px;" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <div class="btnBox" v-if="menuStatus.update"> |
| | | <el-button |
| | | style=" |
| | | background: #409eff; |
| | | border: 1px solid #409eff; |
| | | color: white; |
| | | " |
| | | @click="updDep('itemdetail')" |
| | | >{{ $t('common.submit') }}</el-button |
| | | > |
| | | <el-button @click="reset('itemdetail')">{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | <div v-if="menuStatus.update"> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | size="small" |
| | | @click="updDep('itemdetail')" |
| | | >{{ $t('common.submit') }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | @click="reset('itemdetail')" |
| | | >{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | </el-form-item> |
| | | </div> |
| | | </el-form> |
| | | </div> |
| | | </el-card> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | <el-dialog |
| | | width="30%" |
| | | top="5vh" |
| | | :title="$t('common.append')" |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form :model="ruleForm" ref="ruleForm" :rules="rules"> |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | label-position="top" |
| | | > |
| | | <el-form-item |
| | | prop="name" |
| | | :label="$t('userManage.orgManageObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.name" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.name')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.abbreviation')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.sname" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.sname" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.abbreviation')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.unitCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.code" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.code" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.unitCode')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.organizationCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.uncode" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.uncode" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.organizationCode')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.cmpanyAddress')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.addr" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.addr" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.cmpanyAddress')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.continformation')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.contact" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.contact" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.continformation')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.fax')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.fax" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.fax" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.fax')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.EMail')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.email" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.email" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.EMail')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.postalCode')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.post" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.post" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.postalCode')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.WebsiteAddress')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.website" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.website" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.WebsiteAddress')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('userManage.orgManageObj.remarks')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input v-model="ruleForm.bak" autocomplete="off"></el-input> |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('userManage.orgManageObj.remarks')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div slot="footer" class="dialog-footer"> |
| | | <el-button @click="resetForm('ruleForm')">{{ |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button |
| | | size="small" |
| | | @click="resetForm('ruleForm')" |
| | | >{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | <el-button |
| | | style="background: #409eff; border: 1px solid #409eff; color: white" |
| | | size="small" |
| | | type="primary" |
| | | @click="submitForm('ruleForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.submit') }}</el-button |
| | | > |
| | | >{{ $t('common.submit') }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | queryMaxId, |
| | | insertDep, |
| | | deleteDep, |
| | | getPerms |
| | | } from '../../api/api'; |
| | | export default { |
| | | //import引入的组件需要注入到对象中才能使用 |
| | |
| | | rules: { |
| | | name: [{ required: true, validator: validName, trigger: 'blur' }], |
| | | }, |
| | | newNode: null, |
| | | openKey: [1], |
| | | }; |
| | | }, |
| | | methods: { |
| | |
| | | this.oriData = res.result; |
| | | this.newData = res.result; |
| | | this.depList = this.treeData(res.result); |
| | | if (this.itemdetail.id != null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.itemdetail.id); |
| | | }); |
| | | } |
| | | |
| | | } else { |
| | | this.$notify.error({ |
| | | title: res.code, |
| | |
| | | return father.pid == 0; // 返回一级菜单 |
| | | }); |
| | | }, |
| | | |
| | | setEditNode(res) { |
| | | let node = this.$refs.tree.getCurrentNode(); |
| | | let pchildNodes = this.$refs.tree.getNode(node.id).parent.childNodes; |
| | | let currentId = {}; |
| | | for (let i = 0; i < pchildNodes.length; i++) { |
| | | if (pchildNodes[i].data.id == node.id) { |
| | | currentId = i; |
| | | } |
| | | } |
| | | switch (res) { |
| | | case 1://向上移动 |
| | | if (currentId != 0) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId - 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = pchildNodes[currentId - 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum |
| | | var arr = []; |
| | | this.oriData.filter(res => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res) |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res) |
| | | } |
| | | |
| | | }) |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | | message: '处于顶端,不能继续上移', |
| | | type: 'warning' |
| | | }); |
| | | } |
| | | break; |
| | | case 2://向下移动 |
| | | if (currentId < (pchildNodes.length - 1)) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId + 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = pchildNodes[currentId + 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | var arr = []; |
| | | this.oriData.filter(res => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res) |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res) |
| | | } |
| | | }) |
| | | this.newData = arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | | message: '处于底端,不能继续下移', |
| | | type: 'warning' |
| | | }); |
| | | |
| | | } |
| | | break; |
| | | |
| | | } |
| | | }, |
| | | setDelNode() { |
| | | this.remove(this.newNode, this.itemdetail) |
| | | }, |
| | | setNewNode(res) { |
| | | var id, lever, orderNum; |
| | | if (res == 1) {//新增同级 |
| | | id = this.itemdetail.pid; |
| | | orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes) |
| | | |
| | | lever = this.itemdetail.level; |
| | | } else if (res == 2) {//新增子级 |
| | | id = this.itemdetail.id; |
| | | orderNum = this.getMaxOrderNum(this.newNode.childNodes) |
| | | |
| | | lever = this.itemdetail.level + 1; |
| | | } |
| | | |
| | | this.ruleForm.pid = id; |
| | | this.ruleForm.level = lever; |
| | | this.ruleForm.orderNum = orderNum |
| | | this.dialogFormVisible = true; |
| | | }, |
| | | getMaxOrderNum(res) { |
| | | var val = -100; |
| | | for (var i in res) { |
| | | if (res[i].data.orderNum > val) { |
| | | val = res[i].data.orderNum |
| | | } |
| | | } |
| | | val = val + 1; |
| | | return val; |
| | | }, |
| | | |
| | | |
| | | append(node, data) { |
| | | this.dialogFormVisible = true; |
| | | this.ruleForm.pid = data.id; |
| | |
| | | // console.log(node); |
| | | }, |
| | | resetForm(formName) { |
| | | this.dialogFormVisible = false; |
| | | this.$nextTick(() => { |
| | | this.ruleForm = {}; |
| | | this.$refs[formName].resetFields(); |
| | | }); |
| | | this.$confirm("关闭后无法保存,是否关闭?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false; |
| | | this.$nextTick(() => { |
| | | this.ruleForm = {}; |
| | | this.$refs[formName].resetFields(); |
| | | }); |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | submitForm(formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | |
| | | .then(() => { |
| | | //兄弟重新排序 |
| | | const parent = node.parent; |
| | | this.openKey.push(parent.id) |
| | | const children = parent.data.children || parent.data; |
| | | children.splice(data.orderNum - 1, 1); |
| | | children.forEach((item, index) => { |
| | |
| | | updateDepTrees(children), |
| | | ]) |
| | | .then((res) => { |
| | | console.log(res); |
| | | if (res[0].code == 200 && res[1].code == 200) { |
| | | this.$message({ |
| | | type: 'success', |
| | |
| | | alert('修改失败,请重试!'); |
| | | }); |
| | | }, |
| | | handleNodeClick(data) { |
| | | // console.log(data); |
| | | handleNodeClick(data, node) { |
| | | this.openKey.push(data.id) |
| | | this.newNode = node |
| | | this.backUpData = JSON.stringify(data); |
| | | this.itemdetail = JSON.parse(JSON.stringify(data)); |
| | | }, |
| | |
| | | break; |
| | | } |
| | | }, |
| | | getPerms() { |
| | | var val = this.$store.state.currentPerms; |
| | | var permsEntity = this.$store.state.permsEntity; |
| | | |
| | | if (permsEntity.length == 0) { |
| | | getPerms().then((res) => { |
| | | if (res.code == 200) { |
| | | permsEntity = res.result; |
| | | } |
| | | }); |
| | | } |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (permsEntity[i].perms == val) { |
| | | console.log(permsEntity[i]) |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | | }, |
| | | handleClose() { |
| | | this.$confirm("关闭后无法保存,是否关闭?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | this.getMenuTree(); |
| | | this.getPerms(); |
| | | }, |
| | | created() { |
| | | var val = this.$store.state.currentPerms; |
| | | var permsEntity = this.$store.state.permsEntity; |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (permsEntity[i].perms == val) { |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | | // var val = this.$store.state.currentPerms; |
| | | // var permsEntity = this.$store.state.permsEntity; |
| | | // for (var i = 0; i < permsEntity.length; i++) { |
| | | // if (permsEntity[i].perms == val) { |
| | | // this.showPermsMenu(permsEntity[i]); |
| | | // } |
| | | // } |
| | | }, |
| | | beforeDestroy() { |
| | | this.openKey = [1] |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | //@import url(); 引入公共css类 |
| | | .menuSettings_box { |
| | | width: 100%; |
| | | height: 100%; |
| | | position: relative; |
| | | height: 98%; |
| | | width: 98%; |
| | | padding:0.5% 1%; |
| | | |
| | | .cataLogContent { |
| | | width: 100%; |
| | | height: 92%; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | .left_Tree { |
| | | width: 15%; |
| | | float: left; |
| | | .el-icon-circle-plus { |
| | | color: gray; |
| | | } |
| | | .el-icon-delete-solid { |
| | | color: gray; |
| | | } |
| | | //height: 94%; |
| | | height: 100%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | border-right: 1px solid #dcdfe6; |
| | | } |
| | | .right_menu { |
| | | width: 84%; |
| | | float: right; |
| | | width: 80%; |
| | | //height: 91%; |
| | | height: 98%; |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow: auto; |
| | | .form_box { |
| | | box-sizing: border-box; |
| | | padding-top: 22px; |
| | | width: 100%; |
| | | height: 580px; |
| | | overflow-y: auto; |
| | | .el-input { |
| | | width: 400px; |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | } |
| | | } |
| | | .el-card-define { |
| | | height: 680px; |
| | | background: #303030; |
| | | border: 1px solid gray; |
| | | padding: 1px; |
| | | } |
| | | .card_tree { |
| | | display: block; |
| | | height: 650px; |
| | | overflow-y: auto; |
| | | // 更改指标树图标颜色 |
| | | /deep/ .el-tree .el-icon-caret-right:before { |
| | | color: white; /** 这里是要修改图标的颜色 **/ |
| | | } |
| | | /deep/ .el-tree { |
| | | color: white; /** 这里是要修改图标的颜色 **/ |
| | | background: transparent; |
| | | } |
| | | /deep/.el-tree-node__content { |
| | | &:hover { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | } |
| | | } |
| | | /deep/.el-tree-node.is-current > .el-tree-node__content { |
| | | background-color: rgba(255, 255, 255, 0.3) !important; |
| | | color: #409eff; |
| | | } |
| | | } |
| | | // .menuSettings_tree { |
| | | // position: relative; |
| | | // width: 344px; |
| | | // height: 100%; |
| | | // background: rgb(240, 242, 245); |
| | | // padding: 20px; |
| | | // border-radius: 10px; |
| | | // box-sizing: border-box; |
| | | // overflow: auto; |
| | | // .saveBtn { |
| | | // position: absolute; |
| | | // left: 250px; |
| | | // top: 23px; |
| | | // } |
| | | // .depTreeBox { |
| | | // height: 88%; |
| | | // width: 100%; |
| | | // overflow: auto; |
| | | // .el-tree { |
| | | // background: transparent; |
| | | // font-size: 15px; |
| | | // font-family: Microsoft YaHei; |
| | | // font-weight: 400; |
| | | // color: #000000; |
| | | // /deep/ .el-tree-node { |
| | | // padding-top: 10px; |
| | | // // padding-bottom: 10px; |
| | | // } |
| | | // /deep/ .el-tree-node:focus > .el-tree-node__content { |
| | | // background-color: #b9b9b9; |
| | | // } |
| | | // /deep/ .el-tree-node__content:hover { |
| | | // background-color: rgb(153, 153, 153); |
| | | // } |
| | | // .btnBox { |
| | | // margin: 0 10px 0 5px; |
| | | // .el-button + .el-button { |
| | | // margin-left: 5px; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | // .itemSettings { |
| | | // width: calc(100% - 344px); |
| | | // border-radius: 10px; |
| | | // background: rgb(240, 242, 245); |
| | | // margin-left: 10px; |
| | | // height: 100%; |
| | | // padding: 10px; |
| | | // box-sizing: border-box; |
| | | // .title_box { |
| | | // background: #fff; |
| | | // padding: 10px; |
| | | // margin-bottom: 24px; |
| | | // display: flex; |
| | | // border-radius: 10px; |
| | | // border: 1px solid rgb(202, 201, 204); |
| | | // box-sizing: border-box; |
| | | // } |
| | | // .form_box { |
| | | // border: 1px solid rgb(202, 201, 204); |
| | | // border-radius: 10px; |
| | | // background: #fff; |
| | | // padding-top: 30px; |
| | | // box-sizing: border-box; |
| | | // width: 100%; |
| | | // .el-input, |
| | | // /deep/ .el-textarea { |
| | | // width: 400px; |
| | | // } |
| | | // .btnBox { |
| | | // margin: 0 270px 20px; |
| | | // width: 200px; |
| | | // display: flex; |
| | | // justify-content: space-between; |
| | | // } |
| | | // } |
| | | // } |
| | | /deep/ .el-dialog__body { |
| | | padding: 0 30px 0 0; |
| | | } |
| | | /*里面的代码可以根据自己需求去进行更改*/ |
| | | /* 设置滚动条的样式 */ |
| | | ::-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; |
| | | } |
| | | /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; |
| | | } |
| | | } |
| | | .btnBox{ |
| | | //position: absolute; |
| | | //bottom: 0; |
| | | //right: 0; |
| | | } |
| | | </style> |