Commit f003373f by fukai

支持setvalues设置集合

parent 8366ed5b
import Vue from "vue"
import Api from "~/service/Api" import Api from "~/service/Api"
import Utils from "../utils" import Utils from "../utils"
export default { export default {
data() { data() {
return {} return {
codeSet:{} //setvalues的接收码表
}
}, },
mounted() { mounted() {
//this.restoreDisplay() //this.restoreDisplay()
}, },
methods: { methods: {
init(params) { updapteValueSet(values){
return Api.post(this.declareParams.trnName + "/init", { params }) if(!values){
return
}
for(let key in values){
Vue.set(this.codeSet,key,values[key])
}
},
async init(params) {
let rtnmsg = await Api.post(this.declareParams.trnName + "/init", { params })
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
return rtnmsg
}, },
save(params) { save(params) {
return Api.post(this.declareParams.trnName + "/saveData", this.wrapper(params)) return Api.post(this.declareParams.trnName + "/saveData", this.wrapper(params))
}, },
executeCheck(rulePath,params){ async executeCheck(rulePath,params){
return Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params)) let rtnmsg = await Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
return rtnmsg
}, },
executeDefault(rulePath, params) { async executeDefault(rulePath, params) {
return Api.post(this.declareParams.trnName + "/executeDefault/" + rulePath, this.wrapper(params)) let rtnmsg = await Api.post(this.declareParams.trnName + "/executeDefault/" + rulePath, this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
return rtnmsg
}, },
executeRule(rulePath, params,delayCb) { async executeRule(rulePath, params,delayCb) {
return Api.post(this.declareParams.trnName + "/executeRule/" + rulePath, this.wrapper(params,delayCb)) let rtnmsg = await Api.post(this.declareParams.trnName + "/executeRule/" + rulePath, this.wrapper(params,delayCb))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
return rtnmsg
}, },
async checkAll(params) { async checkAll(params) {
const res = await Api.post(this.declareParams.trnName + "/checkAll", this.wrapper(params)) const rtnmsg = await Api.post(this.declareParams.trnName + "/checkAll", this.wrapper(params))
return res if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
return rtnmsg
}, },
pedding(params) { pedding(params) {
return Api.post(this.declareParams.trnName + "/pending", this.wrapper(params)) return Api.post(this.declareParams.trnName + "/pending", this.wrapper(params))
...@@ -38,8 +68,12 @@ export default { ...@@ -38,8 +68,12 @@ export default {
let data = await Api.post("display/" + inr) let data = await Api.post("display/" + inr)
Utils.copyValueFromVO(this.model, JSON.parse(data.data)) Utils.copyValueFromVO(this.model, JSON.parse(data.data))
}, },
executeNotify(params) { async executeNotify(params) {
return Api.post(this.declareParams.trnName + "/executeNotify", this.wrapper(params)) const rtnmsg = await Api.post(this.declareParams.trnName + "/executeNotify", this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){
this.updapteValueSet(rtnmsg.codeSet)
}
return rtnmsg
}, },
} }
} }
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment