import Api from "~/service/Api"
import Utils from "~/utils"

export default {
                async onUsfmodShwflt(){
                let rtnmsg = await this.executeRule("usfmod.shwflt")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButdet(){
                let rtnmsg = await this.executeRule("butdet")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButdia(){
                let rtnmsg = await this.executeRule("butdia")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButdel(){
                let rtnmsg = await this.executeRule("butdel")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButprt(){
                let rtnmsg = await this.executeRule("butprt")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButconsel(){
                let rtnmsg = await this.executeRule("butconsel")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButconcal(){
                let rtnmsg = await this.executeRule("butconcal")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
        async onButexi(){
                let rtnmsg = await this.executeRule("butexi")
                if(rtnmsg.respCode == SUCCESS)
                {
                //TODO 处理数据逻辑

                }
                else
                {
                this.$notify.error({title: '错误',message: '服务请求失败！'});
                }
            },
            async handleSearch() {
                this.executeDefault("dspstm").then(res => {
                    //TODO 处理数据逻辑
                    this.stmData.data = res.data.dspstm.rows;
                    this.$store.commit("setTaskList", {key: "diasel", val: this.stmData.data.length});
                })
            },
        
            async handleReset(){
                this.model.diafro = "";
                this.model.diatil = "";
                this.model.reasen = "";
                this.model.searef = "";
                this.model.seasec = "";
                this.model.usfmod.flt = "";
            }

}