This commit is contained in:
周源 2022-04-26 17:17:51 +08:00
parent 646ba2d89a
commit fa2536bd32
3 changed files with 1155 additions and 129 deletions

View File

@ -0,0 +1,900 @@
<template>
<view>
<u--form :model="model1" ref="form1" labelPosition="top" labelWidth='auto' :labelStyle='{fontWeight:800}'>
<!-- 完善资料 -->
<!-- 这里加了 v-for 导致 ref 失效 -->
<view class="wanShan" v-if="pageTypeId!=='fws'">
<view class="data_itm_box">
<u-form-item prop="userInfo.name" ref="item1" class="data_itm">
<text class="label_t">姓名</text>
<u--input class="p32" placeholder="请填写姓名" inputAlign="right" clearable
v-model="model1.userInfo.name" border="none"></u--input>
</u-form-item>
<u-form-item prop="userInfo.sex" ref="item1" @click="showSex=true" class="data_itm">
<text class="label_t">性别</text>
<u--input class="p32" placeholder="请填选择性别" v-model="model1.userInfo.sex" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</u-form-item>
<u-form-item ref="item1" @click="showBirthday=true" class="data_itm">
<text class="label_t">出生日期</text>
<u--input class="p32" placeholder="请填选择出生日期" v-model="model1.userInfo.birthday" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
<u-form-item prop="userInfo.idCOde" ref="item1" class="data_itm">
<text class="label_t">身份证号</text>
<u--input class="p32" placeholder="请输入身份证号码" inputAlign="right" clearable
v-model="model1.userInfo.idCOde" border="none"></u--input>
</u-form-item>
</view>
<view class="data_itm_box">
<u-form-item ref="item1" @click="zuShow=true" class="data_itm">
<text class="label_t">民族</text>
<u--input class="p32" placeholder="请选择民族" v-model="zuValue" readonly inputAlign="right"
border="none">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</u-form-item>
<u-form-item ref="item1" @click="jigaunShow=true" class="data_itm">
<text class="label_t">籍贯</text>
<u--input class="p32" placeholder="请选择籍贯" v-model="jiguan" readonly inputAlign="right"
border="none">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</u-form-item>
<u-form-item ref="item1" @click="zhengzhiShow=true" class="data_itm">
<text class="label_t">政治面貌</text>
<u--input class="p32" placeholder="请选择政治面貌" v-model="zhengzhiValue" readonly inputAlign="right"
border="none">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</u-form-item>
</view>
<view class="data_itm_box">
<u-form-item prop="userInfo.phoneNum" ref="item1" class="data_itm">
<text class="label_t">联系电话</text>
<u--input class="p32" placeholder="请输入联系电话" inputAlign="right" clearable
v-model="model1.userInfo.phoneNum" border="none"></u--input>
</u-form-item>
</view>
<view class="data_itm_box">
<view class="data_itm">
<view class="data_itm_key label_t">
照片上传
</view>
</view>
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="2">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
</view>
</view>
<!-- 协会会员 -->
<view class="data_itm_box" v-if='pageTypeId=="xhhy"'>
<u-form-item prop="userInfo.meeting" ref="item1" class="data_itm">
<text class="label_t">*所属协会</text>
<u--input class="p32" placeholder="请输入所属协会" inputAlign="right" clearable
v-model="model1.userInfo.meeting" border="none"></u--input>
</u-form-item>
<u-form-item ref="item1" @click="showJionmeet=true" class="data_itm">
<text class="label_t">入会时间</text>
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
</view>
<!-- 文艺人才 -->
<view class="wenyi" v-if="pageTypeId=='wyrc'">
<view class="data_itm_box">
<u-form-item ref="item1" @click="renCaiShow=true" class="data_itm">
<text class="label_t">人才类型</text>
<u--input class="p32" placeholder="请选择类型" v-model="renCaiValue" readonly inputAlign="right"
border="none">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</u-form-item>
<u-form-item ref="item1" label='艺术成就' class="data_itm te">
<view class="chen_itm" v-for="(v,i) in artlist" :key="i">
<input type="text" v-model="artlist[i]" placeholder="请输入艺术成就" class="chengjiu" />
<view class="right_img_box">
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(0)"
v-if="artlist.length==i+1">
<image src="../../static/improveData/redAdd.png" mode=""></image>
</view>
<view class="delImg" @click="delItem(0,i)" v-if="artlist.length>1&&artlist.length!=i+1">
<img style="width: 40rpx; height: 40rpx;" src="../../static/improveData/del.png"
alt="">
</view>
</view>
</view>
</u-form-item>
<u-form-item ref="item1" label='荣誉奖项' class="data_itm te">
<view class="chen_itm" v-for="(va,ind) in honorList" :key="ind">
<input type="text" v-model="honorList[ind]" placeholder="请输入荣誉奖项" class="chengjiu" />
<view class="right_img_box">
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(1)"
v-if="honorList.length==ind+1">
<image src="../../static/improveData/redAdd.png" mode=""></image>
</view>
<view class="delImg" @click="delItem(1,ind)"
v-if="honorList.length>1&&honorList.length!=ind+1">
<img style="width: 40rpx; height: 40rpx;" src="../../static/improveData/del.png"
alt="">
</view>
</view>
</view>
</u-form-item>
<u-form-item ref="item1" label='代表作' class="data_itm te">
<view v-for="(val,index) in StandradList" :key="index">
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="chengjiu" />
<view class="right_img_box">
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(2)"
v-if="StandradList.length==index+1">
<image src="../../static/improveData/redAdd.png" mode=""></image>
</view>
<view class="delImg" @click="delItem(2,index)"
v-if="StandradList.length>1&&StandradList.length!=index+1">
<img style="width: 40rpx; height: 40rpx;" src="../../static/improveData/del.png"
alt="">
</view>
</view>
<view class="chen_itm" style="width: 200rpx;">
<u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx"
:fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic"
:name='String(index)' multiple :maxCount="2">
<image style="width: 140rpx;height: 140rpx;"
src="../../static/improveData/imgjia.png">
</image>
</u-upload>
</view>
</view>
</u-form-item>
<view class="data_itm" style="display: flex;justify-content: space-between; align-items: center;">
<!-- 是否已加入协会 -->
<text class="label_t">是否已加入协会</text>
<u-switch v-model="isJioned" activeColor="#99241B" size=20></u-switch>
</view>
<u-form-item ref="item1" @click="showBirthday=true" class="data_itm">
<text class="label_t">入会时间</text>
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.meetingTime" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
</view>
</view>
<!-- 服务商 -->
<view class="fuwushang" v-if="pageTypeId=='fws'">
<view class="data_itm_box">
<u-form-item prop="userInfo.ServerName" ref="item1" class="data_itm">
<text class="label_t">服务名称</text>
<u--input class="p32" placeholder="请输入服务名称" inputAlign="right" clearable
v-model="model1.userInfo.ServerName" border="none"></u--input>
</u-form-item>
<u-form-item prop="userInfo.Address" ref="item1" class="data_itm">
<text class="label_t">地址</text>
<u--input class="p32" placeholder="请输入地址" inputAlign="right" clearable
v-model="model1.userInfo.Address" border="none"></u--input>
</u-form-item>
<u-form-item ref="item1" label="实景照片上传" class="data_itm">
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList1"
@afterRead="afterRead" @delete="deletePic" name="1" multiple :maxCount="2">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
</u-form-item>
<u-form-item ref="item1" label="资质照片上传" class="data_itm">
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList4"
@afterRead="afterRead" @delete="deletePic" name="4" multiple :maxCount="2">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
</u-form-item>
</view>
<view class="data_itm_box">
<u-form-item prop="userInfo.serverInstrutor" label="服务内容介绍" ref="item1">
<u--textarea v-model="model1.userInfo.serverInstrutor" placeholder="请输入介绍"
style="background-color: #F8F8F8;"></u--textarea>
</u-form-item>
<u-form-item ref="item1" @click="showServeTime=true" class="data_itm">
<text class="label_t">服务开始时间</text>
<u--input class="p32" placeholder="请填选择服务开始时间" v-model="model1.userInfo.serveTime" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
<u-form-item ref="item1" @click="showServeTimeend=true" class="data_itm">
<text class="label_t">服务结束时间</text>
<u--input class="p32" placeholder="请填选择服务结束时间" v-model="model1.userInfo.serveTimeend" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
<u-form-item prop="userInfo.DutyPeopleName" ref="item1" class="data_itm">
<text class="label_t">负责人姓名</text>
<u--input class="p32" placeholder="请输入负责人姓名" inputAlign="right" clearable
v-model="model1.userInfo.DutyPeopleName" border="none"></u--input>
</u-form-item>
<u-form-item prop="userInfo.ServephoneNum" ref="item1" class="data_itm">
<text class="label_t">电话</text>
<u--input class="p32" placeholder="请输入电话" inputAlign="right" clearable
v-model="model1.userInfo.ServephoneNum" border="none"></u--input>
</u-form-item>
</view>
</view>
<view class="operation">
<button type="default" class="next" @click="submit">登录</button>
</view>
</u--form>
<!-- form ed -->
<!-- 性别弹框区 -->
<u-popup :show="showSex" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist7" :key="index+100*2"
:label="item.name" labelSize="28rpx" labelColor="#231F1C" :name="item.name" activeColor="#99241B ">
</u-radio>
<u-button class="custom-style" style="background-color:#99241B ; color: #FFFFFF; margin-top: 32rpx;"
type="default" @click="showSex=false">确认</u-button>
</u-radio-group>
</u-popup>
<!-- 弹框区 ed -->
<!-- 日期选择器 -->
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday"
:value="model1.userInfo.birthday" mode="date" closeOnClickOverlay @confirm="birthdayConfirm"
@cancel="birthdayClose" @close="birthdayClose"></u-datetime-picker>
<!-- 日期选择器ed -->
<!-- 服务日期选择器 -->
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showServeTime"
:value="model1.userInfo.serveTime" mode="date" closeOnClickOverlay @confirm="ServeTimeConfirm"
@cancel="ServeTimeClose" @close="ServeTimeClose"></u-datetime-picker>
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showServeTimeend"
:value="model1.userInfo.serveTimeend" mode="date" closeOnClickOverlay @confirm="ServeTimeConfirmend"
@cancel="ServeTimeClose" @close="ServeTimeClose"></u-datetime-picker>
<!-- 服务日期选择器ed -->
<!-- 入会日期选择器 -->
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showJionmeet"
:value="model1.userInfo.jionTime" mode="date" closeOnClickOverlay @confirm="jionMeetConfirm"
@cancel="JionTimeClose" @close="JionTimeClose"></u-datetime-picker>
<!-- 入会日期选择器ed -->
<!-- 民族选择器 -->
<u-picker :show="zuShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZu" immediateChange
:columns="Zucolumns"></u-picker>
<!-- 民族选择器 ed-->
<!-- 政治面貌选择器 -->
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZheng" immediateChange
:columns="Zhengcolumns"></u-picker>
<!-- 政治面貌选择器 ed-->
<!-- 籍贯面貌选择器 -->
<u-picker :show="jigaunShow" confirmColor="#99241B" @change="selctJi" @confirm="confimJi" immediateChange
:columns="Jicolumns"></u-picker>
<!-- 籍贯面貌选择器 ed-->
<!-- 人才类型选择器 -->
<u-picker :show="renCaiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimRenCai" immediateChange
:columns="peopleSkillColums"></u-picker>
<!-- 人才类型选择器 ed-->
<view class="zhan_w">
<!-- zhanwei -->
</view>
</view>
</template>
<script>
import http from '../../request/interface.js'
export default {
data() {
return {
showJionmeet: false,
pageTypeId: '',
isJioned: false,
renCaiShow: false,
zhengzhiShow: false,
zhengzhiValue: '',
renCaiValue: '',
zuValue: "",
zuShow: false,
artResultList: '',
artlist: [''],
honorList: [""],
StandradList: [''],
peopleSkillColums: [
["天才", "卓越", "平平"]
],
Zucolumns: [
["汉族", "朝鲜族"],
],
Zhengcolumns: [
["群众", "党员", '共青团员'],
],
Jicolumns: [
["河南", "浙江", '上海'],
],
fileList4: [], //
fileList1: [], //
fileList2: [
[]
], //
fileList3: [], //
jiguan: '',
jigaunShow: false,
showBirthday: false,
showServeTime: false,
showServeTimeend: false,
sex: '',
showSex: false,
radiovalue7: '',
radiolist7: [{
name: '男'
}, {
name: '女'
}],
model1: {
userInfo: {
name: '',
sex: '',
birthday: "",
idCOde: '',
zuValue: '',
phoneNum: '',
meeting: '',
meetingTime: '',
ServerName: '',
Address: '',
serverInstrutor: '', //
serveTime: '',
serveTimeend: '',
jionTime: '',
DutyPeopleName: '', //
ServephoneNum: '', //
},
},
rules: {
'userInfo.serverInstrutor': [{
type: 'string',
required: true,
message: '请填写服务内容介绍',
trigger: ['blur', 'change']
}],
'userInfo.Address': [{
type: 'string',
required: true,
message: '请填写地址',
trigger: ['blur', 'change']
}],
'userInfo.name': [{
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
}, {
// truefalse
validator: (rule, value, callback) => {
// uViewjshttps://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value);
},
message: "姓名必须为中文",
// blurchange
trigger: ["change", "blur"],
}],
'userInfo.meeting': [{
type: 'string',
required: true,
message: '请填写协会名',
trigger: ['blur', 'change']
}],
'userInfo.sex': {
type: 'string',
max: 1,
required: true,
message: '请选择男或女',
trigger: ['blur', 'change']
},
'userInfo.idCOde': [{
required: true,
message: '请输入身份证号号',
trigger: ['change', 'blur'],
},
{
//
validator: (rule, value, callback) => {
return uni.$u.test.idCard(value);
},
message: '身份证号码格式不正确',
trigger: ['change', 'blur'],
}
],
"userInfo.phoneNum": [{
required: true,
message: '请输入联系电话',
trigger: ['change', 'blur'],
},
{
validator: (rule, value, callback) => {
return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['change', 'blur'],
}
],
"userInfo.ServephoneNum": [{
required: true,
message: '请输入联系电话',
trigger: ['change', 'blur'],
},
{
validator: (rule, value, callback) => {
return uni.$u.test.mobile(value);
},
message: '手机号码不正确',
trigger: ['change', 'blur'],
}
],
'userInfo.ServerName': [{
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
}, {
// truefalse
validator: (rule, value, callback) => {
// uViewjshttps://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value);
},
message: "姓名必须为中文",
// blurchange
trigger: ["change", "blur"],
}],
'userInfo.DutyPeopleName': [{
type: 'string',
required: true,
message: '请填写姓名',
trigger: ['blur', 'change']
}, {
// truefalse
validator: (rule, value, callback) => {
// uViewjshttps://www.uviewui.com/js/test.html
return uni.$u.test.chinese(value);
},
message: "姓名必须为中文",
// blurchange
trigger: ["change", "blur"],
}],
},
};
},
onLoad(option) {
console.log(option.id);
this.pageTypeId = option.id
},
onReady() {
this.$refs.form1.setRules(this.rules);
},
methods: {
close() {
this.showSex = false
},
AddItem(typNum) {
switch (typNum) {
case 0:
// this.$set(this.artlist, changeNum, null)
this.artlist.push("")
break;
case 1:
this.honorList.push('')
break;
case 2:
this.StandradList.push('')
this.fileList2.push([])
break;
}
},
delItem(typNum, num) {
switch (typNum) {
case 0:
this.artlist.splice(num, 1)
break;
case 1:
this.honorList.splice(num, 1)
break;
case 2:
this.StandradList.splice(num, 1)
break;
}
},
sexSelect(e) {
this.model1.userInfo.sex = e.name
// this.$refs.form1.validateField('userInfo.sex')
},
selectForm(sex) {
this.model1.userInfo.sex = sex
},
birthdayConfirm(e) {
this.showBirthday = false
this.model1.userInfo.birthday = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
// this.$refs.form1.validateField('userInfo.birthday')
},
ServeTimeConfirm(e) {
this.showServeTime = false
this.model1.userInfo.serveTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
ServeTimeConfirmend(e) {
this.showServeTimeend = false
this.model1.userInfo.serveTimeend = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
jionMeetConfirm(e) {
this.showJionmeet = false
this.model1.userInfo.jionTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
birthdayClose() {
this.showBirthday = false
// this.$refs.form1.validateField('userInfo.birthday')
},
ServeTimeClose() {
this.showServeTime = false
// this.$refs.form1.validateField('userInfo.birthday')
},
JionTimeClose() {
this.showJionmeet = false
},
selctZU(e) {
console.log(e);
},
selctJi(e) {
console.log(e);
},
confimZu(e) {
this.zuShow = false
this.zuValue = e.value[0]
// console.log(e.value[0]);
},
confimZheng(e) {
this.zhengzhiShow = false
this.zhengzhiValue = e.value[0]
},
confimRenCai(e) {
this.renCaiShow = false
this.renCaiValue = e.value[0]
},
confimJi(e) {
this.jigaunShow = false
this.jiguan = e.value[0]
},
//
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
async afterRead(event) {
// mutiple true , file
let lists = [].concat(event.file)
console.log(lists)
console.log(event.file)
let fileListLen = this[`fileList${event.name}`].length
lists.map((item) => {
this[`fileList${event.name}`].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log("result", result);
let item = this[`fileList${event.name}`][fileListLen]
this[`fileList${event.name}`].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
console.log("fileList", this[`fileList${event.name}`]);
},
//
async afterRead1(event) {
// mutiple true , file
let lists = [].concat(event.file)
console.log(this.fileList2[event.name])
let fileListLen = this.fileList2[event.name].length
lists.map((item) => {
this.fileList2[event.name].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log("result", result);
let item = this.fileList2[event.name][fileListLen]
this.fileList2[event.name].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
console.log("fileList", this.fileList2[event.name]);
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
url: http.config.baseUrl + '/upload/upload',
filePath: url,
name: 'file',
success: (res) => {
setTimeout(() => {
// console.log("upload1",JSON.parse(res.data).data.path);
resolve(JSON.parse(res.data).data.path)
}, 1000)
}
});
})
},
submit() {
this.$refs.form1.validate().then(res => {
uni.$u.toast('Thanks your helping')
}).catch(errors => {
uni.$u.toast('您的资料还未补充完整')
return
})
var fl3 = this.fileList3.map((v, i) => {
return v.url
})
let that = this.model1.userInfo
let data = {
// "phone": that.phoneNum,
"artAtt": "",
"associationId": "",
"base": this.jiguan,
"birthDay": that.birthday,
"cfPhoto": "",
"comeTime": "",
"greats": "",
"idCard": that.idCOde,
"images": JSON.stringify(fl3),
"info": "",
"isAssociation": true,
"nation": this.zuValue,
"nickName": "",
"opus": "",
"password": "",
"photo": "",
"politics": this.zhengzhiValue,
"rcType": "",
"serviceAddress": "",
"serviceName": "",
"sex": that.sex,
"timeEnd": 0,
"timeStart": 0,
"userName": that.name,
"userType": this.pageTypeId,
}
console.log("dataddddddddd", data);
this.http.request('/user/init', data, "POST").then(res => {
if (res.code == 200) {
/* uni.navigateTo({
url: '/pages/pageHome/pageHome'
}) */
uni.showToast({
title: "成功了",
icon: "none",
});
}
}).catch(e => {
uni.showToast({
title: e.data.message,
icon: "none",
});
})
}
}
}
</script>
<style lang="scss">
page {
background-color: #F5F5F5;
}
.chengjiu {
background-color: #F5f5f5;
border-radius: 16rpx;
padding-left: 12rpx;
height: 80rpx;
width: 550rpx;
}
.p32 {
padding: 20rpx !important;
}
.WenYiUpload {
padding: 32rpx;
background-color: #F8F8F8;
margin-top: 16rpx;
}
.te /deep/ .u-form-item__body__right__content__slot {
flex-wrap: wrap !important;
}
image {
width: 100%;
height: 100%;
}
.upload {
padding-top: 32rpx;
}
.data_itm_box {
padding: 32rpx 0rpx;
.chen_itm {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
.right_img_box {
width: 80rpx;
height: 80rpx;
margin-left: 16rpx;
display: flex;
align-items: center;
justify-content: center;
}
}
margin-bottom: 16rpx;
border: 1px solid transparent;
padding: 0 32rpx;
background-color: #FFFFFF;
.data_itm {
.label_t {
font-size: 28rpx;
color: $black;
font-weight: 600;
}
}
.upload_box {
width: 166rpx;
height: 166rpx;
margin-left: 32rpx;
position: relative;
background-color: #F8F8F8;
margin-bottom: 64rpx;
}
}
.operation {
display: flex;
justify-content: space-between;
align-items: center;
padding: 32rpx 32rpx 48rpx;
position: fixed;
left: 0;
bottom: 0;
right: 0;
background-color: #FFFFFF;
box-shadow: 0px -4px 10px 1px rgba(192, 192, 192, 0.12);
z-index: 99;
.next {
width: calc(100% - 48rpx);
height: 80rpx;
line-height: 80rpx;
background-color: #99241B;
color: #fff;
font-size: 32rpx;
font-weight: 600;
border: none;
button {
&::after {
border: none;
}
}
}
}
.zhan_w {
height: 160rpx;
}
</style>

View File

@ -70,13 +70,20 @@
</view>
<view class="data_itm_box">
<u-form-item prop="userInfo.phoneNum" ref="item1" class="data_itm">
<!-- <u-form-item prop="userInfo.phoneNum" ref="item1" class="data_itm">
<text class="label_t">联系电话</text>
<u--input class="p32" placeholder="请输入联系电话" inputAlign="right" clearable
v-model="model1.userInfo.phoneNum" border="none"></u--input>
</u-form-item> -->
<u-form-item prop="userInfo.pasw" ref="item1" class="data_itm">
<text class="label_t">密码</text>
<u--input class="p32" placeholder="请输入密码" inputAlign="right" clearable
v-model="model1.userInfo.pasw" border="none"></u--input>
</u-form-item>
</view>
<view class="data_itm_box">
<view class="data_itm_box" style="padding: 32rpx ;">
<view class="data_itm">
<view class="data_itm_key label_t">
@ -86,6 +93,7 @@
<u-upload class="upload" accept="image" width="172rpx" height="172rpx" :fileList="fileList3"
@afterRead="afterRead" @delete="deletePic" name="3" multiple :maxCount="2">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload>
</view>
@ -94,19 +102,26 @@
<!-- 协会会员 -->
<view class="data_itm_box" v-if='pageTypeId=="xhhy"'>
<u-form-item prop="userInfo.meeting" ref="item1" class="data_itm">
<u-form-item ref="item1" @click="xieShow=true" class="data_itm">
<text class="label_t">*所属协会</text>
<u--input class="p32" placeholder="请输入所属协会" inputAlign="right" clearable
v-model="model1.userInfo.meeting" border="none"></u--input>
<u--input class="p32" placeholder="请输入所属协会" v-model="xieValue" readonly inputAlign="right"
border="none">
<u-icon slot="suffix" name="arrow-right"></u-icon>
</u--input>
</u-form-item>
<u-form-item ref="item1" @click="showJionmeet=true" class="data_itm">
<text class="label_t">入会时间</text>
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
</view>
@ -159,11 +174,16 @@
</view>
</u-form-item>
<u-form-item ref="item1" label='代表作' class="data_itm te">
<view class="chen_itm" v-for="(val,index) in StandradList" :key="index">
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="chengjiu" />
<view class="right_img_box">
<u-form-item ref="item1" label='代表作' class="data_itm te">
<view v-for="(val,index) in StandradList" :key="index">
<view class="tt"
style="display: flex; justify-content: space-between; align-items: center; ">
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称"
class="chengjiu" />
<view class="right_img_box" style="margin-left: 16rpx;">
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(2)"
v-if="StandradList.length==index+1">
<image src="../../static/improveData/redAdd.png" mode=""></image>
@ -175,16 +195,21 @@
</view>
</view>
</view>
<view class="chen_itm">
<view class="chen_itm" style="width: 200rpx;">
<u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx"
:fileList="fileList2" @afterRead="afterRead" @delete="deletePic" name="2" multiple
:maxCount="2">
<image style="width: 140rpx;height: 140rpx;" src="../../static/improveData/imgjia.png">
:fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1"
:name='String(index)' multiple :maxCount="2">
<image style="width: 172rpx;height: 172rpx;"
src="../../static/improveData/imgjia.png">
</image>
</u-upload>
</view>
</view>
</u-form-item>
<view class="data_itm" style="display: flex;justify-content: space-between; align-items: center;">
<!-- 是否已加入协会 -->
@ -192,13 +217,13 @@
<u-switch v-model="isJioned" activeColor="#99241B" size=20></u-switch>
</view>
<u-form-item ref="item1" @click="showBirthday=true" class="data_itm">
<u-form-item ref="item1" @click="showJionmeet=true" class="data_itm">
<text class="label_t">入会时间</text>
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.meetingTime" readonly
<u--input class="p32" placeholder="请选择时间" v-model="model1.userInfo.jionTime" readonly
inputAlign="right" border="none">
<u-icon slot="suffix" name="calendar"></u-icon>
</u--input>
</u-form-item>
</view>
@ -261,11 +286,11 @@
<u--input class="p32" placeholder="请输入负责人姓名" inputAlign="right" clearable
v-model="model1.userInfo.DutyPeopleName" border="none"></u--input>
</u-form-item>
<u-form-item prop="userInfo.ServephoneNum" ref="item1" class="data_itm">
<!-- <u-form-item prop="userInfo.ServephoneNum" ref="item1" class="data_itm">
<text class="label_t">电话</text>
<u--input class="p32" placeholder="请输入电话" inputAlign="right" clearable
v-model="model1.userInfo.ServephoneNum" border="none"></u--input>
</u-form-item>
</u-form-item> -->
</view>
</view>
@ -276,7 +301,8 @@
</u--form>
<!-- form ed -->
<!-- 性别弹框区 -->
<u-popup :show="showSex" @close="close" closeOnClickOverlay :round="5" customStyle="padding: 16px;">
<u-popup :show="showSex" @close="close('showSex')" @cancel="close('showSex')" closeOnClickOverlay :round="5"
customStyle="padding: 16px;">
<u-radio-group @change="selectForm" v-model="radiovalue7" :borderBottom="true" placement="column"
iconPlacement="right">
<u-radio :customStyle="{marginBottom: '16px' }" v-for="(item, index) in radiolist7" :key="index+100*2"
@ -290,39 +316,46 @@
<!-- 日期选择器 -->
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday"
:value="model1.userInfo.birthday" mode="date" closeOnClickOverlay @confirm="birthdayConfirm"
@cancel="birthdayClose" @close="birthdayClose"></u-datetime-picker>
@close="close('showBirthday')" @cancel="close('showBirthday')"></u-datetime-picker>
<!-- 日期选择器ed -->
<!-- 服务日期选择器 -->
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showServeTime"
:value="model1.userInfo.serveTime" mode="date" closeOnClickOverlay @confirm="ServeTimeConfirm"
@cancel="ServeTimeClose" @close="ServeTimeClose"></u-datetime-picker>
:value="model1.userInfo.serveTime" mode="time" closeOnClickOverlay @confirm="ServeTimeConfirm"
@close="close('showServeTime')" @cancel="close('showServeTime')"></u-datetime-picker>
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showServeTimeend"
:value="model1.userInfo.serveTimeend" mode="date" closeOnClickOverlay @confirm="ServeTimeConfirmend"
@cancel="ServeTimeClose" @close="ServeTimeClose"></u-datetime-picker>
:value="model1.userInfo.serveTimeend" mode="time" closeOnClickOverlay @confirm="ServeTimeConfirmend"
@close="close('showServeTimeend')" @cancel="close('showServeTimeend')"></u-datetime-picker>
<!-- 服务日期选择器ed -->
<!-- 入会日期选择器 -->
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showJionmeet"
:value="model1.userInfo.jionTime" mode="date" closeOnClickOverlay @confirm="jionMeetConfirm"
@cancel="JionTimeClose" @close="JionTimeClose"></u-datetime-picker>
@close="close('showJionmeet')" @cancel="close('showJionmeet')"></u-datetime-picker>
<!-- 入会日期选择器ed -->
<!-- 民族选择器 -->
<u-picker :show="zuShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZu" immediateChange
:columns="Zucolumns"></u-picker>
<u-picker :show="zuShow" confirmColor="#99241B" closeOnClickOverlay @close="close('zuShow')"
@cancel="close('zuShow')" @confirm="confimZu" immediateChange :columns="Zucolumns"></u-picker>
<!-- 民族选择器 ed-->
<!-- 协会选择器 -->
<u-picker :show="xieShow" confirmColor="#99241B" @confirm="confirmxie" @close="close('xieShow')"
@cancel="close('xieShow')" closeOnClickOverlay immediateChange :columns="xiecolumns">
</u-picker>
<!-- 协会选择器 ed-->
<!-- 政治面貌选择器 -->
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimZheng" immediateChange
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @close="close('zhengzhiShow')"
@cancel="close('zhengzhiShow')" closeOnClickOverlay @confirm="confimZheng" immediateChange
:columns="Zhengcolumns"></u-picker>
<!-- 政治面貌选择器 ed-->
<!-- 籍贯面貌选择器 -->
<u-picker :show="jigaunShow" confirmColor="#99241B" @change="selctJi" @confirm="confimJi" immediateChange
:columns="Jicolumns"></u-picker>
<u-picker :show="jigaunShow" confirmColor="#99241B" @close="close('jigaunShow')" @cancel="close('jigaunShow')"
closeOnClickOverlay @confirm="confimJi" immediateChange :columns="Jicolumns"></u-picker>
<!-- 籍贯面貌选择器 ed-->
<!-- 人才类型选择器 -->
<u-picker :show="renCaiShow" confirmColor="#99241B" @change="selctZU" @confirm="confimRenCai" immediateChange
:columns="peopleSkillColums"></u-picker>
<u-picker :show="renCaiShow" confirmColor="#99241B" @close="close('renCaiShow')" @cancel="close('renCaiShow')"
closeOnClickOverlay @confirm="confimRenCai" immediateChange :columns="peopleSkillColums"></u-picker>
<!-- 人才类型选择器 ed-->
@ -337,8 +370,9 @@
export default {
data() {
return {
xiehuiObj: {}, //
xiehuiId: '',
showJionmeet: false,
pageTypeId: '',
isJioned: false,
renCaiShow: false,
@ -346,10 +380,12 @@
zhengzhiValue: '',
renCaiValue: '',
zuValue: "",
xieValue: '',
zuShow: false,
xieShow: false,
artResultList: '',
artlist: [''],
honorList: [""],
honorList: [''],
StandradList: [''],
peopleSkillColums: [
["天才", "卓越", "平平"]
@ -357,6 +393,7 @@
Zucolumns: [
["汉族", "朝鲜族"],
],
xiecolumns: [],
Zhengcolumns: [
["群众", "党员", '共青团员'],
],
@ -366,11 +403,10 @@
],
fileList4: [], //
fileList1: [], //
fileList2: [], //
fileList2: [
[]
], //
fileList3: [], //
jiguan: '',
jigaunShow: false,
showBirthday: false,
@ -390,11 +426,10 @@
sex: '',
birthday: "",
idCOde: '',
zuValue: '',
phoneNum: '',
meeting: '',
meetingTime: '',
// meetingTime: '',
ServerName: '',
Address: '',
serverInstrutor: '', //
@ -402,10 +437,17 @@
serveTimeend: '',
jionTime: '',
DutyPeopleName: '', //
ServephoneNum: '', //
// ServephoneNum: '', //
pasw: ''
},
},
rules: {
'userInfo.pasw': [{
type: 'string',
required: true,
message: '密码不能为空',
trigger: ['blur']
}],
'userInfo.serverInstrutor': [{
type: 'string',
required: true,
@ -460,11 +502,13 @@
trigger: ['change', 'blur'],
}
],
]
/* ,
"userInfo.phoneNum": [{
required: true,
message: '请输入联系电话',
trigger: ['change', 'blur'],
},
},
{
@ -474,7 +518,8 @@
message: '手机号码不正确',
trigger: ['change', 'blur'],
}
],
] */
/* ,
"userInfo.ServephoneNum": [{
required: true,
message: '请输入联系电话',
@ -488,7 +533,8 @@
message: '手机号码不正确',
trigger: ['change', 'blur'],
}
],
] */
,
'userInfo.ServerName': [{
type: 'string',
required: true,
@ -530,11 +576,29 @@
onReady() {
this.$refs.form1.setRules(this.rules);
this.http.request('/association/list', {}, "GET").then((res) => {
res.data.records.map((v, i) => {
return this.xiehuiObj[v.name] = v.id
})
var xieList = res.data.records.map((v, i) => {
return v.name
})
this.xiecolumns.push(xieList)
console.log('this.xiehuiObj', this.xiehuiObj);
}).catch((error) => {
console.log("error", error);
})
},
methods: {
close() {
this.showSex = false
close(show) {
this[show] = false
},
AddItem(typNum) {
@ -548,6 +612,7 @@
break;
case 2:
this.StandradList.push('')
this.fileList2.push([])
break;
}
@ -564,6 +629,7 @@
break;
case 2:
this.StandradList.splice(num, 1)
break;
}
@ -583,42 +649,29 @@
},
ServeTimeConfirm(e) {
this.showServeTime = false
this.model1.userInfo.serveTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.model1.userInfo.serveTime = e.value
},
ServeTimeConfirmend(e) {
this.showServeTimeend = false
this.model1.userInfo.serveTimeend = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
this.model1.userInfo.serveTimeend = e.value
},
jionMeetConfirm(e) {
this.showJionmeet = false
this.model1.userInfo.jionTime = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
},
birthdayClose() {
this.showBirthday = false
// this.$refs.form1.validateField('userInfo.birthday')
},
ServeTimeClose() {
this.showServeTime = false
// this.$refs.form1.validateField('userInfo.birthday')
},
JionTimeClose() {
this.showJionmeet = false
},
selctZU(e) {
console.log(e);
},
selctJi(e) {
console.log(e);
},
confimZu(e) {
this.zuShow = false
this.zuValue = e.value[0]
// console.log(e.value[0]);
},
confirmxie(e) {
this.xieShow = false
this.xieValue = e.value[0]
this.xiehuiId = this.xiehuiObj[this.xieValue]
console.log("xiehuiId", this.xiehuiId);
},
confimZheng(e) {
this.zhengzhiShow = false
this.zhengzhiValue = e.value[0]
@ -635,6 +688,10 @@
deletePic(event) {
this[`fileList${event.name}`].splice(event.index, 1)
},
//
deletePic1(event) {
this.fileList2[event.name].splice(event.index, 1)
},
//
async afterRead(event) {
// mutiple true , file
@ -662,6 +719,36 @@
}
console.log("fileList", this[`fileList${event.name}`]);
},
//
async afterRead1(event) {
// mutiple true , file
let lists = [].concat(event.file)
console.log(this.fileList2[event.name])
let fileListLen = this.fileList2[event.name].length
lists.map((item) => {
this.fileList2[event.name].push({
...item,
status: 'uploading',
message: '上传中'
})
})
for (let i = 0; i < lists.length; i++) {
const result = await this.uploadFilePromise(lists[i].url)
console.log("result", result);
let item = this.fileList2[event.name][fileListLen]
this.fileList2[event.name].splice(fileListLen, 1, Object.assign(item, {
status: 'success',
message: '',
url: result
}))
fileListLen++
}
console.log("fileList", this.fileList2[event.name]);
},
uploadFilePromise(url) {
return new Promise((resolve, reject) => {
let a = uni.uploadFile({
@ -673,7 +760,7 @@
setTimeout(() => {
// console.log("upload1",JSON.parse(res.data).data.path);
resolve(JSON.parse(res.data).data.path)
}, 1000)
}
@ -687,35 +774,73 @@
uni.$u.toast('您的资料还未补充完整')
return
})
var fl3 = this.fileList3.map((v, i) => {
if (this.fileList3) {
var fl3 = JSON.stringify(this.fileList3.map((v, i) => {
return v.url
}))
} else {
var fl3 = '[]'
}
//
if (this.fileList4) {
var fl4 = JSON.stringify(this.fileList4.map((v, i) => {
return v.url
}))
} else {
var fl4 = '[]'
}
//
if (this.fileList1) {
var fl1 = JSON.stringify(this.fileList1.map((v, i) => {
return v.url
}))
} else {
var fl1 = '[]'
}
var opsArr = []
if (this.StandradList[0]) {
for (let i = 0; i < this.StandradList.length; i++) {
console.log("=====", this.fileList2);
opsArr.push({
name: this.StandradList[i],
value: this.fileList2[i].map((v, num) => {
return v.url
})
})
}
}
var yishucj = JSON.stringify(this.artlist)
var rongyujx = JSON.stringify(this.honorList)
let that = this.model1.userInfo
let data = {
// "phone": that.phoneNum,
"artAtt": "",
"associationId": "",
"artAtt": yishucj,
"associationId": this.xiehuiId,
"base": this.jiguan,
"birthDay": that.birthday,
"cfPhoto": "",
"comeTime": "",
"greats": "",
"cfPhoto": fl4,
"comeTime": that.jionTime,
"greats": rongyujx,
"idCard": that.idCOde,
"images": JSON.stringify(fl3),
"info": "",
"isAssociation": true,
"images": fl3,
"info": that.serverInstrutor,
"isAssociation": this.isJioned,
"nation": this.zuValue,
"nickName": "",
"opus": "",
"password": "",
"photo": "",
// "nickName": "",
"opus": opsArr,
// "password": "",
"photo": fl1,
"politics": this.zhengzhiValue,
"rcType": "",
"serviceAddress": "",
"serviceName": "",
"rcType": this.renCaiValue,
"serviceAddress": that.Address,
"serviceName": that.ServerName,
"sex": that.sex,
"timeEnd": 0,
"timeStart": 0,
"timeEnd": that.serveTimeend,
"timeStart": that.serveTime,
"userName": that.name,
"userType": this.pageTypeId,
}
@ -762,8 +887,9 @@
}
.WenYiUpload {
padding: 32rpx;
background-color: #F8F8F8;
// padding: 32rpx;
// background-color: #F8F8F8;
margin-top: 16rpx;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

After

Width:  |  Height:  |  Size: 3.1 KiB