提交: 项目管理-项目详情页顶部栏的 联系人信息中,联系人1目前取的是合同名称、联系人2重复了 优化

This commit is contained in:
23688nl 2022-09-08 11:09:03 +08:00
parent c9885ae012
commit 23a4de9e9e
5 changed files with 102 additions and 65 deletions

View File

@ -134,12 +134,12 @@ export default {
if (list) { if (list) {
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
// console.log(list[i]['typeCode'].indexOf('a')) // console.log(list[i]['typeCode'].indexOf('a'))
if (list[i]["typeCode"].indexOf("a") === 0) { if (list[i]["tag"] === 'A') {
this.templist["alarm"].push({ this.templist["alarm"].push({
value: list[i].alarmTotal, value: list[i].alarmTotal,
name: list[i].typeName, name: list[i].typeName,
}); });
} else if (list[i]["typeCode"].indexOf("w") === 0) { } else if (list[i]["tag"] === 'B') {
this.templist["waraing"].push({ this.templist["waraing"].push({
value: list[i].alarmTotal, value: list[i].alarmTotal,
name: list[i].typeName, name: list[i].typeName,

View File

@ -239,6 +239,26 @@
</el-col> </el-col>
</el-row> </el-row>
<el-row :gutter="20">
<el-col :span="12">
<el-form-item label="联系方式1" prop="contacts1">
<el-input v-model="form.contacts1" placeholder="请输入联系方式1" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式2" prop="contacts2">
<el-input v-model="form.contacts2" placeholder="请输入联系方式2" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="联系方式3" prop="contacts3">
<el-input v-model="form.contacts3" placeholder="请输入联系方式3" />
</el-form-item>
</el-col>
</el-row>
<el-form-item label="总路设备:" > <el-form-item label="总路设备:" >
<el-input v-model="form.projectDeviceName" suffix-icon="el-icon-caret-bottom" @focus="openTableSelectDialog()" placeholder="请输入总路设备" /> <el-input v-model="form.projectDeviceName" suffix-icon="el-icon-caret-bottom" @focus="openTableSelectDialog()" placeholder="请输入总路设备" />
</el-form-item> </el-form-item>

View File

@ -9,14 +9,7 @@
> >
<el-row> <el-row>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="型号名称" prop="modelName"> <el-form-item label="型号名称" prop="prodKey">
<!-- <el-input
v-model="queryParams.modelName"
placeholder="请输入型号名称"
clearable
size="small"
@keyup.enter.native="handleQuery"
/> -->
<el-select v-model="queryParams.prodKey" placeholder="请选择项目类型" clearable size="small"> <el-select v-model="queryParams.prodKey" placeholder="请选择项目类型" clearable size="small">
<el-option <el-option
v-for="dict in projectModelList" v-for="dict in projectModelList"
@ -38,7 +31,7 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="5"> <el-col :span="5">
<el-form-item label="设备状态" prop="deviceStatus"> <el-form-item label="设备状态" prop="deviceState">
<el-select <el-select
v-model="queryParams.deviceState" v-model="queryParams.deviceState"
placeholder="请选择设备状态" placeholder="请选择设备状态"
@ -113,8 +106,8 @@
<img :src="devItem['deviceImage'] ? getIotFileUrl(devItem['deviceImage']) : '/images/devcie_default.png'" /> <img :src="devItem['deviceImage'] ? getIotFileUrl(devItem['deviceImage']) : '/images/devcie_default.png'" />
</div> </div>
<div class="card-body-right"> <div class="card-body-right">
<span :title="devItem.deviceId">{{ devItem.deviceId }}</span> <span :title="devItem.deviceName">{{ devItem.deviceName }}</span>
<span :title="devItem.deviceSecret">{{ devItem.deviceSecret }}</span> <span :title="devItem.deviceKey">{{ devItem.deviceKey }}</span>
<span :title="devItem.deviceAddress">{{ devItem.deviceAddress }}</span> <span :title="devItem.deviceAddress">{{ devItem.deviceAddress }}</span>
</div> </div>
</div> </div>
@ -299,6 +292,7 @@ export default {
this.getGatewayList(); this.getGatewayList();
}, },
resetQuery() { resetQuery() {
this.resetForm("queryForm");
this.getGatewayList(); this.getGatewayList();
}, },
// //

View File

@ -142,12 +142,12 @@ export default {
if (list) { if (list) {
for (var i = 0; i < list.length; i++) { for (var i = 0; i < list.length; i++) {
// console.log(list[i]['typeCode'].indexOf('a')) // console.log(list[i]['typeCode'].indexOf('a'))
if (list[i]["typeCode"].indexOf("a") === 0) { if (list[i]["tag"] === 'A') {
this.templist["alarm"].push({ this.templist["alarm"].push({
value: list[i].alarmTotal, value: list[i].alarmTotal,
name: list[i].typeName, name: list[i].typeName,
}); });
} else if (list[i]["typeCode"].indexOf("w") === 0) { } else if (list[i]["tag"] === 'B') {
this.templist["waraing"].push({ this.templist["waraing"].push({
value: list[i].alarmTotal, value: list[i].alarmTotal,
name: list[i].typeName, name: list[i].typeName,
@ -155,6 +155,7 @@ export default {
} }
} }
} }
console.log('result-update-', this.templist, list)
this.updateEcharts(); this.updateEcharts();
}, },
deep: true, deep: true,
@ -181,7 +182,7 @@ export default {
flex-wrap: wrap; flex-wrap: wrap;
.conter-block { .conter-block {
width: 100%; width: 100%;
height: 238px; height: 218px;
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
justify-content: center; justify-content: center;
@ -245,14 +246,14 @@ export default {
.echarts-legend-c .legend-for::-webkit-scrollbar-thumb { .echarts-legend-c .legend-for::-webkit-scrollbar-thumb {
/*滚动条里面小方块*/ /*滚动条里面小方块*/
border-radius: 10px; border-radius: 10px;
box-shadow: inset 0 0 5px #004eb0; box-shadow: inset 0 0 5px #dbdada;
background: #004eb0; background: #dbdada;
} }
.echarts-legend-c .legend-for::-webkit-scrollbar-track { .echarts-legend-c .legend-for::-webkit-scrollbar-track {
/*滚动条里面轨道*/ /*滚动条里面轨道*/
box-shadow: inset 0 0 5px #042764; box-shadow: inset 0 0 5px #04276400;
border-radius: 10px; border-radius: 10px;
background: #042764; background: #04276400;
} }
} }
</style> </style>

View File

@ -12,10 +12,21 @@
> >
<div :class="isFoldRight ? 'block-lift block-right-fold' : 'block-lift'"> <div :class="isFoldRight ? 'block-lift block-right-fold' : 'block-lift'">
<div class="container-title"> <div class="container-title">
<div class="title-left" v-for="(item, idx) in projectList" :key="idx" v-show="item.projectId === infoData.projectId"> <div
class="title-left"
v-for="(item, idx) in projectList"
:key="idx"
v-show="item.projectId === infoData.projectId"
>
<span>{{ item.projectName }}</span> <span>{{ item.projectName }}</span>
<i class="el-icon-arrow-left icon-c but-icon" @click="handlePrev(idx)"></i> <i
<i class="el-icon-arrow-right icon-c but-icon" @click="handleNext(idx)"></i> class="el-icon-arrow-left icon-c but-icon"
@click="handlePrev(idx)"
></i>
<i
class="el-icon-arrow-right icon-c but-icon"
@click="handleNext(idx)"
></i>
</div> </div>
<div class="title-but"> <div class="title-but">
<div class="but-home" @click="handleLinkToTable"> <div class="but-home" @click="handleLinkToTable">
@ -34,14 +45,14 @@
<el-descriptions-item label="行业类型:">{{ <el-descriptions-item label="行业类型:">{{
statusFormat(infoData) statusFormat(infoData)
}}</el-descriptions-item> }}</el-descriptions-item>
<el-descriptions-item label="联系人1">{{ <el-descriptions-item label="联系人1">
infoData.contractName {{ infoData["contacts1"] || "--" }}
}}</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="联系人2"
>林工1586000000</el-descriptions-item
>
<el-descriptions-item label="联系人2"> <el-descriptions-item label="联系人2">
{{ infoData["projectDeviceName"] }} {{ infoData["contacts2"] || "--" }}
</el-descriptions-item>
<el-descriptions-item label="联系人3">
{{ infoData["contacts3"] || "--" }}
</el-descriptions-item> </el-descriptions-item>
<el-descriptions-item label="项目地址:">{{ <el-descriptions-item label="项目地址:">{{
infoData.projectAddress infoData.projectAddress
@ -51,7 +62,10 @@
<div class="info-divider"></div> <div class="info-divider"></div>
<div class="info-right"> <div class="info-right">
<div> <div>
<e-census-cards :propList="censusCardList" :result="projectStatistics" /> <e-census-cards
:propList="censusCardList"
:result="projectStatistics"
/>
</div> </div>
</div> </div>
</div> </div>
@ -81,19 +95,28 @@
<div class="block-right" v-if="!isFoldRight"> <div class="block-right" v-if="!isFoldRight">
<e-simple-card title="最近2 天警情同比" class="today-ratio-card"> <e-simple-card title="最近2 天警情同比" class="today-ratio-card">
<template slot="cardBody"> <template slot="cardBody">
<e-today-ratio v-if="!isFoldRight" :result="resultInfo['warningAnalysisStatisticsVo']" /> <e-today-ratio
v-if="!isFoldRight"
:result="resultInfo['warningAnalysisStatisticsVo']"
/>
</template> </template>
</e-simple-card> </e-simple-card>
<e-simple-card title="类型分布统计" class="type-census-card"> <e-simple-card title="类型分布统计" class="type-census-card">
<template slot="cardBody"> <template slot="cardBody">
<e-type-census v-if="!isFoldRight" :result="resultInfo['alarmCategoriesList'] || []" /> <e-type-census
v-if="!isFoldRight"
:result="resultInfo['alarmCategoriesList'] || []"
/>
</template> </template>
</e-simple-card> </e-simple-card>
<e-simple-card title="报警预警趋势" class="trend-census-card"> <e-simple-card title="报警预警趋势" class="trend-census-card">
<template slot="cardBody"> <template slot="cardBody">
<e-trend-census v-if="!isFoldRight" :result="resultInfo['alarmChartDataVo'] || []" /> <e-trend-census
v-if="!isFoldRight"
:result="resultInfo['alarmChartDataVo'] || []"
/>
</template> </template>
</e-simple-card> </e-simple-card>
</div> </div>
@ -101,7 +124,7 @@
</template> </template>
<script> <script>
import { getProject, listProject } from "@/api/iot/project"; import { getProject, listProject } from "@/api/iot/project";
import { statProject } from "@/api/iot/project_new" import { statProject } from "@/api/iot/project_new";
import { getWarningAnalysis } from "@/api/app"; import { getWarningAnalysis } from "@/api/app";
import Cookies from "js-cookie"; import Cookies from "js-cookie";
import ECensusCards from "./ECensusCards"; import ECensusCards from "./ECensusCards";
@ -115,13 +138,13 @@ import ETypeCensus from "./ETypeCensus";
import ETrendCensus from "./ETrendCensus"; import ETrendCensus from "./ETrendCensus";
import EObjectContainer from "./EObjectContainer"; import EObjectContainer from "./EObjectContainer";
import EDeviceManage from "./DeviceManage/index"; import EDeviceManage from "./DeviceManage/index";
import EAlarmManage from './AlarmManage/index' import EAlarmManage from "./AlarmManage/index";
import ESafetyTemplate from './SafetyTemplate/index' import ESafetyTemplate from "./SafetyTemplate/index";
import ELeakageCurrent from './SafetyTemplate/ELeakageCurrent' import ELeakageCurrent from "./SafetyTemplate/ELeakageCurrent";
import EDebuff from './SafetyTemplate/EDebuff' import EDebuff from "./SafetyTemplate/EDebuff";
import EDeviceSwitchWarning from './SafetyTemplate/EDeviceSwitchWarning' import EDeviceSwitchWarning from "./SafetyTemplate/EDeviceSwitchWarning";
import EElectricity from './EnergyManage/EElectricity' import EElectricity from "./EnergyManage/EElectricity";
import EEnergyLoad from './EnergyManage/EEnergyLoad' import EEnergyLoad from "./EnergyManage/EEnergyLoad";
export default { export default {
name: "projectDetailV2", name: "projectDetailV2",
@ -143,7 +166,7 @@ export default {
EDebuff, EDebuff,
EDeviceSwitchWarning, EDeviceSwitchWarning,
EElectricity, EElectricity,
EEnergyLoad EEnergyLoad,
}, },
props: { props: {
sourceId: { sourceId: {
@ -156,7 +179,7 @@ export default {
stateSourceId: null, stateSourceId: null,
resultInfo: {}, resultInfo: {},
activeName: "EObjectContainer", activeName: "EObjectContainer",
activeType: 'EObjectContainer', activeType: "EObjectContainer",
activeList: [ activeList: [
{ {
label: "项目信息", label: "项目信息",
@ -171,7 +194,8 @@ export default {
{ {
label: "安全监管", label: "安全监管",
key: "safety", key: "safety",
children: [ // children: [
//
{ {
label: "全部报警", label: "全部报警",
key: "EAlarmManage", key: "EAlarmManage",
@ -185,7 +209,7 @@ export default {
{ {
label: "温度", label: "温度",
key: "A006,A007,A008,A009,B004,B005,B006,B007", key: "A006,A007,A008,A009,B004,B005,B006,B007",
template: 'ESafetyTemplate' template: "ESafetyTemplate",
}, },
{ {
label: "漏电报警", label: "漏电报警",
@ -232,7 +256,7 @@ export default {
key: "A011", key: "A011",
template: "EDeviceSwitchWarning", template: "EDeviceSwitchWarning",
}, },
] ],
}, },
{ {
label: "能源管理", label: "能源管理",
@ -282,7 +306,7 @@ export default {
fullscreen: false, fullscreen: false,
divWidth: 1682, divWidth: 1682,
divHeight: 812, divHeight: 812,
projectStatistics: {} projectStatistics: {},
}; };
}, },
created() { created() {
@ -298,7 +322,7 @@ export default {
isFoldRight: { isFoldRight: {
handler(newValue) { handler(newValue) {
if (!newValue) { if (!newValue) {
this.warningAnalysisList() this.warningAnalysisList();
} }
}, },
deep: true, // deep: true, //
@ -308,15 +332,15 @@ export default {
this.stateSourceId = this.sourceId; this.stateSourceId = this.sourceId;
}, },
stateSourceId(val) { stateSourceId(val) {
this.init() this.init();
}, },
opened: { opened: {
handler() { handler() {
this.resize_window_project(); this.resize_window_project();
}, },
deep: true, deep: true,
immediate: true immediate: true,
} },
}, },
mounted() { mounted() {
// //
@ -331,12 +355,12 @@ export default {
computed: { computed: {
opened() { opened() {
return this.$store.getters.sidebar; return this.$store.getters.sidebar;
} },
}, },
methods: { methods: {
init() { init() {
this.getInfoByProjectId(); this.getInfoByProjectId();
this.getProjectCount() this.getProjectCount();
this.warningAnalysisList(); this.warningAnalysisList();
}, },
resize_window_project() { resize_window_project() {
@ -366,28 +390,28 @@ export default {
handlePrev(idx) { handlePrev(idx) {
if (idx >= 1) { if (idx >= 1) {
// this.getInfoByProjectId(this.projectList[idx - 1].projectId) // this.getInfoByProjectId(this.projectList[idx - 1].projectId)
this.stateSourceId = this.projectList[idx - 1].projectId this.stateSourceId = this.projectList[idx - 1].projectId;
} }
}, },
handleNext(idx) { handleNext(idx) {
if (idx < this.projectList.length - 1) { if (idx < this.projectList.length - 1) {
// this.getInfoByProjectId(this.projectList[idx + 1].projectId) // this.getInfoByProjectId(this.projectList[idx + 1].projectId)
this.stateSourceId = this.projectList[idx + 1].projectId this.stateSourceId = this.projectList[idx + 1].projectId;
} }
}, },
// //
getProjectCount() { getProjectCount() {
statProject({ projectId: this.stateSourceId }).then(res => { statProject({ projectId: this.stateSourceId }).then((res) => {
this.projectStatistics = res.data this.projectStatistics = res.data;
}) });
}, },
// //
getProjectList() { getProjectList() {
listProject({ listProject({
pageNum: 1, pageNum: 1,
pageSize: 99999, pageSize: 99999,
orderByColumn: 'createTime', orderByColumn: "createTime",
isAsc: 'desc', isAsc: "desc",
}).then((response) => { }).then((response) => {
this.projectList = response.rows; this.projectList = response.rows;
}); });
@ -618,6 +642,4 @@ export default {
font-size: 20px !important; font-size: 20px !important;
} }
} }
</style> </style>