import Api from "~/service/Api"
import Utils from "~/utils/index"
export default {
    onUsfmodShwflt() {
        this.root.$refs.modelForm.validate(async valid => {
            if (!valid)
                return;
            let rtnmsg = await Api.post("sptsel/usfmod_shwflt", Utils.getRequestDataFn.call(this))
            if (rtnmsg.respCode == "AAAAAA") {
                //TODO 处理数据逻辑

            }
            else {
                this.$notify.error({ title: '错误', message: '服务请求失败！' });
            }
        })
    },
    onButypt() {
        this.root.$refs.modelForm.validate(async valid => {
            if (!valid)
                return;
            let rtnmsg = await Api.post("sptsel/butypt", Utils.getRequestDataFn.call(this))
            if (rtnmsg.respCode == "AAAAAA") {
                //TODO 处理数据逻辑

            }
            else {
                this.$notify.error({ title: '错误', message: '服务请求失败！' });
            }
        })
    },
    onDlmft() {
        this.root.$refs.modelForm.validate(async valid => {
            if (!valid)
                return;
            let rtnmsg = await Api.post("sptsel/dlmft", Utils.getRequestDataFn.call(this))
            if (rtnmsg.respCode == "AAAAAA") {
                //TODO 处理数据逻辑

            }
            else {
                this.$notify.error({ title: '错误', message: '服务请求失败！' });
            }
        })
    },
    onDlaxq() {
        this.root.$refs.modelForm.validate(async valid => {
            if (!valid)
                return;
            let rtnmsg = await Api.post("sptsel/dlaxq", Utils.getRequestDataFn.call(this))
            if (rtnmsg.respCode == "AAAAAA") {
                //TODO 处理数据逻辑

            }
            else {
                this.$notify.error({ title: '错误', message: '服务请求失败！' });
            }
        })
    },
    onButimg() {
        this.root.$refs.modelForm.validate(async valid => {
            if (!valid)
                return;
            let rtnmsg = await Api.post("sptsel/butimg", Utils.getRequestDataFn.call(this))
            if (rtnmsg.respCode == "AAAAAA") {
                //TODO 处理数据逻辑

            }
            else {
                this.$notify.error({ title: '错误', message: '服务请求失败！' });
            }
        })
    },
    tabClick() {

    },

    async continueEdit(row){
        //let rtnmsg = await Api.post("sptsel/getPendingData",{params:{'selsptinr':row[0]}})
        //if (rtnmsg.respCode == "AAAAAA") {
            //var cacheFileName = rtnmsg.data.cacheFileName;
            let viewurl ="/business/ditopn?selsptinr="+row[0];
            this.$router.push(viewurl);
        //}
    }

}