Commit 89688815 by liuxin

js文件调整

parent d4030fd0
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* Ditopn Default规则 * Ditopn Default规则
*/ */
import Api from "~/service/Api"; import Api from "~/service/Api";
import Utils from "~/utils/index"
export default { export default {
"didgrp.rec.resflg" :defaultDidgrpRecResflg, "didgrp.rec.resflg" :defaultDidgrpRecResflg,
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
* Sptsel Default规则 * Sptsel Default规则
*/ */
import Api from "~/service/Api"; import Api from "~/service/Api";
import Utils from "~/utils/index"
export default { export default {
"sptstm": defaultSptstm, "sptstm": defaultSptstm,
...@@ -31,7 +32,15 @@ function defaultDlmft() { ...@@ -31,7 +32,15 @@ function defaultDlmft() {
} }
function defaultButimg() { function defaultButimg() {
} }
function defaultDflg() { async function defaultDflg() {
let rtnmsg = await Api.post("sptsel/default/dflg", Utils.flatObject(this.model))
if (rtnmsg.retcod == "AAAAAA") {
//TODO 处理数据逻辑
this.model = Utils.copyValueFromVO(this.model, rtnmsg.data);
}
else {
this.$notify.error({ title: '错误', message: '服务请求失败!' });
}
} }
function defaultYptinf() { function defaultYptinf() {
console.log(this.model.yptinf) console.log(this.model.yptinf)
......
import Api from "~/service/Api" import Api from "~/service/Api"
import Utils from "~/utils/index"
export default { export default {
onUsfmodShwflt() { onUsfmodShwflt(){
this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => { this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
if (!valid) if(!valid)
return; return;
let rtnmsg = await Api.post("sptsel/usfmod_shwflt", { data: this.model }) let rtnmsg = await Api.post("sptsel/usfmod_shwflt",Utils.flatObject(this.model))
if (rtnmsg.retcod == SUCCESS) { if(rtnmsg.respCode == "AAAAAA")
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else
this.$notify.error({ title: '错误', message: '服务请求失败!' }); {
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
}) })
}, },
onButypt() { onButypt(){
this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => { this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
if (!valid) if(!valid)
return; return;
let rtnmsg = await Api.post("sptsel/butypt", { data: this.model }) let rtnmsg = await Api.post("sptsel/butypt",Utils.flatObject(this.model))
if (rtnmsg.retcod == SUCCESS) { if(rtnmsg.respCode == "AAAAAA")
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else
this.$notify.error({ title: '错误', message: '服务请求失败!' }); {
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
}) })
}, },
onDlmft() { onDlmft(){
this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => { this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
if (!valid) if(!valid)
return; return;
let rtnmsg = await Api.post("sptsel/dlmft", { data: this.model }) let rtnmsg = await Api.post("sptsel/dlmft",Utils.flatObject(this.model))
if (rtnmsg.retcod == SUCCESS) { if(rtnmsg.respCode == "AAAAAA")
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else
this.$notify.error({ title: '错误', message: '服务请求失败!' }); {
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
}) })
}, },
onDlaxq() { onDlaxq(){
this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => { this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
if (!valid) if(!valid)
return; return;
let rtnmsg = await Api.post("sptsel/dlaxq", { data: this.model }) let rtnmsg = await Api.post("sptsel/dlaxq",Utils.flatObject(this.model))
if (rtnmsg.retcod == SUCCESS) { if(rtnmsg.respCode == "AAAAAA")
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else
this.$notify.error({ title: '错误', message: '服务请求失败!' }); {
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
}) })
}, },
onButimg() { onButimg(){
this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => { this.$parent.$parent.$parent.$parent.$refs.modelForm.validate(async valid => {
if (!valid) if(!valid)
return; return;
let rtnmsg = await Api.post("sptsel/butimg", { data: this.model }) let rtnmsg = await Api.post("sptsel/butimg",Utils.flatObject(this.model))
if (rtnmsg.retcod == SUCCESS) { if(rtnmsg.respCode == "AAAAAA")
{
//TODO 处理数据逻辑 //TODO 处理数据逻辑
} }
else { else
this.$notify.error({ title: '错误', message: '服务请求失败!' }); {
this.$notify.error({title: '错误',message: '服务请求失败!'});
} }
}) })
}, },
tabClick() {
},
} }
\ No newline at end of file
...@@ -76,8 +76,7 @@ async function defaultTrncorcoDflg() { ...@@ -76,8 +76,7 @@ async function defaultTrncorcoDflg() {
let rtnmsg = await Api.post("trnrel/default/trncorco.dflg", Utils.flatObject(this.model)) let rtnmsg = await Api.post("trnrel/default/trncorco.dflg", Utils.flatObject(this.model))
if (rtnmsg.respCode == "AAAAAA") { if (rtnmsg.respCode == "AAAAAA") {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
console.log(rtnmsg) this.model = Utils.copyValueFromVO(this.model, rtnmsg.data);
console.log(rtnmsg.data)
} }
else { else {
this.$notify.error({ title: '错误', message: '服务请求失败!' }); this.$notify.error({ title: '错误', message: '服务请求失败!' });
......
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