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,7 +456,7 @@ import Api from "~/service/Api"; ...@@ -456,7 +456,7 @@ 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() {
...@@ -488,128 +488,110 @@ export default { ...@@ -488,128 +488,110 @@ export default {
"model.trnmod.trndoc.doceot": { "model.trnmod.trndoc.doceot": {
handler(val, oldVal) { handler(val, oldVal) {
var stm = []; var stm = [];
let k = 0;
for (let i = 0; i < val.length; i++) { for (let i = 0; i < val.length; i++) {
if (val[i].role != "") { if (val[i].role != "") {
stm[k++] = val[i]; val[i]['idx'] = i
stm.push(val[i]);
} }
} }
this.stmData.data = stm; this.stmData.data = stm
},
immediate: true,
}, },
immediate: true
}
}, },
methods: { methods: {
saveDialog() { saveDialog() {
this.centerDialogVisible = false; this.centerDialogVisible = false;
this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog); this.model.trnmod.trndoc.doceot.splice(this.index, 1, this.dialog);
this.executeRule("trnmod.trndoc.doccur.butaddok").then((res) => { this.executeRule("trnmod.trndoc.doccur.butaddok").then(res => {
if (res.respCode == SUCCESS) { if(res.respCode==SUCCESS){
//TODO //TODO
} else {
this.$notify.error({ title: "错误", message: "服务请求失败!" }); }else{
this.$notify.error({ title: '错误', message: '服务请求失败!' });
} }
}); })
}, },
async handleDisplay(index, row, doceot) { async handleDisplay(index, row,doceot){
//后续要根据快照模式切换请求方式 //后续要根据快照模式切换请求方式
let cortyp = row.cortyp; let cortyp = row.cortyp
let docuil = doceot.docuil; let docuil = doceot.docuil;
let docnam = doceot.docnam || ""; let docnam = doceot.docnam||'';
docnam = docnam docnam = docnam.substr(docnam.indexOf("\\")+1).toLowerCase().replaceAll("\\","_");
.substr(docnam.indexOf("\\") + 1) let rtnmsg
.toLowerCase() // if (cortyp == 'SWT' || cortyp == 'FMT' || cortyp == 'CMT') {
.replaceAll("\\", "_"); // // this.model.setmod.msgmod.doccod = row.id
let rtnmsg; // rtnmsg = await Api.post(`${this.requestPrefix}/msgmod_butshw`, this.wrapper())
if (cortyp == "SWT" || cortyp == "FMT" || cortyp == "CMT") { // } else {
this.model.setmod.msgmod.doccod = row.id; // // this.model.trnmod.trndoc.doccod = row.id
rtnmsg = await Api.post( // // this.model.trnmod.trndoc.cortyp = cortyp
`${this.requestPrefix}/msgmod_butshw`,
this.wrapper() // }
);
} else {
this.model.trnmod.trndoc.doccod = row.id;
this.model.trnmod.trndoc.cortyp = cortyp;
const params = { const params = {
index: index, index: row.idx
};
rtnmsg = await Api.post(
`${this.requestPrefix}/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') {
let viewurl = rtnmsg.data.setmod_msgmod_docpth; let viewurl = rtnmsg.data.setmod_msgmod_docpth;
this.viewurl = viewurl; this.viewurl = viewurl
this.title = "报文"; this.title = "报文"
//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, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
} else if (cortyp == "ELC") { }
else if (cortyp == 'ELC') {
Modal.info({ Modal.info({
title: "电证报文", title: '电证报文', content: <div style={{ height: 400, overflow: 'auto' }}><ELCMessage mty={row.id} message={rtnmsg.data["\\trnmod\\trndoc\\docinf"]} /></div>,
content: (
<div style={{ height: 400, overflow: "auto" }}>
<ELCMessage
mty={row.id}
message={rtnmsg.data["\\trnmod\\trndoc\\docinf"]}
/>
</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[index].doctxt.rows.forEach( rtnmsg.data.trnmod_trndoc_doceot[row.idx].doctxt.rows.forEach(element => {
(element) => { window.sessionStorage.docTXT += element + "\r\n"
window.sessionStorage.docTXT += element + "\r\n"; });
} }
); else if (row.pandsc == "MT799") {
} else if (row.pandsc == "MT799") { window.sessionStorage.docTXT = ''
window.sessionStorage.docTXT = ""; XMLdata = rtnmsg.data.litbenl1blk
XMLdata = rtnmsg.data.litbenl1blk; }
} else { else{
//参考后台Doceot.butshw order=1000 //参考后台Doceot.butshw order=1000
let execution = "P", let execution = 'P', structure = 'l'
structure = "l"; let attr = DocUtils.getDocAttribute(docnam,structure,execution)
let attr = DocUtils.getDocAttribute(docnam, structure, execution); console.log(attr);
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( window.open(viewurl, 'newwindow', 'height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no');
viewurl, }
"newwindow", this.dialogOpen = true
"height=1200,width=800,top=100,left=100,toolbar=no,resizable=no,menubar=no,location=no, status=no"
);
} }
this.dialogOpen = true; else {
} else { this.$notify.error({ title: '错误', message: '服务请求失败!' })
this.$notify.error({ title: "错误", message: "服务请求失败!" });
} }
}, },
async handleDetail(index, row) { async handleDetail(index, row) {
const params = { const params = {
index: index, index: row.idx
}; }
let rtnmsg = await Api.post( let rtnmsg = await Api.post(`${this.requestPrefix}/executeDocpanDetail`, this.wrapper(params))
`${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.updateModel(rtnmsg.data); this.centerDialogVisible = true,
this.dialog = this.model.trnmod.trndoc.doceot[index]; this.updateModel(rtnmsg.data);
this.index = index; this.dialog = this.model.trnmod.trndoc.doceot[row.idx]
this.index = row.idx
}
} }
},
}, },
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