{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!D:\\jenkins\\workspace\\xq-web-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\secretary\\secretaryEdit.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\src\\components\\secretary\\secretaryEdit.vue","mtime":1667327529653},{"path":"D:\\jenkins\\workspace\\xq-web-fvue\\babel.config.js","mtime":1667327525434},{"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\\thread-loader\\dist\\cjs.js","mtime":499162500000},{"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":["import \"core-js/modules/es6.regexp.split\";\nimport \"core-js/modules/es6.regexp.search\";\nimport \"core-js/modules/es6.function.name\";\nimport \"core-js/modules/web.dom.iterable\";\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState, mapActions } from \"vuex\";\nimport utils from \"@/utils.js\";\nimport { Message } from \"element-ui\";\nimport HtUserSelector from \"@/components/control/HtUserSelector.vue\";\nimport eipFlowDialog from \"@/components/dialog/EipFlowDialog.vue\";\n\nvar eipSysTypeDialog = function eipSysTypeDialog() {\n return import(\"@/components/dialog/EipSysTypeDialog.vue\");\n};\n\nexport default {\n name: \"agentEdit\",\n props: [\"id\"],\n data: function data() {\n return {\n rules: {\n authNames: [{\n required: true,\n message: \"请选择秘书\",\n trigger: \"blur\"\n }],\n shareRight: [{\n required: true,\n message: \"请选择共享权限\",\n trigger: \"change\"\n }],\n isEnabled: [{\n required: true,\n message: \"请选择是否有效\",\n trigger: \"blur\"\n }],\n shareFlow: [{\n required: true,\n message: \"请选择共享流程\",\n trigger: \"change\"\n }]\n },\n flowSelectedDialogVisible: false,\n flowTypeSelectedDialogVisible: false,\n selectFlowProps: {\n label: \"name\"\n },\n selectFlows: null,\n selectFlowsList: null,\n tableData: \"\",\n treeList: [],\n selectUsers: [],\n entityList: [],\n secretary: {\n shareType: 1,\n enabled: 1\n },\n flowTypeList: []\n };\n },\n components: {\n HtUserSelector: HtUserSelector,\n eipFlowDialog: eipFlowDialog,\n eipSysTypeDialog: eipSysTypeDialog\n },\n computed: mapState({\n form: function form(state) {\n return state.agent.form;\n },\n flowRows: function flowRows(state) {\n return state.agent.rows;\n },\n pagination: function pagination(state) {\n return state.agent.pagination;\n },\n total: function total(state) {\n return state.agent.total;\n },\n currentUserDetail: function currentUserDetail(state) {\n return state.user.currentUserDetail;\n }\n }),\n methods: {\n back: function back() {\n this.$router.go(-1); //返回上一层\n },\n submitForm: function submitForm(form) {\n var _this = this;\n\n this.$refs[form].validate(function (valid) {\n if (valid) {\n if (_this.selectUsers.length > 0) {\n _this.secretary.secretaryId = '';\n _this.secretary.secretaryName = '';\n\n _this.selectUsers.forEach(function (item) {\n _this.secretary.secretaryId = _this.secretary.secretaryId + ',' + item.id;\n _this.secretary.secretaryName = _this.secretary.secretaryName + ',' + item.fullname;\n });\n\n _this.secretary.secretaryId = _this.secretary.secretaryId + ',';\n _this.secretary.secretaryName = _this.secretary.secretaryName.substring(1);\n } else {\n Message.warning(\"请选择秘书\");\n return;\n }\n\n for (var i = 0; i < _this.selectUsers.length; i++) {\n if (_this.selectUsers[i].fullname == _this.currentUserDetail.user.fullname) {\n _this.$message.warning(\"不能指定自己为秘书\");\n\n return false;\n }\n }\n\n if (!_this.secretary.shareRight) {\n Message.warning(\"请选择要要共享的权限\");\n return;\n }\n\n if (_this.entityList.length < 1) {\n Message.warning(\"请选择要委托的流程\" + (_this.secretary.shareType == 1 ? '定义' : '分类'));\n return;\n } else {\n _this.secretary.shareKey = '';\n _this.secretary.shareName = '';\n\n _this.entityList.forEach(function (item) {\n _this.secretary.shareKey = _this.secretary.shareKey + ',' + item.key;\n _this.secretary.shareName = _this.secretary.shareName + ',' + item.name;\n });\n\n _this.secretary.shareKey = _this.secretary.shareKey.substring(1);\n _this.secretary.shareName = _this.secretary.shareName.substring(1);\n }\n\n _this.$store.dispatch(\"agent/secretarySave\", _this.secretary).then(function (res) {\n _this.$message({\n type: \"success\",\n message: _this.id && _this.id != 0 ? \"更新秘书信息成功!\" : \"添加秘书成功\"\n });\n\n _this.$router.go(-1);\n });\n } else {\n return false;\n }\n });\n },\n orgRowClick: function orgRowClick(row, column, event) {\n this.$refs.flowTable.toggleRowSelection(row);\n },\n flowTableSelection: function flowTableSelection(selection) {\n this.selectFlows = selection;\n },\n dialogConfirm: function dialogConfirm() {\n var _this2 = this;\n\n this.flowSelectedDialogVisible = false;\n\n if (this.selectFlows) {\n var selectKeys = [];\n this.entityList.forEach(function (item) {\n selectKeys.push(item.key);\n });\n this.selectFlows.forEach(function (item) {\n if (selectKeys.indexOf(item.defKey) < 0) {\n _this2.entityList.push({\n key: item.defKey,\n name: item.name\n });\n }\n });\n }\n },\n typeDialogConfirm: function typeDialogConfirm() {\n var _this3 = this;\n\n this.flowTypeSelectedDialogVisible = false;\n\n if (this.$refs.typeSelectTree.getCheckedNodes()) {\n var selectKeys = [];\n this.entityList.forEach(function (item) {\n selectKeys.push(item.key);\n });\n this.$refs.typeSelectTree.getCheckedNodes().forEach(function (item) {\n if (selectKeys.indexOf(item.id) < 0) {\n _this3.entityList.push({\n key: item.id,\n name: item.name\n });\n }\n });\n }\n },\n remove: function remove(row) {\n this.entityList.remove(row);\n },\n cancel: function cancel() {\n this.flowSelectedDialogVisible = false;\n this.flowTypeSelectedDialogVisible = false;\n this.$refs.flowTable.clearSelection();\n },\n orgTreeClick: function orgTreeClick(row, column, event) {\n this.treeList.push(row);\n },\n removeselectFlows: function removeselectFlows() {\n var _this4 = this;\n\n if (this.treeList.length > 0) {\n this.treeList.forEach(function (item) {\n _this4.selectFlows.remove(item);\n\n _this4.$refs.flowTable.toggleRowSelection(item, false);\n });\n }\n },\n clearAllselectFlows: function clearAllselectFlows() {\n this.$refs.flowTable.clearSelection();\n this.selectFlows = null;\n },\n handleSizeChange: function handleSizeChange(size) {\n //每页下拉显示数据\n this.$store.dispatch(\"agent/setPaginationSize\", size);\n this.search();\n },\n handleCurrentChange: function handleCurrentChange(currentPage) {\n //点击第几页\n this.$store.dispatch(\"agent/setPaginationPageNum\", currentPage);\n this.search();\n },\n // 查询\n search: function search(str) {\n var querys = []; //查询条件\n\n var queryFilter = {};\n var pageBean = {\n pageBean: this.pagination\n };\n\n if (!this.tableData) {\n this.$store.dispatch(\"agent/getDeflistJson\", pageBean);\n } else {\n querys = [{\n property: \"name\",\n value: this.tableData,\n group: \"main\",\n operation: \"LIKE\",\n relation: \"OR\"\n }, {\n property: \"defKey\",\n value: this.tableData,\n group: \"main\",\n operation: \"LIKE\",\n relation: \"OR\"\n }];\n }\n\n queryFilter = {\n pageBean: this.pagination,\n querys: querys\n };\n this.$store.dispatch(\"agent/getDeflistJson\", queryFilter);\n },\n showDialog: function showDialog() {\n var type = 'flowTypeDialog';\n\n if (this.secretary.shareType == 1) {\n type = 'eipFlowDialog';\n }\n\n this.$refs[type].showDialog();\n },\n dialogOnConfirm: function dialogOnConfirm(data) {\n for (var i = 0; i < data.length; i++) {\n this.entityList.push({\n key: data[i].defKey,\n name: data[i].name\n });\n }\n\n this.entityList = this.entityList.unique(\"key\");\n },\n sysTypeDialogOnConfirm: function sysTypeDialogOnConfirm(data) {\n for (var i = 0; i < data.length; i++) {\n this.entityList.push({\n key: data[i].id,\n name: data[i].name\n });\n }\n\n this.entityList = this.entityList.unique(\"key\");\n }\n },\n created: function created() {\n var this_ = this;\n\n if (this.id && this.id != 0) {\n this.$store.dispatch(\"agent/secretaryDetail\", this.id).then(function (data) {\n var userIds = data.secretaryId.substring(1).split(',');\n var userNames = data.secretaryName.split(',');\n\n for (var i = 0; i < userIds.length; i++) {\n if (userIds[i]) {\n this_.selectUsers.push({\n id: userIds[i],\n fullname: userNames[i]\n });\n }\n }\n\n var entids = data.shareKey.split(',');\n var entNames = data.shareName.split(',');\n\n for (var i = 0; i < entids.length; i++) {\n if (entids[i]) {\n this_.entityList.push({\n key: entids[i],\n name: entNames[i]\n });\n }\n }\n\n this_.secretary = data;\n });\n }\n\n ;\n this.$store.dispatch(\"agent/getTypeByGroupKey\", 'FLOW_TYPE').then(function (data) {\n data[0].disabled = true;\n this_.flowTypeList = data;\n });\n }\n};",null]}