{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\ReportLine.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\ReportLine.vue","mtime":1675071993288},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\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\r\nimport portalApi from \"@/api/portal.js\";\r\nimport ucApi from \"@/api/uc.js\";\r\n\r\nconst reportLineAsideTree = () =>\r\n import(\"@/views/uc/reportlinetree/ReportLineAsideTree.vue\");\r\nconst htAsideTree = () => import(\"@/components/common/HtAsideTree.vue\");\r\nconst eipUserDialog = () => import(\"@/components/dialog/EipUserDialog.vue\");\r\nconst eipOrgDialog = () => import(\"@/components/dialog/EipOrgDialog.vue\");\r\nconst eipPostDialog = () => import(\"@/components/dialog/EipPostDialog.vue\");\r\nconst eipRoleDialog = () => import(\"@/components/dialog/EipRoleDialog.vue\");\r\nexport default {\r\n components: {\r\n reportLineAsideTree,\r\n htAsideTree,\r\n eipUserDialog,\r\n eipOrgDialog,\r\n eipPostDialog,\r\n eipRoleDialog,\r\n },\r\n data() {\r\n return {\r\n catId: \"\",\r\n options: [],\r\n typeId: \"\",\r\n isLineTreeShow: false,\r\n isReportLineFormShow: false,\r\n param: {\r\n //记录请求参数\r\n type: \"user\", // 用户组类型\r\n value: \"\",\r\n parentAlias: \"\",\r\n alias: \"\"\r\n },\r\n userType: [\r\n { key: \"user\", value: \"用户\" },\r\n { key: \"org\", value: \"组织\" },\r\n { key: \"pos\", value: \"岗位\" },\r\n { key: \"role\", value: \"角色\" }\r\n ],\r\n formType: \"add\",\r\n selectName: \"\"\r\n };\r\n },\r\n computed: {},\r\n mounted() {\r\n // this.handleSelectOptions();\r\n },\r\n watch: {\r\n \"param.type\": function(newVal, oldVal) {\r\n if (newVal && newVal != oldVal && !this.isEditFirstChange) {\r\n this.param.value = \"\";\r\n this.param.alias = \"\";\r\n this.$set(this, \"selectName\", \"\");\r\n } else {\r\n this.isEditFirstChange = false;\r\n }\r\n }\r\n },\r\n methods: {\r\n handleNodeClick(data) {\r\n if (data.parentId == 0) {\r\n this.$message.warning(\"请选择具体的汇报线分类\");\r\n return;\r\n }\r\n this.isLineTreeShow = true;\r\n this.isReportLineFormShow = false;\r\n this.typeId = data.id;\r\n },\r\n handleLineAsideNodeClick(node){\r\n this.isReportLineFormShow = false;\r\n },\r\n select() {\r\n if (this.param.type === \"user\") {\r\n this.$refs.eipUserDialog.showDialog();\r\n } else if (this.param.type === \"pos\") {\r\n this.$refs.eipPostDialog.showDialog();\r\n } else if (this.param.type === \"org\") {\r\n this.$refs.eipOrgDialog.showDialog();\r\n } else if (this.param.type === \"role\") {\r\n this.$refs.eipRoleDialog.showDialog();\r\n }\r\n },\r\n selectUser(data) {\r\n this.param.value = data[0].id;\r\n this.param.alias = data[0].account;\r\n this.selectName = data[0].fullname;\r\n },\r\n selectOrg(data) {\r\n this.param.value = data[0].id;\r\n this.param.alias = data[0].code;\r\n this.selectName = data[0].name;\r\n },\r\n selectPost(data) {\r\n this.param.value = data[0].id;\r\n this.param.alias = data[0].code;\r\n this.selectName = data[0].name;\r\n },\r\n selectRole(data) {\r\n this.param.value = data[0].id;\r\n this.param.alias = data[0].code;\r\n this.selectName = data[0].name;\r\n },\r\n showReportLineForm(data, id, type){\r\n if (type === \"edit\") {\r\n this.formType = \"edit\";\r\n this.param.alias = data.alias;\r\n this.param.id = data.id;\r\n this.param.value = data.id;\r\n this.selectName = data.name;\r\n this.param.parentAlias = id;\r\n if (this.param.type != data.groupType) {\r\n this.param.type = data.groupType;\r\n this.isEditFirstChange = true;\r\n }\r\n } else {\r\n this.selectName = \"\";\r\n this.param = { parentAlias: data.alias, type: \"user\" };\r\n this.formType = \"add\";\r\n }\r\n this.isReportLineFormShow = true;\r\n },\r\n submit(){\r\n // 汇报线表单提交\r\n if (this.formType === \"add\") {\r\n ucApi.addUserRel([this.param]).then(resp => {\r\n this.$message({\r\n message: \"新增成功\",\r\n type: \"success\"\r\n });\r\n this.$refs.reportLineAsideTree.$refs.htSysTypeTree.loadData();\r\n });\r\n } else if (this.formType === \"edit\") {\r\n ucApi.updateUserRel(this.param).then(resp => {\r\n this.$message({\r\n message: \"修改成功\",\r\n type: \"success\"\r\n });\r\n\r\n this.$refs.reportLineAsideTree.$refs.htSysTypeTree.loadData();\r\n });\r\n }\r\n this.selectName = \"\"; //保存成功清楚数据\r\n },\r\n distributionAdmin(){\r\n this.$refs.reportLineAsideTree.distributionAdmin(this.param.alias);\r\n }\r\n },\r\n};\r\n",null]}