add
This commit is contained in:
parent
5fdf5ed6c3
commit
536c2774b4
|
@ -143,7 +143,7 @@
|
|||
</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>
|
||||
<view class="person_itm_sign_right">
|
||||
<u-switch disabled v-model="userInfoObj.isAssociation" activeColor="#99241B" size=20></u-switch>
|
||||
|
|
|
@ -2,22 +2,27 @@
|
|||
<view>
|
||||
<view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'">
|
||||
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model="Edvalue" border="none"
|
||||
@blur="CheckValue" @clear="clearFun">
|
||||
@input="CheckValue" @clear="clearFun">
|
||||
</u--input>
|
||||
</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=='性别'">
|
||||
<u-radio-group v-model="Edvalue" iconPlacement="right"
|
||||
:customStyle="{ backgroundColor: '#FFFFFF'}" placement="column" >
|
||||
<u-radio activeColor="#99241B" name="男" label="男" labelColor="#251B1D" ></u-radio>
|
||||
<u-divider :hairline="true"></u-divider>
|
||||
<u-radio activeColor="#99241B" name="女" label="女" labelColor="#251B1D"></u-radio>
|
||||
<u-radio-group v-model="Edvalue" iconPlacement="right" :customStyle="{ backgroundColor: '#FFFFFF'}"
|
||||
placement="column">
|
||||
<u-radio activeColor="#99241B" name="男" label="男" labelColor="#251B1D"></u-radio>
|
||||
<u-divider :hairline="true"></u-divider>
|
||||
<u-radio activeColor="#99241B" name="女" label="女" labelColor="#251B1D"></u-radio>
|
||||
</u-radio-group>
|
||||
</view>
|
||||
|
||||
<!-- 性别选择ed -->
|
||||
|
||||
<view class="date m16" @click="DatePicker"
|
||||
v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'">
|
||||
|
@ -70,10 +75,9 @@
|
|||
<view class="opus" v-if="Edkey=='代表作'">
|
||||
|
||||
<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 class="opus_inputBox">
|
||||
<input type="text" v-model="StandradList[index]" placeholder="请输入作品名称" class="opus_inputBox_inpt" />
|
||||
<view class="opus_inputBox_img">
|
||||
<view style="width: 80rpx; height: 80rpx;" class="addImg" @click="AddItem(2)"
|
||||
v-if="StandradList.length==index+1">
|
||||
<image style="width: 80rpx; height: 80rpx;" src="../../static/improveData/redAdd.png"
|
||||
|
@ -81,42 +85,40 @@
|
|||
</view>
|
||||
<view class="delImg" @click="delItem(index)"
|
||||
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 class="chen_itm ">
|
||||
|
||||
<view class="chen_itm ">
|
||||
<u-upload class="WenYiUpload" accept="image" width="172rpx" height="172rpx"
|
||||
:fileList="fileList2[index]" @afterRead="afterRead1" @delete="deletePic1" :name='String(index)'
|
||||
multiple>
|
||||
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/imgjia.png">
|
||||
</image>
|
||||
</u-upload>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<!-- 代表作ed -->
|
||||
<!-- 头像上传 -->
|
||||
<view v-if="Edkey=='头像'">
|
||||
<u-upload style=" margin: 16rpx 32rpx 0rpx;" accept="image" width="172rpx" height="172rpx"
|
||||
<view v-if="Edkey=='头像'">
|
||||
<u-upload style=" margin: 16rpx 32rpx 0rpx;" accept="image" width="172rpx" height="172rpx"
|
||||
:fileList="fileList4" @afterRead="afterRead" @delete="deletePic" name="4" multiple :maxCount="1">
|
||||
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
|
||||
</u-upload>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 头像上传 ed-->
|
||||
|
||||
<!-- 实景 资质上传 -->
|
||||
<view v-if="Edkey=='实景照'||Edkey=='资质证'" >
|
||||
<u-upload style="margin: 16rpx 32rpx 0rpx;" accept="image" width="172rpx"
|
||||
height="172rpx" :fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1">
|
||||
<view v-if="Edkey=='实景照'||Edkey=='资质证'">
|
||||
<u-upload style="margin: 16rpx 32rpx 0rpx;" accept="image" width="172rpx" height="172rpx"
|
||||
:fileList="fileList1" @afterRead="afterRead" @delete="deletePic" name="1">
|
||||
<image style="width: 172rpx;height: 172rpx;" src="../../static/improveData/jia.png"></image>
|
||||
</u-upload>
|
||||
</view>
|
||||
|
||||
|
||||
<!-- 实景 资质上传 ed-->
|
||||
|
||||
|
||||
|
@ -129,7 +131,7 @@
|
|||
:columns="Edkey=='政治面貌'? Zhengcolumns : Edkey =='民族' ? Zucolumns : Edkey=='籍贯' ? Jicolumns : Edkey=='人才类型'? peopleSkillColums:Edkey=='所属协会'? xiecolumns:[]">
|
||||
</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"
|
||||
closeOnClickOverlay @confirm="birthdayConfirm" @cancel="birthdayClose" @close="birthdayClose">
|
||||
</u-datetime-picker>
|
||||
|
@ -186,7 +188,7 @@
|
|||
// '实景照':'photo',
|
||||
// '资质证':'cfPhoto',
|
||||
'服务内容介绍': 'info',
|
||||
'艺术成就': 'artAtt',
|
||||
// '艺术成就': 'artAtt',
|
||||
'荣誉奖项': 'greats',
|
||||
'密码': 'password'
|
||||
|
||||
|
@ -195,10 +197,10 @@
|
|||
postFileList2: [], //用来上传的数组
|
||||
baseurl: http.config.baseUrl.replace('/h5/api', ''),
|
||||
fileList4: [], //头像上传
|
||||
fileList1: [],
|
||||
fileList1: [], //资质证 实景照
|
||||
fileList2: [], //代表作照片
|
||||
StandradList: [], //代表作名称
|
||||
artlist: [''],
|
||||
// artlist: [''],
|
||||
showBirthday: false,
|
||||
isSubmit: true,
|
||||
tempValue: '',
|
||||
|
@ -237,7 +239,7 @@
|
|||
} else {
|
||||
this.timeMode = 'time'
|
||||
}
|
||||
|
||||
// 请求 协会 内容
|
||||
if (this.Edkey == '所属协会') {
|
||||
this.http.request('/association/list', {}, "GET").then((res) => {
|
||||
let xieList = res.data.records.map((v, i) => {
|
||||
|
@ -266,9 +268,7 @@
|
|||
let urL = this.baseurl
|
||||
let arr = JSON.parse(this.Edvalue).map((vv, ii) => {
|
||||
return urL + vv
|
||||
|
||||
})
|
||||
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
this.fileList1.push({
|
||||
url: arr[i]
|
||||
|
@ -291,9 +291,7 @@
|
|||
return v.value
|
||||
})
|
||||
console.log(" this.postFileList2===", this.postFileList2);
|
||||
|
||||
var urL = this.baseurl
|
||||
|
||||
var sarr = this.fileList2.map((v, i) => {
|
||||
return v.map((vv, ii) => {
|
||||
return urL + vv
|
||||
|
@ -302,7 +300,6 @@
|
|||
this.fileList2 = this.fileList2.map((v, i) => {
|
||||
return v = []
|
||||
})
|
||||
|
||||
for (let i = 0; i < sarr.length; i++) {
|
||||
for (let j = 0; j < sarr[i].length; j++) {
|
||||
|
||||
|
@ -334,9 +331,6 @@
|
|||
} else {
|
||||
this.Edvalue.push("")
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
delItem(num) {
|
||||
if (this.Edkey == '代表作') {
|
||||
|
@ -346,14 +340,9 @@
|
|||
this.fileList2.splice(num, 1, [''])
|
||||
// 是用来 提交修改数据用的
|
||||
this.postFileList2.splice(num, 1)
|
||||
|
||||
|
||||
} else {
|
||||
this.Edvalue.splice(num, 1)
|
||||
}
|
||||
|
||||
|
||||
|
||||
},
|
||||
CheckId() {
|
||||
var value = this.Edvalue
|
||||
|
@ -411,7 +400,6 @@
|
|||
},
|
||||
birthdayConfirm(e) {
|
||||
this.showBirthday = false
|
||||
|
||||
if (this.Edkey == '出生日期' || this.Edkey == '入会时间') {
|
||||
this.Edvalue = uni.$u.timeFormat(e.value, 'yyyy-mm-dd')
|
||||
} 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 == '实景照') {
|
||||
|
||||
if (this.fileList1[0]) {
|
||||
|
@ -453,23 +446,29 @@
|
|||
'photo': str
|
||||
})
|
||||
}
|
||||
|
||||
} else {
|
||||
uni.showToast({
|
||||
icon: 'error',
|
||||
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 == '代表作') {
|
||||
console.log("submit", this.postFileList2);
|
||||
// console.log("submit", this.postFileList2);
|
||||
// this.StandradList
|
||||
var opsArr = []
|
||||
|
||||
for (let i = 0; i < this.StandradList.length; i++) {
|
||||
// console.log("=====", this.fileList2);
|
||||
opsArr.push({
|
||||
|
@ -487,17 +486,12 @@
|
|||
[this.postListObj[this.Edkey]]: this.Edvalue
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* if (this.Edkey == '姓名') {
|
||||
this.PostChangerRequest({
|
||||
'userName': this.Edvalue
|
||||
})
|
||||
}
|
||||
*/
|
||||
|
||||
|
||||
},
|
||||
// 提交修改的方法
|
||||
PostChangerRequest(obj) {
|
||||
|
@ -505,9 +499,12 @@
|
|||
uni.showToast({
|
||||
title: "修改成功"
|
||||
})
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
setTimeout(function() {
|
||||
uni.navigateBack({
|
||||
delta: 1
|
||||
})
|
||||
}, 500);
|
||||
|
||||
}).catch((error) => {
|
||||
uni.showToast({
|
||||
title: "修改失败",
|
||||
|
@ -516,17 +513,29 @@
|
|||
})
|
||||
},
|
||||
CheckValue() {
|
||||
// console.log("event",event);
|
||||
// console.log("dddd",this.Edkey);
|
||||
if (this.Edkey) {
|
||||
|
||||
// uni.$u.toast('不能为空')
|
||||
// console.log(this.tempValue);
|
||||
|
||||
// this.Edvalue=this.tempValue
|
||||
|
||||
|
||||
// 获取的是input 的value 值
|
||||
// console.log("event", event.target.value);
|
||||
// console.log("gg", event.target.value.indexOf(" ") >= 0);
|
||||
this.Edvalue = this.Edvalue.trim()
|
||||
if (!this.Edvalue) {
|
||||
uni.showToast({
|
||||
title: "值不能为空或者空格",
|
||||
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() {
|
||||
console.log("清空");
|
||||
|
@ -617,10 +626,18 @@
|
|||
watch: {
|
||||
'Edvalue': function(n, o) {
|
||||
console.log("n", n);
|
||||
if (!n) {
|
||||
uni.$u.toast('不能为空')
|
||||
this.isSubmit=false
|
||||
// console.log("event.target.value", event.target.value);
|
||||
if (this.Edkey == '是否已入协会') {
|
||||
this.isSubmit = true
|
||||
} else {
|
||||
|
||||
if (!n && n == "") {
|
||||
uni.$u.toast('值不能为空')
|
||||
this.isSubmit = false
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
},
|
||||
}
|
||||
|
@ -631,6 +648,31 @@
|
|||
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 {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
|
@ -640,6 +682,7 @@
|
|||
|
||||
.m16 {
|
||||
margin: 0 32rpx;
|
||||
|
||||
}
|
||||
|
||||
.gray {
|
||||
|
|
|
@ -418,7 +418,7 @@
|
|||
userInfo: {
|
||||
name: '',
|
||||
sex: '',
|
||||
birthday: "",
|
||||
birthday: "1998-02-03",
|
||||
idCOde: '',
|
||||
|
||||
phoneNum: '',
|
||||
|
@ -427,9 +427,9 @@
|
|||
ServerName: '',
|
||||
Address: '',
|
||||
serverInstrutor: '', //服务介绍
|
||||
serveTime: '',
|
||||
serveTimeend: '',
|
||||
jionTime: '',
|
||||
serveTime: '09:00',
|
||||
serveTimeend: '17:00',
|
||||
jionTime: '1998-02-03',
|
||||
DutyPeopleName: '', //负责人名称
|
||||
// ServephoneNum: '', //服务商电话
|
||||
pasw: ''
|
||||
|
|
Loading…
Reference in New Issue