帮扶任务分配、帮扶任务下发

This commit is contained in:
2026-03-05 16:33:24 +08:00
parent 97d8c987d1
commit 6c10231636
10 changed files with 2315 additions and 774 deletions

View File

@@ -1,6 +1,6 @@
<template>
<AppLayout :title="title" :show-bg-image="false" >
<view class="main-list" :style="getBackgroundStyle('k.png')" v-if="showVue=='main'">
<view class="main-list" :style="getBackgroundStyle('k.png')">
<view class="list-top">
<view class="list-title">
<text>创建任务</text>
@@ -41,18 +41,14 @@
</view>
</view>
</view>
<view class="" v-else>
<target-personel-choice @update:show-vue="handleShowVueChange"></target-personel-choice>
</view>
</AppLayout>
</template>
<script setup>
import { inject, ref, reactive } from 'vue';
import { onLoad } from '@dcloudio/uni-app';
import { onLoad,onShow } from '@dcloudio/uni-app';
const { $api, navTo, navBack } = inject('globalFunction');
import config from "@/config.js"
import targetPersonelChoice from './components/targetPersonnelChoice.vue'
const title = ref('');
const taskTypeOptions=ref([])
@@ -121,9 +117,8 @@ const getBackgroundStyle = (imageName) => ({
backgroundPosition: 'center', // 居中
backgroundRepeat: 'no-repeat'
});
const showVue=ref('main')
function choicePerson(){
showVue.value='choice'
navTo('/packageB/priority/targetPersonnelChoice');
}
function getDictionary(){
$api.myRequest('/system/public/dict/data/type/assist_task_type').then((resData) => {
@@ -209,15 +204,6 @@ function normalizePersonData(dataList) {
};
});
}
function handleShowVueChange(newValue){
showVue.value=newValue.showVue
if(newValue.selectedPersonIds&&newValue.selectedPersonIds.length>0){
formData.taskAllocation.goalPersonList = normalizePersonData(newValue.selectedPersonIds)
formData.taskAllocation.goalPersonCount=newValue.selectedPersonIds.length
}else{
}
}
const handleSubmit = () => {
formRef.value?.validate()
.then(() => {
@@ -259,12 +245,22 @@ const handleCancel = () => {
formData.taskAllocation.allocationNote=''
formData.taskAllocation.deadline=null
formData.taskAllocation.goalPersonList=[]
navTo('/packageB/priority/taskAssignment');
uni.redirectTo({
url:'/packageB/priority/taskAssignment'
})
}
onLoad((options) => {
listNotParam()
getDictionary()
});
onShow(()=>{
uni.$on('choicePerson', handleBackData);
})
// 定义监听回调
const handleBackData = (data) => {
formData.taskAllocation.goalPersonList=normalizePersonData(data)
formData.taskAllocation.goalPersonCount=data.length
};
</script>