1 line
37 KiB
Plaintext
1 line
37 KiB
Plaintext
{"version":3,"sources":["webpack:///./src/views/manager/area.vue?7a29","webpack:///src/views/manager/area.vue","webpack:///./src/views/manager/area.vue?e98a","webpack:///./src/views/manager/area.vue","webpack:///./src/directive/permission/permission.js","webpack:///./src/directive/permission/index.js","webpack:///./src/api/area.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","directives","name","rawName","handleCreate","data","children","hasChildren","handleCurrentChange","scopedSlots","_u","fn","scope","row","level","_e","handleUpdate","handleDelete","textMap","dialogStatus","addDialog","staticStyle","ref","rules","form","_l","item","label","disabled","currentRow","cityCode","slot","createData","updateData","staticRenderFns","computed","userName","$store","state","user","permission","listLoading","createStatus","deptPidBox","deptType","update","create","areaName","required","message","trigger","areaCode","center","parentName","areaId","areaPid","total","created","getList","getDeptList","methods","getAreaIdList","length","res","subList","obj","list","getAreaTreeList","filterDeptList","console","e","route","editDeptList","getAreaSubByAreaId","_parent","$nextTick","$refs","validate","valid","updateArea","title","duration","resetForm","deptPid","forEach","$notify","saveArea","then","catch","$confirm","confirmButtonText","cancelButtonText","removeArea","deptIds","val","getChange","expanded","component","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","request","url","method","params"],"mappings":"yHAAA,IAAIA,EAAS,WAAa,IAAIC,EAAIC,KAASC,EAAGF,EAAIG,eAAmBC,EAAGJ,EAAIK,MAAMD,IAAIF,EAAG,OAAOE,EAAG,MAAM,CAACE,YAAY,4BAA4B,CAACF,EAAG,MAAM,CAACE,YAAY,aAAaF,EAAG,MAAM,CAACE,YAAY,oBAAoB,CAACF,EAAG,cAAc,CA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OAAQ,MACRC,OAAQhI,IAMT,SAASoE,EAAmBpE,GAC/B,OAAO6H,eAAQ,CACXC,IAAK,uCACLC,OAAQ,MACRC,OAAQhI,IAKT,SAASuF,EAAWvF,GACvB,OAAO6H,eAAQ,CACXC,IAAK,+BACLC,OAAQ,MACRC,OAAQhI,IAKT,SAASiF,EAASjF,GACrB,OAAO6H,eAAQ,CACXC,IAAK,6BACLC,OAAQ,OACR/H,SAKD,SAAS0E,EAAW1E,GACvB,OAAO6H,eAAQ,CACXC,IAAK,+BACLC,OAAQ,OACR/H","file":"js/chunk-6aaba449.89d82ba0.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.areaId'),\"props\":{ checkStrictly: true, emitPath: false, props: {} },\"clearable\":\"\"},on:{\"change\":_vm.handleFilter},model:{value:(_vm.listQuery.areaPid),callback:function ($$v) {_vm.$set(_vm.listQuery, \"areaPid\", $$v)},expression:\"listQuery.areaPid\"}}),_c('el-input',{staticClass:\"filter-item\",attrs:{\"placeholder\":_vm.$t('area.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.areaName),callback:function ($$v) {_vm.$set(_vm.listQuery, \"areaName\", $$v)},expression:\"listQuery.areaName\"}}),_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',{directives:[{name:\"permission\",rawName:\"v-permission\",value:(['area_add_top']),expression:\"['area_add_top']\"}],staticClass:\"btn-item\",on:{\"click\":function($event){return _vm.handleCreate(0)}}},[_vm._v(_vm._s(_vm.$t(\"menu.addToplevel\")))]),_c('span',{directives:[{name:\"permission\",rawName:\"v-permission\",value:(['area_add_child']),expression:\"['area_add_child']\"}],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\":\"id\",\"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:{\"current-change\":_vm.handleCurrentChange}},[_c('el-table-column',{attrs:{\"prop\":\"areaName\",\"align\":\"left\",\"label\":_vm.$t('area.deptName')}}),_c('el-table-column',{attrs:{\"prop\":\"areaCode\",\"align\":\"left\",\"label\":_vm.$t('area.deptCode')}}),_c('el-table-column',{attrs:{\"label\":_vm.$t('area.deptType'),\"align\":\"center\"},scopedSlots:_vm._u([{key:\"default\",fn:function(scope){return [(scope.row.level === 1)?_c('span',[_vm._v(_vm._s(_vm.$t(\"area.province\")))]):_vm._e(),(scope.row.level === 2)?_c('span',[_vm._v(_vm._s(_vm.$t(\"area.city\")))]):_vm._e(),(scope.row.level === 3)?_c('span',[_vm._v(_vm._s(_vm.$t(\"area.district\")))]):_vm._e(),(scope.row.level === 4)?_c('span',[_vm._v(_vm._s(_vm.$t(\"area.street\")))]):_vm._e()]}}])}),_c('el-table-column',{attrs:{\"prop\":\"center\",\"align\":\"left\",\"label\":_vm.$t('area.center')}}),_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('area.deptName'),\"prop\":\"areaName\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('area.deptName'),\"maxlength\":\"20\"},model:{value:(_vm.form.areaName),callback:function ($$v) {_vm.$set(_vm.form, \"areaName\", $$v)},expression:\"form.areaName\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('area.deptCode'),\"prop\":\"areaCode\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('area.deptCode')},model:{value:(_vm.form.areaCode),callback:function ($$v) {_vm.$set(_vm.form, \"areaCode\", $$v)},expression:\"form.areaCode\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('area.deptType'),\"prop\":\"level\"}},[_c('el-select',{attrs:{\"placeholder\":_vm.$t('pSelect'),\"disabled\":_vm.dialogStatus === 'update'},model:{value:(_vm.form.level),callback:function ($$v) {_vm.$set(_vm.form, \"level\", $$v)},expression:\"form.level\"}},_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('area.cityCode'),\"prop\":\"cityCode\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('area.cityCode'),\"disabled\":_vm.currentRow && _vm.currentRow.cityCode},model:{value:(_vm.form.cityCode),callback:function ($$v) {_vm.$set(_vm.form, \"cityCode\", $$v)},expression:\"form.cityCode\"}})],1),_c('el-form-item',{attrs:{\"label\":_vm.$t('area.center'),\"prop\":\"center\"}},[_c('el-input',{attrs:{\"placeholder\":_vm.$t('pEnter') + _vm.$t('area.center')},model:{value:(_vm.form.center),callback:function ($$v) {_vm.$set(_vm.form, \"center\", $$v)},expression:\"form.center\"}})],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.areaPid\"\r\n class=\"filter-item\"\r\n :options=\"deptIdList\"\r\n :placeholder=\"$t('listQuery.areaId')\"\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.areaName\"\r\n :placeholder=\"$t('area.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\") }}\r\n </span>\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 @click=\"handleCreate(0)\"\r\n v-permission=\"['area_add_top']\"\r\n >{{ $t(\"menu.addToplevel\") }}</span\r\n >\r\n <span\r\n class=\"btn-item\"\r\n @click=\"handleCreate(1)\"\r\n v-permission=\"['area_add_child']\"\r\n >{{ $t(\"menu.addChild\") }}</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=\"data\"\r\n row-key=\"id\"\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 @current-change=\"handleCurrentChange\"\r\n :tree-props=\"{ children: 'children', hasChildren: 'hasChildren' }\"\r\n >\r\n <el-table-column\r\n prop=\"areaName\"\r\n align=\"left\"\r\n :label=\"$t('area.deptName')\"\r\n />\r\n <el-table-column\r\n prop=\"areaCode\"\r\n align=\"left\"\r\n :label=\"$t('area.deptCode')\"\r\n />\r\n <el-table-column :label=\"$t('area.deptType')\" align=\"center\">\r\n <template slot-scope=\"scope\">\r\n <span v-if=\"scope.row.level === 1\">{{ $t(\"area.province\") }}</span>\r\n <span v-if=\"scope.row.level === 2\">{{ $t(\"area.city\") }}</span>\r\n <span v-if=\"scope.row.level === 3\">{{ $t(\"area.district\") }}</span>\r\n <span v-if=\"scope.row.level === 4\">{{ $t(\"area.street\") }}</span>\r\n </template>\r\n </el-table-column>\r\n <el-table-column\r\n prop=\"center\"\r\n align=\"left\"\r\n :label=\"$t('area.center')\"\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('area.deptName')\" prop=\"areaName\">\r\n <el-input\r\n v-model=\"form.areaName\"\r\n :placeholder=\"$t('pEnter') + $t('area.deptName')\"\r\n maxlength=\"20\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('area.deptCode')\" prop=\"areaCode\">\r\n <el-input\r\n v-model=\"form.areaCode\"\r\n :placeholder=\"$t('pEnter') + $t('area.deptCode')\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('area.deptType')\" prop=\"level\">\r\n <el-select\r\n v-model=\"form.level\"\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('area.cityCode')\" prop=\"cityCode\">\r\n <el-input\r\n v-model=\"form.cityCode\"\r\n :placeholder=\"$t('pEnter') + $t('area.cityCode')\"\r\n :disabled=\"currentRow && currentRow.cityCode\"\r\n />\r\n </el-form-item>\r\n <el-form-item :label=\"$t('area.center')\" prop=\"center\">\r\n <el-input\r\n v-model=\"form.center\"\r\n :placeholder=\"$t('pEnter') + $t('area.center')\"\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 updateArea,\r\n saveArea,\r\n removeArea,\r\n getAreaSubByAreaId,\r\n getAreaTreeList\r\n} from \"@/api/area\"\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 },\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: 0, label: this.$t(\"area.country\"), disabled: false },\r\n { value: 1, label: this.$t(\"area.province\"), disabled: false },\r\n { value: 2, label: this.$t(\"area.city\"), disabled: false },\r\n { value: 3, label: this.$t(\"area.district\"), disabled: false },\r\n { value: 4, label: this.$t(\"area.street\"), 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 areaName: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"area.deptName\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n areaCode: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"area.areaCode\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n center: [\r\n {\r\n required: true,\r\n message: this.$t(\"pEnter\") + this.$t(\"area.center\"),\r\n trigger: \"blur\"\r\n }\r\n ],\r\n level: [\r\n {\r\n required: true,\r\n message: this.$t(\"pSelect\") + this.$t(\"area.level\"),\r\n trigger: \"change\"\r\n }\r\n ]\r\n },\r\n dialogStatus: \"\",\r\n parentName: \"\",\r\n form: {\r\n areaCode: null,\r\n areaId: null,\r\n areaName: null,\r\n areaPid: null,\r\n center: null,\r\n cityCode: null,\r\n level: null\r\n },\r\n currentRow: null,\r\n addDialog: false,\r\n total: 0,\r\n listQuery: {\r\n areaName: null,\r\n areaPid: null\r\n },\r\n data: []\r\n }\r\n },\r\n created() {\r\n this.getList()\r\n this.getDeptList()\r\n },\r\n methods: {\r\n // 数组遍历\r\n\r\n getAreaIdList(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.subList) {\r\n obj.children = this.getAreaIdList(res.subList)\r\n obj.label = res.areaName\r\n obj.value = res.areaId\r\n return obj\r\n } else {\r\n obj.label = res.areaName\r\n obj.value = res.areaId\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 areaName: null,\r\n areaPid: null\r\n }\r\n this.getList()\r\n },\r\n // 获取表格\r\n getList() {\r\n this.listLoading = true\r\n getAreaTreeList(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)\r\n }\r\n route.id = e.areaId\r\n editDeptList.push(route)\r\n })\r\n return editDeptList\r\n },\r\n getDeptList() {\r\n // 获取区域列表\r\n getAreaSubByAreaId().then((res) => {\r\n this.deptIdList = res.data && this.getAreaIdList(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 areaName: scope.row.areaName,\r\n areaCode: scope.row.areaCode,\r\n areaId: scope.row.areaId,\r\n areaPid: scope.row.areaPid,\r\n center: scope.row.center,\r\n cityCode: scope.row.cityCode,\r\n level: scope.row.level\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 updateArea(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.getDeptList()\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.currentRow = null\r\n this.addDialog = true\r\n this.dialogStatus = \"create\"\r\n this.form.deptPid = -1\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.areaPid = this.currentRow.areaId\r\n this.form.cityCode = this.currentRow.cityCode\r\n this.deptType.forEach((item) => {\r\n if (item.value < this.currentRow.level) {\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 === -1) {\r\n this.form.deptPid = -1\r\n } else {\r\n this.form.deptPid = this.currentRow.deptId\r\n }\r\n saveArea(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.getDeptList()\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 removeArea({ 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!./area.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!./area.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./area.vue?vue&type=template&id=20d7774d&\"\nimport script from \"./area.vue?vue&type=script&lang=js&\"\nexport * from \"./area.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 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'\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 getAreaSubByAreaId(data) {\r\n return request({\r\n url: 'user-service/area/getAreaSubByAreaId',\r\n method: 'get',\r\n params: data\r\n })\r\n}\r\n\r\n// 删除区域\r\nexport function removeArea(data) {\r\n return request({\r\n url: 'user-service/area/removeArea',\r\n method: 'get',\r\n params: data\r\n })\r\n}\r\n\r\n// 新增\r\nexport function saveArea(data) {\r\n return request({\r\n url: 'user-service/area/saveArea',\r\n method: 'post',\r\n data\r\n })\r\n}\r\n\r\n// 修改\r\nexport function updateArea(data) {\r\n return request({\r\n url: 'user-service/area/updateArea',\r\n method: 'post',\r\n data\r\n })\r\n}"],"sourceRoot":""} |