Event.js 1.81 KB
Newer Older
niewei committed
1 2 3 4
import Api from "~/service/Api"
import Utils from "~/utils"

export default {
niewei committed
5
  async onInfbutSearow (callback) {
niewei committed
6 7
    let rtnmsg = await this.executeRule("infbut.searow")
    if (rtnmsg.respCode == SUCCESS) {
niewei committed
8
      this.model.infbut.dspstm = rtnmsg.data.infbut_dspstm
niewei committed
9 10 11 12 13 14 15 16
      this.$message({
        type: 'success',
        message: '获取成功!'
      });
    }
    else {
      this.$notify.error({ title: '错误', message: '服务请求失败!' });
    }
niewei committed
17
    callback()
niewei committed
18 19 20 21 22
  },
  async onInfbutExi () {
    let rtnmsg = await this.executeRule("infbut.exi")
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
niewei committed
23

niewei committed
24 25 26 27 28 29 30 31 32
    }
    else {
      this.$notify.error({ title: '错误', message: '服务请求失败!' });
    }
  },
  async onInfbutDsp () {
    let rtnmsg = await this.executeRule("infbut.dsp")
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
niewei committed
33 34
      this.updateModel(rtnmsg.data);
      this.tabVal = "curp0"
niewei committed
35 36 37 38 39 40 41 42 43
    }
    else {
      this.$notify.error({ title: '错误', message: '服务请求失败!' });
    }
  },
  async onInfbutUserow () {
    let rtnmsg = await this.executeRule("infbut.userow")
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
niewei committed
44

niewei committed
45 46 47 48 49 50 51 52 53
    }
    else {
      this.$notify.error({ title: '错误', message: '服务请求失败!' });
    }
  },
  async onInfbutClr () {
    let rtnmsg = await this.executeRule("infbut.clr")
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
niewei committed
54

niewei committed
55 56 57 58 59 60 61 62 63
    }
    else {
      this.$notify.error({ title: '错误', message: '服务请求失败!' });
    }
  },
  async onInfbutButprt () {
    let rtnmsg = await this.executeRule("infbut.butprt")
    if (rtnmsg.respCode == SUCCESS) {
      //TODO 处理数据逻辑
niewei committed
64

niewei committed
65 66 67 68 69
    }
    else {
      this.$notify.error({ title: '错误', message: '服务请求失败!' });
    }
  },
niewei committed
70 71

}