Ver código fonte

reactor:质检页面必填项优化(开始扣分时间点,结束扣分时间点)调整为非必填;

zhangchong 7 meses atrás
pai
commit
39bd63f078

+ 1 - 1
src/components/PlayRecord/index.vue

@@ -18,7 +18,7 @@
 				<el-table-column prop="duration" label="时长" align="center" />
 				<el-table-column prop="size" label="操作" align="center">
 					<template #default="{ row }">
-						<el-button type="primary" link v-auth="'public:record:download'" @click="download(row)">下载</el-button>
+						<el-button type="primary" link v-auth="'public:record:download'" @click="download(row)" :loading="loading">下载</el-button>
 					</template>
 				</el-table-column>
 			</el-table>

+ 6 - 6
src/components/ProTable/index.vue

@@ -314,7 +314,7 @@ watch(
 		pageLayout.value = newValue;
 	}
 );
-const currentRowKey = ref(null);
+const currentRowKey = ref(undefined);
 onMounted(() => {
 	useResizeObserver(tableRef, () => {
 		tableRef.value?.doLayout();
@@ -559,7 +559,7 @@ watch(
 );
 
 //下载逻辑
-const downloadObj = reactive({
+const downloadObj = reactive<any>({
 	fileName: '',
 	downloading: false,
 	range: 0,
@@ -584,7 +584,7 @@ const download = async () => {
 		},
 	};
 
-	const data = await downLoadbyPiece(params, config);
+	const data:any = await props.exportMethod(params, config);
 
 	//获取文件总大小
 	const arr = data.headers['content-range'].split('/');
@@ -603,7 +603,7 @@ const download = async () => {
 };
 
 //拿到文件总大小downloadObj.range,计算分为多少都段下载
-const chunkUpload = async (params, fileName, chunkSize) => {
+const chunkUpload = async (params:any, fileName:string, chunkSize:number) => {
 	//获取分段下载的数组
 	let chunkList = [];
 	function chunkPush(page = 1) {
@@ -618,7 +618,7 @@ const chunkUpload = async (params, fileName, chunkSize) => {
 	chunkList.push(downloadObj.range);
 	console.log(chunkList, 'chunkList');
 	//分段组合传参格式处理 0-1024 1024-2048
-	let uploadRange = [];
+	let uploadRange:EmptyArrayType = [];
 	chunkList.forEach((item, i) => {
 		if (i == chunkList.length - 1) return;
 
@@ -633,7 +633,7 @@ const chunkUpload = async (params, fileName, chunkSize) => {
 					Range: `bytes=${uploadRange[index]}`,
 				},
 			};
-			const data = await downLoadbyPiece(params, config);
+			const data = await props.exportMethod(params, config);
 			//计算下载进度
 			downloadObj.percentage = Math.floor(((index + 1) / uploadRange.length) * 100);
 			emit('getDownloadpercent', downloadObj.percentage);

+ 2 - 2
src/views/quality/done/components/Quality-inspection.vue

@@ -124,7 +124,7 @@
 			<el-form-item
 				label="开始扣分时间点"
 				prop="value"
-				:rules="[{ required: true, message: '请选择开始扣分时间点', trigger: 'change' }]"
+				:rules="[{ required: false, message: '请选择开始扣分时间点', trigger: 'change' }]"
 				label-width="140px"
 			>
 				<el-time-picker
@@ -142,7 +142,7 @@
 			<el-form-item
 				label="结束扣分时间点"
 				prop="endValue"
-				:rules="[{ required: true, message: '请选择结束扣分时间点', trigger: 'change' }]"
+				:rules="[{ required: false, message: '请选择结束扣分时间点', trigger: 'change' }]"
 				label-width="140px"
 			>
 				<el-time-picker

+ 3 - 3
src/views/quality/index/components/Quality-inspection.vue

@@ -41,7 +41,7 @@
 					</el-form-item>
 				</el-col>
 				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
-					<el-form-item label="受理人:"> >{{ state.orderDetail.acceptorName }} </el-form-item>
+					<el-form-item label="受理人:">{{ state.orderDetail.acceptorName }} </el-form-item>
 				</el-col>
 				<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
 					<el-form-item label="受理时间:"> {{ formatDate(state.orderDetail?.startTime, 'YYYY-mm-dd HH:MM:SS') }} </el-form-item>
@@ -123,7 +123,7 @@
 			<el-form-item
 				label="开始扣分时间点"
 				prop="value"
-				:rules="[{ required: true, message: '请选择开始扣分时间点', trigger: 'change' }]"
+				:rules="[{ required: false, message: '请选择开始扣分时间点', trigger: 'change' }]"
 				label-width="140px"
 			>
 				<el-time-picker
@@ -141,7 +141,7 @@
 			<el-form-item
 				label="结束扣分时间点"
 				prop="endValue"
-				:rules="[{ required: true, message: '请选择结束扣分时间点', trigger: 'change' }]"
+				:rules="[{ required: false, message: '请选择结束扣分时间点', trigger: 'change' }]"
 				label-width="140px"
 			>
 				<el-time-picker

+ 3 - 6
src/views/quality/index/index.vue

@@ -48,7 +48,6 @@
 				<!-- 表格操作 -->
 				<template #operation="{ row }">
 					<el-button link type="primary" @click="onQualityInspection(row)" v-auth="'quality:inspection'" title="质检"> 质检 </el-button>
-					<order-detail :order="row.order" />
 				</template>
 			</ProTable>
 			<ProTable
@@ -95,7 +94,6 @@
 				<!-- 表格操作 -->
 				<template #operation="{ row }">
 					<el-button link type="primary" @click="onQualityInspection(row)" v-auth="'quality:inspection'" title="质检"> 质检 </el-button>
-					<order-detail :order="row.order" />
 				</template>
 			</ProTable>
 			<ProTable
@@ -142,7 +140,6 @@
 				<!-- 表格操作 -->
 				<template #operation="{ row }">
 					<el-button link type="primary" @click="onQualityInspection(row)" v-auth="'quality:inspection'" title="质检"> 质检 </el-button>
-					<order-detail :order="row.order" />
 				</template>
 			</ProTable>
 		</div>
@@ -214,7 +211,7 @@ const acceptQualityColumns = [
 		minWidth: 120,
 	},
 	{ prop: 'order.fromPhone', label: '来电电话', minWidth: 140 },
-	{ label: '操作', width: 140, fixed: 'right', align: 'center', prop: 'operation' },
+	{ label: '操作', width: 80, fixed: 'right', align: 'center', prop: 'operation' },
 ];
 // 交办待质检表头
 const assignQualityColumns = [
@@ -239,7 +236,7 @@ const assignQualityColumns = [
 		render: (scope: any) => formatDate(scope.row.centerToOrgTime?.creationTime, 'YYYY-mm-dd HH:MM:SS'),
 	},
 	{ prop: 'order.fromPhone', label: '来电电话', minWidth: 140 },
-	{ label: '操作', width: 140, fixed: 'right', align: 'center', prop: 'operation' },
+	{ label: '操作', width: 80, fixed: 'right', align: 'center', prop: 'operation' },
 ];
 // 回访待质检表头
 const visitQualityColumns = [
@@ -285,7 +282,7 @@ const visitQualityColumns = [
 		render: (scope: any) => formatDate(scope.row.visit?.visitTime, 'YYYY-mm-dd HH:MM:SS'),
 	},
 	{ prop: 'order.counterSignTypeText', label: '是否会签', minWidth: 90 },
-	{ label: '操作', width: 140, fixed: 'right', align: 'center', prop: 'operation' },
+	{ label: '操作', width: 80, fixed: 'right', align: 'center', prop: 'operation' },
 ];
 // 手动查询,将页码设置为1
 const handleQuery = () => {