Zhang-Hong-Lin
3 天以前 232cdf071bfe3bd2b77ba05accba89b67fcc1edc
ÏîÄ¿´úÂë/WCS/WIDESEAWCS_Client/src/components/basic/ViewGrid/methods.js
@@ -1,4 +1,5 @@
import detailMethods from './detailMethods.js';
import axios from "axios";
//业务处理方法,全部可以由开发覆盖
import serviceFilter from './serviceFilter.js';
let methods = {
@@ -907,6 +908,85 @@
    this.modelOpenProcess();
    // this.modelOpenAfter();
  },
  async complete(rows) {
    this.boxOptions.title = '立即完成';
    this.currentAction = this.const.EDIT;
    if (rows) {
      if (!(rows instanceof Array)) {
        rows = [rows];
      }
    } else {
      rows = this.$refs.table.getSelected();
    }
    if (rows.length == 0) {
      return this.$error('请选择要编辑的行!');
    }
    if (rows.length != 1) {
      return this.$error('只能选择一行数据进行编辑!');
    }
    //记录当前编辑的行
    this.currentRow = rows[0];
    let w = this.currentRow.taskId;
    axios.post("api/Task/AtOnceUpdate/?taskid=" + w, {}).then(x => {
      alert("完成");
    })
  },
  async speciadelete(rows) {
    this.boxOptions.title = '特殊删除1';
    this.currentAction = this.const.EDIT;
    if (rows) {
      if (!(rows instanceof Array)) {
        rows = [rows];
      }
    } else {
      rows = this.$refs.table.getSelected();
    }
    if (rows.length == 0) {
      return this.$error('请选择要编辑的行!');
    }
    if (rows.length != 1) {
      return this.$error('只能选择一行数据进行编辑!');
    }
    //记录当前编辑的行
    this.currentRow = rows[0];
    axios.post("api/Task/speciadelete/", this.currentRow).then(x => {
      if (x.data.message == 1) {
        alert("失败");
      } else {
        alert("完成");
        this.refresh();
      }
    })
  },
  async speciaupdate(rows) {
    this.boxOptions.title = '特殊编辑';
    this.currentAction = this.const.EDIT;
    if (rows) {
      if (!(rows instanceof Array)) {
        rows = [rows];
      }
    } else {
      rows = this.$refs.table.getSelected();
    }
    if (rows.length == 0) {
      return this.$error('请选择要编辑的行!');
    }
    if (rows.length != 1) {
      return this.$error('只能选择一行数据进行编辑!');
    }
    //记录当前编辑的行
    this.currentRow = rows[0];
    let w = this.currentRow.taskId;
    axios.post("api/Task/speciaupdate/", this.currentRow).then(x => {
      if (x.data.message != 1) {
        alert("失败");
      } else {
        alert("完成");
        this.refresh();
      }
    })
  },
  async edit(rows) {
    this.boxOptions.title = '编辑';
    //编辑
@@ -926,6 +1006,11 @@
    }
    //记录当前编辑的行
    this.currentRow = rows[0];
    console.log("123", this.currentRow);
    //初始化弹出框
    if (!(await this.initBox())) return;
    this.setContinueAdd(false);