shuchang 2 hónapja
szülő
commit
2c8cd3a09b

+ 19 - 11
pages/subpack/components/apply/apply-item.vue

@@ -1,7 +1,6 @@
 <template>
 	<view class="apply-item" @tap="tapItemHandle">
-		<view class="apply-item-tag"
-		:class="[`apply-item-tag${item.dealStatus??1}`]">{{statusText}}</view>
+		<view class="apply-item-tag" :class="[`apply-item-tag${item.dealStatus??1}`]">{{statusText}}</view>
 		<view class="flex-row">
 			<u-image class="apply-item-image1" width="51.2rpx" height="51.2rpx" bgColor="transparent"
 				src="@/pages/subpack/static/images/app/avatar-mini.png" />
@@ -29,8 +28,10 @@
 </template>
 
 <script setup>
-	import { computed } from 'vue'
-import {
+	import {
+		computed
+	} from 'vue'
+	import {
 		getDict
 	} from '@/common/status/index.js'
 	const emit = defineEmits(['tapItem'])
@@ -52,10 +53,14 @@ import {
 	const tapItemHandle = () => {
 		emit('tapItem', props.item)
 	}
-	const statusText = computed(()=>{
-		if(props.item.dealStatus === 'complete') return '已完成';
-		let dict = getDict({dictValue: props.item.status, dictType: 'care_apply_status'});
-		return dict.dictLabel??'空状态';
+	const statusText = computed(() => {
+		console.log('???', props.item);
+		if (props.item.dealStatus === 'complete') return '已完成';
+		let dict = getDict({
+			dictValue: props.item.status,
+			dictType: 'care_apply_status'
+		});
+		return dict.dictLabel ?? '空状态';
 	})
 </script>
 
@@ -84,17 +89,20 @@ import {
 			border-radius: 0 20rpx 0 20rpx;
 			font-weight: 500;
 		}
+
 		&-tag1,
-		&-tagno_start{
+		&-tagno_start {
 			background: linear-gradient(to right, #EFEFEF 0%, #EFEFEF 100%);
 			color: #888888;
 		}
+
 		&-tag2,
-		&-tagin_progress{
+		&-tagin_progress {
 			background: linear-gradient(to right, #1677FF 0%, #5EA0FB 100%);
 		}
+
 		&-tag0,
-		&-tagin_disagree{
+		&-tagin_disagree {
 			background: linear-gradient(to right, #fa3534 0%, #fa6355 100%);
 		}
 

+ 21 - 12
pages/subpack/pages/application/componenets/page3.vue

@@ -69,7 +69,8 @@
 		computed,
 		onMounted,
 		reactive,
-		ref
+		ref,
+		watch
 	} from 'vue';
 	import {
 		getDict
@@ -89,13 +90,12 @@
 
 	// 0 不同意 1 待审  2 同意
 	const defaultFlow = [{
-			nodeTitle: '资料提交',
-			operateName: '乡镇民政所',
-			createTime: '',
-			remark: '',
-			state: 0,
-		}
-	]
+		nodeTitle: '资料提交',
+		operateName: '乡镇民政所',
+		createTime: '',
+		remark: '',
+		state: 0,
+	}]
 	const flowList = ref([])
 
 	function nameHandle(flow) {
@@ -107,25 +107,34 @@
 	}
 
 	function initFlowList() {
+		console.log('props', props.item);
 		getCareRecords({
 			params: {
 				applyId: props.item.applyId
 			}
 		}).then(res => {
+			console.log('res', res);
 			flowList.value = res;
-			if(flowList.value.length === 0) {
+			if (flowList.value.length === 0) {
 				flowList.value = [...defaultFlow];
 			}
 		})
 
 	}
 
-	onMounted(() => {
-		if(props.item.status!=='assigned') {
+	watch(() => props.item, (newVal, oldVal) => {
+		console.log('watch');
+		if (props.item.status !== 'assigned') {
 			initFlowList();
 		}
-		
 	})
+
+	// onMounted(() => {
+	// 	console.log('onMounted');
+	// 	if (props.item.status !== 'assigned') {
+	// 		initFlowList();
+	// 	}
+	// })
 </script>
 
 <style lang="scss" scoped>

+ 3 - 2
pages/subpack/pages/application/info.vue

@@ -15,7 +15,7 @@
 		<u-tabbar :value="tabbarKey" v-if="judgeTabbarIsShow('tabbar')" @change="tabbarChange" fixed placeholder safeAre
 			aInsetBottom>
 			<u-tabbar-item name="page1" text="基本信息" icon="file-text-fill" />
-			<u-tabbar-item name="page4" text="护理打卡" icon="chrome-circle-fill" v-if="judgeTabbarIsShow('page4')"/>
+			<u-tabbar-item name="page4" text="护理打卡" icon="chrome-circle-fill" v-if="judgeTabbarIsShow('page4')" />
 			<u-tabbar-item name="page2" text="特困审批" v-if="judgeTabbarIsShow('page2')" icon="chrome-circle-fill" />
 			<u-tabbar-item name="page3" text="申请进度" v-if="judgeTabbarIsShow('page3')" icon="hourglass-half-fill" />
 		</u-tabbar>
@@ -47,6 +47,7 @@
 	const appItem = ref({})
 
 	function tabbarChange(key) {
+		console.log('key', key);
 		if (key === tabbarKey.value) return;
 		tabbarKey.value = key;
 	}
@@ -112,7 +113,7 @@
 			id: id.value
 		}).then(res => {
 			appItem.value = res;
-			// console.log('getCareInfo=>', res);
+			console.log('getCareInfo=>', res);
 		})
 	}
 	onLoad((params) => {