Commit ebd0441d by 潘际乾

docpan 更新

parent 4c1ca71e
...@@ -70,15 +70,17 @@ export default { ...@@ -70,15 +70,17 @@ export default {
return arr; return arr;
}, },
tableData() { tableData() {
const temp = this.column; // const temp = this.column;
const res = []; // const res = [];
return this.list.map((row) => { // return this.list.map((row) => {
const res = {} // const res = {}
for (let i = 0; i < temp.length; i++) { // for (let i = 0; i < temp.length; i++) {
res[temp[i]] = row[temp[i]]; // res[temp[i]] = row[temp[i]];
} // }
return res; // return res;
}); // });
return this.list;
}, },
}, },
data() { data() {
......
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-select <c-select
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].cortyp scope.row.cortyp
" "
style="width: 100%" style="width: 100%"
disabled disabled
...@@ -26,7 +26,7 @@ ...@@ -26,7 +26,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-select <c-select
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].docsnf scope.row.docsnf
" "
style="width: 100%" style="width: 100%"
placeholder="请选择" placeholder="请选择"
...@@ -46,7 +46,7 @@ ...@@ -46,7 +46,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-select <c-select
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].docuil scope.row.docuil
" "
style="width: 100%" style="width: 100%"
placeholder="请选择" placeholder="请选择"
...@@ -65,7 +65,7 @@ ...@@ -65,7 +65,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-select <c-select
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].apf scope.row.apf
" "
disabled disabled
style="width: 100%" style="width: 100%"
...@@ -85,7 +85,7 @@ ...@@ -85,7 +85,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-input <c-input
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].apfcpy1 scope.row.apfcpy1
" "
:readonly="true" :readonly="true"
style="width: 100%" style="width: 100%"
...@@ -98,7 +98,7 @@ ...@@ -98,7 +98,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-input <c-input
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].apfcpy2 scope.row.apfcpy2
" "
style="width: 100%" style="width: 100%"
placeholder="请选择" placeholder="请选择"
...@@ -111,7 +111,7 @@ ...@@ -111,7 +111,7 @@
<template slot-scope="scope"> <template slot-scope="scope">
<c-select <c-select
v-model=" v-model="
model.trnmod.trndoc.doceot[scope.row.index].staflg scope.row.staflg
" "
style="width: 100%" style="width: 100%"
placeholder="请选择" placeholder="请选择"
...@@ -132,11 +132,11 @@ ...@@ -132,11 +132,11 @@
type="primary" type="primary"
size="small" size="small"
:disabled=" :disabled="
model.trnmod.trndoc.doceot[scope.row.index] scope.row
.pandsc == 'MT799' && model.didgrp && model.didgrp.rec && .pandsc == 'MT799' && model.didgrp && model.didgrp.rec &&
model.didgrp.rec.elcflg == 'Y' model.didgrp.rec.elcflg == 'Y'
" "
@click="handleDisplay(scope.row.index, scope.row,model.trnmod.trndoc.doceot[scope.row.index])" @click="handleDisplay(scope.row.index, scope.row, model.trnmod.trndoc.doceot[scope.row.idx])"
icon="el-icon-search" icon="el-icon-search"
style="margin-left:0" style="margin-left:0"
></c-button ></c-button
...@@ -419,7 +419,7 @@ ...@@ -419,7 +419,7 @@
type="textarea" type="textarea"
:rows="10" :rows="10"
disabled disabled
v-model="dialog.remark" v-model="dialog.addtxt"
/> />
</div> </div>
<div v-else> <div v-else>
...@@ -456,160 +456,142 @@ import Api from "~/service/Api"; ...@@ -456,160 +456,142 @@ import Api from "~/service/Api";
import Utils from "~/utils/index"; import Utils from "~/utils/index";
import DocUtils from "~/utils/DocUtils"; import DocUtils from "~/utils/DocUtils";
export default { export default {
inject: ["root"], inject: ['root'],
props: ["model", "codes"], props: ["model", "codes"],
mixins: [commonProcess], mixins: [commonProcess],
data() { data() {
return { return {
index: 0, index: 0,
title: "", title: "",
dialog: { dialog: {
rcv: { rcv: {
pts: {}, pts: {},
ptyinftxt: {}, ptyinftxt: {},
}, },
}, },
centerDialogVisible: false, centerDialogVisible: false,
stmData: { stmData: {
columns: [ columns: [
//注释的已改成静态 //注释的已改成静态
"role 收报人 80px", "role 收报人 80px",
"pandsc 描述 260px", "pandsc 描述 260px",
//"cortyp 类型", //"cortyp 类型",
//"docsnf 报文格式", //"docsnf 报文格式",
//"docuil 语言", //"docuil 语言",
//"apf 传送方式" //"apf 传送方式"
], ],
data: [], data: [],
}, },
}; };
},
watch: {
"model.trnmod.trndoc.doceot": {
handler(val, oldVal) {
var stm = [];
let k = 0;
for (let i = 0; i < val.length; i++) {
if (val[i].role != "") {
stm[k++] = val[i];
}
}
this.stmData.data = stm;
},
immediate: true,
}, },
}, watch: {
methods: { "model.trnmod.trndoc.doceot": {
saveDialog() { handler(val, oldVal) {
this.centerDialogVisible = false; var stm = [];
this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog); for (let i = 0; i < val.length; i++) {
this.executeRule("trnmod.trndoc.doccur.butaddok").then((res) => { if (val[i].role != "") {
if (res.respCode == SUCCESS) { val[i]['idx'] = i
//TODO stm.push(val[i]);
} else { }
this.$notify.error({ title: "错误", message: "服务请求失败!" }); }
this.stmData.data = stm
},
immediate: true
} }
});
}, },
async handleDisplay(index, row, doceot) { methods: {
//后续要根据快照模式切换请求方式 saveDialog() {
let cortyp = row.cortyp; this.centerDialogVisible = false;
let docuil = doceot.docuil; this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog);
let docnam = doceot.docnam || ""; this.executeRule("trnmod.trndoc.doccur.butaddok").then(res => {
docnam = docnam if(res.respCode==SUCCESS){
.substr(docnam.indexOf("\\") + 1) //TODO
.toLowerCase()
.replaceAll("\\", "_"); }else{
let rtnmsg; this.$notify.error({ title: '错误', message: '服务请求失败!' });
if (cortyp == "SWT" || cortyp == "FMT" || cortyp == "CMT") { }
this.model.setmod.msgmod.doccod = row.id; })
rtnmsg = await Api.post( },
`${this.requestPrefix}/msgmod_butshw`, async handleDisplay(index, row,doceot){
this.wrapper() //后续要根据快照模式切换请求方式
); let cortyp = row.cortyp
} else { let docuil = doceot.docuil;
this.model.trnmod.trndoc.doccod = row.id; let docnam = doceot.docnam||'';
this.model.trnmod.trndoc.cortyp = cortyp; docnam = docnam.substr(docnam.indexOf("\\")+1).toLowerCase().replaceAll("\\","_");
const params = { let rtnmsg
index: index, // if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
}; // // this.model.setmod.msgmod.doccod = row.id
rtnmsg = await Api.post( // rtnmsg = await Api.post(`${this.requestPrefix}/msgmod_butshw`, this.wrapper())
`${this.requestPrefix}/executeDocpan`, // } else {
this.wrapper(params) // // this.model.trnmod.trndoc.doccod = row.id
); // // this.model.trnmod.trndoc.cortyp = cortyp
}
if (rtnmsg.respCode == SUCCESS) { // }
if (cortyp == "SWT" || cortyp == "FMT" || cortyp == "CMT") { const params = {
let viewurl = rtnmsg.data.setmod_msgmod_docpth; index: row.idx
this.viewurl = viewurl; }
this.title = "报文"; rtnmsg = await Api.post(`${this.requestPrefix}/executeDocpan`, this.wrapper(params))
//window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no'); if (rtnmsg.respCode == SUCCESS) {
} else if (cortyp == "ELC") { if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
Modal.info({ let viewurl = rtnmsg.data.setmod_msgmod_docpth;
title: "电证报文", this.viewurl = viewurl
content: ( this.title = "报文"
<div style={{ height: 400, overflow: "auto" }}> //window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
<ELCMessage }
mty={row.id} else if (cortyp == 'ELC') {
message={rtnmsg.data["\\trnmod\\trndoc\\docinf"]} Modal.info({
/> title: '电证报文', content: <div style={{ height: 400, overflow: 'auto' }}><ELCMessage mty={row.id} message={rtnmsg.data["\\trnmod\\trndoc\\docinf"]} /></div>,
</div> width: 1000,
), })
width: 1000, }
}); else {
} else { // let url = rtnmsg.data.trnmod_trndoc_smh_docpth;
// let url = rtnmsg.data.trnmod_trndoc_smh_docpth; this.title = "面函"
this.title = "面函"; let viewurl = "/#/docpan/show";
let viewurl = "/#/docpan/show"; let XMLdata;
let XMLdata; if (row.pandsc.startsWith("elcs.")) {
if (row.pandsc.startsWith("elcs.")) { window.sessionStorage.docXML = ''
window.sessionStorage.docXML = ""; window.sessionStorage.docTXT = ''
window.sessionStorage.docTXT = ""; rtnmsg.data.trnmod_trndoc_doceot[row.idx].doctxt.rows.forEach(element => {
rtnmsg.data.trnmod_trndoc_doceot[index].doctxt.rows.forEach( window.sessionStorage.docTXT += element + "\r\n"
(element) => { });
window.sessionStorage.docTXT += element + "\r\n"; }
} else if (row.pandsc == "MT799") {
); window.sessionStorage.docTXT = ''
} else if (row.pandsc == "MT799") { XMLdata = rtnmsg.data.litbenl1blk
window.sessionStorage.docTXT = ""; }
XMLdata = rtnmsg.data.litbenl1blk; else{
} else { //参考后台Doceot.butshw order=1000
//参考后台Doceot.butshw order=1000 let execution = 'P', structure = 'l'
let execution = "P", let attr = DocUtils.getDocAttribute(docnam,structure,execution)
structure = "l"; console.log(attr);
let attr = DocUtils.getDocAttribute(docnam, structure, execution); window.sessionStorage.docTXT = ''
window.sessionStorage.docTXT = ""; window.sessionStorage.docXML = rtnmsg.data[attr];
window.sessionStorage.docXML = rtnmsg.data[attr]; window.sessionStorage.docuil = doceot.docuil;
window.sessionStorage.docuil = doceot.docuil; }
} // console.log( window.sessionStorage.docTXT);
// console.log( window.sessionStorage.docTXT); // console.log( window.sessionStorage.docXML);
// console.log( window.sessionStorage.docXML); window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
window.open( }
viewurl, this.dialogOpen = true
"newwindow", }
"height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no" else {
); this.$notify.error({ title: '错误', message: '服务请求失败!' })
}
},
async handleDetail(index, row) {
const params = {
index: row.idx
}
let rtnmsg = await Api.post(`${this.requestPrefix}/executeDocpanDetail`, this.wrapper(params))
if (rtnmsg.respCode == SUCCESS) {
this.title = row.pandsc
this.centerDialogVisible = true,
this.updateModel(rtnmsg.data);
this.dialog = this.model.trnmod.trndoc.doceot[row.idx]
this.index = row.idx
}
} }
this.dialogOpen = true;
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" });
}
},
async handleDetail(index, row) {
const params = {
index: index,
};
let rtnmsg = await Api.post(
`${this.requestPrefix}/executeDocpanDetail`,
this.wrapper(params)
);
if (rtnmsg.respCode == SUCCESS) {
this.title = row.pandsc;
(this.centerDialogVisible = true), this.updateModel(rtnmsg.data);
this.dialog = this.model.trnmod.trndoc.doceot[index];
this.index = index;
}
},
}, },
created: function () {}, created: function () {},
}; };
......
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