{"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\\applicationCenter\\MessageConfig\\MsgConfig.vue?vue&type=script&lang=js&","dependencies":[{"path":"D:\\jenkins\\workspace\\xq-web-bpm\\src\\views\\applicationCenter\\MessageConfig\\MsgConfig.vue","mtime":1675071992772},{"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":["import \"core-js/modules/es6.regexp.split\";\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//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\n//\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 msg from '@/api/msg.js';\nimport SelectTypeDialog from '@/components/dialog/SelectTypeDialog';\nimport MsgTemplateDialog from '@/components/dialog/MsgTemplateDialog';\nexport default {\n  components: {\n    SelectTypeDialog: SelectTypeDialog,\n    MsgTemplateDialog: MsgTemplateDialog\n  },\n  data: function data() {\n    return {\n      selectType: ['org', 'user'],\n      msgType: [{\n        key: 'voice',\n        value: '语音'\n      }, {\n        key: 'mail',\n        value: '邮件'\n      }, {\n        key: 'sms',\n        value: '短信'\n      }, {\n        key: 'inner',\n        value: '站内'\n      }],\n      title: '',\n      pageBean: {\n        page: 1,\n        pageSize: 20,\n        total: 0\n      },\n      dialogVisible: false,\n      data: [],\n      formData: {\n        name: '',\n        code: '',\n        tplKey: '',\n        tplName: '',\n        notifyType: '',\n        userConfigType: 1,\n        userStr: '${receiver}'\n      },\n      receiverData: [],\n      isSubmit: false\n    };\n  },\n  methods: {\n    handleSelectTemplate: function handleSelectTemplate(row) {\n      this.formData.tplKey = row.key;\n      this.formData.templateName = row.name;\n      this.$forceUpdate();\n    },\n    openTemplate: function openTemplate() {\n      this.$refs.template.open();\n    },\n    handleSelect: function handleSelect(data) {\n      if (data.length) {\n        var param = JSON.stringify(data);\n        this.formData.userStr = param;\n        this.receiverData = this.parseTypeData(data);\n        this.$refs.selecter.closeDialog();\n      } else {\n        this.$message.error('请选择接收人！');\n      }\n\n      return;\n    },\n    parseTypeData: function parseTypeData(data) {\n      var temp = [];\n      data.forEach(function (item) {\n        if (item.codes) {\n          var codes = item.codes.split(',');\n          var names = item.name.split(',');\n          codes.forEach(function (code, i) {\n            var obj = {};\n            obj.code = codes[i];\n            obj.name = names[i];\n            obj.type = item.type;\n            temp.push(obj);\n          });\n        }\n      });\n      return temp;\n    },\n    openSelecter: function openSelecter() {\n      var obj = {};\n\n      if (this.formData.userStr.indexOf('$') == -1) {\n        obj = {\n          json: this.formData.userStr\n        };\n      }\n\n      this.$refs.selecter.showDialog(obj);\n    },\n    changeReceiverType: function changeReceiverType(value) {\n      if (value == 1) {\n        this.formData.userStr = '${receiver}';\n      } else {\n        this.formData.userStr = '';\n      }\n    },\n    //------------------------------------\n    rowClick: function rowClick(row, column, event) {\n      this.$refs.htTable.$refs.htTable.toggleRowSelection(row);\n    },\n    handleOpen: function handleOpen(param, row) {\n      this.title = param;\n\n      if (row) {\n        this.formData = row;\n\n        if (this.formData.userStr.indexOf('$') == -1) {\n          var data = JSON.parse(this.formData.userStr);\n          this.receiverData = this.parseTypeData(data);\n        } else {\n          this.receiverData = [];\n        }\n      }\n\n      this.dialogVisible = true;\n    },\n    loadData: function loadData(param, cb) {\n      var _this = this;\n\n      if (param && param.querys && param.querys.length) {\n        param.querys.forEach(function (item) {\n          if (item.property == 'userConfigType') {\n            item.property = 'a.user_config_type_';\n          }\n        });\n      }\n\n      if (!param) {\n        this.pageBean.total = 0;\n        param = {\n          pageBean: ''\n        };\n        param.pageBean = this.pageBean;\n        param.sorter = this.defaultSort;\n      }\n\n      msg.getMessageConfig(param).then(function (resp) {\n        _this.data = resp.rows;\n        _this.pageBean = {\n          page: resp.page,\n          pageSize: resp.pageSize,\n          total: resp.total\n        };\n      }).finally(function () {\n        return cb();\n      });\n    },\n    handleClose: function handleClose() {\n      this.dialogVisible = false; // this.loadData()\n\n      this.formData = {\n        name: '',\n        code: '',\n        tplKey: '',\n        tplName: '',\n        notifyType: '',\n        userConfigType: 1,\n        userStr: '${receiver}'\n      };\n    },\n    saveUrl: function saveUrl() {\n      return window.context.application + '/msg/messageConfig/v1/save';\n    },\n    beforeSaveData: function beforeSaveData() {\n      if (!this.formData || !this.formData.isDefault) {\n        this.formData.isDefault = 0;\n      }\n\n      this.isSubmit = true;\n    },\n    afterSaveData: function afterSaveData() {\n      this.loadData();\n      this.dialogVisible = false;\n      this.formData = {\n        name: '',\n        code: '',\n        tplKey: '',\n        tplName: '',\n        notifyType: '',\n        userConfigType: 1,\n        userStr: '${receiver}'\n      };\n    },\n    formDeleteUrl: function formDeleteUrl() {\n      return \"\".concat(window.context.application, \"/msg/messageConfig/v1/removes\");\n    }\n  }\n};",null]}