Commit 845f4473 by hulei

fix bugs

parent 7b80b160
export default class DocUtils{
//此用于获取返回的面函模板所在vo属性,参考后台Doceot.getDocRul实现。
static getDocAttribute(docnam,structure,execution){
let pfx = docnam.substring(0,docnam.length-1);
let idx = docnam.substr(docnam.length-1);
let attr = '';
switch(execution){
case 'P':
attr = pfx + structure + idx;
}
return attr+'blk';
}
}
\ No newline at end of file
......@@ -273,10 +273,11 @@
<c-col :span="11" style="text-align:left"><span>操作</span></c-col>
<c-col :span="12" style="text-align:right"><c-button icon="el-icon-s-tools"></c-button></c-col>
</template>
<template>
<template slot-scope="scope">
<c-button
style="margin-left: 0"
size="small"
@click="show(scope.$index)"
>
Show
</c-button>
......@@ -403,6 +404,7 @@ import Api from "~/service/Api"
import CommonProcess from "~/mixin/CommonProcess";
import CodeTable from "~/config/CodeTable"
import Event from "~/model/Trnrel/Event"
import DocUtils from '~/utils/DocUtils'
export default {
name: "InftrnpsDetail",
......@@ -452,6 +454,7 @@ export default {
this.loadData()
},
methods: {
...Event,
loadData() {
// const { data } = this.$route.query
this.model = JSON.parse(sessionStorage.getItem('InftrnpsDetail'));
......@@ -481,7 +484,38 @@ export default {
}
});
},
...Event
async show(idx){
var params = {selDst:"recpan.smhstm",selIds:[idx+1]}
let rtnmsg = await Api.post(`trnrel/executeRule/recpan.smhstm`, this.wrapper(params))
// let rtnmsg = await this.executeRule("trnrel.recpan.smhstm", params)
if (rtnmsg.respCode == SUCCESS) {
this.title = "面函"
let viewurl = "/#/docpan/show";
let XMLdata;
if (row.pandsc.startsWith("elcs.")) {
window.sessionStorage.docXML = ''
window.sessionStorage.docTXT = ''
rtnmsg.data.trnmod_trndoc_doceot[index].doctxt.rows.forEach(element => {
window.sessionStorage.docTXT += element + "\r\n"
});
}
else if (row.pandsc == "MT799") {
window.sessionStorage.docTXT = ''
XMLdata = rtnmsg.data.litbenl1blk
}
else{
//参考后台Doceot.butshw order=1000
let execution = 'P', structure = 'l'
let attr = DocUtils.getDocAttribute(docnam,structure,execution)
window.sessionStorage.docTXT = ''
window.sessionStorage.docXML = rtnmsg.data[attr];
}
window.open(viewurl, '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: '服务请求失败!' })
}
}
}
}
</script>
......
......@@ -396,6 +396,7 @@
import CommonProcess from "~/mixin/CommonProcess";
import Api from "~/service/Api";
import Utils from "~/utils/index";
import DocUtils from '~/utils/DocUtils'
export default {
inject: ['root'],
props: ["model", "codes"],
......@@ -504,7 +505,7 @@ export default {
else{
//参考后台Doceot.butshw order=1000
let execution = 'P', structure = 'l'
let attr = this.getDocAttribute(docnam,structure,execution)
let attr = DocUtils.getDocAttribute(docnam,structure,execution)
window.sessionStorage.docTXT = ''
window.sessionStorage.docXML = rtnmsg.data[attr];
}
......@@ -529,17 +530,6 @@ export default {
this.dialog = rtnmsg.data.trnmod_trndoc_doceot[index]
this.index = index
}
},
//此用于获取返回的面函模板所在vo属性,参考后台Doceot.getDocRul实现。
getDocAttribute(docnam,structure,execution){
let pfx = docnam.substring(0,docnam.length-1);
let idx = docnam.substr(docnam.length-1);
let attr = '';
switch(execution){
case 'P':
attr = pfx + structure + idx;
}
return attr+'blk';
}
},
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