{"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\\meta\\IdentityManager.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\meta\\IdentityManager.vue","mtime":1675071993022},{"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//\nimport sys from '@/api/portal.js';\nimport req from '@/request.js';\nimport portal from '@/api/portal.js';\nexport default {\n  name: 'meta-identity',\n  components: {},\n  data: function data() {\n    return {\n      identityDisabled: false,\n      identiyTitle: '',\n      loadDataUrl: '',\n      dialogVisible: false,\n      data: [],\n      pageResult: {\n        page: 1,\n        pageSize: 50,\n        total: 0\n      },\n      isSubmit: true,\n      identity: {\n        name: '',\n        alias: '',\n        regulation: '',\n        genType: '',\n        noLength: '',\n        initValue: '',\n        step: ''\n      },\n      genTypes: [{\n        key: 3,\n        value: '每年生成'\n      }, {\n        key: 2,\n        value: '每月生成'\n      }, {\n        key: 1,\n        value: '每天生成 '\n      }, {\n        key: 0,\n        value: '递增'\n      }],\n      uploadDialogVisible: false,\n      fileList: [],\n      uploadUrl: window.context.portal + '/sys/identity/v1/import'\n    };\n  },\n  computed: {\n    requestMethod: function requestMethod() {\n      return 'POST';\n    },\n    identityDeleteUrl: function identityDeleteUrl() {\n      return window.context.portal + '/sys/identity/v1/remove';\n    }\n  },\n  methods: {\n    //鼠标选中行改变复选框\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.identityTable.$refs.htTable.toggleRowSelection(row);\n    },\n    beforeSaveData: function beforeSaveData() {\n      this.isSubmit = true;\n    },\n    saveIdentityUrl: function saveIdentityUrl() {\n      return window.context.portal + '/sys/identity/v1/save';\n    },\n    afterSaveData: function afterSaveData() {\n      this.dialogVisible = false;\n      this.$refs.identityTable.load();\n    },\n    afterLoadData: function afterLoadData(data) {\n      var _this = this;\n\n      // 编辑流水号\n      if (this.dialogVisible) {\n        this.identity = data;\n        setTimeout(function () {\n          return _this.$validator.validateAll('editIdentityForm');\n        });\n      }\n    },\n    dialogCancle: function dialogCancle(dialogVisible) {\n      var _this2 = this;\n\n      this.loadDataUrl = '';\n      this[dialogVisible] = false;\n      setTimeout(function () {\n        return _this2.identityDisabled = false;\n      }, 500);\n    },\n    handleClose: function handleClose() {\n      var _this3 = this;\n\n      this.loadDataUrl = '';\n      this.dialogVisible = false;\n      setTimeout(function () {\n        return _this3.identityDisabled = false;\n      }, 500);\n    },\n    showDialog: function showDialog(row) {\n      this.dialogVisible = true;\n\n      if (row) {\n        this.loadDataUrl = \"/sys/identity/v1/getJson?id=\".concat(row.id);\n      }\n    },\n    handleNodeClick: function handleNodeClick(node) {},\n    loadData: function loadData(param, cb) {\n      var _this4 = this;\n\n      sys.getIdentityPageJson(param).then(function (response) {\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    export: function _export() {\n      var selection = this.$refs.identityTable.$refs.htTable.selection;\n\n      if (!selection || selection.length == 0) {\n        this.$message({\n          type: 'warning',\n          message: '请至少选择一条记录'\n        });\n        return;\n      }\n\n      var ids = [];\n\n      for (var i = 0; i < selection.length; i++) {\n        ids.push(selection[i].id);\n      }\n\n      req.download(window.context.portal + '/sys/identity/v1' + '/export?ids=' + ids.join(','));\n    },\n    beforeClose: function beforeClose() {\n      this.uploadDialogVisible = false;\n      this.fileList = [];\n      this.loadData();\n    },\n    handleImport: function handleImport(param) {\n      var _this5 = this;\n\n      var formData = new FormData();\n      formData.append('file', param.file);\n      portal.importIdentity(formData).then(function (resp) {\n        if (resp.state) {\n          _this5.$message({\n            type: 'success',\n            message: resp.message\n          });\n\n          _this5.fileList = [];\n          _this5.uploadDialogVisible = false;\n\n          _this5.$refs.htTable.load(); //重新加载列表数据\n\n        } else {\n          //this.$message({type:\"warning\",message:\"导入失败\"})\n          _this5.beforeClose();\n        }\n      });\n    },\n    handleCommand: function handleCommand(params) {\n      switch (params.command) {\n        case 'edit':\n          this.identiyTitle = '编辑流水号';\n          this.showDialog(params.row);\n          break;\n\n        case 'add':\n          this.identity = {\n            name: '',\n            alias: '',\n            regulation: '',\n            genType: '',\n            noLength: '',\n            initValue: '',\n            step: ''\n          };\n          this.identiyTitle = '添加流水号';\n          this.showDialog();\n          break;\n\n        case 'get':\n          this.identiyTitle = '查看流水号';\n          this.isSubmit = false;\n          this.identityDisabled = true;\n          this.showDialog(params.row);\n          break;\n\n        case 'import':\n          this.uploadDialogVisible = true;\n          break;\n\n        case 'export':\n          this.export();\n          break;\n\n        default:\n          break;\n      }\n    },\n    uploadSubmit: function uploadSubmit() {\n      if (this.$refs.elUpload.uploadFiles.length == 0) {\n        this.$message({\n          type: \"warning\",\n          message: \"请上传文件\"\n        });\n      }\n\n      this.$refs.elUpload.submit();\n    }\n  }\n};",null]}