| | |
| | | </el-breadcrumb> |
| | | |
| | | <div> |
| | | <el-button |
| | | <el-button v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="mini" |
| | | size="small" |
| | | >向上移动</el-button> |
| | | <el-button |
| | | <el-button v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="mini" |
| | | size="small" |
| | | >向下移动</el-button> |
| | | <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" |
| | | size="small" |
| | | >新增同级</el-button> |
| | | <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" |
| | | size="small" |
| | | >新增子级</el-button> |
| | | <el-button |
| | | <el-button v-if="menuStatus.delete" |
| | | @click="setDelNode()" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="mini" |
| | | size="small" |
| | | >删除</el-button> |
| | | </div> |
| | | </div> |
| | |
| | | v-if="menuStatus.update" |
| | | > |
| | | <el-button |
| | | style=" |
| | | background: #409eff; |
| | | border: 1px solid #409eff; |
| | | color: white; |
| | | " |
| | | type="primary" |
| | | size="small" |
| | | @click="updDep('itemdetail')" |
| | | >{{ $t('common.submit') }}</el-button> |
| | | <el-button @click="reset('itemdetail')">{{ |
| | | <el-button |
| | | size="small" |
| | | @click="reset('itemdetail')" |
| | | >{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | </div> |
| | |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-button @click="resetForm('ruleForm')">{{ |
| | | <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> |
| | |
| | | queryMaxId, |
| | | insertDep, |
| | | deleteDep, |
| | | getPerms |
| | | } from '../../api/api'; |
| | | export default { |
| | | //import引入的组件需要注入到对象中才能使用 |
| | |
| | | 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]); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | 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]); |
| | | // } |
| | | // } |
| | | }, |
| | | }; |
| | | </script> |
| | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow: auto; |
| | | |
| | | |
| | | .el-input { |
| | | width: 400px; |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | |
| | | |
| | | .el-input { |
| | | width: 400px; |
| | | } |
| | | /deep/.el-form-item__label { |
| | | color: white; |
| | | } |
| | | } |
| | | .el-card-define { |
| | | height: 680px; |