浏览代码

reactor:类型优化;

zhangchong 7 月之前
父节点
当前提交
104d353cfb

+ 1 - 1
src/views/business/special/apply.vue

@@ -54,7 +54,7 @@ const router = useRouter(); // 路由
 const proTableRef = ref<RefType>(); // 表格ref
 // 表格配置项
 const columns = ref<any[]>([
-	{ type: 'selection', fixed: 'left', minWidth: 40,align: 'center' },
+	{ type: 'selection',minWidth: 40,align: 'center' },
 	{ prop: 'no', label: '工单编码', minWidth: 140 },
 	{ prop: 'isProvinceText', label: '省/市工单', minWidth: 90 },
 	{ prop: 'currentStepName', label: '当前节点', minWidth: 100 },

+ 1 - 1
src/views/business/special/audit.vue

@@ -71,7 +71,7 @@ const selectable = (row: any) => {
 };
 // 表格配置项
 const columns = ref<any[]>([
-	{ type: 'selection', fixed: 'left', selectable: selectable, minWidth: 40, align: 'center' },
+	{ type: 'selection', selectable: selectable, minWidth: 40, align: 'center' },
 	{ prop: 'order.no', label: '工单编码', minWidth: 140 },
 	{ prop: 'order.isProvinceText', label: '省/市工单', minWidth: 90 },
 	{ prop: 'order.title', label: '工单标题', minWidth: 200 },

+ 2 - 1
src/views/business/special/components/Special-apply-order.vue

@@ -223,8 +223,9 @@ const queryHandleTime = () => {
 		.then((res) => {
 			state.ruleForm.timeLimit = res.result.count ?? 0; // 办理时限
 			state.ruleForm.timeLimitUnit = res.result.timeType ?? ''; // 办理时限单位
+			state.loading = false;
 		})
-		.finally(() => {
+		.catch(() => {
 			state.loading = false;
 		});
 };

+ 1 - 1
src/views/business/special/components/Special-apply.vue

@@ -136,9 +136,9 @@ const openDialog = async (val: any) => {
 		const { result } = await specialApplyBase(val.workflowId);
 		steps.value = result?.step?.steps ?? [];
 		specialReason.value = result.specialReason ?? [];
+		state.loading = false;
 	} catch (e) {
 		console.log(e);
-	} finally {
 		state.loading = false;
 	}
 };

+ 1 - 3
src/views/business/special/components/Special-audit-detail.vue

@@ -91,8 +91,6 @@ import { transformFile } from '@/utils/tools';
 // 引入组件
 const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
 
-// 定义子组件向父组件传值/事件
-const emit = defineEmits(['updateList']);
 // 定义变量内容
 const state = reactive<any>({
 	dialogVisible: false, // 是否显示弹窗
@@ -107,9 +105,9 @@ const openDialog = async (id: string) => {
 		const { result } = await specialDetail(id);
 		state.detail = result;
 		state.detail.files = transformFile(result.files);
+		state.loading = false;
 	} catch (e) {
 		console.log(e);
-	} finally {
 		state.loading = false;
 	}
 };

+ 1 - 4
src/views/business/special/components/Special-audit-multiple.vue

@@ -28,15 +28,12 @@
 	</el-dialog>
 </template>
 <script setup lang="ts">
-import { defineAsyncComponent, reactive, ref } from 'vue';
+import { reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
 import { storeToRefs } from 'pinia';
 import { useUserInfo } from '@/stores/userInfo';
 import { specialApproveBatch } from '@/api/business/special';
 
-// 引入组件
-const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
-
 // 定义子组件向父组件传值/事件
 const emit = defineEmits(['updateList']);
 // 定义变量内容

+ 0 - 6
src/views/business/special/components/Special-audit.vue

@@ -71,12 +71,9 @@
 <script setup lang="ts">
 import { defineAsyncComponent, reactive, ref } from 'vue';
 import { ElMessage, FormInstance } from 'element-plus';
-import { storeToRefs } from 'pinia';
-import { useUserInfo } from '@/stores/userInfo';
 import { formatDate } from '@/utils/formatTime';
 import { specialApplyBase, specialApprove, specialDetail } from '@/api/business/special';
 import { transformFile } from '@/utils/tools';
-import { orderTimeConfig } from '@/api/business/order';
 
 // 引入组件
 const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue'));
@@ -101,8 +98,6 @@ const state = reactive<any>({
 	workflowId: null, // 工作流id
 });
 const ruleFormRef = ref<RefType>();
-const storesUserInfo = useUserInfo();
-const { userInfos } = storeToRefs(storesUserInfo); // 用户信息
 const steps = ref<EmptyArrayType>([]); // 特提节点
 const stepsItems = ref<EmptyArrayType>([]); // 处理对象
 const specialTimeType = ref<EmptyArrayType>([]); // 期满时间单位
@@ -127,7 +122,6 @@ const openDialog = async (val: any) => {
     state.loading = false;
 	} catch (e) {
 		console.log(e);
-	} finally {
 		state.loading = false;
 	}
 };

+ 1 - 3
src/views/business/special/index.vue

@@ -66,7 +66,6 @@
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
 import { formatDate } from '@/utils/formatTime';
-import { useRouter } from 'vue-router';
 import { specialListAll } from '@/api/business/special';
 import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
 // 引入组件
@@ -74,11 +73,10 @@ const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/
 const SpecialAuditDetail = defineAsyncComponent(() => import('@/views/business/special/components/Special-audit-detail.vue')); // 审批详情
 // 定义变量内容
 const ruleFormRef = ref<RefType>(); // 表单ref
-const router = useRouter(); // 路由
 const proTableRef = ref<RefType>(); // 表格ref
 // 表格配置项
 const columns = ref<any[]>([
-	{ prop: 'expiredStatusText', label: '超期状态', align: 'center', fixed: 'left', width: 80 },
+	{ prop: 'expiredStatusText', label: '超期状态', align: 'center', width: 80 },
 	{ prop: 'no', label: '工单编码', width: 140 },
 	{ prop: 'statusText', label: '工单状态', minWidth: 100 },
 	{ prop: 'state', label: '审批状态', minWidth: 100 },

+ 0 - 178
src/views/statistics/call/telephone.vue

@@ -1,178 +0,0 @@
-<template>
-	<div class="statistics-call-telephone-container layout-padding">
-		<div class="layout-padding-auto layout-padding-view pd20">
-			<ProTable
-				ref="proTableRef"
-				:columns="columns"
-				:data="state.tableData"
-				@updateTable="queryList"
-				:loading="state.loading"
-				:total="state.total"
-				v-model:page-index="state.queryParams.PageIndex"
-				v-model:page-size="state.queryParams.PageSize"
-			>
-				<template #table-search>
-					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent label-width="100px">
-						<el-row :gutter="10">
-							<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
-								<el-form-item label="时间段" prop="crTime">
-									<el-date-picker
-										v-model="state.queryParams.crTime"
-										type="daterange"
-										unlink-panels
-										range-separator="至"
-										start-placeholder="开始时间"
-										end-placeholder="结束时间"
-										:shortcuts="shortcuts"
-										@change="handleQuery"
-										value-format="YYYY-MM-DD"
-										:clearable="false"
-									/>
-								</el-form-item>
-							</el-col>
-							<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
-								<el-form-item label="坐席人员" prop="Keyword">
-									<el-input v-model="state.queryParams.Keyword" placeholder="坐席人员" clearable @keyup.enter="handleQuery" />
-								</el-form-item>
-							</el-col>
-							<transition name="el-zoom-in-top">
-								<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" v-show="!searchCol">
-									<el-form-item label="工号" prop="Keyword">
-										<el-input v-model="state.queryParams.Keyword" placeholder="工号" clearable @keyup.enter="handleQuery" />
-									</el-form-item>
-								</el-col>
-							</transition>
-							<transition name="el-zoom-in-top">
-								<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" v-show="!searchCol">
-									<el-form-item label="工作组" prop="Keyword">
-										<el-input v-model="state.queryParams.Keyword" placeholder="工作组" clearable @keyup.enter="handleQuery" />
-									</el-form-item>
-								</el-col>
-							</transition>
-							<transition name="el-zoom-in-top">
-								<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8" v-show="!searchCol">
-									<el-form-item label="动作类型" prop="DelayState">
-										<el-select v-model="state.queryParams.DelayState" placeholder="动作类型" class="w100">
-											<el-option v-for="item in delayStateOptions" :value="item.key" :key="item.key" :label="item.value" />
-										</el-select>
-									</el-form-item>
-								</el-col>
-							</transition>
-							<el-col :xs="24" :sm="12" :md="12" :lg="8" :xl="8">
-								<el-form-item label=" ">
-									<div class="flex-end w100">
-										<el-button type="primary" @click="handleQuery" :loading="state.loading">
-											<SvgIcon name="ele-Search" class="mr5" />查询
-										</el-button>
-										<el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
-											<SvgIcon name="ele-Refresh" class="mr5" />重置
-										</el-button>
-										<el-button link type="primary" @click="closeSearch" :loading="state.loading">
-											{{ searchCol ? '展开' : '收起' }}
-											<SvgIcon :class="{ 'is-reverse': searchCol }" name="ele-ArrowUp" class="mr5 arrow" size="18px" />
-										</el-button>
-									</div>
-								</el-form-item>
-							</el-col>
-						</el-row>
-					</el-form>
-				</template>
-			</ProTable>
-		</div>
-	</div>
-</template>
-<script setup lang="tsx" name="statisticsCallTel">
-import { onMounted, reactive, ref } from 'vue';
-import { FormInstance } from 'element-plus';
-import { knowledgeList } from '@/api/statistics/knowledge';
-import { defaultDate, shortcuts } from '@/utils/constants';
-import { formatDate } from '@/utils/formatTime';
-import Other from "@/utils/other";
-const proTableRef = ref<RefType>(); // 表格ref
-// 表格配置项
-const columns = ref<any[]>([
-	{ prop: 'orgName', label: '坐席人员', align: 'center' },
-	{ prop: 'addNum', label: '工号', align: 'center', sortable: 'custom' },
-	{ prop: 'addNum', label: '工作组', align: 'center', sortable: 'custom' },
-	{ prop: 'addNum', label: '工作类型', align: 'center', sortable: 'custom' },
-	{
-		prop: 'addNum',
-		label: '开始时间',
-		align: 'center',
-		sortable: 'custom',
-		render: (scope) => <span>{formatDate(scope.row.expiredTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
-	},
-	{
-		prop: 'deleteNum',
-		label: '结束时间',
-		align: 'center',
-		sortable: 'custom',
-		render: (scope) => <span>{formatDate(scope.row.expiredTime, 'YYYY-mm-dd HH:MM:SS')}</span>,
-	},
-	{ prop: 'deleteNum', label: '使用时间(秒)', align: 'center', sortable: 'custom' },
-]);
-// 定义变量内容
-const ruleFormRef = ref<RefType>(); // 表单ref
-const state = reactive<any>({
-	queryParams: {
-		// 查询条件
-		PageIndex: 1,
-		PageSize: 10,
-		Keyword: null, // 关键词
-		crTime: defaultDate, // 时间默认今天开始到今天结束
-    DelayState:null
-	},
-	tableData: [], //表单
-	loading: false, // 加载
-	total: 0, // 总数
-});
-const delayStateOptions = ref<EmptyArrayType>([]); // 延期状态
-const searchCol = ref(true); // 展开/收起
-// 展开/收起
-const closeSearch = () => {
-	searchCol.value = !searchCol.value;
-};
-/** 搜索按钮操作 */
-const handleQuery = () => {
-	// state.queryParams.PageIndex = 1;
-	queryList();
-};
-/** 获取列表 */
-const requestParams = ref<EmptyObjectType>({});
-const queryList = () => {
-	state.loading = true;
-  requestParams.value = Other.deepClone(state.queryParams);
-  requestParams.value.StartTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[0];
-  requestParams.value.EndTime = state.queryParams.crTime === null ? null : state.queryParams.crTime[1];
-  Reflect.deleteProperty(requestParams.value, 'crTime');
-	knowledgeList(requestParams.value)
-		.then((res: any) => {
-			state.tableData = res.result?.items ?? [];
-			state.total = res.result?.total ?? 0;
-			state.loading = false;
-		})
-		.catch(() => {
-			state.loading = false;
-		});
-};
-/** 重置按钮操作 */
-const resetQuery = (formEl: FormInstance | undefined) => {
-	if (!formEl) return;
-	formEl.resetFields();
-	queryList();
-};
-onMounted(() => {
-	queryList();
-});
-</script>
-<style lang="scss" scoped>
-.statistics-call-telephone-container {
-	.arrow {
-		transition: transform var(--el-transition-duration);
-		cursor: pointer;
-	}
-	.arrow.is-reverse {
-		transform: rotateZ(-180deg);
-	}
-}
-</style>

+ 47 - 74
src/views/statistics/center/detailWrongItem.vue

@@ -1,6 +1,6 @@
 <template>
 	<div class="statistics-center-detail-wrong-item-container layout-padding">
-    <div class="layout-padding-auto layout-padding-view pd20">
+		<div class="layout-padding-auto layout-padding-view pd20">
 			<ProTable
 				ref="proTableRef"
 				:columns="columns"
@@ -14,66 +14,53 @@
 				:exportMethod="centerReturnErrorDetailExport"
 				:exportParams="requestParams"
 			>
-        <template #table-search>
-          <el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent>
-            <el-row :gutter="20">
-              <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
-                <el-form-item label="部门名称" prop="OrgName">
-                  <el-input v-model="state.queryParams.OrgName" placeholder="部门名称" clearable @keyup.enter="handleQuery" class="keyword-input" />
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
-                <el-form-item label="工单编码" prop="No">
-                  <el-input v-model="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
-                </el-form-item>
-              </el-col>
-              <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
-                <el-form-item label="统计时间" prop="crTime">
-                  <el-date-picker
-                      v-model="state.queryParams.crTime"
-                      type="daterange"
-                      unlink-panels
-                      range-separator="至"
-                      start-placeholder="开始时间"
-                      end-placeholder="结束时间"
-                      :shortcuts="shortcuts"
-                      @change="handleQuery"
-                      value-format="YYYY-MM-DD"
-                      :clearable="false"
-                  />
-                </el-form-item>
-              </el-col>
-              <transition name="el-zoom-in-top">
-                <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6" v-show="!searchCol">
-                  <el-form-item label="错误类型" prop="ErrorName">
-                    <el-select v-model="state.queryParams.ErrorName" placeholder="请选择错误类型" clearable class="w100" @change="handleQuery">
-                      <el-option v-for="item in reTransactErrorType" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
-                    </el-select>
-                  </el-form-item>
-                </el-col>
-              </transition>
-              <el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
-                <el-form-item label="">
-                  <div class="flex-end w100">
-                    <el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
-                    <el-button @click="resetQuery(ruleFormRef)" class="default-button" :loading="state.loading">
-                      <SvgIcon name="ele-Refresh" class="mr5" />重置
-                    </el-button>
-                    <el-button link type="primary" @click="closeSearch" :loading="state.loading">
-                      {{ searchCol ? '展开' : '收起' }}
-                      <SvgIcon :class="{ 'is-reverse': searchCol }" name="ele-ArrowUp" class="mr5 arrow" size="18px" />
-                    </el-button>
-                  </div>
-                </el-form-item>
-              </el-col>
-            </el-row>
-          </el-form>
-        </template>
+				<template #table-search>
+					<el-form :model="state.queryParams" ref="ruleFormRef" @submit.native.prevent inline>
+						<el-form-item label="统计时间" prop="crTime">
+							<el-date-picker
+								v-model="state.queryParams.crTime"
+								type="daterange"
+								unlink-panels
+								range-separator="至"
+								start-placeholder="开始时间"
+								end-placeholder="结束时间"
+								:shortcuts="shortcuts"
+								@change="handleQuery"
+								value-format="YYYY-MM-DD"
+								:clearable="false"
+							/>
+						</el-form-item>
+						<el-form-item label="工单编码" prop="No">
+							<el-input v-model="state.queryParams.No" placeholder="工单编码" clearable @keyup.enter="handleQuery" class="keyword-input" />
+						</el-form-item>
+						<el-form-item>
+							<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+							<el-button @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
+						</el-form-item>
+					</el-form>
+				</template>
 				<template #title="{ row }">
 					<order-detail :order="row.orderSpecial.order" @updateList="queryList">{{ row.orderSpecial?.order?.title }}</order-detail>
 				</template>
 			</ProTable>
 		</div>
+		<!--	更多查询	-->
+		<el-drawer v-model="drawer" title="更多查询" size="500px">
+			<el-form :model="state.queryParams" ref="drawerRuleFormRef" @submit.native.prevent label-width="100px">
+				<el-form-item label="部门名称" prop="OrgName">
+					<el-input v-model="state.queryParams.OrgName" placeholder="部门名称" clearable @keyup.enter="handleQuery" class="keyword-input" />
+				</el-form-item>
+				<el-form-item label="错误类型" prop="ErrorName">
+					<el-select v-model="state.queryParams.ErrorName" placeholder="请选择错误类型" clearable class="w100" @change="handleQuery">
+						<el-option v-for="item in reTransactErrorType" :value="item.dicDataValue" :key="item.dicDataValue" :label="item.dicDataName" />
+					</el-select>
+				</el-form-item>
+			</el-form>
+			<template #footer>
+				<el-button type="primary" @click="handleQuery" :loading="state.loading"> <SvgIcon name="ele-Search" class="mr5" />查询 </el-button>
+				<el-button @click="resetQuery(drawerRuleFormRef)" class="default-button"> <SvgIcon name="ele-Refresh" class="mr5" />重置 </el-button>
+			</template>
+		</el-drawer>
 	</div>
 </template>
 <script setup lang="tsx" name="statisticsCenterDetailWrongItem">
@@ -108,13 +95,6 @@ const columns = ref<any[]>([
 	{ prop: 'orderSpecial.order.fileOpinion', label: '最终办结内容', minWidth: 150 },
 	{ prop: 'orderSpecial.reason', label: '派单退回意见', minWidth: 150 },
 ]);
-// 定义变量内容
-const ruleFormRef = ref<RefType>(); // 表单ref
-const searchCol = ref(true); // 展开/收起
-// 展开/收起
-const closeSearch = () => {
-	searchCol.value = !searchCol.value;
-};
 const state = reactive<any>({
 	queryParams: {
 		// 查询条件
@@ -159,8 +139,12 @@ const queryList = () => {
 		});
 };
 /** 重置按钮操作 */
+const drawerRuleFormRef = ref();
+const ruleFormRef = ref<RefType>(); // 表单ref
+const drawer = ref(false);
 const resetQuery = (formEl: FormInstance | undefined) => {
 	if (!formEl) return;
+	ruleFormRef.value?.resetFields();
 	formEl.resetFields();
 	queryList();
 };
@@ -169,14 +153,3 @@ onMounted(() => {
 	queryList();
 });
 </script>
-<style scoped lang="scss">
-.statistics--detail-wrong-item-container {
-	.arrow {
-		transition: transform var(--el-transition-duration);
-		cursor: pointer;
-	}
-	.arrow.is-reverse {
-		transform: rotateZ(-180deg);
-	}
-}
-</style>

+ 0 - 11
src/views/statistics/center/frequentlyEvent.vue

@@ -255,14 +255,3 @@ onMounted(() => {
 	queryList();
 });
 </script>
-<style scoped lang="scss">
-.statistics-center-frequently-event-container {
-	.arrow {
-		transition: transform var(--el-transition-duration);
-		cursor: pointer;
-	}
-	.arrow.is-reverse {
-		transform: rotateZ(-180deg);
-	}
-}
-</style>

+ 1 - 12
src/views/statistics/center/reportManage.vue

@@ -206,15 +206,4 @@ const deleteReport = (row: any) => {
 onMounted(() => {
 	queryList();
 });
-</script>
-<style scoped lang="scss">
-.statistics-center-emergency-List-container {
-	.arrow {
-		transition: transform var(--el-transition-duration);
-		cursor: pointer;
-	}
-	.arrow.is-reverse {
-		transform: rotateZ(-180deg);
-	}
-}
-</style>
+</script>

+ 0 - 11
src/views/statistics/center/transferCity.vue

@@ -184,14 +184,3 @@ onMounted(() => {
 	queryList();
 });
 </script>
-<style scoped lang="scss">
-.statistics-center-transfer-city-container {
-	.arrow {
-		transition: transform var(--el-transition-duration);
-		cursor: pointer;
-	}
-	.arrow.is-reverse {
-		transform: rotateZ(-180deg);
-	}
-}
-</style>

+ 0 - 11
src/views/tels/callLog/ybCallLog.vue

@@ -1115,14 +1115,3 @@ onBeforeUnmount(() => {
 	mittBus.off('clearCachePage');
 });
 </script>
-<style lang="scss" scoped>
-.tels-callLog-container {
-	.arrow {
-		transition: transform var(--el-transition-duration);
-		cursor: pointer;
-	}
-	.arrow.is-reverse {
-		transform: rotateZ(-180deg);
-	}
-}
-</style>