yangg 3 일 전
부모
커밋
6405c631e1
3개의 변경된 파일31개의 추가작업 그리고 18개의 파일을 삭제
  1. 17 5
      src/views/system/devicemaintenance/crud.tsx
  2. 9 9
      src/views/system/home/index.vue
  3. 5 4
      src/views/system/screenconsole/index.vue

+ 17 - 5
src/views/system/devicemaintenance/crud.tsx

@@ -1,4 +1,4 @@
-import { AddReq, CreateCrudOptionsProps,dict, CreateCrudOptionsRet, UserPageQuery } from '@fast-crud/fast-crud';
+import { AddReq, CreateCrudOptionsProps,dict, CreateCrudOptionsRet, UserPageQuery,compute } from '@fast-crud/fast-crud';
 import * as api from './api';
 import { auth } from '/@/utils/authFunction';
 import { ja } from 'element-plus/es/locale';
@@ -130,7 +130,7 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 						minWidth: 120,
 					},
 					form: {
-						show:false,
+						show:true,
 						component: { placeholder: '请填写设备编码' },
 						rules: [{ required: true, message: '请填写设备编码' }],
 					},
@@ -204,14 +204,14 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 					}
 				},
 				damage_reason:{
-					title: '报损原因',
+					title: '原因',
 					type: 'input',
 					column: {
 						minWidth: 120,
 					},
 					form: {
-						component: { placeholder: '请填写报损原因' },
-						rules: [{ required: false, message: '请填写报损原因' }],
+						component: { placeholder: '请填写原因' },
+						rules: [{ required: false, message: '请填写原因' }],
 					},
 					viewForm:{
 						component: { placeholder: '' },
@@ -223,14 +223,26 @@ export const createCrudOptions = function ({ crudExpose }: CreateCrudOptionsProp
 					type: 'input',
 					column: {
 						minWidth: 120,
+						show:compute(({ form }) => {
+							// 只有当选择了胜任力标签时才显示配置
+							return form && form.damage_type === 1;
+						})
 					},
 					form: {
 						component: { placeholder: '请填写预估维修费用' },
 						rules: [{ required: false, message: '请填写预估维修费用' }],
+						show:compute(({ form }) => {
+							// 只有当选择了胜任力标签时才显示配置
+							return form && form.damage_type === 1;
+						})
 					},
 					viewForm:{
 						component: { placeholder: '' },
 						rules: [{ required: true, message: '' }],
+						show:compute(({ form }) => {
+							// 只有当选择了胜任力标签时才显示配置
+							return form && form.damage_type === 1;
+						})
 					}
 				},
 				responsible_person:{

+ 9 - 9
src/views/system/home/index.vue

@@ -18,7 +18,7 @@
 									<div class="navboxall" id="echart5" style="height: 95%;"></div>
 								</div>
 								<div class="boxall" style="height:300px; overflow: hidden;">
-									<div class="alltitle">Top20单台设备累计借用时长排名</div>
+									<div class="alltitle">单台设备累计借用时长排名</div>
 									<div class="navboxall">
 										<div class="wraptit">
 											<span>排名</span><span>设备名称</span><span>设备编号</span><span>借用时长</span>
@@ -37,10 +37,10 @@
 										</div>
 									</div>
 								</div>
-								<div class="boxall" style="height:260px; overflow: hidden;">
+								<!-- <div class="boxall" style="height:260px; overflow: hidden;">
 									<div class="alltitle">设备故障统计</div>
 									<div class="navboxall" id="echart1" style="height: 95%;"></div>
-								</div>
+								</div> -->
 							</li>
 
 							<li>
@@ -79,10 +79,10 @@
 									<div class="navboxall" id="echart3" style="height: 95%;"></div>
 								</div>
 
-								<div class="boxall" style="height:350px">
+								<!-- <div class="boxall" style="height:350px">
 									<div class="alltitle">设备实时执行情况</div>
 									<div class="navboxall" id="echart4" style="height: 95%;"></div>
-								</div>
+								</div> -->
 								
 							</li>
 
@@ -96,8 +96,8 @@
 									<el-radio-button label="year">今年</el-radio-button>
 									</el-radio-group>
 								</div>
-								<div class="boxall" style="height:445px; overflow: hidden;">
-									<div class="alltitle">Top20单台设备累计借用次数排名</div>
+								<div class="boxall" style="height:350px; overflow: hidden;">
+									<div class="alltitle">单台设备累计借用次数排名</div>
 									<div class="navboxall">
 									
 									<div class="filter-bar" style="margin-bottom: 10px; display: flex; gap: 12px; align-items: center;">
@@ -160,9 +160,9 @@
 									<div class="alltitle">借用次数最多的用户</div>
 									<div class="navboxall" id="echart2" style="height: 95%;"></div>
 								</div>
-								<div class="boxall" style="height:300px">
+								<!-- <div class="boxall" style="height:300px">
 									<div class="alltitle">设备维修时间统计</div>
-								</div>
+								</div> -->
 							</li>
 						</ul>
 					</div>

+ 5 - 4
src/views/system/screenconsole/index.vue

@@ -11,9 +11,12 @@
 		</el-row>
 
 		<el-row :gutter="15" class="home-row">
-		<el-col :span="24">
+		<el-col :span="12">
 			<BorrowRankingList/>
 		</el-col>
+		<el-col :span="12">
+			<BorrowTrendsChart />
+		</el-col>
 		</el-row>
 
 		<!-- <el-row :gutter="15" class="home-row" style="margin-top: 20px">
@@ -29,9 +32,7 @@
 		<!-- <el-col :span="12">
 			<UtilizationTrend />
 		</el-col> -->
-		<el-col :span="12">
-			<BorrowTrendsChart />
-		</el-col>
+		
 		</el-row>
 
 		<!-- 第二行 -->