This commit is contained in:
2025-11-03 08:48:44 +08:00
46 changed files with 938 additions and 1927 deletions

View File

@@ -12,7 +12,6 @@ import config from './config.js';
// 导入主包中的request.js用于字典服务 // 导入主包中的request.js用于字典服务
// 在uni-app小程序环境中主包不能直接引用分包中的模块 // 在uni-app小程序环境中主包不能直接引用分包中的模块
import { request, get, post, packageRcRequest, packageRcGet, packageRcPost } from './utils/request.js'; import { request, get, post, packageRcRequest, packageRcGet, packageRcPost } from './utils/request.js';
// 将request, get, post函数挂载到全局方便使用 // 将request, get, post函数挂载到全局方便使用
// 挂载分包专用的请求函数使用固定baseURL和token // 挂载分包专用的请求函数使用固定baseURL和token
@@ -77,7 +76,6 @@ async function getDict(dictType, forceRefresh = false) {
export function createApp() { export function createApp() {
const app = createSSRApp(App) const app = createSSRApp(App)
app.component('AppLayout', AppLayout) app.component('AppLayout', AppLayout)
app.component('Empty', Empty) app.component('Empty', Empty)
app.component('NoBouncePage', NoBouncePage) app.component('NoBouncePage', NoBouncePage)

View File

@@ -25,9 +25,11 @@ export function getPersonDemand(id) {
// 新增个人需求信息 // 新增个人需求信息
export function addPersonDemand(data) { export function addPersonDemand(data) {
// 确保传递数据前进行日志输出
console.log('addPersonDemand函数接收到的数据:', data);
return post({ return post({
url: 'manage/personDemand', url: 'manage/personDemand',
method: 'post', method: 'post', // 修改为大写POST确保请求参数正确传递
data: data data: data
}) })
} }

View File

@@ -22,3 +22,16 @@ export function getJbrInfo() {
method: 'get' method: 'get'
}) })
} }
export function getPersonBase() {
return get({
url: `system/center/user/selectHxjbr`,
method: 'get'
})
}
export function returnPerson(params) {
return get({
'url': `/personnel/personBaseInfo/returnPerson`,
params
})
}

View File

@@ -431,7 +431,7 @@ this.personStatusOptions=serviceContentOptions1
.page { .page {
height: 100vh; height: 100vh;
background-color: #eef1f5 !important; background-color: #eef1f5 !important;
background-image: url("~@/static/images/top.png"); background-image: url("~@/packageRc/static/images/top.png");
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% auto; background-size: 100% auto;
} }

View File

@@ -84,8 +84,8 @@
<view><text>详细地址</text>{{item.xxdz}}</view> <view><text>详细地址</text>{{item.xxdz}}</view>
</view> </view>
<view class="services"> <view class="services">
<view @click="showReturnReasonPopup">退回</view> <view @click="showReturnReasonPopup(item.id)">退回</view>
<view @click="tiao(item.id)">服务</view> <view @click="tiao(item.id,item.name)">服务</view>
</view> </view>
</view> </view>
</view> </view>
@@ -114,11 +114,13 @@
<script setup> <script setup>
import { personInfoList,personAlertList } from '../../api/personinfo/index' import { personInfoList,personAlertList } from '../../api/personinfo/index'
import { returnPerson} from '@/packageRc/api/personinfo/index'
import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue'; import { reactive, inject, watch, ref, onMounted, watchEffect, nextTick } from 'vue';
let activeTab = ref(1) let activeTab = ref(1)
let activeTitle = ref(1) let activeTitle = ref(1)
let jobList = ref([{},{},{},{},{}]) let jobList = ref([{},{},{},{},{}])
let jobListcount = ref() let jobListcount = ref()
let returnItemData = ref()
let jobList1 = ref([{},{}]) let jobList1 = ref([{},{}])
let jobList1count = ref() let jobList1count = ref()
// 退回原因弹窗相关 // 退回原因弹窗相关
@@ -168,7 +170,8 @@ async function getlistyujing(){
}; };
// 显示退回原因弹窗 // 显示退回原因弹窗
function showReturnReasonPopup() { function showReturnReasonPopup(dd) {
this.returnItemData.id=dd
console.log("退回") console.log("退回")
returnReason.value = '' returnReason.value = ''
// 使用 ref 控制弹窗显示 // 使用 ref 控制弹窗显示
@@ -177,11 +180,11 @@ function showReturnReasonPopup() {
} }
} }
function tiao(id){ function tiao(id,name){
console.log('尝试导航到待办详情页面ID:', id); console.log('尝试导航到待办详情页面ID:', id);
// 尝试直接使用uni.navigateTo使用正确的格式并传递id参数 // 尝试直接使用uni.navigateTo使用正确的格式并传递id参数
uni.navigateTo({ uni.navigateTo({
url: `/packageRc/pages/daiban/daibandetail?id=${id}`, url: `/packageRc/pages/daiban/daibandetail?id=${id}&name=${name}`,
success: function() { success: function() {
console.log('导航成功'); console.log('导航成功');
}, },
@@ -200,6 +203,16 @@ function confirmReturn() {
}) })
return return
} }
const params = {
id: this.returnItemData.id,
opinion: this.returnReason
}
const { code, msg } = returnPerson(params);
if (code == 200) {
this.returnDialog = false;
this.$u.toast(msg);
this.getList(true);
}
// 这里可以添加提交退回原因的API调用 // 这里可以添加提交退回原因的API调用
console.log('退回原因:', returnReason.value, '项目索引:', currentItemIndex.value) console.log('退回原因:', returnReason.value, '项目索引:', currentItemIndex.value)

View File

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

View File

@@ -0,0 +1,158 @@
<template>
<view class="upload-container">
<u-upload :disabled="disabled" :width="width" :height="height" :fileList="internalFileList" :name="name" :multiple="multiple"
:maxCount="maxCount" @afterRead="handleAfterRead" @delete="handleRemove">
</u-upload>
</view>
</template>
<script>
// import {
// uploadImg
// } from '@/api/company'
import config from '@/config'
// import {
// getToken
// } from '@/utils/auth'
export default {
props: {
maxSize: {
type: Number,
default: 5, // 最大文件大小MB
},
allowedFormats: {
type: Array,
default: () => [], // 允许的文件格式
},
maxImageSize: {
type: Object,
default: () => ({
width: 2048,
height: 2048
}), // 图片最大宽度和高度
},
width: {
type: String,
default: '100rpx', // 默认宽度
},
height: {
type: String,
default: '100rpx', // 默认高度
},
name: {
type: String,
default: 'file', // 默认name字段
},
multiple: {
type: Boolean,
default: false, // 是否允许多选,默认不允许
},
maxCount: {
type: Number,
default: 1, // 默认最大上传数量为1
},
fileList: {
type: Array,
default: () => [], // 默认的文件列表为空
},
disabled: {
type: Boolean,
default: false
}
},
data() {
return {
internalFileList: Array.isArray(this.fileList) ? [...this.fileList] : [], // 内部的文件列表,确保与父组件的同步
};
},
watch: {
// 监听 fileList 的变化,确保内外部数据同步
fileList(newVal) {
this.internalFileList = Array.isArray(newVal) ? [...newVal] : [];
},
},
methods: {
// 新增图片
async handleAfterRead(event) {
let lists = [].concat(event.file);
let fileListLen = this.internalFileList.length;
lists.map((item) => {
this.internalFileList.push({
...item,
status: "uploading",
message: "上传中",
});
});
for (let i = 0; i < lists.length; i++) {
if (this.allowedFormats.length > 0) {
let fileType = lists[i].name.split('.').pop().toLowerCase();
if (!this.allowedFormats.includes(fileType)) {
// this.$emit('error', '不支持的文件格式');
uni.showToast({
title: '不支持的文件格式',
icon: 'none',
});
this.internalFileList.splice(fileListLen, 1);
this.$emit('update', this.internalFileList); // 通知父组件文件列表更新
return;
}
}
const result = await this.uploadFilePromise(lists[i].url);
let item = this.internalFileList[fileListLen];
this.internalFileList.splice(
fileListLen,
1,
Object.assign(item, {
status: "success",
message: "",
data: result,
})
);
fileListLen++;
this.$emit('update', this.internalFileList); // 通知父组件文件列表更新
}
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
uni.uploadFile({
url: config.baseUrl + '/system/oss/upload',
filePath: url,
name: "file",
header: {
Authorization: "Bearer " + getToken(),
},
success: (uploadFileRes) => {
let res = JSON.parse(uploadFileRes.data);
resolve(res.data);
},
fail: (err) => {
console.log(err);
},
});
});
},
handleRemove({file, index}) {
this.internalFileList.splice(index, 1); // 从文件列表中移除指定文件
this.$emit('update', this.internalFileList); // 通知父组件文件列表更新
},
},
};
</script>
<style scoped>
.upload-container {
display: flex;
align-items: center;
justify-content: center;
}
.upload-slot {
display: flex;
align-items: center;
justify-content: center;
border: 1px dashed #ccc;
border-radius: 4px;
padding: 20px;
}
</style>

