|
@ -6,7 +6,7 @@ |
|
|
<div class="title">{{ customerName }}数据智能分析平台</div> |
|
|
<div class="title">{{ customerName }}数据智能分析平台</div> |
|
|
<div class="selectArea" v-if="$route.path == '/dataBoard/satisfactionEval/index'"> |
|
|
<div class="selectArea" v-if="$route.path == '/dataBoard/satisfactionEval/index'"> |
|
|
<el-select @change="setSelectName" v-model="value" popper-class="selectPopClass"> |
|
|
<el-select @change="setSelectName" v-model="value" popper-class="selectPopClass"> |
|
|
<el-option v-for="(item, index) in options" :key="item.value" :label="item.label" :value="index"></el-option> |
|
|
<el-option v-for="(item, index) in options" :disabled="item.agencyLevel === 'grid'" :key="item.value" :label="item.label" :value="item.value"></el-option> |
|
|
</el-select> |
|
|
</el-select> |
|
|
</div> |
|
|
</div> |
|
|
<!-- <div class="btn-back" @click="toPage('/')"> |
|
|
<!-- <div class="btn-back" @click="toPage('/')"> |
|
@ -206,20 +206,32 @@ export default { |
|
|
this.getOrgList(); |
|
|
this.getOrgList(); |
|
|
}, |
|
|
}, |
|
|
methods: { |
|
|
methods: { |
|
|
|
|
|
getChooseLabel(key) { |
|
|
|
|
|
const name = this.options.filter((item) => item.value === key)[0].level; |
|
|
|
|
|
return name; |
|
|
|
|
|
}, |
|
|
|
|
|
|
|
|
getOrgList() { |
|
|
getOrgList() { |
|
|
let params = {}; |
|
|
let params = {}; |
|
|
if (this.options.length) { |
|
|
if (this.options.length) { |
|
|
params = { orgId: this.options[this.value].id, level: this.options[this.value].level }; |
|
|
params = { orgId: this.value, level: this.getChooseLabel(this.value) }; |
|
|
} |
|
|
} |
|
|
|
|
|
console.log(params); |
|
|
this.$http.post(`/gov/org/agency/maporg`, params).then(async ({ data: { data } }) => { |
|
|
this.$http.post(`/gov/org/agency/maporg`, params).then(async ({ data: { data } }) => { |
|
|
console.log(data, "data"); |
|
|
console.log(data); |
|
|
this.value = 0; |
|
|
this.value = data.id; |
|
|
this.$store.dispatch("chooseArea/chooseName", { |
|
|
this.$store.dispatch("chooseArea/chooseName", { |
|
|
orgId: data.id, |
|
|
orgId: data.id, |
|
|
level: data.level, |
|
|
level: data.level, |
|
|
}); |
|
|
}); |
|
|
let children = await this.dealTreeData(data.children); |
|
|
let children = await this.dealTreeData(data.children); |
|
|
|
|
|
if (data.parentId) { |
|
|
this.options = [ |
|
|
this.options = [ |
|
|
|
|
|
{ |
|
|
|
|
|
...data, |
|
|
|
|
|
value: data.parentId, |
|
|
|
|
|
label: data.parentName, |
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
...data, |
|
|
...data, |
|
|
value: data.id, |
|
|
value: data.id, |
|
@ -227,6 +239,16 @@ export default { |
|
|
}, |
|
|
}, |
|
|
...children, |
|
|
...children, |
|
|
]; |
|
|
]; |
|
|
|
|
|
} else { |
|
|
|
|
|
this.options = [ |
|
|
|
|
|
{ |
|
|
|
|
|
...data, |
|
|
|
|
|
value: data.id, |
|
|
|
|
|
label: data.name, |
|
|
|
|
|
}, |
|
|
|
|
|
...children, |
|
|
|
|
|
]; |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
}, |
|
|
}, |
|
|
dealTreeData(treeData, level = 0) { |
|
|
dealTreeData(treeData, level = 0) { |
|
@ -285,7 +307,6 @@ export default { |
|
|
city: this.$store.state.user.areaCode, |
|
|
city: this.$store.state.user.areaCode, |
|
|
}); |
|
|
}); |
|
|
if (code === 0) { |
|
|
if (code === 0) { |
|
|
console.log("---------------weather", data); |
|
|
|
|
|
this.weather = data.lives[0]; |
|
|
this.weather = data.lives[0]; |
|
|
} else { |
|
|
} else { |
|
|
// return this.$message.error("网络错误"); |
|
|
// return this.$message.error("网络错误"); |
|
|