|
@@ -275,6 +275,20 @@ export default {
|
|
|
}
|
|
|
// this.formItem = tableColumnArrs.filter(item => item.isdisplay == 1)
|
|
|
},
|
|
|
+ formatData (returnData) {
|
|
|
+ return typeof returnData == 'string' ? JSON.parse(returnData) : returnData
|
|
|
+ },
|
|
|
+ //回显下拉数据
|
|
|
+ resPassters (obj) {
|
|
|
+ const narr = []
|
|
|
+ const nitem = _.cloneDeep(obj)
|
|
|
+ const { passparameters } = nitem
|
|
|
+ if (!passparameters) return ''
|
|
|
+ const ndata = this.formatData(passparameters)
|
|
|
+ if (!Array.isArray(ndata)) return ''
|
|
|
+ ndata.map(({ pageconfigurationid }) => { narr.push(pageconfigurationid) })
|
|
|
+ return narr
|
|
|
+ },
|
|
|
//表格-编辑
|
|
|
handleEdit (row) {
|
|
|
const { openmode, pageroute } = this.pageAuthBtnEdit
|
|
@@ -283,6 +297,9 @@ export default {
|
|
|
this.flag = true
|
|
|
this.tableType = "edit"
|
|
|
this.tableTitle = "编辑"
|
|
|
+ if (row.passparameters) {
|
|
|
+ row.passparameters = this.resPassters(row)
|
|
|
+ }
|
|
|
this.tableForm = _.cloneDeep(row)
|
|
|
|
|
|
},
|
|
@@ -462,14 +479,14 @@ export default {
|
|
|
// const nitem = this.formatPass(passparameters)
|
|
|
// console.log(passparameters)
|
|
|
const passparametersArray = JSON.parse(passparameters)
|
|
|
- passparametersArray.map(item =>{
|
|
|
- if(row[item.pagecode]){
|
|
|
+ passparametersArray.map(item => {
|
|
|
+ if (row[item.pagecode]) {
|
|
|
const alias = item.alias
|
|
|
const pagecode = item.pagecode
|
|
|
- if(alias){
|
|
|
+ if (alias) {
|
|
|
params[alias] = row[item['pagecode']]
|
|
|
}
|
|
|
- else{
|
|
|
+ else {
|
|
|
params[pagecode] = row[item['pagecode']]
|
|
|
}
|
|
|
}
|