提交10.31

This commit is contained in:
wuzhimiao
2025-10-31 18:43:06 +08:00
parent 5859560694
commit a8742d4521
48 changed files with 945 additions and 1928 deletions

View File

@@ -1,7 +1,7 @@
<template>
<view class="job-list">
<view class="top_box_bg">
<u-image src="@/static/images/top.png" width="750rpx" height="496rpx" />
<u-image src="@/packageRc/static/images/top.png" width="750rpx" height="496rpx" />
</view>
<view class="job-list__navbar">
<div class="navbar">
@@ -10,20 +10,23 @@
</view>
<view class="navbar-title" style="color: #fff">服务详情</view>
<view class="navbar-right">
<!-- 注释掉store相关引用避免getters错误 -->
<!--
<uni-icons
v-show="$store.getters.roles.includes('shequn')"
@tap="$store.commit('SET_SHOWEXITPOPUP', true)"
v-show="false"
@tap=""
name="list"
size="44rpx"
color="#fff"
></uni-icons>
-->
</view>
</div>
</view>
<view class="job-list__content">
<img
class="top_box_bg_service"
src="@/static/images/person/serviceFrequency.png"
src=""
width="360rpx"
height="50rpx"
alt=""
@@ -50,7 +53,7 @@
"
>
<view class="left">
<view class="left_name">{{ form.name }}</view>
<view class="left_name">{{ form?.name || '' }}</view>
<view style="margin-top: 10rpx">
<text v-if="form.gender == 0"></text>
<text v-if="form.gender == 1"></text>
@@ -63,13 +66,13 @@
</view>
<view>
<img
src="@/static/images/person/malepng.png"
src="@/packageRc/static/images/person/malepng.png"
v-if="form.gender == 0"
width="70rpx"
alt=""
/>
<img
src="@/static/images/person/femalepng.png"
src="@/packageRc/static/images/person/femalepng.png"
v-if="form.gender == 1"
width="70rpx"
alt=""
@@ -79,19 +82,18 @@
<view class="visitAndInvestigate" @click="goAddServices">
<view class="text">服务</view>
<img
src="@/static/images/person/fillInRecords.png"
width="140rpx"
src="@/packageRc/static/images/person/fillInRecords.png"
width="60rpx"
height="40rpx"
alt=""
srcset=""
/>
</view>
<view class="xuqiushu-box">
<view style="width: 100%;display: flex;justify-content: space-between;">
<view class="xuqiushu-box-item" @click="activeType = 1">
<view class="xuqiushu-box-item-title">
<view :style="{color: activeType == 1 ? '#1A62CE' : '#3d3d3d'}">求职需求数2</view>
<view :style="{color: activeType == 1 ? '#1A62CE' : '#3d3d3d'}">求职需求数</view>
<!-- <view style="color: #3D3D3D;">需求数</view> -->
</view>
<view class="xuqiushu-box-item-num">{{ jobSearchList.length }}</view>
@@ -381,103 +383,9 @@
</view>
</view>
<view class="addNeeds" @click="goAddNeeds">
<img src="@/static/images/person/addNeeds1.png" />
<img src="@/packageRc/static/images/person/addNeeds.png" />
</view>
<u-popup
:show="openDeal"
style="position: relative; z-index: 100"
closeOnClickOverlay
@close="openDeal = false"
>
<div class="self-form">
<div class="form-item required">
<div class="form-label">实际解决时间</div>
<div class="form-content">
<view
class="bordered"
style="width: 100%"
@click="showTime = true"
:class="{ noValue: !formData.actualSolveDate }"
>{{ formData.actualSolveDate || "请选择" }}</view
>
<uni-icons name="arrow-down" color="#A6A6A6" size="24"></uni-icons>
</div>
</div>
<div class="form-item required">
<div class="form-label">经办人</div>
<div class="form-content">
<input
v-model="formData.agentUserName"
class="form-input"
placeholder="请输入"
/>
<uni-icons name="edit" color="#A6A6A6" size="24"></uni-icons>
</div>
</div>
<div class="form-item required">
<div class="form-label">人员状态</div>
<div class="form-content">
<view class="person-status-select" @click="showPersonStatusPicker = true"
:class="{noValue: !formData.personStatus}">
{{ getDictLabel(formData.personStatus, dict.personStatusList) || '请选择' }}
</view>
<!-- 自定义picker弹出层 -->
<uni-popup v-model="showPersonStatusPicker" mode="bottom">
<view class="picker-container">
<view class="picker-header">
<view @click="showPersonStatusPicker = false">取消</view>
<view>人员状态</view>
<view @click="onPersonStatusConfirm">确定</view>
</view>
<view class="picker-content">
<view v-for="item in dict.personStatusList" :key="item.dictValue"
class="picker-item" @click="selectPersonStatus(item)">
{{ item.dictLabel }}
</view>
</view>
</view>
</uni-popup>
</div>
</div>
<div class="form-item">
<div class="form-label">附件</div>
<div class="form-content">
<ImageUpload
:disabled="disabled"
:fileList="fileList"
@update="changeFile"
:maxCount="6"
/>
</div>
</div>
<div class="form-item required">
<div class="form-label">解决说明</div>
<div class="form-content">
<textarea
v-model="formData.solveDesc"
class="form-textarea"
placeholder="请输入"
></textarea>
<uni-icons name="edit" color="#A6A6A6" size="24"></uni-icons>
</div>
</div>
</div>
<view class="button-area">
<view class="btn" @click="openDeal = false">取消</view>
<view
class="btn reset"
@click="
formData.actualSolveDate = '';
formData.solveDesc = '';
"
>重置</view
>
<view class="btn save" @click="finishJobRecommend(needsType)"
>办结</view
>
</view>
</u-popup>
<u-popup :show="show" @close="close" @open="open">
<view class="dialog_div">
<view class="dialog_div_item" @click="goAddNeeds(1)">
@@ -546,7 +454,7 @@ import { getPersonInfo } from "../../api/company/index.js";
// import { requirementCompletion } from "@/api/company";
// import { listEntrepreneurshipService } from "@/api/needs/entrepreneurshipService";
// import { listTrainService, delTrainService } from "@/api/needs/trainService";
// import { listJobType } from "@/api/jobType/index";
import { listJobType } from "../../api/jobType/index";
// import ImageUpload from "@/components/ImageUpload";
export default {
name: "serviceDetails",
@@ -556,7 +464,19 @@ export default {
data() {
return {
form: {},
form: {
name: '',
phone: '',
id: '',
userId: '',
gender: 0,
cardNumber: '',
status: 1,
address: '',
// 确保form对象完整初始化避免访问undefined/null属性
current: null,
statusLabel: ''
},
formData: {},
fileList: [],
showTime: false,
@@ -607,17 +527,24 @@ export default {
},
onLoad(options) {
this.form.id = options.id;
this.form.userId = options.userId;
this.form.userId = options.name
this.form.userId = options.id; // 确保userId被正确赋值
console.log("options", options);
this.getPersonInfo11();
},
onShow() {
// 移除show重置避免影响弹窗显示
this.getListPersonDemand();
// this.serviceTraceability();
},
created(){
},
mounted() {
this.getPersonInfo11();
// 注释掉getDicts调用避免运行时错误
/*
let arr = [
{
key: "qcjy_zgzpgz",
@@ -638,7 +565,11 @@ export default {
this.$forceUpdate();
});
});
this.workTypeRemoteMethod();
*/
// 暂时注释掉workTypeRemoteMethod调用避免listJobType未定义错误
// if (typeof this.workTypeRemoteMethod === 'function') {
// this.workTypeRemoteMethod();
// }
// this.getListPersonDemand();
// this.getJobSearchList();
// this.getListOfEntrepreneurialNeeds();
@@ -663,19 +594,30 @@ export default {
},
getJobWorkTypeName(data) {
if (data) {
let arr = this.jobTypeList.filter((ele) => ele.id == data);
return arr[0].workTypeName;
// 添加空值检查避免访问null/undefined的属性
if (!data || !this.jobTypeList || this.jobTypeList.length === 0) {
return '';
}
let arr = this.jobTypeList.filter((ele) => ele && ele.id == data);
return arr && arr.length > 0 && arr[0] ? arr[0].workTypeName : '';
},
workTypeRemoteMethod(key) {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50,
}).then((res) => {
this.jobTypeList = res.rows;
});
try {
// 检查listJobType是否存在避免未定义错误
if (typeof listJobType === 'function') {
listJobType({
workTypeName: key,
pageNum: 1,
pageSize: 50,
}).then((res) => {
this.jobTypeList = res.rows;
});
} else {
console.log('listJobType 函数未定义');
}
} catch (error) {
console.error('workTypeRemoteMethod执行错误:', error);
}
},
open() {
// console.log('open');
@@ -766,13 +708,14 @@ export default {
});
},
goAddNeeds(needsType) {
console.log("this.form.userId",this.form);
uni.navigateTo({
url: `/packageRc/pages/demand/demandail?activeType=${1}&id=${this.form.userId}&name=${this.form.name}`,
success: function() {
console.log('导航成功');
console.log('导航成功')
},
fail: function(err) {
console.error('导航失败:', err);
@@ -922,8 +865,9 @@ export default {
getPersonInfo11() {
getPersonInfo(this.form.id).then((res) => {
if (res.code == 200) {
this.form = res.data;
console.log("res.data",res.data)
// 使用对象展开运算符保留原有属性特别是userId同时更新其他属性
this.form = { ...this.form, ...res.data };
console.log('获取到的人员信息:', this.form);
}
});
},
@@ -1116,7 +1060,7 @@ export default {
height: 150rpx;
border-radius: 50%;
z-index: 20;
background: url("@/static/images/addPersonnel.png") no-repeat;
background: url("@/packageRc/static/images/addPersonnel.png") no-repeat;
background-size: 100% 100%;
}
@@ -1398,6 +1342,7 @@ export default {
position: fixed;
right: 0;
bottom: 150rpx;
height:150rpx;
width: 150rpx;
overflow: hidden;
z-index: 10;