{"remainingRequest":"D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\thread-loader\\dist\\cjs.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\babel-loader\\lib\\index.js!D:\\jenkins\\workspace\\xq-web-bpm\\node_modules\\cache-loader\\dist\\cjs.js??ref--0-0!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\\MatrixManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\uc\\MatrixManager.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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\nvar htAsideTree = function htAsideTree() {\n  return import(\"@/components/common/HtAsideTree.vue\");\n};\n\nvar EipSysTypeSelector = function EipSysTypeSelector() {\n  return import(\"@/components/selector/EipSysTypeSelector.vue\");\n};\n\nvar eipUserDialog = function eipUserDialog() {\n  return import(\"@/components/dialog/EipUserDialog.vue\");\n};\n\nimport req from \"@/request.js\";\nimport uc from \"@/api/uc.js\";\nexport default {\n  components: {\n    htAsideTree: htAsideTree,\n    EipSysTypeSelector: EipSysTypeSelector,\n    eipUserDialog: eipUserDialog\n  },\n  data: function data() {\n    return {\n      dialogVisible: false,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 20,\n        total: 0\n      },\n      matrixBlank: {\n        code: \"\",\n        name: \"\",\n        condList: [{\n          code: \"\",\n          name: \"\",\n          ctrlType: \"\",\n          queryAlias: \"\",\n          bindKey: \"\",\n          bindValue: \"\"\n        }],\n        roleList: [{\n          code: \"\",\n          name: \"\",\n          selectType: 1\n        }]\n      },\n      matrix: {},\n      treeSidebarData: {},\n      tabStatus: \"cond\",\n      customQuerys: [],\n      customDialogs: [],\n      //对话框列表数据\n      isSubmit: true,\n      typeId: \"\",\n      defaultQuerys: []\n    };\n  },\n  mounted: function mounted() {\n    this.$validator = this.$root.$validator;\n  },\n  methods: {\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    handleCommand: function handleCommand(param) {\n      switch (param.action) {\n        case \"toDataList\":\n          this.toDataList(param.row);\n          break;\n\n        case \"publish\":\n          this.publish(param.row.id);\n          break;\n\n        case \"setManager\":\n          this.setManager(param.row.id);\n          break;\n      }\n    },\n    setManager: function setManager(id) {\n      this.curId = id;\n      this.$refs.eipUserDialog.showDialog({});\n    },\n    saveManager: function saveManager(data) {\n      var _this = this;\n\n      if (data.length == 0 || data.length > 1) {\n        this.$message.warning(\"请选择一个用户\");\n        return;\n      }\n\n      data = data[0];\n      var id = this.curId;\n      req.get(window.context.uc + \"/uc/matrix/v1/saveManager?id=\".concat(id, \"&userId=\").concat(data.id, \"&fullname=\").concat(data.fullname)).then(function (res) {\n        if (res.data.state) {\n          _this.$message.success(res.data.message);\n\n          _this.$refs.htTable.load();\n        }\n      });\n    },\n    publish: function publish(id) {\n      var _this2 = this;\n\n      req.get(window.context.uc + \"/uc/matrix/v1/publish?id=\".concat(id)).then(function (res) {\n        if (res.data.state) {\n          _this2.$message.success(res.data.message);\n\n          _this2.$refs.htTable.load();\n        }\n      });\n    },\n    upGo: function upGo(fieldData, index) {\n      if (index != 0) {\n        fieldData[index] = fieldData.splice(index - 1, 1, fieldData[index])[0];\n      } else {\n        fieldData.push(fieldData.shift());\n      }\n    },\n    downGo: function downGo(fieldData, index) {\n      if (index != fieldData.length - 1) {\n        fieldData[index] = fieldData.splice(index + 1, 1, fieldData[index])[0];\n      } else {\n        fieldData.unshift(fieldData.splice(index, 1)[0]);\n      }\n    },\n    chineseFormat: function chineseFormat(list, chinese, prop, index) {\n      //如果保存过的则不允许修改code\n      if (list[index].id) {\n        return;\n      }\n\n      var timer = null;\n\n      if (timer) {\n        clearTimeout(timer);\n      }\n\n      timer = setTimeout(function () {\n        req.request({\n          url: \"\".concat(window.context.uc, \"/base/tools/v1/getPinyin\"),\n          method: \"GET\",\n          params: {\n            chinese: chinese,\n            type: 0\n          }\n        }).then(function (res) {\n          if (res.data.state) {\n            list[index][prop] = res.data.value;\n          }\n        });\n      }, 500);\n    },\n    deleteCol: function deleteCol(list, index) {\n      list.splice(index, 1);\n    },\n    addCol: function addCol(list, index) {\n      list.push({\n        code: \"\",\n        name: \"\",\n        ctrlType: \"\",\n        queryAlias: \"\",\n        bindKey: \"\",\n        bindValue: \"\",\n        selectType: 1\n      });\n    },\n    handleNodeClick: function handleNodeClick(item) {\n      if (item.parentId != 0) {\n        this.$set(this.defaultQuerys, 0, {\n          property: \"type_id_\",\n          value: item.id,\n          operation: \"EQUAL\"\n        });\n      } else {\n        //清空旧的查询值\n        this.defaultQuerys.splice(0);\n      }\n\n      this.$refs.htTable.load();\n    },\n    treeCheck: function treeCheck(item, list) {\n      if (list && list.checkedKeys && list.checkedKeys.length > 0) {\n        this.$set(this.defaultQuerys, 0, {\n          property: \"type_id_\",\n          value: list.checkedKeys.join(\",\"),\n          operation: \"IN\"\n        });\n        this.$refs.htTable.load();\n      }\n    },\n    close: function close() {\n      this.dialogVisible = false;\n    },\n    showDialog: function showDialog(id) {\n      var _this3 = this;\n\n      if (id) {\n        this.$http.get(\"${uc}/uc/matrix/v1/getJson?id=\" + \"\".concat(id)).then(function (resp) {\n          _this3.matrix = resp.data;\n          _this3.dialogVisible = true;\n        }, function (error) {\n          reject(error);\n        });\n      } else {\n        this.matrix = JSON.parse(JSON.stringify(this.matrixBlank)); //this.matrix = this.matrixBlank;\n\n        this.dialogVisible = true;\n      }\n    },\n    beforeCloseDialog: function beforeCloseDialog() {\n      this.matrix = JSON.parse(JSON.stringify(this.matrixBlank)); // this.matrix = this.matrixBlank;\n\n      this.dialogVisible = false;\n    },\n    loadData: function loadData(param, cb) {\n      var _this4 = this;\n\n      param.querys || (param.querys = []);\n      param.querys.push({\n        property: \"isDele\",\n        value: 0,\n        operation: \"EQUAL\"\n      });\n      this.$http.post(\"${uc}/uc/matrix/v1/listJson\", param).then(function (resp) {\n        var response = resp.data;\n        _this4.data = response.rows;\n        _this4.pageResult = {\n          page: response.page,\n          pageSize: response.pageSize,\n          total: response.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    beforeSaveData: function beforeSaveData() {\n      this.isSubmit = true;\n\n      if (!this.matrix.condList || this.matrix.condList.length == 0) {\n        this.isSubmit = false;\n        this.$message.error(\"请填写字段名\");\n      }\n\n      if (this.matrix.condList && this.matrix.condList.length > 0) {\n        var code = this.checkPropIsRepeat(this.matrix.condList, \"code\");\n\n        if (code) {\n          this.isSubmit = false;\n          this.tabStatus = \"cond\";\n          this.$message.error(\"\\u5217\\u5B57\\u6BB5\\u540D[\".concat(code, \"]\\u91CD\\u590D\"));\n        }\n      }\n\n      if (!this.matrix.roleList || this.matrix.roleList.length == 0) {\n        this.isSubmit = false;\n        this.$message.error(\"请填写角色字段\");\n      }\n\n      if (this.matrix.roleList && this.matrix.roleList.length > 0) {\n        var _code = this.checkPropIsRepeat(this.matrix.roleList, \"code\");\n\n        if (_code) {\n          this.isSubmit = false;\n          this.tabStatus = \"role\";\n          this.$message.error(\"\\u89D2\\u8272\\u522B\\u540D[\".concat(_code, \"]\\u91CD\\u590D\"));\n        }\n      }\n    },\n    checkPropIsRepeat: function checkPropIsRepeat(arr, key) {\n      var obj = {};\n\n      for (var i = 0; i < arr.length; i++) {\n        var code = arr[i][key].toLowerCase();\n\n        if (obj[code]) {\n          return arr[i][key];\n        } else {\n          obj[code] = arr[i];\n        }\n      }\n\n      return \"\";\n    },\n    afterSaveData: function afterSaveData() {\n      var _this5 = this;\n\n      setTimeout(function () {\n        _this5.beforeCloseDialog();\n\n        _this5.$refs.htTable.load();\n      }, 500);\n    },\n    afterCustomQueryLoadData: function afterCustomQueryLoadData(data) {\n      this.customQuerys = data.rows;\n    },\n    afterCustomDialogLoadData: function afterCustomDialogLoadData(data) {\n      this.customDialogs = data;\n    },\n    toDataList: function toDataList(param) {\n      var _this6 = this;\n\n      if (param.status == 0) {\n        req.get(window.context.uc + \"/uc/matrix/v1/publish?id=\".concat(param.id)).then(function (res) {\n          if (res.data.state) {\n            _this6.$message.success(res.data.message);\n\n            _this6.$router.push({\n              path: \"/matrixData/\".concat(param.id)\n            });\n\n            _this6.$refs.htTable.load();\n          }\n        });\n      } else {\n        this.$router.push({\n          path: \"/matrixData/\".concat(param.id)\n        });\n      }\n    },\n    ctrlTypeChange: function ctrlTypeChange(list, index) {\n      list[index].queryAlias && (list[index].queryAlias = \"\");\n      list[index].bindKey && (list[index].bindKey = \"\");\n      list[index].bindValue && (list[index].bindValue = \"\");\n    },\n    getResultField: function getResultField(ctrlType, queryAlias) {\n      if (ctrlType === \"select\") {\n        for (var i = 0; i < this.customQuerys.length; i++) {\n          var item = this.customQuerys[i];\n\n          if (item.alias === queryAlias) {\n            return JSON.parse(item.resultfield || \"[]\");\n          }\n        }\n      } else if (ctrlType === \"dialog\") {\n        for (var _i = 0; _i < this.customDialogs.length; _i++) {\n          var _item = this.customDialogs[_i];\n\n          if (_item.alias === queryAlias) {\n            return JSON.parse(_item.resultfield || \"[]\");\n          }\n        }\n      }\n    }\n  }\n};",null]}