Commit 64559f2b authored by 张牧越's avatar 张牧越

fix

parent 00438664
......@@ -51,10 +51,23 @@ export async function getProjectQuestion(params) {
}
// // 区域问题列表 弃用
// export async function getAreaQuestionByAreaId(areaId) {
// return await request({
// url: `/site/index/type`,
// method: 'get',
// params: {
// city_id: areaId
// }
// })
// }
// 区域问题列表
export async function getAreaQuestionByAreaId(areaId) {
export async function getScoreByCity(areaId) {
return await request({
url: `/site/index/type`,
url: `/site/index/get_project`,
method: 'get',
params: {
city_id: areaId
......@@ -62,16 +75,13 @@ export async function getAreaQuestionByAreaId(areaId) {
})
}
// 区域问题列表
export async function getScoreByCity(areaId) {
// 右侧得分
export async function getScoreStatusByCity(areaId) {
return await request({
url: `/site/index/type`,
url: `/site/index/get_score`,
method: 'get',
params: {
city_id: areaId
}
})
}
\ No newline at end of file
......@@ -6,20 +6,34 @@
element-loading-text="地图加载中..." -->
<div class="left-area">
<Section class="sections" title="政府监管">
<STable :headers="header1" :table-data="data1"> </STable>
<STable :headers="header1" :table-data="data1">
<template slot-scope="scope">
<template v-if="scope.header.slot == 'score'">
<span :style="{ color: scope.row.score < 80 ? '#f86262' : '' }">{{
scope.row.score
}}</span>
</template>
</template>
</STable>
</Section>
<Section class="sections" title="工程质量">
<STable :headers="header2" :table-data="data2"> </STable>
<STable :headers="header2" :table-data="data2">
<template slot-scope="scope">
<template v-if="scope.header.slot == 'score'">
<span :style="{ color: scope.row.score < 80 ? '#f86262' : '' }">{{
scope.row.score
}}</span>
</template>
</template>
</STable>
</Section>
<Section class="sections" title="创新创优">
<STable :headers="header3" :table-data="data3">
<template slot-scope="scope">
<template v-if="scope.header.slot == 'count'">
<span
>{{ scope.row.count }}/<span style="color: green">{{
scope.row.general
}}</span></span
>
<template v-if="scope.header.slot == 'score'">
<span :style="{ color: scope.row.score < 80 ? '#f86262' : '' }">{{
scope.row.score
}}</span>
</template>
</template>
</STable>
......@@ -30,20 +44,29 @@
<Section class="sections long" type="long" :title="currentCityName">
<div class="get-points">
<div class="points">
<div class="grade" style="color: #f86262">
{{ zfjgPoints }}
<div
class="grade"
:style="{ color: zfjg_score < 80 ? '#f86262' : '#5aefd1' }"
>
{{ zfjg_score }}
</div>
<div class="label">政府监管</div>
</div>
<div class="points">
<div class="grade" style="color: #5aefd1">
{{ zfjgPoints }}
<div
class="grade"
:style="{ color: zljc_score < 80 ? '#f86262' : '#5aefd1' }"
>
{{ zljc_score }}
</div>
<div class="label">质量检测</div>
</div>
<div class="points">
<div class="grade" style="color: #f86262">
{{ zfjgPoints }}
<div
class="grade"
:style="{ color: score_count < 80 ? '#f86262' : '#5aefd1' }"
>
{{ score_count }}
</div>
<div class="label">总得分</div>
</div>
......@@ -63,7 +86,33 @@
:style="{ marginTop: '.1rem', height: 'calc(100% - 1rem)' }"
:headers="header4_1"
:table-data="data4"
></STable2>
>
<template slot-scope="scope">
<template v-if="scope.header.slot == 'project_num'">
<span
:style="{ color: scope.row.project_num < 80 ? '#f86262' : '' }"
>{{ scope.row.project_num }}</span
>
</template>
</template>
<template slot-scope="scope">
<template v-if="scope.header.slot == 'score'">
<span :style="{ color: scope.row.score < 80 ? '#f86262' : '' }">{{
scope.row.score
}}</span>
</template>
</template>
<template slot-scope="scope">
<template v-if="scope.header.slot == 'score_count'">
<span
:style="{ color: scope.row.score_count < 80 ? '#f86262' : '' }"
>{{ scope.row.score_count }}</span
>
</template>
</template>
</STable2>
<!-- activeTab == 1 ? header4_1 : activeTab == 2 ? header4_2 : header4_3 -->
<!-- <div class="no-data" v-if="activeTab == 3">
......@@ -104,6 +153,8 @@ import {
getStatusQuestion,
getProjectQuestion,
getAreaQuestionByAreaId,
getScoreByCity,
getScoreStatusByCity,
} from "@/api/dataStatis";
import AMapLoader from "@amap/amap-jsapi-loader";
......@@ -111,6 +162,7 @@ import { mapState } from "vuex";
import zhejiangMapData from "@/assets/data/mapData.json";
import Section2 from "@/components/common/Section2.vue";
import STable2 from "@/components/common/STable2.vue";
export default {
name: "DataStatis",
components: {
......@@ -134,7 +186,7 @@ export default {
},
align: "left",
},
{ name: "政府监管得分", props: "score", width: "30%" },
{ name: "政府监管得分", props: "score", width: "30%", slot: "score" },
],
header2: [
{
......@@ -150,7 +202,7 @@ export default {
},
align: "left",
},
{ name: "工程质量得分", props: "score", width: "30%" },
{ name: "质量评定得分", props: "score", width: "30%", slot: "score" },
],
header3: [
{
......@@ -166,7 +218,7 @@ export default {
},
align: "left",
},
{ name: "创新创优得分", props: "score", width: "30%" },
{ name: "创新创优得分", props: "score", width: "30%", slot: "score" },
],
// header1: [
// {
......@@ -249,7 +301,7 @@ export default {
header4_1: [
{
name: "工程名称",
props: "name",
props: "project_name",
width: "40%",
headerStyle: {
padding: "0 .2rem",
......@@ -262,18 +314,21 @@ export default {
},
{
name: "工程质量",
props: "value1",
props: "project_num",
width: "20%",
slot: "project_num",
},
{
name: "质量检测",
props: "value2",
name: "质量评定",
props: "score",
width: "20%",
slot: "score",
},
{
name: "总得分",
props: "value2",
props: "score_count",
width: "20%",
slot: "score_count",
},
],
header4_2: [
......@@ -429,7 +484,9 @@ export default {
polygons: [],
currentCityName: "",
currentCityId: "",
zfjgPoints: 0,
zfjg_score: 0,
zljc_score: 0,
score_count: 0,
};
},
methods: {
......@@ -482,197 +539,139 @@ export default {
switchList(type) {
this.activeTab = type;
this.data4 = [];
if (type == 1) {
this.data4 = [
{
name: "苍南县江南垟平原骨干排涝工程(龙港段)龙金运河和新兰闸站工程",
value1: 17,
},
{
name: "慈溪市水资源开发利用二期(梅湖水库扩容工程)",
value1: 23,
},
{
name: "东苕溪防洪后续西险大塘达标加固工程(杭州市段)",
value1: 18,
},
{
name: "奉化区柏坑水库扩容工程",
value1: 19,
},
{
name: "海宁市百里钱塘综合整治提升工程一期(盐仓段)",
value1: 32,
},
{
name: "杭州市本级海塘安澜工程 (三堡至乔司段海塘)一期",
value1: 45,
},
{
name: "杭州市本级海塘安澜工程(三堡船闸段海塘)",
value1: 16,
},
{
name: "杭州市本级海塘安澜工程(珊瑚沙海塘)",
value1: 9,
},
{
name: "杭州市本级海塘安澜工程(上泗南北大塘)二期",
value1: 10,
},
{
name: "杭州市萧山区西江塘义桥段古海塘抢险加固工程",
value1: 58,
},
{
name: "杭州市萧围西线(一工段至四工段)提标加固工程",
value1: 21,
},
{
name: "湖州市苕溪清水入湖河道整治后续工程(德清县段)",
value1: 12,
},
{
name: "环湖大堤(浙江段)后续工程(长兴段)",
value1: 32,
},
{
name: "嘉兴市区城市防洪扩展工程三期(封闭工程)",
value1: 3,
},
{
name: "金华市安地灌区续建配套与节水改造项目(2021-2022年)调增项目",
value1: 4,
},
{
name: "杭州市本级海塘安澜工程(珊瑚沙海塘)",
value1: 9,
},
];
// getAreaQuestionByAreaId(this.currentCityId).then((res) => {
// this.data4 = res.data;
// });
} else if (type == 2) {
this.data4 = [
{
name: "环湖大堤施工2标",
value1: "堤防工程",
value2: "92.8%",
},
{
name: "环湖大堤施工2标",
value1: "蔡浦港闸站工程",
value2: "93.4%",
},
{
name: "环湖大堤施工2标",
value1: "其他口门建筑物单位工程",
value2: "89.5%",
},
{
name: "环湖大堤施工2标",
value1: "夹浦港-秋龙港-吴城港河道堤防工程",
value2: "93.4%",
},
{
name: "环湖大堤施工2标",
value1: "夹浦港-秋龙港-吴城港闸站第一单位工程",
value2: "91.9%",
},
{
name: "环湖大堤施工2标",
value1: "夹浦港-秋龙港-吴城港闸站第二单位工程",
value2: "91.1%",
},
{
name: "衢州市柯城区寺桥水库工程",
value1: "混凝土面板堆石坝",
value2: "/",
},
{
name: "衢州市柯城区寺桥水库工程",
value1: "导流泄放洞",
value2: "/",
},
{
name: "衢州市柯城区寺桥水库工程",
value1: "溢洪道",
value2: "/",
},
{
name: "金华市安地灌区续建配套与节水改造项目(2021-2022年)调增项目施工标【金华市安地灌区续建配套与节水改造项目(2021-2022年)IV标】",
value1: "渠道及信息化项目",
value2: "/",
},
];
} else if (type == 3) {
this.data4 = [
{
name: "苍南县江南垟平原骨干排涝工程(龙港段)龙金运河和新兰闸站工程",
value1: "98%",
},
{
name: "慈溪市水资源开发利用二期(梅湖水库扩容工程)",
value1: "87%",
},
{
name: "东苕溪防洪后续西险大塘达标加固工程(杭州市段)",
value1: "76.4%",
},
{
name: "奉化区柏坑水库扩容工程",
value1: "87.1%",
},
{
name: "海宁市百里钱塘综合整治提升工程一期(盐仓段)",
value1: "95.1%",
},
{
name: "杭州市本级海塘安澜工程 (三堡至乔司段海塘)一期",
value1: "98%",
},
{
name: "杭州市本级海塘安澜工程(三堡船闸段海塘)",
value1: "87%",
},
{
name: "杭州市本级海塘安澜工程(珊瑚沙海塘)",
value1: "76.4%",
},
{
name: "杭州市本级海塘安澜工程(上泗南北大塘)二期",
value1: "87.1%",
},
{
name: "杭州市萧山区西江塘义桥段古海塘抢险加固工程",
value1: "95.1%",
},
{
name: "杭州市萧围西线(一工段至四工段)提标加固工程",
value1: "98%",
},
{
name: "湖州市苕溪清水入湖河道整治后续工程(德清县段)",
value1: "87%",
},
{
name: "环湖大堤(浙江段)后续工程(长兴段)",
value1: "76.4%",
},
{
name: "嘉兴市区城市防洪扩展工程三期(封闭工程)",
value1: "87.1%",
},
{
name: "金华市安地灌区续建配套与节水改造项目(2021-2022年)调增项目",
value1: "95.1%",
},
{
name: "杭州市本级海塘安澜工程(珊瑚沙海塘)",
value1: "76.2%",
},
];
}
getScoreByCity(this.currentCityId).then((res) => {
this.data4 = res.data;
});
getScoreStatusByCity(this.currentCityId).then((res) => {
this.zfjg_score = res.data.zfjg_score;
this.zljc_score = res.data.zljc_score;
this.score_count = res.data.score_count;
});
// if (type == 1) {
// } else if (type == 2) {
// this.data4 = [
// {
// name: "环湖大堤施工2标",
// value1: "堤防工程",
// value2: "92.8%",
// },
// {
// name: "环湖大堤施工2标",
// value1: "蔡浦港闸站工程",
// value2: "93.4%",
// },
// {
// name: "环湖大堤施工2标",
// value1: "其他口门建筑物单位工程",
// value2: "89.5%",
// },
// {
// name: "环湖大堤施工2标",
// value1: "夹浦港-秋龙港-吴城港河道堤防工程",
// value2: "93.4%",
// },
// {
// name: "环湖大堤施工2标",
// value1: "夹浦港-秋龙港-吴城港闸站第一单位工程",
// value2: "91.9%",
// },
// {
// name: "环湖大堤施工2标",
// value1: "夹浦港-秋龙港-吴城港闸站第二单位工程",
// value2: "91.1%",
// },
// {
// name: "衢州市柯城区寺桥水库工程",
// value1: "混凝土面板堆石坝",
// value2: "/",
// },
// {
// name: "衢州市柯城区寺桥水库工程",
// value1: "导流泄放洞",
// value2: "/",
// },
// {
// name: "衢州市柯城区寺桥水库工程",
// value1: "溢洪道",
// value2: "/",
// },
// {
// name: "金华市安地灌区续建配套与节水改造项目(2021-2022年)调增项目施工标【金华市安地灌区续建配套与节水改造项目(2021-2022年)IV标】",
// value1: "渠道及信息化项目",
// value2: "/",
// },
// ];
// } else if (type == 3) {
// this.data4 = [
// {
// name: "苍南县江南垟平原骨干排涝工程(龙港段)龙金运河和新兰闸站工程",
// value1: "98%",
// },
// {
// name: "慈溪市水资源开发利用二期(梅湖水库扩容工程)",
// value1: "87%",
// },
// {
// name: "东苕溪防洪后续西险大塘达标加固工程(杭州市段)",
// value1: "76.4%",
// },
// {
// name: "奉化区柏坑水库扩容工程",
// value1: "87.1%",
// },
// {
// name: "海宁市百里钱塘综合整治提升工程一期(盐仓段)",
// value1: "95.1%",
// },
// {
// name: "杭州市本级海塘安澜工程 (三堡至乔司段海塘)一期",
// value1: "98%",
// },
// {
// name: "杭州市本级海塘安澜工程(三堡船闸段海塘)",
// value1: "87%",
// },
// {
// name: "杭州市本级海塘安澜工程(珊瑚沙海塘)",
// value1: "76.4%",
// },
// {
// name: "杭州市本级海塘安澜工程(上泗南北大塘)二期",
// value1: "87.1%",
// },
// {
// name: "杭州市萧山区西江塘义桥段古海塘抢险加固工程",
// value1: "95.1%",
// },
// {
// name: "杭州市萧围西线(一工段至四工段)提标加固工程",
// value1: "98%",
// },
// {
// name: "湖州市苕溪清水入湖河道整治后续工程(德清县段)",
// value1: "87%",
// },
// {
// name: "环湖大堤(浙江段)后续工程(长兴段)",
// value1: "76.4%",
// },
// {
// name: "嘉兴市区城市防洪扩展工程三期(封闭工程)",
// value1: "87.1%",
// },
// {
// name: "金华市安地灌区续建配套与节水改造项目(2021-2022年)调增项目",
// value1: "95.1%",
// },
// {
// name: "杭州市本级海塘安澜工程(珊瑚沙海塘)",
// value1: "76.2%",
// },
// ];
// }
},
initMapData(mapid, baseAreaJson, mapData, maplevel) {
var myChart = echarts.init(document.getElementById(mapid));
......@@ -801,23 +800,24 @@ export default {
shadowBlur: 10,
shadowOffsetX: 5,
shadowOffsetY: 5,
areaColor: {
type: "linear-gradient",
x: 0,
y: 0,
x2: 0,
y2: 1,
colorStops: [
{
offset: 0,
color: "#15b5f5", // 0% 处的颜色
},
{
offset: 1,
color: "#106fd5",
},
],
},
areaColor: "#2a5dc6",
// areaColor: {
// type: "linear-gradient",
// x: 0,
// y: 0,
// x2: 0,
// y2: 1,
// colorStops: [
// {
// offset: 0,
// color: "#15b5f5", // 0% 处的颜色
// },
// {
// offset: 1,
// color: "#106fd5",
// },
// ],
// },
},
},
......@@ -836,10 +836,16 @@ export default {
type: "scatter",
coordinateSystem: "geo",
symbol: (value, params) => {
console.log(value);
if (value[2] < 80) {
return (
"image://" + require("@/assets/images/index/icon_hong.png")
);
} else {
return (
"image://" +
require("@/assets/images/index/icon_dingwie@2x.png")
"image://" + require("@/assets/images/index/icon_lan.png")
);
}
},
colorBy: "data",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment