@@ -33,21 +33,17 @@ | |||
<div class="div-lab"> | |||
<div class="label" style=" line-height: 30px;">地区:</div> | |||
<el-select | |||
v-model="provinceId" | |||
placeholder="请选择" | |||
class="div-inp" | |||
<el-cascader | |||
:props="props1" | |||
@change="locationsChange1" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="area" | |||
filterable | |||
clearable | |||
> | |||
<el-option | |||
v-for="item in areaList" | |||
:key="item.id" | |||
:label="item.name" | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
></el-cascader> | |||
</div> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
@@ -506,6 +502,37 @@ export default { | |||
} | |||
}, | |||
}, | |||
props1: { | |||
lazy: true, | |||
checkStrictly: true, | |||
async lazyLoad(node, resolve) { | |||
// console.log(node, 123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
const { data } = await getAreaList({ parentId: 0 }); //获取省接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: false, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: true, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
}, | |||
}, | |||
area:[], | |||
options: [ | |||
{ | |||
value: "0", | |||
@@ -523,6 +550,7 @@ export default { | |||
dialogVisible3:false, | |||
operaVisible:false, | |||
provinceId:'', | |||
cityId:'', | |||
areaList:[], | |||
timelist:'', | |||
tableData: [], | |||
@@ -676,7 +704,7 @@ export default { | |||
this.serviceStatus=this.$route.query.serviceStatus; | |||
} | |||
// 获取地区列表 | |||
this.getCityList() | |||
// this.getCityList() | |||
this.getAgentList() | |||
}, | |||
methods: { | |||
@@ -992,7 +1020,9 @@ export default { | |||
this.agentName=''; | |||
this.operationalName=''; | |||
this.provinceId='' | |||
this.cityId='' | |||
this.pageNum=1 | |||
this.area=[] | |||
this.getAgentList() | |||
}, | |||
//筛选 | |||
@@ -1010,6 +1040,7 @@ export default { | |||
serviceStatus:this.serviceStatus, | |||
agentName:this.agentName, | |||
provinceId:this.provinceId, | |||
cityId:this.cityId, | |||
operationalName:this.operationalName, | |||
}).then((res) => { | |||
@@ -1031,6 +1062,12 @@ export default { | |||
this.editoragentobj.provinceId = e[0]; | |||
this.editoragentobj.cityId = e[1]; | |||
} | |||
}, | |||
locationsChange1(e) { | |||
console.log(e); | |||
if (!e) return; | |||
this.provinceId = e[0]; | |||
this.cityId = e[1]; | |||
}, | |||
handleCurrentChange(val) { | |||
this.pageNum=val; | |||
@@ -22,7 +22,7 @@ | |||
<div class="label" style="line-height: 30px; min-width: 80px"> | |||
地区: | |||
</div> | |||
<el-select | |||
<!-- <el-select | |||
v-model="provinceId" | |||
placeholder="请选择" | |||
class="div-inp" | |||
@@ -36,7 +36,18 @@ | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-select> --> | |||
<el-cascader | |||
:props="props1" | |||
@change="locationsChange1" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="area" | |||
filterable | |||
clearable | |||
></el-cascader> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
@@ -565,6 +576,37 @@ export default { | |||
} | |||
}, | |||
}, | |||
props1: { | |||
lazy: true, | |||
checkStrictly: true, | |||
async lazyLoad(node, resolve) { | |||
// console.log(node, 123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
const { data } = await getAreaList({ parentId: 0 }); //获取省接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: false, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: true, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
}, | |||
}, | |||
area:[], | |||
addagentobj: { | |||
agentId: "", // 代理商名称 | |||
name: "", // 公司名称 | |||
@@ -738,7 +780,7 @@ export default { | |||
mounted() { | |||
this.orgType = localStorage.getItem("orgType"); | |||
// 获取地区列表 | |||
this.getCityList(); | |||
// this.getCityList(); | |||
this.getcompanyList(); | |||
}, | |||
methods: { | |||
@@ -1140,6 +1182,8 @@ export default { | |||
this.name = ""; | |||
this.pageNum = 1; | |||
this.provinceId = ""; | |||
this.cityId = ""; | |||
this.area=[] | |||
this.getcompanyList(); | |||
}, | |||
//筛选 | |||
@@ -1153,6 +1197,7 @@ export default { | |||
current: this.pageNum, | |||
provinceId: this.provinceId, | |||
size: this.pageSize, | |||
cityId: this.cityId, | |||
operatorName: this.operatorName, | |||
operationStaffName: this.operationStaffName, | |||
name: this.name, | |||
@@ -1185,6 +1230,12 @@ export default { | |||
this.editoragentobj.cityId = e[1]; | |||
} | |||
}, | |||
locationsChange1(e) { | |||
console.log(e); | |||
if (!e) return; | |||
this.provinceId = e[0]; | |||
this.cityId = e[1]; | |||
}, | |||
}, | |||
}; | |||
</script> | |||
@@ -21,7 +21,7 @@ | |||
</div> | |||
<div class="label" style="line-height: 30px;min-width: 80px;">地区:</div> | |||
<el-select | |||
<!-- <el-select | |||
v-model="provinceId" | |||
placeholder="请选择" | |||
class="div-inp" | |||
@@ -35,7 +35,18 @@ | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-select> --> | |||
<el-cascader | |||
:props="props1" | |||
@change="locationsChange1" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="area" | |||
filterable | |||
clearable | |||
></el-cascader> | |||
</div> | |||
@@ -376,6 +387,7 @@ | |||
<script> | |||
import { mapGetters } from "vuex"; | |||
import { getAreaList } from "@/api/modules/api"; | |||
export default { | |||
data() { | |||
var validatePass = (rule, value, callback) => { | |||
@@ -392,6 +404,38 @@ export default { | |||
} | |||
}; | |||
return { | |||
props1: { | |||
lazy: true, | |||
checkStrictly: true, | |||
async lazyLoad(node, resolve) { | |||
// console.log(node, 123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
const { data } = await getAreaList({ parentId: 0 }); //获取省接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: false, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: true, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
}, | |||
}, | |||
area:[], | |||
addressOptions:[], | |||
addagentobj: { | |||
agentId: "", // 代理商名称 | |||
name: "", // 公司名称 | |||
@@ -449,6 +493,7 @@ export default { | |||
dialogVisible: false, | |||
dialogVisible2: false, | |||
provinceId: "", | |||
cityId:'', | |||
areaList: [], | |||
dialogVisible3: false, | |||
resetFlag: false, | |||
@@ -547,7 +592,7 @@ export default { | |||
mounted() { | |||
this.orgType = localStorage.getItem("orgType"); | |||
// 获取地区列表 | |||
this.getCityList(); | |||
// this.getCityList(); | |||
this.getcompanyList(); | |||
}, | |||
methods: { | |||
@@ -878,7 +923,9 @@ export default { | |||
this.operationStaffName = ""; | |||
this.name = ""; | |||
this.provinceId = ""; | |||
this.cityId = ""; | |||
this.pageNum = 1; | |||
this.area=[] | |||
this.getcompanyList(); | |||
}, | |||
//筛选 | |||
@@ -892,6 +939,7 @@ export default { | |||
current: this.pageNum, | |||
size: this.pageSize, | |||
provinceId: this.provinceId, | |||
cityId: this.cityId, | |||
operatorName: this.operatorName, | |||
operationStaffName: this.operationStaffName, | |||
name: this.name, | |||
@@ -905,6 +953,12 @@ export default { | |||
this.total = res.data.total; | |||
}); | |||
}, | |||
locationsChange1(e) { | |||
console.log(e); | |||
if (!e) return; | |||
this.provinceId = e[0]; | |||
this.cityId = e[1]; | |||
}, | |||
handleSizeChange(val) { | |||
this.pageSize = val; | |||
this.getcompanyList(); | |||
@@ -147,7 +147,7 @@ | |||
</div> | |||
<div class="app-titel" style="margin-top: 5px"> | |||
<div class="div-lab"> | |||
<div class="label">城市:</div> | |||
<div class="label">地区:</div> | |||
<el-cascader | |||
:props="props" | |||
@change="locationsChange" | |||
@@ -158,6 +158,14 @@ | |||
clearable | |||
></el-cascader> | |||
</div> | |||
<div class="div-lab" v-if="activeTotal == 0"> | |||
<div class="label" style="min-width:70px;">系统运营:</div> | |||
<el-input maxlength="10" clearable v-model="searchForm.linkman"></el-input> | |||
</div> | |||
<!-- <div class="div-lab" v-if="activeTotal == 0"> | |||
<div class="label" style="min-width:70px;">系统运营:</div> | |||
<el-input maxlength="10" clearable v-model="searchForm.linkman"></el-input> | |||
</div> --> | |||
</div> | |||
<div class="app-titel" style="margin-top: 15px"> | |||
<div style="margin-left: 20px"> | |||
@@ -184,7 +192,7 @@ | |||
<el-table-column prop="area" label="地区" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="linkman" label="负责人" align="center"> | |||
<el-table-column prop="linkman" label="系统运营" align="center"> | |||
</el-table-column> | |||
<el-table-column prop="onlineQuantity" label="在线设备" align="center"> | |||
</el-table-column> | |||
@@ -326,6 +334,7 @@ export default { | |||
return { | |||
props: { | |||
lazy: true, | |||
checkStrictly: true, | |||
async lazyLoad(node, resolve) { | |||
const { level } = node; | |||
if (level == 0) { | |||
@@ -112,7 +112,7 @@ | |||
</div> | |||
<div class="div-lab"> | |||
<div class="label">地区:</div> | |||
<el-select | |||
<!-- <el-select | |||
v-model="searchForm.provinceId" | |||
placeholder="请选择" | |||
class="div-inp" | |||
@@ -126,7 +126,18 @@ | |||
:value="item.id" | |||
> | |||
</el-option> | |||
</el-select> | |||
</el-select> --> | |||
<el-cascader | |||
:props="props1" | |||
@change="locationsChange1" | |||
:options="addressOptions" | |||
placeholder="省/市" | |||
size="small" | |||
separator="/" | |||
v-model="area" | |||
filterable | |||
clearable | |||
></el-cascader> | |||
</div> | |||
<!-- <div v-if="orgType == 0" class="div-lab"> | |||
<div class="label">运营人员:</div> | |||
@@ -461,6 +472,7 @@ | |||
size="small" | |||
separator="/" | |||
v-model="ruleForm.area" | |||
filterable | |||
clearable | |||
></el-cascader> | |||
</el-form-item> | |||
@@ -694,6 +706,7 @@ export default { | |||
return { | |||
props: { | |||
lazy: true, | |||
// checkStrictly: true, | |||
async lazyLoad(node, resolve) { | |||
console.log(node, 123); | |||
const { level } = node; | |||
@@ -721,6 +734,37 @@ export default { | |||
} | |||
}, | |||
}, | |||
props1: { | |||
lazy: true, | |||
checkStrictly: true, | |||
async lazyLoad(node, resolve) { | |||
// console.log(node, 123); | |||
const { level } = node; | |||
if (level == 0) { | |||
console.log(23); | |||
const { data } = await getAreaList({ parentId: 0 }); //获取省接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: false, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} else if (level == 1) { | |||
const { data } = await getAreaList({ parentId: node.data.value }); //获取市接口 | |||
var nodes = data.map((item) => { | |||
return { | |||
value: item.id, | |||
label: item.name, | |||
leaf: true, | |||
}; | |||
}); | |||
resolve(nodes); | |||
} | |||
}, | |||
}, | |||
area:[], | |||
editFlag: false, | |||
changeFlag: false, | |||
operaVisible: false, | |||
@@ -904,7 +948,7 @@ export default { | |||
// 获取运营人员 | |||
// this.getAllOperationsStaff(); | |||
// 获取地区列表 | |||
this.getCityList(); | |||
// this.getCityList(); | |||
// 获取列表数据 | |||
this.zkhousePage(); | |||
}, | |||
@@ -1309,6 +1353,7 @@ export default { | |||
agentName: "", | |||
operationalPeople: "", | |||
}; | |||
this.area=[] | |||
this.currentPage = 1; | |||
this.zkhousePage(); | |||
}, | |||
@@ -1340,6 +1385,12 @@ export default { | |||
this.ruleForm.provinceId = e[0]; | |||
this.ruleForm.cityId = e[1]; | |||
}, | |||
locationsChange1(e) { | |||
console.log(e); | |||
if (!e) return; | |||
this.searchForm.provinceId = e[0]; | |||
this.searchForm.cityId = e[1]; | |||
}, | |||
}, | |||
}; | |||
</script> | |||