{"remainingRequest":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js!E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js!E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!E:\\hz-zhhq-web\\src\\views\\jurisdiction\\approle\\approle.vue?vue&type=script&lang=js","dependencies":[{"path":"E:\\hz-zhhq-web\\src\\views\\jurisdiction\\approle\\approle.vue","mtime":1737610069429},{"path":"E:\\hz-zhhq-web\\babel.config.js","mtime":1737610069371},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\babel-loader\\lib\\index.js","mtime":456789000000},{"path":"E:\\hz-zhhq-web\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"E:\\hz-zhhq-web\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["import \"core-js/modules/es6.regexp.split\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n\nimport Paging from \"@/views/Public/paging.vue\";\nimport Popup from \"@/views/estate/examine/dialog/popup.vue\";\nimport { getAppRoleList, addAppRole, deleteGreenRoleById, updateAppRole, getAppMenuTree2, getPermissionByRoleId as _getPermissionByRoleId, updateRolePermission, houseDicInfo as _houseDicInfo, getAppRoleRealHouse, addAppRoleRealHouse } from \"@/api/getdata\";\nvar id = 1001;\nexport default {\n data: function data() {\n return {\n loading: false,\n //初始化loading\n loadingMsg: \"\",\n row: {},\n validation: false,\n completeTitle: \"\",\n nav: \"\",\n food_name: \"\",\n formInline: {\n userName: \"\"\n },\n page: {\n limit: 0 /** 当前点击*/,\n sizePage: 10 /** 当前多少页*/,\n total: 0 /**总数 */\n },\n tableData: [],\n isflag: false /**用于设置弹窗 */,\n num: 3,\n addRolePopup: false,\n reason: '',\n ruleForm: {\n role_name: \"\"\n },\n rules: {\n role_name: [{\n required: true,\n message: \"请填写角色名称\",\n trigger: \"blur\"\n }]\n },\n rowRule: {\n roleName: [{\n required: true,\n message: \"请填写角色名称\",\n trigger: \"blur\"\n }]\n },\n popupBtn: \"3\",\n updateRolePopup: false,\n relationMenuPopup: false,\n editHousePopup: false,\n houseForm: {\n houseType: []\n },\n houseType: [],\n houseRule: {\n houseType: [{\n required: true,\n message: \"请选择租房类型\",\n trigger: \"change\"\n }]\n },\n menuList: [],\n defaultProps: {\n children: 'children',\n label: 'label'\n },\n menuCheckedList: []\n };\n },\n components: {\n Paging: Paging,\n Popup: Popup\n },\n mounted: function mounted() {\n this.createLoad();\n if (this.$route.params.index) {\n this.currentChanges(this.$route.params.index);\n } else {\n this.getlist();\n this.getAppMenuTree();\n this.houseDicInfo('houseType');\n }\n },\n methods: {\n createLoad: function createLoad() {\n this.loading = true;\n this.loadingMsg = \"加载中...\";\n },\n clearLoad: function clearLoad() {\n this.loading = false;\n this.loadingMsg = \"\";\n },\n // 分页\n currentChanges: function currentChanges(val) {\n this.createLoad();\n this.page.limit = val;\n this.getlist();\n },\n houseDicInfo: function houseDicInfo(e) {\n var _this = this;\n var Content = {\n dataType: e\n };\n _houseDicInfo(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n if (e == 'houseType') {\n _this.houseType = res.returnData.data;\n _this.houseType.splice(0, 1);\n }\n }\n }).catch(function (err) {\n console.log(err);\n });\n },\n getlist: function getlist() {\n var _this2 = this;\n var aa = {\n roleName: this.formInline.userName,\n pageIndex: this.page.limit == 0 ? 1 : this.page.limit,\n pageSize: 10\n };\n getAppRoleList(aa).then(function (res) {\n if (res.returnCode == \"1\") {\n _this2.clearLoad();\n _this2.tableData = res.returnData.data;\n _this2.page.total = res.returnData.total;\n _this2.page.limit = res.returnData.currentPage;\n _this2.tableData.id = res.returnData.data.id;\n } else {\n _this2.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this2.clearLoad();\n }, 300);\n });\n },\n onSubmit: function onSubmit() {\n console.log(this.formInline);\n this.page.limit = 1;\n this.createLoad();\n this.getlist();\n },\n submit: function submit(e) {\n var _this3 = this;\n setRole(e).then(function (res) {\n if (res.returnCode == '1') {\n _this3.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n // this.options = res.returnData;\n _this3.isflag = false;\n _this3.getlist();\n _this3.row = {};\n } else {\n _this3.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n });\n },\n addRole: function addRole() {\n this.addRolePopup = true;\n },\n editRole: function editRole(row) {\n // this.row = row;\n this.row = Object.assign({}, row);\n this.updateRolePopup = true;\n },\n editHouse: function editHouse(row) {\n var _this4 = this;\n console.log(row);\n this.houseForm = row;\n this.editHousePopup = true;\n this.$set(this.houseForm, 'houseType', []);\n var Content = {\n id: this.houseForm.id\n };\n getAppRoleRealHouse(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n if (res.returnData != '') {\n var arr = res.returnData.split(',');\n _this4.$set(_this4.houseForm, 'houseType', arr);\n }\n }\n }).catch(function (err) {\n console.log(err);\n });\n },\n relationMenu: function relationMenu(row) {\n this.row = row;\n this.getPermissionByRoleId();\n this.relationMenuPopup = true;\n },\n cancal: function cancal(formName) {\n this.addRolePopup = false;\n this.updateRolePopup = false;\n this.relationMenuPopup = false;\n this.menuCheckedList = [];\n if (formName == 'house') {\n this.editHousePopup = false;\n this.$set(this.houseForm, 'houseType', []);\n }\n },\n submitHouse: function submitHouse(formName) {\n var _this5 = this;\n console.log(this.houseForm);\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n var Content = {\n id: _this5.houseForm.id,\n houseCode: _this5.houseForm.houseType.join(',')\n };\n console.log(Content);\n addAppRoleRealHouse(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this5.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this5.editHousePopup = false;\n _this5.$set(_this5.houseForm, 'houseType', []);\n } else {\n _this5.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n }\n }).catch(function (err) {\n console.log(\"error\");\n });\n }\n });\n },\n submitForm: function submitForm(formName) {\n var _this6 = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n _this6.validation = true;\n _this6.nav = \"确认添加角色?\";\n _this6.completeTitle = \"添加\";\n _this6.btn = \"3\";\n }\n });\n },\n submitUpdateForm: function submitUpdateForm(formName) {\n var _this7 = this;\n this.$refs[formName].validate(function (valid) {\n if (valid) {\n _this7.validation = true;\n _this7.nav = \"确认修改角色?\";\n _this7.completeTitle = \"修改\";\n _this7.btn = \"2\";\n }\n });\n },\n closeEnd: function closeEnd(val) {\n var _this8 = this;\n this.validation = false;\n if (val == \"1\") {\n this.createLoad();\n var Content = {\n id: this.row.id\n };\n deleteGreenRoleById(Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this8.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this8.page.limit = 1;\n _this8.getlist();\n _this8.addRolePopup = false;\n _this8.updateRolePopup = false;\n } else {\n _this8.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this8.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(\"error\");\n setTimeout(function () {\n _this8.clearLoad();\n }, 300);\n });\n } else if (val == \"2\") {\n // console.log(Content, 888);\n this.row.gmtCreated = \"\";\n this.row.gmtModified = \"\";\n updateAppRole(this.row).then(function (res) {\n console.log(res, 169);\n if (res.returnCode == \"1\") {\n _this8.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this8.getlist();\n _this8.addRolePopup = false;\n _this8.updateRolePopup = false;\n } else {\n _this8.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this8.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this8.clearLoad();\n }, 300);\n });\n console.log(222222);\n } else if (val == \"3\") {\n var _Content = {\n role_name: this.ruleForm.role_name,\n roleType: '1'\n };\n addAppRole(_Content).then(function (res) {\n if (res.returnCode == \"1\") {\n _this8.$message({\n message: res.returnMsg,\n type: \"success\"\n });\n _this8.getlist();\n _this8.addRolePopup = false;\n } else {\n _this8.$message({\n message: res.returnMsg,\n type: \"warning\"\n });\n setTimeout(function () {\n _this8.clearLoad();\n }, 300);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this8.clearLoad();\n }, 300);\n });\n }\n },\n del: function del(row) {\n this.row = row;\n this.validation = true;\n this.nav = \"确认删除角色?\";\n this.completeTitle = \"删除\";\n this.btn = \"1\";\n },\n getAppMenuTree: function getAppMenuTree() {\n var _this9 = this;\n var aa = {};\n getAppMenuTree2(aa).then(function (res) {\n if (res.returnCode == \"1\") {\n _this9.menuList = res.returnData.data;\n console.log(_this9.menuList);\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this9.clearLoad();\n }, 300);\n });\n },\n getPermissionByRoleId: function getPermissionByRoleId() {\n var _this10 = this;\n var aa = {\n roleId: this.row.id\n };\n _getPermissionByRoleId(aa).then(function (res) {\n if (res.returnCode == \"1\") {\n _this10.menuCheckedList = [];\n var arr = res.returnData.data;\n for (var i = 0; i < arr.length; i++) {\n _this10.menuCheckedList.push(arr[i].permission_id);\n }\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this10.clearLoad();\n }, 300);\n });\n },\n submitRelationMenu: function submitRelationMenu() {\n var _this11 = this;\n var checkMenuArr = this.$refs.appMenuTree.getCheckedNodes();\n var permissionIds = [];\n for (var i = 0; i < checkMenuArr.length; i++) {\n permissionIds.push(checkMenuArr[i].code);\n }\n var aa = {\n roleId: this.row.id,\n permissionIds: permissionIds\n };\n updateRolePermission(aa).then(function (res) {\n if (res.returnCode == \"1\") {\n _this11.cancal();\n }\n }).catch(function (err) {\n console.log(err);\n setTimeout(function () {\n _this11.clearLoad();\n }, 300);\n });\n }\n }\n};",null]}