up
This commit is contained in:
@ -283,14 +283,28 @@
|
||||
:prop="item.value"
|
||||
:label="index == 0 ? item.lable : item.lable + '(亩)'"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column prop="address" v-if="operate" align="center" label="操作">
|
||||
>
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="color: rgba(67, 181, 143, 1); cursor: pointer"
|
||||
@click="download(scope.row)"
|
||||
style="color: rgba(234, 165, 93, 0.8); font-weight: 600"
|
||||
v-if="item.value == '轻度干旱'"
|
||||
>
|
||||
下载
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
<span
|
||||
style="color: rgba(205, 92, 92, 1); font-weight: 700"
|
||||
v-else-if="item.value == '中度干旱'"
|
||||
>
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
<span
|
||||
style="color: red; font-weight: 800"
|
||||
v-else-if="item.value == '重度干旱'"
|
||||
>
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -299,7 +313,7 @@
|
||||
<el-table
|
||||
:data="tableNewData"
|
||||
:header-cell-style="{ 'text-align': 'center' }"
|
||||
height="70%"
|
||||
height="80%"
|
||||
highlight-current-row
|
||||
header-row-class-name="tabth"
|
||||
>
|
||||
@ -316,14 +330,28 @@
|
||||
:prop="item.value"
|
||||
:label="index == 0 ? item.lable : item.lable + '(亩)'"
|
||||
align="center"
|
||||
/>
|
||||
<el-table-column prop="address" v-if="operate" align="center" label="操作">
|
||||
>
|
||||
<template #default="scope">
|
||||
<span
|
||||
style="color: rgba(67, 181, 143, 1); cursor: pointer"
|
||||
@click="download(scope.row)"
|
||||
style="color: rgba(234, 165, 93, 0.8); font-weight: 600"
|
||||
v-if="item.value == '轻度干旱'"
|
||||
>
|
||||
下载
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
<span
|
||||
style="color: rgba(205, 92, 92, 1); font-weight: 700"
|
||||
v-else-if="item.value == '中度干旱'"
|
||||
>
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
<span
|
||||
style="color: red; font-weight: 800"
|
||||
v-else-if="item.value == '重度干旱'"
|
||||
>
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
<span v-else>
|
||||
{{ scope.row[item.value] }}
|
||||
</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@ -464,7 +492,7 @@ let layersDic = {
|
||||
|
||||
// 组件挂载完成后执行
|
||||
onMounted(() => {
|
||||
initonMounted()
|
||||
initonMounted();
|
||||
});
|
||||
|
||||
function initonMounted() {
|
||||
@ -494,7 +522,13 @@ function initonMounted() {
|
||||
rightWra.style.transform = 'translate(107%,0)';
|
||||
localStorage.setItem(router.currentRoute.value.path, true);
|
||||
}
|
||||
|
||||
onUpdated(() => {
|
||||
if (localStorage.getItem(router.currentRoute.value.path) == 'false') {
|
||||
document.querySelector('.mode').innerText = '地图模式';
|
||||
} else {
|
||||
document.querySelector('.mode').innerText = '列表模式';
|
||||
}
|
||||
});
|
||||
|
||||
/*-------------地图------------------------*/
|
||||
const mapOption = {
|
||||
@ -1354,6 +1388,13 @@ const getTownships = city => {
|
||||
};
|
||||
//村
|
||||
const getadministratives = city => {
|
||||
dd = {
|
||||
适宜: [],
|
||||
湿润: [],
|
||||
轻度干旱: [],
|
||||
中度干旱: [],
|
||||
重度干旱: [],
|
||||
};
|
||||
getadministrative({ divisions: city }).then(res => {
|
||||
Township.brr = res.data;
|
||||
let arr = [...res.data];
|
||||
@ -1364,7 +1405,6 @@ const getadministratives = city => {
|
||||
}
|
||||
});
|
||||
data.title = [...Object.values(brr)];
|
||||
console.log(res);
|
||||
data.title.forEach((item, index) => {
|
||||
let town = res.data.map(i => {
|
||||
if (item === i.streetName) {
|
||||
@ -1372,7 +1412,7 @@ const getadministratives = city => {
|
||||
}
|
||||
});
|
||||
Object.keys(dd).forEach(it => {
|
||||
const index = town.findIndex(a => a && a.type === it);
|
||||
const index = town.findIndex(a => a && a.type === it && a.area > 0);
|
||||
if (index > -1) {
|
||||
dd[it].push(1);
|
||||
} else {
|
||||
@ -1534,7 +1574,7 @@ const Deta4 = item => {
|
||||
region = item.subregionName == '全部' ? '黄岛区' : item.subregionName;
|
||||
}
|
||||
});
|
||||
getTownship({ divisions: value.value}).then(res => {
|
||||
getTownship({ divisions: value.value }).then(res => {
|
||||
let arr = [];
|
||||
let brr = [];
|
||||
res.data.forEach(item => {
|
||||
@ -2733,6 +2773,7 @@ function chartModes() {
|
||||
type: 'slider',
|
||||
width: '40%',
|
||||
top: '90%',
|
||||
zoomLock: true, //禁止拉伸
|
||||
start: 0,
|
||||
end: ends,
|
||||
showDataShadow: false,
|
||||
@ -3001,7 +3042,7 @@ $height: calc(100vh - 100px);
|
||||
float: right;
|
||||
margin-right: 10px;
|
||||
}
|
||||
:deep(.el-input__wrapper){
|
||||
:deep(.el-input__wrapper) {
|
||||
width: 100px;
|
||||
}
|
||||
.modeDiv {
|
||||
@ -3062,7 +3103,7 @@ $height: calc(100vh - 100px);
|
||||
width: 100%;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
height:40%;
|
||||
height: 40%;
|
||||
.areaDiv {
|
||||
width: 100%;
|
||||
height: 327px;
|
||||
|
Reference in New Issue
Block a user