用户管理新增来源查询条件,学校不跟城市联动

dev
yujialong 3 years ago
parent 034a4d9131
commit 52539740ad
  1. 51
      src/views/user/User.vue

@ -37,13 +37,13 @@
</el-row>
<el-row>
<el-col :span="4">
<!--
<el-form-item label="国家">
<el-select v-model="form.countries" clearable placeholder="请选择国家">
<el-option v-for="(item,index) in countryList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
-->
<el-form-item label="省份">
<el-select v-model="form.provinces" clearable placeholder="请选择省份" @change="getCity" @clear="clearprovince()">
<el-option v-for="(item,index) in provinceList" :key="index" :label="item.provinceName" :value="item.provinceId"></el-option>
@ -53,14 +53,26 @@
<el-col :span="4">
<el-form-item label="城市">
<el-select v-model="form.city" clearable placeholder="请选择城市"
:disabled="form.provinces ? false : true" @clear="clearcity()" @change="getSchool">
:disabled="form.provinces ? false : true" @clear="clearcity()" @change="initData">
<el-option v-for="(item,index) in cityList" :key="index" :label="item.cityName" :value="item.cityId"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="来源">
<el-select v-model="form.platformId" clearable placeholder="请选择来源" @change="initData">
<el-option
v-for="item in platformList"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item label="学校">
<el-select v-model="form.schoolId" clearable placeholder="请选择学校" :disabled="form.city ? false : true" @change="getData()">
<el-select v-model="form.schoolId" clearable filterable placeholder="请选择学校" @change="initData">
<el-option v-for="(item,index) in schoolList" :key="index" :label="item.schoolName" :value="item.schoolId"></el-option>
</el-select>
</el-form-item>
@ -72,7 +84,7 @@
</el-col>
<!-- <el-col :span="5">
<el-form-item label="角色">
<el-select v-model="form.accountRole" clearable placeholder="请选择角色" @change="getData()">
<el-select v-model="form.accountRole" clearable placeholder="请选择角色" @change="initData">
<el-option v-for="(item,index) in accountRoleList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select>
</el-form-item>
@ -101,8 +113,8 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="account" label="用户账号" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省" align="center"></el-table-column>
<el-table-column prop="cityName" label="市" align="center"></el-table-column>
<el-table-column prop="provinceName" label="省" align="center"></el-table-column>
<el-table-column prop="cityName" label="市" align="center"></el-table-column>
<el-table-column prop="userName" label="姓名" align="center"></el-table-column>
<el-table-column prop="schoolName" label="学校" align="center"></el-table-column>
<el-table-column prop="platformName" label="来源" align="center"></el-table-column>
@ -141,6 +153,7 @@ export default {
countries: '中国',
provinces: '',
city: '',
platformId: '',
schoolId: '',
accountRole: '',
keyword: '',
@ -192,6 +205,24 @@ export default {
id: 12,
name: '1年内'
}],
platformList: [
{
value: '',
label: '不限'
},
{
value: 1,
label: '职站'
},
{
value: 2,
label: '数据平台'
},
{
value: 3,
label: '中台'
}
],
page: 1,
pageSize: 10,
totals: 1,
@ -226,6 +257,7 @@ export default {
},
mounted() {
this.getData()
this.getSchoolData();
},
methods: {
getData() {
@ -233,6 +265,7 @@ export default {
countries: this.form.countries,
provinceId: this.form.provinces,
cityId: this.form.city,
platformId: this.form.platformId,
schoolId: this.form.schoolId,
month: this.form.month,
creationTime: this.form.startTime,
@ -284,8 +317,8 @@ export default {
},
getSchoolData(){
let data = {
provinceId: this.form.provinces,
cityId: this.form.city
provinceId: "",
cityId: ""
}
this.$get(this.api.querySchoolData,data).then(res => {
this.schoolList = res.list

Loading…
Cancel
Save