{{ option.label }}
diff --git a/src/store/modules/user.ts b/src/store/modules/user.ts
index ab16fb7..1c0613d 100644
--- a/src/store/modules/user.ts
+++ b/src/store/modules/user.ts
@@ -15,7 +15,7 @@ const TOKEN_REFRESH_SECONDS = 20 * 60
export interface UserInfoType {
token: string
- tenantList: any[]
+ deptlist: any[]
userInfo: any
}
@@ -122,8 +122,8 @@ export const useUserStore = defineStore({
if (code === ResultEnum.SUCCESS) {
const ex = 7 * 24 * 60 * 60
// 默认设置为第一个租户
- const firstTenant = data.tenantList.length > 0 ? data.tenantList[0] : null
- const tenantId = firstTenant ? firstTenant.id : ''
+ const firstTenant = data.deptlist.length > 0 ? data.deptlist[0] : null
+ const tenantId = firstTenant ? firstTenant.deptno : ''
data.frontmenuTList.forEach((ele) => {
if (ele.description === 'AI工单')
ele.description = '图审审批'
@@ -175,7 +175,7 @@ export const useUserStore = defineStore({
// 登出
async logout() {
this.setPermissions([])
- this.setUserInfo({ tenantList: [], userInfo: {}, token: '' })
+ this.setUserInfo({ deptlist: [], userInfo: {}, token: '' })
this.setTenantId('')
storage.remove(USER_ACCESS_TOKEN)
storage.remove(CURRENT_USER)
diff --git a/src/views/final/content/Content.vue b/src/views/final/content/Content.vue
index 9e38ddf..f53a427 100644
--- a/src/views/final/content/Content.vue
+++ b/src/views/final/content/Content.vue
@@ -41,9 +41,6 @@ import emitter from '@/utils/mitt'
import { formatToDateHMS } from '@/utils/dateUtil'
import { getAllfieldList, getfieldList, savefield } from '@/api/home/filter'
import DataHeader from '@/components/DataHeader/index.vue'
-import console from 'console'
-
-
const emit = defineEmits(['changeShow'])
function changeContent() {
@@ -57,6 +54,7 @@ const route = useRoute()
const reviewType = 0
const sortorder = ref('asc')
const sortname = ref('states')
+const searchContent = route.query.searchContent as string
const actionsColumns = {
title: '操作',
key: 'actions',
@@ -201,6 +199,7 @@ async function getColumns() {
width: 120,
})
}
+ return v
})
}
else {
@@ -212,6 +211,7 @@ async function getColumns() {
fixed: 'left',
width: 120,
})
+ return v
})
userFieldUnFixed.map((v) => {
const item = allList.find(v2 => v2.name == v)
@@ -220,6 +220,7 @@ async function getColumns() {
key: item.name,
width: 120,
})
+ return v
})
}
// TODO: 会导致排序问题 废弃
@@ -421,6 +422,7 @@ async function formatColumns() {
const deviceHeight = ref(600)
onMounted(() => {
+ // query(pagination.page, pagination.pageSize);
emitter.on('filter-final', refreshHandler)
getColumns()
@@ -481,6 +483,7 @@ const message = useMessage()
const finalStore = useFinal()
async function query(page: number, pageSize: number, filterId?: any, taskName?: string) {
+ console.log('query', taskName)
const asideParmas = unref(finalStore.getAsideValue)
// 有过滤配置的时候优先使用过滤配置,不要使用左侧参数
// let params = filterId ? { userSearchId: filterId } : asideParmas
@@ -586,10 +589,6 @@ const scrollX = computed(() => {
return width
})
-onMounted(() => {
- query(pagination.page, pagination.pageSize)
-})
-
const customTabelRef = ref(null)
const importExcelRef = ref(null)
const notPassModalRef = ref(null) // 不通过弹窗
@@ -709,7 +708,7 @@ function resetHandler() {
// TODO:需要支持重置
// const result = await resetApproval()
},
- onNegativeClick: () => { },
+ onNegativeClick: () => {},
})
}
@@ -816,7 +815,7 @@ function doAudit(param: any) {
}
})
},
- onNegativeClick: () => { },
+ onNegativeClick: () => {},
})
}
@@ -855,15 +854,23 @@ function reset() {
async function refreshHandler(searchId?: any) {
reset()
- query(pagination.page, pagination.pageSize, searchId)
+ let searchKeyword = ''
+ if (searchContent) {
+ const id_param = searchContent.match(/-\d+-/)
+ if (id_param)
+ searchKeyword = id_param[0].slice(1, -1)
+ }
+ console.log('refreshHandler', searchKeyword)
+ query(pagination.page, pagination.pageSize, searchId, searchKeyword)
}
function filterTableData(keyword) {
pagination.page = 1
pagination.pageSize = 10
- if (keyword) {
+ if (keyword)
query(pagination.page, pagination.pageSize, '', keyword)
- } else { query(pagination.page, pagination.pageSize) }
+ else
+ query(pagination.page, pagination.pageSize)
}
defineExpose({
@@ -876,10 +883,20 @@ defineExpose({
-->
-
+
-
+
-
+
-
+
diff --git a/src/views/home/aside/Aside.vue b/src/views/home/aside/Aside.vue
index a6b2249..04e198b 100644
--- a/src/views/home/aside/Aside.vue
+++ b/src/views/home/aside/Aside.vue
@@ -10,263 +10,281 @@ import {
shallowRef,
unref,
watch,
-} from "vue";
-import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from "./comp/modals";
-import Search from "./comp/Search.vue";
-import AdvanceFilter from "./comp/AdvanceFilter.vue";
-import { getViewportOffset } from "@/utils/domUtils";
-import { useWindowSizeFn } from "@/hooks/event/useWindowSizeFn";
-import { useConfig } from "@/store/modules/asideConfig";
-import type { Filter } from "/#/home";
-import type { AsideEntity } from "@/config/aside";
-import { asideMap } from "@/config/aside";
-import type { AsideConfig } from "/#/api";
-import emitter from "@/utils/mitt";
-import { getFilterList } from "@/api/home/main";
-import dayjs from "dayjs";
-import { cloneDeep, isEqual } from "lodash-es";
-
-const configStore = useConfig();
+} from 'vue'
+import dayjs from 'dayjs'
+import { cloneDeep, isEqual } from 'lodash-es'
+import { CustomFilterModalVue, FilterModalVue, NewFilterModalVue } from './comp/modals'
+import Search from './comp/Search.vue'
+import AdvanceFilter from './comp/AdvanceFilter.vue'
+import { getViewportOffset } from '@/utils/domUtils'
+import { useWindowSizeFn } from '@/hooks/event/useWindowSizeFn'
+import { useConfig } from '@/store/modules/asideConfig'
+import type { Filter } from '/#/home'
+import type { AsideEntity } from '@/config/aside'
+import { asideMap } from '@/config/aside'
+import type { AsideConfig } from '/#/api'
+import emitter from '@/utils/mitt'
+import { getFilterList } from '@/api/home/main'
+
+const configStore = useConfig()
// 所有左侧模块的值
-let asideValue: Record