Commit 5cf0986d by Wuyuqiu

公共面板合并

parent 281f5ac8
...@@ -4,8 +4,31 @@ import commonGlobalSearch from "./commonGlobalSearch"; ...@@ -4,8 +4,31 @@ import commonGlobalSearch from "./commonGlobalSearch";
import Utils from "~/utils" import Utils from "~/utils"
import _ from "~/utils/Lodash.js"; import _ from "~/utils/Lodash.js";
const tabNameToRulePathMapping = {
"setpan": "setmod.setpan",
"glepan": "setmod.glemod.glepan",
"docpan": "trnmod.trndoc.docpan",
"doctre": "trnmod.trndoc.doctre",
"cips": "trnmod.cipmod.cips",
"cips2": "trnmod.cipmod.cips",
"engp": "liaall.engp",
"limitbody": "liaall.limmod.limitbody",
"ccvpan": "liaall.liaccv.ccvpan",
"detp1": "setmod.setpan",
"actinf": "recpan.actinf",
"libp": "cnybop.libp",
"basp": "bopmod.dbap.basp",
"basp1": "bopmod.dbdp.basp",
"basp2": "bopmod.dbdp.basp",
"basp3": "bopmod.dbap.basp",
"incp": "cnybop.incp",
"outp": "cnybop.Outp",
"dbb": "bopmod.dbbp.basp",
"dbe": "bopmod.dbep.basp"
}
export default { export default {
mixins: [commonApi, commonDeclare,commonGlobalSearch], mixins: [commonApi, commonDeclare, commonGlobalSearch],
data: function () { data: function () {
return { return {
// 弹框回填 // 弹框回填
...@@ -127,64 +150,75 @@ export default { ...@@ -127,64 +150,75 @@ export default {
if (this.isInDisplay) { if (this.isInDisplay) {
return return
} }
const name = tab.name let name = tab.name
let rulePath;
if (name === "setpan") { const nms = name.split(",")
rulePath = "setmod.setpan"; const arr = []
} for (let i = 0; i < nms.length; i++) {
if (name === "glepan") { const n = nms[i];
rulePath = "setmod.glemod.glepan"; const path = tabNameToRulePathMapping[n]
} if (path) {
if (name === "docpan") { arr.push(path)
rulePath = "trnmod.trndoc.docpan"
}
if (name === "doctre") {
rulePath = "trnmod.trndoc.doctre"
}
if (name === "cips" || name === "cips2") {
rulePath = "trnmod.cipmod.cips"
}
if (name === "engp") {
rulePath = "liaall.engp"
}
if (name === "limitbody") {
rulePath = "liaall.limmod.limitbody"
}
if (name === "ccvpan") {
rulePath = "liaall.liaccv.ccvpan"
}
if( name === "detp1"){
rulePath = "setmod.setpan"
}
if(name === "actinf"){
rulePath = "recpan.actinf"
}
if(name === "libp"){
rulePath = "cnybop.libp"
}
if(name === 'basp'){
rulePath = "bopmod.dbap.basp"
}
if(name === 'basp1'){
rulePath = "bopmod.dbdp.basp"
}
if(name === 'basp2'){
rulePath = "bopmod.dbdp.basp"
}
if(name === 'basp3'){
rulePath = "bopmod.dbap.basp"
}
if(name === 'incp'){
rulePath = "cnybop.incp"
}
if(name === 'outp'){
rulePath = "cnybop.Outp"
} }
if(name === 'dbb'){
rulePath = "bopmod.dbbp.basp"
}if(name === 'dbe'){
rulePath = "bopmod.dbep.basp"
} }
let rulePath = arr.join(",");
// if (name.indexOf("setpan") > -1) {
// name = name.replace("setpan", "setmod.setpan");
// }
// if (name.indexOf("glepan") > -1) {
// name = name.replace("glepan", "setmod.glemod.glepan");
// }
// if (name === "docpan") {
// rulePath = "trnmod.trndoc.docpan"
// }
// if (name === "doctre") {
// rulePath = "trnmod.trndoc.doctre"
// }
// if (name === "cips" || name === "cips2") {
// rulePath = "trnmod.cipmod.cips"
// }
// if (name.indexOf("engp") > -1) {
// name = name.replace("engp", "liaall.engp")
// }
// if (name === "limitbody") {
// rulePath = "liaall.limmod.limitbody"
// }
// if (name === "ccvpan") {
// rulePath = "liaall.liaccv.ccvpan"
// }
// if (name === "detp1") {
// rulePath = "setmod.setpan"
// }
// if (name === "actinf") {
// rulePath = "recpan.actinf"
// }
// if (name === "libp") {
// rulePath = "cnybop.libp"
// }
// if (name === 'basp') {
// rulePath = "bopmod.dbap.basp"
// }
// if (name === 'basp1') {
// rulePath = "bopmod.dbdp.basp"
// }
// if (name === 'basp2') {
// rulePath = "bopmod.dbdp.basp"
// }
// if (name === 'basp3') {
// rulePath = "bopmod.dbap.basp"
// }
// if (name === 'incp') {
// rulePath = "cnybop.incp"
// }
// if (name === 'outp') {
// rulePath = "cnybop.Outp"
// }
// if (name === 'dbb') {
// rulePath = "bopmod.dbbp.basp"
// } if (name === 'dbe') {
// rulePath = "bopmod.dbep.basp"
// }
if (!!rulePath) { if (!!rulePath) {
// if(rulePath == "setmod.setpan"){ // if(rulePath == "setmod.setpan"){
// this.executeCustomRule(rulePath).then(res => { // this.executeCustomRule(rulePath).then(res => {
...@@ -207,7 +241,7 @@ export default { ...@@ -207,7 +241,7 @@ export default {
* @param {any} selfCb 允许延时组数 参数 * @param {any} selfCb 允许延时组数 参数
* @returns * @returns
*/ */
wrapper(params,delayCb) { wrapper(params, delayCb) {
params = params || {} params = params || {}
const fn = async () => { const fn = async () => {
const that = this; const that = this;
...@@ -223,7 +257,7 @@ export default { ...@@ -223,7 +257,7 @@ export default {
} }
return fn; return fn;
}, },
wrapperCustom(params,delayCb) { wrapperCustom(params, delayCb) {
params = params || {} params = params || {}
params['isCustom'] = true params['isCustom'] = true
const fn = async () => { const fn = async () => {
...@@ -277,8 +311,8 @@ export default { ...@@ -277,8 +311,8 @@ export default {
* @param {String} isCover 非机构双击后需要回填的字段值是覆盖还是叠加,部分覆盖值为对象,false为叠加,如{TXT:false},k值为modelUrl的k,如全部覆盖则isCover='T',如全部叠加则isCover='',默认全部覆盖 * @param {String} isCover 非机构双击后需要回填的字段值是覆盖还是叠加,部分覆盖值为对象,false为叠加,如{TXT:false},k值为modelUrl的k,如全部覆盖则isCover='T',如全部叠加则isCover='',默认全部覆盖
* @param {String} defaultColumn 选中列,默认第0列 * @param {String} defaultColumn 选中列,默认第0列
*/ */
showGridPromptDialog(rulePath, columns, shadow, modelUrl, isCover = "T",Dialog='etyDialog', defaultColumn = 0) { showGridPromptDialog(rulePath, columns, shadow, modelUrl, isCover = "T", Dialog = 'etyDialog', defaultColumn = 0) {
this.executeRule(rulePath, {'EventType' : 4}).then((res) => { this.executeRule(rulePath, { 'EventType': 4 }).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
if (res.data.params) { if (res.data.params) {
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
...@@ -303,7 +337,7 @@ export default { ...@@ -303,7 +337,7 @@ export default {
* 下拉框/多选框 改变时执行rule * 下拉框/多选框 改变时执行rule
* @param {String} rulePath 路径 * @param {String} rulePath 路径
*/ */
selectOrCheckboxRule(rulePath){ selectOrCheckboxRule(rulePath) {
this.executeRule(rulePath).then((res) => { this.executeRule(rulePath).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
...@@ -320,7 +354,7 @@ export default { ...@@ -320,7 +354,7 @@ export default {
const obj = {} const obj = {}
obj[props] = val; obj[props] = val;
Utils.copyValueFromVO(this.model, obj); Utils.copyValueFromVO(this.model, obj);
this.executeRule(rulePath, {"selectStatus" : 1}).then((res) => { this.executeRule(rulePath, { "selectStatus": 1 }).then((res) => {
if (res.respCode == SUCCESS) { if (res.respCode == SUCCESS) {
Utils.copyValueFromVO(this.model, res.data); Utils.copyValueFromVO(this.model, res.data);
} }
......
...@@ -83,7 +83,7 @@ ...@@ -83,7 +83,7 @@
</el-tab-pane> </el-tab-pane>
<!--PD000027 --> <!--PD000027 -->
<el-tab-pane label="费用/账务" name="engp"> <el-tab-pane label="费用/账务" name="engp,setpan,glepan">
<c-content> <c-content>
<m-engp :model="model" :codes="codes" /> <m-engp :model="model" :codes="codes" />
</c-content> </c-content>
......
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