flat:修改添加任务,单位信息

This commit is contained in:
史典卓
2024-10-10 14:45:40 +08:00
parent 9d9d7972c9
commit 32e92bcece
3 changed files with 97 additions and 66 deletions

View File

@@ -59,22 +59,30 @@
</template>
<template slot="jobCompanyName" slot-scope="{row,disabled}">
<el-select
<!-- <el-select-->
<!-- v-model="obj.jobCompanyName"-->
<!-- filterable-->
<!-- :remote="true"-->
<!-- :remoteMethod="remoteMethod"-->
<!-- @change="selectMissionCompany"-->
<!-- :loading="missionCompanyLoad"-->
<!-- placeholder="请选择"-->
<!-- >-->
<!-- <el-option-->
<!-- v-for="item in options23"-->
<!-- :key="item.label"-->
<!-- :label="item.label"-->
<!-- :value="item.label">-->
<!-- </el-option>-->
<!-- </el-select>-->
<el-autocomplete
style="'width100%'"
class="inline-input"
v-model="obj.jobCompanyName"
filterable
:remote="true"
:remoteMethod="remoteMethod"
@change="selectMissionCompany"
:loading="missionCompanyLoad"
placeholder="请选择"
>
<el-option
v-for="item in options23"
:key="item.label"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
:fetch-suggestions="remoteMethod"
placeholder="请输入用工单位"
@select="selectMissionCompany"
></el-autocomplete>
</template>
<template slot="cityIdFrom" slot-scope="{ disabled }">
<jl-cityLabel-cascader
@@ -263,7 +271,8 @@ export default {
endTimeFlag: true,
stimeDate: null,
workTypesNameList: [],
wallMaxAndMin: []
wallMaxAndMin: [],
dwlist: []
};
},
components: {
@@ -483,9 +492,9 @@ export default {
trigger: "blur",
},
{
min: 3,
min: 2,
max: 30,
message: "长度在 3到 30 个字",
message: "长度在 2 到 30 个字",
trigger: "blur",
},
{validator: validatePass, trigger: 'blur'}
@@ -914,12 +923,15 @@ export default {
methods: {
getHistroyCompanyList() {
jkWorksHistory().then((res) => {
this.options23 = res.data.data.map((item) => {
const obj = res.data.data.map((item) => {
return {
...item,
label: item.jobCompanyName,
value: item.jobCompanyName,
}
})
this.options23 = obj
this.dwlist = obj
})
},
resetForm() {
@@ -950,8 +962,7 @@ export default {
this.obj.$experienceDesc = ""
this.obj.$jobCompanyNature = ""
},
selectMissionCompany(item) {
const value = this.options23.find((vi) => vi.label === item)
selectMissionCompany(value) {
this.obj.jobCompanyScale = value.jobCompanyScale
this.obj.jobCompanyIndustry = value.jobCompanyIndustry
this.obj.jobCompanyNature = value.jobCompanyNature
@@ -966,15 +977,23 @@ export default {
this.obj.lat = value.lat
}
},
async remoteMethod(query) {
async remoteMethod(query, cb) {
if (!query) {
this.options23 = this.dwlist
cb(this.dwlist)
return
}
this.missionCompanyLoad = true
let resData = await listCompany({companyName: query})
this.missionCompanyLoad = false
if (resData.data.code === 200) {
this.options23 = resData.data.data.records.map((item) => ({
const op = resData.data.data.records.map((item) => ({
label: item.jobCompanyName,
...item
...item,
value: item.jobCompanyName,
}))
this.options23 = op
cb(op)
}
},
wageBlur(e) {