1 line
58 KiB
Plaintext
1 line
58 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/api/department.js","webpack:///./src/components/Pagination/index.vue?31f0","webpack:///./src/components/Pagination/index.vue?8e6f","webpack:///src/components/Pagination/index.vue","webpack:///./src/components/Pagination/index.vue?6c75","webpack:///./src/components/Pagination/index.vue?0d87","webpack:///./src/views/manager/role.vue?15e8","webpack:///./src/directive/permission/permission.js","webpack:///./src/directive/permission/index.js","webpack:///./src/api/roleManage.js","webpack:///./src/views/manager/role.vue?035c","webpack:///src/views/manager/role.vue","webpack:///./src/views/manager/role.vue?550c","webpack:///./src/views/manager/role.vue?0327"],"names":["getDepartmentList","data","request","url","method","params","getDeptSubByDeptId","editSubmitApi","formData","qs","stringify","addSubmitApi","delSubmitApi","headers","render","_vm","this","_h","$createElement","_c","_self","staticClass","_b","attrs","background","currentPage","pageSize","layout","pageSizes","total","on","$event","handleSizeChange","handleCurrentChange","$attrs","staticRenderFns","name","props","required","type","page","default","limit","hidden","computed","get","set","val","$emit","methods","component","inserted","el","binding","value","roles","store","getters","butPermission","console","log","Array","length","Error","permissionRoles","hasPermission","some","role","includes","state","user","permissionFlag","newnode","document","createElement","style","cursor","display","pointerEvents","parentNode","insertBefore","removeChild","appendChild","install","Vue","directive","permission","window","use","getRoleList","delSubmitRoleApi","dataForm","delData","Roleids","getRolePermissionTree","resource","roleId","setResourceSubmitApi","getAppRolePermissionTree","setAppResourceSubmitApi","deptIdList","$t","checkStrictly","emitPath","handleFilter","model","listQuery","callback","$$v","$set","expression","nativeOn","indexOf","_k","keyCode","key","apply","arguments","_v","_s","clearListQuery","handleCreate","directives","rawName","list","scopedSlots","_u","fn","scope","handleUpdate","handleDelete","setResource2Role","setResource1Role","curPage","getList","textMap","dialogStatus","addDialog","ref","staticStyle","rules","form","slot","createData","updateData","setResourceDialog","multiProps","resourceList","resourceChecked","clickDeal","resourceStatus","setResourceSubmit","setAppResourceSubmit","inject","components","Pagination","createStatus","children","roleName","message","trigger","roleCode","deptId","update","create","deptList","deptName","roleDescript","currentRoleId","listLoading","downloadLoading","mapGetters","created","$store","validatenull","getdeptIdList","res","subBeanList","obj","filterDeptList","label","editDeptList","filterRole","roleData","e","userType","roleList","$refs","validate","valid","then","title","duration","catch","current","status","resetForm","$nextTick","$confirm","confirmButtonText","cancelButtonText","row","checkedKeys","permissionIds","handleDownload","_this","excel","header","filename","formatJson","filterVal","jsonData","map","v","j","currentObj","treeStatus","clickCheck","tree","selected","selectedParent","uniteChildSame","permissionPid","removeParent","treeList","isSelected","treeListData","i","undefined","currentNode","parent","childNodes","checked","a","b"],"mappings":"kHAAA,+MAiBO,SAASA,EAAkBC,GAChC,OAAOC,eAAQ,CACbC,IAAK,oCACLC,OAAQ,MACRC,OAAQJ,IAKL,SAASK,EAAmBL,GACjC,OAAOC,eAAQ,CACbC,IAAK,uCACLC,OAAQ,MACRC,OAAQJ,IAaL,SAASM,EAAcC,GAC5B,IAAMP,EAAOQ,IAAGC,UAAUF,GAC1B,OAAON,eAAQ,CACbC,IAAK,+BACLC,OAAQ,OACRH,SAKG,SAASU,EAAaH,GAC3B,IAAMP,EAAOQ,IAAGC,UAAUF,GAC1B,OAAON,eAAQ,CACbC,IAAK,6BACLC,OAAQ,OACRH,SAKG,SAASW,EAAaJ,GAC3B,OAAON,eAAQ,CACbW,QAAS,CACP,eAAgB,oBAElBV,IAAK,+BACLC,OAAQ,MAERC,OAAQG,M,oCCvEZ,W,6DCAA,IAAIM,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,wBAAwB,CAACF,EAAG,gBAAgBJ,EAAIO,GAAG,CAACC,MAAM,CAAC,WAAaR,EAAIS,WAAW,eAAeT,EAAIU,YAAY,YAAYV,EAAIW,SAAS,OAASX,EAAIY,OAAO,aAAaZ,EAAIa,UAAU,MAAQb,EAAIc,OAAOC,GAAG,CAAC,qBAA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C,EAAAvF,GACM,IAAN,aACA,WAEMA,EAAIA,WAAWA,EAASA,aAAcA,GAEtC,IAAK,IAAX,YACQ1H,KAAK6M,eAAeK,EAAaC,GAAIF,EAAYvF,IAKrDkF,eArVJ,SAqVAL,EAAA7E,GACM,IAAN,eACM,QAA+B0F,IAA3BC,EAAYC,OAAOnH,IAErB,OADAuB,EAAIA,WAAWA,EAAYA,QAAQA,GAC5B1H,KAAK4M,eAAeS,EAAYC,OAAQ5F,IAKnDqF,aA9VJ,SA8VAR,EAAA7E,GACM,IAAN,IACA,IACA,eASM,GAR2B,OAAvB2F,EAAYC,aACiBF,IAA3BC,EAAYC,OAAOnH,MACrBuB,EAAIA,WAAWA,EAAYA,QAAQA,GACnC1H,KAAK+M,aAAaM,EAAYC,OAAQ5F,IAKJ,IAAlC2F,EAAYE,WAAWzK,OAEzB,IAAK,IAAb,8BAEU,IAA0C,IAAtCuK,EAAYE,WAAWJ,GAAGK,YAC1BC,EAGEA,IAAMJ,EAAYE,WAAWzK,aAEcsK,IAAzCC,EAAYE,WAAWJ,GAAGG,OAAOnH,KAAmB,CACtDuB,EAAIA,WAAWA,EAAYA,WAAWA,GAAGA,QAAQA,GAEjD,IAAK,IAArB,qCAEkB,IAAlB,IAAsB2F,EAAYC,OAAOC,WAAW,GAApD,YACsBG,EAGEA,IAAML,EAAYC,OAAOC,WAAWzK,QAEtC,OADA4E,EAAIA,WAAWA,EAAYA,OAAOA,KAAKA,GAChC1H,KAAK+M,aAAaM,EAAYC,OAAQ5F,OC3qB0R,I,wBCQzVxF,EAAY,eACd,EACApC,EACAqB,GACA,EACA,KACA,WACA,MAIa,aAAAe,E","file":"js/chunk-2f8a36d9.03ee4edd.js","sourcesContent":["import request from '@/utils/request'\r\nimport qs from 'qs'\r\n/*\r\n 系统管理-区域管理 权限操作api\r\n*/\r\n\r\n// 查询区域列表树\r\nexport function getAreaTreeList(data) {\r\n return request({\r\n url: 'user-service/area/getAreaTreeList',\r\n method: 'get',\r\n params: data\r\n })\r\n}\r\n\r\n\r\n// 查询所有区域树\r\nexport function getDepartmentList(data) {\r\n return request({\r\n url: 'user-service/dept/getDeptTreeList',\r\n method: 'get',\r\n params: data\r\n })\r\n}\r\n\r\n// 查询本级节点ID-直系子级节点\r\nexport function getDeptSubByDeptId(data) {\r\n return request({\r\n url: 'user-service/dept/getDeptSubByDeptId',\r\n method: 'get',\r\n params: data\r\n })\r\n}\r\n\r\n// 查询区域列表\r\nexport function getDeptTreeByDeptId(data) {\r\n return request({\r\n url: 'user-service/dept/getDeptTreeByDeptId',\r\n method: 'get',\r\n params: data\r\n })\r\n}\r\n// 修改\r\nexport function editSubmitApi(formData) {\r\n const data = qs.stringify(formData)\r\n return request({\r\n url: 'user-service/dept/updateDept',\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 新增\r\nexport function addSubmitApi(formData) {\r\n const data = qs.stringify(formData)\r\n return request({\r\n url: 'user-service/dept/saveDept',\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 删除\r\nexport function delSubmitApi(formData) {\r\n return request({\r\n headers: {\r\n 'Content-Type': 'application/json'\r\n },\r\n url: 'user-service/dept/removeDept',\r\n method: 'get',\r\n\r\n params: formData\r\n })\r\n}\r\n","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=style&index=0&id=4dfad654&scoped=true&lang=css&\"","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"pagination-container\"},[_c('el-pagination',_vm._b({attrs:{\"background\":_vm.background,\"current-page\":_vm.currentPage,\"page-size\":_vm.pageSize,\"layout\":_vm.layout,\"page-sizes\":_vm.pageSizes,\"total\":_vm.total},on:{\"update:currentPage\":function($event){_vm.currentPage=$event},\"update:current-page\":function($event){_vm.currentPage=$event},\"update:pageSize\":function($event){_vm.pageSize=$event},\"update:page-size\":function($event){_vm.pageSize=$event},\"size-change\":_vm.handleSizeChange,\"current-change\":_vm.handleCurrentChange}},'el-pagination',_vm.$attrs,false))],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div class=\"pagination-container\">\r\n <el-pagination\r\n :background=\"background\"\r\n :current-page.sync=\"currentPage\"\r\n :page-size.sync=\"pageSize\"\r\n :layout=\"layout\"\r\n :page-sizes=\"pageSizes\"\r\n :total=\"total\"\r\n v-bind=\"$attrs\"\r\n @size-change=\"handleSizeChange\"\r\n @current-change=\"handleCurrentChange\"\r\n />\r\n </div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: 'Pagination',\r\n props: {\r\n total: {\r\n required: true,\r\n type: Number\r\n },\r\n page: {\r\n type: Number,\r\n default: 0\r\n },\r\n limit: {\r\n type: Number,\r\n default: 20\r\n },\r\n pageSizes: {\r\n type: Array,\r\n default() {\r\n return [5, 10, 20, 30, 70]\r\n }\r\n },\r\n layout: {\r\n type: String,\r\n default: 'total, sizes, prev, pager, next, jumper'\r\n },\r\n background: {\r\n type: Boolean,\r\n default: true\r\n },\r\n hidden: {\r\n type: Boolean,\r\n default: false\r\n }\r\n },\r\n computed: {\r\n currentPage: {\r\n get() {\r\n return this.page\r\n },\r\n set(val) {\r\n this.$emit('update:page', val)\r\n }\r\n },\r\n pageSize: {\r\n get() {\r\n return this.limit\r\n },\r\n set(val) {\r\n this.$emit('update:limit', val)\r\n }\r\n }\r\n },\r\n methods: {\r\n handleSizeChange(val) {\r\n this.$emit('pagination', { page: this.currentPage, limit: val })\r\n },\r\n handleCurrentChange(val) {\r\n this.$emit('pagination', { page: val, limit: this.pageSize })\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.pagination-container {\r\n background: none;\r\n position: relative;\r\n margin-top: 30px;\r\n}\r\n.el-pagination {\r\n text-align: center;\r\n}\r\n.pagination-container.hidden {\r\n display: none;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./index.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./index.vue?vue&type=template&id=4dfad654&scoped=true&\"\nimport script from \"./index.vue?vue&type=script&lang=js&\"\nexport * from \"./index.vue?vue&type=script&lang=js&\"\nimport style0 from \"./index.vue?vue&type=style&index=0&id=4dfad654&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"4dfad654\",\n null\n \n)\n\nexport default component.exports","export * from \"-!../../../node_modules/mini-css-extract-plugin/dist/loader.js??ref--7-oneOf-1-0!../../../node_modules/css-loader/dist/cjs.js??ref--7-oneOf-1-1!../../../node_modules/vue-loader/lib/loaders/stylePostLoader.js!../../../node_modules/postcss-loader/src/index.js??ref--7-oneOf-1-2!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./role.vue?vue&type=style&index=0&id=f3877ed4&scoped=true&lang=css&\"","import store from \"@/store\";\r\n\r\nexport default {\r\n inserted(el, binding) {\r\n const { value } = binding;\r\n // const roles = store.getters && store.getters.roles\r\n const roles = store.getters && store.getters.butPermission;\r\n console.log(roles, 'roles');\r\n if (value && value instanceof Array && value.length > 0) {\r\n const permissionRoles = value;\r\n const hasPermission = roles.some(role => {\r\n return permissionRoles.includes(role);\r\n });\r\n console.log(hasPermission, 'hasPermission');\r\n if (!hasPermission) {\r\n // el.parentNode && el.parentNode.removeChild(el) \r\n\r\n store.state.user.permissionFlag[permissionRoles] = true;\r\n\r\n\r\n console.log(store.state.user.permissionFlag[permissionRoles], 'permissionRoles');\r\n const newnode = document.createElement(\"div\");\r\n newnode.style.cursor = 'not-allowed'\r\n newnode.style.display = 'inline-block'\r\n el.style.pointerEvents = \"none\"\r\n el.parentNode.insertBefore(newnode, el)\r\n el.parentNode && el.parentNode.removeChild(el)\r\n newnode.appendChild(el);\r\n console.log(el, 'permissionRoles');\r\n } else {\r\n store.state.user.permissionFlag[permissionRoles] = false;\r\n }\r\n } else {\r\n throw new Error(`need roles! Like v-permission=\"['admin','editor']\"`);\r\n }\r\n }\r\n};","import permission from \"./permission\";\n\nconst install = function(Vue) {\n Vue.directive(\"permission\", permission);\n};\n\nif (window.Vue) {\n window[\"permission\"] = permission;\n Vue.use(install); // eslint-disable-line\n}\n\npermission.install = install;\nexport default permission;\n","import request from '@/utils/request'\nimport qs from 'qs'\n\n/*\n 系统管理-角色管理 权限操作api\n*/\n\n\n// 查询所有角色列表\nexport function getRoleList(data) {\n return request({\n url: 'user-service/role/getRoleList',\n method: 'get',\n params: data\n })\n}\n\n// 新增角色\nexport function addSubmitApi(data) {\n return request({\n headers: {\n 'Content-Type': 'application/json'\n },\n url: 'user-service/role/saveRole',\n method: 'post',\n data\n })\n}\n\n// 修改角色\nexport function editSubmitApi(data) {\n return request({\n headers: {\n 'Content-Type': 'application/json'\n },\n url: 'user-service/role/updateRole',\n method: 'post',\n data\n })\n}\n\n// 删除角色\nexport function delSubmitRoleApi(dataForm) {\n const delData = {\n Roleids: dataForm\n }\n return request({\n headers: {\n 'Content-Type': 'application/json'\n },\n url: 'user-service/role/removeRole',\n method: 'get',\n params: delData\n })\n}\n\n// 获取设置web角色权限的菜单信息和权限信息\nexport function getRolePermissionTree(data) {\n const resource = {\n roleId: data\n }\n return request({\n headers: {\n 'Content-Type': 'application/json'\n },\n url: 'user-service/permission/getWebRolePermissionInfoByRoleId',\n method: 'get',\n params: resource\n })\n}\n\n// 设置web角色权限\nexport function setResourceSubmitApi(dataForm) {\n const data = qs.stringify(dataForm)\n return request({\n url: 'user-service/permission/saveWebRolePermission',\n method: 'post',\n data\n })\n}\n\n// 获取设置app角色权限的菜单信息和权限信息\nexport function getAppRolePermissionTree(data) {\n const resource = {\n roleId: data\n }\n return request({\n headers: {\n 'Content-Type': 'application/json'\n },\n url: 'user-service/appPermission/getAppRolePermissionInfoByRoleId',\n method: 'get',\n params: resource\n })\n}\n\n// 设置app角色权限\nexport function setAppResourceSubmitApi(dataForm) {\n const data = qs.stringify(dataForm)\n return request({\n url: 'user-service/appPermission/saveAppRolePermission',\n method: 'post',\n data\n })\n}\n","var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"app-container\"},[_c('div',{staticClass:\"decorate\"}),_c('div',{staticClass:\"filter-container\"},[_c('el-cascader',{staticClass:\"filter-item\",attrs:{\"show-all-levels\":false,\"options\":_vm.deptIdList,\"placeholder\":_vm.$t('listQuery.deptId'),\"props\":{ checkStrictly: true, emitPath: false, props: {} },\"clearable\":\"\"},on:{\"change\":_vm.handleFilter},model:{value:(_vm.listQuery.deptId),callback:function ($$v) {_vm.$set(_vm.listQuery, \"deptId\", $$v)},expression:\"listQuery.deptId\"}}),_c('el-input',{staticClass:\"filter-item\",attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('role.roleName')},nativeOn:{\"keyup\":function($event){if(!$event.type.indexOf('key')&&_vm._k($event.keyCode,\"enter\",13,$event.key,\"Enter\")){ return null; }return _vm.handleFilter.apply(null, arguments)}},model:{value:(_vm.listQuery.roleName),callback:function ($$v) {_vm.$set(_vm.listQuery, \"roleName\", $$v)},expression:\"listQuery.roleName\"}}),_c('span',{staticClass:\"btn-item\",on:{\"click\":_vm.handleFilter}},[_c('i',{staticClass:\"iconfont icon-sousuo\"}),_vm._v(\" \"+_vm._s(_vm.$t(\"btn.search\")))]),_c('span',{staticClass:\"btn-item\",on:{\"click\":_vm.clearListQuery}},[_c('i',{staticClass:\"el-icon-refresh-left\"}),_vm._v(\" \"+_vm._s(_vm.$t(\"btn.resetting\")))]),_c('div',{staticClass:\"control-container\"},[_c('span',{staticClass:\"btn-item\",on:{\"click\":function($event){return _vm.handleCreate()}}},[_c('i',{staticClass:\"iconfont icon-a-\"}),_vm._v(_vm._s(_vm.$t(\"btn.add\")))])])],1),_c('div',{staticClass:\"table-container\"},[_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.listLoading),expression:\"listLoading\"}],attrs:{\"data\":_vm.list,\"fit\":\"\",\"max-height\":\"580\",\"highlight-current-row\":\"\",\"header-row-class-name\":\"table-header\",\"row-class-name\":\"table-row\"}},[_c('el-table-column',{attrs:{\"property\":\"roleName\",\"align\":\"left\",\"label\":_vm.$t('role.roleName')}}),_c('el-table-column',{attrs:{\"property\":\"roleDescript\",\"align\":\"left\",\"label\":_vm.$t('role.roleDescript')}}),_c('el-table-column',{attrs:{\"property\":\"roleCode\",\"align\":\"left\",\"label\":_vm.$t('role.roleCode')}}),_c('el-table-column',{attrs:{\"property\":\"deptName\",\"align\":\"left\",\"label\":_vm.$t('listQuery.deptId')}}),_c('el-table-column',{attrs:{\"label\":_vm.$t('table.operate'),\"width\":\"450\",\"align\":\"left\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [_c('span',{staticClass:\"btnCancel\",attrs:{\"title\":_vm.$t('table.update')},on:{\"click\":function($event){return _vm.handleUpdate(scope)}}},[_c('i',{staticClass:\"iconfont icon-bianji\"}),_vm._v(_vm._s(_vm.$t(\"table.update\")))]),_c('span',{staticClass:\"btnCancel delete\",attrs:{\"title\":_vm.$t('table.delete')},on:{\"click\":function($event){return _vm.handleDelete(scope)}}},[_c('i',{staticClass:\"iconfont icon-a--\"}),_vm._v(_vm._s(_vm.$t(\"table.delete\")))]),_c('span',{staticClass:\"btnCancel\",attrs:{\"title\":_vm.$t('role.setWeb')},on:{\"click\":function($event){return _vm.setResource2Role(scope)}}},[_c('i',{staticClass:\"iconfont icon-a-\"}),_vm._v(_vm._s(_vm.$t(\"role.setWeb\")))]),_c('span',{staticClass:\"btnCancel\",attrs:{\"title\":_vm.$t('role.setApp')},on:{\"click\":function($event){return _vm.setResource1Role(scope)}}},[_c('i',{staticClass:\"iconfont icon-a-\"}),_vm._v(_vm._s(_vm.$t(\"role.setApp\")))])]}}])})],1),_c('pagination',{directives:[{name:\"show\",rawName:\"v-show\",value:(_vm.total > 0),expression:\"total > 0\"}],attrs:{\"total\":_vm.total,\"page\":_vm.listQuery.curPage,\"limit\":_vm.listQuery.pageSize},on:{\"update:page\":function($event){return _vm.$set(_vm.listQuery, \"curPage\", $event)},\"update:limit\":function($event){return _vm.$set(_vm.listQuery, \"pageSize\", $event)},\"pagination\":_vm.getList}})],1),_c('el-dialog',{attrs:{\"close-on-click-modal\":false,\"title\":_vm.textMap[_vm.dialogStatus],\"visible\":_vm.addDialog},on:{\"update:visible\":function($event){_vm.addDialog=$event}}},[_c('el-form',{ref:\"form\",staticStyle:{\"width\":\"400px\"},attrs:{\"rules\":_vm.rules,\"status-icon\":\"\",\"model\":_vm.form,\"label-width\":\"130px\"}},[_c('el-form-item',{attrs:{\"label\":_vm.$t('role.roleName'),\"prop\":\"roleName\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('role.roleName'),\"maxlength\":\"20\"},model:{value:(_vm.form.roleName),callback:function ($$v) {_vm.$set(_vm.form, \"roleName\", $$v)},expression:\"form.roleName\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('role.roleDescript')}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('role.roleDescript'),\"maxlength\":\"50\"},model:{value:(_vm.form.roleDescript),callback:function ($$v) {_vm.$set(_vm.form, \"roleDescript\", $$v)},expression:\"form.roleDescript\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('role.roleCode'),\"prop\":\"roleCode\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('role.roleCode'),\"maxlength\":\"20\"},model:{value:(_vm.form.roleCode),callback:function ($$v) {_vm.$set(_vm.form, \"roleCode\", $$v)},expression:\"form.roleCode\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('listQuery.deptId'),\"prop\":\"deptId\"}},[_c('el-cascader',{attrs:{\"show-all-levels\":false,\"options\":_vm.deptIdList,\"props\":{ checkStrictly: true, emitPath: false, props: {} },\"clearable\":\"\"},model:{value:(_vm.form.deptId),callback:function ($$v) {_vm.$set(_vm.form, \"deptId\", $$v)},expression:\"form.deptId\"}})],1)],1),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('span',{staticClass:\"btn-item long\",on:{\"click\":function($event){_vm.addDialog = false}}},[_vm._v(_vm._s(_vm.$t(\"btn.cancel\")))]),_c('span',{staticClass:\"btn-item long\",on:{\"click\":function($event){_vm.dialogStatus === 'create' ? _vm.createData() : _vm.updateData()}}},[_vm._v(_vm._s(_vm.$t(\"btn.save\")))])])],1),_c('el-dialog',{attrs:{\"close-on-click-modal\":false,\"title\":_vm.$t('role.setResources'),\"visible\":_vm.setResourceDialog},on:{\"update:visible\":function($event){_vm.setResourceDialog=$event}}},[_c('el-tree',{ref:\"tree\",staticStyle:{\"max-height\":\"400px\",\"overflow\":\"auto\"},attrs:{\"indent\":20,\"props\":_vm.multiProps,\"data\":_vm.resourceList,\"show-checkbox\":true,\"highlight-current\":\"\",\"default-expand-all\":\"\",\"expand-on-click-node\":true,\"check-strictly\":true,\"node-key\":\"permissionId\",\"default-checked-keys\":_vm.resourceChecked},on:{\"check\":_vm.clickDeal}}),_c('span',{staticClass:\"dialog-footer\",attrs:{\"slot\":\"footer\"},slot:\"footer\"},[_c('el-button',{on:{\"click\":function($event){_vm.setResourceDialog = false}}},[_vm._v(_vm._s(_vm.$t(\"btn.cancel\")))]),_c('el-button',{attrs:{\"type\":\"primary\"},on:{\"click\":function($event){_vm.resourceStatus === 'web'\n ? _vm.setResourceSubmit()\n : _vm.setAppResourceSubmit()}}},[_vm._v(_vm._s(_vm.$t(\"btn.define\")))])],1)],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!-- 角色管理页 -->\r\n<template>\r\n <div class=\"app-container\">\r\n <div class=\"decorate\"></div>\r\n <div class=\"filter-container\">\r\n <el-cascader\r\n :show-all-levels=\"false\"\r\n v-model=\"listQuery.deptId\"\r\n class=\"filter-item\"\r\n :options=\"deptIdList\"\r\n :placeholder=\"$t('listQuery.deptId')\"\r\n :props=\"{ checkStrictly: true, emitPath: false, props: {} }\"\r\n @change=\"handleFilter\"\r\n clearable\r\n />\r\n <el-input\r\n v-model=\"listQuery.roleName\"\r\n :placeholder=\"$t('pEnter') + $t('role.roleName')\"\r\n class=\"filter-item\"\r\n @keyup.enter.native=\"handleFilter\"\r\n />\r\n <span class=\"btn-item\" @click=\"handleFilter\">\r\n <i class=\"iconfont icon-sousuo\" />\r\n {{ $t(\"btn.search\") }}</span\r\n >\r\n <span class=\"btn-item\" @click=\"clearListQuery\">\r\n <i class=\"el-icon-refresh-left\"></i>\r\n {{ $t(\"btn.resetting\") }}</span\r\n >\r\n <div class=\"control-container\">\r\n <span class=\"btn-item\" @click=\"handleCreate()\"\r\n ><i class=\"iconfont icon-a-\" />{{ $t(\"btn.add\") }}</span\r\n >\r\n <!-- <span\r\n class=\"btn-item\"\r\n :loading=\"downloadLoading\"\r\n @click=\"handleDownload\"\r\n >{{ $t('btn.leadingOut') }}</span\r\n > -->\r\n </div>\r\n </div>\r\n <div class=\"table-container\">\r\n <el-table\r\n v-loading=\"listLoading\"\r\n :data=\"list\"\r\n fit\r\n max-height=\"580\"\r\n highlight-current-row\r\n header-row-class-name=\"table-header\"\r\n row-class-name=\"table-row\"\r\n >\r\n <el-table-column\r\n property=\"roleName\"\r\n align=\"left\"\r\n :label=\"$t('role.roleName')\"\r\n />\r\n <el-table-column\r\n property=\"roleDescript\"\r\n align=\"left\"\r\n :label=\"$t('role.roleDescript')\"\r\n />\r\n <el-table-column\r\n property=\"roleCode\"\r\n align=\"left\"\r\n :label=\"$t('role.roleCode')\"\r\n />\r\n <el-table-column\r\n property=\"deptName\"\r\n align=\"left\"\r\n :label=\"$t('listQuery.deptId')\"\r\n />\r\n <el-table-column :label=\"$t('table.operate')\" width=\"450\" align=\"left\">\r\n <template slot-scope=\"scope\">\r\n <span\r\n class=\"btnCancel\"\r\n @click=\"handleUpdate(scope)\"\r\n :title=\"$t('table.update')\"\r\n ><i class=\"iconfont icon-bianji\" />{{ $t(\"table.update\") }}</span\r\n >\r\n <span\r\n class=\"btnCancel delete\"\r\n @click=\"handleDelete(scope)\"\r\n :title=\"$t('table.delete')\"\r\n ><i class=\"iconfont icon-a--\" />{{ $t(\"table.delete\") }}</span\r\n >\r\n\r\n <span\r\n class=\"btnCancel\"\r\n @click=\"setResource2Role(scope)\"\r\n :title=\"$t('role.setWeb')\"\r\n ><i class=\"iconfont icon-a-\" />{{ $t(\"role.setWeb\") }}</span\r\n >\r\n <span\r\n class=\"btnCancel\"\r\n @click=\"setResource1Role(scope)\"\r\n :title=\"$t('role.setApp')\"\r\n ><i class=\"iconfont icon-a-\" />{{ $t(\"role.setApp\") }}</span\r\n >\r\n </template>\r\n </el-table-column>\r\n </el-table>\r\n <pagination\r\n v-show=\"total > 0\"\r\n :total=\"total\"\r\n :page.sync=\"listQuery.curPage\"\r\n :limit.sync=\"listQuery.pageSize\"\r\n @pagination=\"getList\"\r\n />\r\n </div>\r\n\r\n <el-dialog\r\n :close-on-click-modal=\"false\"\r\n :title=\"textMap[dialogStatus]\"\r\n :visible.sync=\"addDialog\"\r\n >\r\n <el-form\r\n ref=\"form\"\r\n :rules=\"rules\"\r\n status-icon\r\n :model=\"form\"\r\n label-width=\"130px\"\r\n style=\"width: 400px\"\r\n >\r\n <el-form-item :label=\"$t('role.roleName')\" prop=\"roleName\">\r\n <el-input\r\n v-model=\"form.roleName\"\r\n :placeholder=\"$t('pEnter') + $t('role.roleName')\"\r\n maxlength=\"20\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('role.roleDescript')\">\r\n <el-input\r\n v-model=\"form.roleDescript\"\r\n :placeholder=\"$t('pEnter') + $t('role.roleDescript')\"\r\n maxlength=\"50\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('role.roleCode')\" prop=\"roleCode\">\r\n <el-input\r\n v-model=\"form.roleCode\"\r\n :placeholder=\"$t('pEnter') + $t('role.roleCode')\"\r\n maxlength=\"20\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('listQuery.deptId')\" prop=\"deptId\">\r\n <el-cascader\r\n :show-all-levels=\"false\"\r\n v-model=\"form.deptId\"\r\n :options=\"deptIdList\"\r\n :props=\"{ checkStrictly: true, emitPath: false, props: {} }\"\r\n clearable\r\n />\r\n </el-form-item>\r\n </el-form>\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n <span class=\"btn-item long\" @click=\"addDialog = false\">{{\r\n $t(\"btn.cancel\")\r\n }}</span>\r\n <span\r\n class=\"btn-item long\"\r\n @click=\"dialogStatus === 'create' ? createData() : updateData()\"\r\n >{{ $t(\"btn.save\") }}</span\r\n >\r\n </span>\r\n </el-dialog>\r\n\r\n <el-dialog\r\n :close-on-click-modal=\"false\"\r\n :title=\"$t('role.setResources')\"\r\n :visible.sync=\"setResourceDialog\"\r\n >\r\n <el-tree\r\n ref=\"tree\"\r\n style=\"max-height: 400px; overflow: auto\"\r\n :indent=\"20\"\r\n :props=\"multiProps\"\r\n :data=\"resourceList\"\r\n :show-checkbox=\"true\"\r\n highlight-current\r\n default-expand-all\r\n :expand-on-click-node=\"true\"\r\n :check-strictly=\"true\"\r\n node-key=\"permissionId\"\r\n :default-checked-keys=\"resourceChecked\"\r\n @check=\"clickDeal\"\r\n />\r\n <span slot=\"footer\" class=\"dialog-footer\">\r\n <el-button @click=\"setResourceDialog = false\">{{\r\n $t(\"btn.cancel\")\r\n }}</el-button>\r\n <el-button\r\n type=\"primary\"\r\n @click=\"\r\n resourceStatus === 'web'\r\n ? setResourceSubmit()\r\n : setAppResourceSubmit()\r\n \"\r\n >{{ $t(\"btn.define\") }}</el-button\r\n >\r\n </span>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport { mapGetters } from \"vuex\"\r\nimport {\r\n getRoleList,\r\n addSubmitApi,\r\n editSubmitApi,\r\n delSubmitRoleApi,\r\n getRolePermissionTree,\r\n setResourceSubmitApi,\r\n setAppResourceSubmitApi,\r\n getAppRolePermissionTree\r\n} from \"@/api/roleManage\"\r\nimport { getDeptSubByDeptId } from \"@/api/department\"\r\nimport Pagination from \"@/components/Pagination\"\r\nimport permission from \"@/directive/permission/index.js\" // 权限判断指令\r\n\r\nexport default {\r\n inject: [\"reload\"],\r\n components: { Pagination },\r\n directives: { permission },\r\n data() {\r\n return {\r\n createStatus: false,\r\n multiProps: {\r\n //树形结构的配置表\r\n children: \"children\"\r\n },\r\n rules: {\r\n roleName: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"role.roleName\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n roleCode: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"role.roleCode\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n deptId: [\r\n {\r\n required: true,\r\n message: this.$t(\"pSelect\") + this.$t(\"listQuery.deptId\"),\r\n trigger: \"blur\"\r\n }\r\n ]\r\n },\r\n textMap: {\r\n update: this.$t(\"table.update\"),\r\n create: this.$t(\"table.create\")\r\n },\r\n deptId: null,\r\n resourceStatus: \"\",\r\n deptList: [],\r\n resourceChecked: [],\r\n setResourceDialog: false,\r\n addDialog: false,\r\n dialogStatus: \"\",\r\n form: {\r\n deptId: null,\r\n deptName: null,\r\n roleCode: null,\r\n roleId: null,\r\n roleDescript: null,\r\n roleName: null\r\n },\r\n\r\n total: 0,\r\n listQuery: {\r\n deptId: null,\r\n roleName: null,\r\n curPage: 1,\r\n pageSize: 10\r\n },\r\n\r\n currentRoleId: \"\",\r\n resourceList: null,\r\n deptIdList: [],\r\n list: null,\r\n listLoading: true,\r\n downloadLoading: false\r\n }\r\n },\r\n computed: {\r\n ...mapGetters([\"userName\"])\r\n },\r\n created() {\r\n this.getList()\r\n getDeptSubByDeptId().then((res) => {\r\n this.deptIdList = res.data && this.getdeptIdList(res.data)\r\n })\r\n this.deptId = this.$store.getters.deptId\r\n },\r\n methods: {\r\n validatenull(children) {\r\n if (children && children.length > 0) {\r\n return false\r\n } else {\r\n return true\r\n }\r\n },\r\n // 数组遍历\r\n getdeptIdList(data) {\r\n if (!data.length) {\r\n data = [data]\r\n }\r\n const list = data.map((res) => {\r\n const obj = {}\r\n if (res.subBeanList) {\r\n obj.children = this.getdeptIdList(res.subBeanList)\r\n obj.label = res.nodeBean.deptName\r\n obj.value = res.nodeBean.deptId\r\n return obj\r\n } else {\r\n obj.label = res.nodeBean.deptName\r\n obj.value = res.nodeBean.deptId\r\n return obj\r\n }\r\n })\r\n return list\r\n },\r\n // 清空搜索选项,重置表格\r\n clearListQuery() {\r\n this.listQuery = {\r\n deptId: null,\r\n roleName: null,\r\n curPage: 1,\r\n pageSize: 10\r\n }\r\n this.getList()\r\n },\r\n filterDeptList(data) {\r\n // 过滤区域列表\r\n const editDeptList = []\r\n data.forEach((e) => {\r\n const route = {\r\n value: e.deptId,\r\n label: e.deptName,\r\n children: this.validatenull(e.children)\r\n ? null\r\n : this.filterDeptList(e.children, true)\r\n }\r\n editDeptList.push(route)\r\n })\r\n return editDeptList\r\n },\r\n\r\n getList() {\r\n this.listLoading = true\r\n getRoleList(this.listQuery).then((res) => {\r\n this.listLoading = false\r\n // if (this.userName !== 'super') { // 非超级用户过滤角色列表\r\n // this.list = this.filterRole(res.data.list)\r\n // } else {\r\n this.list = res.data.list\r\n // }\r\n this.total = res.data.totalRow\r\n })\r\n },\r\n filterRole(roleData) {\r\n // 过滤角色列表\r\n const roleList = []\r\n roleData.forEach((e) => {\r\n if (e.userType !== 1) {\r\n roleList.push(e)\r\n }\r\n })\r\n return roleList\r\n },\r\n createData() {\r\n if (this.createStatus) {\r\n return\r\n }\r\n // 新增\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n this.createStatus = true\r\n addSubmitApi(this.form)\r\n .then((res) => {\r\n if (res.status == 200) {\r\n this.createStatus = false\r\n this.addDialog = false\r\n this.$notify({\r\n title: this.$t(\"title.success\"),\r\n message: this.$t(\"title.addSuccess\"),\r\n type: \"success\",\r\n duration: 3000\r\n })\r\n this.getList()\r\n }\r\n })\r\n .catch(() => {\r\n this.createStatus = false\r\n })\r\n }\r\n })\r\n },\r\n // 搜索\r\n handleFilter() {\r\n this.listQuery.current = 1\r\n this.getList()\r\n },\r\n updateData() {\r\n // 编辑\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n editSubmitApi(this.form).then((res) => {\r\n if (res.status == 200) {\r\n this.addDialog = false\r\n this.$notify({\r\n title: this.$t(\"title.success\"),\r\n message: this.$t(\"title.updateSuccess\"),\r\n type: \"success\",\r\n duration: 3000\r\n })\r\n this.getList()\r\n }\r\n })\r\n }\r\n })\r\n },\r\n resetForm() {\r\n // 重置\r\n for (var key in this.form) {\r\n this.form[key] = null\r\n }\r\n },\r\n handleCreate() {\r\n this.resetForm()\r\n this.addDialog = true\r\n this.dialogStatus = \"create\"\r\n this.$nextTick(() => {\r\n this.$refs[\"form\"].clearValidate()\r\n })\r\n },\r\n handleUpdate(scope) {\r\n // this.form = Object.assign({}, scope.row); // 复制对象\r\n this.form = {\r\n deptId: scope.row.deptId,\r\n deptName: scope.row.deptName,\r\n roleCode: scope.row.roleCode,\r\n roleId: scope.row.roleId,\r\n roleDescript: scope.row.roleDescript,\r\n roleName: scope.row.roleName\r\n }\r\n console.log(this.form)\r\n this.dialogStatus = \"update\"\r\n this.addDialog = true\r\n this.$nextTick(() => {\r\n this.$refs[\"form\"].clearValidate()\r\n })\r\n },\r\n // 删除\r\n handleDelete(scope) {\r\n this.$confirm(\r\n this.$t(\"title.delPointOutRole\"),\r\n this.$t(\"title.pointOut\"),\r\n {\r\n confirmButtonText: this.$t(\"title.delete\"),\r\n cancelButtonText: this.$t(\"title.cancel\"),\r\n type: \"warning\"\r\n }\r\n ).then(() => {\r\n delSubmitRoleApi(scope.row.roleId).then((res) => {\r\n if (res.status == 200) {\r\n this.getList()\r\n this.$notify({\r\n title: this.$t(\"title.success\"),\r\n message: this.$t(\"title.deleteSuccess\"),\r\n type: \"success\",\r\n duration: 3000\r\n })\r\n }\r\n })\r\n })\r\n },\r\n // 设置web资源\r\n setResource2Role(scope) {\r\n this.currentRoleId = scope.row.roleId\r\n this.resourceList = []\r\n this.resourceChecked = []\r\n this.resourceStatus = \"web\"\r\n getRolePermissionTree(scope.row.roleId).then((res) => {\r\n this.resourceList = res.data.permissionList\r\n this.resourceChecked = res.data.selectList\r\n })\r\n this.setResourceDialog = true\r\n },\r\n //设置app资源\r\n setResource1Role(scope) {\r\n this.currentRoleId = scope.row.roleId\r\n this.resourceList = []\r\n this.resourceChecked = []\r\n this.resourceStatus = \"app\"\r\n getAppRolePermissionTree(scope.row.roleId).then((res) => {\r\n this.resourceList = res.data.permissionList\r\n this.resourceChecked = res.data.selectList\r\n })\r\n this.setResourceDialog = true\r\n },\r\n //保存web资源\r\n setResourceSubmit() {\r\n const halfCheck = this.$refs.tree.getHalfCheckedKeys()\r\n const checkedKeys = this.$refs.tree.getCheckedKeys()\r\n checkedKeys.push(...halfCheck)\r\n const submitData = {\r\n permissionIds: checkedKeys.join(\",\"),\r\n roleId: this.currentRoleId\r\n }\r\n setResourceSubmitApi(submitData).then((res) => {\r\n if (res.status == 200) {\r\n this.setResourceDialog = false\r\n this.reload()\r\n this.getList()\r\n this.$notify({\r\n title: this.$t(\"title.success\"),\r\n message: this.$t(\"title.setUpSuccess\"),\r\n type: \"success\",\r\n duration: 3000\r\n })\r\n }\r\n })\r\n },\r\n //保存app资源\r\n setAppResourceSubmit() {\r\n const halfCheck = this.$refs.tree.getHalfCheckedKeys()\r\n const checkedKeys = this.$refs.tree.getCheckedKeys()\r\n checkedKeys.push(...halfCheck)\r\n const submitData = {\r\n permissionIds: checkedKeys.join(\",\"),\r\n roleId: this.currentRoleId\r\n }\r\n setAppResourceSubmitApi(submitData).then((res) => {\r\n if (res.status == 200) {\r\n this.setResourceDialog = false\r\n this.getList()\r\n this.$notify({\r\n title: this.$t(\"title.success\"),\r\n message: this.$t(\"title.setUpSuccess\"),\r\n type: \"success\",\r\n duration: 3000\r\n })\r\n }\r\n })\r\n },\r\n\r\n handleDownload() {\r\n // 导出excel\r\n this.downloadLoading = true\r\n const _this = this\r\n getRoleList().then((res) => {\r\n import(\"@/vendor/Export2Excel\").then((excel) => {\r\n const tHeader = [\r\n _this.$t(\"roleId\"),\r\n _this.$t(\"roleName\"),\r\n _this.$t(\"roleDescript\"),\r\n _this.$t(\"roleCode\"),\r\n _this.$t(\"deptName\")\r\n ]\r\n const filterVal = [\r\n \"roleId\",\r\n \"roleName\",\r\n \"roleDescript\",\r\n \"roleCode\",\r\n \"deptName\"\r\n ]\r\n const data = this.formatJson(filterVal, res.data.list)\r\n excel.export_json_to_excel({\r\n header: tHeader,\r\n data,\r\n filename: \"智汇管家角色信息\"\r\n })\r\n this.downloadLoading = false\r\n })\r\n })\r\n },\r\n formatJson(filterVal, jsonData) {\r\n return jsonData.map((v) =>\r\n filterVal.map((j) => {\r\n return v[j]\r\n })\r\n )\r\n },\r\n clickDeal(currentObj, treeStatus) {\r\n this.clickCheck(currentObj, treeStatus, this.$refs.tree)\r\n },\r\n\r\n /**\r\n * 树形菜单复选框父子节点不关联实现父子节点联动回显\r\n *\r\n * @see selectedParent - 处理父节点为选中\r\n * @see uniteChildSame - 处理子节点为相同的勾选状态\r\n * @see removeParent - 子节点全没选中取消父级的选中状态\r\n *\r\n * @param {Object} currentObj - 当前勾选节点的对象\r\n * @param {Object} treeStatus - 树目前的选中状态对象\r\n * @param {Object} ref - this.$refs.xxx\r\n **/\r\n clickCheck(currentObj, treeStatus, ref) {\r\n // 用于:父子节点严格互不关联时,父节点勾选变化时通知子节点同步变化,实现单向关联。\r\n let selected = treeStatus.checkedKeys.indexOf(currentObj.permissionId) // -1未选中\r\n\r\n // 选中\r\n if (selected !== -1) {\r\n // 子节点只要被选中父节点就被选中\r\n this.selectedParent(currentObj, ref)\r\n // 统一处理子节点为相同的勾选状态\r\n this.uniteChildSame(currentObj, true, ref)\r\n } else {\r\n // 取消子节点的选中状态触发\r\n if (currentObj.permissionPid !== 0) {\r\n this.removeParent(currentObj, ref)\r\n }\r\n\r\n // 未选中 处理子节点全部未选中\r\n if (currentObj.children.length !== 0) {\r\n this.uniteChildSame(currentObj, false, ref)\r\n }\r\n }\r\n },\r\n\r\n /** 统一处理子节点为相同的勾选状态 **/\r\n uniteChildSame(treeList, isSelected, ref) {\r\n let treeListData = treeList.children\r\n let len = treeListData.length\r\n\r\n ref.setChecked(treeList.permissionId, isSelected)\r\n\r\n for (let i = 0; i < len; i++) {\r\n this.uniteChildSame(treeListData[i], isSelected, ref)\r\n }\r\n },\r\n\r\n /** 统一处理父节点为选中 **/\r\n selectedParent(currentObj, ref) {\r\n let currentNode = ref.getNode(currentObj)\r\n if (currentNode.parent.key !== undefined) {\r\n ref.setChecked(currentNode.parent, true)\r\n return this.selectedParent(currentNode.parent, ref)\r\n }\r\n },\r\n\r\n /** 子节点全没选中取消父级的选中状态 **/\r\n removeParent(currentObj, ref) {\r\n let a = 0\r\n let b = 0\r\n let currentNode = ref.getNode(currentObj)\r\n if (currentNode.parent !== null) {\r\n if (currentNode.parent.key !== undefined) {\r\n ref.setChecked(currentNode.parent, true) //根节点\r\n this.removeParent(currentNode.parent, ref) //递归判断子节点\r\n }\r\n }\r\n\r\n //不为0表示为父节点\r\n if (currentNode.childNodes.length !== 0) {\r\n //循环判断父节点下的子节点\r\n for (let i = 0; i < currentNode.childNodes.length; i++) {\r\n //判断父节点下的子节点是否全为false\r\n if (currentNode.childNodes[i].checked === false) {\r\n ++a\r\n\r\n //a === currentNode.childNodes.length 表明子节点全为false\r\n if (a === currentNode.childNodes.length) {\r\n //等于 undefined 跳过,不等于继续执行\r\n if (currentNode.childNodes[i].parent.key !== undefined) {\r\n ref.setChecked(currentNode.childNodes[i].parent, false) //父元素设置为false\r\n //循环上级父节点下的子节点\r\n for (let i = 0; i < currentNode.parent.childNodes.length; i++) {\r\n //判断父节点下的子节点是否全为false\r\n if (currentNode.parent.childNodes[i].checked === false) {\r\n ++b\r\n\r\n //b === currentNode.parent.childNodes.length 表明子节点全为false\r\n if (b === currentNode.parent.childNodes.length) {\r\n ref.setChecked(currentNode.parent.key, false) //父元素设置为false\r\n return this.removeParent(currentNode.parent, ref) //继续递归循环判断\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n }\r\n}\r\n</script>\r\n\r\n<style scoped>\r\n.edit-input {\r\n padding-right: 100px;\r\n}\r\n.filter-item {\r\n margin-left: 10px;\r\n}\r\n</style>\r\n","import mod from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./role.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/thread-loader/dist/cjs.js!../../../node_modules/babel-loader/lib/index.js!../../../node_modules/cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/vue-loader/lib/index.js??vue-loader-options!./role.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./role.vue?vue&type=template&id=f3877ed4&scoped=true&\"\nimport script from \"./role.vue?vue&type=script&lang=js&\"\nexport * from \"./role.vue?vue&type=script&lang=js&\"\nimport style0 from \"./role.vue?vue&type=style&index=0&id=f3877ed4&scoped=true&lang=css&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"f3877ed4\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""} |