{"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\\SelectTypeDialog.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\dialog\\SelectTypeDialog.vue","mtime":1667327529200},{"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\r\nimport utils from '@/hotent-ui-util.js'\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: {\r\n        selectType: {\r\n            type: Array,\r\n            required: false,\r\n            default: () => ['org', 'role', 'pos', 'user'],\r\n        },\r\n    },\r\n    data() {\r\n        return {\r\n            dialogVisible: false,\r\n            noNeedSetArr: [],\r\n            selectItems: [],\r\n            right: '',\r\n            permissionList: [],\r\n            curSelectItem: {},\r\n            autoClose: true,\r\n            showNeedRight: '',\r\n        }\r\n    },\r\n    computed: {\r\n        selectOptions: {\r\n            set(newValue) {\r\n                this.selectItems = newValue\r\n            },\r\n            get() {\r\n                let temp = []\r\n                this.selectType.forEach((item) => {\r\n                    if (item == 'org') {\r\n                        temp.push({\r\n                            type: 'org',\r\n                            title: '组织',\r\n                            name: '',\r\n                            codes: '',\r\n                        })\r\n                    } else if (item == 'role') {\r\n                        temp.push({\r\n                            type: 'role',\r\n                            title: '角色',\r\n                            name: '',\r\n                            codes: '',\r\n                        })\r\n                    } else if (item == 'pos') {\r\n                        temp.push({\r\n                            type: 'pos',\r\n                            title: '岗位',\r\n                            name: '',\r\n                            codes: '',\r\n                        })\r\n                    } else if (item == 'user') {\r\n                        temp.push({\r\n                            type: 'user',\r\n                            title: '用户',\r\n                            name: '',\r\n                            codes: '',\r\n                        })\r\n                    }\r\n                })\r\n                return temp\r\n            },\r\n        },\r\n    },\r\n    mounted() {\r\n        this.selectItems = this.selectOptions\r\n    },\r\n    methods: {\r\n        showDialog(row) {\r\n            this.dialogVisible = true\r\n            if (row && row.json) {\r\n                let rowData = JSON.parse(row.json)\r\n                let temp = utils.deepClone(this.selectOptions);\r\n                temp.forEach((options) => {\r\n                    rowData.forEach((item) => {\r\n                        if (options.type == item.type) {\r\n                            options.codes = item.codes?item.codes:item.code\r\n                            options.name = item.name\r\n                        }\r\n                    })\r\n                })\r\n                this.selectItems = temp\r\n            }else{\r\n                this.selectItems = utils.deepClone(this.selectOptions);\r\n            }\r\n        },\r\n        closeDialog() {\r\n            this.dialogVisible = false\r\n            this.selectItems = utils.deepClone(this.selectOptions);\r\n        },\r\n        handleClose() {\r\n            let jsonParams = []\r\n            if (this.selectItems.length) {\r\n                this.selectItems.forEach((item) => {\r\n                    if (item.codes) {\r\n                        jsonParams.push({\r\n                            codes: item.codes,\r\n                            name: item.name,\r\n                            type: item.type,\r\n                        })\r\n                    }\r\n                })\r\n            }\r\n            this.$emit('select', jsonParams)\r\n            this.selectItems = utils.deepClone(this.selectOptions);\r\n        },\r\n        updateSelectItems(index) {\r\n            this.selectItems[index].codes = ''\r\n            this.selectItems[index].name = ''\r\n        },\r\n    },\r\n}\r\n",null]}