重构海运出口

szh-new
lijingjia 6 months ago
parent 4e057d78b1
commit 4a513ab942

@ -107,6 +107,7 @@ export const useUserStore = defineStore({
if (res !== undefined) { if (res !== undefined) {
const token = res?.data const token = res?.data
this.setToken(token) this.setToken(token)
return
return this.afterLoginAction(true) return this.afterLoginAction(true)
} }
} catch (error) { } catch (error) {
@ -117,12 +118,7 @@ export const useUserStore = defineStore({
if (!this.getToken) return null if (!this.getToken) return null
// get user info // get user info
const userInfo = await this.getUserInfoAction() const userInfo = await this.getUserInfoAction()
// const res: API.DataResult = await getCollectWarningCount()
// console.log(res)
const sessionTimeout = this.sessionTimeout const sessionTimeout = this.sessionTimeout
console.log(sessionTimeout)
if (sessionTimeout) { if (sessionTimeout) {
this.setSessionTimeout(false) this.setSessionTimeout(false)
} else { } else {
@ -183,7 +179,7 @@ export const useUserStore = defineStore({
this.setToken(undefined) this.setToken(undefined)
this.setSessionTimeout(false) this.setSessionTimeout(false)
this.setUserInfo(null) this.setUserInfo(null)
localStorage.clear() // localStorage.clear()
goLogin && router.push(PageEnum.BASE_LOGIN) goLogin && router.push(PageEnum.BASE_LOGIN)
}, },
@ -199,9 +195,9 @@ export const useUserStore = defineStore({
content: () => h('span', t('sys.app.logoutMessage')), content: () => h('span', t('sys.app.logoutMessage')),
onOk: async () => { onOk: async () => {
await this.logout(true) await this.logout(true)
}, }
}) })
}, }
}, },
}) })

@ -66,8 +66,6 @@
<ConditionFilter v-model="AdvancedQueryData" :filter-fields="fields" :disabled="false" /> <ConditionFilter v-model="AdvancedQueryData" :filter-fields="fields" :disabled="false" />
</div> </div>
</a-modal> </a-modal>
<!-- 批量编辑 -->
<!-- <BatchModification @register="registerModal" @success="BMSuccess" /> -->
<a-modal <a-modal
:title=" :title="
TaskShippingOrderCompareData.isExistsDiff ? '下货纸比对(有差异)' : '下货纸比对(正常)' TaskShippingOrderCompareData.isExistsDiff ? '下货纸比对(有差异)' : '下货纸比对(正常)'
@ -112,10 +110,6 @@
> >
<p>{{ item.fieldName }}:</p> <p>{{ item.fieldName }}:</p>
<p>{{ item.reqVal }}</p> <p>{{ item.reqVal }}</p>
<!-- <p v-if="item.msg">
<a-icon type="close" :style="{ color: 'red' }" />
</p>
<p v-else><a-icon type="check" :style="{ color: 'green' }" /></p> -->
<p>{{ item.fieldName }}:</p> <p>{{ item.fieldName }}:</p>
<p v-if="!item.isDiff">{{ item.targetVal }}</p> <p v-if="!item.isDiff">{{ item.targetVal }}</p>
<p v-else v-html="item.mergeHtml"></p> <p v-else v-html="item.mergeHtml"></p>
@ -143,10 +137,6 @@
> >
<p>{{ item.fieldName }}:</p> <p>{{ item.fieldName }}:</p>
<p>{{ item.reqVal }}</p> <p>{{ item.reqVal }}</p>
<!-- <p v-if="item.msg">
<a-icon type="close" :style="{ color: 'red' }" />
</p>
<p v-else><a-icon type="check" :style="{ color: 'green' }" /></p> -->
<p>{{ item.fieldName }}:</p> <p>{{ item.fieldName }}:</p>
<p v-if="!item.isDiff">{{ item.targetVal }}</p> <p v-if="!item.isDiff">{{ item.targetVal }}</p>
<p v-else v-html="item.mergeHtml"></p> <p v-else v-html="item.mergeHtml"></p>
@ -158,11 +148,10 @@
</template> </template>
<script lang="ts" setup> <script lang="ts" setup>
import TableActionBar from './components/tableActionBar.vue' import TableActionBar from './components/tableActionBar.vue'
// import BatchModification from './modules/BatchModification.vue'
import ConditionFilter from '/@/components/Condition/index.vue' import ConditionFilter from '/@/components/Condition/index.vue'
import { onMounted, ref } from 'vue' import { onMounted, ref } from 'vue'
import { BasicTable, useTable } from '/@/components/Table' import { BasicTable, useTable } from '/@/components/Table'
import { PageDataByBooking, GetUserQuerySet, UpdateUserQuerySet } from './api/BookingLedger.js' import { PageDataByBooking, UpdateUserQuerySet } from './api/BookingLedger.js'
import { getColumnsByClient } from '/@/views/baseinfo/formcopy/api' import { getColumnsByClient } from '/@/views/baseinfo/formcopy/api'
import { useModal } from '/@/components/Modal' import { useModal } from '/@/components/Modal'
import { columns, searchFormSchema, FeeStatus } from './columns' import { columns, searchFormSchema, FeeStatus } from './columns'
@ -394,13 +383,12 @@
// //
function FnOpenAdvancedQuery() { function FnOpenAdvancedQuery() {
AdvancedQueryVisible.value = true AdvancedQueryVisible.value = true
createdInit()
} }
// //
function FnCancelAdvancedQuery() { function FnCancelAdvancedQuery() {
AdvancedQueryVisible.value = false AdvancedQueryVisible.value = false
} }
// //
function batchEditing() { function batchEditing() {
const select = getSelectRows() const select = getSelectRows()
if (select.length === 0) { if (select.length === 0) {
@ -415,60 +403,8 @@
function TaskShippingOrderCompareHandleCancel() { function TaskShippingOrderCompareHandleCancel() {
TaskShippingOrderCompareVisible.value = false TaskShippingOrderCompareVisible.value = false
} }
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<any, any>) => {
item.children[0].children?.forEach((item2: Record<any, any>) => {
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)
}
const permissionId = ref<String>('') const permissionId = ref<String>('')
const ConditionalList: Ref<any> = ref() const ConditionalList: Ref<any> = ref()
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)
}
}
// //
async function FnAdvancedQuery() { async function FnAdvancedQuery() {
let Api = (data) => { let Api = (data) => {

Loading…
Cancel
Save