|
|
|
@ -341,7 +341,7 @@ import {queryCustomerList} from "@/api/customer/customer"; |
|
|
|
import {verifyData} from "@/api/part/partInformation"; |
|
|
|
import {EventBus} from "../../../main"; |
|
|
|
import TableColumn from "../../common/table.vue"; |
|
|
|
import {updateColumnSize} from "../../../api/table"; |
|
|
|
import {getTableDefaultListLanguage, getTableUserListLanguage, updateColumnSize} from "../../../api/table"; |
|
|
|
|
|
|
|
export default { |
|
|
|
components: { |
|
|
|
@ -1152,6 +1152,8 @@ export default { |
|
|
|
|
|
|
|
created() { |
|
|
|
this.getSiteAndBuByUserName() |
|
|
|
// 动态列 |
|
|
|
this.getTableUserColumn(this.$route.meta.menuId+'table1',1) |
|
|
|
this.getDataList() |
|
|
|
}, |
|
|
|
|
|
|
|
@ -1482,6 +1484,45 @@ export default { |
|
|
|
let s = eval('(' + json + ')') |
|
|
|
return s |
|
|
|
}, |
|
|
|
// 动态列开始 获取 用户保存的 格式列 |
|
|
|
async getTableUserColumn(tableId, columnId) { |
|
|
|
let queryTableUser = { |
|
|
|
userId: this.$store.state.user.name, |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
status: true, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableUserListLanguage(queryTableUser).then(({data}) => { |
|
|
|
if (data.rows.length > 0) { |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.columnList = data.rows |
|
|
|
break; |
|
|
|
} |
|
|
|
} else { |
|
|
|
this.getColumnList(tableId, columnId) |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
|
// 获取 tableDefault 列 |
|
|
|
async getColumnList (tableId, columnId) { |
|
|
|
let queryTable= { |
|
|
|
functionId: this.$route.meta.menuId, |
|
|
|
tableId: tableId, |
|
|
|
languageCode: this.$i18n.locale |
|
|
|
} |
|
|
|
await getTableDefaultListLanguage(queryTable).then(({data}) => { |
|
|
|
if (!data.rows.length === 0) { |
|
|
|
switch (columnId) { |
|
|
|
case 1: |
|
|
|
this.columnList = data.rows |
|
|
|
break; |
|
|
|
} |
|
|
|
} |
|
|
|
}) |
|
|
|
}, |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|