|
@@ -95,7 +95,7 @@ export default {
|
|
|
authBtns: [], //表格里面的操作按钮
|
|
|
dataContent: {}, //表格查询数据
|
|
|
pageServiceId: null, //表格serviceid
|
|
|
- formItem: null, //弹框表单渲染数据
|
|
|
+ formItem: [], //弹框表单渲染数据
|
|
|
flag: false, //弹框表单开关
|
|
|
tableType: "add", //弹框表单弹框类型
|
|
|
tableTitle: "新增", //弹框表单标题
|
|
@@ -174,21 +174,21 @@ export default {
|
|
|
getPageTableSetting (pageAuths, pageAuthtables) {
|
|
|
const authTableObj = pageAuthtables[0]
|
|
|
//获取当前页面table的配置
|
|
|
- const { pagename, pageconfigurationid, serviceid, pagecode } = authTableObj
|
|
|
+ const { pagename, pageconfigurationid, serviceid, pagecode, userpermissionsid } = authTableObj
|
|
|
//获取当前页面table的按钮权限
|
|
|
const currPageBtns = pageAuths.filter(item => item['superiorid'] == pageconfigurationid)
|
|
|
if (currPageBtns?.length) this.tableBtns.push(...currPageBtns)
|
|
|
this.authBtns = pageAuths.filter(item => item.superiorid == pageconfigurationid && item.pagetype == 4)
|
|
|
this.pageServiceId = serviceid;
|
|
|
this.pageTitle = pagename
|
|
|
- this.getColumnData(pagecode)
|
|
|
+ this.getColumnData(pagecode, userpermissionsid)
|
|
|
},
|
|
|
//根据页面按钮设置数据
|
|
|
getPageBtnSetting (pageAuthbtns) {
|
|
|
this.tableBtns.push(...pageAuthbtns)
|
|
|
},
|
|
|
//获取表头数据
|
|
|
- async getColumnData (pagecode) {
|
|
|
+ async getColumnData (pagecode, id) {
|
|
|
try {
|
|
|
const { code, returnData } = await Query({
|
|
|
serviceid: '3',
|
|
@@ -200,8 +200,8 @@ export default {
|
|
|
this.$store.dispatch('auth/changeAuthMsg', returnData)
|
|
|
const tableColsCopy = _.cloneDeep(returnData).filter((item) => item.isdisplay == 2);
|
|
|
const tableColsCopyOrder = _.orderBy(tableColsCopy, ['displaynumber'], ['asc']);
|
|
|
- this.formItem = _.cloneDeep(returnData).filter((item) => item.isdisplay == 2 || item.isdisplay == 3);
|
|
|
- this.formItem = _.orderBy(this.formItem, ['displaynumber'], ['asc']);
|
|
|
+ const formItemCopy = _.cloneDeep(returnData).filter((item) => item.isdisplay == 2 || item.isdisplay == 3);
|
|
|
+ this.formItem = _.orderBy(formItemCopy, ['displaynumber'], ['asc']);
|
|
|
this.tableCols = tableColsCopyOrder;
|
|
|
}
|
|
|
} else {
|