Browse Source

满意度评价下拉框展示父级修改,网格层级不允许点击修改

V1.0
SongZhen 2 years ago
parent
commit
3be54ea307
  1. 1
      .env.development
  2. 47
      src/views/dataBoardMain/main-navbar.vue
  3. 6
      vue.config.js

1
.env.development

@ -1,6 +1,7 @@
NODE_ENV=development
VUE_APP_API_SERVER = http://localhost:9001/api
# VUE_APP_API_SERVER = http://192.168.1.140/api
# VUE_APP_API_SERVER = http://219.146.91.110:30801/api
# VUE_APP_API_SERVER = https://epmet-yantai.elinkservice.cn/api
# VUE_APP_API_SERVER = https://epmet-test.elinkservice.cn/api

47
src/views/dataBoardMain/main-navbar.vue

@ -6,7 +6,7 @@
<div class="title">{{ customerName }}数据智能分析平台</div>
<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" :disabled="item.agencyLevel === 'grid'" :key="item.value" :label="item.label" :value="item.value"></el-option>
</el-select>
</div>
<!-- <div class="btn-back" @click="toPage('/')">
@ -206,27 +206,49 @@ export default {
this.getOrgList();
},
methods: {
getChooseLabel(key) {
const name = this.options.filter((item) => item.value === key)[0].level;
return name;
},
getOrgList() {
let params = {};
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 } }) => {
console.log(data, "data");
this.value = 0;
console.log(data);
this.value = data.id;
this.$store.dispatch("chooseArea/chooseName", {
orgId: data.id,
level: data.level,
});
let children = await this.dealTreeData(data.children);
this.options = [
{
...data,
value: data.id,
label: data.name,
},
...children,
];
if (data.parentId) {
this.options = [
{
...data,
value: data.parentId,
label: data.parentName,
},
{
...data,
value: data.id,
label: data.name,
},
...children,
];
} else {
this.options = [
{
...data,
value: data.id,
label: data.name,
},
...children,
];
}
});
},
dealTreeData(treeData, level = 0) {
@ -285,7 +307,6 @@ export default {
city: this.$store.state.user.areaCode,
});
if (code === 0) {
console.log("---------------weather", data);
this.weather = data.lives[0];
} else {
// return this.$message.error("");

6
vue.config.js

@ -4,8 +4,8 @@
* @LastEditors: mk 2403457699@qq.com
* @LastEditTime: 2023-09-22 15:16:23
* @Description: 介绍一下改动了什么
*
*
*
*
*/
/**
* 配置参考: https://cli.vuejs.org/zh/config/
@ -44,7 +44,7 @@ module.exports = {
target: "http://bipaas.elinkservice.cn", // 我们要代理的真实接口地址
},
"/api": {
target: "http://localhost:8080", // 后端接口地址
target: "http://219.146.91.110:30801", // 后端接口地址
changeOrigin: true,
pathRewrite: {
"^api": "",

Loading…
Cancel
Save