Browse Source

超时工单卡片权限

HD_wangm 4 months ago
parent
commit
6b734ee0c2
2 changed files with 10 additions and 7 deletions
  1. 9 6
      pages/index/index.uvue
  2. 1 1
      pages/order/index.uvue

+ 9 - 6
pages/index/index.uvue

@@ -26,7 +26,7 @@
 					</view>
 					<text class="db-text">待评分工单</text>
 				</view>
-				<view class="db-box" @click="navigateToOverdueOrders">
+				<view class="db-box" @click="navigateToOverdueOrders" v-if="checkPermi(['gxt:app:overdue'])" >
 					<view v-if="overdueCount > 0" class="badge"><text class="count">{{ overdueCount }}</text></view>
 					<view class="db-block">
 						<view class="db-center-3">
@@ -82,14 +82,14 @@
 			</common-list> -->
 
 			<!-- 超时工单列表 -->
-			<view class="section-title-container" v-if="overdueListData.length > 0">
+			<view class="section-title-container" v-if="overdueListData.length > 0 && checkPermi(['gxt:app:overdue'])">
 				<view class="section-header">
 					<text class="section-title">超时工单</text>
 					<text class="view-all" @click="navigateToOverdueOrders">查看全部</text>
 				</view>
 			</view>
 			<common-list
-				v-if="overdueListData.length > 0"
+				v-if="overdueListData.length > 0 && checkPermi(['gxt:app:overdue'])"
 				:dataList="overdueListData.slice(0, 2)"
 				:loading="overdueLoading"
 				:hasMore="false"
@@ -138,7 +138,7 @@
 	import { getBaseUrl } from '../../utils/request'
 	import { KeepLive } from '@/uni_modules/android-keeplive'
 	import { getMyNotify } from '../../api/index/index'
-
+	import {checkPermi} from '../../utils/storage'
 	// const handleStartKeepAlive = (userId: string) => {
 	// 	let notifyUrl = getBaseUrl() + "/mobile/notify";
 	// 	console.log("通知地址:" + notifyUrl)
@@ -680,9 +680,12 @@
     }
 
 	.db-view{
+		display: flex;
 		flex-direction: row;
-		justify-content: space-between;
+		// justify-content: space-between;
+		justify-content: flex-start;
 		margin-bottom: 10rpx;
+		// gap: 20rpx;
 
 		.db-box{
 			background-color: #fff;
@@ -690,7 +693,7 @@
 			height: 200rpx;
 			justify-content: center;
 			align-items: center;
-			margin-left: 3px;
+			margin-left: 28rpx;
 			border-radius: 5px;
 			.db-text{
 				margin-top: 10rpx;

+ 1 - 1
pages/order/index.uvue

@@ -12,7 +12,7 @@
 
 		<view class="status-bar">
 			<scroll-view class="scroll-view_H" direction="horizontal" show-scrollbar="false">
-				<view class="scroll-view-item_H uni-bg-red"v-if="checkPermi(['gxt:order:all']) && !dealLoad">
+				<view class="scroll-view-item_H uni-bg-red" v-if="checkPermi(['gxt:order:all']) && !dealLoad">
 					<text class="status-txt" :class="{'stauts-sel': currentStatus === 'all'}" @click="switchStatus('all')">全部</text>
 				</view>
 				<view class="scroll-view-item_H uni-bg-green" v-if="checkPermi(['gxt:maintenance:order:accept','gxt:repairOrder:accept']) && !dealLoad">