帮扶记录管理
This commit is contained in:
@@ -8,10 +8,21 @@
|
||||
<uni-icons type="contact" color="#175CE9" size="34"></uni-icons>
|
||||
</view>
|
||||
<view class="info-label">
|
||||
帮扶任务总数
|
||||
帮扶记录总数
|
||||
</view>
|
||||
<view class="info-value">
|
||||
{{ stats.taskCount }}
|
||||
{{ stats.totalRecords }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item info-line">
|
||||
<view class="">
|
||||
<uni-icons type="checkbox" color="#175CE9" size="34"></uni-icons>
|
||||
</view>
|
||||
<view class="info-label">
|
||||
进行中记录
|
||||
</view>
|
||||
<view class="info-value">
|
||||
{{ stats.pendingRecords }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item info-line">
|
||||
@@ -19,21 +30,21 @@
|
||||
<uni-icons type="info" color="#175CE9" size="34"></uni-icons>
|
||||
</view>
|
||||
<view class="info-label">
|
||||
待分配任务
|
||||
未帮扶记录
|
||||
</view>
|
||||
<view class="info-value">
|
||||
{{ stats.pendingCount }}
|
||||
{{ stats.totalRecords - stats.pendingRecords }}
|
||||
</view>
|
||||
</view>
|
||||
<view class="info-item">
|
||||
<view class="">
|
||||
<uni-icons type="checkbox" color="#175CE9" size="34"></uni-icons>
|
||||
<uni-icons type="refresh" color="#175CE9" size="34"></uni-icons>
|
||||
</view>
|
||||
<view class="info-label">
|
||||
已分配任务
|
||||
帮扶率
|
||||
</view>
|
||||
<view class="info-value">
|
||||
{{ stats.allocatedCount }}
|
||||
{{ stats.assistRate }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -49,42 +60,36 @@
|
||||
</view>
|
||||
</view>
|
||||
<view class="search-container">
|
||||
<!-- 人员姓名 -->
|
||||
<view class="search-item">
|
||||
<text class="label">任务名称:</text>
|
||||
<uni-easyinput v-model="formData.taskName" placeholder="请输入任务名称"></uni-easyinput>
|
||||
<text class="label">人员姓名:</text>
|
||||
<uni-easyinput v-model="formData.name" placeholder="请输入人员姓名"></uni-easyinput>
|
||||
</view>
|
||||
<!-- 任务类型 -->
|
||||
<view class="search-item">
|
||||
<text class="label">任务类型:</text>
|
||||
<uni-data-select :key="1" v-model="formData.taskType" :localdata="taskTypeOptions" placeholder="请选择任务类型" @change="onTaskTypeChange"></uni-data-select>
|
||||
<text class="label">身份证号:</text>
|
||||
<uni-easyinput v-model="formData.idCard" placeholder="请输入身份证号"></uni-easyinput>
|
||||
</view>
|
||||
<!-- 优先级 -->
|
||||
<view class="search-item">
|
||||
<text class="label">优先级:</text>
|
||||
<uni-data-select :key="2" v-model="formData.priority" :localdata="priorityOptions" placeholder="请选择优先级" @change="onPriorityChange"></uni-data-select>
|
||||
<text class="label">帮扶类型:</text>
|
||||
<uni-data-select :key="1" v-model="formData.taskType" :localdata="taskTypeOptions" placeholder="请选择帮扶类型" @change="onTaskTypeChange"></uni-data-select>
|
||||
</view>
|
||||
<!-- 创建时间 -->
|
||||
<view class="search-item">
|
||||
<text class="label">创建时间:</text>
|
||||
<text class="label">帮扶人员:</text>
|
||||
<uni-easyinput v-model="formData.createByName" placeholder="请输入帮扶人员"></uni-easyinput>
|
||||
</view>
|
||||
<view class="search-item">
|
||||
<text class="label">所属区域:</text>
|
||||
<uni-data-select v-model="formData.filterSelectDeptIds" :localdata="executeDeptOptions" placeholder="请选择所属区域" @change="onExecuteDeptChange"></uni-data-select>
|
||||
</view>
|
||||
<view class="search-item">
|
||||
<text class="label">帮扶时间:</text>
|
||||
<uni-datetime-picker v-model="filterTimeRange" type="datetimerange" rangeSeparator="至" @change="filterTimeRangeChange" />
|
||||
</view>
|
||||
<!-- 分配状态 -->
|
||||
<view class="search-item">
|
||||
<text class="label">分配状态:</text>
|
||||
<uni-data-select :key="3" v-model="formData.allocationStatus" :localdata="allocationStatusOptions" placeholder="请选择分配状态" @change="onAllocationStatusChange"></uni-data-select>
|
||||
</view>
|
||||
<!-- 执行区域 -->
|
||||
<view class="search-item" v-if="false">
|
||||
<text class="label">执行区域:</text>
|
||||
<uni-data-select :key="4" v-model="formData.executeDeptId" :localdata="executeDeptOptions" placeholder="请选择区域" @change="onExecuteDeptChange"></uni-data-select>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="main-list" :style="getBackgroundStyle('k.png')">
|
||||
<view class="list-top">
|
||||
<view class="list-title">
|
||||
<text>帮扶任务列表</text>
|
||||
<text>帮扶记录列表</text>
|
||||
<view class="title-line" style="left: 70rpx;"></view>
|
||||
</view>
|
||||
<view class="title-total">
|
||||
@@ -93,84 +98,112 @@
|
||||
</view>
|
||||
<view class="list-box" v-if="dataList.length>0">
|
||||
<view class="con-box" v-for="(item,index) in dataList" :key="index">
|
||||
<view class="form-title">
|
||||
<view class="form-name">
|
||||
{{item.taskName}}
|
||||
</view>
|
||||
<view class="form-type">
|
||||
优先级:{{item.priority}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/person.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
目标人数:
|
||||
人员姓名:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.taskAllocation.goalPersonCount}}
|
||||
{{item.name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item">
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/num.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
任务类型:
|
||||
身份证号:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.taskType}}
|
||||
{{item.id_card}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/date.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
分配状态:
|
||||
联系电话:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.taskAllocation.allocationStatus}}
|
||||
{{item.phone}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/base.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
执行区域:
|
||||
居住地址:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.taskAllocation.executeDeptName}}
|
||||
{{item.address}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
创建时间:
|
||||
帮扶类型:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.createTime}}
|
||||
{{item.task_type}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
截止时间:
|
||||
帮扶人员:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.taskAllocation.deadline}}
|
||||
{{item.create_by_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶单位:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.create_by_dept_name}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
帮扶日期:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.follow_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-item" >
|
||||
<view class="item-left">
|
||||
<image class="item-img" :src="baseUrl+'/dispatch/next.png'" mode=""></image>
|
||||
<view class="item-label">
|
||||
下次联系:
|
||||
</view>
|
||||
</view>
|
||||
<view class="item-right">
|
||||
{{item.next_contact_date}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="form-btns">
|
||||
<button class="mini-btn form-box-btn detail-btn" size="mini" @click="goDetail(item)">详情</button>
|
||||
<button class="mini-btn form-box-btn follow-btn" size="mini" @click="goTarget(item)">目标人员</button>
|
||||
<button class="mini-btn form-box-btn recommend-btn" v-if="item.taskAllocation.allocationStatus == '待分配'" size="mini" @click="goRecommend(item)">分配</button>
|
||||
<button class="action-btn btn-primary" size="mini" @click="goDetail(item)">详情</button>
|
||||
<button class="action-btn btn-success" size="mini" @click="goFollow(item)">跟进</button>
|
||||
<button class="action-btn btn-gradient" size="mini" @click="goRecommend(item)">智能推荐</button>
|
||||
<button class="action-btn btn-info" size="mini" @click="goJobWill(item)">求职意愿</button>
|
||||
<button class="action-btn btn-info" size="mini" @click="goTarget(item)">培训意愿</button>
|
||||
<button class="action-btn btn-warning" size="mini" v-if="!item.create_by_name" @click="goTarget(item)">退回</button>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
@@ -190,17 +223,16 @@ import config from "@/config.js"
|
||||
const title = ref('');
|
||||
const stats=ref({})
|
||||
const formData = reactive({
|
||||
taskName: '',
|
||||
taskType: '',
|
||||
priority: '',
|
||||
createTimeStart: null,
|
||||
createTimeEnd: null,
|
||||
allocationStatus: '',
|
||||
executeDeptId: '',
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
name: '',
|
||||
idCard: '',
|
||||
taskType: '',
|
||||
createByName: '',
|
||||
deptTags: '',
|
||||
followDateStart: null,
|
||||
followDateEnd: null,
|
||||
pageNum: 1,
|
||||
pageSize: 10
|
||||
})
|
||||
const taskName=ref('')
|
||||
const filterTimeRange=ref([])
|
||||
const totalNum=ref(0)
|
||||
const dataList=ref([])
|
||||
@@ -240,8 +272,13 @@ function statisticTask(){
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
let params={}
|
||||
$api.myRequest('/dispatch/assist/task/allocation/statisticTask',params,'get',9100,header).then((resData) => {
|
||||
$api.myRequest('/dispatch/assist/records/statisticRecords',params,'get',9100,header).then((resData) => {
|
||||
stats.value=resData.data
|
||||
if (stats.value.totalRecords > 0 && stats.value.pendingRecords > 0) {
|
||||
stats.value.assistRate = ((stats.value.pendingRecords / stats.value.totalRecords) * 100).toFixed(2);
|
||||
} else {
|
||||
stats.value.assistRate = 0;
|
||||
}
|
||||
});
|
||||
}
|
||||
function getDictionary(){
|
||||
@@ -303,6 +340,7 @@ function onExecuteDeptChange(e){
|
||||
formData.executeDeptId=e
|
||||
}
|
||||
function handleSearch(){
|
||||
formData.pageSize=1
|
||||
dataList.value=[]
|
||||
getDataList()
|
||||
}
|
||||
@@ -311,11 +349,9 @@ function getDataList(){
|
||||
'Authorization':uni.getStorageSync('Padmin-Token'),
|
||||
'Content-Type': "application/x-www-form-urlencoded"
|
||||
}
|
||||
$api.myRequest('/dispatch/assist/task/pageAllocateDeptTaskList',formData,'get',9100,header).then((resData) => {
|
||||
$api.myRequest('/dispatch/assist/records/pageRecords',formData,'get',9100,header).then((resData) => {
|
||||
resData.rows.forEach(item=>{
|
||||
item.priority=getabelByValue(item.priority,priorityOptions)
|
||||
item.taskType=getabelByValue(item.taskType,taskTypeOptions)
|
||||
item.taskAllocation.allocationStatus=getabelByValue(item.taskAllocation.allocationStatus,allocationStatusOptions)
|
||||
item.task_type=getabelByValue(item.task_type,taskTypeOptions)
|
||||
})
|
||||
totalNum.value=resData.total
|
||||
dataList.value=dataList.value.concat(resData.rows)
|
||||
@@ -324,26 +360,29 @@ function getDataList(){
|
||||
}
|
||||
const handleReset = () => {
|
||||
dataList.value=[]
|
||||
formData.taskName=''
|
||||
formData.name=''
|
||||
formData.idCard=''
|
||||
formData.taskType=''
|
||||
formData.priority=''
|
||||
formData.createTimeStart=null
|
||||
formData.createTimeEnd=null
|
||||
formData.allocationStatus=''
|
||||
formData.executeDeptId=''
|
||||
formData.createByName=''
|
||||
formData.deptTags=null
|
||||
formData.followDateStart=null
|
||||
formData.followDateEnd=''
|
||||
formData.pageNum=1
|
||||
formData.pageSize=10
|
||||
filterTimeRange.value=[]
|
||||
getDataList()
|
||||
}
|
||||
const creatTask = () => {
|
||||
navTo('/packageB/priority/taskCreated');
|
||||
function goDetail(item){
|
||||
navTo('/packageB/priority/recordDetail?id='+item.goal_person_id);
|
||||
}
|
||||
function goFollow(item){
|
||||
navTo('/packageB/priority/recordFollow?name='+item.name+'&taskType='+item.task_type+'&taskId='+item.task_id+'&personId='+item.person_id+'&goalPersonId='+item.goal_person_id);
|
||||
}
|
||||
function goRecommend(item){
|
||||
navTo('/packageB/priority/allocate?item='+JSON.stringify(item)+'&url=taskIssue');
|
||||
}
|
||||
function goDetail(item){
|
||||
navTo('/packageB/priority/taskDetail?item='+JSON.stringify(item));
|
||||
function goJobWill(item){
|
||||
navTo('/packageB/priority/jobWill?id='+item.person_id+'&goalPersonId='+item.goal_person_id);
|
||||
}
|
||||
function goTarget(item){
|
||||
navTo('/packageB/priority/targetPersonnel?id='+item.taskAllocation.id+'&taskName='+item.taskName);
|
||||
@@ -355,10 +394,6 @@ function scrollBottom(){
|
||||
}
|
||||
}
|
||||
onShow(()=>{
|
||||
formData.pageNum=1
|
||||
dataList.value=[]
|
||||
getDataList()
|
||||
console.log("111")
|
||||
})
|
||||
onLoad((options) => {
|
||||
listNotParam()
|
||||
@@ -532,23 +567,61 @@ image
|
||||
text-overflow: ellipsis
|
||||
white-space: nowrap
|
||||
.form-btns
|
||||
margin-top:30rpx
|
||||
.form-box-btn
|
||||
border-radius: 50rpx !important
|
||||
margin-right: 24rpx
|
||||
padding: 0rpx 40rpx
|
||||
.detail-btn
|
||||
background: #EDF5FF
|
||||
border: 1px solid #3088FF
|
||||
font-size: 28rpx
|
||||
color: #3088FF
|
||||
.follow-btn
|
||||
background: #EEF9F3
|
||||
border: 1px solid #00933E
|
||||
font-size: 28rpx
|
||||
color: #00933E
|
||||
.recommend-btn
|
||||
background: linear-gradient(92deg, #0DCCFF 0%, #4760FF 100%)
|
||||
font-size: 28rpx
|
||||
color: #FFFFFF
|
||||
margin-top: 30rpx
|
||||
display: flex
|
||||
flex-wrap: wrap // 允许换行
|
||||
justify-content: space-between // 两端对齐,中间留空
|
||||
// 如果希望最后一行也撑开,可以使用 space-evenly,但 space-between 配合固定宽度更整齐
|
||||
|
||||
.action-btn
|
||||
border-radius: 12rpx !important // 稍微方一点的圆角,显得更稳重
|
||||
font-size: 24rpx !important
|
||||
font-weight: 500
|
||||
padding: 16rpx 0 !important // 上下内边距
|
||||
margin-bottom: 20rpx // 行间距
|
||||
display: flex
|
||||
align-items: center
|
||||
justify-content: center
|
||||
// 计算宽度:3个一行,减去间隙。假设总宽100%,gap由justify-content处理
|
||||
// 这里设定一个固定比例宽度,确保一行能放下3个
|
||||
width: 32%
|
||||
height: 72rpx // 固定高度保证整齐
|
||||
line-height: 1.2
|
||||
border-width: 1rpx
|
||||
border-style: solid
|
||||
|
||||
/* --- 样式变体 --- */
|
||||
|
||||
// 1. 详情 (主操作 - 蓝色实心)
|
||||
.btn-primary
|
||||
background-color: #3088FF !important
|
||||
color: #FFFFFF !important
|
||||
border-color: #3088FF !important
|
||||
box-shadow: 0 4rpx 12rpx rgba(48, 136, 255, 0.3)
|
||||
|
||||
// 2. 跟进 (次主操作 - 绿色实心)
|
||||
.btn-success
|
||||
background-color: #00933E !important
|
||||
color: #FFFFFF !important
|
||||
border-color: #00933E !important
|
||||
box-shadow: 0 4rpx 12rpx rgba(0, 147, 62, 0.3)
|
||||
|
||||
// 3. 智能推荐 (特色操作 - 渐变)
|
||||
.btn-gradient
|
||||
background: linear-gradient(92deg, #0DCCFF 0%, #4760FF 100%) !important
|
||||
color: #FFFFFF !important
|
||||
border: none !important
|
||||
box-shadow: 0 4rpx 12rpx rgba(71, 96, 255, 0.4)
|
||||
|
||||
// 4. 求职/培训意愿 (辅助操作 - 浅蓝底深蓝字)
|
||||
.btn-info
|
||||
background-color: #EDF5FF !important
|
||||
color: #3088FF !important
|
||||
border-color: #CBDFFF !important
|
||||
|
||||
// 5. 退回 (特殊操作 - 橙色/警告色)
|
||||
.btn-warning
|
||||
background-color: #FFF7E6 !important
|
||||
color: #FA8C16 !important
|
||||
border-color: #FFD591 !important
|
||||
</style>
|
||||
|
||||
Reference in New Issue
Block a user