This commit is contained in:
lnn19986213 2023-04-18 16:35:35 +08:00
parent cd31703fc7
commit a205625508
4 changed files with 33 additions and 77 deletions

View File

@ -85,7 +85,7 @@
// vueproxyTable, // vueproxyTable,
"/pre" : { "/pre" : {
// //
"target" : "http://10.0.0.59:8080/h5/api", // "target" : "http://10.0.0.28:8080/h5/api", //
// "target" : "https://yxx.ydool.net/h5/api", // // "target" : "https://yxx.ydool.net/h5/api", //
"changeOrigin" : true, // "changeOrigin" : true, //

View File

@ -72,7 +72,7 @@
<view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)"> <view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)">
<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">
<image class="avator" :src='imgUrl'> <image class="avator" :src='userInfoObj.images'>
</image> </image>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>
@ -219,7 +219,7 @@
<view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)"> <view class="person_itm_sign" @click="goChangeInfo('头像',userInfoObj.images)">
<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">
<image class="avator" :src='imgUrl'> <image class="avator" :src='userInfoObj.images'>
</image> </image>
<u-icon name="arrow-right"></u-icon> <u-icon name="arrow-right"></u-icon>
</view> </view>

View File

@ -1,6 +1,6 @@
<template> <template>
<view> <view>
<view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址'"> <view class="m16" v-if="Edkey=='姓名'||Edkey=='负责人姓名'||Edkey=='服务名称'||Edkey=='地址' || Edkey =='民族' || Edkey=='籍贯'">
<u--input class="p32 nameClass" placeholder="请填写" clearable v-model.trim="Edvalue" border="none" <u--input class="p32 nameClass" placeholder="请填写" clearable v-model.trim="Edvalue" border="none"
@change="CheckValue" @clear="clearFun"> @change="CheckValue" @clear="clearFun">
</u--input> </u--input>
@ -31,7 +31,7 @@
</view> </view>
<!-- 政治面貌 民族 籍贯 选择 input--> <!-- 政治面貌 民族 籍贯 选择 input-->
<view class="select m16" @click="zhengzhiShow=true" <view class="select m16" @click="zhengzhiShow=true"
v-if="Edkey=='政治面貌'||Edkey=='民族'||Edkey=='籍贯'||Edkey=='人才类型'||Edkey=='所属协会'"> v-if="Edkey=='政治面貌'||Edkey=='人才类型'||Edkey=='所属协会'">
<u--input class="p32 gray" readonly v-model="Edvalue" border="none"> <u--input class="p32 gray" readonly v-model="Edvalue" border="none">
</u--input> </u--input>
</view> </view>
@ -73,7 +73,6 @@
<!-- 成就类ed --> <!-- 成就类ed -->
<!-- 代表作 --> <!-- 代表作 -->
<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="opus_inputBox"> <view class="opus_inputBox">
<input type="text" v-model.trim="StandradList[index]" placeholder="请输入作品名称" <input type="text" v-model.trim="StandradList[index]" placeholder="请输入作品名称"
@ -90,7 +89,6 @@
</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)'
@ -120,7 +118,7 @@
<!-- 实景 资质上传 ed--> <!-- 实景 资质上传 ed-->
<u-picker :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange closeOnClickOverlay <u-picker :show="zhengzhiShow" confirmColor="#99241B" @confirm="confimZheng" immediateChange closeOnClickOverlay
@close="zhengzhiClose" @cancel="zhengzhiClose" @close="zhengzhiClose" @cancel="zhengzhiClose"
:columns="Edkey=='政治面貌'? Zhengcolumns : Edkey =='民族' ? Zucolumns : Edkey=='籍贯' ? Jicolumns : Edkey=='人才类型'? peopleSkillColums:Edkey=='所属协会'? xiecolumns:[]"> :columns="Edkey=='政治面貌'? Zhengcolumns : Edkey=='人才类型'? peopleSkillColums:Edkey=='所属协会'? xiecolumns:[]">
</u-picker> </u-picker>
<u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :maxDate="1786778555000" <u-datetime-picker confirmColor="#99241B" :minDate="-2207520000000" :maxDate="1786778555000"
:show="showBirthday" v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'" :value="Edvalue" :show="showBirthday" v-if="Edkey=='出生日期'||Edkey=='入会时间'||Edkey=='服务开始时间'||Edkey=='服务结束时间'" :value="Edvalue"
@ -192,12 +190,11 @@
Zucolumns: [ Zucolumns: [
["汉族", "朝鲜族"], ["汉族", "朝鲜族"],
], ],
Jicolumns: [ Jicolumns: [
["河南", "浙江", '上海', '宁波'], ["河南", "浙江", '上海', '宁波'],
], ],
peopleSkillColums: [ peopleSkillColums: [
["书法家", "画家", "雕塑家"] ["无", "乡镇人才", "县级人才", "市级人才", "省级人才", "国家级人才"]
], ],
xiehuiObj: {}, //name id key value xiehuiObj: {}, //name id key value
artHonrList: [""] artHonrList: [""]
@ -208,7 +205,6 @@
this.Edkey = JSON.parse(opt.key) this.Edkey = JSON.parse(opt.key)
this.Edvalue = JSON.parse(opt.value) this.Edvalue = JSON.parse(opt.value)
this.tempValue = JSON.parse(opt.value) this.tempValue = JSON.parse(opt.value)
console.log("optvalue", this.Edvalue);
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: JSON.parse(opt.key) title: JSON.parse(opt.key)
}) })
@ -271,11 +267,9 @@
} }
if (this.Edkey == '代表作') { if (this.Edkey == '代表作') {
this.isSubmit = true this.isSubmit = true
// stanlist fileList2 // stanlist fileList2
this.fileList2 = [] this.fileList2 = []
if (opt.value == '[""]' || opt.value == "null") { if (opt.value == '[""]' || opt.value == "null") {
console.log("ddd");
this.StandradList = [""] this.StandradList = [""]
this.fileList2 = [ this.fileList2 = [
[] []
@ -289,19 +283,13 @@
this.StandradList.push(v.name) this.StandradList.push(v.name)
this.fileList2.push(v.value ? v.value : []) this.fileList2.push(v.value ? v.value : [])
}) })
// console.log("StandradList", this.StandradList);
// console.log("this.Edvalue==", this.Edvalue);
// //
this.postFileList2 = this.Edvalue.map((v, i) => { this.postFileList2 = this.Edvalue.map((v, i) => {
return v.value ? v.value : [''] return v.value ? v.value : ['']
}) })
// console.log(" this.postFileList2===", this.postFileList2);
var urL = this.baseurl
// console.log("ddd", urL);
var sarr = this.fileList2.map((v, i) => { var sarr = this.fileList2.map((v, i) => {
// console.log("vv", v);
return v.map((vv, ii) => { return v.map((vv, ii) => {
return urL + vv return vv
}) })
}) })
// console.log("sarr", sarr); // console.log("sarr", sarr);
@ -315,17 +303,11 @@
url: sarr[i][j] url: sarr[i][j]
}) })
} }
} }
// this.fileList2.splice(1,0)
console.log(" this.fileList2", this.fileList2);
} }
} }
}, },
onReady() { onReady() {
// this.$refs.form1.setRules(this.rules); // this.$refs.form1.setRules(this.rules);
}, },
methods: { methods: {
@ -402,7 +384,6 @@
}, },
birthdayClose() { birthdayClose() {
this.showBirthday = false this.showBirthday = false
}, },
birthdayConfirm(e) { birthdayConfirm(e) {
this.showBirthday = false this.showBirthday = false
@ -411,7 +392,6 @@
} else { } else {
this.Edvalue = e.value this.Edvalue = e.value
} }
}, },
submit() { submit() {
var baseStr = http.config.baseUrl.replace('/h5/api', '') var baseStr = http.config.baseUrl.replace('/h5/api', '')
@ -471,12 +451,15 @@
} }
} else if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') { } else if (this.Edkey == '艺术成就' || this.Edkey == '荣誉奖项') {
// console.log("submit", this.Edvalue); // console.log("submit", this.Edvalue);
let arr = []
var str = JSON.stringify(this.Edvalue) this.Edvalue.forEach(function(item) {
if(item){
if (this.Edvalue[0]) { arr.push(item)
}
})
var str = JSON.stringify(arr)
if (arr.length > 0) {
if (this.Edkey == '艺术成就') { if (this.Edkey == '艺术成就') {
this.PostChangerRequest({ this.PostChangerRequest({
'artAtt': str 'artAtt': str
}) })
@ -486,7 +469,6 @@
}) })
} }
} else { } else {
console.log("11");
if (this.Edkey == '艺术成就') { if (this.Edkey == '艺术成就') {
this.PostChangerRequest({ this.PostChangerRequest({
@ -500,53 +482,29 @@
} }
} else if (this.Edkey == '代表作') { } else if (this.Edkey == '代表作') {
console.log('代表作',this.StandradList,this.fileList2)
var opsArr = [] let arr = []
for (let i = 0; i < this.StandradList.length; i++) { let _this = this
// console.log("=====", this.fileList2); this.StandradList.forEach(function(item,index) {
opsArr.push({ if(item){
name: this.StandradList[i] ? this.StandradList[i] : '', arr.push({
value: this.postFileList2[i] ? this.postFileList2[i] : [] name: item,
}) value: _this.fileList2[index].map((v, num) => {
} return v.url
var isNull = opsArr.every((v, i) => { // return v.thumb
return v.name == '' })
})
}
}) })
if (arr.length > 0) {
console.log("isNul", isNull);
console.log("opsArr", opsArr);
// isNull
if (isNull) {
this.PostChangerRequest({ this.PostChangerRequest({
'opus': [] 'opus': arr
}) })
} else { } else {
this.PostChangerRequest({ this.PostChangerRequest({
'opus': opsArr 'opus': []
}) })
} }
/* if(this.fileList2 ){
var opsArr = []
for (let i = 0; i < this.StandradList.length; i++) {
// console.log("=====", this.fileList2);
opsArr.push({
name: this.StandradList[i],
value: this.postFileList2[i]
})
}
console.log("opsArr", opsArr);
this.PostChangerRequest({
'opus': opsArr
})
}else{
this.PostChangerRequest({
'opus': '[null]'
})
} */
} else { } else {
// postListObj // postListObj
this.PostChangerRequest({ this.PostChangerRequest({
@ -722,9 +680,7 @@
uni.$u.toast('值不能为空') uni.$u.toast('值不能为空')
this.isSubmit = false this.isSubmit = false
} }
} }
} }
}, },
} }

View File

@ -21,7 +21,7 @@
</view> </view>
</view> </view>
<view class="right"> <view class="right">
<image :src="v.imagePath" mode=""></image> <image :src="v.imgCover" mode=""></image>
</view> </view>
</view> </view>