Commit 34b4b795 authored by 吴冠's avatar 吴冠

询价

parent 9ebe356c
<template>
<div>
<el-select v-model="provinceId1" style="width: 167px; margin-right: 25px" @change="getProvince">
<el-option v-for="item in provinceArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
<el-select v-model="cityId1" style="width: 167px; margin-right: 25px" @change="getCity">
<el-option v-for="item in cityArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
<el-select v-model="districtId1" style="width: 167px; margin-right: 25px" @change="getDistrict">
<el-option v-for="item in districtArr" :value="item.id" :key="item.id" :label="item.name"> </el-option>
</el-select>
</div>
</template>
<script>
import { cityList } from '@/api/common/list';
// import arrAll from './area.js'
export default {
data() {
return {
provinceArr: [],
cityArr: [],
districtArr: [],
provinceId1:"",
cityId1:"",
districtId1:""
};
},
props: ['provinceId', 'cityId', 'districtId'],
watch: {
provinceId(newName, oldName) {
this.provinceId1=this.provinceId
this.getcityArr(newName);
},
cityId(newName, oldName) {
this.cityId1=this.cityId
this.getdistrictArr(newName);
},
districtId(newName, oldName) {
this.districtId1=this.districtId
this.getdistrictArr(newName);
}
},
created() {
this.getProvinceArr();
// this.getcityArr(this.provinceId);
// this.getdistrictArr(this.cityId);
},
methods: {
// 获取省列表
async getProvinceArr() {
console.log('请求省————————————————————');
const { code, data } = await cityList(0);
if (code === 200) {
this.provinceArr = data;
}
},
// 获取市列表
async getcityArr(id) {
console.log(id);
const { code, data } = await cityList(id);
if (code === 200) {
this.cityArr = data;
}
},
// 获取区列表
async getdistrictArr(id) {
const { code, data } = await cityList(id);
if (code === 200) {
this.districtArr = data;
}
},
getProvince() {
this.getcityArr(this.provinceId1);
this.cityId1 = '';
this.districtId1 = '';
this.$emit('sendprovinceId', this.provinceId1);
},
getCity() {
this.getdistrictArr(this.cityId1);
this.districtId1 = '';
this.$emit('sendcityId', this.cityId1);
},
getDistrict() {
this.$emit('senddistrictId', this.districtId1);
}
}
// getCounty() {
// for (var i = 0; i < this.cityArr.length; i++) {
// var obj = this.cityArr[i]
// if (this.city == obj.name) {
// this.countyArr = obj.sub
// this.county = ''
// this.$emit('getCounty', this.city)
// }
// }
// },
// getDistrict() {
// this.$emit('getCity', this.county)
// }
};
</script>
<style>
</style>
......@@ -110,14 +110,25 @@ export default {
}
},
mounted(){
console.log(11111111111)
let mes ={
currentPage:1,
size:10,
noticeType:'BIDDING'
}
if(Cookies.get("details")){
mes.currentPage = Cookies.get("currentPage")
mes.size = Cookies.get("size")
}
this. getInquiryList(mes)
/* console.log(11111111111)
if(Cookies.get("details")){
let mes = {}
mes.currentPage = Cookies.get("currentPage")
mes.size = Cookies.get("size")
mes.noticeType = "ENQUIRY"
this. getInquiryList(mes)
}
} */
this. industryList();
Cookies.remove("details")
Cookies.remove("currentPage")
......
......@@ -21,6 +21,7 @@
</el-form-item>
<el-form-item label="区域选择" prop="local" class="item">
<citySelect
@sendprovinceId="getprovinceId"
@sendcityId="getcityId"
@senddistrictId="getdistrictId"
......@@ -635,7 +636,7 @@
class="t2 nextButton"
v-if="active == 1">
提交</button>
<div class=" nextButton y1" style="margin-right:20px" v-if="active==1" @click="prev">上一步</div>
<div class=" nextButton y1" style="margin-right:20px" v-if="active==1" @click="prev" v-show="isshow">上一步</div>
<button
@click="next"
class="t2 nextButton"
......@@ -688,6 +689,8 @@ export default {
if(Cookies.get("auditStatus")==1){
this.active =1
this.getErrorInfo()
this.isshow = false
}
},
data() {
......@@ -801,6 +804,7 @@ export default {
};
return {
isshow:true,
proId:'',
citId:'',
disId:'',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment