This commit is contained in:
周源 2022-05-05 13:37:06 +08:00
parent 5fdf5ed6c3
commit 536c2774b4
3 changed files with 119 additions and 76 deletions

View File

@ -143,7 +143,7 @@
</view> </view>
</view> </view>
<view class="person_itm_sign"> <view class="person_itm_sign" @click="goChangeInfo('是否已入协会',JSON.parse(userInfoObj.isAssociation))">
<text class="person_itm_sign_tit">是否已入协会</text> <text class="person_itm_sign_tit">是否已入协会</text>
<view class="person_itm_sign_right"> <view class="person_itm_sign_right">
<u-switch disabled v-model="userInfoObj.isAssociation" activeColor="#99241B" size=20></u-switch> <u-switch disabled v-model="userInfoObj.isAssociation" activeColor="#99241B" size=20></u-switch>

View File

@ -2,22 +2,27 @@
<view> <view>
<view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'"> <view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'">
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model="Edvalue" border="none" <u--input class="p32 nameClass" placeholder="请填写" clearable v-model="Edvalue" border="none"
@blur="CheckValue" @clear="clearFun"> @input="CheckValue" @clear="clearFun">
</u--input> </u--input>
</view> </view>
<!-- 是否已加入协会 -->
<view class="xiehui" v-if="Edkey=='是否已入协会'"
style="display: flex;justify-content: space-between; align-items: center;padding: 0 32rpx;">
<text class="person_itm_sign_tit">是否已入协会</text>
<u-switch v-model="Edvalue" activeColor="#99241B" size=20></u-switch>
</view>
<!-- 是否已加入协会ed -->
<!-- 性别选择 -->
<view class="sex" style="background-color: #FFFFFF;margin: 32rpx;" v-if="Edkey=='性别'"> <view class="sex" style="background-color: #FFFFFF;margin: 32rpx;" v-if="Edkey=='性别'">
<u-radio-group v-model="Edvalue" iconPlacement="right" <u-radio-group v-model="Edvalue" iconPlacement="right" :customStyle="{ backgroundColor: '#FFFFFF'}"
:customStyle="{ backgroundColor: '#FFFFFF'}" placement="column" > placement="column">
<u-radio activeColor="#99241B" name="男" label="男" labelColor="#251B1D" ></u-radio> <u-radio activeColor="#99241B" name="男" label="男" labelColor="#251B1D"></u-radio>
<u-divider :hairline="true"></u-divider> <u-divider :hairline="true"></u-divider>
<u-radio activeColor="#99241B" name="女" label="女" labelColor="#251B1D"></u-radio> <u-radio activeColor="#99241B" name="女" label="女" labelColor="#251B1D"></u-radio>
</u-radio-group> </u-radio-group>
</view> </view>
<!-- 性别选择ed -->
<view class="date m16" @click="DatePicker" <view class="date m16" @click="DatePicker"
v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'"> v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'">
@ -70,10 +75,9 @@
<view class="opus" v-if="Edkey=='代表作'"> <view class="opus" v-if="Edkey=='代表作'">
<view v-for="(val,index) in StandradList" :key="index"> <view v-for="(val,index) in StandradList" :key="index">
<view class="tt" style="display: flex; justify-content: space-between; align-items: center; "> <view class="opus_inputBox">
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="chengjiu" /> <input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="opus_inputBox_inpt" />
<view class="opus_inputBox_img">
<view class="right_img_box" style="margin-left: 16rpx;">
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(2)" <view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(2)"
v-if="StandradList.length==index+1"> v-if="StandradList.length==index+1">
<image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png" <image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png"
@ -81,20 +85,18 @@
</view> </view>
<view class="delImg" @click="delItem(index)" <view class="delImg" @click="delItem(index)"
v-if="StandradList.length>1&&StandradList.length!=index+1"> v-if="StandradList.length>1&&StandradList.length!=index+1">
<img style="width: 40rpx; height: 40rpx;" src="../../static/improveData/del.png" alt=""> <img style="width: 80rpx; height: 80rpx;" src="../../static/improveData/del.png" alt="">
</view>
</view> </view>
</view> </view>
</view>
<view class="chen_itm "> <view class="chen_itm ">
<u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx" <u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx"
:fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1" :name='String(index)' :fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1" :name='String(index)'
multiple> multiple>
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/imgjia.png"> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/imgjia.png">
</image> </image>
</u-upload> </u-upload>
</view> </view>
</view> </view>
</view> </view>
@ -110,9 +112,9 @@
<!-- 头像上传 ed--> <!-- 头像上传 ed-->
<!-- 实景 资质上传 --> <!-- 实景 资质上传 -->
<view v-if="Edkey=='实景照'||Edkey=='资质证'" > <view v-if="Edkey=='实景照'||Edkey=='资质证'">
<u-upload style="margin: 16rpx 32rpx 0rpx;" accept="image" width="172rpx" <u-upload style="margin: 16rpx 32rpx 0rpx;" accept="image" width="172rpx" height="172rpx"
height="172rpx" :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1"> :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1">
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image> <image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
</u-upload> </u-upload>
</view> </view>
@ -129,7 +131,7 @@
:columns="Edkey=='政治面貌'? Zhengcolumns : Edkey =='民族' ? Zucolumns : Edkey=='籍贯' ? Jicolumns : Edkey=='人才类型'? peopleSkillColums:Edkey=='所属协会'? xiecolumns:[]"> :columns="Edkey=='政治面貌'? Zhengcolumns : Edkey =='民族' ? Zucolumns : Edkey=='籍贯' ? Jicolumns : Edkey=='人才类型'? peopleSkillColums:Edkey=='所属协会'? xiecolumns:[]">
</u-picker> </u-picker>
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :show="showBirthday" <u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :maxDate="1786778555000" :show="showBirthday"
v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'" :value="Edvalue" :mode="timeMode" v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'" :value="Edvalue" :mode="timeMode"
closeOnClickOverlay @confirm="birthdayConfirm" @cancel="birthdayClose" @close="birthdayClose"> closeOnClickOverlay @confirm="birthdayConfirm" @cancel="birthdayClose" @close="birthdayClose">
</u-datetime-picker> </u-datetime-picker>
@ -186,7 +188,7 @@
// '':'photo', // '':'photo',
// '':'cfPhoto', // '':'cfPhoto',
'服务内容介绍': 'info', '服务内容介绍': 'info',
'艺术成就': 'artAtt', // '': 'artAtt',
'荣誉奖项': 'greats', '荣誉奖项': 'greats',
'密码': 'password' '密码': 'password'
@ -195,10 +197,10 @@
postFileList2: [], // postFileList2: [], //
baseurl: http.config.baseUrl.replace('/h5/api', ''), baseurl: http.config.baseUrl.replace('/h5/api', ''),
fileList4: [], // fileList4: [], //
fileList1: [], fileList1: [], //
fileList2: [], // fileList2: [], //
StandradList: [], // StandradList: [], //
artlist: [''], // artlist: [''],
showBirthday: false, showBirthday: false,
isSubmit: true, isSubmit: true,
tempValue: '', tempValue: '',
@ -237,7 +239,7 @@
} else { } else {
this.timeMode = 'time' this.timeMode = 'time'
} }
//
if (this.Edkey == '所属协会') { if (this.Edkey == '所属协会') {
this.http.request('/association/list', {}, "GET").then((res) => { this.http.request('/association/list', {}, "GET").then((res) => {
let xieList = res.data.records.map((v, i) => { let xieList = res.data.records.map((v, i) => {
@ -266,9 +268,7 @@
let urL = this.baseurl let urL = this.baseurl
let arr = JSON.parse(this.Edvalue).map((vv, ii) => { let arr = JSON.parse(this.Edvalue).map((vv, ii) => {
return urL + vv return urL + vv
}) })
for (let i = 0; i < arr.length; i++) { for (let i = 0; i < arr.length; i++) {
this.fileList1.push({ this.fileList1.push({
url: arr[i] url: arr[i]
@ -291,9 +291,7 @@
return v.value return v.value
}) })
console.log(" this.postFileList2===", this.postFileList2); console.log(" this.postFileList2===", this.postFileList2);
var urL = this.baseurl var urL = this.baseurl
var sarr = this.fileList2.map((v, i) => { var sarr = this.fileList2.map((v, i) => {
return v.map((vv, ii) => { return v.map((vv, ii) => {
return urL + vv return urL + vv
@ -302,7 +300,6 @@
this.fileList2 = this.fileList2.map((v, i) => { this.fileList2 = this.fileList2.map((v, i) => {
return v = [] return v = []
}) })
for (let i = 0; i < sarr.length; i++) { for (let i = 0; i < sarr.length; i++) {
for (let j = 0; j < sarr[i].length; j++) { for (let j = 0; j < sarr[i].length; j++) {
@ -334,9 +331,6 @@
} else { } else {
this.Edvalue.push("") this.Edvalue.push("")
} }
}, },
delItem(num) { delItem(num) {
if (this.Edkey == '代表作') { if (this.Edkey == '代表作') {
@ -346,14 +340,9 @@
this.fileList2.splice(num, 1, ['']) this.fileList2.splice(num, 1, [''])
// //
this.postFileList2.splice(num, 1) this.postFileList2.splice(num, 1)
} else { } else {
this.Edvalue.splice(num, 1) this.Edvalue.splice(num, 1)
} }
}, },
CheckId() { CheckId() {
var value = this.Edvalue var value = this.Edvalue
@ -411,7 +400,6 @@
}, },
birthdayConfirm(e) { birthdayConfirm(e) {
this.showBirthday = false this.showBirthday = false
if (this.Edkey == '出生日期' || this.Edkey == '入会时间') { if (this.Edkey == '出生日期' || this.Edkey == '入会时间') {
this.Edvalue = uni.$u.timeFormat(e.value, 'yyyy-mm-dd') this.Edvalue = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
} else { } else {
@ -437,6 +425,11 @@
}) })
} }
} else if (this.Edkey == '是否已入协会') {
var str = JSON.stringify(this.Edvalue)
this.PostChangerRequest({
'isAssociation': str
})
} else if (this.Edkey == '资质证' || this.Edkey == '实景照') { } else if (this.Edkey == '资质证' || this.Edkey == '实景照') {
if (this.fileList1[0]) { if (this.fileList1[0]) {
@ -453,23 +446,29 @@
'photo': str 'photo': str
}) })
} }
} else { } else {
uni.showToast({ uni.showToast({
icon: 'error', icon: 'error',
title: '照片不应少于一张' title: '照片不应少于一张'
}) })
} }
} else if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') {
var str = JSON.stringify(this.Edvalue)
if (this.Edkey == '艺术成就') {
this.PostChangerRequest({
'artAtt': str
})
} else {
this.PostChangerRequest({
'greats': str
})
}
} else if (this.Edkey == '代表作') { } else if (this.Edkey == '代表作') {
console.log("submit", this.postFileList2); // console.log("submit", this.postFileList2);
// this.StandradList // this.StandradList
var opsArr = [] var opsArr = []
for (let i = 0; i < this.StandradList.length; i++) { for (let i = 0; i < this.StandradList.length; i++) {
// console.log("=====", this.fileList2); // console.log("=====", this.fileList2);
opsArr.push({ opsArr.push({
@ -487,17 +486,12 @@
[this.postListObj[this.Edkey]]: this.Edvalue [this.postListObj[this.Edkey]]: this.Edvalue
}) })
} }
/* if (this.Edkey == '') { /* if (this.Edkey == '') {
this.PostChangerRequest({ this.PostChangerRequest({
'userName': this.Edvalue 'userName': this.Edvalue
}) })
} }
*/ */
}, },
// //
PostChangerRequest(obj) { PostChangerRequest(obj) {
@ -505,9 +499,12 @@
uni.showToast({ uni.showToast({
title: "修改成功" title: "修改成功"
}) })
setTimeout(function() {
uni.navigateBack({ uni.navigateBack({
delta: 1 delta: 1
}) })
}, 500);
}).catch((error) => { }).catch((error) => {
uni.showToast({ uni.showToast({
title: "修改失败", title: "修改失败",
@ -516,17 +513,29 @@
}) })
}, },
CheckValue() { CheckValue() {
// console.log("event",event); // input value
// console.log("dddd",this.Edkey); // console.log("event", event.target.value);
if (this.Edkey) { // console.log("gg", event.target.value.indexOf(" ") >= 0);
this.Edvalue = this.Edvalue.trim()
// uni.$u.toast('') if (!this.Edvalue) {
// console.log(this.tempValue); uni.showToast({
title: "值不能为空或者空格",
// this.Edvalue=this.tempValue icon:'error'
})
this.isSubmit = false
} else if (event) {
if (event.target.value !== '') {
this.isSubmit = true
} }
}
// console.log("this.Edvalue",!this.Edvalue );
/* if (event) {
if (event.target.value !== '') {
this.isSubmit = true
}
}
*/
}, },
clearFun() { clearFun() {
console.log("清空"); console.log("清空");
@ -617,10 +626,18 @@
watch: { watch: {
'Edvalue': function(n, o) { 'Edvalue': function(n, o) {
console.log("n", n); console.log("n", n);
if (!n) { // console.log("event.target.value", event.target.value);
uni.$u.toast('不能为空') if (this.Edkey == '是否已入协会') {
this.isSubmit=false this.isSubmit = true
} else {
if (!n && n == "") {
uni.$u.toast('值不能为空')
this.isSubmit = false
} }
}
} }
}, },
} }
@ -631,6 +648,31 @@
background-color: #f5f5f5; background-color: #f5f5f5;
} }
*/ */
//
.opus {
width: calc(100% - 64rpx);
margin: 0 32rpx;
.opus_inputBox {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16rpx;
.opus_inputBox_inpt {
flex: 1;
height: 80rpx;
padding-left: 16rpx;
background-color: #F8F8F8;
.opus_inputBox_img {
margin-left: 16rpx;
}
}
}
}
// ed
.flc-top { .flc-top {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
@ -640,6 +682,7 @@
.m16 { .m16 {
margin: 0 32rpx; margin: 0 32rpx;
} }
.gray { .gray {

View File

@ -418,7 +418,7 @@
userInfo: { userInfo: {
name: '', name: '',
sex: '', sex: '',
birthday: "", birthday: "1998-02-03",
idCOde: '', idCOde: '',
phoneNum: '', phoneNum: '',
@ -427,9 +427,9 @@
ServerName: '', ServerName: '',
Address: '', Address: '',
serverInstrutor: '', // serverInstrutor: '', //
serveTime: '', serveTime: '09:00',
serveTimeend: '', serveTimeend: '17:00',
jionTime: '', jionTime: '1998-02-03',
DutyPeopleName: '', // DutyPeopleName: '', //
// ServephoneNum: '', // // ServephoneNum: '', //
pasw: '' pasw: ''