Prechádzať zdrojové kódy

reactor:修复流程明细会签内容看不到的BUG;

zhangchong 8 mesiacov pred
rodič
commit
6698a52cf6

+ 2 - 3
src/components/ProcessTimeLine/index.vue

@@ -79,7 +79,7 @@
           </el-button>
         </div>
         <el-collapse-transition>
-          <div v-if="item.traces && item.traces.length" class="item-children mt20" v-show="isOpen(item.code)">
+          <div v-if="item.traces && item.traces.length" class="item-children mt20" v-show="isOpen(item.code)" :key="item.code">
             <!-- 嵌套组件 -->
             <process-time-line
               :data="item.traces"
@@ -104,6 +104,7 @@ import { removeDuplicate } from '@/utils/arrayOperation';
 
 const AnnexList = defineAsyncComponent(() => import('@/components/AnnexList/index.vue')); // 附件列表
 const TextTooltip = defineAsyncComponent(() => import('@/components/TextTooltip/index.vue'));
+const TextEllipsis = defineAsyncComponent(() => import('@/components/TextEllipsis/index.vue'));
 const emit = defineEmits(['node-click']);
 const props = defineProps({
   // 数据
@@ -127,8 +128,6 @@ const state = reactive<any>({
   expandedKeys: [], // 当前列表需要展开的节点id组成的数组
   curNameId: 0, //保存current的值
 });
-const TextEllipsis = defineAsyncComponent(() => import('@/components/TextEllipsis/index.vue'));
-
 const isOpen = computed(() => {
   return (id: string) => {
     // 判断节点id在不在数组中,在则显示,不在则隐藏

+ 17 - 12
src/components/TextEllipsis/index.vue

@@ -1,5 +1,5 @@
 <template>
-	<div class="text-ellipsis w100" :class="[!isExpand && 'un-expand']">
+	<div class="text-ellipsis w100" :class="[!isExpand && 'un-expand']" ref="myElement">
 		<div ref="contentEl" class="text-ellipsis-content" :style="{ maxHeight: isExpand ? 'none' : `${maxHeight}px` }">
 			<!-- 占位符 -->
 			<span class="text-ellipsis-placeholder" :style="{ height: placeholderHeight + 'px' }"></span>
@@ -7,12 +7,13 @@
 			{{ isExpand ? content : '' }}
 			<span v-if="isEll" ref="tailEl" class="text-ellipsis-tail">
 				<span class="text-ellipsis-dot" v-if="!isExpand">{{ dot }}</span>
-        <span v-if="!single" @click="onActionClick">
-					<el-button link type="primary">{{ actionText }}
-            <SvgIcon :class="{ 'is-reverse': !isExpand }" name="ele-ArrowUp" class="ml3 arrow" size="16px" />
-          </el-button>
-        </span>
-      </span>{{ isExpand ? '' : content }}
+				<span v-if="!single" @click="onActionClick">
+					<el-button link type="primary"
+						>{{ actionText }}
+						<SvgIcon :class="{ 'is-reverse': !isExpand }" name="ele-ArrowUp" class="ml3 arrow" size="16px" />
+					</el-button>
+				</span> </span
+			>{{ isExpand ? '' : content }}
 		</div>
 		<span v-if="single && isEll" @click="onActionClick">
 			<el-button link type="primary"
@@ -22,7 +23,8 @@
 </template>
 
 <script setup lang="ts">
-import { ref, onBeforeMount, watch, computed, nextTick } from 'vue';
+import { ref, watch, computed, nextTick } from 'vue';
+import { useIntersectionObserver } from '@vueuse/core';
 
 const props = defineProps({
 	// 文本内容
@@ -64,6 +66,13 @@ const tailEl = ref<null | HTMLElement>(null); // 操作按钮dom
 const placeholderHeight = ref(0); // 占位符高度
 const maxHeight = ref(0); // 最大高度
 
+const myElement = ref(null);
+
+//  视图可见的时候计算高度
+useIntersectionObserver(myElement, ([{ isIntersecting }]) => {
+	if (isIntersecting) calcEll();
+});
+
 const actionText = computed(() => {
 	return isExpand.value ? props.collapseText : props.expandText;
 });
@@ -111,10 +120,6 @@ function onActionClick() {
 	}
 }
 
-onBeforeMount(() => {
-	calcEll();
-});
-
 watch(() => [props.content, props.rows], calcEll);
 
 defineExpose({

+ 1 - 1
src/views/business/discern/components/Discern-edit.vue

@@ -15,8 +15,8 @@
 			<el-step title="业务表单" />
 			<el-step title="流程表单" />
 		</el-steps>
-
 		<div v-show="activeStep === 0" v-loading="state.loading">
+
 			<el-form :model="state.discernForm" label-width="110px" ref="discernFormRef">
 				<el-row :gutter="10">
 					<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">

+ 16 - 25
src/views/business/visit/index.vue

@@ -48,13 +48,11 @@
 							</el-col>
 							<el-col :xs="24" :sm="12" :md="12" :lg="6" :xl="6">
 								<el-form-item label="" label-width="0">
-										<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 @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
+									<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 @click="drawer = true" class="default-button"> <SvgIcon name="ele-Search" class="mr5" />更多查询</el-button>
 								</el-form-item>
 							</el-col>
 						</el-row>
@@ -143,19 +141,16 @@
 import { defineAsyncComponent, onMounted, reactive, ref } from 'vue';
 import { FormInstance } from 'element-plus';
 import { formatDate } from '@/utils/formatTime';
-import { useRouter } from 'vue-router';
 import { visitList, visitSearchBaseData } from '@/api/business/visit';
 import { defaultTimeStartEnd, shortcuts } from '@/utils/constants';
-import Other from "@/utils/other";
+import Other from '@/utils/other';
 
 // 引入组件
 const VisitDetailCom = defineAsyncComponent(() => import('@/views/business/visit/component/Visit-detail.vue')); // 回访
 const OrderDetail = defineAsyncComponent(() => import('@/components/OrderDetail/index.vue')); // 工单详情
 
 // 定义变量内容
-const router = useRouter(); // 路由
 const proTableRef = ref<RefType>(); // 表格ref
-const searchCol = ref(true); // 展开/收起
 const fastSearch = ref('all'); // tab位置
 const fastSearchChange = (val: string) => {
 	fastSearch.value = val;
@@ -172,10 +167,6 @@ const fastSearchChange = (val: string) => {
 	}
 	handleQuery();
 };
-// 展开/收起
-const closeSearch = () => {
-	searchCol.value = !searchCol.value;
-};
 // 表格配置项
 const columns = ref<any[]>([
 	{ prop: 'order.no', label: '工单编码', minWidth: 140 },
@@ -184,7 +175,7 @@ const columns = ref<any[]>([
 	{ prop: 'order.sourceChannel', label: '来源渠道', minWidth: 100 },
 	{ prop: 'visitStateText', label: '回访状态', minWidth: 100 },
 	{ prop: 'visitTypeText', label: '回访方式', minWidth: 100 },
-  {prop: 'isEffectiveAiVisitText', label: '有效智能回访', minWidth: 110 },
+	{ prop: 'isEffectiveAiVisitText', label: '有效智能回访', minWidth: 110 },
 	{ prop: 'order.acceptType', label: '受理类型', minWidth: 100 },
 	{ prop: 'order.hotspotName', label: '热点分类', minWidth: 150 },
 	{ prop: 'order.acceptorName', label: '受理人', minWidth: 120 },
@@ -248,11 +239,11 @@ const state = reactive<any>({
 		IsCountersign: null, // 是否会签
 		FiledType: null, // 归档类型
 		IsProvince: null,
-    employeeName:null,
-    crTime:[],
-    StartTime:null,
-    EndTime:null,
-    IsEffectiveAiVisit:null,
+		employeeName: null,
+		crTime: [],
+		StartTime: null,
+		EndTime: null,
+		IsEffectiveAiVisit: null,
 	},
 	tableData: [], //表单
 	loading: false, // 加载
@@ -284,10 +275,10 @@ const handleQuery = () => {
 const requestParams = ref({});
 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');
+	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');
 	visitList(requestParams.value)
 		.then((res: any) => {
 			state.tableData = res.result?.items ?? [];

+ 1 - 1
tsconfig.json

@@ -29,7 +29,7 @@
 
 		/* Strict Type-Checking Options */
 		"strict": true /* Enable all strict type-checking options. */,
-		// "noImplicitAny": true,                 /* Raise error on expressions and declarations with an implied 'any' type. */
+		 "noImplicitAny": false,                 /* Raise error on expressions and declarations with an implied 'any' type. */
 		// "strictNullChecks": true,              /* Enable strict null checks. */
 		// "strictFunctionTypes": true,           /* Enable strict checking of function types. */
 		// "strictBindCallApply": true,           /* Enable strict 'bind', 'call', and 'apply' methods on functions. */