|
@@ -37,15 +37,9 @@
|
|
|
</div>
|
|
|
<div class="middle">
|
|
|
<img src="@/assets/zhang/publicCar/officialCar.png" width="50" style="position: absolute;top: 125px;left: 20px;cursor: pointer">
|
|
|
- <MapTwo @transmit="transmit" :mapData="mapData" ref="map"></MapTwo>
|
|
|
-<!-- <img
|
|
|
- v-if="showLocal"
|
|
|
- class="build"
|
|
|
- src="@/assets/images/build.png"
|
|
|
- alt=""
|
|
|
- />-->
|
|
|
+ <MapTwo @transmit="transmit" @changeCurCompany="changeCurCompany" :mapData="mapData" ref="map"></MapTwo>
|
|
|
<!-- 返回按钮 -->
|
|
|
-<!-- <div class="bottom-area flex-row align-items-center space-between">
|
|
|
+ <div class="bottom-area flex-row align-items-center space-between" v-if="menuFlag">
|
|
|
<div class="bottom-left flex-row align-items-center">
|
|
|
<div class="left-item">
|
|
|
<el-cascader
|
|
@@ -54,6 +48,8 @@
|
|
|
@change="handleCompanyChange"
|
|
|
placeholder="单位"
|
|
|
:show-all-levels="false"
|
|
|
+ popper-class="dropDown"
|
|
|
+ clearable
|
|
|
>
|
|
|
<template slot-scope="{ node, data }">
|
|
|
<div style="display: flex; align-items: center">
|
|
@@ -73,38 +69,11 @@
|
|
|
background: rgb(255, 180, 74);
|
|
|
"
|
|
|
></span>
|
|
|
- <span
|
|
|
- v-else-if="data.value.length == 5 && data.value != '10001'"
|
|
|
- style="
|
|
|
- display: inline-block;
|
|
|
- width: 10px;
|
|
|
- height: 10px;
|
|
|
- border-radius: 50%;
|
|
|
- margin-right: 10px;
|
|
|
- background: rgb(74, 194, 29);
|
|
|
- "
|
|
|
- ></span>
|
|
|
- <span
|
|
|
- v-else-if="data.value.length == 7"
|
|
|
- style="
|
|
|
- display: inline-block;
|
|
|
- width: 10px;
|
|
|
- height: 10px;
|
|
|
- border-radius: 50%;
|
|
|
- margin-right: 10px;
|
|
|
- background: rgb(99, 235, 255);
|
|
|
- "
|
|
|
- ></span>
|
|
|
<span>{{ data.label }}</span>
|
|
|
</div>
|
|
|
- <!– <div
|
|
|
- v-if="data.level == 2"
|
|
|
- style="width: 1.5vh;height: 1.5vh;background-color: red;border-radius: 60%;margin-top:10px;margin-left:10px;float:right"
|
|
|
- ></div> –>
|
|
|
</template>
|
|
|
</el-cascader>
|
|
|
</div>
|
|
|
- <div class="office" disabled>办公区</div>
|
|
|
</div>
|
|
|
<div class="bottom-right">
|
|
|
<img
|
|
@@ -114,7 +83,7 @@
|
|
|
class="back"
|
|
|
/>
|
|
|
</div>
|
|
|
- </div>-->
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="right">
|
|
|
<div class="right-cont" v-if="rightShow">
|
|
@@ -229,16 +198,10 @@ export default {
|
|
|
CarWarningDialog,
|
|
|
CarStockDialog,
|
|
|
},
|
|
|
- // props: {
|
|
|
- // appOrg: {
|
|
|
- // type: String,
|
|
|
- // default: "0000",
|
|
|
- // },
|
|
|
- // },
|
|
|
data() {
|
|
|
return {
|
|
|
+ menuFlag: true,
|
|
|
total: 0,
|
|
|
- alertType: null,
|
|
|
dataList: [],
|
|
|
mapData:[],
|
|
|
flag: 0,
|
|
@@ -262,9 +225,47 @@ export default {
|
|
|
showBack: false,
|
|
|
showMap: true,
|
|
|
showLocal: false,
|
|
|
- appOrg: "10001",
|
|
|
+ appOrg: "0000",
|
|
|
+ alertType: null,
|
|
|
curCompany: [],
|
|
|
- company: company,
|
|
|
+ company: [
|
|
|
+ {
|
|
|
+ "value": "10001",
|
|
|
+ "label": "国网山西省电力公司",
|
|
|
+ "children": [
|
|
|
+ {
|
|
|
+ "value": "10001",
|
|
|
+ "label": "山西省公司(本部)",
|
|
|
+ "poi": [112.316448, 38.000045],
|
|
|
+ "city": "山西省"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "value": "1A001",
|
|
|
+ "label": "国网营销服务中心",
|
|
|
+ "poi": [112.36677, 37.756826],
|
|
|
+ "city": "太原市"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "value": "1A002",
|
|
|
+ "label": "国网超高压变电分公司",
|
|
|
+ "poi": [112.555937, 37.785564],
|
|
|
+ "city": "太原市"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "value": "1A004",
|
|
|
+ "label": "国网电力科学技术研究院",
|
|
|
+ "poi": [112.567029, 37.858831],
|
|
|
+ "city": "太原市"
|
|
|
+ },
|
|
|
+ {
|
|
|
+ "value": "1A005",
|
|
|
+ "label": "国网山西省电力公司党校",
|
|
|
+ "poi": [112.56677, 38.056826],
|
|
|
+ "city": "太原市"
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
+ ]
|
|
|
};
|
|
|
},
|
|
|
created() {
|
|
@@ -277,6 +278,20 @@ export default {
|
|
|
beforeDestroy() {},
|
|
|
mounted() {},
|
|
|
methods: {
|
|
|
+ handleCompanyChange(e){
|
|
|
+ console.log(this.curCompany)
|
|
|
+ if (!e[1]){
|
|
|
+ this.transmit('0000')
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.transmit(e[1])
|
|
|
+ },
|
|
|
+
|
|
|
+ changeCurCompany(){
|
|
|
+ this.curCompany = ['10001', '10001']
|
|
|
+ this.transmit('10001')
|
|
|
+ },
|
|
|
+
|
|
|
handlePageChangeX(page, pageSize){
|
|
|
getCarDetail(this.appOrg, 1, pageSize, page).then(res => {
|
|
|
if (Number(res.code) === 200) {
|
|
@@ -325,55 +340,55 @@ export default {
|
|
|
|
|
|
resource(){
|
|
|
getResource(this.appOrg).then(res => {
|
|
|
- if (Number(res.code) === 200) {
|
|
|
- this.resourceData = res.data
|
|
|
- this.resourceData.cd = 5 - this.resourceData.totalCarNum.toString().length
|
|
|
- this.resourceData.totalCarNum = this.resourceData.totalCarNum.toString().padStart(5, '0');
|
|
|
- this.resourceData.percentageLack = (this.resourceData.totalCarNum !== 0) ? Math.round(((this.resourceData.totalCarNum - this.resourceData.establishmentsCarNum) / this.resourceData.totalCarNum) * 100) : 0;
|
|
|
- this.resourceData.percentagePosess = (this.resourceData.totalCarNum !== 0) ? Math.round((this.resourceData.establishmentsCarNum / this.resourceData.totalCarNum) * 100) : 0;
|
|
|
- this.carTypeNum = [
|
|
|
- {
|
|
|
- type: "商务车",
|
|
|
- num: this.resourceData.carNumOne
|
|
|
- },
|
|
|
- {
|
|
|
- type: "越野车",
|
|
|
- num: this.resourceData.carNumTwo
|
|
|
- },
|
|
|
- {
|
|
|
- type: "小轿车",
|
|
|
- num: this.resourceData.carNumThree
|
|
|
- },
|
|
|
- {
|
|
|
- type: "小型客车",
|
|
|
- num: this.resourceData.carNumFour
|
|
|
- },
|
|
|
- {
|
|
|
- type: "大型客车",
|
|
|
- num: this.resourceData.carNumFive
|
|
|
- }
|
|
|
- ]
|
|
|
- this.carUseNum = [
|
|
|
- {
|
|
|
- type: "企业用车",
|
|
|
- num: this.resourceData.enterpriseCarNum
|
|
|
- },
|
|
|
- {
|
|
|
- type: "企业负责人用车",
|
|
|
- num: this.resourceData.headCarNum
|
|
|
- }
|
|
|
- ]
|
|
|
- this.carActivationNum = [
|
|
|
- {
|
|
|
- type: "燃油汽车",
|
|
|
- num: this.resourceData.oilCarNum
|
|
|
- },
|
|
|
- {
|
|
|
- type: "新能源汽车",
|
|
|
- num: this.resourceData.newPowerCarNum
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
+ if (Number(res.code) === 200) {
|
|
|
+ this.resourceData = res.data
|
|
|
+ this.resourceData.cd = 5 - this.resourceData.totalCarNum.toString().length
|
|
|
+ this.resourceData.totalCarNum = this.resourceData.totalCarNum.toString().padStart(5, '0');
|
|
|
+ this.resourceData.percentageLack = (this.resourceData.totalCarNum !== 0) ? Math.round(((this.resourceData.totalCarNum - this.resourceData.establishmentsCarNum) / this.resourceData.totalCarNum) * 100) : 0;
|
|
|
+ this.resourceData.percentagePosess = (this.resourceData.totalCarNum !== 0) ? Math.round((this.resourceData.establishmentsCarNum / this.resourceData.totalCarNum) * 100) : 0;
|
|
|
+ this.carTypeNum = [
|
|
|
+ {
|
|
|
+ type: "商务车",
|
|
|
+ num: this.resourceData.carNumOne
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "越野车",
|
|
|
+ num: this.resourceData.carNumTwo
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "小轿车",
|
|
|
+ num: this.resourceData.carNumThree
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "小型客车",
|
|
|
+ num: this.resourceData.carNumFour
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "大型客车",
|
|
|
+ num: this.resourceData.carNumFive
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.carUseNum = [
|
|
|
+ {
|
|
|
+ type: "企业用车",
|
|
|
+ num: this.resourceData.enterpriseCarNum
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "企业负责人用车",
|
|
|
+ num: this.resourceData.headCarNum
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ this.carActivationNum = [
|
|
|
+ {
|
|
|
+ type: "燃油汽车",
|
|
|
+ num: this.resourceData.oilCarNum
|
|
|
+ },
|
|
|
+ {
|
|
|
+ type: "新能源汽车",
|
|
|
+ num: this.resourceData.newPowerCarNum
|
|
|
+ }
|
|
|
+ ]
|
|
|
+ }
|
|
|
})
|
|
|
},
|
|
|
monitor(){
|
|
@@ -409,7 +424,6 @@ export default {
|
|
|
|
|
|
chooseOp(title, alertType){
|
|
|
this.op = title
|
|
|
- this.closeDialog()
|
|
|
this.alertType = alertType
|
|
|
getWarnDetail(this.appOrg, alertType, 10, 0).then(res => {
|
|
|
if (Number(res.code) === 200) {
|
|
@@ -432,7 +446,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
chooseCost(){
|
|
|
- this.closeDialog()
|
|
|
getCarDetail(this.appOrg, 0, 10, 0).then(res => {
|
|
|
if (Number(res.code) === 200) {
|
|
|
this.dataList = res.data.list
|
|
@@ -448,7 +461,6 @@ export default {
|
|
|
},
|
|
|
|
|
|
chooseHealth(){
|
|
|
- this.closeDialog()
|
|
|
getCarDetail(this.appOrg, 1, 10, 0).then(res => {
|
|
|
if (Number(res.code) === 200) {
|
|
|
this.dataList = res.data.list
|
|
@@ -518,29 +530,6 @@ export default {
|
|
|
this.$refs.province.reloadMap(this.curDeep);
|
|
|
},
|
|
|
|
|
|
- //选择公司
|
|
|
- handleCompanyChange(e) {
|
|
|
- console.log(e);
|
|
|
- if (e && e.length > 0) {
|
|
|
- if (e[1] == "10001") {
|
|
|
- this.showMap = false;
|
|
|
- this.showLocal = true;
|
|
|
- this.showBack = true;
|
|
|
- } else {
|
|
|
- this.showMap = true;
|
|
|
- this.showLocal = false;
|
|
|
- }
|
|
|
- let appOrg = e[e.length - 1];
|
|
|
- this.appOrg = appOrg;
|
|
|
- }
|
|
|
- if(e[1] == "1A001" || e[1] == "1A002" || e[1] == "1A004" || e[1] == "1A005"){
|
|
|
- this.showMap = true;
|
|
|
- this.showLocal = false;
|
|
|
- this.showBack = true;
|
|
|
- // return;
|
|
|
- }
|
|
|
- this.$refs.province.chooseUnit(e);
|
|
|
- },
|
|
|
},
|
|
|
};
|
|
|
</script>
|
|
@@ -606,6 +595,7 @@ export default {
|
|
|
padding: 125px 0 0 0px;
|
|
|
position: relative;
|
|
|
.bottom-area {
|
|
|
+ width: 200px;
|
|
|
position: absolute;
|
|
|
right: 50px;
|
|
|
left: 50px;
|
|
@@ -778,5 +768,9 @@ export default {
|
|
|
// border-radius: 5px;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+.dropDown .el-cascader-panel{
|
|
|
+ height: 150px !important;
|
|
|
+}
|
|
|
</style>
|
|
|
|