View File

@@ -66,6 +66,7 @@
pageNum: 1 pageNum: 1
}).then(res => { }).then(res => {
this.personList = res.rows this.personList = res.rows
console.log("人眼",res.row)
clearTimeout(this.searcher) clearTimeout(this.searcher)
}) })
}, 200) }, 200)

View File

@@ -4,60 +4,83 @@
* @LastEditTime: 2025-05-06 16:56:20 * @LastEditTime: 2025-05-06 16:56:20
--> -->
<template> <template>
<view class="input-outer-part"> <view class="container" style="background-color: #f7f7f7;">
<scroll-view scroll-y="true" :style="{height: edit?'calc(90vh - 150px)':'calc(100vh - 144px)'}"> <scroll-view scroll-y="true" :style="{height: edit?'calc(90vh - 150px)':'calc(100vh - 144px)'}">
<view class="inner"> <view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">创业需求信息 <view class="part-title" style="display: flex;justify-content: space-between;">创业需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn" <view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑<u-icon name="edit-pen" style="font-weight: normal;display: flex;" @click="edit=true">编辑<view class="icon-right"></view></view>
color="#A6A6A6"></u-icon></view>
</view> </view>
<view class="inner-part"> <view class="inner-part">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm" class="self-form" <view class="self-form">
labelWidth="100"> <view class="form-item">
<u-form-item label="姓名" prop="personName" required <view class="form-label">姓名 <text class="required">*</text></view>
v-if="$store.getters.roles.includes('shequn'|| $store.getters.roles.includes('gly'))" <view v-if="name" style="width: 100%;"
> class="disabledLine">
<view style="width: 100%;" @click="openPersonChooser" {{ formData.personName || '请选择' }}
</view>
<view v-else style="width: 100%;" @click="openPersonChooser"
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}"> :class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
{{ formData.personName || '请选择' }} {{ formData.personName || '请选择' }}
</view> </view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> <view class="icon-right"></view>
</u-form-item> </view>
<!-- <view class="form-item">
<u-form-item label="服务需求标题" prop="serviceRequirementTitle" required> <view class="form-label">有无场地需求 <text class="required">*</text></view>
<u--textarea :disabled="!edit" v-model="formData.serviceRequirementTitle" <view class="radio-group">
placeholder="请输入"></u--textarea> <view
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> :class="['radio-item', { 'radio-disabled': !edit }]"
</u-form-item> --> @click="formData.ywcdxq = '是'"
<u-form-item label="有无场地需求" prop="ywcdxq" required> v-if="edit">
<u-radio-group :disabled="!edit" v-model="formData.ywcdxq" placement="row"> <view :class="['radio', { 'radio-checked': formData.ywcdxq === '是' }]"></view>
<u-radio :customStyle="{marginRight: '16px'}" label="是" name="是"></u-radio> <text></text>
<u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"></u-radio> </view>
</u-radio-group> <view
</u-form-item> :class="['radio-item', { 'radio-disabled': !edit }]"
<u-form-item label="场地面积" prop="cdmj"> @click="formData.ywcdxq = '否'"
<u--input :disabled="!edit" v-model="formData.cdmj" border="none" v-if="edit">
placeholder="请输入"></u--input> <view :class="['radio', { 'radio-checked': formData.ywcdxq === '否' }]"></view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> <text></text>
</u-form-item> </view>
<u-form-item label="办公人数" prop="bgrs"> <view v-else>{{ formData.ywcdxq }}</view>
<u--input :disabled="!edit" v-model="formData.bgrs" border="none" </view>
placeholder="请输入"></u--input> </view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> <view class="form-item">
</u-form-item> <view class="form-label">场地面积</view>
<u-form-item label="办公位置" prop="bgdd">
<u--input :disabled="!edit" v-model="formData.bgdd" border="none" <input type="number" :disabled="!edit" v-model="formData.requiredOfficeSpace" placeholder="请输入" :class="['form-input', { 'form-input-disabled': !edit }]"/>
placeholder="请输入"></u--input> <view class="icon-right"></view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> </view>
</u-form-item> <view class="form-item">
<u-form-item label="有无创业培训需求" prop="ywcypxxq" required> <view class="form-label">办公人数</view>
<u-radio-group :disabled="!edit" v-model="formData.ywcypxxq" <input type="number" :disabled="!edit" v-model="formData.bgrs" placeholder="请输入" :class="['form-input', { 'form-input-disabled': !edit }]"/>
placement="row"> <view class="icon-right"></view>
<u-radio :customStyle="{marginRight: '16px'}" label="是" name="是"></u-radio> </view>
<u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"></u-radio> <view class="form-item">
</u-radio-group> <view class="form-label">办公位置</view>
</u-form-item> <input type="text" :disabled="!edit" v-model="formData.bgdd" placeholder="请输入" :class="['form-input', { 'form-input-disabled': !edit }]"/>
<view class="icon-right"></view>
</view>
<view class="form-item">
<view class="form-label">有无创业培训需求 <text class="required">*</text></view>
<view class="radio-group">
<view
:class="['radio-item', { 'radio-disabled': !edit }]"
@click="formData.ywcypxxq = '是'"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywcypxxq === '是' }]"></view>
<text></text>
</view>
<view
:class="['radio-item', { 'radio-disabled': !edit }]"
@click="formData.ywcypxxq = '否'"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywcypxxq === '否' }]"></view>
<text></text>
</view>
<view v-else>{{ formData.ywcypxxq }}</view>
</view>
</view>
<!-- <u-form-item label="是否意向接受创业培训" prop="isInterestedEntrepreneurshipGuidance" required>--> <!-- <u-form-item label="是否意向接受创业培训" prop="isInterestedEntrepreneurshipGuidance" required>-->
<!-- <u-radio-group :disabled="!edit" v-model="formData.isInterestedEntrepreneurshipGuidance"--> <!-- <u-radio-group :disabled="!edit" v-model="formData.isInterestedEntrepreneurshipGuidance"-->
<!-- placement="row">--> <!-- placement="row">-->
@@ -65,23 +88,31 @@
<!-- <u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"></u-radio>--> <!-- <u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"></u-radio>-->
<!-- </u-radio-group>--> <!-- </u-radio-group>-->
<!-- </u-form-item>--> <!-- </u-form-item>-->
<u-form-item label="有无资金需求" prop="ywzjxq" required> <view class="form-item">
<u-radio-group :disabled="!edit" v-model="formData.ywzjxq" placement="row"> <view class="form-label">有无资金需求 <text class="required">*</text></view>
<u-radio :customStyle="{marginRight: '16px'}" label="是" name="是"></u-radio> <view class="radio-group">
<u-radio :customStyle="{marginRight: '16px'}" label="否" name="否"></u-radio> <view
</u-radio-group> :class="['radio-item', { 'radio-disabled': !edit }]"
</u-form-item> @click="formData.ywzjxq = '是'"
<u-form-item label="需求说明" prop="jobDescription" required> v-if="edit">
<u-textarea :disabled="!edit" v-model="formData.jobDescription" placeholder="请输入"></u-textarea> <view :class="['radio', { 'radio-checked': formData.ywzjxq === '是' }]"></view>
</u-form-item> <text>是</text>
<!-- <u-form-item label="希望解决日期" prop="hopeSolveDate" required> </view>
<view style="width: 100%;" @click="showPicker('hopeSolveDate')" <view
:class="{disabledLine: !edit, noValue: !formData.hopeSolveDate}"> :class="['radio-item', { 'radio-disabled': !edit }]"
{{ formData.hopeSolveDate||'请选择' }} @click="formData.ywzjxq = '否'"
v-if="edit">
<view :class="['radio', { 'radio-checked': formData.ywzjxq === '否' }]"></view>
<text>否</text>
</view>
<view v-else>{{ formData.ywzjxq }}</view>
</view> </view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon> </view>
</u-form-item> --> <view class="form-item">
</u--form> <view class="form-label">需求说明 <text class="required">*</text></view>
<textarea :disabled="!edit" v-model="formData.jobDescription" placeholder="请输入" :class="['form-textarea', { 'form-textarea-disabled': !edit }]"></textarea>
</view>
</view>
</view> </view>
</view> </view>
<!-- <view class="inner" style="margin-top: 32rpx;">--> <!-- <view class="inner" style="margin-top: 32rpx;">-->
@@ -112,29 +143,27 @@
fileUrl: formData.fileUrl fileUrl: formData.fileUrl
}" /> }" />
</scroll-view> </scroll-view>
<u-datetime-picker :show="show.hopeSolveDate" v-model="dates.hopeSolveDate" mode="date"
@confirm="confirmDate('hopeSolveDate', $event)" @cancel="cancelPicker('hopeSolveDate')"></u-datetime-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit"> <view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view> <view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getPersonInfo()">重置</view> <view class="btn reset" @click="formData.id ? getDetail(formData.id) : setDefaultValues()">重置</view>
<view class="btn save" @click="saveInfo">保存</view> <view class="btn save" @click="saveInfo">保存</view>
</view> </view>
</view> </view>
</template> </template>
<script> <script>
// import { import {
// getPersonBase getPersonBase
// } from "@/api/person"; } from "@/packageRc/api/personinfo/index";
// import { import {
// addPersonDemand, addPersonDemand,
// updatePersonDemand, updatePersonDemand,
// getPersonDemand getPersonDemand
// } from "@/api/needs/personDemand"; } from "@/packageRc/api/needs/personDemand";
// import ImageUpload from '@/components/ImageUpload' import ImageUpload from './ImageUpload'
// import ChoosePerson from '@/pages/needs/components/choosePerson'; import ChoosePerson from './choosePerson';
// import dayjs from "dayjs"; import PlacePicker from "@/components/placePicker";
import dayjs from "dayjs";
export default { export default {
components: { components: {
// ChoosePerson, // ChoosePerson,
@@ -152,55 +181,27 @@
}, },
data() { data() {
return { return {
fileList: [],
edit: true, edit: true,
personBase: {},
dates: {},
formData: {
jobDescription:"",
demandType:"2",
personName: '',
personId:"",
userId:"",
serviceRequirementTitle: '',
isAcceptAssistance: '',
isAcceptApprovalResult: '',
},
rules: {
ywcdxq: [{
required: true,
message: '请选择有无场地需求',
trigger: ['blur', 'change'],
}, ],
ywcypxxq: [{
required: true,
message: '请选择有无创业培训需求',
trigger: ['blur', 'change'],
}, ],
isInterestedEntrepreneurshipGuidance: [{
required: true,
message: '请选择是否意向接受创业培训',
trigger: ['blur', 'change'],
}, ],
ywzjxq: [{
required: true,
message: '请选择有无资金需求',
trigger: ['blur', 'change'],
}, ],
},
dict: {},
show: {},
currentCityArr: [],
originalDept: [],
currentCity: '请选择',
bysj: '',
loading: false, loading: false,
jobTypeList: [],
route: {},
canChoosePerson: false, canChoosePerson: false,
formData: {
id: '',
personId: '',
userId: '',
personName: '',
ywcdxq: '',
requiredOfficeSpace: '',
bgrs: '',
bgdd: '',
ywcypxxq: '',
ywzjxq: '',
jobDescription: '',
actualSolveDate: '',
solveDesc: '',
actualSolvePeople: '',
fileUrl: '',
currentStatus: ''
}
} }
}, },
onReady() { onReady() {
@@ -223,13 +224,13 @@
uni.navigateBack() uni.navigateBack()
} }
}, },
// setName(){ setName(){
// this.formData.personName = this.name this.formData.personName = this.name
// this.formData.personId = this.needid this.formData.personId = this.needId
// this.formData.userId = this.needid this.formData.userId = this.needId
console.log("this",this)
// this.$forceUpdate();
// }, },
openPersonChooser() { openPersonChooser() {
if (this.edit && this.canChoosePerson) { if (this.edit && this.canChoosePerson) {
this.$refs.personChooser.open(); this.$refs.personChooser.open();
@@ -261,7 +262,8 @@
this.getPersonInfo() this.getPersonInfo()
if(this.name){ if(this.name){
this.formData.personName = this.name this.formData.personName = this.name
this.formData.userId = this.needid this.formData.personId = this.needId
this.formData.userId = this.needId
} }
this.edit = true this.edit = true
}, },
@@ -332,18 +334,32 @@
this.formData.serviceRequirementTitle = `${this.formData.personName}_于${dayNew}_提出创业需求` this.formData.serviceRequirementTitle = `${this.formData.personName}_于${dayNew}_提出创业需求`
}, },
async saveInfo() { async saveInfo() {
this.setName()
try { try {
if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') { // 验证必填项
this.$u.toast('请填写需求说明!'); if (!this.formData.personName || this.formData.personName.trim() === '') {
uni.showToast({ title: '请选择姓名!', icon: 'none' });
return; return;
} }
// 验证表单 if (!this.formData.ywcdxq) {
const isValid = await this.$refs.uForm.validate(); uni.showToast({ title: '请选择有无场地需求!', icon: 'none' });
if (!isValid) { return;
throw new Error('请检查必填项填写');
} }
if (!this.formData.ywcypxxq) {
uni.showToast({ title: '请选择有无创业培训需求!', icon: 'none' });
return;
}
if (!this.formData.ywzjxq) {
uni.showToast({ title: '请选择有无资金需求!', icon: 'none' });
return;
}
if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') {
uni.showToast({ title: '请填写需求说明!', icon: 'none' });
return;
}
// 显示全局加载 // 显示全局加载
this.$showLoading(); uni.showLoading({ title: '保存中...' });
// 根据 formData 是否有 id 来决定是更新还是新增 // 根据 formData 是否有 id 来决定是更新还是新增
let response; let response;
this.formData.demandType = 2; this.formData.demandType = 2;
@@ -358,24 +374,23 @@
// 检查响应码是否为200 // 检查响应码是否为200
if (response.code === 200) { if (response.code === 200) {
this.$u.toast(successMessage); uni.showToast({ title: successMessage, icon: 'success' });
// 如果是编辑模式,关闭编辑状态;否则返回上一页 // 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) { if (this.formData.id) {
this.edit = false; this.edit = false;
} else { } else {
await this.$delay(1000); // 延迟1秒后返回上一页 // 延迟1秒后返回上一页
uni.navigateBack(); setTimeout(() => {
uni.navigateBack();
}, 1000);
} }
} }
} catch (error) { } catch (error) {
if(error.length){ console.error('保存失败:', error);
this.$u.toast('请填写完整信息!'); uni.showToast({ title: '系统错误,请联系管理员!', icon: 'none' });
}else{
this.$u.toast('系统错误,请联系管理员!');
}
} finally { } finally {
// 确保加载页总是会被隐藏 // 确保加载页总是会被隐藏
this.$hideLoading(); uni.hideLoading();
} }
}, },
@@ -385,6 +400,21 @@
this.$set(this.formData, 'ywcypxxq', '是') this.$set(this.formData, 'ywcypxxq', '是')
this.$set(this.formData, 'isInterestedEntrepreneurshipGuidance', '是') this.$set(this.formData, 'isInterestedEntrepreneurshipGuidance', '是')
this.$set(this.formData, 'ywzjxq', '是') this.$set(this.formData, 'ywzjxq', '是')
},
// 获取详情数据
async getDetail(id) {
try {
this.loading = true;
const response = await getPersonDemand(id);
if (response.code === 200) {
this.formData = { ...response.data };
}
} catch (error) {
console.error('获取详情失败:', error);
uni.showToast({ title: '获取详情失败', icon: 'none' });
} finally {
this.loading = false;
}
} }
// saveInfo() { // saveInfo() {
// this.$refs.uForm.validate().then(res => { // this.$refs.uForm.validate().then(res => {
@@ -431,10 +461,7 @@
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% auto; background-size: 100% auto;
} }
.input-outer-part {
padding: 0 32rpx;
box-sizing: border-box;
}
.inner { .inner {
background: #eef1f5; background: #eef1f5;
border-radius: 16rpx; border-radius: 16rpx;
@@ -452,6 +479,115 @@
width: 100%; width: 100%;
} }
/* 表单项目样式 */
.form-item {
display: flex;
align-items: flex-start;
margin-bottom: 24rpx;
background-color: #fff;
border-radius: 8rpx;
padding: 24rpx;
}
.form-label {
width: 200rpx;
font-size: 28rpx;
color: #333;
flex-shrink: 0;
line-height: 48rpx;
}
.required {
color: #f56c6c;
margin-left: 4rpx;
}
.form-input {
flex: 1;
border: none;
outline: none;
font-size: 28rpx;
color: #333;
background: none;
height: 48rpx;
line-height: 48rpx;
}
.form-input-disabled {
color: #909399;
background-color: #f5f7fa;
}
.form-textarea {
flex: 1;
border: none;
outline: none;
font-size: 28rpx;
color: #333;
background: none;
min-height: 120rpx;
line-height: 40rpx;
}
.form-textarea-disabled {
color: #909399;
background-color: #f5f7fa;
}
.icon-right {
width: 40rpx;
height: 40rpx;
display: flex;
align-items: center;
justify-content: center;
color: #A6A6A6;
margin-left: 16rpx;
}
/* 单选框样式 */
.radio-group {
flex: 1;
display: flex;
align-items: center;
}
.radio-item {
display: flex;
align-items: center;
margin-right: 32rpx;
cursor: pointer;
}
.radio-item.radio-disabled {
cursor: not-allowed;
}
.radio {
width: 28rpx;
height: 28rpx;
border-radius: 50%;
border: 2rpx solid #dcdfe6;
margin-right: 12rpx;
position: relative;
}
.radio.radio-checked {
border-color: #409eff;
background-color: #409eff;
}
.radio.radio-checked::after {
content: '';
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
width: 12rpx;
height: 12rpx;
border-radius: 50%;
background-color: #fff;
}
/* 调整按钮区域样式 */ /* 调整按钮区域样式 */
.button-area { .button-area {
margin-top: 24rpx; margin-top: 24rpx;

View File

@@ -4,19 +4,17 @@
* @LastEditTime: 2025-05-06 16:55:10 * @LastEditTime: 2025-05-06 16:55:10
--> -->
<template> <template>
<view class="container" style="background-color: #f7f7f7;">
<view class="input-outer-part">
<scroll-view scroll-y="true" :style="{height: edit?'calc(90vh - 150px)':'calc(100vh - 144px)'}"> <scroll-view scroll-y="true" :style="{height: edit?'calc(90vh - 150px)':'calc(100vh - 144px)'}">
<view class="inner"> <view class="inner">
<view class="part-title" style="display: flex;justify-content: space-between;">求职需求信息 <view class="part-title" style="display: flex;justify-content: space-between;">求职需求信息
<view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn" <view v-if="!edit&&formData.id&&formData.currentStatus!=3" class="btn"
style="font-weight: normal;display: flex;" @click="edit=true">编辑<u-icon name="edit-pen" style="font-weight: normal;display: flex;" @click="edit=true">编辑<view class="icon-right"></view></view>
color="#A6A6A6"></u-icon></view>
</view> </view>
<view class="inner-part"> <view class="inner-part">
<u--form labelPosition="left" :model="formData" :rules="rules" ref="uForm" class="self-form" labelWidth="100"> <view class="self-form">
<u-form-item label="姓名" prop="personName" required <view class="form-item">
> <view class="form-label">姓名 <text class="required">*</text></view>
<view v-if="name" style="width: 100%;" <view v-if="name" style="width: 100%;"
class="disabledLine"> class="disabledLine">
{{ formData.personName || '请选择' }} {{ formData.personName || '请选择' }}
@@ -25,9 +23,13 @@
:class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}"> :class="{disabledLine: !edit||!canChoosePerson, noValue: !formData.personName}">
{{ formData.personName || '请选择' }} {{ formData.personName || '请选择' }}
</view> </view>
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> <view class="icon-right"></view>
</u-form-item> </view>
<!-- <u-form-item label="姓名" prop="personName" required>
<u--input :disabled="!edit" v-model="formData.name" border="none"
placeholder="请输入"></u--input>
<view class="icon-right" style="width: 40rpx; height: 40rpx;"></view>
</u-form-item> -->
<!-- <u-form-item label="求职工种" prop="jobWorkType" required> <!-- <u-form-item label="求职工种" prop="jobWorkType" required>
<view style="width: 100%;" @click="showPicker('jobWorkType')" <view style="width: 100%;" @click="showPicker('jobWorkType')"
:class="{disabledLine: !edit, noValue: !formData.jobWorkTypeName}"> :class="{disabledLine: !edit, noValue: !formData.jobWorkTypeName}">
@@ -36,7 +38,8 @@
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon> <u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item> --> </u-form-item> -->
<!-- 新增工种选择 --> <!-- 新增工种选择 -->
<u-form-item label="求职工种" prop="jobWorkType"> <view class="form-item">
<view class="form-label">求职工种</view>
<picker <picker
mode="multiSelector" mode="multiSelector"
:range="workTypeColumns" :range="workTypeColumns"
@@ -47,14 +50,14 @@
v-if="workTypeColumns[0] && workTypeColumns[0].length" v-if="workTypeColumns[0] && workTypeColumns[0].length"
> >
<view class="picker-view"> <view class="picker-view">
<text>{{ formData.jobWorkTypeName || '请选择工种' }}</text> <view class="picker-view-text">{{ formData.jobWorkTypeName || '请选择工种' }}</view>
<u-icon name="arrow-down" color="#999999"></u-icon> <view class="icon-right"></view>
</view> </view>
</picker> </picker>
<view v-else class="picker-view"> <view v-else class="picker-view">
<text>工种数据加载中...</text> <view class="picker-view-text">工种数据加载中...</view>
</view> </view>
</u-form-item> </view>
<!-- <u-form-item label="工种选择" prop="selectedWorkType"> <!-- <u-form-item label="工种选择" prop="selectedWorkType">
<uni-data-picker <uni-data-picker
v-model="selectedWorkType" v-model="selectedWorkType"
@@ -70,46 +73,67 @@
:self-field="false" :self-field="false"
/> />
</u-form-item> --> </u-form-item> -->
<!-- <u-form-item label="希望解决日期" prop="hopeSolveDate" required>
<u-form-item label="最低薪酬" prop="minRecruitmentSalary" required> <view style="width: 100%;" @click="showPicker('hopeSolveDate')"
<u--input :disabled="!edit" v-model="formData.minRecruitmentSalary" border="none" :class="{disabledLine: !edit, noValue: !formData.hopeSolveDate}">
placeholder="请输入"></u--input> {{ formData.hopeSolveDate||'请选择' }}
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> </view>
</u-form-item> <u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
<u-form-item label="最高薪酬" prop="highRecruitmentSalary" required> </u-form-item> -->
<u--input :disabled="!edit" v-model="formData.highRecruitmentSalary" border="none" <!-- <u-form-item label="从业年数" prop="emplymentYear" required>
placeholder="请输入"></u--input> <view style="width: 100%;" @click="showPicker('emplymentYear')"
<u-icon slot="right" name="edit-pen" color="#A6A6A6"></u-icon> :class="{disabledLine: !edit, noValue: getDictLabel(formData.emplymentYear, dict.emplymentYear)=='请选择'}">
</u-form-item> {{ getDictLabel(formData.emplymentYear, dict.emplymentYear) }}
<u-form-item label="单位性质" prop="unitNature" required> </view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item>
<u-form-item label="工资类型" prop="salaryType" required>
<view style="width: 100%;" @click="showPicker('salaryType')"
:class="{disabledLine: !edit, noValue: getDictLabel(formData.salaryType, dict.salaryType)=='请选择'}">
{{ getDictLabel(formData.salaryType, dict.salaryType) }}
</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item> -->
<view class="form-item">
<view class="form-label">最低薪酬 <text class="required">*</text></view>
<input type="number" :disabled="!edit" v-model="formData.minRecruitmentSalary" placeholder="请输入" :class="['form-input', { 'form-input-disabled': !edit }]"/>
<view class="icon-right" style="width: 40rpx; height: 40rpx;"></view>
</view>
<view class="form-item">
<view class="form-label">最高薪酬 <text class="required">*</text></view>
<input type="number" :disabled="!edit" v-model="formData.highRecruitmentSalary" placeholder="请输入" :class="['form-input', { 'form-input-disabled': !edit }]"/>
<view class="icon-right" style="width: 40rpx; height: 40rpx;"></view>
</view>
<!-- <u-form-item label="单位性质" prop="unitNature" required>
<view style="width: 100%;" @click="showPicker('unitNature')" <view style="width: 100%;" @click="showPicker('unitNature')"
:class="{disabledLine: !edit, noValue: getDictLabel(formData.unitNature, this.dictTypeMap.unitNature)=='请选择'}"> :class="{disabledLine: !edit, noValue: getDictLabel(formData.unitNature, dict.unitNature)=='请选择'}">
{{ getDictLabel(formData.unitNature, this.dictTypeMap.unitNature) }} {{ getDictLabel(formData.unitNature, dict.unitNature) }}
</view> </view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon> <u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item> </u-form-item> -->
<!-- <u-form-item label="用工形式" prop="employmentType" required>
<u-form-item label="希望工作地点" prop="addressDesc"> <view style="width: 100%;" @click="showPicker('employmentType')"
<view class="df_flex df_flex_1"> :class="{disabledLine: !edit, noValue: getDictLabel(formData.employmentType, dict.employmentType)=='请选择'}">
<u--input placeholder="请输入" border="none" v-model="formData.addressDesc" {{ getDictLabel(formData.employmentType, dict.employmentType) }}
class="ellipsis_1" @focus="$refs.placePicker.openDialog()"></u--input>
<!-- <u-icon name="edit-pen" color="#999" size="42rpx"></u-icon> -->
</view> </view>
</u-form-item> <u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
<u--form labelPosition="left" class="self-form" labelWidth="110" > </u-form-item> -->
<u-form-item label="求职说明" prop="jobDescription" required > <view class="form-item">
<u-textarea :disabled="!edit" v-model="formData.jobDescription" <view class="form-label">希望工作地点</view>
placeholder="请输入" ></u-textarea> <input type="text" placeholder="请输入" v-model="formData.addressDesc" class="form-input ellipsis_1" @focus="$refs.placePicker.openDialog()"/>
</u-form-item> </view>
</u--form> <view class="form-item">
<u-form-item label="就业意愿" prop="employmentWillingness"> <view class="form-label">求职说明 <text class="required">*</text></view>
<textarea :disabled="!edit" v-model="formData.jobDescription" placeholder="请输入" :class="['form-textarea', { 'form-textarea-disabled': !edit }]"></textarea>
</view>
<!-- <u-form-item label="就业意愿" prop="employmentWillingness">
<view style="width: 100%;" @click="showPicker('employmentWillingness')" <view style="width: 100%;" @click="showPicker('employmentWillingness')"
:class="{disabledLine: !edit, noValue: getDictLabel(formData.employmentWillingness, this.dictTypeMap.employmentWillingness)=='请选择'}"> :class="{disabledLine: !edit, noValue: getDictLabel(formData.employmentWillingness, dict.employmentWillingness)=='请选择'}">
{{ getDictLabel(formData.employmentWillingness, this.dictTypeMap.employmentWillingness) }} {{ getDictLabel(formData.employmentWillingness, dict.employmentWillingness) }}
</view> </view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon> <u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon>
</u-form-item> </u-form-item> -->
</u--form> </view>
</view> </view>
</view> </view>
@@ -131,82 +155,38 @@
</u-form-item> </u-form-item>
</u--form> </u--form>
</view> </view>
</view> -->
</scroll-view>
<u-datetime-picker :show="show.hopeSolveDate" v-model="dates.hopeSolveDate" mode="date"
@confirm="confirmDate('hopeSolveDate', $event)" @cancel="cancelPicker('hopeSolveDate')"></u-datetime-picker>
<u-picker :show="show.jobWorkType" :columns="[jobTypeList]" keyName="workTypeName"
@confirm="jobTypeConfirm('jobWorkType', $event)" @cancel="cancelPicker('jobWorkType')"></u-picker>
<u-picker :show="show.emplymentYear" :columns="[dict.type[this.dictTypeMap.emplymentYear]]" keyName="label"
@confirm="pickerConfirm('emplymentYear', $event)" @cancel="cancelPicker('emplymentYear')"></u-picker>
<u-picker :show="show.salaryType" :columns="[dict.type[this.dictTypeMap.salaryType]]" keyName="label"
@confirm="pickerConfirm('salaryType', $event)" @cancel="cancelPicker('salaryType')"></u-picker>
<u-picker :show="show.highRecruitmentSalary" :columns="[dict.type[this.dictTypeMap.highRecruitmentSalary]]" keyName="label"
@confirm="pickerConfirm('highRecruitmentSalary', $event)"
@cancel="cancelPicker('highRecruitmentSalary')"></u-picker>
<u-picker :show="show.minRecruitmentSalary" :columns="[dict.type[this.dictTypeMap.minRecruitmentSalary]]" keyName="label"
@confirm="pickerConfirm('minRecruitmentSalary', $event)"
@cancel="cancelPicker('minRecruitmentSalary')"></u-picker>
<u-picker :show="show.unitNature" :columns="[dict.type[this.dictTypeMap.unitNature]]" keyName="label"
@confirm="pickerConfirm('unitNature', $event)" @cancel="cancelPicker('unitNature')"></u-picker>
<u-picker :show="show.employmentType" :columns="[dict.type[this.dictTypeMap.employmentType || 'qcjy_ygxs']]" keyName="label"
@confirm="pickerConfirm('employmentType', $event)" @cancel="cancelPicker('employmentType')"></u-picker>
<u-picker :show="show.employmentWillingness" :columns="[dict.type[this.dictTypeMap.employmentWillingness]]" keyName="label"
@confirm="pickerConfirm('employmentWillingness', $event)"
@cancel="cancelPicker('employmentWillingness')"></u-picker>
<!-- 帮扶方式字典示例 -->
<view v-if="dict.type.qyjy_zdfwlx && dict.type.qyjy_zdfwlx.length" style="padding: 20rpx;">
<text>帮扶方式字典数据示例:</text>
<view v-for="item in dict.type.qyjy_zdfwlx" :key="item.value" style="padding: 10rpx 0;">
{{ item.label }} ({{ item.value }})
</view> </view>
</view> </scroll-view>
<!-- 使用原生picker组件代替uView的选择器 -->
<!-- 工种选择器弹窗 --> <!-- 工种选择器弹窗 -->
<u-picker
:show="show.workTypePicker"
:columns="[workTypeList]"
keyName="label"
@confirm="onWorkTypePickerConfirm"
@cancel="cancelWorkTypePicker"
:loading="workTypeList.length === 0"
:defaultIndex="[0]"
:immediateChange="true"
:closeOnClickOverlay="true"
></u-picker>
<choose-person ref="personChooser" @confirm="personNameConfirm" />
<view class="button-area" v-if="edit"> <view class="button-area" v-if="edit">
<view class="btn" @click="cancelPage">取消</view> <view class="btn" @click="cancelPage">取消</view>
<view class="btn reset" @click="getDetail(formData.id)">重置</view> <view class="btn reset" @click="getDetail(formData.id)">重置</view>
<view class="btn save" @click="saveInfo">保存</view> <view class="btn save" @click="saveInfo">保存</view>
</view> </view>
<PlacePicker ref="placePicker" @selected="handleSelected" /> </scroll-view>
</view> </view>
</template> </template>
<script> <script>
import { computed } from 'vue'
import { import {
getPersonBase getPersonBase
} from "../../../api/needs/person"; } from "@/packageRc/api/personinfo/index";
import { import {
addPersonDemand, addPersonDemand,
updatePersonDemand, updatePersonDemand,
getPersonDemand getPersonDemand
} from "../../../api/needs/personDemand"; } from "@/packageRc/api/needs/personDemand";
import { import {
listJobType listJobType
} from "../../../api/jobType/index"; } from "@/packageRc/api/jobType/index";
import ImageUpload from '@/components/ImageUpload' import ImageUpload from './ImageUpload'
import ChoosePerson from './choosePerson'; import ChoosePerson from './choosePerson';
import PlacePicker from "@/components/placePicker"; import PlacePicker from "@/components/placePicker";
//import uPopup from 'uview-ui/components/u-popup/u-popup.vue' //import uPopup from 'uview-ui/components/u-popup/u-popup.vue'
export default { export default {
components: { components: {
ChoosePerson, ChoosePerson,
@@ -224,39 +204,6 @@
default: '' default: ''
} }
}, },
setup() {
// 导入字典store
const useDictStore = require('@/stores/useDictStore').default
const dictStore = useDictStore()
// 直接使用store中的dict对象支持dict.type.xxx语法
const dict = computed(() => dictStore.dict)
// 字典类型映射
const dictTypeMap = {
emplymentYear: 'qcjy_gznx',
salaryType: 'qcjy_gzlx',
highRecruitmentSalary: 'qcjy_zgzpgz',
minRecruitmentSalary: 'qcjy_zgzpgz',
unitNature: 'qcjy_dwxz',
employmentWillingness: 'qcjt_jyyy',
// 添加帮扶方式字典
qyjy_zdfwlx: 'qyjy_zdfwlx'
}
// 预加载字典数据
const loadDicts = async () => {
const dictTypes = Object.values(dictTypeMap)
const uniqueTypes = [...new Set(dictTypes)]
await Promise.all(uniqueTypes.map(type => dictStore.loadDict(type)))
}
return {
dict,
loadDicts,
dictTypeMap
}
},
data() { data() {
return { return {
edit: true, edit: true,
@@ -264,9 +211,11 @@
dates: {}, dates: {},
currentCommunityId: '', currentCommunityId: '',
showPickerPicker: false, showPickerPicker: false,
canChoosePerson: true,
canChoosePerson: true,
formData: { formData: {
demandType:"1", demandType:"1",
personName: '', personName: '',
personId:"", personId:"",
userId:"", userId:"",
jobWorkType: '', jobWorkType: '',
@@ -306,10 +255,28 @@
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, ], }, ],
jobDescription: [{ jobDescription: [{
required: true, required: true,
message: '请填写求职说明', message: '请填写求职说明',
trigger: ['blur', 'change'], trigger: ['blur', 'change'],
}, ] }, ]
// employmentType: [{
// required: true,
// message: '请选择用工形式',
// trigger: ['blur', 'change'],
// }, ],
// addressDesc: [{
// required: true,
// message: '请选择希望工作地点',
// trigger: ['blur', 'change'],
// }, ],
},
dict: {
emplymentYear: [],
salaryType: [],
highRecruitmentSalary: [],
minRecruitmentSalary: [],
unitNature: [],
employmentWillingness: []
}, },
show: { show: {
hopeSolveDate: false, hopeSolveDate: false,
@@ -334,26 +301,70 @@
workTypeIndexes: [0, 0, 0], workTypeIndexes: [0, 0, 0],
} }
}, },
onReady() { // 移除uView表单验证相关代码
this.$refs.uForm.setRules(this.rules)
},
created() { created() {
this.setName()
this.loading = true; this.loading = true;
// 使用新的字典加载方法 let arr = [{
this.loadDicts() key: 'qcjy_gznx',
.then(() => { prop: 'emplymentYear'
console.log('字典数据加载完成:', this.dict); },
{
key: 'qcjy_gzlx',
prop: 'salaryType'
},
{
key: 'qcjy_zgzpgz',
prop: 'highRecruitmentSalary'
},
{
key: 'qcjy_zgzpgz',
prop: 'minRecruitmentSalary'
},
{
key: 'qcjy_dwxz',
prop: 'unitNature'
},
// {
// key: 'qcjy_ygxs',
// prop: 'employmentType'
// },
{
key: 'qcjt_jyyy',
prop: 'employmentWillingness'
},
]
// 使用 Promise.all 确保所有字典数据加载完成
Promise.all(arr.map(ele => this.getDicts(ele.key)))
.then(responses => {
responses.forEach((res, index) => {
this.dict[arr[index].prop] = res.data || [];
});
this.loading = false; this.loading = false;
}) })
.catch(error => { .catch(error => {
console.error('加载字典数据失败:', error); console.error('加载字典数据失败:', error);
// 设置默认空数组
arr.forEach(ele => {
this.dict[ele.prop] = [];
});
this.loading = false; this.loading = false;
}); });
this.workTypeRemoteMethod(''); this.workTypeRemoteMethod('');
}, },
methods: { methods: {
// 不再需要这个方法使用store中的loadDict方法 // 获取字典数据
getDicts(dictType) {
return new Promise((resolve, reject) => {
// 这里应该调用实际的API暂时返回空数组
// 如果需要真实的API调用请替换下面的代码
setTimeout(() => {
resolve({ data: [] });
}, 100);
});
},
cancelPage() { cancelPage() {
if (this.formData.id) { if (this.formData.id) {
@@ -446,7 +457,7 @@
cancelPicker(type) { cancelPicker(type) {
this.show[type] = false this.show[type] = false
}, },
getCityOptions(data) { getCityOptis(data) {
if (data && data[0] && data[0].children) { if (data && data[0] && data[0].children) {
return [data].concat(this.getCityOptions(data[0].children)) return [data].concat(this.getCityOptions(data[0].children))
} else { } else {
@@ -454,29 +465,21 @@
} }
}, },
// 新的getDictLabel方法支持使用dict.type语法 getDictLabel(value, list) {
getDictLabel(value, dictType) { if (list && Array.isArray(list)) {
// 兼容旧的使用方式 let arr = list.filter(ele => ele.dictValue == value)
if (Array.isArray(dictType)) {
let arr = dictType.filter(ele => ele.dictValue == value)
if (arr.length) { if (arr.length) {
return arr[0].dictLabel || '请选择' return arr[0].dictLabel || '请选择'
} else { } else {
return '请选择' return '请选择'
} }
} }
// 新的使用方式通过dict.type和dict.label访问
if (this.dict.label && this.dict.label[dictType]) {
return this.dict.label[dictType][value] || '请选择'
}
return '请选择' return '请选择'
}, },
pickerConfirm(type, event) { pickerConfirm(type, event) {
this.show[type] = false this.show[type] = false
// 使用新的字典格式 this.formData[type] = event.value[0].dictValue
this.formData[type] = event.value[0].value || event.value[0].dictValue
}, },
jobTypeConfirm(type, event) { jobTypeConfirm(type, event) {
this.show[type] = false this.show[type] = false
@@ -499,29 +502,49 @@
}, },
getPersonInfo() { getPersonInfo() {
this.loading = true; this.loading = true;
// 移除对未定义的$store的引用 this.$store.dispatch("GetInfo").then((res) => {
// 设置默认值,允许选择人员 if (res.data.roles.indexOf('qunzhong') == -1) {
this.canChoosePerson = true; this.canChoosePerson = true;
// 这里可以添加实际获取用户信息的逻辑 } else {
// 例如从localStorage获取或调用其他API this.canChoosePerson = false;
this.loading = false; getPersonBase(res.data.user.userId).then(resp => {
this.formData.personId = resp.data.id
this.formData.userId = resp.data.userId
this.formData.personName = resp.data.name
})
}
})
}, },
async saveInfo() { async saveInfo() {
this.setName()
try { try {
console.log("this.formData.personName",this.formData.personName)
// 先检查求职说明是否为空,如果为空直接提示 // 先检查求职说明是否为空,如果为空直接提示
if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') { if (!this.formData.jobDescription || this.formData.jobDescription.trim() === '') {
this.$u.toast('请填写求职说明!'); uni.showToast({ title: '请填写求职说明!', icon: 'none' });
return; return;
} }
// 验证表单 // 简单的表单验证
console.log(this.formData) console.log(this.formData)
const isValid = await this.$refs.uForm.validate(); if (!this.formData.personName) {
if (!isValid) { uni.showToast({ title: '请填写姓名!', icon: 'none' });
throw new Error('表单验证失败'); return;
}
if (!this.formData.jobWorkType) {
uni.showToast({ title: '请选择求职工种!', icon: 'none' });
return;
}
if (!this.formData.minRecruitmentSalary) {
uni.showToast({ title: '请填写最低薪酬!', icon: 'none' });
return;
}
if (!this.formData.highRecruitmentSalary) {
uni.showToast({ title: '请填写最高薪酬!', icon: 'none' });
return;
} }
// 显示全局加载 // 显示全局加载
this.$showLoading(); uni.showLoading({ title: '加载中...' });
this.formData.demandType = 1; this.formData.demandType = 1;
// this.formData.userId = this.formData.personId // this.formData.userId = this.formData.personId
// 根据 formData 是否有 id 来决定是更新还是新增 // 根据 formData 是否有 id 来决定是更新还是新增
@@ -536,26 +559,27 @@
} }
// 检查响应码是否为200 // 检查响应码是否为200
if (response.code === 200) { if (response.code === 200) {
this.$u.toast(successMessage); uni.showToast({ title: successMessage });
// 如果是编辑模式,关闭编辑状态;否则返回上一页 // 如果是编辑模式,关闭编辑状态;否则返回上一页
if (this.formData.id) { if (this.formData.id) {
this.edit = false; this.edit = false;
} else { } else {
await this.$delay(1000); // 延迟1秒后返回上一页 // 延迟1秒后返回
uni.navigateBack(); setTimeout(() => {
uni.navigateBack();
}, 1000);
} }
} }
} catch (error) { } catch (error) {
if(error.length){ if(error && error.length){
this.$u.toast('请填写完整信息!'); uni.showToast({ title: '请填写完整信息!', icon: 'none' });
}else{ } else {
this.$u.toast('系统错误,请联系管理员!'); uni.showToast({ title: '系统错误,请联系管理员!', icon: 'none' });
} }
// this.$u.toast('请检查必填项填写'); }
finally {
} finally {
// 确保加载页总是会被隐藏 // 确保加载页总是会被隐藏
this.$hideLoading(); uni.hideLoading();
} }
}, },
popupclosed() { popupclosed() {
@@ -721,124 +745,154 @@
} }
} }
</script> </script>
<style scoped>
<style lang="scss">
.page {
::v-deep .u-navbar__content {
background-color: transparent !important;
}
background-color: #EEF1F5 !important;
height: 100vh;
background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat;
background-size: 100% auto;
}
.input-outer-part {
padding: 0 32rpx;
box-sizing: border-box;
}
.inner { .inner {
background: #eef1f5; padding: 40rpx;
border-radius: 16rpx;
padding: 32rpx;
margin-bottom: 24rpx;
} }
.inner-part { .form-item {
width: 100%; display: flex;
margin-bottom: 40rpx;
align-items: center;
background-color: #fff;
border-radius: 12rpx;
padding: 20rpx;
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
} }
/* 为表单元素添加一些间距 */ .form-label {
.self-form { width: 140rpx;
width: 100%; font-size: 30rpx;
color: #333;
line-height: 1.5;
font-weight: 500;
margin-right: 30rpx;
text-align: right;
flex-shrink: 0;
} }
/* 调整按钮区域样式 */ .form-input {
.button-area { flex: 1;
margin-top: 24rpx; height: 80rpx;
} padding: 0 25rpx;
.button-area { border: 1px solid #e8e8e8;
padding: 24rpx 32rpx 68rpx;
width: calc(100% + 64rpx);
margin-left: -32rpx;
background: #fff;
display: flex;
box-sizing: border-box;
margin-top: 40rpx;
border-radius: 16px 16px 0px 0px;
.btn {
line-height: 72rpx;
width: 176rpx;
margin-right: 16rpx;
font-size: 28rpx;
border: 1px solid #B8C5D4;
color: #282828;
text-align: center;
border-radius: 8rpx; border-radius: 8rpx;
} font-size: 30rpx;
color: #333;
.reset { background-color: #fafafa;
background: #DCE2E9;
}
.save {
background: linear-gradient(103deg, #1D64CF 0%, #1590D4 99%);
color: #fff;
border: 0;
flex-grow: 1;
}
} }
.noValue { .form-input:focus {
font-size: 28rpx; border-color: #1989fa;
color: #333; background-color: #fff;
box-shadow: 0 0 0 3rpx rgba(25, 137, 250, 0.1);
}
.form-input-disabled {
color: #999;
background-color: #f5f5f5;
}
.form-textarea {
flex: 1;
min-height: 200rpx;
padding: 25rpx;
border: 1px solid #e8e8e8;
border-radius: 8rpx;
font-size: 30rpx;
color: #333;
background-color: #fafafa;
resize: vertical;
}
.form-textarea:focus {
border-color: #1989fa;
background-color: #fff;
box-shadow: 0 0 0 3rpx rgba(25, 137, 250, 0.1);
}
.form-textarea-disabled {
color: #999;
background-color: #f5f5f5;
}
.required {
color: #FF4D4F;
margin-left: 4rpx;
}
.picker-view {
flex: 1;
display: flex;
justify-content: space-between;
align-items: center;
height: 80rpx;
border: 1px solid #e8e8e8;
border-radius: 8rpx;
padding: 0 25rpx;
background-color: #fafafa;
}
.picker-view-text {
font-size: 30rpx;
color: #333;
} }
.disabledLine { .disabledLine {
background: rgb(245, 247, 250); background-color: #f5f5f5;
cursor: not-allowed; color: #999;
} }
.noValue {
color: #999;
.picker-view {
display: flex;
align-items: center;
justify-content: space-between;
width: 100%;
padding: 28rpx 36rpx;
background: #ffffff;
border: 2rpx solid #e5e5e5;
border-radius: 12rpx;
min-height: 88rpx;
box-sizing: border-box;
transition: all 0.3s ease;
} }
.picker-view:active { .ellipsis_1 {
background: #f8f9fa; overflow: hidden;
border-color: #007aff; text-overflow: ellipsis;
white-space: nowrap;
} }
.picker-view text { /* 按钮区域样式 */
color: #333333; .button-area {
font-size: 28rpx; display: flex;
flex: 1; justify-content: center;
padding: 40rpx;
gap: 30rpx;
background-color: #fff;
border-top: 1px solid #eee;
margin-top: 20rpx;
} }
.picker-view .u-icon { .btn {
margin-left: 16rpx; flex: 1;
color: #999999; height: 88rpx;
} line-height: 88rpx;
::v-deep .u-textarea{ text-align: center;
background-color: red !important; border-radius: 44rpx;
border-radius: 12rpx; font-size: 32rpx;
border: 2rpx solid red; font-weight: 500;
color: #333;
background-color: #f5f5f5;
} }
.btn.save {
color: #fff;
background-color: #1989fa;
}
.btn.reset {
color: #666;
background-color: #f0f0f0;
}
/* 图标样式优化 */
.icon-right {
margin-left: 20rpx;
font-size: 36rpx;
color: #1989fa;
}
</style> </style>

