甲方公司信息
This commit is contained in:
parent
490ff6d1ac
commit
12ca363fe6
|
@ -0,0 +1,42 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/technicalPlan/capacity/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/capacity',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/capacity',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(planIds) {
|
||||
return request({
|
||||
url: '/technicalPlan/capacity/'+planIds,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/waterQualityStandard/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
return request({
|
||||
url: '/waterQualityStandard',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/waterQualityStandard',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(standardIds) {
|
||||
return request({
|
||||
url: '/waterQualityStandard/'+standardIds,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
//树形水质标准
|
||||
export function treeRegionLevel() {
|
||||
return request({
|
||||
url: '/waterQualityStandard/treeRegionLevel',
|
||||
baseURL: "/plan-api",
|
||||
method: 'get',
|
||||
|
||||
})
|
||||
}
|
||||
//根据水质标准ID查询
|
||||
export function getData(id) {
|
||||
return request({
|
||||
url: '/waterQualityStandard/queryById/'+id,
|
||||
baseURL: "/plan-api",
|
||||
method: 'get',
|
||||
})
|
||||
}
|
|
@ -0,0 +1,43 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/equipmentParam/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
return request({
|
||||
url: '/equipmentParam',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/equipmentParam',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(paramIds) {
|
||||
return request({
|
||||
url: '/equipmentParam/'+paramIds,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipment/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipment',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipment',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(ids) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipment/'+ids,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,42 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipmentComponent/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipmentComponent',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipmentComponent',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(ids) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipmentComponent/'+ids,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1,50 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipmentEnergyConsumption/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
return request({
|
||||
url: '/equipmentParam',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/equipmentParam',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(paramIds) {
|
||||
return request({
|
||||
url: '/equipmentParam/'+paramIds,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
// 修改
|
||||
export function updateComponentRunTime(data) {
|
||||
return request({
|
||||
url: '/technicalPlan/equipmentEnergyConsumption/updateComponentRunTime',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
|
@ -0,0 +1,46 @@
|
|||
import request from '@/utils/request'
|
||||
|
||||
// 查询
|
||||
export function list(query) {
|
||||
return request({
|
||||
url: '/technicalPlan/list',
|
||||
method: 'get',
|
||||
baseURL: "/plan-api",
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
// 新增
|
||||
export function postData(data) {
|
||||
|
||||
|
||||
|
||||
|
||||
return request({
|
||||
url: '/technicalPlan',
|
||||
baseURL: "/plan-api",
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 修改
|
||||
export function putData(data) {
|
||||
return request({
|
||||
url: '/technicalPlan',
|
||||
baseURL: "/plan-api",
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 删除
|
||||
export function deleteData(planIds) {
|
||||
return request({
|
||||
url: '/technicalPlan/'+planIds,
|
||||
baseURL: "/plan-api",
|
||||
method: 'delete'
|
||||
})
|
||||
}
|
||||
|
|
@ -0,0 +1 @@
|
|||
const a =1
|
|
@ -0,0 +1 @@
|
|||
export const a =2
|
|
@ -19,7 +19,7 @@ const service = axios.create({
|
|||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||
baseURL: import.meta.env.VITE_APP_BASE_API,
|
||||
// 超时
|
||||
timeout: 10000
|
||||
timeout: 100000
|
||||
})
|
||||
|
||||
// request拦截器
|
||||
|
|
|
@ -0,0 +1,220 @@
|
|||
[
|
||||
{
|
||||
"id": 101,
|
||||
"parentId": 100,
|
||||
"label": "所有指标",
|
||||
"weight": 1,
|
||||
"children": [
|
||||
{
|
||||
"id": 100000,
|
||||
"parentId": 101,
|
||||
"label": "国标",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"id": 110000,
|
||||
"parentId": 101,
|
||||
"label": "北京市",
|
||||
"weight": 1
|
||||
},
|
||||
{
|
||||
"id": 120000,
|
||||
"parentId": 101,
|
||||
"label": "天津市",
|
||||
"weight": 2
|
||||
},
|
||||
{
|
||||
"id": 130000,
|
||||
"parentId": 101,
|
||||
"label": "河北省",
|
||||
"weight": 3
|
||||
},
|
||||
{
|
||||
"id": 140000,
|
||||
"parentId": 101,
|
||||
"label": "山西省",
|
||||
"weight": 4
|
||||
},
|
||||
{
|
||||
"id": 150000,
|
||||
"parentId": 101,
|
||||
"label": "内蒙古自治区",
|
||||
"weight": 5
|
||||
},
|
||||
{
|
||||
"id": 210000,
|
||||
"parentId": 101,
|
||||
"label": "辽宁省",
|
||||
"weight": 6
|
||||
},
|
||||
{
|
||||
"id": 220000,
|
||||
"parentId": 101,
|
||||
"label": "吉林省",
|
||||
"weight": 7
|
||||
},
|
||||
{
|
||||
"id": 230000,
|
||||
"parentId": 101,
|
||||
"label": "黑龙江省",
|
||||
"weight": 8
|
||||
},
|
||||
{
|
||||
"id": 310000,
|
||||
"parentId": 101,
|
||||
"label": "上海市",
|
||||
"weight": 9
|
||||
},
|
||||
{
|
||||
"id": 320000,
|
||||
"parentId": 101,
|
||||
"label": "江苏省",
|
||||
"weight": 10
|
||||
},
|
||||
{
|
||||
"id": 330000,
|
||||
"parentId": 101,
|
||||
"label": "浙江省",
|
||||
"weight": 11
|
||||
},
|
||||
{
|
||||
"id": 340000,
|
||||
"parentId": 101,
|
||||
"label": "安徽省",
|
||||
"weight": 12
|
||||
},
|
||||
{
|
||||
"id": 350000,
|
||||
"parentId": 101,
|
||||
"label": "福建省",
|
||||
"weight": 13
|
||||
},
|
||||
{
|
||||
"id": 360000,
|
||||
"parentId": 101,
|
||||
"label": "江西省",
|
||||
"weight": 14
|
||||
},
|
||||
{
|
||||
"id": 370000,
|
||||
"parentId": 101,
|
||||
"label": "山东省",
|
||||
"weight": 15
|
||||
},
|
||||
{
|
||||
"id": 410000,
|
||||
"parentId": 101,
|
||||
"label": "河南省",
|
||||
"weight": 16
|
||||
},
|
||||
{
|
||||
"id": 420000,
|
||||
"parentId": 101,
|
||||
"label": "湖北省",
|
||||
"weight": 17
|
||||
},
|
||||
{
|
||||
"id": 430000,
|
||||
"parentId": 101,
|
||||
"label": "湖南省",
|
||||
"weight": 18
|
||||
},
|
||||
{
|
||||
"id": 440000,
|
||||
"parentId": 101,
|
||||
"label": "广东省",
|
||||
"weight": 19
|
||||
},
|
||||
{
|
||||
"id": 450000,
|
||||
"parentId": 101,
|
||||
"label": "广西壮族自治区",
|
||||
"weight": 20
|
||||
},
|
||||
{
|
||||
"id": 460000,
|
||||
"parentId": 101,
|
||||
"label": "海南省",
|
||||
"weight": 21
|
||||
},
|
||||
{
|
||||
"id": 500000,
|
||||
"parentId": 101,
|
||||
"label": "重庆市",
|
||||
"weight": 22
|
||||
},
|
||||
{
|
||||
"id": 510000,
|
||||
"parentId": 101,
|
||||
"label": "四川省",
|
||||
"weight": 23
|
||||
},
|
||||
{
|
||||
"id": 520000,
|
||||
"parentId": 101,
|
||||
"label": "贵州省",
|
||||
"weight": 24
|
||||
},
|
||||
{
|
||||
"id": 530000,
|
||||
"parentId": 101,
|
||||
"label": "云南省",
|
||||
"weight": 25
|
||||
},
|
||||
{
|
||||
"id": 540000,
|
||||
"parentId": 101,
|
||||
"label": "西藏自治区",
|
||||
"weight": 26
|
||||
},
|
||||
{
|
||||
"id": 610000,
|
||||
"parentId": 101,
|
||||
"label": "陕西省",
|
||||
"weight": 27
|
||||
},
|
||||
{
|
||||
"id": 620000,
|
||||
"parentId": 101,
|
||||
"label": "甘肃省",
|
||||
"weight": 28
|
||||
},
|
||||
{
|
||||
"id": 630000,
|
||||
"parentId": 101,
|
||||
"label": "青海省",
|
||||
"weight": 29
|
||||
},
|
||||
{
|
||||
"id": 640000,
|
||||
"parentId": 101,
|
||||
"label": "宁夏回族自治区",
|
||||
"weight": 30
|
||||
},
|
||||
{
|
||||
"id": 650000,
|
||||
"parentId": 101,
|
||||
"label": "新疆维吾尔自治区",
|
||||
"weight": 31
|
||||
},
|
||||
{
|
||||
"id": 710000,
|
||||
"parentId": 101,
|
||||
"label": "台湾省",
|
||||
"weight": 32
|
||||
},
|
||||
{
|
||||
"id": 810000,
|
||||
"parentId": 101,
|
||||
"label": "香港特别行政区",
|
||||
"weight": 33
|
||||
},
|
||||
{
|
||||
"id": 820000,
|
||||
"parentId": 101,
|
||||
"label": "澳门特别行政区",
|
||||
"weight": 34
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
|
@ -0,0 +1,385 @@
|
|||
<template>
|
||||
<el-form :model="form" ref="userRef" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="进水指标" prop="phonenumber">
|
||||
<el-descriptions
|
||||
class="margin-top"
|
||||
direction="vertical"
|
||||
:column="6"
|
||||
border
|
||||
>
|
||||
<el-descriptions-item v-for="item in inletlist">
|
||||
<template #label>
|
||||
<div class="cell-item">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</template>
|
||||
<el-input
|
||||
v-model="item.value"
|
||||
placeholder="请输入"
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
<!-- <el-icon :size="30" color="red"><CirclePlus /></el-icon> -->
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="出水指标" prop="phonenumber">
|
||||
<el-cascader
|
||||
v-model="cityValue"
|
||||
:options="citytype"
|
||||
:props="props"
|
||||
@change="handleChange"
|
||||
/>
|
||||
<el-descriptions
|
||||
class="margin-top"
|
||||
direction="vertical"
|
||||
:column="10"
|
||||
style="margin-top: 10px"
|
||||
border
|
||||
>
|
||||
<el-descriptions-item v-for="item in outletlist">
|
||||
<template #label>
|
||||
<div class="cell-item">
|
||||
{{ item.name }}
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<el-input
|
||||
v-model="item.value"
|
||||
placeholder="请输入"
|
||||
disabled
|
||||
maxlength="11"
|
||||
/>
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="粪大肠菌群">
|
||||
<el-radio-group v-model="form.coliformRemoval">
|
||||
<el-radio
|
||||
size="large"
|
||||
v-for="item in coliform_removal"
|
||||
v-key="item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="填料方式">
|
||||
<el-radio-group v-model="form.packingMethod">
|
||||
<el-radio
|
||||
size="large"
|
||||
v-for="item in packing_method"
|
||||
v-key="item.value"
|
||||
:label="item.value"
|
||||
>{{ item.label }}</el-radio
|
||||
>
|
||||
</el-radio-group>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="吨数选型" prop="phonenumber">
|
||||
<el-select
|
||||
v-model="form.equipmentParamId"
|
||||
multiple
|
||||
:max-collapse-tags="3"
|
||||
placeholder="吨数选择"
|
||||
@change="changeSelect"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in tonnageData"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
<el-divider content-position="left"
|
||||
>相关设备参数与电费计算</el-divider
|
||||
>
|
||||
|
||||
<el-table border :data="dataList">
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="processingCapacity"
|
||||
>
|
||||
<template #default="scope">
|
||||
|
||||
<div>{{ scope.row.equipment.equipmentName }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="处理量"
|
||||
align="center"
|
||||
prop="processingCapacity"
|
||||
>
|
||||
<template #default="scope">
|
||||
|
||||
<div>{{ scope.row.capacityTonnage }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="水泵参数" align="center" prop="pumpParam" />
|
||||
<el-table-column
|
||||
label="水泵数量"
|
||||
align="center"
|
||||
prop="pumpQuantity"
|
||||
/>
|
||||
<el-table-column label="气泵参数" align="center" prop="fanParam" />
|
||||
<el-table-column
|
||||
label="风机数量"
|
||||
align="center"
|
||||
prop="fanQuantity"
|
||||
/>
|
||||
|
||||
<el-table-column label="主要动力设备" align="center" prop="11">
|
||||
<div class="borderBt">水泵</div>
|
||||
<div>风机</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="运行时间" align="center" prop="11">
|
||||
<template #default="scope">
|
||||
<div class="borderBt">{{ scope.row.pumpRuntime }}</div>
|
||||
<div>{{ scope.row.fanRuntime }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="装机功率" align="center" prop="11">
|
||||
<template #default="scope">
|
||||
<div class="borderBt">{{ scope.row.pumpInstalledPower }}</div>
|
||||
<div>{{ scope.row.fanInstalledPower }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日均电耗" align="center" prop="11">
|
||||
<template #default="scope">
|
||||
<div class="borderBt">{{ scope.row.pumpDailyConsumption }}</div>
|
||||
<div>{{ scope.row.fanDailyConsumption }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="日总电耗"
|
||||
align="center"
|
||||
prop="totalDailyConsumption"
|
||||
/>
|
||||
<el-table-column
|
||||
label="日吨水总电耗"
|
||||
align="center"
|
||||
prop="waterElectricityCost"
|
||||
/>
|
||||
<el-table-column
|
||||
label="吨水电费"
|
||||
align="center"
|
||||
prop="waterElectricityCost"
|
||||
/>
|
||||
</el-table>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</template>
|
||||
<script setup>
|
||||
import { treeRegionLevel, getData } from "@/api/renovation/scheme/discharge";
|
||||
import { list } from "@/api/renovation/scheme/capacity";
|
||||
import { list as equipmentEnergyConsumptionList } from "@/api/renovation/scheme/equipmentEnergyConsumption";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { coliform_removal, technical_plan_type,packing_method } = proxy.useDict(
|
||||
"coliform_removal",
|
||||
"technical_plan_type","packing_method"
|
||||
);
|
||||
|
||||
const props = defineProps({
|
||||
modelValue: {
|
||||
type: Object,
|
||||
default: () => {
|
||||
return {
|
||||
planId: null,
|
||||
};
|
||||
},
|
||||
},
|
||||
citytype:{
|
||||
type: Array,
|
||||
default: () => {
|
||||
return [];
|
||||
},
|
||||
}
|
||||
});
|
||||
|
||||
const form = ref({
|
||||
waterIn: null,
|
||||
waterQualityStandardId: null,
|
||||
coliformRemoval: null,
|
||||
equipmentParamId: null,
|
||||
});
|
||||
|
||||
const inletlist = ref([
|
||||
{
|
||||
name: "CODcr",
|
||||
value: "250~400",
|
||||
},
|
||||
{
|
||||
name: "NH3-N",
|
||||
value: "30~50",
|
||||
},
|
||||
{
|
||||
name: "TN",
|
||||
value: "40~65",
|
||||
},
|
||||
{
|
||||
name: "TP",
|
||||
value: "2.5~5.0",
|
||||
},
|
||||
{
|
||||
name: "SS",
|
||||
value: "100~200",
|
||||
},
|
||||
{
|
||||
name: "PH",
|
||||
value: "6~9",
|
||||
},
|
||||
]);
|
||||
const outletlist = ref([]);
|
||||
const tonnageData = ref([]);
|
||||
|
||||
const tableDevice = ref([]);
|
||||
const tableDict = ref([]);
|
||||
const devicelist = ref([]);
|
||||
const cityValue = ref([]);
|
||||
const dataList = ref([]);
|
||||
const citytype = ref(proxy.citytype)
|
||||
console.log(proxy.modelValue);
|
||||
function watchData(){
|
||||
watch(
|
||||
() => proxy.modelValue.planId,
|
||||
|
||||
(newval, oldval) => {
|
||||
if (newval) {
|
||||
let newForm = proxy.modelValue;
|
||||
debugger
|
||||
citytype.value.forEach((element) => {
|
||||
let val = element.children.filter(
|
||||
(item) => newForm.waterQualityStandardId == item.value
|
||||
);
|
||||
if (val.length > 0) {
|
||||
cityValue.value = [element.label, val[0].value];
|
||||
handleChange(cityValue.value);
|
||||
}
|
||||
});
|
||||
|
||||
form.value.equipmentParamId = newForm.equipmentDetail.map((item) => {
|
||||
return item?.capacityId;
|
||||
});
|
||||
|
||||
changeSelect(form.value.equipmentParamId);
|
||||
form.value.coliformRemoval = newForm.coliformRemoval;
|
||||
form.value.packingMethod =newForm.packingMethod
|
||||
} else {
|
||||
rest();
|
||||
}
|
||||
},
|
||||
{ immediate: true }
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
async function handleChange(params) {
|
||||
console.log(params);
|
||||
outletlist.value = [];
|
||||
let data = await getData(params[1]);
|
||||
form.value.waterQualityStandardId = params[1];
|
||||
const keyValue = [
|
||||
"standardId",
|
||||
"basisDoc",
|
||||
"createBy",
|
||||
"createTime",
|
||||
"level",
|
||||
"region",
|
||||
"updateBy",
|
||||
"updateTime",
|
||||
];
|
||||
for (let item in data.data) {
|
||||
if (!keyValue.includes(item)) {
|
||||
outletlist.value.push({
|
||||
name: item,
|
||||
value: data.data[item],
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
function changeSelect(value) {
|
||||
|
||||
console.log(devicelist.value);
|
||||
dataList.value = [];
|
||||
dataList.value = devicelist.value.filter((item) =>
|
||||
value.includes(item.capacityId)
|
||||
);
|
||||
}
|
||||
|
||||
const objectSpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
if (columnIndex === 0 || columnIndex > 5) {
|
||||
if (rowIndex % 2 === 0) {
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1,
|
||||
};
|
||||
} else {
|
||||
return {
|
||||
rowspan: 0,
|
||||
colspan: 0,
|
||||
};
|
||||
}
|
||||
}
|
||||
};
|
||||
async function getList() {
|
||||
let data = await list();
|
||||
let equipData =await equipmentEnergyConsumptionList();
|
||||
devicelist.value = equipData.rows;
|
||||
|
||||
|
||||
tonnageData.value = data.data.map((item, index) => {
|
||||
return {
|
||||
value: item.capacityId,
|
||||
label: item.capacityTonnage + "吨",
|
||||
};
|
||||
});
|
||||
watchData()
|
||||
}
|
||||
function rest() {
|
||||
form.value = {
|
||||
waterIn: null,
|
||||
waterQualityStandardId: null,
|
||||
coliformRemoval: null,
|
||||
equipmentParamId: null,
|
||||
};
|
||||
dataList.value = [];
|
||||
}
|
||||
function handleSubmit() {
|
||||
form.value.waterIn = inletlist.value.reduce((obj, item) => {
|
||||
obj[item.name] = item.value;
|
||||
return obj;
|
||||
}, {});
|
||||
form.value.equipmentDetail = dataList.value;
|
||||
return form.value;
|
||||
}
|
||||
defineExpose({
|
||||
handleSubmit,
|
||||
rest,
|
||||
});
|
||||
onMounted(() => {
|
||||
getList();
|
||||
|
||||
});
|
||||
</script>
|
||||
<style scope>
|
||||
.borderBt {
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
padding: 0 0 4px;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,728 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAddCap"
|
||||
>新增吨位</el-button
|
||||
>
|
||||
</div>
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="deptOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
ref="deptTreeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
style="height: 85vh; overflow-y: scroll"
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="设备名称" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.equipmentName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="类型" prop="status">
|
||||
<el-select
|
||||
v-model="queryParams.equipmentType"
|
||||
placeholder="设备类型"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in equipment_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button type="primary" plain icon="Plus" @click="handDeviceAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
style="margin-top: 20px"
|
||||
border
|
||||
:data="deviceList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column
|
||||
label="序号"
|
||||
type="index"
|
||||
width="55"
|
||||
align="center"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="equipmentName"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="设备尺寸"
|
||||
align="center"
|
||||
prop="equipmentSize"
|
||||
/>
|
||||
<el-table-column label="设备类型" align="center" prop="equipmentType">
|
||||
<template #default="scope">
|
||||
{{
|
||||
equipment_type.filter(
|
||||
(item) => item.value == scope.row.equipmentType
|
||||
)[0].label
|
||||
}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="250px"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleExit(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleSet(scope.row)"
|
||||
>配置</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDeviceDelete(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<el-dialog :title="title" v-model="open" width="50%" append-to-body>
|
||||
<el-button type="primary" plain icon="Plus" @click="handleAdd"
|
||||
>新增</el-button
|
||||
>
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
style="margin-top: 20px"
|
||||
border
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="主要设备" align="center" prop="componentName" />
|
||||
|
||||
<el-table-column
|
||||
label="参数"
|
||||
show-overflow-tooltip
|
||||
align="center"
|
||||
prop="param"
|
||||
/>
|
||||
<el-table-column label="数量" align="center" prop="quantity" />
|
||||
<el-table-column label="单位" align="center" prop="quantity" >
|
||||
<template #default="scope">
|
||||
|
||||
{{equipment_component_unit.filter(item=>item.value==scope.row.unit)[0].label}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column label="品牌" align="center" prop="componentBrand" >
|
||||
<template #default="scope">
|
||||
|
||||
{{equipment_component_brand.filter(item=>item.value==scope.row.componentBrand)[0].label}}
|
||||
</template>
|
||||
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="备注"
|
||||
align="center"
|
||||
prop="remark"
|
||||
show-overflow-tooltip
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150px"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleComSet(scope.row)"
|
||||
>编辑</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDeleteCom(scope.row)"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" v-model="openDist" width="30%" append-to-body>
|
||||
<el-form :model="form" ref="deviceComRef" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="主要设备">
|
||||
<el-input
|
||||
v-model="form.componentName"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="参数">
|
||||
<el-input
|
||||
v-model="form.param"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="组件类型">
|
||||
<el-select
|
||||
v-model="form.componentType"
|
||||
placeholder="组件类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in equipment_component_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="单位">
|
||||
<el-select
|
||||
v-model="form.unit"
|
||||
placeholder="品牌"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in equipment_component_unit"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="数量">
|
||||
<el-input
|
||||
v-model="form.quantity"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="品牌">
|
||||
<el-select
|
||||
v-model="form.componentBrand"
|
||||
placeholder="品牌"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in equipment_component_brand"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="备注">
|
||||
<el-input
|
||||
v-model="form.remark"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitComponent">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" v-model="openExit" width="30%" append-to-body>
|
||||
<el-form :model="form" ref="deviceRef" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="设备名称">
|
||||
<el-input
|
||||
v-model="form.equipmentName"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备尺寸">
|
||||
<el-input
|
||||
v-model="form.equipmentSize"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理量">
|
||||
<el-select
|
||||
v-model="form.capacityIds"
|
||||
multiple
|
||||
placeholder="设备类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in deptOptions[0].children"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备类型">
|
||||
<el-select
|
||||
v-model="form.equipmentType"
|
||||
placeholder="设备类型"
|
||||
clearable
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="dict in equipment_type"
|
||||
:key="dict.value"
|
||||
:label="dict.label"
|
||||
:value="dict.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" v-model="openCapacity" width="30%" append-to-body>
|
||||
<el-form :model="form" ref="deviceCap" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="吨位">
|
||||
<el-input
|
||||
v-model="form.capacityTonnage"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitCapacity">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="porfiles">
|
||||
import {
|
||||
list as equipmentList,
|
||||
postData as equipmentpos,
|
||||
putData as equipmentput,
|
||||
deleteData as equipmentdelete,
|
||||
} from "@/api/renovation/scheme/equipment";
|
||||
import {
|
||||
list as equipmentComponentList,
|
||||
postData as equipmentComponentpos,
|
||||
putData as equipmentComponentput,
|
||||
deleteData as equipmentComponentdelete,
|
||||
} from "@/api/renovation/scheme/equipmentComponent";
|
||||
import {
|
||||
list,
|
||||
postData,
|
||||
putData,
|
||||
deleteData,
|
||||
} from "@/api/renovation/scheme/capacity";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { equipment_component_brand, equipment_type,equipment_component_type,equipment_component_unit } = proxy.useDict(
|
||||
"equipment_component_brand",
|
||||
"equipment_type",
|
||||
"equipment_component_type",
|
||||
"equipment_component_unit"
|
||||
);
|
||||
|
||||
const showDetail = ref(false);
|
||||
const backCall = () => {
|
||||
if (!document.startViewTransition) {
|
||||
showDetail.value = false;
|
||||
return;
|
||||
}
|
||||
document.startViewTransition(() => (showDetail.value = false));
|
||||
getList();
|
||||
// showDetail.value = false
|
||||
};
|
||||
const data = reactive({
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
openCapacity: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
openExit: false,
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
deptOptions: [
|
||||
{
|
||||
label: "全部吨位",
|
||||
value: "0",
|
||||
children: [],
|
||||
},
|
||||
],
|
||||
// 总条数
|
||||
total: 0,
|
||||
dataList: [],
|
||||
// 图层管理表格数据
|
||||
deviceList: [],
|
||||
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
openDist: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
createBy: undefined,
|
||||
layersId: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
});
|
||||
const input = ref("");
|
||||
const {
|
||||
open,
|
||||
dataList,
|
||||
showSearch,
|
||||
schemetype,
|
||||
queryParams,
|
||||
form,
|
||||
deptOptions,
|
||||
ids,
|
||||
openExit,
|
||||
title,
|
||||
openDist,
|
||||
deviceList,
|
||||
openCapacity,
|
||||
total,
|
||||
multiple,
|
||||
single,
|
||||
loading,
|
||||
|
||||
buttonLoading,
|
||||
} = toRefs(data);
|
||||
function submitCapacity() {
|
||||
proxy.$refs["deviceCap"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.capacityId != undefined) {
|
||||
putData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
openCapacity.value = false;
|
||||
getcapacityList();
|
||||
});
|
||||
} else {
|
||||
postData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
openCapacity.value = false;
|
||||
getcapacityList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function submitComponent() {
|
||||
proxy.$refs["deviceComRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.componentId != undefined) {
|
||||
equipmentComponentput(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
openDist.value = false;
|
||||
handleSet();
|
||||
});
|
||||
} else {
|
||||
equipmentComponentpos(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
openDist.value = false;
|
||||
handleSet();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
function cancel() {
|
||||
openDist.value = false;
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["deviceRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.equipmentId != undefined) {
|
||||
equipmentput(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
openExit.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
equipmentpos(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
openExit.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
function handDeviceAdd() {
|
||||
title.value = "添加";
|
||||
form.value = {};
|
||||
openExit.value = true;
|
||||
}
|
||||
function handleAdd() {
|
||||
title.value = "添加";
|
||||
form.value = {
|
||||
equipmentId: equipmentId.value,
|
||||
};
|
||||
openDist.value = true;
|
||||
}
|
||||
function handleAddCap() {
|
||||
title.value = "添加";
|
||||
form.value = {};
|
||||
openCapacity.value = true;
|
||||
}
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
paramId: undefined,
|
||||
};
|
||||
proxy.resetForm("applyRef");
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleDeviceAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加";
|
||||
}
|
||||
|
||||
function handleDeleteCom(row) {
|
||||
const componentName = row.componentName;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除设备为"' + componentName + '"的数据项?')
|
||||
.then(function () {
|
||||
return equipmentComponentdelete(row.componentId);
|
||||
})
|
||||
.then(() => {
|
||||
handleSet();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDeviceDelete(row) {
|
||||
const equipmentName = row.equipmentName;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除名称为"' + equipmentName + '"的数据项?')
|
||||
.then(function () {
|
||||
return equipmentdelete(row.equipmentId);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const level = row.processingCapacity;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除处理量为"' + level + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteData(row.paramId);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
//详情
|
||||
const arrSite = ref([]);
|
||||
const planData = ref({});
|
||||
|
||||
function handleComSet(row) {
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
openDist.value = true;
|
||||
}
|
||||
|
||||
const equipmentId = ref(null);
|
||||
function handleSet(row) {
|
||||
row && (equipmentId.value = row.equipmentId);
|
||||
equipmentComponentList({ equipmentId: equipmentId.value }).then((res) => {
|
||||
title.value = "编辑";
|
||||
dataList.value = res.rows;
|
||||
form.value = {};
|
||||
form.value.equipmentId = equipmentId.value;
|
||||
open.value = true;
|
||||
});
|
||||
}
|
||||
|
||||
async function handleExit(row) {
|
||||
title.value = "编辑";
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
openExit.value = true;
|
||||
}
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
|
||||
function handleNodeClick(e) {
|
||||
queryParams.value.capacityId = e.value==0?null:e.value;
|
||||
getList();
|
||||
}
|
||||
/** 查询理列表 */
|
||||
function getList() {
|
||||
// loading.value = false;
|
||||
loading.value = true;
|
||||
equipmentList(queryParams.value).then((response) => {
|
||||
deviceList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
function getcapacityList() {
|
||||
list().then((response) => {
|
||||
let data = response.data.map((item) => {
|
||||
return {
|
||||
label: item.capacityTonnage + " 吨",
|
||||
value: item.capacityId,
|
||||
};
|
||||
});
|
||||
deptOptions.value[0].children = data;
|
||||
deviceList.value = response.rows;
|
||||
|
||||
getList();
|
||||
});
|
||||
}
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryForm");
|
||||
}
|
||||
function handleQuery() {
|
||||
getList();
|
||||
}
|
||||
getcapacityList();
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.fade-enter-active {
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
.fade-leave-active {
|
||||
transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
transform: translateX(-120px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.detail-enter-active,
|
||||
.detail-leave-active {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
.detail-enter-from,
|
||||
.detail-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.borderBt {
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
padding: 0 0 4px;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,357 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-row :gutter="20">
|
||||
<!--部门数据-->
|
||||
<el-col :span="4" :xs="24">
|
||||
<div class="head-container">
|
||||
<el-tree
|
||||
:data="deptOptions"
|
||||
:props="{ label: 'label', children: 'children' }"
|
||||
:expand-on-click-node="false"
|
||||
|
||||
ref="deptTreeRef"
|
||||
node-key="id"
|
||||
highlight-current
|
||||
default-expand-all
|
||||
style="height: 85vh; overflow-y: scroll"
|
||||
@node-click="handleNodeClick"
|
||||
/>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--用户数据-->
|
||||
<el-col :span="20" :xs="24">
|
||||
<el-row :gutter="10" class="mb8">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
:data="standardList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
|
||||
<el-table-column label="检测指标" align="center" prop="level" />
|
||||
<el-table-column
|
||||
label="COD(mg/L)"
|
||||
align="center"
|
||||
prop="cod"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="BOD(mg/L)"
|
||||
align="center"
|
||||
prop="bod"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="SS(mg/L)"
|
||||
align="center"
|
||||
prop="ss"
|
||||
:show-overflow-tooltip="true"
|
||||
/>
|
||||
<el-table-column
|
||||
label="氨氮(mg/L)"
|
||||
align="center"
|
||||
prop="nh3"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="总氮(mg/L)"
|
||||
align="center"
|
||||
prop="tn"
|
||||
width="120"
|
||||
/>
|
||||
|
||||
<el-table-column
|
||||
label="总磷(mg/L)"
|
||||
align="center"
|
||||
prop="tp"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="PH"
|
||||
align="center"
|
||||
prop="ph"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="动植物油(mg/L)"
|
||||
align="center"
|
||||
prop="animalVegetableOil"
|
||||
width="120"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-tooltip content="修改" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleUpdate(scope.row)"
|
||||
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
<el-tooltip content="删除" placement="top">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
></el-button>
|
||||
</el-tooltip>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
<!-- 添加或修改配置对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="600px" append-to-body>
|
||||
<el-form :model="form" :rules="rules" ref="waterRef" label-width="100px">
|
||||
<el-form-item label="出水标准">
|
||||
<el-input v-model="form.region" placeholder="请输入" disabled />
|
||||
</el-form-item>
|
||||
<el-form-item label="依据文件名">
|
||||
<el-input v-model="form.basisDoc" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="检测指标">
|
||||
<el-input v-model="form.level" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="COD">
|
||||
<el-input v-model="form.cod" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="BOD">
|
||||
<el-input v-model="form.bod" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="SS">
|
||||
<el-input v-model="form.ss" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="氨氮NH3-N">
|
||||
<el-input v-model="form.nh3" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总氮">
|
||||
<el-input v-model="form.tn" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="总磷">
|
||||
<el-input v-model="form.tp" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="PH">
|
||||
<el-input v-model="form.ph" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
<el-form-item label="动植物油">
|
||||
<el-input v-model="form.animalVegetableOil" placeholder="请输入" />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="Discharge">
|
||||
import city from "./city.json";
|
||||
import {
|
||||
list,
|
||||
postData,
|
||||
putData,
|
||||
deleteData,
|
||||
} from "@/api/renovation/scheme/discharge";
|
||||
|
||||
const { proxy } = getCurrentInstance();
|
||||
const loading = ref();
|
||||
|
||||
const data = reactive({
|
||||
form: {},
|
||||
showSearch: false,
|
||||
total: "",
|
||||
title: "",
|
||||
standardList: [],
|
||||
deptOptions: [],
|
||||
multiple: true,
|
||||
single: true,
|
||||
open: false,
|
||||
ids:[],
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
region: city[0].children[0].label,
|
||||
},
|
||||
rules: {},
|
||||
});
|
||||
|
||||
const {
|
||||
queryParams,
|
||||
form,
|
||||
ids,
|
||||
rules,
|
||||
standardList,
|
||||
total,
|
||||
single,
|
||||
showSearch,
|
||||
deptOptions,
|
||||
title,
|
||||
open,
|
||||
multiple,
|
||||
} = toRefs(data);
|
||||
|
||||
|
||||
|
||||
function getDeptTree() {
|
||||
deptOptions.value = city;
|
||||
}
|
||||
/** 查询列表 */
|
||||
function getList() {
|
||||
loading.value = true;
|
||||
list(proxy.addDateRange(queryParams.value)).then((res) => {
|
||||
loading.value = false;
|
||||
standardList.value = res.rows;
|
||||
total.value = res.total;
|
||||
});
|
||||
}
|
||||
/** 节点单击事件 */
|
||||
function handleNodeClick(data) {
|
||||
console.log(data);
|
||||
|
||||
queryParams.value.region =data.id==101?data.children[0].label: data.label;
|
||||
handleQuery();
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const level = row.level ;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除指标为"' + level + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteData(row.standardId);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
/** 导出按钮操作 */
|
||||
function handleExport() {
|
||||
proxy.download(
|
||||
"system/user/export",
|
||||
{
|
||||
...queryParams.value,
|
||||
},
|
||||
`user_${new Date().getTime()}.xlsx`
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
/** 选择条数 */
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.userId);
|
||||
single.value = selection.length != 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 导入按钮操作 */
|
||||
function handleImport() {
|
||||
upload.title = "用户导入";
|
||||
upload.open = true;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 重置操作表单 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
standardId: "",
|
||||
region: "",
|
||||
basisDoc: "",
|
||||
level: "",
|
||||
cod: "",
|
||||
bod: "",
|
||||
ss: "",
|
||||
nh3: "",
|
||||
tn: "",
|
||||
tp: "",
|
||||
ph: "",
|
||||
animalVegetableOil: "",
|
||||
};
|
||||
proxy.resetForm("waterRef");
|
||||
}
|
||||
/** 取消按钮 */
|
||||
function cancel() {
|
||||
open.value = false;
|
||||
reset();
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
title.value = "添加数据";
|
||||
form.value.region = queryParams.value.region;
|
||||
open.value = true;
|
||||
}
|
||||
/** 修改按钮操作 */
|
||||
function handleUpdate(row) {
|
||||
reset();
|
||||
open.value = true;
|
||||
form.region = queryParams.value.region;
|
||||
form.value = JSON.parse(JSON.stringify(row));
|
||||
title.value = "修改用户";
|
||||
}
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["waterRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
if (form.value.standardId != '') {
|
||||
putData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
} else {
|
||||
postData(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("新增成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
getDeptTree();
|
||||
getList();
|
||||
</script>
|
|
@ -0,0 +1,372 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<transition name="fade">
|
||||
<div :gutter="20" v-if="!showDetail">
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryRef"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
<el-form-item label="设备名称" prop="userName">
|
||||
<el-input
|
||||
v-model="queryParams.equipmentName"
|
||||
placeholder="请输入设备名称"
|
||||
clearable
|
||||
style="width: 240px"
|
||||
@keyup.enter="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
style="margin-top: 20px"
|
||||
border
|
||||
:data="dataList"
|
||||
@selection-change="handleSelectionChange"
|
||||
>
|
||||
<el-table-column label="序号" type="index" width="55" align="center" />
|
||||
|
||||
<el-table-column
|
||||
label="设备名称"
|
||||
align="center"
|
||||
prop="processingCapacity"
|
||||
>
|
||||
<template #default="scope">
|
||||
{{scope.row.equipment.equipmentName}}
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="处理量" align="center" prop="capacityTonnage" />
|
||||
<el-table-column label="水泵参数" align="center" prop="pumpParam" />
|
||||
<el-table-column
|
||||
label="水泵数量"
|
||||
align="center"
|
||||
prop="pumpQuantity"
|
||||
/>
|
||||
<el-table-column label="气泵参数" align="center" prop="fanParam" />
|
||||
<el-table-column label="风机数量" align="center" prop="fanQuantity" />
|
||||
|
||||
<el-table-column label="主要动力设备" align="center" prop="11">
|
||||
<div class="borderBt">水泵</div>
|
||||
<div>风机</div>
|
||||
</el-table-column>
|
||||
<el-table-column label="运行时间" align="center" prop="11">
|
||||
<template #default="scope">
|
||||
<div class="borderBt">{{ scope.row.pumpRuntime }}</div>
|
||||
<div>{{ scope.row.fanRuntime }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
|
||||
<el-table-column label="装机功率" align="center" prop="11">
|
||||
<template #default="scope">
|
||||
<div class="borderBt">{{ scope.row.pumpInstalledPower }}</div>
|
||||
<div>{{ scope.row.fanInstalledPower }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="日均电耗" align="center" prop="11">
|
||||
<template #default="scope">
|
||||
<div class="borderBt">{{ scope.row.pumpDailyConsumption }}</div>
|
||||
<div>{{ scope.row.fanDailyConsumption }}</div>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="日总电耗"
|
||||
align="center"
|
||||
prop="totalDailyConsumption"
|
||||
/>
|
||||
<el-table-column
|
||||
label="日吨水总电耗"
|
||||
align="center"
|
||||
prop="waterElectricityCost"
|
||||
/>
|
||||
<el-table-column
|
||||
label="吨水电费"
|
||||
align="center"
|
||||
prop="waterElectricityCost"
|
||||
/>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
width="150px"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleOpen(scope.row)"
|
||||
>运行时间</el-button
|
||||
>
|
||||
<!-- <el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
>删除</el-button
|
||||
> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="30%" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="deviceRef"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="水泵运行时间" prop="nickName">
|
||||
<el-input
|
||||
v-model="form.pumpRuntime"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="风机运行时间" prop="nickName">
|
||||
<el-input
|
||||
v-model="form.fanRuntime"
|
||||
placeholder="请输入"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submitForm">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="porfiles" >
|
||||
import { list, postData, putData ,deleteData,updateComponentRunTime} from "@/api/renovation/scheme/equipmentEnergyConsumption";
|
||||
const { proxy } = getCurrentInstance();
|
||||
|
||||
const showDetail = ref(false);
|
||||
const backCall = () => {
|
||||
if (!document.startViewTransition) {
|
||||
showDetail.value = false;
|
||||
return;
|
||||
}
|
||||
document.startViewTransition(() => (showDetail.value = false));
|
||||
getList();
|
||||
// showDetail.value = false
|
||||
};
|
||||
const data = reactive({
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 图层管理表格数据
|
||||
dataList: [],
|
||||
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
createBy: undefined,
|
||||
layersId: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
});
|
||||
const input = ref("");
|
||||
const {
|
||||
open,
|
||||
|
||||
showSearch,
|
||||
schemetype,
|
||||
queryParams,
|
||||
form,
|
||||
ids,
|
||||
title,
|
||||
|
||||
dataList,
|
||||
|
||||
total,
|
||||
multiple,
|
||||
single,
|
||||
loading,
|
||||
|
||||
buttonLoading,
|
||||
} = toRefs(data);
|
||||
|
||||
/** 提交按钮 */
|
||||
function submitForm() {
|
||||
proxy.$refs["deviceRef"].validate((valid) => {
|
||||
if (valid) {
|
||||
|
||||
updateComponentRunTime(form.value).then((response) => {
|
||||
proxy.$modal.msgSuccess("修改成功");
|
||||
open.value = false;
|
||||
getList();
|
||||
});
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
paramId: undefined,
|
||||
};
|
||||
proxy.resetForm("applyRef");
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加";
|
||||
}
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const level = row.processingCapacity ;
|
||||
proxy.$modal
|
||||
.confirm('是否确认删除处理量为"' + level + '"的数据项?')
|
||||
.then(function () {
|
||||
return deleteData(row.paramId);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
//详情
|
||||
const arrSite = ref([]);
|
||||
const planData = ref({});
|
||||
async function handleOpen(row) {
|
||||
title.value = "编辑";
|
||||
form.value = {
|
||||
consumptionId:row.consumptionId,
|
||||
"pumpRuntime": row.pumpRuntime,
|
||||
"fanRuntime": row.fanRuntime
|
||||
}
|
||||
debugger
|
||||
open.value = true;
|
||||
|
||||
}
|
||||
function handleQuery(){
|
||||
getList()
|
||||
}
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 查询理列表 */
|
||||
function getList() {
|
||||
// loading.value = false;
|
||||
loading.value = true;
|
||||
list(queryParams.value).then((response) => {
|
||||
dataList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
|
||||
getList();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.fade-enter-active {
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
.fade-leave-active {
|
||||
transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
transform: translateX(-120px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.detail-enter-active,
|
||||
.detail-leave-active {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
.detail-enter-from,
|
||||
.detail-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
.borderBt {
|
||||
border-bottom: 1px solid #ebeef5;
|
||||
padding: 0 0 4px;
|
||||
margin: 5px;
|
||||
}
|
||||
</style>
|
|
@ -0,0 +1,534 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<transition name="fade">
|
||||
<div :gutter="20" v-if="!showDetail">
|
||||
<el-row :gutter="10">
|
||||
<el-form
|
||||
:model="queryParams"
|
||||
ref="queryForm"
|
||||
:inline="true"
|
||||
v-show="showSearch"
|
||||
label-width="68px"
|
||||
>
|
||||
|
||||
<el-form-item label ="方案名称" prop="layerName">
|
||||
<el-input
|
||||
v-model="queryParams.planName"
|
||||
placeholder="请输入方案"
|
||||
clearable
|
||||
@keyup.enter.native="handleQuery"
|
||||
/>
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item>
|
||||
<el-button type="primary" icon="Search" @click="handleQuery"
|
||||
>搜索</el-button
|
||||
>
|
||||
<el-button icon="Refresh" @click="resetQuery">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="10">
|
||||
<el-col :span="1.5">
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
icon="Plus"
|
||||
@click="handleAdd"
|
||||
|
||||
>新增</el-button
|
||||
>
|
||||
</el-col>
|
||||
|
||||
|
||||
<right-toolbar
|
||||
v-model:showSearch="showSearch"
|
||||
@queryTable="getList"
|
||||
></right-toolbar>
|
||||
</el-row>
|
||||
|
||||
<el-table
|
||||
v-loading="loading"
|
||||
style="margin-top: 20px"
|
||||
:data="dataList"
|
||||
|
||||
>
|
||||
<el-table-column type="index" label="序号" width="55" align="center" />
|
||||
<el-table-column label="公司名称" align="center" prop="companyName" />
|
||||
<el-table-column label="方案名称" align="center" prop="planName" />
|
||||
|
||||
<el-table-column label="创建时间" align="center" prop="createTime" />
|
||||
|
||||
<el-table-column
|
||||
label="操作"
|
||||
align="center"
|
||||
class-name="small-padding fixed-width"
|
||||
>
|
||||
<template #default="scope">
|
||||
<el-button
|
||||
link
|
||||
type="primary"
|
||||
icon="Edit"
|
||||
@click="handleExit(scope.row)"
|
||||
>修改</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="warning"
|
||||
icon="Download"
|
||||
@click="handleOpen(scope.row)"
|
||||
>导出</el-button
|
||||
>
|
||||
<el-button
|
||||
link
|
||||
type="danger"
|
||||
icon="Delete"
|
||||
@click="handleDelete(scope.row)"
|
||||
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
<pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
v-model:page="queryParams.pageNum"
|
||||
v-model:limit="queryParams.pageSize"
|
||||
@pagination="getList"
|
||||
/>
|
||||
|
||||
<!-- 添加或修改公告对话框 -->
|
||||
<el-dialog :title="title" v-model="open" width="70%" append-to-body>
|
||||
<el-form
|
||||
:model="form"
|
||||
:rules="rules"
|
||||
ref="applyRef"
|
||||
label-width="100px"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="公司名称" >
|
||||
<el-input
|
||||
v-model="form.companyName"
|
||||
placeholder="公司名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="方案名称" >
|
||||
<el-input
|
||||
v-model="form.planName"
|
||||
placeholder="方案名称"
|
||||
maxlength="30"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="方案时间" >
|
||||
<el-date-picker
|
||||
v-model="form.planTime"
|
||||
type="month"
|
||||
style="width: 100%"
|
||||
placeholder="方案时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="24">
|
||||
<el-form-item label="方案类型" >
|
||||
<el-select
|
||||
v-model="form.planType"
|
||||
placeholder="选择类型"
|
||||
style="width: 100%"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in technical_plan_type"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
<scsb ref="scsbRef" :citytype="citytype" v-model="formValue"></scsb>
|
||||
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<div class="dialog-footer">
|
||||
<el-button type="primary" @click="submit">确 定</el-button>
|
||||
<el-button @click="cancel">取 消</el-button>
|
||||
</div>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</div>
|
||||
</transition>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup name="porfiles">
|
||||
import {
|
||||
list,
|
||||
postData,
|
||||
putData,
|
||||
deleteData
|
||||
} from "@/api/renovation/scheme/index";
|
||||
import {
|
||||
treeRegionLevel,
|
||||
|
||||
} from "@/api/renovation/scheme/discharge";
|
||||
const { proxy } = getCurrentInstance();
|
||||
const { technical_plan_type } = proxy.useDict("technical_plan_type");
|
||||
import scsb from './compant/SCSB'
|
||||
const showDetail = ref(false);
|
||||
const backCall = () => {
|
||||
if (!document.startViewTransition) {
|
||||
showDetail.value = false;
|
||||
return;
|
||||
}
|
||||
document.startViewTransition(() => (showDetail.value = false));
|
||||
getList();
|
||||
// showDetail.value = false
|
||||
};
|
||||
const rules = ref([])
|
||||
const data = reactive({
|
||||
// 按钮loading
|
||||
buttonLoading: false,
|
||||
// 遮罩层
|
||||
loading: false,
|
||||
// 选中数组
|
||||
ids: [],
|
||||
// 非单个禁用
|
||||
single: true,
|
||||
// 非多个禁用
|
||||
multiple: true,
|
||||
// 显示搜索条件
|
||||
showSearch: true,
|
||||
tableDevice: [
|
||||
{
|
||||
name: "10",
|
||||
waterDict: "Q=9m3/h;H=5m;P=0.25kW;220V",
|
||||
waterNum: "2",
|
||||
airDict: "150L/min;P=0.115kW;220V",
|
||||
airNum: "1",
|
||||
},
|
||||
{
|
||||
name: "20",
|
||||
waterDict: "Q=9m3/h;H=5m;P=0.25kW;220V",
|
||||
waterNum: "2",
|
||||
airDict: "150L/min;P=0.115kW;220V",
|
||||
airNum: "1",
|
||||
},
|
||||
],
|
||||
tableDict: [
|
||||
{
|
||||
name: "10",
|
||||
device: "水泵",
|
||||
yxsj: "3",
|
||||
taishu: "1",
|
||||
zhuangjigl: "0.5",
|
||||
rijdh: "0.75",
|
||||
rzdh: "3.25",
|
||||
rduzdkh: "0.325",
|
||||
dshuidf: "0.124",
|
||||
},
|
||||
{
|
||||
name: "10",
|
||||
device: "风机",
|
||||
yxsj: "22",
|
||||
taishu: "33",
|
||||
zhuangjigl: "0.15",
|
||||
rijdh: "3.75",
|
||||
rzdh: "3.25",
|
||||
rduzdkh: "0.325",
|
||||
dshuidf: "0.124",
|
||||
},
|
||||
{
|
||||
name: "20",
|
||||
device: "水泵",
|
||||
yxsj: "6",
|
||||
taishu: "1",
|
||||
zhuangjigl: "0.5",
|
||||
rijdh: "0.75",
|
||||
rzdh: "4.25",
|
||||
rduzdkh: "0.202",
|
||||
dshuidf: "0.967",
|
||||
},
|
||||
{
|
||||
name: "20",
|
||||
device: "风机",
|
||||
yxsj: "22",
|
||||
taishu: "33",
|
||||
zhuangjigl: "0.15",
|
||||
rijdh: "3.75",
|
||||
rzdh: "4.25",
|
||||
rduzdkh: "0.202",
|
||||
dshuidf: "0.622",
|
||||
},
|
||||
],
|
||||
// 总条数
|
||||
total: 0,
|
||||
// 图层管理表格数据
|
||||
dataList: [
|
||||
|
||||
],
|
||||
citytype:[],
|
||||
|
||||
|
||||
|
||||
title: "",
|
||||
// 是否显示弹出层
|
||||
open: false,
|
||||
// 查询参数
|
||||
queryParams: {
|
||||
pageNum: 1,
|
||||
pageSize: 10,
|
||||
createBy: undefined,
|
||||
layersId: undefined,
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
// 表单校验
|
||||
});
|
||||
const scsbRef = ref()
|
||||
const input = ref("");
|
||||
const {
|
||||
open,
|
||||
tableDevice,
|
||||
showSearch,
|
||||
schemetype,
|
||||
queryParams,
|
||||
form,
|
||||
ids,
|
||||
title,
|
||||
tonnageData,
|
||||
dataList,
|
||||
citytype,
|
||||
total,
|
||||
multiple,
|
||||
single,
|
||||
loading,
|
||||
planList,
|
||||
tableDict,
|
||||
inletlist,
|
||||
buttonLoading,
|
||||
} = toRefs(data);
|
||||
const planDialog = ref("");
|
||||
const applyDialog = ref(false);
|
||||
const layerName = ref();
|
||||
|
||||
|
||||
const arraySpanMethod = ({ row, column, rowIndex, columnIndex }) => {
|
||||
if (rowIndex % 2 === 0) {
|
||||
if (columnIndex === 0) {
|
||||
return [1, 2];
|
||||
} else if (columnIndex === 1) {
|
||||
return [0, 0];
|
||||
}
|
||||
}
|
||||
};
|
||||
const filterMethod = (query, item) => {
|
||||
return item.initial.toLowerCase().includes(query.toLowerCase());
|
||||
};
|
||||
const handleExcel = (item) => {
|
||||
excel(item.planId);
|
||||
proxy.download(
|
||||
"/renovationPlan/export/excel",
|
||||
{
|
||||
planId: item.planId,
|
||||
},
|
||||
`${item.planName}.xlsx`,
|
||||
{
|
||||
baseURL: "/plan-api",
|
||||
}
|
||||
);
|
||||
};
|
||||
const handleWorld = (item) => {
|
||||
excel(item.planId);
|
||||
proxy.download(
|
||||
"/renovationPlan/export/word",
|
||||
{
|
||||
planId: item.planId,
|
||||
},
|
||||
`${item.planName}.docx`,
|
||||
{
|
||||
baseURL: "/plan-api",
|
||||
}
|
||||
);
|
||||
};
|
||||
function cancel(){
|
||||
open.value = false;
|
||||
}
|
||||
/** 表单重置 */
|
||||
function reset() {
|
||||
form.value = {
|
||||
"planName": "",
|
||||
"planType": "",
|
||||
"planTime": '',
|
||||
"companyName":''
|
||||
};
|
||||
|
||||
proxy.resetForm("applyRef");
|
||||
}
|
||||
const formValue = ref({})
|
||||
function handleExit(row){
|
||||
reset();
|
||||
|
||||
|
||||
open.value = true;
|
||||
title.value = "编辑方案";
|
||||
form.value ={
|
||||
planId: row.planId,
|
||||
planTime:new Date(parseInt(row.planTime.toString().substring(0,4)), parseInt(row.planTime.toString().substring(4)) - 1),//row.planTime.toString().substring(0,4)+'-'+row.planTime.toString().substring(4),
|
||||
planType:row.planType,
|
||||
planName:row.planName,
|
||||
companyName:row.companyName
|
||||
}
|
||||
|
||||
formValue.value= JSON.parse(JSON.stringify(row));
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
|
||||
open.value = true;
|
||||
formValue.value={planId:null}
|
||||
title.value = "添加方案";
|
||||
}
|
||||
//详情
|
||||
const arrSite = ref([]);
|
||||
const planData = ref({});
|
||||
async function handleOpen(row) {
|
||||
proxy.download("/technicalPlan/export/word/"+row.planId, {
|
||||
}, `${row.planName}.doc`,{ baseURL: "/plan-api",});
|
||||
}
|
||||
|
||||
|
||||
|
||||
/** 删除按钮操作 */
|
||||
function handleDelete(row) {
|
||||
const planName = row.planName ;
|
||||
proxy.$modal
|
||||
.confirm('是否确认方案:' + planName )
|
||||
.then(function () {
|
||||
return deleteData(row.planId);
|
||||
})
|
||||
.then(() => {
|
||||
getList();
|
||||
proxy.$modal.msgSuccess("删除成功");
|
||||
})
|
||||
.catch(() => {});
|
||||
}
|
||||
function handleSelectionChange(selection) {
|
||||
ids.value = selection.map((item) => item.id);
|
||||
single.value = selection.length !== 1;
|
||||
multiple.value = !selection.length;
|
||||
}
|
||||
/** 查询理列表 */
|
||||
function getList() {
|
||||
// loading.value = false;
|
||||
loading.value = true;
|
||||
list(queryParams.value).then((response) => {
|
||||
|
||||
dataList.value = response.rows;
|
||||
total.value = response.total;
|
||||
loading.value = false;
|
||||
});
|
||||
}
|
||||
/** 搜索按钮操作 */
|
||||
function handleQuery() {
|
||||
queryParams.value.pageNum = 1;
|
||||
getList();
|
||||
}
|
||||
/** 重置按钮操作 */
|
||||
function resetQuery() {
|
||||
proxy.resetForm("queryForm");
|
||||
handleQuery();
|
||||
}
|
||||
//格式化时间函数
|
||||
function formatDate(date) {
|
||||
let year = date.getFullYear();
|
||||
let month = date.getMonth() + 1;
|
||||
let day = date.getDate();
|
||||
|
||||
return (
|
||||
year +
|
||||
(month < 10 ? "0" + month : month)
|
||||
)
|
||||
}
|
||||
function submit() {
|
||||
console.log(form.value)
|
||||
let value = scsbRef.value.handleSubmit()
|
||||
console.log(value)
|
||||
form.value.planTime = formatDate(form.value.planTime)
|
||||
value.equipmentParamId = value.equipmentParamId.toString();
|
||||
|
||||
let data = {
|
||||
...value,
|
||||
...form.value,
|
||||
|
||||
}
|
||||
console.log(data)
|
||||
if(form.value.planId){
|
||||
putData(data).then(res=>{
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
scsbRef.value.rest()
|
||||
open.value = false;
|
||||
|
||||
getList()
|
||||
|
||||
})
|
||||
|
||||
}else{
|
||||
postData(data).then(res=>{
|
||||
proxy.$modal.msgSuccess(res.msg);
|
||||
scsbRef.value.rest()
|
||||
open.value = false;
|
||||
getList()
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
async function getTreeData() {
|
||||
let data = await treeRegionLevel();
|
||||
|
||||
citytype.value = data.data.map((item, index) => {
|
||||
return {
|
||||
value: item.label,
|
||||
label: item.label,
|
||||
children: item.children,
|
||||
};
|
||||
});
|
||||
}
|
||||
onMounted(() => {
|
||||
getList();
|
||||
getTreeData();
|
||||
});
|
||||
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
.fade-enter-active {
|
||||
transition: all 0.3s ease-out;
|
||||
}
|
||||
.fade-leave-active {
|
||||
transition: all 0.3s cubic-bezier(1, 0.5, 0.8, 1);
|
||||
}
|
||||
.fade-enter-from,
|
||||
.fade-leave-to {
|
||||
transform: translateX(-120px);
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.detail-enter-active,
|
||||
.detail-leave-active {
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
.detail-enter-from,
|
||||
.detail-leave-to {
|
||||
opacity: 0;
|
||||
}
|
||||
</style>
|
|
@ -369,7 +369,7 @@ const setLayerTree = (data) => {
|
|||
return {
|
||||
id: item.id,
|
||||
code: item.code,
|
||||
label: item.name,
|
||||
label: item.deviceName,
|
||||
parentId: 0,
|
||||
type: item.reviewStatus,
|
||||
};
|
||||
|
@ -392,7 +392,7 @@ const buildInfo = ref({});
|
|||
function getBuild() {
|
||||
build({
|
||||
planId: planData.value.planId,
|
||||
deviceId: queryParams.value.deviceId,
|
||||
deviceName: queryParams.value.deviceName,
|
||||
}).then((response) => {
|
||||
response.data.img = JSON.parse(response.data.img);
|
||||
buildInfo.value = response.data;
|
||||
|
@ -403,7 +403,7 @@ function getDetails() {
|
|||
loading.value = true;
|
||||
details({
|
||||
planId: planData.value.planId,
|
||||
deviceId: queryParams.value.deviceId,
|
||||
deviceName: queryParams.value.deviceName,
|
||||
}).then((response) => {
|
||||
renovationList.value = response.rows.map(item=>{
|
||||
return {
|
||||
|
@ -417,8 +417,9 @@ function getDetails() {
|
|||
}
|
||||
|
||||
const handleNodeClick = (e) => {
|
||||
console.log(e);
|
||||
queryParams.value.deviceId = e.id;
|
||||
|
||||
queryParams.value.deviceName = e.label;
|
||||
|
||||
getBuild();
|
||||
getDetails();
|
||||
};
|
||||
|
|
|
@ -234,12 +234,7 @@ const handleWorld = ( item) => {
|
|||
baseURL: "/plan-api"
|
||||
});
|
||||
}
|
||||
/** 新增按钮操作 */
|
||||
function handleAdd() {
|
||||
reset();
|
||||
open.value = true;
|
||||
title.value = "添加图层管理";
|
||||
}
|
||||
|
||||
//详情
|
||||
const arrSite = ref([])
|
||||
const planData = ref({})
|
||||
|
|
|
@ -34,8 +34,6 @@
|
|||
>
|
||||
<el-table-column type="index" width="55" label="序号" />
|
||||
<el-table-column prop="name" show-overflow-tooltip label="文件" />
|
||||
|
||||
|
||||
<el-table-column label="操作" align="center" prop="unit" >
|
||||
<template #default="scope">
|
||||
<div style="display: flex;justify-content: center;">
|
||||
|
|
|
@ -77,10 +77,10 @@ const ldMap = {
|
|||
self = this;
|
||||
return new Promise((resolve, reject) => {
|
||||
|
||||
if(wkid==self.wkid){
|
||||
if (wkid == self.wkid) {
|
||||
resolve()
|
||||
|
||||
}else{
|
||||
} else {
|
||||
let tileInfo = new TileInfo(TianData.infoData(wkid));
|
||||
self.wkid = wkid
|
||||
let defaultInfo = {
|
||||
|
@ -506,6 +506,7 @@ const ldMap = {
|
|||
return sketchVM;
|
||||
}
|
||||
function selectData(e) {
|
||||
|
||||
if (e.graphics[0].attributes.data?.pointType == 'Station' || e.graphics[0].attributes.data?.type == 'Station') {
|
||||
return
|
||||
}
|
||||
|
@ -554,10 +555,13 @@ const ldMap = {
|
|||
if (e.state == 'complete') {
|
||||
self.sketchLayer.selectGraphic = null
|
||||
if (self.ldMapActionType != 'lineAction') {
|
||||
|
||||
try {
|
||||
const areas = geodesicUtils.geodesicAreas([graphic.geometry], "square-meters");
|
||||
const area = Math.abs(areas[0]).toFixed(2)
|
||||
graphic.attributes.data.area = area
|
||||
} catch {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -954,8 +958,8 @@ const ldMap = {
|
|||
self.sketchLayer.pointLayer.removeAll();
|
||||
self.lineLayer && self.lineLayer.removeAll()
|
||||
self.loadelevationLayer.removeAll()
|
||||
self.hightlayer &&self.hightlayer.removeAll()
|
||||
self.textLayer&&self.textLayer.removeAll()
|
||||
self.hightlayer && self.hightlayer.removeAll()
|
||||
self.textLayer && self.textLayer.removeAll()
|
||||
},
|
||||
//清除点位
|
||||
removePoint() {
|
||||
|
@ -1050,26 +1054,50 @@ const ldMap = {
|
|||
return returnObj
|
||||
|
||||
},
|
||||
// 开始 结束
|
||||
// 线 31 118355 53
|
||||
// 点 118355 53 531
|
||||
// 线 53 118350 46
|
||||
// 线 53 531 180
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//根据起点找终点返回数据
|
||||
getMapByPoint(item, data) {
|
||||
let linelayer = self.lineLayer.graphics.items
|
||||
let point = self.getSketchDataByType("point");
|
||||
|
||||
let nowPointId = item.id
|
||||
let lineId = item.attributes.endIndex
|
||||
let lineId
|
||||
lineId = item.attributes.endIndex
|
||||
let lineIdMore=linelayer.filter(item => item.attributes.leftId == nowPointId)
|
||||
|
||||
if(lineIdMore.length>1){
|
||||
console.log(lineIdMore)
|
||||
}
|
||||
|
||||
|
||||
//当前的元素数据
|
||||
let geometry = item.geometry
|
||||
let attributes = item.attributes
|
||||
|
||||
if (lineId && lineId != nowPointId) {
|
||||
let linedata = linelayer.filter(item => item.id == lineId)[0]
|
||||
let linedata = linelayer.filter(item => item.id == lineId)
|
||||
console.log(linedata.length)
|
||||
if(linedata.length >1){debugger}
|
||||
linedata = linedata[0]
|
||||
if (!linedata) { return data }
|
||||
let val = [geometry.x, geometry.y, attributes.data.pointType, parseInt(linedata.attributes.data.styleId), nowPointId]
|
||||
data.push(val)
|
||||
let nextPointId = linedata.attributes.nextId
|
||||
|
||||
let nextItem = point.filter(item => item.id == nextPointId)[0]
|
||||
let nextItem = point.filter(item => item.id == nextPointId)
|
||||
|
||||
nextItem=nextItem[0]
|
||||
if(nextItem.length >1){debugger}
|
||||
if (!nextItem) { debugger }
|
||||
return this.getMapByPoint(nextItem, data)
|
||||
} else {
|
||||
|
@ -1281,6 +1309,7 @@ const ldMap = {
|
|||
|
||||
let polylineLayer = self.lineLayer
|
||||
|
||||
|
||||
let p6 = this.lineLayer.graphics.items.filter(item => {
|
||||
return item.id == data.id || item.id == data.lineId
|
||||
})[0]
|
||||
|
@ -1402,7 +1431,7 @@ const ldMap = {
|
|||
|
||||
},
|
||||
//道路高程数据展示
|
||||
elevationData(flag,data) {
|
||||
elevationData(flag, data) {
|
||||
if (flag) {
|
||||
|
||||
data.forEach((item, index) => {
|
||||
|
@ -1567,11 +1596,11 @@ const ldMap = {
|
|||
}
|
||||
|
||||
if (res.type == "House") {
|
||||
try{
|
||||
try {
|
||||
const areas = geodesicUtils.geodesicAreas([polygon], "square-meters");
|
||||
const area = Math.abs(areas[0]).toFixed(2)
|
||||
res.area = res.area || area
|
||||
}catch{
|
||||
} catch {
|
||||
|
||||
}
|
||||
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -54,7 +54,7 @@ export default defineConfig(({ mode, command }) => {
|
|||
rewrite: (p) => p.replace(/^\/water-api/, '')
|
||||
},
|
||||
'/plan-api': {
|
||||
target: 'http://water.lidinghb.com:9070/',
|
||||
target: 'http://119.3.156.115:9070/',
|
||||
changeOrigin: true,
|
||||
rewrite: (p) => p.replace(/^\/plan-api/, '')
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue