|
@@ -149,6 +149,15 @@
|
|
|
</view>
|
|
|
|
|
|
|
|
|
+ </view>
|
|
|
+ <view class="information-group">
|
|
|
+ <view class="headline">
|
|
|
+ 展示图片<span>(最多上传5张)</span>
|
|
|
+ </view>
|
|
|
+ <u-upload ref="uUpload" :action="action" name="photoFile" :file-list="listPic"
|
|
|
+ :form-data="formDataUpload" :header="header" width="180" max-count="5" @on-success="onSuccess">
|
|
|
+ </u-upload>
|
|
|
+
|
|
|
</view>
|
|
|
<u-select v-model="show" value-name="value" label-name="name" :list="list" @confirm="confirm"></u-select>
|
|
|
|
|
@@ -250,7 +259,8 @@
|
|
|
workArea: "",
|
|
|
address: "",
|
|
|
salaryForm: "2",
|
|
|
- ageRequirement:"",
|
|
|
+ ageRequirement:"",
|
|
|
+ images:"",
|
|
|
},
|
|
|
settlementMethod: "",
|
|
|
salaryForm: "计时",
|
|
@@ -281,7 +291,11 @@
|
|
|
],
|
|
|
valueList: [-1, -1, -1, -1, -1, -1],
|
|
|
userInfo: {},
|
|
|
- id: "",
|
|
|
+ id: "",
|
|
|
+ formDataUpload:{},
|
|
|
+ action: '',
|
|
|
+ header: '',
|
|
|
+ listPic: [],
|
|
|
}
|
|
|
},
|
|
|
onLoad(op) {
|
|
@@ -290,15 +304,35 @@
|
|
|
this.id = op.id
|
|
|
this.getInfo()
|
|
|
} else {
|
|
|
- var enterpriseInfo = this.carhelp.getPersonInfoPlus().enterpriseInfo
|
|
|
- this.formData.contacts = enterpriseInfo.contactsPersonId
|
|
|
- this.formData.address = enterpriseInfo.address
|
|
|
+ var enterpriseInfo = this.carhelp.getPersonInfoPlus().enterpriseInfo
|
|
|
+ if(enterpriseInfo){
|
|
|
+ this.formData.contacts = enterpriseInfo.contactsPersonId
|
|
|
+ this.formData.address = enterpriseInfo.address
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ this.action = process.car.BASE_URL+"uploadPicture";
|
|
|
+
|
|
|
+ this.formDataUpload = {
|
|
|
+ subFolder: "laborManagement"
|
|
|
+ }
|
|
|
+ var token = this.carhelp.getToken();
|
|
|
+ this.header={
|
|
|
+ 'Authorization': token,
|
|
|
+ 'X-Requested-With': 'XMLHttpRequest'
|
|
|
}
|
|
|
|
|
|
-
|
|
|
//this.tel=this.userInfo.phone
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ onSuccess(data, index, lists, name) {
|
|
|
+
|
|
|
+ console.log(this.$refs.uUpload.lists)
|
|
|
+ if(data.result) {
|
|
|
+
|
|
|
+ }
|
|
|
+ },
|
|
|
reset() {
|
|
|
this.isChecked = -1;
|
|
|
|
|
@@ -354,7 +388,22 @@
|
|
|
//.log(name[i]+'N')
|
|
|
this[name[i]] = this.formData[(name[i] + 'N')]
|
|
|
}
|
|
|
- this.workArea = this.formData.workArea
|
|
|
+ this.workArea = this.formData.workArea
|
|
|
+
|
|
|
+ this.listPic=JSON.parse(this.formData.images)
|
|
|
+ for(var i in this.listPic){
|
|
|
+ var obj=this.listPic[i]
|
|
|
+ obj.progress=100
|
|
|
+ obj.error=false
|
|
|
+ obj.response={
|
|
|
+ code: 200,
|
|
|
+ data: obj.url,
|
|
|
+ message: null,
|
|
|
+ result: true
|
|
|
+ }
|
|
|
+ }
|
|
|
+ this.$refs.uUpload.lists=this.listPic
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}).catch(error => {
|
|
@@ -407,7 +456,22 @@
|
|
|
this.show = true
|
|
|
}
|
|
|
},
|
|
|
- submit() {
|
|
|
+ submit() {
|
|
|
+ this.formData.images="";
|
|
|
+ var imgs= this.$refs.uUpload.lists.filter(val => {
|
|
|
+ return val.progress == 100;
|
|
|
+ })
|
|
|
+ if(imgs&&imgs.length){
|
|
|
+ var str =imgs.map(item=>{
|
|
|
+ return {
|
|
|
+ name:"1.jpg",
|
|
|
+ url:item.url
|
|
|
+ }
|
|
|
+ })
|
|
|
+ console.log(str)
|
|
|
+ this.formData.images=JSON.stringify(str);
|
|
|
+ }
|
|
|
+
|
|
|
if (!this.formData.positionName) {
|
|
|
uni.showToast({
|
|
|
icon: 'none',
|
|
@@ -482,7 +546,8 @@
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
|
mask: true,
|
|
|
- })
|
|
|
+ })
|
|
|
+
|
|
|
API.createRecruit(this.formData).then((res) => {
|
|
|
uni.hideLoading();
|
|
|
|
|
@@ -535,7 +600,11 @@
|
|
|
font-size: 36rpx;
|
|
|
margin-bottom: 24rpx;
|
|
|
|
|
|
- font-family: 'PingFangSC-medium';
|
|
|
+ font-family: 'PingFangSC-medium';
|
|
|
+ span{
|
|
|
+ font-size: 24rpx;
|
|
|
+ color: #9E9E9E;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.item {
|