EMS2.0-Documents/7.部署文档/Linux安装/项目前端文件/IEMS/js/chunk-1ba74b0c.befd3147.js.map

1 line
36 KiB
Plaintext

{"version":3,"sources":["webpack:///./src/views/manager/department.vue?3dfc","webpack:///src/views/manager/department.vue","webpack:///./src/views/manager/department.vue?1baf","webpack:///./src/views/manager/department.vue","webpack:///./src/api/department.js","webpack:///./src/directive/permission/permission.js","webpack:///./src/directive/permission/index.js"],"names":["render","_vm","this","_h","$createElement","_c","_self","staticClass","attrs","deptIdList","$t","checkStrictly","emitPath","props","on","handleFilter","model","value","listQuery","callback","$$v","$set","expression","nativeOn","$event","type","indexOf","_k","keyCode","key","apply","arguments","_v","_s","clearListQuery","userName","handleCreate","_e","directives","name","rawName","data","children","hasChildren","getChange","handleCurrentChange","scopedSlots","_u","fn","scope","row","deptType","handleUpdate","handleDelete","textMap","dialogStatus","addDialog","staticStyle","ref","rules","form","_l","item","label","disabled","slot","createData","updateData","staticRenderFns","computed","$store","state","user","deptId","permission","listLoading","createStatus","deptPidBox","update","create","deptName","required","message","trigger","deptCode","deptPid","longitude","latitude","address","parentName","currentRow","total","created","getList","getDeptSubByDeptId","methods","getdeptIdList","length","res","subBeanList","obj","list","deptIds","roleCode","roleId","roleName","getDepartmentList","filterDeptList","console","e","subList","route","editDeptList","_parent","$nextTick","$refs","validate","valid","editSubmitApi","title","duration","resetForm","forEach","$notify","addSubmitApi","then","catch","$confirm","confirmButtonText","cancelButtonText","delSubmitApi","val","expanded","component","request","url","method","params","formData","qs","stringify","headers","inserted","el","binding","roles","store","getters","butPermission","log","Array","Error","permissionRoles","hasPermission","some","role","includes","permissionFlag","newnode","document","createElement","style","cursor","display","pointerEvents","parentNode","insertBefore","removeChild","appendChild","install","Vue","directive","window","use"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,4BAA4B,C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,GACX,IAAQ/H,EAAU+H,EAAV/H,MAEFgI,EAAQC,OAAMC,SAAWD,OAAMC,QAAQC,cAE7C,GADAxC,QAAQyC,IAAIJ,EAAO,WACfhI,GAASA,aAAiBqI,OAASrI,EAAMgF,OAAS,GAyBpD,MAAM,IAAIsD,MAAJ,wDAxBN,IAAMC,EAAkBvI,EAClBwI,EAAgBR,EAAMS,MAAK,SAAAC,GAC/B,OAAOH,EAAgBI,SAASD,MAGlC,GADA/C,QAAQyC,IAAII,EAAe,iBACtBA,EAgBHP,OAAM3E,MAAMC,KAAKqF,eAAeL,IAAmB,MAhBjC,CAGlBN,OAAM3E,MAAMC,KAAKqF,eAAeL,IAAmB,EAGnD5C,QAAQyC,IAAIH,OAAM3E,MAAMC,KAAKqF,eAAeL,GAAkB,mBAC9D,IAAMM,EAAUC,SAASC,cAAc,OACvCF,EAAQG,MAAMC,OAAS,cACvBJ,EAAQG,MAAME,QAAU,eACxBpB,EAAGkB,MAAMG,cAAgB,OACzBrB,EAAGsB,WAAWC,aAAaR,EAASf,GACpCA,EAAGsB,YAActB,EAAGsB,WAAWE,YAAYxB,GAC3Ce,EAAQU,YAAYzB,GACpBnC,QAAQyC,IAAIN,EAAI,sBC1BlB0B,EAAU,SAASC,GACvBA,EAAIC,UAAU,aAAcjG,IAG1BkG,OAAOF,MACTE,OAAO,cAAgBlG,EACvBgG,IAAIG,IAAIJ,IAGV/F,EAAW+F,QAAUA,EACN/F","file":"js/chunk-1ba74b0c.befd3147.js","sourcesContent":["var render = function () {var _vm=this;var _h=_vm.$createElement;var _c=_vm._self._c||_h;return _c('div',{staticClass:\"app-container department\"},[_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('department.deptName')},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.deptName),callback:function ($$v) {_vm.$set(_vm.listQuery, \"deptName\", $$v)},expression:\"listQuery.deptName\"}}),_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\"},[(_vm.userName == 'super')?_c('span',{staticClass:\"btn-item\",on:{\"click\":function($event){return _vm.handleCreate(0)}}},[_vm._v(_vm._s(_vm.$t(\"menu.addToplevel\")))]):_vm._e(),_c('span',{staticClass:\"btn-item\",on:{\"click\":function($event){return _vm.handleCreate(1)}}},[_vm._v(_vm._s(_vm.$t(\"menu.addChild\")))])])],1),_c('div',{staticClass:\"table-container\"},[_c('el-table',{directives:[{name:\"loading\",rawName:\"v-loading\",value:(_vm.listLoading),expression:\"listLoading\"}],attrs:{\"data\":_vm.data,\"row-key\":\"deptId\",\"max-height\":\"580\",\"default-expand-all\":\"\",\"header-row-class-name\":\"table-header\",\"row-class-name\":\"table-row\",\"highlight-current-row\":\"\",\"tree-props\":{ children: 'children', hasChildren: 'hasChildren' }},on:{\"expand-change\":_vm.getChange,\"current-change\":_vm.handleCurrentChange}},[_c('el-table-column',{attrs:{\"prop\":\"deptName\",\"align\":\"left\",\"label\":_vm.$t('department.deptName')}}),_c('el-table-column',{attrs:{\"label\":_vm.$t('department.deptType'),\"width\":\"200\",\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [(scope.row.deptType === 1)?_c('span',[_vm._v(_vm._s(_vm.$t(\"department.company\")))]):_vm._e(),(scope.row.deptType === 2)?_c('span',[_vm._v(_vm._s(_vm.$t(\"department.department\")))]):_vm._e()]}}])}),_c('el-table-column',{attrs:{\"prop\":\"address\",\"align\":\"left\",\"label\":_vm.$t('table.address')}}),_c('el-table-column',{attrs:{\"label\":_vm.$t('table.operate'),\"width\":\"240\",\"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\")))])]}}])})],1)],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-scrollbar',{staticStyle:{\"height\":\"100%\"},attrs:{\"vertical\":true}},[_c('el-form',{ref:\"form\",attrs:{\"rules\":_vm.rules,\"model\":_vm.form,\"inline\":\"\",\"label-width\":\"130px\"}},[_c('el-form-item',{attrs:{\"label\":_vm.$t('department.deptName'),\"prop\":\"deptName\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('department.deptName'),\"maxlength\":\"20\"},model:{value:(_vm.form.deptName),callback:function ($$v) {_vm.$set(_vm.form, \"deptName\", $$v)},expression:\"form.deptName\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('department.deptType'),\"prop\":\"deptType\"}},[_c('el-select',{attrs:{\"placeholder\":_vm.$t('pSelect'),\"disabled\":_vm.dialogStatus === 'update'},model:{value:(_vm.form.deptType),callback:function ($$v) {_vm.$set(_vm.form, \"deptType\", $$v)},expression:\"form.deptType\"}},_vm._l((_vm.deptType),function(item){return _c('el-option',{key:item.value,attrs:{\"label\":item.label,\"value\":item.value,\"disabled\":item.disabled}})}),1)],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('table.address'),\"prop\":\"address\"}},[_c('el-input',{attrs:{\"type\":\"textarea\",\"placeholder\":_vm.$t('pEnter') + _vm.$t('table.address'),\"maxlength\":\"20\"},model:{value:(_vm.form.address),callback:function ($$v) {_vm.$set(_vm.form, \"address\", $$v)},expression:\"form.address\"}})],1)],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.define\")))])])],1)],1)}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<!-- 区域管理页 -->\r\n<template>\r\n <div class=\"app-container department\">\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.deptName\"\r\n :placeholder=\"$t('department.deptName')\"\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\" />{{ $t(\"btn.search\") }}</span\r\n >\r\n <span class=\"btn-item\" @click=\"clearListQuery\"\r\n ><i class=\"el-icon-refresh-left\"></i> {{ $t(\"btn.resetting\") }}</span\r\n >\r\n <div class=\"control-container\">\r\n <span\r\n class=\"btn-item\"\r\n v-if=\"userName == 'super'\"\r\n @click=\"handleCreate(0)\"\r\n >{{ $t(\"menu.addToplevel\") }}</span\r\n >\r\n <span class=\"btn-item\" @click=\"handleCreate(1)\">{{\r\n $t(\"menu.addChild\")\r\n }}</span>\r\n </div>\r\n </div>\r\n <div class=\"table-container\">\r\n <el-table\r\n v-loading=\"listLoading\"\r\n :data=\"data\"\r\n row-key=\"deptId\"\r\n max-height=\"580\"\r\n default-expand-all\r\n header-row-class-name=\"table-header\"\r\n row-class-name=\"table-row\"\r\n highlight-current-row\r\n @expand-change=\"getChange\"\r\n @current-change=\"handleCurrentChange\"\r\n :tree-props=\"{ children: 'children', hasChildren: 'hasChildren' }\"\r\n >\r\n <el-table-column\r\n prop=\"deptName\"\r\n align=\"left\"\r\n :label=\"$t('department.deptName')\"\r\n />\r\n <el-table-column\r\n :label=\"$t('department.deptType')\"\r\n width=\"200\"\r\n align=\"center\"\r\n >\r\n <template slot-scope=\"scope\">\r\n <span v-if=\"scope.row.deptType === 1\">{{\r\n $t(\"department.company\")\r\n }}</span>\r\n <span v-if=\"scope.row.deptType === 2\">{{\r\n $t(\"department.department\")\r\n }}</span>\r\n </template>\r\n </el-table-column>\r\n\r\n <el-table-column\r\n prop=\"address\"\r\n align=\"left\"\r\n :label=\"$t('table.address')\"\r\n />\r\n <el-table-column :label=\"$t('table.operate')\" width=\"240\" 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 >\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 </template>\r\n </el-table-column>\r\n </el-table>\r\n </div>\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-scrollbar style=\"height: 100%\" :vertical=\"true\">\r\n <el-form\r\n ref=\"form\"\r\n :rules=\"rules\"\r\n :model=\"form\"\r\n inline\r\n label-width=\"130px\"\r\n >\r\n <el-form-item :label=\"$t('department.deptName')\" prop=\"deptName\">\r\n <el-input\r\n v-model=\"form.deptName\"\r\n :placeholder=\"$t('pEnter') + $t('department.deptName')\"\r\n maxlength=\"20\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('department.deptType')\" prop=\"deptType\">\r\n <el-select\r\n v-model=\"form.deptType\"\r\n :placeholder=\"$t('pSelect')\"\r\n :disabled=\"dialogStatus === 'update'\"\r\n >\r\n <el-option\r\n v-for=\"item in deptType\"\r\n :key=\"item.value\"\r\n :label=\"item.label\"\r\n :value=\"item.value\"\r\n :disabled=\"item.disabled\"\r\n />\r\n </el-select>\r\n </el-form-item>\r\n <el-form-item :label=\"$t('table.address')\" prop=\"address\">\r\n <el-input\r\n type=\"textarea\"\r\n v-model=\"form.address\"\r\n :placeholder=\"$t('pEnter') + $t('table.address')\"\r\n maxlength=\"20\"\r\n />\r\n </el-form-item>\r\n </el-form>\r\n </el-scrollbar>\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.define\") }}</span\r\n >\r\n </span>\r\n </el-dialog>\r\n </div>\r\n</template>\r\n\r\n<script>\r\nimport {\r\n getDepartmentList,\r\n editSubmitApi,\r\n addSubmitApi,\r\n delSubmitApi,\r\n getDeptSubByDeptId\r\n} from \"@/api/department\"\r\nimport permission from \"@/directive/permission/index.js\" // 权限判断指令\r\n\r\nexport default {\r\n computed: {\r\n userName() {\r\n return this.$store.state.user.userName\r\n },\r\n deptId() {\r\n return this.$store.state.user.deptId\r\n }\r\n },\r\n directives: { permission },\r\n data() {\r\n return {\r\n listLoading: false,\r\n createStatus: false,\r\n deptPidBox: [],\r\n deptIdList: [],\r\n deptType: [\r\n { value: 1, label: this.$t(\"department.company\"), disabled: false },\r\n { value: 2, label: this.$t(\"department.department\"), disabled: false }\r\n ],\r\n textMap: {\r\n update: this.$t(\"table.update\"),\r\n create: this.$t(\"table.create\")\r\n },\r\n rules: {\r\n deptName: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"department.deptName\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n deptCode: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"department.deptCode\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n deptPid: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"department.deptPid\"),\r\n trigger: \"change\"\r\n }\r\n ],\r\n longitude: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"table.longitude\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n latitude: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"table.latitude\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n deptType: [\r\n {\r\n required: true,\r\n message: this.$t(\"pSelect\") + this.$t(\"department.deptType\"),\r\n trigger: \"change\"\r\n }\r\n ],\r\n address: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"table.address\"),\r\n trigger: \"blur\"\r\n }\r\n ]\r\n },\r\n dialogStatus: \"\",\r\n parentName: \"\",\r\n form: {\r\n deptId: \"\",\r\n deptName: \"\",\r\n deptCode: \"\",\r\n deptPid: \"\",\r\n deptType: \"\",\r\n longitude: \"\",\r\n latitude: \"\",\r\n address: \"\"\r\n },\r\n currentRow: null,\r\n addDialog: false,\r\n total: 0,\r\n listQuery: {\r\n deptId: null,\r\n deptName: null\r\n },\r\n data: []\r\n }\r\n },\r\n created() {\r\n this.getList()\r\n this.getDeptSubByDeptId()\r\n },\r\n methods: {\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: \"\",\r\n deptIds: [],\r\n deptName: \"\",\r\n roleCode: \"\",\r\n roleId: \"\",\r\n roleName: \"\"\r\n }\r\n this.getList()\r\n },\r\n // 获取表格\r\n getList() {\r\n this.listLoading = true\r\n getDepartmentList(this.listQuery).then((response) => {\r\n this.listLoading = false\r\n this.data = this.filterDeptList(response.data)\r\n })\r\n },\r\n filterDeptList(data) {\r\n // 过滤区域列表\r\n const editDeptList = []\r\n data.forEach((e) => {\r\n const route = e\r\n console.log(e)\r\n if (!e) {\r\n return\r\n }\r\n if (e.subList) {\r\n route.children = this.filterDeptList(e.subList, true)\r\n }\r\n e.id = e.deptId + 1\r\n editDeptList.push(route)\r\n })\r\n return editDeptList\r\n },\r\n getDeptSubByDeptId() {\r\n // 获取区域列表\r\n getDeptSubByDeptId().then((res) => {\r\n this.deptIdList = res.data && this.getdeptIdList(res.data)\r\n })\r\n },\r\n handleFilter() {\r\n this.listLoading = true\r\n this.getList()\r\n },\r\n handleUpdate(scope) {\r\n this.form = {\r\n deptName: scope.row.deptName,\r\n deptId: scope.row.deptId,\r\n deptPid: scope.row.deptPid,\r\n deptType: scope.row.deptType,\r\n address: scope.row.address,\r\n latitude: scope.row.latitude,\r\n deptCode: scope.row.deptCode,\r\n longitude: scope.row.longitude\r\n }\r\n this.dialogStatus = \"update\"\r\n this.addDialog = true\r\n this.parentName = scope.row._parent\r\n ? scope.row._parent.deptName\r\n : this.$t(\"type.notHave\")\r\n this.$nextTick(() => {\r\n this.$refs[\"form\"].clearValidate()\r\n })\r\n },\r\n updateData() {\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n editSubmitApi(this.form).then(() => {\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 this.getDeptSubByDeptId()\r\n this.addDialog = false\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(type) {\r\n if (type === 0) {\r\n // 新增顶级\r\n this.resetForm()\r\n this.addDialog = true\r\n this.dialogStatus = \"create\"\r\n this.form.deptPid = 0\r\n this.deptType.forEach((item) => {\r\n item.disabled = false\r\n })\r\n this.$nextTick(() => {\r\n this.$refs[\"form\"].clearValidate()\r\n })\r\n } else {\r\n // 新增子级\r\n if (this.currentRow) {\r\n this.resetForm()\r\n this.addDialog = true\r\n this.dialogStatus = \"create\"\r\n this.form.deptPid = this.currentRow.deptId\r\n\r\n this.deptType.forEach((item) => {\r\n if (item.value < this.currentRow.deptType) {\r\n item.disabled = true\r\n }\r\n })\r\n this.$nextTick(() => {\r\n this.$refs[\"form\"].clearValidate()\r\n })\r\n } else {\r\n this.$notify({\r\n title: this.$t(\"title.pointOut\"),\r\n message: this.$t(\"title.oneData\"),\r\n type: \"warning\",\r\n duration: 3000\r\n })\r\n }\r\n }\r\n },\r\n createData() {\r\n if (this.createStatus) {\r\n return\r\n }\r\n this.$refs.form.validate((valid) => {\r\n if (valid) {\r\n this.createStatus = true\r\n if (this.form.deptPid === 0) {\r\n this.form.deptPid = 0\r\n } else {\r\n this.form.deptPid = this.currentRow.deptId\r\n }\r\n addSubmitApi(this.form)\r\n .then(() => {\r\n this.createStatus = 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.parentName = \"\"\r\n this.currentRow = null\r\n this.getList()\r\n this.getDeptSubByDeptId()\r\n this.addDialog = false\r\n })\r\n .catch(() => {\r\n this.createStatus = false\r\n })\r\n }\r\n })\r\n },\r\n handleDelete(scope) {\r\n this.$confirm(\r\n this.$t(\"title.delPointOutDepartment\"),\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 delSubmitApi({ deptIds: scope.row.deptId }).then(() => {\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 handleCurrentChange(val) {\r\n if (val) {\r\n this.currentRow = val\r\n } else {\r\n this.currentRow = null\r\n }\r\n },\r\n getChange(row, expanded) {\r\n console.log(row, expanded)\r\n }\r\n }\r\n}\r\n</script>\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!./department.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!./department.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./department.vue?vue&type=template&id=b755b5c6&\"\nimport script from \"./department.vue?vue&type=script&lang=js&\"\nexport * from \"./department.vue?vue&type=script&lang=js&\"\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 null,\n null\n \n)\n\nexport default component.exports","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","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"],"sourceRoot":""}