From 86fbae80fc9bcc9a9118e031a2ddb0534a27b0e1 Mon Sep 17 00:00:00 2001
From: 张含笑 <zhx18749296735@163.com>
Date: Tue, 22 Jul 2025 11:19:31 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev
---
src/views/tickets/orderLog.vue | 18 ++++++++++++++----
src/store/modules/user.js | 21 ++++++++++++++++-----
2 files changed, 30 insertions(+), 9 deletions(-)
diff --git a/src/store/modules/user.js b/src/store/modules/user.js
index f498d03..2750ef4 100644
--- a/src/store/modules/user.js
+++ b/src/store/modules/user.js
@@ -27,6 +27,7 @@
import { encrypt } from '@/utils/sm2';
import md5 from 'js-md5';
+
const user = {
state: {
tenantId: getStore({ name: 'tenantId' }) || '',
@@ -269,20 +270,30 @@
});
},
GetMenu({ commit, dispatch }, tenantId) {
+ const errLogOut = () => {
+ dispatch('LogOut').then(()=>{
+ const env = import.meta.env.VITE_APP_ENV
+ const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
+ env === 'development'
+ ? window.location.href = "/manage/login"
+ : window.location.replace(`${adminUrl}#/login`)
+ })
+ }
return new Promise(resolve => {
getRoutes(tenantId).then(res => {
const data = res.data.data;
let menu = deepClone(data);
- menu?.forEach(ele => formatPath(ele, true));
+ if (!res.data?.data?.length){
+ errLogOut()
+ return
+ }
+ menu.forEach(ele => formatPath(ele, true));
commit('SET_MENU', menu);
commit('SET_MENU_ALL', menu);
dispatch('GetButtons');
resolve(menu);
}).catch(err =>{
- dispatch('LogOut').then(()=>{
- const adminUrl = import.meta.env.VITE_APP_DASHBOARD_URL
- window.location.replace(`${adminUrl}#/login`)
- })
+ errLogOut()
})
});
},
diff --git a/src/views/tickets/orderLog.vue b/src/views/tickets/orderLog.vue
index e73457a..d836981 100644
--- a/src/views/tickets/orderLog.vue
+++ b/src/views/tickets/orderLog.vue
@@ -54,7 +54,7 @@
</div> -->
<div class="search-bar-box-item">
- <el-select v-model="filters.status" placeholder="请选择工单状态" clearable>
+ <el-select v-model="filters.status" placeholder="请选择工单状态" clearable :disabled="activeTab !== 'all'">
<el-option v-for="item in statuses" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</div>
@@ -341,6 +341,7 @@
<el-button type="danger"
v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)"
@click="submitForm(1)">发布</el-button>
+ <el-button type="primary" v-if="form.status == 0 || (form.status == 2 && userInfo.user_id == form.create_user)" @click="submitForm(0)">保存</el-button>
<!-- <el-button type="primary" v-if="form.status == 0 || userInfo.user_id == form.create_user"
@click="submitForm(0)">保存</el-button> -->
@@ -703,8 +704,8 @@
...mapGetters(['userInfo', 'permission']),
filteredTabs () {
// rejection_and_draft 权限控制“已驳回”和“草稿”tab
- console.log(this.permission, '权限信息')
- console.log(this.userInfo, '权限信息22')
+ // console.log(this.permission, '权限信息')
+ // console.log(this.userInfo, '权限信息22')
const canShowRejectAndDraft = this.permission?.rejection_and_draft === true
return this.tabs
.map(tab => {
@@ -929,6 +930,15 @@
handleTabChange (tab) {
this.activeTab = tab.props?.name || tab.name
this.filters.status = ''
+ if (tab.props?.name === 'WAIT_AUDIT') {
+ this.filters.status = '1'
+ } else if (tab.props?.name === 'REJECTED') {
+ this.filters.status = '2'
+ } else if (tab.props?.name === 'PASS') {
+ this.filters.status = '3'
+ } else if (tab.props?.name === 'DRAFT') {
+ this.filters.status = '0'
+ }
this.page.currentPage = 1
this.fetchTableData()
},
@@ -1197,7 +1207,7 @@
this.page.currentPage = 1
this.onLoad(this.page, this.query)
- this.handleViewDetail()
+ // this.handleViewDetail()
},
/**
* 驳回
--
Gitblit v1.9.3