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