Commit b346ca3b by 乔延琦

Merge branch 'develop-zhouyi' into 'develop'

Develop zhouyi

See merge request GFP/RBC/rbc-frontend!117
parents 0c586a66 f05271fe
......@@ -173,6 +173,7 @@ export default {
selectedSuggestion: [],
themeColor: this.define?.config?.fontColor || '#5369D8',
currentHoverSuggestion: null,
currentTagId: null,
}
},
watch: {
......@@ -187,6 +188,7 @@ export default {
// this.reviewParam['billid'] = this.$route.query.id;
this.context.bill.setGlobalParam('reviewParam',this.reviewParam);
this.value = this.context.bill.getGlobalParam('reviewParam').suggestions
this.currentTagId = window.nros.context.getCurrTag()
window.GMS.vbus.$on('approval-user-control-edit', this.openEditModal)
window.GMS.vbus.$on('approval-user-control-add', this.handleAdd)
this.getSuggestionOptions()
......@@ -200,6 +202,7 @@ export default {
this.$set(suggestion, 'visible', true)
},
openEditModal() {
if (this.currentTagId && this.currentTagId != window.nros.context.getCurrTag()) return
this.suggestionOptionModal = true
},
genCode() {
......@@ -260,6 +263,8 @@ export default {
this.value = s.spyj
},
handleAdd() {
if (this.currentTagId && this.currentTagId != window.nros.context.getCurrTag()) return
this.currentEditSuggestion = {
code: this.genCode(),
spyj: this.value,
......
......@@ -38,15 +38,29 @@ export default {
}
const getBaseDataList = (originFieldValue) => {
const promistList = []
for (let i = 0; i < argList.length; i += 2) {
promistList.push(this.getMDObject({
const getList = (originFieldValue) => {
const paramList = []
for (let i = 0; i < argList.length; i += 2) {
paramList.push({
...requestParam,
tableName: argList[i + 1],
objectcode: originFieldValue[argList[i]],
})
}
return this.getCombBaseDataList(paramList)
}
if (originFieldValue._type) {
return this.getMDObject({
...requestParam,
tableName: argList[i + 1],
objectcode: originFieldValue[argList[i]],
}))
tableName: originFieldValue._type.split('.')[1],
code: originFieldValue.code,
}).then((res) => {
return getList(res)
})
}
else {
return getList(originFieldValue)
}
return Promise.all(promistList)
}
const getFormattedString = (originFieldValue, basedataObjectList, templateString) => {
const matchList = templateString.match(/`.+?`/g)
......@@ -114,6 +128,12 @@ export default {
}).catch((resp) => {
});
},
getCombBaseDataList(param) {
return GMS.$http.post("/rbcfunc/getCombBaseDataList", param).then(res => {
return (res && res.data && res.data.data || []).map((o) => o && o[0] || {})
}).catch((res) => {
});
},
getResultType: function () {
return FMR.ConstDataTypes.General;
}
......
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