|
|
@ -1,12 +1,12 @@ |
|
|
|
<template> |
|
|
|
<div class="m-topnav"> |
|
|
|
<div class="back" style="cursor: pointer" @click="goBack()"> |
|
|
|
<img src="~@/assets/images/shuju/main/back.png" alt="/"/> |
|
|
|
<img src="~@/assets/images/shuju/main/back.png" alt="/" /> |
|
|
|
</div> |
|
|
|
<div class="title">{{ customerName }}数据智能分析平台</div> |
|
|
|
<div class="selectArea"> |
|
|
|
<div class="selectArea" v-if="$route.path == '/dataBoard/satisfactionEval/index'"> |
|
|
|
<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" :key="item.value" :label="item.label" :value="index"></el-option> |
|
|
|
</el-select> |
|
|
|
</div> |
|
|
|
<!-- <div class="btn-back" @click="toPage('/')"> |
|
|
@ -26,20 +26,16 @@ |
|
|
|
</div> |
|
|
|
</div>--> |
|
|
|
<div class="nav-list"> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/overview/index' }" |
|
|
|
@click="toPage('/dataBoard/overview/index')"> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/overview/index' }" @click="toPage('/dataBoard/overview/index')"> |
|
|
|
<span>概览</span> |
|
|
|
</div> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path.includes('/organizational') }" |
|
|
|
@click="toPage('/organizational/dangTree')"> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path.includes('/organizational') }" @click="toPage('/organizational/dangTree')"> |
|
|
|
<span>组织架构</span> |
|
|
|
</div> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path.indexOf('/dataBoard/renfang') != -1 }" |
|
|
|
@click="toPage('/dataBoard/renfang/index')"> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path.indexOf('/dataBoard/renfang') != -1 }" @click="toPage('/dataBoard/renfang/index')"> |
|
|
|
<span>人房数据</span> |
|
|
|
</div> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/satisfactionEval/index' }" |
|
|
|
@click="toPage('/dataBoard/satisfactionEval/index')"> |
|
|
|
<div class="nav-item" :class="{ 'z-on': $route.path == '/dataBoard/satisfactionEval/index' }" @click="toPage('/dataBoard/satisfactionEval/index')"> |
|
|
|
<span>满意度评价</span> |
|
|
|
</div> |
|
|
|
</div> |
|
|
@ -155,11 +151,11 @@ |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
<script> |
|
|
|
import {messages} from "@/i18n"; |
|
|
|
import { messages } from "@/i18n"; |
|
|
|
import UpdatePasswordWork from "@/views/main-navbar-update-password-work"; |
|
|
|
import dateFormat from "dai-js/tools/dateFormat"; |
|
|
|
import nextTick from "dai-js/tools/nextTick"; |
|
|
|
import {requestGet} from "@/js/dai/request"; |
|
|
|
import { requestGet } from "@/js/dai/request"; |
|
|
|
|
|
|
|
export default { |
|
|
|
inject: ["refresh"], |
|
|
@ -207,37 +203,38 @@ export default { |
|
|
|
}, |
|
|
|
computed: {}, |
|
|
|
mounted() { |
|
|
|
this.getOrgList() |
|
|
|
this.getOrgList(); |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
getOrgList() { |
|
|
|
let params = {} |
|
|
|
let params = {}; |
|
|
|
if (this.options.length) { |
|
|
|
params = {orgId: this.options[this.value].id, level: this.options[this.value].level} |
|
|
|
params = { orgId: this.options[this.value].id, level: this.options[this.value].level }; |
|
|
|
} |
|
|
|
this.$http.post(`/gov/org/agency/maporg`, params).then(async ({data: {data}}) => { |
|
|
|
console.log(data, 'data') |
|
|
|
this.value = 0 |
|
|
|
this.$http.post(`/gov/org/agency/maporg`, params).then(async ({ data: { data } }) => { |
|
|
|
console.log(data, "data"); |
|
|
|
this.value = 0; |
|
|
|
this.$store.dispatch("chooseArea/chooseName", { |
|
|
|
orgId: data.id, |
|
|
|
level: data.level |
|
|
|
level: data.level, |
|
|
|
}); |
|
|
|
let children = await this.dealTreeData(data.children) |
|
|
|
this.options = [{ |
|
|
|
let children = await this.dealTreeData(data.children); |
|
|
|
this.options = [ |
|
|
|
{ |
|
|
|
...data, |
|
|
|
value: data.id, |
|
|
|
label: data.name, |
|
|
|
}, ...children] |
|
|
|
}) |
|
|
|
}, |
|
|
|
...children, |
|
|
|
]; |
|
|
|
}); |
|
|
|
}, |
|
|
|
dealTreeData(treeData, level = 0) { |
|
|
|
const data = treeData.map((item) => ({ |
|
|
|
...item, |
|
|
|
value: item.id, |
|
|
|
label: item.name, |
|
|
|
children: (item.children && item.children.length) |
|
|
|
? this.dealTreeData(item.children, level++) |
|
|
|
: null, |
|
|
|
children: item.children && item.children.length ? this.dealTreeData(item.children, level++) : null, |
|
|
|
})); |
|
|
|
return data; |
|
|
|
}, |
|
|
@ -246,7 +243,7 @@ export default { |
|
|
|
orgId: this.options[index].id, |
|
|
|
level: this.options[index].level |
|
|
|
});*/ |
|
|
|
this.getOrgList() |
|
|
|
this.getOrgList(); |
|
|
|
}, |
|
|
|
computeCurrentTime() { |
|
|
|
// let now = new Date(); |
|
|
@ -284,7 +281,7 @@ export default { |
|
|
|
}, |
|
|
|
async getWeatherData() { |
|
|
|
const url = "https://restapi.amap.com/v3/weather/weatherInfo?key=8c87678f34ce9e8e23245c5161991c4e"; |
|
|
|
const {data, code, msg} = await requestGet(url, { |
|
|
|
const { data, code, msg } = await requestGet(url, { |
|
|
|
city: this.$store.state.user.areaCode, |
|
|
|
}); |
|
|
|
if (code === 0) { |
|
|
@ -294,8 +291,6 @@ export default { |
|
|
|
// return this.$message.error("网络错误"); |
|
|
|
} |
|
|
|
}, |
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
|
}; |
|
|
|
</script> |
|
|
|