diff --git a/src/views/operation/seaexport/detail/index.vue b/src/views/operation/seaexport/detail/index.vue index 71650586..436c2581 100644 --- a/src/views/operation/seaexport/detail/index.vue +++ b/src/views/operation/seaexport/detail/index.vue @@ -247,7 +247,7 @@ // } // let { ctx: that, proxy }: any = getCurrentInstance() // 页面loading - const loading = ref(true) + const loading = ref(false) const id = ref(route.query.id) const isCopy = ref(route.query.isCopy || false) const Showtabs = ref(false) diff --git a/src/views/operation/seaexport/index.vue b/src/views/operation/seaexport/index.vue index aa7f71a8..e7ce9c9a 100644 --- a/src/views/operation/seaexport/index.vue +++ b/src/views/operation/seaexport/index.vue @@ -151,7 +151,7 @@ import ConditionFilter from '/@/components/Condition/index.vue' import { onMounted, ref } from 'vue' import { BasicTable, useTable } from '/@/components/Table' - import { PageDataByBooking, UpdateUserQuerySet } from './api/BookingLedger.js' + import { PageDataByBooking, UpdateUserQuerySet, GetUserQuerySet } from './api/BookingLedger.js' import { getColumnsByClient } from '/@/views/baseinfo/formcopy/api' import { useModal } from '/@/components/Modal' import { columns, searchFormSchema, FeeStatus } from './columns' @@ -162,8 +162,8 @@ import { Field } from '/@/components/Render/interface' import { useOptionsStore } from '/@/store/modules/options' const optionsStore = useOptionsStore() - // import { usePermissionStore } from '/@/store/modules/permission' - // import initData from './modules/initData.js' + import { usePermissionStore } from '/@/store/modules/permission' + import initData from './modules/initData.js' import { useRouter, useRoute } from 'vue-router' const router = useRouter() const { notification } = useMessage() @@ -476,12 +476,65 @@ reload() } } + async function createdInit() { + showColumns.value = JSON.parse(JSON.stringify(initData.columns)) + formAllData.value = JSON.parse(JSON.stringify(initData.condAllData)) + fromTableAllData.value = JSON.parse(JSON.stringify(initData.columnsAllData)) + tableHeight.value = document.body.clientHeight - 230 + const res: API.DataResult = await getColumnsByClient({ + tableViewName: 'op_sea_export', + }) + const fullPath = ref(router.currentRoute.value.fullPath) + usePermissionStore().getWrouteList.forEach((item: Record) => { + item.children[0].children?.forEach((item2: Record) => { + if (fullPath.value.indexOf(item2.path) != -1) { + permissionId.value = item2.id + } + }) + }) + if (res.succeeded) { + console.log(res) + + let data: any[] = [] + res.data.forEach((item) => { + data.push({ + id: item.dbColumnName, + title: item.columnDescription, + name: 'Select', + value: null, + props: { + disabled: false, + multiple: false, + // placeholder: '请选择请假事由', + options: [], + }, + style: { + width: '100%', + }, + }) + }) + + fields.value = data + } + FnGetUserQuerySet() + // getConfigUser(true) + } + async function FnGetUserQuerySet() { + const res: API.DataResult = await GetUserQuerySet({ + permissionId: permissionId.value, + }) + if (res.succeeded) { + console.log(res) + AdvancedQueryData.value = JSON.parse(res.data.content) + } + } function handledbclick(record, index, event) { editColumns(record) } onMounted(() => { //初始化 reload() + createdInit() })