{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\dialog\\DataAuthkindDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\dialog\\DataAuthkindDialog.vue","mtime":1667327529169},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js","mtime":499162500000}],"contextDependencies":[],"result":["//\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\r\nimport deepmerge from 'deepmerge'\r\n\r\nconst eipUserSelector = () =>\r\n import('@/components/selector/EipUserSelector.vue')\r\nconst eipRoleSelector = () =>\r\n import('@/components/selector/EipRoleSelector.vue')\r\nconst eipOrgSelector = () => import('@/components/selector/EipOrgSelector.vue')\r\nconst eipPostSelector = () =>\r\n import('@/components/selector/EipPostSelector.vue')\r\n\r\nexport default {\r\n components: {\r\n eipUserSelector,\r\n eipRoleSelector,\r\n eipOrgSelector,\r\n eipPostSelector,\r\n },\r\n props: {name},\r\n data() {\r\n return {\r\n dialogVisible: false,\r\n needSetArr: [\r\n {\r\n type: 'org',\r\n title: '组织',\r\n id: '',\r\n name: '',\r\n },\r\n {\r\n type: 'role',\r\n title: '角色',\r\n id: '',\r\n name: '',\r\n },\r\n {\r\n type: 'user',\r\n title: '用户',\r\n id: '',\r\n name: '',\r\n }\r\n ],\r\n noNeedSetArr: [{\r\n title: \"所有人\",\r\n type: \"everyone\",\r\n checked: false,\r\n },{\r\n title: \"其他\",\r\n type: \"otherAuth\",\r\n checked: true,\r\n }],\r\n right: '',\r\n permissionList: [],\r\n showNeedRight: true,\r\n curSelectItem: {},\r\n autoClose: true,\r\n selectorKey: 1,\r\n }\r\n },\r\n methods: {\r\n showDialog: function (param_) {\r\n //重新初始化全部的 data数据\r\n Object.assign(this.$data, this.$options.data())\r\n console.log('this.$data', this.$data)\r\n let param = deepmerge({}, param_, {clone: true})\r\n console.log('param', param)\r\n if (param.autoClose === false) {\r\n this.autoClose = false\r\n }\r\n\r\n this.showNeedRight = true\r\n this.right = {}\r\n if (param.right) {\r\n this.right = deepmerge({}, param.right, {clone: true})\r\n }\r\n console.log('this.right', this.right)\r\n if(param.right.type == 'everyone'){\r\n this.noNeedSetArr[0].checked = true;\r\n this.noNeedSetArr[1].checked = false;\r\n this.showNeedRight = false;\r\n };\r\n if(param.right.type == 'otherAuth'&& param.right.accessControlData){\r\n this.noNeedSetArr[0].checked = false;\r\n this.noNeedSetArr[1].checked = true\r\n this.showNeedRight = true\r\n let accessControlData = {...param.right.accessControlData};\r\n if(accessControlData.orgList){\r\n this.needSetArr[0].id = accessControlData.orgList;\r\n this.needSetArr[0].name = accessControlData.orgNameList;\r\n }\r\n if(accessControlData.roleList){\r\n this.needSetArr[1].id = accessControlData.roleList;\r\n this.needSetArr[1].name = accessControlData.roleNameList;\r\n }\r\n if(accessControlData.personList){\r\n this.needSetArr[2].id = accessControlData.personList;\r\n this.needSetArr[2].name = accessControlData.personNameList;\r\n }\r\n }\r\n this.dialogVisible = true\r\n console.log('noNeedSetArr', this.noNeedSetArr)\r\n console.log('this.needSetArr', this.needSetArr)\r\n },\r\n closeDialog: function () {\r\n this.dialogVisible = false\r\n this.needSetArr = [\r\n {\r\n type: 'org',\r\n title: '组织',\r\n id: '',\r\n name: '',\r\n },\r\n {\r\n type: 'role',\r\n title: '角色',\r\n id: '',\r\n name: '',\r\n },\r\n {\r\n type: 'user',\r\n title: '用户',\r\n id: '',\r\n name: '',\r\n }\r\n ];\r\n this.needSetArr = [{\r\n title: \"所有人\",\r\n type: \"everyone\",\r\n checked: false,\r\n },{\r\n title: \"其他\",\r\n type: \"otherAuth\",\r\n checked: true,\r\n }]\r\n },\r\n handleClose: function () {\r\n let rtn = []\r\n let isOtherAuth = false\r\n for (let i = 0; i < this.noNeedSetArr.length; i++) {\r\n let obj = this.noNeedSetArr[i]\r\n if (obj.checked && obj.type != 'otherAuth') {\r\n rtn.push(obj)\r\n this.$emit('onConfirm', rtn, this.name, 2)\r\n this.dialogVisible = false\r\n return rtn\r\n }\r\n if (obj.checked && obj.type == 'otherAuth') {\r\n isOtherAuth = true\r\n }\r\n }\r\n let setting = this.needSetArr\r\n for (let i = 0; i < setting.length; i++) {\r\n let obj = setting[i]\r\n //设置了值。\r\n if (obj.id) {\r\n rtn.push(obj)\r\n }\r\n }\r\n if (isOtherAuth && rtn.length < 1) {\r\n this.$message({type: 'warning', message: '请添加具体权限信息!'})\r\n return false\r\n }\r\n this.$emit('onConfirm', rtn, this.name, 2)\r\n if (this.autoClose) {\r\n this.dialogVisible = false\r\n }\r\n },\r\n checkNoSetting(item) {\r\n var noNeedChecked = false\r\n for (var i = 0; i < this.noNeedSetArr.length; i++) {\r\n var obj = this.noNeedSetArr[i]\r\n if (item.checked) {\r\n if (obj != item) {\r\n obj.checked = false\r\n }\r\n if (item.title == '其他') {\r\n noNeedChecked = true\r\n }\r\n }\r\n }\r\n this.showNeedRight = noNeedChecked\r\n this.$forceUpdate()\r\n },\r\n },\r\n}\r\n",null]}