View File

@@ -57,7 +57,7 @@
> >
<view class="picker-view"> <view class="picker-view">
<text>{{ formData.qwpxgzName || '请选择工种' }}</text> <text>{{ formData.qwpxgzName || '请选择工种' }}</text>
<u-icon name="arrow-down" color="#999999"></u-icon> <view class="icon-right"></view>
</view> </view>
</picker> </picker>
<view v-else class="picker-view"> <view v-else class="picker-view">
@@ -68,7 +68,7 @@
<view class="bordered" style="width: 100%" @click="showTime = true" <view class="bordered" style="width: 100%" @click="showTime = true"
:class="{ noValue: !formData.qwpxsj }"> :class="{ noValue: !formData.qwpxsj }">
{{ formData.qwpxsj || "请选择" }}</view> {{ formData.qwpxsj || "请选择" }}</view>
<u-icon slot="right" name="arrow-down" color="#A6A6A6"></u-icon> <view class="icon-right"></view>
</u-form-item> </u-form-item>
</u--form> </u--form>
<u--form labelPosition="left" class="self-form" labelWidth="110"> <u--form labelPosition="left" class="self-form" labelWidth="110">
@@ -116,19 +116,19 @@
</template> </template>
<script> <script>
// import { import {
// getPersonBase getPersonBase
// } from "@/api/person"; } from "@/packageRc/api/personinfo/index";
// import { import {
// addPersonDemand, addPersonDemand,
// updatePersonDemand, updatePersonDemand,
// getPersonDemand getPersonDemand
// } from "@/api/needs/personDemand"; } from "@/packageRc/api/needs/personDemand";
// import { import {
// listJobType listJobType
// } from "@/api/jobType/index"; } from "@/packageRc/api/jobType/index";
// import ImageUpload from '@/components/ImageUpload' import ImageUpload from './ImageUpload'
// import ChoosePerson from '@/pages/needs/components/choosePerson'; import ChoosePerson from './choosePerson';
// import dayjs from "dayjs"; // import dayjs from "dayjs";
export default { export default {
@@ -258,14 +258,14 @@
this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl) this.formData.fileUrl = this.$arrayToString(this.formData.fileUrl)
}, },
addOne() { addOne() {
this.formData = {} this.formData = {}
this.getPersonInfo() this.getPersonInfo()
if(this.name){ if(this.name){
this.formData.personName = this.name this.formData.personName = this.name
this.formData.userId = this.needid this.formData.userId = this.needId
} }
this.edit = true this.edit = true
}, },
workTypeRemoteMethod(key) { workTypeRemoteMethod(key) {
listJobType({ listJobType({
workTypeName: key, workTypeName: key,
@@ -355,8 +355,9 @@
this.formData.demandTitle = `${this.formData.personName}_于${dayNew}_提出培训需求` this.formData.demandTitle = `${this.formData.personName}_于${dayNew}_提出培训需求`
}, },
async saveInfo() { async saveInfo() {
try { try {
// 手动检查培训意愿工种是否已选择 this.setName();
// 手动检查培训意愿工种是否已选择
if (!this.formData.qwpxgz || this.formData.qwpxgz.trim() === '') { if (!this.formData.qwpxgz || this.formData.qwpxgz.trim() === '') {
this.$u.toast('请选择培训意愿工种!'); this.$u.toast('请选择培训意愿工种!');
return; return;

View File

@@ -5,10 +5,10 @@
--> -->
<template> <template>
<view class="page"> <view class="page">
<view class="page-header df_flex"> <view class="page-header df_flex" style="display:flex;align-items:center;justify-content:space-between;padding:20rpx 0rpx;">
<u-icon class="back-icon" name="arrow-left" color="#fff" size="16" @click="goBack()"></u-icon> <u-icon class="back-icon" name="arrow-left" color="#fff" size="16" @click="goBack()"></u-icon>
<view class="title df_flex_1" style="padding-left: 32rpx;" >{{isAdd ? '需求新增' : '需求维护'}}</view> <view class="title df_flex_1" style="padding-left: 32rpx;" >{{isAdd ? '需求新增' : '需求维护'}}</view>
<u-icon style="margin-right: 32rpx;" name="list" size="44rpx" color="fff"></u-icon> <u-icon style="margin-right: 32rpx;" @tap="$store.commit('SET_SHOWEXITPOPUP', true)" name="list" size="44rpx" color="#fff"></u-icon>
</view> </view>
<view class="tab-list" v-if="showTab != 1"> <view class="tab-list" v-if="showTab != 1">
<view class="tab" :class="{active: activeType == 1}" @click="canChangeType ? changeType(1) : ''">求职<br>需求 <view class="tab" :class="{active: activeType == 1}" @click="canChangeType ? changeType(1) : ''">求职<br>需求
@@ -19,12 +19,12 @@
</view> </view>
<view class="tab" :class="{active: activeType == 5}" @click="canChangeType ? changeType(5) : ''">其他<br>需求 <view class="tab" :class="{active: activeType == 5}" @click="canChangeType ? changeType(5) : ''">其他<br>需求
</view> </view>
</view> </view>
<jobService v-if="activeType == 1" :id="id" :name="name" ref="type1" /> <jobService v-if="activeType == 1" :needId="id" :name="name" ref="type1" />
<assistService v-if="activeType == 2" :id="id" :name="name" ref="type2" /> <assistService v-if="activeType == 2" :needId="id" :name="name" ref="type2" />
<entrepreneurshipService :id="id" :name="name" v-if="activeType == 3" ref="type3" /> <entrepreneurshipService :needId="id" :name="name" v-if="activeType == 3" ref="type3" />
<trainService v-if="activeType == 4" :id="id" :name="name" ref="type4" /> <trainService v-if="activeType == 4" :needId="id" :name="name" ref="type4" />
<otherService v-if="activeType == 5" :id="id" :name="name" ref="type5" /> <otherService v-if="activeType == 5" :needId="id" :name="name" ref="type5" />
<!-- 社区端 - 显示隐藏退出组件 --> <!-- 社区端 - 显示隐藏退出组件 -->
<exitPopup /> <exitPopup />
</view> </view>
@@ -56,6 +56,7 @@
onLoad(options) { onLoad(options) {
this.showTab = options.showTab this.showTab = options.showTab
this.id = options.id this.id = options.id
console.log("this.id",this.id)
this.name = options.name this.name = options.name
if (options.id && options.type) { if (options.id && options.type) {
this.isAdd = false this.isAdd = false
@@ -93,7 +94,7 @@
.page { .page {
background-color: #EEF1F5 !important; background-color: #EEF1F5 !important;
height: 100vh; height: 100vh;
background-image: url('../../static/images/top.png'); background-image: url('https://rc.jinan.gov.cn/qcwjyH5/static/images/top.png');
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: 100% auto; background-size: 100% auto;

File diff suppressed because it is too large Load Diff

View File

Before

Width:  |  Height:  |  Size: 23 KiB

After

Width:  |  Height:  |  Size: 23 KiB

View File

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View File

Before

Width:  |  Height:  |  Size: 5.2 KiB

After

Width:  |  Height:  |  Size: 5.2 KiB

View File

Before

Width:  |  Height:  |  Size: 7.7 KiB

After

Width:  |  Height:  |  Size: 7.7 KiB

View File

Before

Width:  |  Height:  |  Size: 4.9 KiB

After

Width:  |  Height:  |  Size: 4.9 KiB

View File

@@ -435,14 +435,7 @@
"navigationBarTextStyle": "white" "navigationBarTextStyle": "white"
} }
}, },
{
"path": "pages/demand/index",
"style": {
"navigationBarTitleText": "需求上报",
"navigationBarBackgroundColor": "#4778EC",
"navigationBarTextStyle": "white"
}
},
{ {
"path": "pages/demand/demandail", "path": "pages/demand/demandail",
"style": { "style": {

View File

@@ -248,7 +248,7 @@
</view> </view>
</view> </view>
</scroll-view> </scroll-view>
<view class="jobs-add button-click" @click="navTo('/packageA/pages/addPosition/addPosition')"> <view class="jobs-add button-click" @click="navTo('/packageRc/pages/daiban/daiban')">
<uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons> <uni-icons class="iconsearch" color="#666D7F" type="plusempty" size="18"></uni-icons>
<text>添加</text> <text>添加</text>
</view> </view>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 157 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 516 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 896 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 20 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 11 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 137 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.9 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 71 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.6 KiB