|
|
@ -14,11 +14,15 @@ |
|
|
|
<u-form-item labelWidth="0" prop="title"> |
|
|
|
<u--input v-model="form.title" placeholder="请在此输入标题"></u--input> |
|
|
|
</u-form-item> |
|
|
|
<u-form-item label="工作地点" prop="area" @click="handleAreaChange"> |
|
|
|
<u--input @click="handleAreaChange" readonly v-model="form.area" placeholder="请选择工作地点" |
|
|
|
<u-form-item label="工作地点" prop="area" @click="handleAreaChange()"> |
|
|
|
<u--input readonly v-model="form.area" placeholder="请选择工作地点" |
|
|
|
border="none"></u--input> |
|
|
|
<u-icon @click="handleAreaChange" slot="right" name="arrow-right"></u-icon> |
|
|
|
<u-icon slot="right" name="arrow-right"></u-icon> |
|
|
|
</u-form-item> |
|
|
|
<!-- <u-form-item label="请选择地址" class="se-b-b" prop="area" @click="handleAreaChange()"> |
|
|
|
<u--input readonly v-model="form.area" placeholder="请选择地址" border="none"></u--input> |
|
|
|
<u-icon slot="right" name="arrow-right" ></u-icon> |
|
|
|
</u-form-item> --> |
|
|
|
<!-- <u-form-item label="详细地址" prop="address"> |
|
|
|
<u--textarea v-model="form.address" count |
|
|
|
placeholder="请输入详细地址"></u--textarea> |
|
|
@ -123,6 +127,7 @@ |
|
|
|
</template> |
|
|
|
|
|
|
|
<script> |
|
|
|
import QQMapWX from "@/util/qqmap-wx-jssdk.min.js" |
|
|
|
import { addTask,industryList,industryById } from "@/common/api.js" |
|
|
|
import citySelect from '@/components/cityselect/index.vue' |
|
|
|
export default { |
|
|
@ -148,30 +153,26 @@ |
|
|
|
showType: false, |
|
|
|
typeList: [], |
|
|
|
form: { |
|
|
|
title:"宜佳营业员", |
|
|
|
area:'河北省-秦皇岛市-抚宁区', |
|
|
|
title:"", |
|
|
|
area:'', |
|
|
|
address:'', |
|
|
|
industryId:"1865294357074157570", |
|
|
|
industryName:"建筑", |
|
|
|
settlement:'0', |
|
|
|
industryId:"", |
|
|
|
industryName:"", |
|
|
|
settlement:'', |
|
|
|
date:"", |
|
|
|
dateMin:"2016-02-01 09:00:00", |
|
|
|
dateMax:"2016-12-05 18:00:00", |
|
|
|
mobile: '13189698114', |
|
|
|
dateMin:"", |
|
|
|
dateMax:"", |
|
|
|
mobile: '', |
|
|
|
typeId: '', |
|
|
|
typeName:"", |
|
|
|
salary:'', |
|
|
|
dayMoney:"300", |
|
|
|
salaryMin: '6000', |
|
|
|
salaryMax: '8000', |
|
|
|
introduce: '宜佳营业员,每天工作8个小时,上班轻松!', |
|
|
|
fileList: [ |
|
|
|
{ |
|
|
|
url: "https://tennis-oss.xzaiyp.top/2024-12-31/4b65131c-41f8-4714-a31e-491d08dfb8c4.jpg" |
|
|
|
} |
|
|
|
], |
|
|
|
latitude:'12.34', |
|
|
|
longitude:"146.74" |
|
|
|
dayMoney:"", |
|
|
|
salaryMin: '', |
|
|
|
salaryMax: '', |
|
|
|
introduce: '', |
|
|
|
fileList: [], |
|
|
|
latitude:'', |
|
|
|
longitude:"" |
|
|
|
}, |
|
|
|
rules: { |
|
|
|
title:[ |
|
|
@ -339,7 +340,36 @@ |
|
|
|
this.showMaxDate = false |
|
|
|
}, |
|
|
|
handleAreaChange(){ |
|
|
|
this.showPicker = true |
|
|
|
const that = this; |
|
|
|
wx.chooseLocation({ |
|
|
|
// type: 'wgs84', |
|
|
|
success: function (res) { |
|
|
|
const qqmapsdk = new QQMapWX({ |
|
|
|
key: 'TT7BZ-Z3LW4-KOAUB-KWHOA-SBJJ6-Y5B6R' // 必填 |
|
|
|
}); |
|
|
|
uni.showLoading({ |
|
|
|
title:"获取中...." |
|
|
|
}) |
|
|
|
qqmapsdk.reverseGeocoder({ |
|
|
|
location: { |
|
|
|
latitude: res.latitude, |
|
|
|
longitude: res.longitude |
|
|
|
}, |
|
|
|
success: function(response) { |
|
|
|
console.log('逆地理编码结果:', response); |
|
|
|
uni.hideLoading() |
|
|
|
that.form.longitude = response.result.location.lng |
|
|
|
that.form.latitude = response.result.location.lat |
|
|
|
that.form.area = response.result.address |
|
|
|
}, |
|
|
|
fail: function(error) { |
|
|
|
uni.hideLoading() |
|
|
|
console.error('逆地理编码失败:', error); |
|
|
|
} |
|
|
|
}); |
|
|
|
} |
|
|
|
}) |
|
|
|
// this.showPicker = true |
|
|
|
}, |
|
|
|
handleCityChange(e) { |
|
|
|
console.info(e) |
|
|
@ -376,12 +406,9 @@ |
|
|
|
this.$refs.uForm.validateField('typeId') |
|
|
|
}, |
|
|
|
submit() { |
|
|
|
console.info(this.form) |
|
|
|
this.$refs.uForm.validate().then(res => { |
|
|
|
this.onaddTask() |
|
|
|
// uni.$u.toast('校验通过') |
|
|
|
}).catch(errors => { |
|
|
|
// uni.$u.toast('校验失败') |
|
|
|
}) |
|
|
|
}, |
|
|
|
|
|
|
@ -391,8 +418,6 @@ |
|
|
|
"bossPhone": that.form.mobile,//招聘方联系方式 |
|
|
|
"dayMoney": that.form.dayMoney,//期望日薪 |
|
|
|
"endTime": that.form.dateMax, |
|
|
|
// "industryId": that.form.industryId, |
|
|
|
// "industryName": that.form.industryName, |
|
|
|
"industryId": that.form.typeId, |
|
|
|
"industryName": that.form.typeName, |
|
|
|
"latitude": that.form.latitude, |
|
|
@ -406,12 +431,13 @@ |
|
|
|
"workDetail": that.form.introduce, |
|
|
|
"workPic": that.form.fileList.map(item => item.url).join(','),//照片 |
|
|
|
} |
|
|
|
// let p={"bossPhone":"13189698115","dayMoney":"500","endTime":"2016-01-01 00:00:00","industryId":"1865299999310622721","industryName":"木工","latitude":28.23529,"longitude":112.93134,"moneymax":"15000","moneymin":"12000","payType":"1","startTime":"2015-01-01 00:00:00","title":"木工师傅","workAddress":"湖南省长沙市岳麓区金星北路一段517号","workDetail":"阿萨法大多数发斯蒂芬撒旦法撒旦法阿斯蒂芬撒旦法撒旦法撒旦法三大法师打","workPic":"https://tennis-oss.xzaiyp.top/2025-02-19/341d669a-ef66-4abb-8b98-ac71c08814c9.jpg"} |
|
|
|
addTask(params).then(response=>{ |
|
|
|
console.info("response",response) |
|
|
|
uni.$u.toast("提交成功!") |
|
|
|
setTimeout(()=>{ |
|
|
|
uni.switchTab({ |
|
|
|
url:"/pages/home/index" |
|
|
|
uni.navigateBack({ |
|
|
|
delta:1 |
|
|
|
}) |
|
|
|
},1500) |
|
|
|
}).catch(error=>{ |
|
|
|