Commit 24b8df4e by 潘际乾

Api请求提取至函数

parent 60046d42
...@@ -9,7 +9,8 @@ ...@@ -9,7 +9,8 @@
</template> </template>
<script> <script>
import Api from "~/service/Api" import { getCodetable } from "~/service/business/codeTable"
export default { export default {
props: { props: {
value: { value: {
...@@ -115,7 +116,7 @@ export default { ...@@ -115,7 +116,7 @@ export default {
if(args.lang == "ZH"){ if(args.lang == "ZH"){
args.lang = "CN"; args.lang = "CN";
} }
Api.post("getCodetable",args).then(rtnmsg=>{ getCodetable(args).then(rtnmsg=>{
if(rtnmsg.respCode==SUCCESS){ if(rtnmsg.respCode==SUCCESS){
this.dbCodeList=rtnmsg.data this.dbCodeList=rtnmsg.data
} }
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
</template> </template>
<script> <script>
import Api from "~/service/Api" import { getCodetable } from "~/service/business/codeTable"
export default { export default {
props: { props: {
value: { value: {
...@@ -132,7 +133,7 @@ export default { ...@@ -132,7 +133,7 @@ export default {
if(args.lang == "ZH"){ if(args.lang == "ZH"){
args.lang = "CN"; args.lang = "CN";
} }
Api.post("getCodetable",args).then(rtnmsg=>{ getCodetable(args).then(rtnmsg=>{
if(rtnmsg.respCode==SUCCESS){ if(rtnmsg.respCode==SUCCESS){
this.dbCodeList=rtnmsg.data this.dbCodeList=rtnmsg.data
} }
......
...@@ -41,5 +41,8 @@ export default { ...@@ -41,5 +41,8 @@ export default {
unfold: "Unfold", unfold: "Unfold",
reset: "Reset", reset: "Reset",
toolBar: "ToolBar" toolBar: "ToolBar"
},
other: {
please_enter: 'Please enter the '
} }
}; };
...@@ -41,5 +41,8 @@ export default { ...@@ -41,5 +41,8 @@ export default {
unfold: "展开", unfold: "展开",
reset: "重置", reset: "重置",
toolBar: "工具条" toolBar: "工具条"
},
other: {
please_enter: '请输入'
} }
}; };
import Vue from "vue" import Vue from "vue"
import Api from "~/service/Api" import Api from "~/service/Api"
import { display } from "~/service/business/file"
import Utils from "../utils" import Utils from "../utils"
export default { export default {
data() { data() {
}, },
created(){ created() {
if(this.root){ if (this.root) {
//非顶级vue实例,不需要执行 //非顶级vue实例,不需要执行
return; return;
} }
if(this.codes){ if (this.codes) {
Vue.set(this.codes,"codeSet",{}) Vue.set(this.codes, "codeSet", {})
} }
}, },
mounted() { mounted() {
//this.restoreDisplay() //this.restoreDisplay()
}, },
methods: { methods: {
updapteValueSet(values){ updateValueSet(values) {
if(!values){ if (!values) {
return return
} }
//顶级实例,进入设置 //顶级实例,进入设置
if(!this.root){ if (!this.root) {
for(let key in values){ for (let key in values) {
Vue.set(this.codes.codeSet,key,values[key]) Vue.set(this.codes.codeSet, key, values[key])
} }
} }
else{ else {
this.root.updapteValueSet(values) this.root.updateValueSet(values)
} }
}, },
//获取后台setValues、setCodeValues传来的动态码,并自动转为码表值 //获取后台setValues、setCodeValues传来的动态码,并自动转为码表值
getValues(key){ getValues(key) {
let arr = this.codes.codeSet[key] let arr = this.codes.codeSet[key]
if(!arr) if (!arr)
return undefined return undefined
return arr.map(item=>{ return arr.map(item => {
let itemArr = item.split("\t") let itemArr = item.split("\t")
if(itemArr.length > 1) if (itemArr.length > 1)
return {label:item,value:itemArr[0]} return { label: item, value: itemArr[0] }
else else
return {label:itemArr[0],value:itemArr[0]} return { label: itemArr[0], value: itemArr[0] }
}) })
}, },
showBackendErrors(fieldErrors){ showBackendErrors(fieldErrors) {
// 清除之前的校验状态 // 清除之前的校验状态
if(!this.getRoot().$refs.modelForm){ if (!this.getRoot().$refs.modelForm) {
return return
} }
this.getRoot().$refs.modelForm.clearValidate(); this.getRoot().$refs.modelForm.clearValidate();
const fields = this.getRoot().$refs.modelForm.fields; const fields = this.getRoot().$refs.modelForm.fields;
Utils.positioningErrorMsg(fieldErrors, fields);
const tab = Utils.positioningErrorMsg(fieldErrors, fields); const tab = Utils.positioningErrorMsg(fieldErrors, fields);
return tab; return tab;
}, },
loading(text){ loading(text) {
const loading = this.$loading({ const loading = this.$loading({
lock: true, lock: true,
text, text,
...@@ -66,48 +65,47 @@ export default { ...@@ -66,48 +65,47 @@ export default {
}); });
return loading return loading
}, },
getRoot(){ getRoot() {
return (this.root || this) return (this.root || this)
}, },
async init(params) { async init(params) {
const loading = this.loading("交易加载中") const loading = this.loading("交易加载中")
let rtnmsg = await Api.post(this.declareParams.trnName + "/init", { params }) let rtnmsg = await Api.post(this.requestPrefix + "/init", { params })
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
} }
loading.close() loading.close()
return rtnmsg return rtnmsg
}, },
async save(params) { async save(params) {
const loading = this.loading("正在保存交易") const loading = this.loading("正在保存交易")
let rtnmsg = await Api.post(this.declareParams.trnName + "/saveData", this.wrapper(params)) let rtnmsg = await Api.post(this.requestPrefix + "/saveData", this.wrapper(params))
loading.close() loading.close()
return rtnmsg return rtnmsg
}, },
async executeCheck(rulePath,params){ async executeCheck(rulePath, params) {
const loading = this.loading("校验进行中") const loading = this.loading("校验进行中")
let rtnmsg = await Api.post(this.declareParams.trnName+"/executeCheck/"+rulePath, this.wrapper(params)) let rtnmsg = await Api.post(this.requestPrefix + "/executeCheck/" + rulePath, this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
this.showBackendErrors(rtnmsg.fieldErrors) this.showBackendErrors(rtnmsg.fieldErrors)
} }
loading.close() loading.close()
return rtnmsg return rtnmsg
}, },
async executeDefault(rulePath, params) { async executeDefault(rulePath, params) {
let rtnmsg = await Api.post(this.declareParams.trnName + "/executeDefault/" + rulePath, this.wrapper(params)) let rtnmsg = await Api.post(this.requestPrefix + "/executeDefault/" + rulePath, this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
this.showBackendErrors(rtnmsg.fieldErrors) this.showBackendErrors(rtnmsg.fieldErrors)
} }
return rtnmsg return rtnmsg
}, },
async executeRule(rulePath, params,delayCb) { async executeRule(rulePath, params, delayCb) {
const loading = this.loading("正在请求数据") const loading = this.loading("正在请求数据")
let rtnmsg = await Api.post(this.declareParams.trnName + "/executeRule/" + rulePath, this.wrapper(params,delayCb)) let rtnmsg = await Api.post(this.requestPrefix + "/executeRule/" + rulePath, this.wrapper(params, delayCb))
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
this.showBackendErrors(rtnmsg.fieldErrors) this.showBackendErrors(rtnmsg.fieldErrors)
} }
loading.close() loading.close()
...@@ -115,18 +113,18 @@ export default { ...@@ -115,18 +113,18 @@ export default {
}, },
async checkAll(params) { async checkAll(params) {
const loading = this.loading("正在校验数据") const loading = this.loading("正在校验数据")
const rtnmsg = await Api.post(this.declareParams.trnName + "/checkAll", this.wrapper(params)) const rtnmsg = await Api.post(this.requestPrefix + "/checkAll", this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
} }
loading.close() loading.close()
return rtnmsg return rtnmsg
}, },
async pedding(params) { async pedding(params) {
const loading = this.loading("正在暂存数据") const loading = this.loading("正在暂存数据")
const rtnmsg = await Api.post(this.declareParams.trnName + "/pending", this.wrapper(params)) const rtnmsg = await Api.post(this.requestPrefix + "/pending", this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
} }
loading.close() loading.close()
return rtnmsg return rtnmsg
...@@ -136,19 +134,18 @@ export default { ...@@ -136,19 +134,18 @@ export default {
if (!inr) if (!inr)
return return
const loading = this.loading("快照数据加载中") const loading = this.loading("快照数据加载中")
let data = await Api.post("display/" + inr) let data = await display(inr)
if(data.data) if (data.data) {
{
Utils.copyValueFromVO(this.model, JSON.parse(data.data)) Utils.copyValueFromVO(this.model, JSON.parse(data.data))
}else{ } else {
this.$notify.error({title: '错误',message: '快照文件加载失败!'}); this.$notify.error({ title: '错误', message: '快照文件加载失败!' });
} }
loading.close() loading.close()
}, },
async executeNotify(params) { async executeNotify(params) {
const rtnmsg = await Api.post(this.declareParams.trnName + "/executeNotify", this.wrapper(params)) const rtnmsg = await Api.post(this.requestPrefix + "/executeNotify", this.wrapper(params))
if(rtnmsg.respCode == SUCCESS){ if (rtnmsg.respCode == SUCCESS) {
this.updapteValueSet(rtnmsg.codeSet) this.updateValueSet(rtnmsg.codeSet)
} }
return rtnmsg return rtnmsg
}, },
......
export default{ export default {
data(){ data() {
return { return {
version:"1.0", version: "1.0",
trnName:"", trnName: "",
} }
}, },
computed:{ computed: {
declareParams(){ declareParams() {
return { return {
version: this.version, version: this.version,
// 交易名
trnName: this.root ? this.root.trnName : this.trnName, trnName: this.root ? this.root.trnName : this.trnName,
// 交易类型(进口、出口、买方、卖方等,为模块划分做准备)
trnType: this.getTrnType()
} }
},
requestPrefix() {
return `/${this.declareParams.trnType}/${this.declareParams.trnName}`
}
},
methods: {
getTrnType() {
const type = this.root ? this.root.trnType : this.trnType
return type ? type : 'business'
} }
} }
} }
\ No newline at end of file
...@@ -4,7 +4,7 @@ import Utils from "../utils" ...@@ -4,7 +4,7 @@ import Utils from "../utils"
export default { export default {
methods: { methods: {
globalSearch(key){ globalSearch(key){
return Api.post("report/globalSearch?key="+encodeURI(key)); return Api.post("/business/report/globalSearch?key="+encodeURI(key));
} }
} }
} }
\ No newline at end of file
import Api from "~/service/Api" import Api from "~/service/Api"
import { rejrow } from "~/service/business/trnrel"
import Utils from "~/utils/index" import Utils from "~/utils/index"
export default { export default {
async onSeaown() { async onSeaown() {
...@@ -237,7 +238,7 @@ export default { ...@@ -237,7 +238,7 @@ export default {
console.log(this.getSelectedData()) console.log(this.getSelectedData())
this.model.trncorco.selinr['rows'] = this.getSelectedData(); this.model.trncorco.selinr['rows'] = this.getSelectedData();
let rtnmsg = await Api.post("trnrel/rejrow", this.wrapper()) let rtnmsg = await rejrow(this.wrapper())
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
// var cacheFileName = rtnmsg.data.cacheFileName; // var cacheFileName = rtnmsg.data.cacheFileName;
......
...@@ -2,7 +2,7 @@ import axios from 'axios' ...@@ -2,7 +2,7 @@ import axios from 'axios'
import { MessageBox } from 'element-ui' import { MessageBox } from 'element-ui'
import RequestManager from './RequestManager.js'; import RequestManager from './RequestManager.js';
export const BASE_HOST = "/gjjs/business/" export const BASE_HOST = "/gjjs"
export const BASE_URI=BASE_HOST+""; export const BASE_URI=BASE_HOST+"";
const instance = axios.create({ const instance = axios.create({
......
import Api from '~/service/Api'
export function getCodetable(data) {
return Api.post('/business/getCodetable', data)
}
import Api from "~/service/Api"
export function display(inr, data) {
return Api.post(`/business/display/${inr}`, data)
}
export function getPdf(data) {
return Api.post('/business/pdf', data)
}
import Api from "~/service/Api"
export function rejrow(data) {
return Api.post('/business/trnrel/rejrow', data)
}
\ No newline at end of file
import Api from "~/service/Api"
export function all(data) {
return Api.post("/report/task/all", data)
}
\ No newline at end of file
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
}, },
created:async function(){ created:async function(){
console.log("进入bddsel交易"); console.log("进入bddsel交易");
let rtnmsg = await Api.post("bddsel/init",{params:{}}) let rtnmsg = await this.init({})
if(rtnmsg.retcod == SUCCESS) if(rtnmsg.retcod == SUCCESS)
{ {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -154,7 +154,7 @@ export default { ...@@ -154,7 +154,7 @@ export default {
}, },
created: async function () { created: async function () {
console.log("进入bdtudp交易"); console.log("进入bdtudp交易");
let rtnmsg = await Api.post("bdtudp/init", { params: {} }); let rtnmsg = await this.init({})
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//更新数据 //更新数据
Utils.copyValueFromVO(this.model, rtnmsg.data); Utils.copyValueFromVO(this.model, rtnmsg.data);
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
</div> </div>
</template> </template>
<script> <script>
import Api from "~/service/Api"; import { getCodetable } from "~/service/business/codeTable"
import CodeTable from "~/config/CodeTable"; import CodeTable from "~/config/CodeTable";
import Bopsel from "~/model/Bopsel"; import Bopsel from "~/model/Bopsel";
import commonProcess from "~/mixin/commonProcess"; import commonProcess from "~/mixin/commonProcess";
...@@ -96,7 +96,7 @@ export default { ...@@ -96,7 +96,7 @@ export default {
console.log("进入bopsel交易"); console.log("进入bopsel交易");
// 查询码表 // 查询码表
Api.post("getCodetable", { tbl: "BOPTYP", lang: "EN" }).then((res) => { getCodetable({ tbl: "BOPTYP", lang: "EN" }).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.codes.boptyp = res.data; this.codes.boptyp = res.data;
} }
......
...@@ -71,7 +71,7 @@ export default { ...@@ -71,7 +71,7 @@ export default {
}, },
created:async function(){ created:async function(){
console.log("进入brtlat交易"); console.log("进入brtlat交易");
let rtnmsg = await Api.post("brtlat/init",{params:{}}) let rtnmsg = await this.init({})
if(rtnmsg.respCode == SUCCESS) if(rtnmsg.respCode == SUCCESS)
{ {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -156,7 +156,6 @@ export default { ...@@ -156,7 +156,6 @@ export default {
}, },
created: async function () { created: async function () {
console.log("进入cptadv交易"); console.log("进入cptadv交易");
// let rtnmsg = await Api.post("cptadv/init",{params:{}});
let rtnmsg = await this.init(this.$route.query); let rtnmsg = await this.init(this.$route.query);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -80,7 +80,6 @@ export default { ...@@ -80,7 +80,6 @@ export default {
methods: {}, methods: {},
created: async function () { created: async function () {
console.log("进入cptati交易"); console.log("进入cptati交易");
// let rtnmsg = await Api.post("cptati/init",{params:{}});
let rtnmsg = await this.init(this.$route.query); let rtnmsg = await this.init(this.$route.query);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -85,7 +85,6 @@ export default { ...@@ -85,7 +85,6 @@ export default {
}, },
created: async function () { created: async function () {
console.log("进入cptato交易"); console.log("进入cptato交易");
// let rtnmsg = await Api.post("cptato/init",{params:{}});
let rtnmsg = await this.init(this.$route.query); let rtnmsg = await this.init(this.$route.query);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -201,7 +201,6 @@ export default { ...@@ -201,7 +201,6 @@ export default {
}, },
created: async function () { created: async function () {
console.log("进入cptopn交易"); console.log("进入cptopn交易");
// let rtnmsg = await Api.post("cptopn/init", { params: {} });
let rtnmsg = await this.init(this.$route.query); let rtnmsg = await this.init(this.$route.query);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model,rtnmsg.data) Utils.copyValueFromVO(this.model,rtnmsg.data)
......
...@@ -14,7 +14,7 @@ ...@@ -14,7 +14,7 @@
</div> </div>
</template> </template>
<script> <script>
import Api from "~/service/Api" import { getCodetable } from "~/service/business/codeTable"
import CodeTable from "~/config/CodeTable" import CodeTable from "~/config/CodeTable"
import Diasel from "~/model/Diasel" import Diasel from "~/model/Diasel"
import commonProcess from "~/mixin/commonProcess" import commonProcess from "~/mixin/commonProcess"
...@@ -60,12 +60,12 @@ export default { ...@@ -60,12 +60,12 @@ export default {
created:async function(){ created:async function(){
console.log("进入diasel交易"); console.log("进入diasel交易");
// 查询码表 // 查询码表
Api.post("getCodetable", { tbl:'DIATXT',lang:'EN' }).then((res) => { getCodetable({ tbl:'DIATXT',lang:'EN' }).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.codes.diatxt = res.data; this.codes.diatxt = res.data;
} }
}); });
Api.post("getCodetable", { tbl:'BUSTXT',lang:'EN' }).then((res) => { getCodetable({ tbl:'BUSTXT',lang:'EN' }).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.codes.bustxt = res.data; this.codes.bustxt = res.data;
} }
......
...@@ -2032,7 +2032,6 @@ export default { ...@@ -2032,7 +2032,6 @@ export default {
methods: {}, methods: {},
created: async function () { created: async function () {
console.log("进入ditame交易"); console.log("进入ditame交易");
//let rtnmsg = await Api.post("ditame/init", { params: {} });
let rtnmsg = await this.init(this.$route.query); let rtnmsg = await this.init(this.$route.query);
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
methods: {}, methods: {},
created: async function () { created: async function () {
console.log("进入ditsel交易"); console.log("进入ditsel交易");
let rtnmsg = await Api.post("ditsel/init", { params: {} }); let rtnmsg = await this.init({})
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
Utils.copyValueFromVO(this.model, rtnmsg.data); Utils.copyValueFromVO(this.model, rtnmsg.data);
......
...@@ -145,7 +145,7 @@ export default { ...@@ -145,7 +145,7 @@ export default {
}, },
created: async function() { created: async function() {
console.log("进入infpta交易"); console.log("进入infpta交易");
let rtnmsg = await Api.post("infpta/init", { params: {} }); let rtnmsg = await this.init({})
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
//TODO 处理数据逻辑 //TODO 处理数据逻辑
this.updateModel(rtnmsg.data); this.updateModel(rtnmsg.data);
......
...@@ -494,7 +494,7 @@ export default { ...@@ -494,7 +494,7 @@ export default {
}, },
async show(idx,row){ async show(idx,row){
var params = {selDst:"recpan.smhstm",selIds:[idx+1],selBtnId:"A"} var params = {selDst:"recpan.smhstm",selIds:[idx+1],selBtnId:"A"}
let rtnmsg = await Api.post(`trnrel/executeRule/recpan.smhstm`, this.wrapper(params)) let rtnmsg = await Api.post(`/business/trnrel/executeRule/recpan.smhstm`, this.wrapper(params))
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.title = "面函" this.title = "面函"
let viewurl = "/#/docpan/show"; let viewurl = "/#/docpan/show";
......
...@@ -492,7 +492,7 @@ export default { ...@@ -492,7 +492,7 @@ export default {
}, },
async show(idx,row){ async show(idx,row){
var params = {selDst:"recpan.smhstm",selIds:[idx+1],selBtnId:"A"} var params = {selDst:"recpan.smhstm",selIds:[idx+1],selBtnId:"A"}
let rtnmsg = await Api.post(`trnrel/executeRule/recpan.smhstm`, this.wrapper(params)) let rtnmsg = await Api.post(`/business/trnrel/executeRule/recpan.smhstm`, this.wrapper(params))
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.title = "面函" this.title = "面函"
let viewurl = "/#/docpan/show"; let viewurl = "/#/docpan/show";
......
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
</template> </template>
<script> <script>
import Api from "~/service/Api"; import { getPdf } from "~/service/business/file";
export default { export default {
data() { data() {
...@@ -47,7 +47,7 @@ export default { ...@@ -47,7 +47,7 @@ export default {
]; ];
}); });
if (this.model.docXML != "") if (this.model.docXML != "")
Api.post("pdf", { xml: this.model.docXML, doclang: window.sessionStorage.docuil }).then((res) => { getPdf({ xml: this.model.docXML, doclang: window.sessionStorage.docuil }).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
this.pdf ="data:application/pdf;base64,"+ res.data; this.pdf ="data:application/pdf;base64,"+ res.data;
} }
......
...@@ -48,7 +48,7 @@ ...@@ -48,7 +48,7 @@
<script> <script>
import CellHeaderVue from "./common/CellHeader.vue"; import CellHeaderVue from "./common/CellHeader.vue";
import axios from "axios"; import { all } from "~/service/report";
export default { export default {
name: "TaskStatistics", name: "TaskStatistics",
...@@ -84,7 +84,7 @@ export default { ...@@ -84,7 +84,7 @@ export default {
}; };
}, },
created() { created() {
axios.get('/gjjs/report/task/all').then(res => { all().then(res => {
console.log(res); console.log(res);
}) })
} }
......
...@@ -463,14 +463,14 @@ export default { ...@@ -463,14 +463,14 @@ export default {
let rtnmsg let rtnmsg
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') { if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
this.model.setmod.msgmod.doccod = row.id this.model.setmod.msgmod.doccod = row.id
rtnmsg = await Api.post(`${this.declareParams.trnName}/msgmod_butshw`, this.wrapper()) rtnmsg = await Api.post(`${this.requestPrefix}/msgmod_butshw`, this.wrapper())
} else { } else {
this.model.trnmod.trndoc.doccod = row.id this.model.trnmod.trndoc.doccod = row.id
this.model.trnmod.trndoc.cortyp = cortyp this.model.trnmod.trndoc.cortyp = cortyp
const params = { const params = {
index: index index: index
} }
rtnmsg = await Api.post(`${this.declareParams.trnName}/executeDocpan`, this.wrapper(params)) rtnmsg = await Api.post(`${this.requestPrefix}/executeDocpan`, this.wrapper(params))
} }
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') { if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
...@@ -523,7 +523,7 @@ export default { ...@@ -523,7 +523,7 @@ export default {
const params = { const params = {
index: index index: index
} }
let rtnmsg = await Api.post(`${this.declareParams.trnName}/executeDocpanDetail`, this.wrapper(params)) let rtnmsg = await Api.post(`${this.requestPrefix}/executeDocpanDetail`, this.wrapper(params))
if (rtnmsg.respCode == SUCCESS) { if (rtnmsg.respCode == SUCCESS) {
this.title = row.pandsc this.title = row.pandsc
this.centerDialogVisible = true, this.centerDialogVisible = true,
......
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