{"remainingRequest":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\vue-loader\\lib\\index.js??vue-loader-options!D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\eipControl\\EipRelFlow.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\cssc-fvue\\src\\components\\eipControl\\EipRelFlow.vue","mtime":1667804639071},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\babel-loader\\lib\\index.js","mtime":315532800000},{"path":"D:\\jenkins\\workspace\\cssc-fvue\\node_modules\\cache-loader\\dist\\cjs.js","mtime":499162500000},{"path":"D:\\jenkins\\workspace\\cssc-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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 { mapState, mapActions } from \"vuex\";\r\nimport utils from \"@/utils.js\";\r\nimport sub_pio_mixin from \"@/sub-permission-mixin.js\";\r\nimport hotentUiUtils from '@/hotent-ui-util.js';\r\n\r\nexport default {\r\n name: \"eip-rel-flow\",\r\n props: [\"modelName\", \"validate\", \"permission\",\"searchConfig\",\"value\"],\r\n components: {},\r\n mixins: [sub_pio_mixin],//混入方式引入表单组件中公共属性,处理子表、孙表行内联动(切面修改permission_sub)\r\n data() {\r\n return {\r\n relatedInformationDialog: false,\r\n checked: true,\r\n subject: \"\",\r\n inputVal:\"\",\r\n createTime: \"\",\r\n checkBoxData: [],\r\n checkBoxDataAll: [],\r\n dataTable: [],\r\n writeable:true,\r\n };\r\n },\r\n watch: {\r\n inputVal: function(newVal, oldVal) {\r\n this.$emit(\"input\", newVal);\r\n }\r\n },\r\n computed: mapState({\r\n rows: state => state.relatedProcess.rows,\r\n pagination: state => state.relatedProcess.pagination,\r\n total: state => state.relatedProcess.total,\r\n relatedInformation: state => state.relatedProcess.relatedInformation,\r\n inputWriteable: function() {\r\n if (!this.writeable) {\r\n return this.writeable;\r\n }\r\n return utils.getWriteable(this.permission_sub);\r\n },\r\n inputName: function() {\r\n let labeldesc = \"\";\r\n if (\r\n this.$slots &&\r\n this.$slots.labeldesc &&\r\n this.$slots.labeldesc[0].children &&\r\n this.$slots.labeldesc[0].children[0].text\r\n ) {\r\n labeldesc = this.$slots.labeldesc[0].children[0].text;\r\n return this.name ? this.name : utils.getName() + \"-\" + labeldesc;\r\n } else {\r\n return this.name ? this.name : utils.getName();\r\n }\r\n },\r\n inputValidate: function() {\r\n return utils.addRequiredOrNot(this.permission, this.validate, this);\r\n }\r\n }),\r\n methods: {\r\n cancel() {\r\n this.relatedInformationDialog = false;\r\n },\r\n //确认\r\n confirm() {\r\n const _me = this;\r\n this.checkBoxData.forEach(row => {\r\n let res=_me.indexArray(_me.checkBoxDataAll,row);\r\n if(res==-1){\r\n _me.checkBoxDataAll.push(row);\r\n }\r\n });\r\n this.dataTable = this.checkBoxDataAll;\r\n this.relatedInformationDialog = false;\r\n if (this.modelName) {\r\n // const pInst = utils.getOnlineFormInstance(_me);\r\n // utils.setValueByPath(pInst, this.modelName, JSON.stringify(this.dataTable));\r\n this.inputVal= JSON.stringify(this.dataTable);\r\n }\r\n },\r\n handleChecked(value) {\r\n this.checkBoxData = value;\r\n },\r\n handleSizeChange: function(size) {\r\n //每页下拉显示数据\r\n this.$store.dispatch(\"relatedProcess/setPaginationSize\", size);\r\n this.search();\r\n },\r\n handleCurrentChange: function(currentPage) {\r\n const this_ = this;\r\n if(this.checkBoxData!=undefined&&this.checkBoxData.length>0){\r\n this.checkBoxData.forEach(row => {\r\n let res=this_.indexArray(this_.checkBoxDataAll,row);\r\n if(res==-1){\r\n this_.checkBoxDataAll.push(row);\r\n }\r\n });\r\n }\r\n this_.checkBoxData=this_.checkBoxDataAll;\r\n //点击第几页\r\n this.$store.dispatch(\"relatedProcess/setPaginationPageNum\", currentPage);\r\n this.search();\r\n },\r\n RowClick(row, column, event) {\r\n this.$refs.flowTable.toggleRowSelection(row);\r\n },\r\n check() {\r\n const this_ = this;\r\n setTimeout(() => {\r\n if(this_.checkBoxData==undefined || this_.checkBoxData.length==0){\r\n this_.checkBoxData=this_.checkBoxDataAll;\r\n }\r\n this_.checkBoxData.forEach(row => {\r\n let res=this_.indexArray(this_.rows,row);\r\n if(res!=-1){\r\n this_.$refs.flowTable.toggleRowSelection(this_.rows[res]);\r\n }\r\n });\r\n }, 250);\r\n },\r\n onTableSelect(rows, row){\r\n let selected = rows.length && rows.indexOf(row) !== -1\r\n if(!selected){\r\n let res=this.indexArray(this.checkBoxDataAll,row);\r\n this.checkBoxDataAll.splice(res, 1);\r\n if(this.checkBoxDataAll.length==0){\r\n this.checkBoxData=[];\r\n }\r\n }\r\n },\r\n search() {\r\n let querys = []; //查询条件\r\n let queryFilter = {};\r\n ;\r\n let pageBean = { pageBean: this.pagination };\r\n if (this.subject != \"\") {\r\n querys.push({\r\n property: \"SUBJECT_\",\r\n value: this.subject,\r\n group: \"main\",\r\n operation: \"LIKE\",\r\n relation: \"AND\"\r\n });\r\n }\r\n if (this.createTime != \"\") {\r\n querys.push({\r\n property: \"CREATE_TIME_\",\r\n value: utils.formatDateYear(this.createTime),\r\n group: \"main\",\r\n operation: \"LIKE\",\r\n relation: \"AND\"\r\n });\r\n }\r\n if (querys.length > 0) {\r\n if(this.searchConfig.isPaging){\r\n queryFilter = { pageBean: { page: \"1\", pageSize: this.searchConfig.pageSize, showTotal: \"true\" }, querys };\r\n }else{\r\n queryFilter = {pageBean:{}};\r\n }\r\n this.$store.dispatch(\"relatedProcess/getlistJson\", queryFilter);\r\n } else {\r\n this.$store.dispatch(\"relatedProcess/getlistJson\", pageBean);\r\n }\r\n this.check();\r\n },\r\n flowSelected: function() {\r\n if(this.checkBoxData==undefined||this.checkBoxData.length==0){\r\n this.checkBoxData=this.dataTable;\r\n }\r\n this.relatedInformationDialog = true;\r\n var pageBean={};\r\n if(this.searchConfig.isPaging){\r\n pageBean={ page: 1, pageSize: this.searchConfig.pageSize, showTotal: true };\r\n }\r\n let pagination = { pageBean: pageBean};\r\n this.$store.dispatch(\"relatedProcess/getlistJson\", pagination);\r\n setTimeout(() => {\r\n this.check()\r\n },500);\r\n\r\n }, //重置\r\n reset() {\r\n this.subject = \"\";\r\n this.createTime = \"\";\r\n this.search();\r\n },\r\n remove(row) {\r\n this.dataTable.remove(row);\r\n if (this.modelName) {\r\n // const pInst = utils.getOnlineFormInstance(this);\r\n // utils.setValueByPath(pInst, this.modelName, JSON.stringify(this.dataTable));\r\n if(this.dataTable.length<1){\r\n this.inputVal= \"\";\r\n }else{\r\n this.inputVal= JSON.stringify(this.dataTable);\r\n }\r\n }\r\n }, //上移按钮\r\n up(idx) {\r\n idx = Number.parseInt(idx);\r\n if (idx < 1) {\r\n return;\r\n }\r\n var t = this.dataTable[idx - 1];\r\n this.$set(this.dataTable,idx-1,this.dataTable[idx])\r\n this.$set(this.dataTable,idx,t)\r\n if (this.modelName) {\r\n // const pInst = utils.getOnlineFormInstance(this);\r\n // utils.setValueByPath(pInst, this.modelName, JSON.stringify(this.dataTable));\r\n this.inputVal= JSON.stringify(this.dataTable);\r\n }\r\n\r\n },\r\n //下移按钮\r\n down(idx) {\r\n idx = Number.parseInt(idx);\r\n if (idx >= this.dataTable.length - 1) {\r\n return;\r\n }\r\n\r\n var t = this.dataTable[idx + 1];\r\n this.$set(this.dataTable,idx+1,this.dataTable[idx])\r\n this.$set(this.dataTable,idx,t)\r\n\r\n if (this.modelName) {\r\n // const pInst = utils.getOnlineFormInstance(this);\r\n // utils.setValueByPath(pInst, this.modelName, JSON.stringify(this.dataTable));\r\n this.inputVal= JSON.stringify(this.dataTable);\r\n }\r\n },\r\n handleRowClick(row) {\r\n window.open(this.$router.resolve(\"/inst/\" + row.id).href, \"_blank\");\r\n },\r\n //去重json数组重复数据\r\n uniqueArray(array, key) {\r\n var result = [array[0]];\r\n for (var i = 1; i < array.length; i++) {\r\n var item = array[i];\r\n var repeat = false;\r\n for (var j = 0; j < result.length; j++) {\r\n if (item[key] == result[j][key]) {\r\n repeat = true;\r\n break;\r\n }\r\n }\r\n if (!repeat) {\r\n result.push(item);\r\n }\r\n }\r\n return result;\r\n },\r\n indexArray(array, item) {\r\n for (var i = 0; i < array.length; i++) {\r\n if(array[i].id==item.id){\r\n return i;\r\n }\r\n }\r\n return -1;\r\n }\r\n },\r\n\r\n created() {\r\n this.$validator = this.$root.$validator;\r\n },\r\n mounted() {\r\n const _me = this;\r\n if (this.modelName) {\r\n // const pInst = utils.getOnlineFormInstance(_me);\r\n // const oldVal = utils.getValueByPath(pInst, this.modelName);\r\n if (this.value) {\r\n this.dataTable = JSON.parse(this.value);\r\n }\r\n }\r\n const { subScopeEl, index } = hotentUiUtils.getSubScopeElAndIndex(this.$el);\r\n if (subScopeEl && (subScopeEl.getAttribute(\"row_readonly\") == 'true' || subScopeEl.getAttribute(\"row_readonly\") === true)) {\r\n this.writeable = false;\r\n }\r\n }\r\n};\r\n",null]}