Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
|
b20ecdf6d3 | |
|
50781379d3 | |
|
12ca363fe6 | |
|
490ff6d1ac |
|
@ -4,12 +4,18 @@
|
||||||
"description": "力鼎后台管理系统",
|
"description": "力鼎后台管理系统",
|
||||||
"author": "LionLi",
|
"author": "LionLi",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
|
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "vite build",
|
"build": "vite build",
|
||||||
"build:prod": "vite build && node ./built.js",
|
"build:prod": "vite build && node ./built.js",
|
||||||
"built": "node ./built.js",
|
"built": "node ./built.js",
|
||||||
"preview": "vite preview"
|
"preview": "vite preview",
|
||||||
|
"提示":{
|
||||||
|
"打包上传服务器": "npm run build:prod",
|
||||||
|
"打包": "npm run build",
|
||||||
|
"开发环境fang": "npm run dev"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|
|
@ -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,56 @@
|
||||||
|
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'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function treelist(planType,speclevel) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlan/treeCapacityEquipment',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: {
|
||||||
|
planType: planType,
|
||||||
|
specLevel:speclevel
|
||||||
|
}
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -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,62 @@
|
||||||
|
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
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function multipleConsumption(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlan/equipmentEnergyConsumption/multipleConsumption',
|
||||||
|
method: 'post',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
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,42 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegion/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function postData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegion',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegion',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function deleteData(regionIds) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegion/'+regionIds,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/capacity/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function postData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/capacity',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/capacity',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function deleteData(planIds) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/capacity/'+planIds,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityStandardForeign/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function postData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityStandardForeign',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityStandardForeign',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function deleteData(standardIds) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityStandardForeign/'+standardIds,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//树形水质标准
|
||||||
|
export function treeRegionLevel() {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityStandardForeign/treeRegionLevel',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'get',
|
||||||
|
|
||||||
|
})
|
||||||
|
}
|
||||||
|
//根据水质标准ID查询
|
||||||
|
export function getData(id) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityStandardForeign/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,49 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询外贸技术方案配置列表
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/config/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 查询外贸技术方案配置详细
|
||||||
|
export function getByid(configId) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/config/' + configId,
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 新增外贸技术方案配置
|
||||||
|
export function postData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/config',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改外贸技术方案配置
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/config',
|
||||||
|
method: 'put',
|
||||||
|
data: data,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除外贸技术方案配置
|
||||||
|
export function delData(configId) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/config/' + configId,
|
||||||
|
method: 'delete',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,42 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/equipmentComponent/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function postData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/equipmentComponent',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/equipmentComponent',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function deleteData(ids) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/equipmentComponent/'+ids,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,58 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/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: '/technicalPlanForeign/equipmentEnergyConsumption/updateComponentRunTime',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}// 查询
|
||||||
|
export function multipleConsumption(query) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/equipmentEnergyConsumption/consumption',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
|
@ -0,0 +1,46 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function postData(data) {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function deleteData(planIds) {
|
||||||
|
return request({
|
||||||
|
url: '/technicalPlanForeign/'+planIds,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -0,0 +1,42 @@
|
||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
// 查询
|
||||||
|
export function list(query) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegionForeign/list',
|
||||||
|
method: 'get',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// 新增
|
||||||
|
export function postData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegionForeign',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 修改
|
||||||
|
export function putData(data) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegionForeign',
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'put',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 删除
|
||||||
|
export function deleteData(regionIds) {
|
||||||
|
return request({
|
||||||
|
url: '/waterQualityRegionForeign/'+regionIds,
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
|
@ -57,7 +57,7 @@ const props = defineProps({
|
||||||
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
// 文件类型, 例如['png', 'jpg', 'jpeg']
|
||||||
fileType: {
|
fileType: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => ["doc", "xls", "ppt", "txt", "pdf"],
|
default: () => ["doc", "xls","xlsx", "ppt", "txt", "pdf"],
|
||||||
},
|
},
|
||||||
// 是否显示提示
|
// 是否显示提示
|
||||||
isShowTip: {
|
isShowTip: {
|
||||||
|
@ -79,7 +79,9 @@ const showTip = computed(
|
||||||
);
|
);
|
||||||
|
|
||||||
watch(() => props.modelValue, async val => {
|
watch(() => props.modelValue, async val => {
|
||||||
|
|
||||||
if (val) {
|
if (val) {
|
||||||
|
|
||||||
let temp = 1;
|
let temp = 1;
|
||||||
// 首先将值转为数组
|
// 首先将值转为数组
|
||||||
let list;
|
let list;
|
||||||
|
@ -168,6 +170,7 @@ function uploadedSuccessfully() {
|
||||||
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
|
||||||
uploadList.value = [];
|
uploadList.value = [];
|
||||||
number.value = 0;
|
number.value = 0;
|
||||||
|
debugger
|
||||||
emit("update:modelValue", listToString(fileList.value));
|
emit("update:modelValue", listToString(fileList.value));
|
||||||
proxy.$modal.closeLoading();
|
proxy.$modal.closeLoading();
|
||||||
}
|
}
|
||||||
|
@ -185,6 +188,7 @@ function getFileName(name) {
|
||||||
|
|
||||||
// 对象转成指定字符串分隔
|
// 对象转成指定字符串分隔
|
||||||
function listToString(list, separator) {
|
function listToString(list, separator) {
|
||||||
|
debugger
|
||||||
let strs = "";
|
let strs = "";
|
||||||
separator = separator || ",";
|
separator = separator || ",";
|
||||||
for (let i in list) {
|
for (let i in list) {
|
||||||
|
|
|
@ -35,19 +35,19 @@ const usePermissionStore = defineStore(
|
||||||
},
|
},
|
||||||
generateRoutes(roles) {
|
generateRoutes(roles) {
|
||||||
return new Promise(resolve => {
|
return new Promise(resolve => {
|
||||||
let menu = JSON.parse(Cookies.get('menu')||'{}')
|
let menu = JSON.parse(Cookies.get('menu')||sessionStorage.getItem("menu")||'{}')
|
||||||
if(!menu.menuId){
|
if(!menu?.menuId){
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
Cookies.remove("menu")
|
||||||
|
sessionStorage.setItem('menu',JSON.stringify(menu));
|
||||||
// 向后端请求路由数据
|
// 向后端请求路由数据
|
||||||
getRouters({menuId:menu.menuId}).then(res => {
|
getRouters({menuId:menu.menuId}).then(res => {
|
||||||
|
|
||||||
res.data.forEach(data=>{
|
res.data.forEach(data=>{
|
||||||
if(!isHttp(data.path) ){
|
if(!isHttp(data.path) ){
|
||||||
data.path = '/'+data.path
|
data.path = '/'+data.path
|
||||||
data.component = "Layout"
|
data.component = "Layout"
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
const sdata = JSON.parse(JSON.stringify(res.data))
|
const sdata = JSON.parse(JSON.stringify(res.data))
|
||||||
const rdata = JSON.parse(JSON.stringify(res.data))
|
const rdata = JSON.parse(JSON.stringify(res.data))
|
||||||
|
|
|
@ -19,7 +19,7 @@ const service = axios.create({
|
||||||
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
// axios中请求配置有baseURL选项,表示请求URL公共部分
|
||||||
baseURL: import.meta.env.VITE_APP_BASE_API,
|
baseURL: import.meta.env.VITE_APP_BASE_API,
|
||||||
// 超时
|
// 超时
|
||||||
timeout: 10000
|
timeout: 100000
|
||||||
})
|
})
|
||||||
|
|
||||||
// request拦截器
|
// request拦截器
|
||||||
|
@ -38,6 +38,7 @@ service.interceptors.request.use(config => {
|
||||||
url = url.slice(0, -1);
|
url = url.slice(0, -1);
|
||||||
config.params = {};
|
config.params = {};
|
||||||
config.url = url;
|
config.url = url;
|
||||||
|
|
||||||
}
|
}
|
||||||
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
if (!isRepeatSubmit && (config.method === 'post' || config.method === 'put')) {
|
||||||
const requestObj = {
|
const requestObj = {
|
||||||
|
@ -62,6 +63,7 @@ service.interceptors.request.use(config => {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
}, error => {
|
}, error => {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
|
|
|
@ -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,700 @@
|
||||||
|
<template>
|
||||||
|
<el-form :model="form" ref="userRef" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="类型选择">
|
||||||
|
<el-radio-group v-model="form.specLevel">
|
||||||
|
<el-radio
|
||||||
|
size="large"
|
||||||
|
v-for="item in plan_spel_level"
|
||||||
|
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-descriptions
|
||||||
|
class="margin-top"
|
||||||
|
direction="vertical"
|
||||||
|
:column="8"
|
||||||
|
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="请输入" />
|
||||||
|
</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="出水指标">
|
||||||
|
<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 />
|
||||||
|
</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="加药量">
|
||||||
|
<el-descriptions
|
||||||
|
class="margin-top"
|
||||||
|
style="width: 100%"
|
||||||
|
:column="4"
|
||||||
|
:size="size"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<!-- <template #title>
|
||||||
|
<el-button type="primary">Operation</el-button>
|
||||||
|
</template> -->
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">葡萄糖</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="form.glucose"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">碳酸钠</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="form.na2co3"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">PAC(28%)</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="form.pac"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">氯片</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="form.naclo"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
</el-descriptions>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="费用价格">
|
||||||
|
<el-descriptions
|
||||||
|
class="margin-top"
|
||||||
|
style="width: 100%"
|
||||||
|
:column="3"
|
||||||
|
:size="size"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<!-- <template #title>
|
||||||
|
<el-button type="primary">Operation</el-button>
|
||||||
|
</template> -->
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">人工费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.laborCost"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">okr提成</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.royaltyOKR"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">其他部门提成</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.royaltyOther"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">包装费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.packingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">企业综合管理费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.manageFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">运输费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.shippingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">管线安装/吊装/搬运费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.buildingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">服务器租赁费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.serverFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">融资成本</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.financingCost"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">投标代理费/场地/专家费/配合费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.biddingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">増值税</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.vat"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">其他</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.other"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="处理量选型">
|
||||||
|
<el-tree-select
|
||||||
|
v-model="form.equipmentParamId"
|
||||||
|
:data="treeListData"
|
||||||
|
:render-after-expand="false"
|
||||||
|
multiple
|
||||||
|
style="width: 100%"
|
||||||
|
/>
|
||||||
|
<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,
|
||||||
|
multipleConsumption,
|
||||||
|
} from "@/api/renovation/scheme/equipmentEnergyConsumption";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { coliform_removal, technical_plan_type, packing_method,plan_spel_level } = proxy.useDict(
|
||||||
|
"coliform_removal",
|
||||||
|
"technical_plan_type",
|
||||||
|
"packing_method",
|
||||||
|
"plan_spel_level"
|
||||||
|
);
|
||||||
|
import {
|
||||||
|
list as equipmentList,
|
||||||
|
treelist,
|
||||||
|
} from "@/api/renovation/scheme/equipment";
|
||||||
|
import { list as capList } from "@/api/renovation/scheme/capacity";
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
planId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
citytype: {
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
planType: {
|
||||||
|
type: String,
|
||||||
|
default: () => {
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
const form = ref({
|
||||||
|
waterIn: null,
|
||||||
|
waterQualityStandardId: null,
|
||||||
|
coliformRemoval: null,
|
||||||
|
equipmentParamId: null,
|
||||||
|
});
|
||||||
|
watch(
|
||||||
|
() => props.planType,
|
||||||
|
(val) => {
|
||||||
|
form.equipmentParamId = [];
|
||||||
|
if (val) gettreelist(val,null);
|
||||||
|
}
|
||||||
|
);
|
||||||
|
watch(
|
||||||
|
() => form.value.specLevel,
|
||||||
|
(newval, oldval) => {
|
||||||
|
if(newval){
|
||||||
|
gettreelist(null,newval);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
},
|
||||||
|
{ deep: true }
|
||||||
|
|
||||||
|
)
|
||||||
|
const inletlist = ref([
|
||||||
|
{
|
||||||
|
name: "cod",
|
||||||
|
value: "250~400",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "bod",
|
||||||
|
value: "0~400",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ss",
|
||||||
|
value: "100~200",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "nh3",
|
||||||
|
value: "30~50",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tn",
|
||||||
|
value: "40~65",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tp",
|
||||||
|
value: "2.5~5.0",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "ph",
|
||||||
|
value: "6~9",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "animalVegetableOil",
|
||||||
|
value: "0~1",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const outletlist = ref([]);
|
||||||
|
const tonnageData = ref([]);
|
||||||
|
const treeListData = 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;
|
||||||
|
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);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
gettreelist(newForm.planType,newForm.specLevel);
|
||||||
|
form.value.equipmentParamId = newForm.equipmentDetail.map((item) => {
|
||||||
|
return `${item.capacityId}-${item.equipmentId}`;
|
||||||
|
});
|
||||||
|
|
||||||
|
// form.value.equipmentParamId = newForm.equipmentDetail.map((item) => {
|
||||||
|
// return item?.capacityId;
|
||||||
|
// });
|
||||||
|
|
||||||
|
// changeSelect(form.value.equipmentParamId);
|
||||||
|
form.value.coliformRemoval = newForm.coliformRemoval;
|
||||||
|
form.value.packingMethod = newForm.packingMethod;
|
||||||
|
form.value.specLevel = newForm.specLevel
|
||||||
|
form.value.na2co3 = newForm.na2co3;
|
||||||
|
form.value.pac = newForm.pac;
|
||||||
|
form.value.naclo = newForm.naclo;
|
||||||
|
form.value.glucose = newForm.glucose;
|
||||||
|
cost.value=newForm?.cost||{
|
||||||
|
laborCost:'',
|
||||||
|
royaltyOKR:'',
|
||||||
|
royaltyOther:'',
|
||||||
|
packingFee:'',
|
||||||
|
manageFee:'',
|
||||||
|
shippingFee:'',
|
||||||
|
buildingFee:'',
|
||||||
|
serverFee:'',
|
||||||
|
financingCost:'',
|
||||||
|
biddingFee:'',
|
||||||
|
vat:''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rest();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleChange(params) {
|
||||||
|
console.log(params);
|
||||||
|
outletlist.value = [];
|
||||||
|
if (params[1]) {
|
||||||
|
let data = await getData(params[1]);
|
||||||
|
form.value.waterQualityStandardId = params[1];
|
||||||
|
const keyValue = [
|
||||||
|
"standardId",
|
||||||
|
"basisDoc",
|
||||||
|
"createBy",
|
||||||
|
"createTime",
|
||||||
|
"level",
|
||||||
|
"region",
|
||||||
|
"regionId",
|
||||||
|
"updateBy",
|
||||||
|
"updateTime",
|
||||||
|
];
|
||||||
|
for (let item in data.data) {
|
||||||
|
if (!keyValue.includes(item)) {
|
||||||
|
outletlist.value.push({
|
||||||
|
name: item,
|
||||||
|
value: data.data[item],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
proxy.$modal.msgError("出水指标配置项错误,请联系管理员");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
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();
|
||||||
|
}
|
||||||
|
const cost=ref({})
|
||||||
|
function rest() {
|
||||||
|
form.value = {
|
||||||
|
waterIn: null,
|
||||||
|
waterQualityStandardId: null,
|
||||||
|
coliformRemoval: null,
|
||||||
|
equipmentParamId: null,
|
||||||
|
specLevel:0
|
||||||
|
|
||||||
|
};
|
||||||
|
cost.value={
|
||||||
|
laborCost:'',
|
||||||
|
royaltyOKR:'',
|
||||||
|
royaltyOther:'',
|
||||||
|
packingFee:'',
|
||||||
|
manageFee:'',
|
||||||
|
shippingFee:'',
|
||||||
|
buildingFee:'',
|
||||||
|
serverFee:'',
|
||||||
|
financingCost:'',
|
||||||
|
biddingFee:'',
|
||||||
|
vat:''
|
||||||
|
}
|
||||||
|
dataList.value = [];
|
||||||
|
}
|
||||||
|
function handleSubmit() {
|
||||||
|
form.value.waterIn = inletlist.value.reduce((obj, item) => {
|
||||||
|
obj[item.name] = item.value;
|
||||||
|
return obj;
|
||||||
|
}, {});
|
||||||
|
form.value.equipmentDetail = form.value.equipmentParamId.map((item) => {
|
||||||
|
let data = item.split("-");
|
||||||
|
return {
|
||||||
|
capacityId: data[0],
|
||||||
|
equipmentId: data[1],
|
||||||
|
|
||||||
|
};
|
||||||
|
});
|
||||||
|
debugger
|
||||||
|
form.value.cost=cost.value
|
||||||
|
return { ...form.value };
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
handleSubmit,
|
||||||
|
rest,
|
||||||
|
});
|
||||||
|
async function gettreelist(type,level) {
|
||||||
|
type =type||props.planType
|
||||||
|
level = level||form.value.specLevel
|
||||||
|
debugger
|
||||||
|
if((type!=""&&type!=null&&type!=undefined)&&(level!=""&&level!=null&&level!=undefined)){
|
||||||
|
let res = await treelist(type,level);
|
||||||
|
let data = res.data;
|
||||||
|
data.forEach((element) => {
|
||||||
|
element.children.forEach((item) => {
|
||||||
|
(item.label = `${item.label}(${element.label})`),
|
||||||
|
(item.value = element.value + "-" + item.value);
|
||||||
|
});
|
||||||
|
});
|
||||||
|
treeListData.value = data;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => form.value.equipmentParamId,
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
console.log("新值:", newVal);
|
||||||
|
if (
|
||||||
|
Object.prototype.toString.call(newVal) == "[object Array]" &&
|
||||||
|
newVal.length
|
||||||
|
) {
|
||||||
|
let data = newVal.map((item) => {
|
||||||
|
return {
|
||||||
|
equipmentId: item.split("-")[1],
|
||||||
|
capacityId: item.split("-")[0],
|
||||||
|
specLevel:form.value.specLevel
|
||||||
|
|
||||||
|
};
|
||||||
|
});
|
||||||
|
multipleConsumption(data).then((res) => {
|
||||||
|
dataList.value = res.data;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在这里处理值变化后的逻辑
|
||||||
|
}
|
||||||
|
);
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scope>
|
||||||
|
.borderBt {
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
padding: 0 0 4px;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
.cell-item{
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,831 @@
|
||||||
|
<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: 80vh; overflow-y: scroll"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
:render-content="renderContent"
|
||||||
|
/>
|
||||||
|
</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="price" />
|
||||||
|
<el-table-column label="总价" align="center" prop="totalPrice" />
|
||||||
|
<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" >
|
||||||
|
<template #default="scope">
|
||||||
|
|
||||||
|
{{scope.row.specLevel&&spec_level.filter(item=>item.value==scope.row.specLevel)[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="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="参数">
|
||||||
|
<el-input
|
||||||
|
v-model="form.param"
|
||||||
|
placeholder="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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.specLevel"
|
||||||
|
placeholder="归属"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in spec_level"
|
||||||
|
: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="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="价格">
|
||||||
|
<el-input
|
||||||
|
v-model="form.price"
|
||||||
|
placeholder="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备尺寸">
|
||||||
|
<el-input
|
||||||
|
v-model="form.equipmentSize"
|
||||||
|
placeholder="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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="()=>{openExit=false}">取 消</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="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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="()=>{openCapacity=false}">取 消</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";
|
||||||
|
import { ElMessage, ElMessageBox, ElButton } from "element-plus";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { equipment_component_brand, equipment_type,equipment_component_type,
|
||||||
|
equipment_component_unit,spec_level
|
||||||
|
} = proxy.useDict(
|
||||||
|
|
||||||
|
"equipment_component_brand",
|
||||||
|
"equipment_type",
|
||||||
|
"equipment_component_type",
|
||||||
|
"equipment_component_unit",
|
||||||
|
"spec_level"
|
||||||
|
);
|
||||||
|
|
||||||
|
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,
|
||||||
|
specLevel:"0"
|
||||||
|
};
|
||||||
|
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 renderContent = (h, { node, data, store }) => {
|
||||||
|
|
||||||
|
return h(
|
||||||
|
"div",
|
||||||
|
{
|
||||||
|
class: "custom-tree-node",
|
||||||
|
style: {
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
alignItems: "center",
|
||||||
|
width: "100%",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
h("div", null, node.label),
|
||||||
|
|
||||||
|
node.level == 1
|
||||||
|
? ""
|
||||||
|
: h(
|
||||||
|
"div",
|
||||||
|
null,
|
||||||
|
h(
|
||||||
|
ElButton,
|
||||||
|
{
|
||||||
|
type: "primary",
|
||||||
|
link: true,
|
||||||
|
onClick: (e) => exitData(data,e),
|
||||||
|
},
|
||||||
|
"修改"
|
||||||
|
),
|
||||||
|
h(
|
||||||
|
ElButton,
|
||||||
|
{
|
||||||
|
type: "danger",
|
||||||
|
link: true,
|
||||||
|
style: "margin-left: 4px",
|
||||||
|
onClick: (e) => removeData(node, data,e),
|
||||||
|
},
|
||||||
|
"删除"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
function exitData(data,e) {
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
form.value = Object.assign(data.val);
|
||||||
|
title.value = "编辑区域";
|
||||||
|
openCapacity.value = true;
|
||||||
|
}
|
||||||
|
function removeData(node, data,e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确认删除吨位为" + data.val.capacityTonnage + "的数据项?")
|
||||||
|
.then(function () {
|
||||||
|
return deleteData(data.val.capacityId);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getcapacityList();
|
||||||
|
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,
|
||||||
|
val:item
|
||||||
|
};
|
||||||
|
});
|
||||||
|
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,486 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24" :xs="24">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAddRegion"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!--部门数据-->
|
||||||
|
<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: 80vh; overflow-y: scroll"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
:render-content="renderContent"
|
||||||
|
/>
|
||||||
|
</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="gendictryData.regionName"
|
||||||
|
placeholder="请输入"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="依据文件名">
|
||||||
|
<el-input
|
||||||
|
v-model="gendictryData.basisDoc"
|
||||||
|
placeholder="请输入"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<el-dialog :title="title" v-model="gendictry" width="600px" append-to-body>
|
||||||
|
<el-form :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="地区名称">
|
||||||
|
<el-input v-model="form.regionName" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="依据文件名">
|
||||||
|
<el-input v-model="form.basisDoc" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitgendictry">确 定</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";
|
||||||
|
import {
|
||||||
|
list as waterList,
|
||||||
|
postData as waterPost,
|
||||||
|
putData as waterPut,
|
||||||
|
deleteData as waterDelete,
|
||||||
|
} from "@/api/renovation/scheme/waterQualityRegion";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const loading = ref();
|
||||||
|
import { ElMessage, ElMessageBox, ElButton } from "element-plus";
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
showSearch: false,
|
||||||
|
total: "",
|
||||||
|
title: "",
|
||||||
|
standardList: [],
|
||||||
|
deptOptions: [],
|
||||||
|
multiple: true,
|
||||||
|
single: true,
|
||||||
|
open: false,
|
||||||
|
ids: [],
|
||||||
|
gendictry: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
region: "",
|
||||||
|
},
|
||||||
|
rules: {},
|
||||||
|
});
|
||||||
|
const gendictryData = ref({});
|
||||||
|
const {
|
||||||
|
queryParams,
|
||||||
|
form,
|
||||||
|
ids,
|
||||||
|
rules,
|
||||||
|
standardList,
|
||||||
|
total,
|
||||||
|
single,
|
||||||
|
showSearch,
|
||||||
|
deptOptions,
|
||||||
|
title,
|
||||||
|
open,
|
||||||
|
gendictry,
|
||||||
|
multiple,
|
||||||
|
} = toRefs(data);
|
||||||
|
|
||||||
|
function submitgendictry() {
|
||||||
|
if (form.value.regionId) {
|
||||||
|
waterPut(form.value).then((res) => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
gendictry.value = false;
|
||||||
|
getDeptTree();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
waterPost(form.value).then((res) => {
|
||||||
|
proxy.$modal.msgSuccess("添加成功");
|
||||||
|
gendictry.value = false;
|
||||||
|
getDeptTree();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getDeptTree() {
|
||||||
|
waterList().then((response) => {
|
||||||
|
let data = [
|
||||||
|
{
|
||||||
|
id: 101,
|
||||||
|
parentId: 100,
|
||||||
|
label: "所有指标",
|
||||||
|
weight: 1,
|
||||||
|
children: null,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
data[0].children = response.data.map((item, index) => {
|
||||||
|
return {
|
||||||
|
id: item.regionId,
|
||||||
|
parentId: 101,
|
||||||
|
label: item.regionName,
|
||||||
|
weight: 1,
|
||||||
|
val: item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
deptOptions.value = data;
|
||||||
|
// queryParams.value.regionId = response.data[0].regionId
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询列表 */
|
||||||
|
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);
|
||||||
|
gendictryData.value = data.val;
|
||||||
|
queryParams.value.regionId = data.id == 101 ? "" : data.id;
|
||||||
|
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;
|
||||||
|
gendictry.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
function handleAddRegion() {
|
||||||
|
form.value = Object.assign({});
|
||||||
|
title.value = "添加区域";
|
||||||
|
gendictry.value = true;
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
title.value = "添加数据";
|
||||||
|
form.value.region = queryParams.value.region;
|
||||||
|
open.value = true;
|
||||||
|
}
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
form.value.region = queryParams.value.region;
|
||||||
|
form.value = { ...row };
|
||||||
|
title.value = "修改用户";
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["waterRef"].validate((valid) => {
|
||||||
|
form.value.regionId = gendictryData.value.regionId;
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const renderContent = (h, { node, data, store }) => {
|
||||||
|
if (node.level == 2) {
|
||||||
|
}
|
||||||
|
return h(
|
||||||
|
"div",
|
||||||
|
{
|
||||||
|
class: "custom-tree-node",
|
||||||
|
style: {
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
alignItems: "center",
|
||||||
|
width: "100%",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
h("div", null, node.label),
|
||||||
|
|
||||||
|
node.level == 1
|
||||||
|
? ""
|
||||||
|
: h(
|
||||||
|
"div",
|
||||||
|
null,
|
||||||
|
h(
|
||||||
|
ElButton,
|
||||||
|
{
|
||||||
|
type: "primary",
|
||||||
|
link: true,
|
||||||
|
onClick: (e) => exitData(data,e),
|
||||||
|
},
|
||||||
|
"修改"
|
||||||
|
),
|
||||||
|
h(
|
||||||
|
ElButton,
|
||||||
|
{
|
||||||
|
type: "danger",
|
||||||
|
link: true,
|
||||||
|
style: "margin-left: 4px",
|
||||||
|
onClick: (e) => removeData(node, data,e),
|
||||||
|
},
|
||||||
|
"删除"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
function exitData(data,e) {
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
form.value = Object.assign(data.val);
|
||||||
|
title.value = "编辑区域";
|
||||||
|
gendictry.value = true;
|
||||||
|
}
|
||||||
|
function removeData(node, data,e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确认删除地区为" + data.val.regionName + "的数据项?")
|
||||||
|
.then(function () {
|
||||||
|
return waterDelete(data.val.regionId);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getDeptTree();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
getDeptTree();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.custom-tree-node {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,391 @@
|
||||||
|
<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="设备名称" >
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.equipmentName"
|
||||||
|
placeholder="请输入设备名称"
|
||||||
|
clearable
|
||||||
|
style="width: 240px"
|
||||||
|
@keyup.enter="handleQuery"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="设备所属" >
|
||||||
|
<el-select v-model="queryParams.specLevel"
|
||||||
|
placeholder="归属"
|
||||||
|
clearable
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="dict in plan_spel_level "
|
||||||
|
: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>
|
||||||
|
|
||||||
|
<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="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="风机运行时间" prop="nickName">
|
||||||
|
<el-input
|
||||||
|
v-model="form.fanRuntime"
|
||||||
|
placeholder="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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="open=false">取 消</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 { plan_spel_level
|
||||||
|
} = proxy.useDict("plan_spel_level");
|
||||||
|
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
|
||||||
|
}
|
||||||
|
|
||||||
|
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,557 @@
|
||||||
|
<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="公司名称"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="方案名称" >
|
||||||
|
<el-input
|
||||||
|
v-model="form.planName"
|
||||||
|
placeholder="方案名称"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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-input
|
||||||
|
v-model="form.planbg"
|
||||||
|
style="width: 100%;"
|
||||||
|
:autosize="{ minRows: 3, maxRows: 8 }"
|
||||||
|
autosize
|
||||||
|
type="textarea"
|
||||||
|
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 equipment_type"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<scsb ref="scsbRef" v-if="open" :citytype="citytype" :planType="form.planType" 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 { equipment_type } = proxy.useDict("equipment_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 {
|
return {
|
||||||
id: item.id,
|
id: item.id,
|
||||||
code: item.code,
|
code: item.code,
|
||||||
label: item.name,
|
label: item.deviceName,
|
||||||
parentId: 0,
|
parentId: 0,
|
||||||
type: item.reviewStatus,
|
type: item.reviewStatus,
|
||||||
};
|
};
|
||||||
|
@ -392,7 +392,7 @@ const buildInfo = ref({});
|
||||||
function getBuild() {
|
function getBuild() {
|
||||||
build({
|
build({
|
||||||
planId: planData.value.planId,
|
planId: planData.value.planId,
|
||||||
deviceId: queryParams.value.deviceId,
|
deviceName: queryParams.value.deviceName,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
response.data.img = JSON.parse(response.data.img);
|
response.data.img = JSON.parse(response.data.img);
|
||||||
buildInfo.value = response.data;
|
buildInfo.value = response.data;
|
||||||
|
@ -403,7 +403,7 @@ function getDetails() {
|
||||||
loading.value = true;
|
loading.value = true;
|
||||||
details({
|
details({
|
||||||
planId: planData.value.planId,
|
planId: planData.value.planId,
|
||||||
deviceId: queryParams.value.deviceId,
|
deviceName: queryParams.value.deviceName,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
renovationList.value = response.rows.map(item=>{
|
renovationList.value = response.rows.map(item=>{
|
||||||
return {
|
return {
|
||||||
|
@ -417,8 +417,9 @@ function getDetails() {
|
||||||
}
|
}
|
||||||
|
|
||||||
const handleNodeClick = (e) => {
|
const handleNodeClick = (e) => {
|
||||||
console.log(e);
|
|
||||||
queryParams.value.deviceId = e.id;
|
queryParams.value.deviceName = e.label;
|
||||||
|
|
||||||
getBuild();
|
getBuild();
|
||||||
getDetails();
|
getDetails();
|
||||||
};
|
};
|
||||||
|
|
|
@ -234,12 +234,7 @@ const handleWorld = ( item) => {
|
||||||
baseURL: "/plan-api"
|
baseURL: "/plan-api"
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
/** 新增按钮操作 */
|
|
||||||
function handleAdd() {
|
|
||||||
reset();
|
|
||||||
open.value = true;
|
|
||||||
title.value = "添加图层管理";
|
|
||||||
}
|
|
||||||
//详情
|
//详情
|
||||||
const arrSite = ref([])
|
const arrSite = ref([])
|
||||||
const planData = ref({})
|
const planData = ref({})
|
||||||
|
|
|
@ -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,544 @@
|
||||||
|
<template>
|
||||||
|
<el-form :model="form" ref="userRef" label-width="100px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="类型选择">
|
||||||
|
<el-radio-group v-model="form.specLevel">
|
||||||
|
<el-radio
|
||||||
|
size="large"
|
||||||
|
v-for="item in plan_spec_level_foreign"
|
||||||
|
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.voltage">
|
||||||
|
<el-radio
|
||||||
|
size="large"
|
||||||
|
v-for="item in regional_voltage"
|
||||||
|
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-descriptions
|
||||||
|
class="margin-top"
|
||||||
|
direction="vertical"
|
||||||
|
:column="8"
|
||||||
|
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-descriptions
|
||||||
|
class="margin-top"
|
||||||
|
style="width: 100%"
|
||||||
|
:column="3"
|
||||||
|
:size="size"
|
||||||
|
border
|
||||||
|
>
|
||||||
|
<!-- <template #title>
|
||||||
|
<el-button type="primary">Operation</el-button>
|
||||||
|
</template> -->
|
||||||
|
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">人工费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.laborCost"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">okr提成</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.royaltyOKR"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">其他部门提成</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.royaltyOther"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">包装费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.packingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">企业综合管理费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.manageFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">运输费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.shippingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">管线安装/吊装/搬运费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.buildingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">服务器租赁费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.serverFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">融资成本</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.financingCost"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">投标代理费/场地/专家费/配合费</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.biddingFee"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">増值税</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.vat"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
<el-descriptions-item>
|
||||||
|
<template #label>
|
||||||
|
<div class="cell-item">其他</div>
|
||||||
|
</template>
|
||||||
|
<el-input
|
||||||
|
v-model="cost.other"
|
||||||
|
placeholder="请输入"
|
||||||
|
/>
|
||||||
|
</el-descriptions-item>
|
||||||
|
|
||||||
|
</el-descriptions>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="处理量" prop="phonenumber">
|
||||||
|
<el-input
|
||||||
|
v-model="form.processCapacity"
|
||||||
|
placeholder="请输入"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
|
</template>
|
||||||
|
<script setup>
|
||||||
|
import { treeRegionLevel, getData } from "@/api/renovation/technicalplan/discharge";
|
||||||
|
import { list } from "@/api/renovation/technicalplan/capacity";
|
||||||
|
import { list as equipmentEnergyConsumptionList,multipleConsumption }
|
||||||
|
from "@/api/renovation/technicalplan/equipmentEnergyConsumption";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { coliform_removal, technical_plan_type,packing_method,regional_voltage,equipment_component_system,plan_spec_level_foreign } =
|
||||||
|
proxy.useDict(
|
||||||
|
"coliform_removal",
|
||||||
|
"technical_plan_type","packing_method",
|
||||||
|
"equipment_component_system",
|
||||||
|
"plan_spec_level_foreign",
|
||||||
|
"regional_voltage"
|
||||||
|
);
|
||||||
|
// import {
|
||||||
|
// list as equipmentList,
|
||||||
|
// treelist
|
||||||
|
// } from "@/api/renovation/technicalplan/equipment";
|
||||||
|
import {
|
||||||
|
list as capList,
|
||||||
|
|
||||||
|
} from "@/api/renovation/technicalplan/capacity";
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const props = defineProps({
|
||||||
|
modelValue: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {
|
||||||
|
return {
|
||||||
|
planId: null,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
},
|
||||||
|
citytype:{
|
||||||
|
type: Array,
|
||||||
|
default: () => {
|
||||||
|
return [];
|
||||||
|
},
|
||||||
|
},
|
||||||
|
planType:{
|
||||||
|
type: String,
|
||||||
|
default: () => {
|
||||||
|
return "";
|
||||||
|
},
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
|
const form = ref({
|
||||||
|
waterIn: null,
|
||||||
|
waterQualityStandardId: null,
|
||||||
|
|
||||||
|
equipmentParamId: null,
|
||||||
|
});
|
||||||
|
// watch(()=>props.planType,(val)=>{
|
||||||
|
// form.equipmentParamId=[]
|
||||||
|
// if(val)
|
||||||
|
// gettreelist(val);
|
||||||
|
// })
|
||||||
|
const inletlist = ref([
|
||||||
|
{
|
||||||
|
name: "cod",
|
||||||
|
value: "250~400",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "bod",
|
||||||
|
value: "0~400",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "ss",
|
||||||
|
value: "100~200",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "nh3",
|
||||||
|
value: "30~50",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tn",
|
||||||
|
value: "40~65",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "tp",
|
||||||
|
value: "2.5~5.0",
|
||||||
|
},
|
||||||
|
|
||||||
|
{
|
||||||
|
name: "ph",
|
||||||
|
value: "6~9",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "animalVegetableOil",
|
||||||
|
value: "0~1",
|
||||||
|
},
|
||||||
|
]);
|
||||||
|
const outletlist = ref([]);
|
||||||
|
const tonnageData = ref([]);
|
||||||
|
const treeListData = 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;
|
||||||
|
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.speclevel=newForm.speclevel
|
||||||
|
form.value.voltage = newForm.voltage
|
||||||
|
form.value.processCapacity=newForm.processCapacity
|
||||||
|
cost.value=newForm?.cost||{
|
||||||
|
laborCost:'',
|
||||||
|
royaltyOKR:'',
|
||||||
|
royaltyOther:'',
|
||||||
|
packingFee:'',
|
||||||
|
manageFee:'',
|
||||||
|
shippingFee:'',
|
||||||
|
buildingFee:'',
|
||||||
|
serverFee:'',
|
||||||
|
financingCost:'',
|
||||||
|
biddingFee:'',
|
||||||
|
vat:'',
|
||||||
|
other:''
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
rest();
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{ immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
async function handleChange(params) {
|
||||||
|
console.log(params);
|
||||||
|
outletlist.value = [];
|
||||||
|
if(params[1]){
|
||||||
|
let data = await getData(params[1]);
|
||||||
|
form.value.waterQualityStandardId = params[1];
|
||||||
|
const keyValue = [
|
||||||
|
"standardId",
|
||||||
|
"basisDoc",
|
||||||
|
"createBy",
|
||||||
|
"createTime",
|
||||||
|
"level",
|
||||||
|
"region",
|
||||||
|
"updateBy",
|
||||||
|
"updateTime",
|
||||||
|
"regionId"
|
||||||
|
];
|
||||||
|
for (let item in data.data) {
|
||||||
|
if (!keyValue.includes(item)) {
|
||||||
|
outletlist.value.push({
|
||||||
|
name: item,
|
||||||
|
value: data.data[item],
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
proxy.$modal.msgError("出水指标配置项错误,请联系管理员");
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
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,
|
||||||
|
};
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
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()
|
||||||
|
}
|
||||||
|
const cost=ref({})
|
||||||
|
function rest() {
|
||||||
|
form.value = {
|
||||||
|
waterIn: null,
|
||||||
|
waterQualityStandardId: null,
|
||||||
|
|
||||||
|
equipmentParamId: null,
|
||||||
|
};
|
||||||
|
cost.value={
|
||||||
|
laborCost:'',
|
||||||
|
royaltyOKR:'',
|
||||||
|
royaltyOther:'',
|
||||||
|
packingFee:'',
|
||||||
|
manageFee:'',
|
||||||
|
shippingFee:'',
|
||||||
|
buildingFee:'',
|
||||||
|
serverFee:'',
|
||||||
|
financingCost:'',
|
||||||
|
biddingFee:'',
|
||||||
|
vat:'',
|
||||||
|
other:''
|
||||||
|
}
|
||||||
|
dataList.value = [];
|
||||||
|
}
|
||||||
|
function handleSubmit() {
|
||||||
|
form.value.waterIn = inletlist.value.reduce((obj, item) => {
|
||||||
|
obj[item.name] = item.value;
|
||||||
|
return obj;
|
||||||
|
}, {});
|
||||||
|
// let data = form.value.equipmentParamId.split("-");
|
||||||
|
// form.value.equipmentDetail ={
|
||||||
|
// capacityId: data[0],
|
||||||
|
// equipmentId:data[1]
|
||||||
|
// }
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
form.value.cost=cost.value
|
||||||
|
return form.value;
|
||||||
|
}
|
||||||
|
defineExpose({
|
||||||
|
handleSubmit,
|
||||||
|
rest,
|
||||||
|
});
|
||||||
|
// async function gettreelist(type){
|
||||||
|
// let res = await treelist(type)
|
||||||
|
// let data = res.data
|
||||||
|
// data.forEach(element => {
|
||||||
|
// element.children.forEach(item=>{
|
||||||
|
// item.label =`${item.label}(${element.label})` ,
|
||||||
|
// item.value = element.value+'-'+item.value
|
||||||
|
// })
|
||||||
|
// });
|
||||||
|
// treeListData.value = data
|
||||||
|
// }
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => form.value.equipmentParamId,
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
console.log('新值:', newVal);
|
||||||
|
|
||||||
|
if(newVal&&newVal.length>0){
|
||||||
|
let data = {
|
||||||
|
equipmentId:newVal.split('-')[1],
|
||||||
|
capacityId:newVal.split('-')[0]
|
||||||
|
}
|
||||||
|
multipleConsumption(data).then(res=>{
|
||||||
|
|
||||||
|
dataList.value=[ res.data]
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
// 在这里处理值变化后的逻辑
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
watch(
|
||||||
|
() => form.value.speclevel,
|
||||||
|
(newVal, oldVal) => {
|
||||||
|
console.log('新值:', newVal);
|
||||||
|
console.log('旧值:', oldVal);
|
||||||
|
// 在这里处理值变化后的逻辑
|
||||||
|
},
|
||||||
|
{ deep: true, immediate: true }
|
||||||
|
);
|
||||||
|
|
||||||
|
onMounted(() => {
|
||||||
|
getList();
|
||||||
|
|
||||||
|
});
|
||||||
|
</script>
|
||||||
|
<style scope>
|
||||||
|
.borderBt {
|
||||||
|
border-bottom: 1px solid #ebeef5;
|
||||||
|
padding: 0 0 4px;
|
||||||
|
margin: 5px;
|
||||||
|
}
|
||||||
|
.cell-item{
|
||||||
|
white-space: pre;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,245 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-form :model="queryParams" ref="queryRef" :inline="true" v-show="showSearch">
|
||||||
|
|
||||||
|
<el-form-item label="类型" prop="plan_type">
|
||||||
|
<el-select v-model="queryParams.plan_type" placeholder="类型" clearable style="width: 200px">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in equipment_type_foreign"
|
||||||
|
: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="handleAdd"
|
||||||
|
|
||||||
|
>新增</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="success"
|
||||||
|
plain
|
||||||
|
icon="Edit"
|
||||||
|
:disabled="single"
|
||||||
|
@click="handleUpdate"
|
||||||
|
|
||||||
|
>修改</el-button>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="1.5">
|
||||||
|
<el-button
|
||||||
|
type="danger"
|
||||||
|
plain
|
||||||
|
icon="Delete"
|
||||||
|
:disabled="multiple"
|
||||||
|
@click="handleDelete"
|
||||||
|
|
||||||
|
>删除</el-button>
|
||||||
|
</el-col>
|
||||||
|
<right-toolbar v-model:showSearch="showSearch" @queryTable="getList"></right-toolbar>
|
||||||
|
</el-row>
|
||||||
|
|
||||||
|
<el-table v-loading="loading" :data="noticeList" @selection-change="handleSelectionChange">
|
||||||
|
<el-table-column type="selection" width="55" align="center" />
|
||||||
|
<el-table-column label="序号" align="center" prop="configId" width="100" />
|
||||||
|
<el-table-column
|
||||||
|
label="标题"
|
||||||
|
align="center"
|
||||||
|
prop="configName"
|
||||||
|
:show-overflow-tooltip="true"
|
||||||
|
/>
|
||||||
|
<el-table-column label="类型" align="center" prop="plan_type">
|
||||||
|
<template #default="scope">
|
||||||
|
<dict-tag :options="equipment_type_foreign" :value="scope.row.planType" />
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-button link type="primary" icon="Edit" @click="handleUpdate(scope.row)" v-hasPermi="['system:notice:edit']">修改</el-button>
|
||||||
|
<el-button link type="primary" icon="Delete" @click="handleDelete(scope.row)" v-hasPermi="['system:notice:remove']" >删除</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="40%" append-to-body>
|
||||||
|
<el-form ref="noticeRef" :model="form" :rules="rules" label-width="80px">
|
||||||
|
<el-row>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="名称" >
|
||||||
|
<el-input v-model="form.configName" placeholder="请输入名称" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="类型" >
|
||||||
|
<el-select style="width:100%" v-model="form.planType" placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
v-for="dict in equipment_type_foreign"
|
||||||
|
:key="dict.value"
|
||||||
|
:label="dict.label"
|
||||||
|
:value="dict.value"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="文件" >
|
||||||
|
<fileUpload :limit="1" v-model="form.ossId" />
|
||||||
|
</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>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script setup name="Notice">
|
||||||
|
import { list, getByid, delData, postData, putData }
|
||||||
|
from "@/api/renovation/technicalPlan/equipment";
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { sys_notice_status, equipment_type_foreign } = proxy.useDict("sys_notice_status", "equipment_type_foreign");
|
||||||
|
|
||||||
|
const noticeList = ref([]);
|
||||||
|
const open = ref(false);
|
||||||
|
const loading = ref(true);
|
||||||
|
const showSearch = ref(true);
|
||||||
|
const ids = ref([]);
|
||||||
|
const single = ref(true);
|
||||||
|
const multiple = ref(true);
|
||||||
|
const total = ref(0);
|
||||||
|
const title = ref("");
|
||||||
|
|
||||||
|
const data = reactive({
|
||||||
|
form: {
|
||||||
|
|
||||||
|
},
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
|
||||||
|
},
|
||||||
|
rules: {
|
||||||
|
|
||||||
|
},
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
const { queryParams, form, rules } = toRefs(data);
|
||||||
|
|
||||||
|
/** 查询公告列表 */
|
||||||
|
function getList() {
|
||||||
|
loading.value = true;
|
||||||
|
list(queryParams.value).then(response => {
|
||||||
|
noticeList.value = response.rows;
|
||||||
|
total.value = response.total;
|
||||||
|
loading.value = false;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 取消按钮 */
|
||||||
|
function cancel() {
|
||||||
|
open.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
/** 表单重置 */
|
||||||
|
function reset() {
|
||||||
|
form.value = {
|
||||||
|
file:213
|
||||||
|
};
|
||||||
|
proxy.resetForm("noticeRef");
|
||||||
|
}
|
||||||
|
/** 搜索按钮操作 */
|
||||||
|
function handleQuery() {
|
||||||
|
queryParams.value.pageNum = 1;
|
||||||
|
getList();
|
||||||
|
}
|
||||||
|
/** 重置按钮操作 */
|
||||||
|
function resetQuery() {
|
||||||
|
proxy.resetForm("queryRef");
|
||||||
|
handleQuery();
|
||||||
|
}
|
||||||
|
/** 多选框选中数据 */
|
||||||
|
function handleSelectionChange(selection) {
|
||||||
|
ids.value = selection.map(item => item.configId);
|
||||||
|
single.value = selection.length != 1;
|
||||||
|
multiple.value = !selection.length;
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
title.value = "添加";
|
||||||
|
}
|
||||||
|
/**修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
const configId = row.configId || ids.value;
|
||||||
|
getByid(configId).then(response => {
|
||||||
|
form.value = response.data;
|
||||||
|
|
||||||
|
open.value = true;
|
||||||
|
title.value = "修改";
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["noticeRef"].validate(valid => {
|
||||||
|
if (valid) {
|
||||||
|
if (form.value.configId != undefined) {
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 删除按钮操作 */
|
||||||
|
function handleDelete(row) {
|
||||||
|
const noticeIds = row.configId || ids.value
|
||||||
|
proxy.$modal.confirm('是否确认删除编号为"' + noticeIds + '"的数据项?').then(function() {
|
||||||
|
return delData(noticeIds);
|
||||||
|
}).then(() => {
|
||||||
|
getList();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
}).catch(() => {});
|
||||||
|
}
|
||||||
|
|
||||||
|
getList();
|
||||||
|
</script>
|
|
@ -0,0 +1,486 @@
|
||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<el-row :gutter="20">
|
||||||
|
<el-col :span="24" :xs="24">
|
||||||
|
<el-button type="primary" plain icon="Plus" @click="handleAddRegion"
|
||||||
|
>新增</el-button
|
||||||
|
>
|
||||||
|
</el-col>
|
||||||
|
<!--部门数据-->
|
||||||
|
<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: 80vh; overflow-y: scroll"
|
||||||
|
@node-click="handleNodeClick"
|
||||||
|
:render-content="renderContent"
|
||||||
|
/>
|
||||||
|
</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="gendictryData.regionName"
|
||||||
|
placeholder="请输入"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="依据文件名">
|
||||||
|
<el-input
|
||||||
|
v-model="gendictryData.basisDoc"
|
||||||
|
placeholder="请输入"
|
||||||
|
disabled
|
||||||
|
/>
|
||||||
|
</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>
|
||||||
|
|
||||||
|
<el-dialog :title="title" v-model="gendictry" width="600px" append-to-body>
|
||||||
|
<el-form :model="form" :rules="rules" label-width="100px">
|
||||||
|
<el-form-item label="地区名称">
|
||||||
|
<el-input v-model="form.regionName" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="依据文件名">
|
||||||
|
<el-input v-model="form.basisDoc" placeholder="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<template #footer>
|
||||||
|
<div class="dialog-footer">
|
||||||
|
<el-button type="primary" @click="submitgendictry">确 定</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/technicalPlan/discharge";
|
||||||
|
import {
|
||||||
|
list as waterList,
|
||||||
|
postData as waterPost,
|
||||||
|
putData as waterPut,
|
||||||
|
deleteData as waterDelete,
|
||||||
|
} from "@/api/renovation/technicalPlan/waterQualityRegion";
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const loading = ref();
|
||||||
|
import { ElMessage, ElMessageBox, ElButton } from "element-plus";
|
||||||
|
const data = reactive({
|
||||||
|
form: {},
|
||||||
|
showSearch: false,
|
||||||
|
total: "",
|
||||||
|
title: "",
|
||||||
|
standardList: [],
|
||||||
|
deptOptions: [],
|
||||||
|
multiple: true,
|
||||||
|
single: true,
|
||||||
|
open: false,
|
||||||
|
ids: [],
|
||||||
|
gendictry: false,
|
||||||
|
queryParams: {
|
||||||
|
pageNum: 1,
|
||||||
|
pageSize: 10,
|
||||||
|
region: "",
|
||||||
|
},
|
||||||
|
rules: {},
|
||||||
|
});
|
||||||
|
const gendictryData = ref({});
|
||||||
|
const {
|
||||||
|
queryParams,
|
||||||
|
form,
|
||||||
|
ids,
|
||||||
|
rules,
|
||||||
|
standardList,
|
||||||
|
total,
|
||||||
|
single,
|
||||||
|
showSearch,
|
||||||
|
deptOptions,
|
||||||
|
title,
|
||||||
|
open,
|
||||||
|
gendictry,
|
||||||
|
multiple,
|
||||||
|
} = toRefs(data);
|
||||||
|
|
||||||
|
function submitgendictry() {
|
||||||
|
if (form.value.regionId) {
|
||||||
|
waterPut(form.value).then((res) => {
|
||||||
|
proxy.$modal.msgSuccess("修改成功");
|
||||||
|
gendictry.value = false;
|
||||||
|
getDeptTree();
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
waterPost(form.value).then((res) => {
|
||||||
|
proxy.$modal.msgSuccess("添加成功");
|
||||||
|
gendictry.value = false;
|
||||||
|
getDeptTree();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
function getDeptTree() {
|
||||||
|
waterList().then((response) => {
|
||||||
|
let data = [
|
||||||
|
{
|
||||||
|
id: 101,
|
||||||
|
parentId: 100,
|
||||||
|
label: "所有指标",
|
||||||
|
weight: 1,
|
||||||
|
children: null,
|
||||||
|
},
|
||||||
|
];
|
||||||
|
data[0].children = response.data.map((item, index) => {
|
||||||
|
return {
|
||||||
|
id: item.regionId,
|
||||||
|
parentId: 101,
|
||||||
|
label: item.regionName,
|
||||||
|
weight: 1,
|
||||||
|
val: item,
|
||||||
|
};
|
||||||
|
});
|
||||||
|
deptOptions.value = data;
|
||||||
|
// queryParams.value.regionId = response.data[0].regionId
|
||||||
|
getList();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
/** 查询列表 */
|
||||||
|
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);
|
||||||
|
gendictryData.value = data.val;
|
||||||
|
queryParams.value.regionId = data.id == 101 ? "" : data.id;
|
||||||
|
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;
|
||||||
|
gendictry.value = false;
|
||||||
|
reset();
|
||||||
|
}
|
||||||
|
function handleAddRegion() {
|
||||||
|
form.value = Object.assign({});
|
||||||
|
title.value = "添加区域";
|
||||||
|
gendictry.value = true;
|
||||||
|
}
|
||||||
|
/** 新增按钮操作 */
|
||||||
|
function handleAdd() {
|
||||||
|
reset();
|
||||||
|
title.value = "添加数据";
|
||||||
|
form.value.region = queryParams.value.region;
|
||||||
|
open.value = true;
|
||||||
|
}
|
||||||
|
/** 修改按钮操作 */
|
||||||
|
function handleUpdate(row) {
|
||||||
|
reset();
|
||||||
|
open.value = true;
|
||||||
|
form.value.region = queryParams.value.region;
|
||||||
|
form.value = { ...row };
|
||||||
|
title.value = "修改用户";
|
||||||
|
}
|
||||||
|
/** 提交按钮 */
|
||||||
|
function submitForm() {
|
||||||
|
proxy.$refs["waterRef"].validate((valid) => {
|
||||||
|
form.value.regionId = gendictryData.value.regionId;
|
||||||
|
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();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const renderContent = (h, { node, data, store }) => {
|
||||||
|
if (node.level == 2) {
|
||||||
|
}
|
||||||
|
return h(
|
||||||
|
"div",
|
||||||
|
{
|
||||||
|
class: "custom-tree-node",
|
||||||
|
style: {
|
||||||
|
display: "flex",
|
||||||
|
justifyContent: "space-between",
|
||||||
|
alignItems: "center",
|
||||||
|
width: "100%",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
h("div", null, node.label),
|
||||||
|
|
||||||
|
node.level == 1
|
||||||
|
? ""
|
||||||
|
: h(
|
||||||
|
"div",
|
||||||
|
null,
|
||||||
|
h(
|
||||||
|
ElButton,
|
||||||
|
{
|
||||||
|
type: "primary",
|
||||||
|
link: true,
|
||||||
|
onClick: (e) => exitData(data,e),
|
||||||
|
},
|
||||||
|
"修改"
|
||||||
|
),
|
||||||
|
h(
|
||||||
|
ElButton,
|
||||||
|
{
|
||||||
|
type: "danger",
|
||||||
|
link: true,
|
||||||
|
style: "margin-left: 4px",
|
||||||
|
onClick: (e) => removeData(node, data,e),
|
||||||
|
},
|
||||||
|
"删除"
|
||||||
|
)
|
||||||
|
)
|
||||||
|
);
|
||||||
|
};
|
||||||
|
function exitData(data,e) {
|
||||||
|
|
||||||
|
e.stopPropagation()
|
||||||
|
form.value = Object.assign(data.val);
|
||||||
|
title.value = "编辑区域";
|
||||||
|
gendictry.value = true;
|
||||||
|
}
|
||||||
|
function removeData(node, data,e) {
|
||||||
|
e.stopPropagation()
|
||||||
|
proxy.$modal
|
||||||
|
.confirm("是否确认删除地区为" + data.val.regionName + "的数据项?")
|
||||||
|
.then(function () {
|
||||||
|
return waterDelete(data.val.regionId);
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
getDeptTree();
|
||||||
|
proxy.$modal.msgSuccess("删除成功");
|
||||||
|
})
|
||||||
|
.catch(() => {});
|
||||||
|
}
|
||||||
|
getDeptTree();
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
.custom-tree-node {
|
||||||
|
display: flex;
|
||||||
|
}
|
||||||
|
</style>
|
|
@ -0,0 +1,327 @@
|
||||||
|
<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"
|
||||||
|
width="150"
|
||||||
|
prop="processingCapacity"
|
||||||
|
>
|
||||||
|
<template #default="scope">
|
||||||
|
{{ scope.row.equipmentName }}
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="处理量"
|
||||||
|
width="90"
|
||||||
|
align="center"
|
||||||
|
prop="capacityTonnage"
|
||||||
|
/>
|
||||||
|
|
||||||
|
<el-table-column align="center" label="组件能耗">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-table
|
||||||
|
:data="scope.row.componentConsumption"
|
||||||
|
style="width: 100%"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
prop="componentName"
|
||||||
|
label="组件名称 "
|
||||||
|
width="180"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
prop="componentParam"
|
||||||
|
label="组件参数"
|
||||||
|
width="180"
|
||||||
|
/>
|
||||||
|
<el-table-column prop="totalQuantity" label="总数量" />
|
||||||
|
<el-table-column prop="runQuantity" label="运行数量" />
|
||||||
|
<el-table-column prop="singlePower" label="单个功率" />
|
||||||
|
<el-table-column prop="installedPower" label="安装功率" />
|
||||||
|
<el-table-column prop="runtime" label="运行时间" />
|
||||||
|
<el-table-column prop="dailyConsumption" label="日均能耗 " />
|
||||||
|
</el-table>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
|
||||||
|
<el-table-column
|
||||||
|
label="所有组件总数"
|
||||||
|
align="center"
|
||||||
|
width="120"
|
||||||
|
prop="sumTotalQuantity"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="所有组件总装机功率"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
prop="sumInstalledPower"
|
||||||
|
/>
|
||||||
|
<el-table-column
|
||||||
|
label="所有组件总日均能耗"
|
||||||
|
align="center"
|
||||||
|
width="150"
|
||||||
|
prop="sumDailyConsumption"
|
||||||
|
/>
|
||||||
|
</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="请输入" />
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="风机运行时间" prop="nickName">
|
||||||
|
<el-input v-model="form.fanRuntime" placeholder="请输入" />
|
||||||
|
</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/technicalplan/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,
|
||||||
|
};
|
||||||
|
|
||||||
|
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,553 @@
|
||||||
|
<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.country"
|
||||||
|
placeholder="地区名称"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="公司名称" >
|
||||||
|
<el-input
|
||||||
|
v-model="form.companyName"
|
||||||
|
placeholder="公司名称"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="24">
|
||||||
|
<el-form-item label="方案名称" >
|
||||||
|
<el-input
|
||||||
|
v-model="form.planName"
|
||||||
|
placeholder="方案名称"
|
||||||
|
|
||||||
|
/>
|
||||||
|
</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 equipment_type_foreign"
|
||||||
|
:key="item.value"
|
||||||
|
:label="item.label"
|
||||||
|
:value="item.value"
|
||||||
|
/>
|
||||||
|
</el-select>
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
|
||||||
|
</el-row>
|
||||||
|
<scsb ref="scsbRef" v-if="open" :citytype="citytype" :planType="form.planType" 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/technicalplan/index";
|
||||||
|
|
||||||
|
import {
|
||||||
|
treeRegionLevel,
|
||||||
|
|
||||||
|
} from "@/api/renovation/technicalplan/discharge";
|
||||||
|
|
||||||
|
const { proxy } = getCurrentInstance();
|
||||||
|
const { equipment_type_foreign } = proxy.useDict("equipment_type_foreign");
|
||||||
|
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(
|
||||||
|
"/technicalPlanForeign/export/word",
|
||||||
|
{
|
||||||
|
planId: item.planId,
|
||||||
|
},
|
||||||
|
`${item.planName}.xlsx`,
|
||||||
|
{
|
||||||
|
baseURL: "/plan-api",
|
||||||
|
}
|
||||||
|
);
|
||||||
|
};
|
||||||
|
const handleWorld = (item) => {
|
||||||
|
excel(item.planId);
|
||||||
|
proxy.download(
|
||||||
|
"/technicalPlanForeign/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("/technicalPlanForeign/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>
|
|
@ -302,7 +302,7 @@ const generateData = () => {
|
||||||
};
|
};
|
||||||
// generateData().then((res) => {
|
// generateData().then((res) => {
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
// debugger
|
//
|
||||||
// userData.value = res;
|
// userData.value = res;
|
||||||
// });
|
// });
|
||||||
/** 提交按钮 */
|
/** 提交按钮 */
|
||||||
|
|
|
@ -403,7 +403,7 @@ const { queryParams, form, rules } = toRefs(data);
|
||||||
/** 通过条件过滤节点 */
|
/** 通过条件过滤节点 */
|
||||||
const filterNode = (value, data) => {
|
const filterNode = (value, data) => {
|
||||||
if (!value) return true;
|
if (!value) return true;
|
||||||
debugger
|
|
||||||
return data.label.indexOf(value) !== -1;
|
return data.label.indexOf(value) !== -1;
|
||||||
};
|
};
|
||||||
/** 根据名称筛选部门树 */
|
/** 根据名称筛选部门树 */
|
||||||
|
|
|
@ -26,7 +26,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="楼层:" prop="houseFloors">
|
<el-form-item label="楼层:" prop="houseFloors">
|
||||||
<el-input v-model="form.houseFloors" type="number" placeholder="请输入" class="inputCss" />
|
<el-input v-model="form.houseFloors" type="number" placeholder="请输入" class="inputCss" />
|
||||||
<label for="" style="color: #fff;">({{maxHouseFloors}}~{{minHouseFloors}})</label>
|
<!-- <label for="" style="color: #fff;">({{maxHouseFloors}}~{{minHouseFloors}})</label> -->
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="面积:" prop="area">
|
<el-form-item label="面积:" prop="area">
|
||||||
|
@ -121,33 +121,9 @@ const rules=ref( {
|
||||||
])
|
])
|
||||||
const maxHouseFloors = ref('')
|
const maxHouseFloors = ref('')
|
||||||
const minHouseFloors = ref('')
|
const minHouseFloors = ref('')
|
||||||
onMounted(() => {
|
|
||||||
|
|
||||||
let lineId = form.value.geometryId
|
|
||||||
let graphics =ldMap.sketchLayer.polygonLayer.sublayers.items
|
|
||||||
let garphic = graphics.filter(element => {
|
|
||||||
return element.id == lineId
|
|
||||||
})[0];
|
|
||||||
let center = [[garphic.geometry.centroid.x,garphic.geometry.centroid.y]]
|
|
||||||
getElevation({
|
|
||||||
layersId:props.layerId,
|
|
||||||
geoJsonData:[...center,...garphic.geometry.rings[0]]
|
|
||||||
}).then(res=>{
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
const [maxNumber, minNumber] = getMaxAndMin(res.data);
|
|
||||||
maxHouseFloors.value=maxNumber
|
|
||||||
minHouseFloors.value=minNumber
|
|
||||||
console.log(`最大数: ${maxNumber}`);
|
|
||||||
console.log(`最小数: ${minNumber}`);
|
|
||||||
console.log(`楼层差: ${maxNumber}-${minNumber}`+(maxNumber-minNumber));
|
|
||||||
form.value.houseFloors= parseInt( (maxNumber-minNumber)/3)
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
|
|
||||||
})
|
|
||||||
function getMaxAndMin(numbers) {
|
function getMaxAndMin(numbers) {
|
||||||
const max = Math.max(...numbers);
|
const max = Math.max(...numbers);
|
||||||
const min = Math.min(...numbers);
|
const min = Math.min(...numbers);
|
||||||
|
|
|
@ -34,8 +34,6 @@
|
||||||
>
|
>
|
||||||
<el-table-column type="index" width="55" label="序号" />
|
<el-table-column type="index" width="55" label="序号" />
|
||||||
<el-table-column prop="name" show-overflow-tooltip label="文件" />
|
<el-table-column prop="name" show-overflow-tooltip label="文件" />
|
||||||
|
|
||||||
|
|
||||||
<el-table-column label="操作" align="center" prop="unit" >
|
<el-table-column label="操作" align="center" prop="unit" >
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<div style="display: flex;justify-content: center;">
|
<div style="display: flex;justify-content: center;">
|
||||||
|
|
|
@ -365,14 +365,15 @@ onMounted(() => {
|
||||||
treeHeight.value = window.innerHeight - 258;
|
treeHeight.value = window.innerHeight - 258;
|
||||||
};
|
};
|
||||||
tableDate.value = house.value;
|
tableDate.value = house.value;
|
||||||
$ldMap.initMap().then((e) => {
|
getLayerList().then(() => {
|
||||||
getLayerList().then(() => {
|
let firstData =layerslist.value[0]
|
||||||
if (layerslist.value) {
|
selectLayer(firstData.id);
|
||||||
selectLayer(layerslist.value[0].id);
|
getlegend();
|
||||||
}
|
|
||||||
|
|
||||||
});
|
});
|
||||||
getlegend();
|
|
||||||
});
|
|
||||||
emitter.on("loadLayer", () => {
|
emitter.on("loadLayer", () => {
|
||||||
getLayerList();
|
getLayerList();
|
||||||
});
|
});
|
||||||
|
@ -483,10 +484,16 @@ function selectLayer(e) {
|
||||||
console.log(item);
|
console.log(item);
|
||||||
layerId.value = item.id;
|
layerId.value = item.id;
|
||||||
layerName.value = item.layerName
|
layerName.value = item.layerName
|
||||||
$ldMap.addLayer({
|
$ldMap.initMap(item.coordinateSystem.epsg).then((e) => {
|
||||||
|
|
||||||
|
$ldMap.addLayer({
|
||||||
url: item.layerUrl,
|
url: item.layerUrl,
|
||||||
id: e,
|
id: e,
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
|
@ -421,9 +421,7 @@ function addPointMap(val) {
|
||||||
$ldMap.addDefaultByPoint(data);
|
$ldMap.addDefaultByPoint(data);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
function getAllMapData() {
|
|
||||||
$ldMap.getAllData();
|
|
||||||
}
|
|
||||||
function cutPolygon() {
|
function cutPolygon() {
|
||||||
let { flag, data } = cut();
|
let { flag, data } = cut();
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
@ -571,11 +569,12 @@ function setPolygonData() {
|
||||||
$ldMap.addDeviceData(mapdata.station, "Station");
|
$ldMap.addDeviceData(mapdata.station, "Station");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function exportCad(){
|
function exportCad(){
|
||||||
// exporGis()
|
// exporGis()
|
||||||
if(profilesId.value){
|
if(profilesId.value){
|
||||||
proxy.download("/pipe/recognition/exportCad?profilesId="+profilesId.value, {},
|
proxy.download("/pipe/recognition/exportCad?profilesId="+profilesId.value, {},
|
||||||
`${layerName.value}.dxf`,{
|
`${layerName.value}.dwg`,{
|
||||||
baseURL: "/map-api"
|
baseURL: "/map-api"
|
||||||
},true);
|
},true);
|
||||||
|
|
||||||
|
|
|
@ -30,6 +30,7 @@
|
||||||
v-model="findValue"
|
v-model="findValue"
|
||||||
style="background: rgb(0, 0, 0, 0.4)"
|
style="background: rgb(0, 0, 0, 0.4)"
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
:before-close="closeWaitDialog"
|
||||||
width="30%"
|
width="30%"
|
||||||
>
|
>
|
||||||
<template #header="{ close, titleId, titleClass }">
|
<template #header="{ close, titleId, titleClass }">
|
||||||
|
@ -135,10 +136,7 @@
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="
|
@click="closeBtn"
|
||||||
findValue = false;
|
|
||||||
loading = false;
|
|
||||||
"
|
|
||||||
>取消</el-button
|
>取消</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -148,6 +146,7 @@
|
||||||
v-model="lineValue"
|
v-model="lineValue"
|
||||||
title=""
|
title=""
|
||||||
:close-on-click-modal="false"
|
:close-on-click-modal="false"
|
||||||
|
:before-close="closeWaitDialog"
|
||||||
width="30%"
|
width="30%"
|
||||||
>
|
>
|
||||||
<template #header="{ close, titleId, titleClass }">
|
<template #header="{ close, titleId, titleClass }">
|
||||||
|
@ -253,10 +252,7 @@
|
||||||
>
|
>
|
||||||
<el-button
|
<el-button
|
||||||
type="warning"
|
type="warning"
|
||||||
@click="
|
@click="closeBtn"
|
||||||
lineValue = false;
|
|
||||||
loading = false;
|
|
||||||
"
|
|
||||||
>取消</el-button
|
>取消</el-button
|
||||||
>
|
>
|
||||||
</div>
|
</div>
|
||||||
|
@ -407,6 +403,7 @@ import html2canvas from "html2canvas";
|
||||||
import { ElMessage } from "element-plus";
|
import { ElMessage } from "element-plus";
|
||||||
const $ldMap = inject("$ldMap"); // 调用全局变量
|
const $ldMap = inject("$ldMap"); // 调用全局变量
|
||||||
const $ldBox = inject("$ldBox"); // 调用全局变量
|
const $ldBox = inject("$ldBox"); // 调用全局变量
|
||||||
|
import { ElMessageBox } from 'element-plus'
|
||||||
const componentId = ref(sjLeft);
|
const componentId = ref(sjLeft);
|
||||||
const comid = ref("sj");
|
const comid = ref("sj");
|
||||||
const changemenu = (e) => {
|
const changemenu = (e) => {
|
||||||
|
@ -439,10 +436,13 @@ const posterimg = ref();
|
||||||
|
|
||||||
let mapdata = useMapDataStore();
|
let mapdata = useMapDataStore();
|
||||||
let mapLog = useMapLogStore();
|
let mapLog = useMapLogStore();
|
||||||
const { sseData, profilesList, secen } = storeToRefs(mapdata);
|
const { sseData, profilesList, secen,clientId } = storeToRefs(mapdata);
|
||||||
|
|
||||||
const setFlag = ref(false);
|
const setFlag = ref(false);
|
||||||
const priceRef = ref();
|
const priceRef = ref();
|
||||||
|
watch(clientId,(val)=>{
|
||||||
|
loading.value=Boolean(val)
|
||||||
|
})
|
||||||
watch(setFlag, (val) => {
|
watch(setFlag, (val) => {
|
||||||
!val && priceRef.value.init();
|
!val && priceRef.value.init();
|
||||||
});
|
});
|
||||||
|
@ -523,9 +523,6 @@ const verificationChange = () => {
|
||||||
const findValue = ref<Boolean>(false);
|
const findValue = ref<Boolean>(false);
|
||||||
const lineValue = ref<Boolean>(false);
|
const lineValue = ref<Boolean>(false);
|
||||||
const loading = ref(false);
|
const loading = ref(false);
|
||||||
watch([lineValue, findValue], (val) => {
|
|
||||||
!val[0] && !val[1] && (loading.value = false);
|
|
||||||
});
|
|
||||||
const setFindVal = (e) => {
|
const setFindVal = (e) => {
|
||||||
mapdata.getProfilesList().then((res) => {
|
mapdata.getProfilesList().then((res) => {
|
||||||
findValue.value = e;
|
findValue.value = e;
|
||||||
|
@ -541,7 +538,7 @@ const setLineVal = (e) => {
|
||||||
|
|
||||||
const current = ref("");
|
const current = ref("");
|
||||||
const handleCurrentChange = (e) => {
|
const handleCurrentChange = (e) => {
|
||||||
current.value = e.id;
|
e&&(current.value = e.id)
|
||||||
};
|
};
|
||||||
const profilesDelete = (e) => {
|
const profilesDelete = (e) => {
|
||||||
mapdata
|
mapdata
|
||||||
|
@ -552,10 +549,38 @@ const profilesDelete = (e) => {
|
||||||
})
|
})
|
||||||
.catch((e) => {});
|
.catch((e) => {});
|
||||||
};
|
};
|
||||||
|
function closeBtn(){
|
||||||
|
closeWaitDialog(()=>{
|
||||||
|
|
||||||
|
lineValue.value=false;
|
||||||
|
findValue.value = false;
|
||||||
|
loading.value = false;
|
||||||
|
})
|
||||||
|
}
|
||||||
|
function closeWaitDialog(fun){
|
||||||
|
|
||||||
|
console.log(clientId.value)
|
||||||
|
if(clientId.value){
|
||||||
|
ElMessageBox.confirm("数据加载中,是否确定关闭", {
|
||||||
|
confirmButtonText: "关闭",
|
||||||
|
cancelButtonText: "取消",
|
||||||
|
type: "warning",
|
||||||
|
})
|
||||||
|
.then(() => {
|
||||||
|
|
||||||
|
mapdata.closeSse();
|
||||||
|
fun();
|
||||||
|
})
|
||||||
|
.catch(() => {
|
||||||
|
|
||||||
|
});
|
||||||
|
}else{
|
||||||
|
fun();
|
||||||
|
}
|
||||||
|
}
|
||||||
const priceFlag = ref(false);
|
const priceFlag = ref(false);
|
||||||
function findArea(override) {
|
function findArea(override) {
|
||||||
loading.value = true;
|
// loading.value = true;
|
||||||
$ldMap.removeAllLayer();
|
$ldMap.removeAllLayer();
|
||||||
if (override) {
|
if (override) {
|
||||||
mapdata
|
mapdata
|
||||||
|
@ -563,8 +588,9 @@ function findArea(override) {
|
||||||
.then(() => {
|
.then(() => {
|
||||||
setValue();
|
setValue();
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch((e) => {
|
||||||
loading.value = false;
|
|
||||||
|
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
if (current.value) {
|
if (current.value) {
|
||||||
|
@ -587,6 +613,7 @@ function findArea(override) {
|
||||||
actionType: "data", //add,exit,del,
|
actionType: "data", //add,exit,del,
|
||||||
isrevoke: false, //是否允许撤回,
|
isrevoke: false, //是否允许撤回,
|
||||||
});
|
});
|
||||||
|
$ldMap.removeAllLayer();
|
||||||
$ldMap.addDefaultData(mapdata.road, "Road");
|
$ldMap.addDefaultData(mapdata.road, "Road");
|
||||||
$ldMap.addDefaultData(mapdata.house, "House");
|
$ldMap.addDefaultData(mapdata.house, "House");
|
||||||
$ldMap.addDefaultData(mapdata.river, "River");
|
$ldMap.addDefaultData(mapdata.river, "River");
|
||||||
|
@ -595,7 +622,7 @@ function findArea(override) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
function findLine(override) {
|
function findLine(override) {
|
||||||
loading.value = true;
|
// loading.value = true;
|
||||||
if(override){
|
if(override){
|
||||||
mapdata
|
mapdata
|
||||||
.setLineData(override)
|
.setLineData(override)
|
||||||
|
@ -603,7 +630,7 @@ function findLine(override) {
|
||||||
setLine()
|
setLine()
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
loading.value = false;
|
// loading.value = false;
|
||||||
});
|
});
|
||||||
|
|
||||||
}else{
|
}else{
|
||||||
|
|
|
@ -24,6 +24,7 @@ const useMapDataStore = defineStore(
|
||||||
'mapData',
|
'mapData',
|
||||||
{
|
{
|
||||||
state: () => ({
|
state: () => ({
|
||||||
|
source:null,
|
||||||
profilesList: [],
|
profilesList: [],
|
||||||
profilesId: '',
|
profilesId: '',
|
||||||
layerId: '',
|
layerId: '',
|
||||||
|
@ -117,7 +118,7 @@ const useMapDataStore = defineStore(
|
||||||
|
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
reject()
|
reject(err)
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
recognitionload({ layersId: this.layerId, override }).then(res => {
|
recognitionload({ layersId: this.layerId, override }).then(res => {
|
||||||
|
@ -252,16 +253,27 @@ const useMapDataStore = defineStore(
|
||||||
});
|
});
|
||||||
this.house = houseData;
|
this.house = houseData;
|
||||||
},
|
},
|
||||||
|
closeSse(){
|
||||||
|
let self = this;
|
||||||
|
sseClose(self.clientId).then(res=>{
|
||||||
|
self.clientId = ''
|
||||||
|
|
||||||
|
|
||||||
|
})
|
||||||
|
},
|
||||||
sseConfig(type) {
|
sseConfig(type) {
|
||||||
let self = this;
|
let self = this;
|
||||||
self.sseData = []
|
self.sseData = []
|
||||||
self.clientId = ''
|
if(self.clientId){
|
||||||
|
this.closeSse()
|
||||||
|
}
|
||||||
|
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
let base = '/map-api';
|
let base = '/map-api';
|
||||||
let url = `${base}/sse/connect/`;
|
let url = `${base}/sse/connect/`;
|
||||||
|
|
||||||
var es = new EventSourcePolyfill(url, {
|
self.source = new EventSourcePolyfill(url, {
|
||||||
heartbeatTimeout: 10000000,
|
heartbeatTimeout: 10000000,
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: 'Bearer ' + getToken()
|
Authorization: 'Bearer ' + getToken()
|
||||||
|
@ -269,12 +281,12 @@ const useMapDataStore = defineStore(
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
es.onopen = function (event) {
|
self.source.onopen = function (event) {
|
||||||
console.log("连接成功", event);
|
console.log("连接成功", event);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
es.onmessage = function (event) {
|
self.source.onmessage = function (event) {
|
||||||
// to to something…
|
// to to something…
|
||||||
console.log("接收信息", event);
|
console.log("接收信息", event);
|
||||||
// console.log(event.data)
|
// console.log(event.data)
|
||||||
|
@ -284,14 +296,19 @@ const useMapDataStore = defineStore(
|
||||||
case 'clientId': setRecogn(data.data); break;
|
case 'clientId': setRecogn(data.data); break;
|
||||||
case 'text': self.sseData.push(data); break;
|
case 'text': self.sseData.push(data); break;
|
||||||
case 'data': setdata(data.data); break;
|
case 'data': setdata(data.data); break;
|
||||||
|
case 'error': errordata(data.data); break;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
function setRecogn(clientId) {
|
function setRecogn(clientId) {
|
||||||
if (!self.clientId) {
|
if (!self.clientId) {
|
||||||
self.clientId = clientId
|
self.clientId = clientId
|
||||||
if (type == 'recognition') {
|
if (type == 'recognition') {
|
||||||
recognitionreload({ layersId: self.layerId, clientId })
|
recognitionreload({ layersId: self.layerId, clientId }).then(res=>{
|
||||||
|
|
||||||
|
}).catch(err => {
|
||||||
|
|
||||||
|
self.closeSse()
|
||||||
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
pipelinereload({ layersId: self.layerId, clientId })
|
pipelinereload({ layersId: self.layerId, clientId })
|
||||||
|
@ -304,9 +321,7 @@ const useMapDataStore = defineStore(
|
||||||
let text = (type == 'recognition' ? '特征物识别' : '布线') + '结束,关闭并刷新?点击确定刷新,点击取消停留当前页面'
|
let text = (type == 'recognition' ? '特征物识别' : '布线') + '结束,关闭并刷新?点击确定刷新,点击取消停留当前页面'
|
||||||
ElMessageBox.confirm(text, '识别提示',
|
ElMessageBox.confirm(text, '识别提示',
|
||||||
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
{ confirmButtonText: '确定', cancelButtonText: '取消', type: 'warning' }).then(() => {
|
||||||
|
self.closeSse()
|
||||||
self.clientId = ''
|
|
||||||
es.close()
|
|
||||||
resolve(data)
|
resolve(data)
|
||||||
|
|
||||||
}).catch(() => {
|
}).catch(() => {
|
||||||
|
@ -314,12 +329,18 @@ const useMapDataStore = defineStore(
|
||||||
reject()
|
reject()
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
function errordata(text){
|
||||||
|
ElMessageBox.confirm(text, '错误提示',
|
||||||
|
{ confirmButtonText: '关闭',showCancelButton:false, type: 'warning' }).then(() => {
|
||||||
|
self.clientId=''
|
||||||
|
});
|
||||||
|
|
||||||
es.onerror = function (error) {
|
}
|
||||||
|
|
||||||
|
self.source = function (error) {
|
||||||
// 监听错误
|
// 监听错误
|
||||||
console.log("错误", error);
|
console.log("错误", error);
|
||||||
self.clientId = ''
|
self.clientId = ''
|
||||||
es.close()
|
|
||||||
// reject()
|
// reject()
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|
|
@ -1,128 +1,268 @@
|
||||||
const tk="0eab750b26cdeee155e8c4f2310b53ef"
|
const tk="0eab750b26cdeee155e8c4f2310b53ef"
|
||||||
const TileInfoData={
|
const TileInfoData={
|
||||||
infoData:{
|
infoData:function (wkid:number){
|
||||||
dpi: 90.71428571427429, // 切片方案的每英寸点数(即像素)。
|
let data = {
|
||||||
size: 256, // 设置每个瓷砖的高度和宽度为[256, 256]像素。
|
'4326':{
|
||||||
origin: {
|
dpi: 90.71428571427429, // 切片方案的每英寸点数(即像素)。
|
||||||
// 切片方案的原点。
|
size: 256, // 设置每个瓷砖的高度和宽度为[256, 256]像素。
|
||||||
type: "point",
|
origin: {
|
||||||
x: -180,
|
// 切片方案的原点。
|
||||||
y: 90,
|
type: "point",
|
||||||
spatialReference: { wkid: 4326 },
|
x: -180,
|
||||||
},
|
y: 90,
|
||||||
spatialReference: { wkid: 4326 },
|
spatialReference: { wkid: wkid },
|
||||||
lods: [
|
},
|
||||||
// 定义平铺方案的详细级别数组。
|
spatialReference: { wkid: wkid },
|
||||||
{
|
lods: [
|
||||||
level: 2,
|
// 定义平铺方案的详细级别数组。
|
||||||
levelValue: 2,
|
{
|
||||||
resolution: 0.3515625,
|
level: 2,
|
||||||
scale: 147748796.52937502,
|
levelValue: 2,
|
||||||
|
resolution: 0.3515625,
|
||||||
|
scale: 147748796.52937502,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 3,
|
||||||
|
levelValue: 3,
|
||||||
|
resolution: 0.17578125,
|
||||||
|
scale: 73874398.264687508,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 4,
|
||||||
|
levelValue: 4,
|
||||||
|
resolution: 0.087890625,
|
||||||
|
scale: 36937199.132343754,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 5,
|
||||||
|
levelValue: 5,
|
||||||
|
resolution: 0.0439453125,
|
||||||
|
scale: 18468599.566171877,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 6,
|
||||||
|
levelValue: 6,
|
||||||
|
resolution: 0.02197265625,
|
||||||
|
scale: 9234299.7830859385,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 7,
|
||||||
|
levelValue: 7,
|
||||||
|
resolution: 0.010986328125,
|
||||||
|
scale: 4617149.8915429693,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 8,
|
||||||
|
levelValue: 8,
|
||||||
|
resolution: 0.0054931640625,
|
||||||
|
scale: 2308574.9457714846,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 9,
|
||||||
|
levelValue: 9,
|
||||||
|
resolution: 0.00274658203125,
|
||||||
|
scale: 1154287.4728857423,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 10,
|
||||||
|
levelValue: 10,
|
||||||
|
resolution: 0.001373291015625,
|
||||||
|
scale: 577143.73644287116,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 11,
|
||||||
|
levelValue: 11,
|
||||||
|
resolution: 0.0006866455078125,
|
||||||
|
scale: 288571.86822143558,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 12,
|
||||||
|
levelValue: 12,
|
||||||
|
resolution: 0.00034332275390625,
|
||||||
|
scale: 144285.93411071779,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 13,
|
||||||
|
levelValue: 13,
|
||||||
|
resolution: 0.000171661376953125,
|
||||||
|
scale: 72142.967055358895,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 14,
|
||||||
|
levelValue: 14,
|
||||||
|
resolution: 8.58306884765625e-5,
|
||||||
|
scale: 36071.483527679447,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 15,
|
||||||
|
levelValue: 15,
|
||||||
|
resolution: 4.291534423828125e-5,
|
||||||
|
scale: 18035.741763839724,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 16,
|
||||||
|
levelValue: 16,
|
||||||
|
resolution: 2.1457672119140625e-5,
|
||||||
|
scale: 9017.8708819198619,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 17,
|
||||||
|
levelValue: 17,
|
||||||
|
resolution: 1.0728836059570313e-5,
|
||||||
|
scale: 4508.9354409599309,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 18,
|
||||||
|
levelValue: 18,
|
||||||
|
resolution: 5.3644180297851563e-6,
|
||||||
|
scale: 2254.4677204799655,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 19,
|
||||||
|
levelValue: 19,
|
||||||
|
resolution: 2.68220901489257815e-6,
|
||||||
|
scale: 1127.23386023998275,
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
{
|
'4490':{
|
||||||
level: 3,
|
dpi: 96,
|
||||||
levelValue: 3,
|
rows: 256,
|
||||||
resolution: 0.17578125,
|
cols: 256,
|
||||||
scale: 73874398.264687508,
|
compressionQuality: 0,
|
||||||
},
|
origin: {
|
||||||
{
|
x: -180,
|
||||||
level: 4,
|
y: 90
|
||||||
levelValue: 4,
|
},
|
||||||
resolution: 0.087890625,
|
spatialReference: {
|
||||||
scale: 36937199.132343754,
|
wkid: 4490
|
||||||
},
|
},
|
||||||
{
|
lods: [
|
||||||
level: 5,
|
{
|
||||||
levelValue: 5,
|
level: 1,
|
||||||
resolution: 0.0439453125,
|
levelValue: 1,
|
||||||
scale: 18468599.566171877,
|
resolution: 0.703125,
|
||||||
},
|
scale: 295497593.05875003
|
||||||
{
|
},
|
||||||
level: 6,
|
{
|
||||||
levelValue: 6,
|
level: 2,
|
||||||
resolution: 0.02197265625,
|
levelValue: 2,
|
||||||
scale: 9234299.7830859385,
|
resolution: 0.3515625,
|
||||||
},
|
scale: 147748796.52937502
|
||||||
{
|
},
|
||||||
level: 7,
|
{
|
||||||
levelValue: 7,
|
level: 3,
|
||||||
resolution: 0.010986328125,
|
levelValue: 3,
|
||||||
scale: 4617149.8915429693,
|
resolution: 0.17578125,
|
||||||
},
|
scale: 73874398.264687508
|
||||||
{
|
},
|
||||||
level: 8,
|
{
|
||||||
levelValue: 8,
|
level: 4,
|
||||||
resolution: 0.0054931640625,
|
levelValue: 4,
|
||||||
scale: 2308574.9457714846,
|
resolution: 0.087890625,
|
||||||
},
|
scale: 36937199.132343754
|
||||||
{
|
},
|
||||||
level: 9,
|
{
|
||||||
levelValue: 9,
|
level: 5,
|
||||||
resolution: 0.00274658203125,
|
levelValue: 5,
|
||||||
scale: 1154287.4728857423,
|
resolution: 0.0439453125,
|
||||||
},
|
scale: 18468599.566171877
|
||||||
{
|
},
|
||||||
level: 10,
|
{
|
||||||
levelValue: 10,
|
level: 6,
|
||||||
resolution: 0.001373291015625,
|
levelValue: 6,
|
||||||
scale: 577143.73644287116,
|
resolution: 0.02197265625,
|
||||||
},
|
scale: 9234299.7830859385
|
||||||
{
|
},
|
||||||
level: 11,
|
{
|
||||||
levelValue: 11,
|
level: 7,
|
||||||
resolution: 0.0006866455078125,
|
levelValue: 7,
|
||||||
scale: 288571.86822143558,
|
resolution: 0.010986328125,
|
||||||
},
|
scale: 4617149.8915429693
|
||||||
{
|
},
|
||||||
level: 12,
|
{
|
||||||
levelValue: 12,
|
level: 8,
|
||||||
resolution: 0.00034332275390625,
|
levelValue: 8,
|
||||||
scale: 144285.93411071779,
|
resolution: 0.0054931640625,
|
||||||
},
|
scale: 2308574.9457714846
|
||||||
{
|
},
|
||||||
level: 13,
|
{
|
||||||
levelValue: 13,
|
level: 9,
|
||||||
resolution: 0.000171661376953125,
|
levelValue: 9,
|
||||||
scale: 72142.967055358895,
|
resolution: 0.00274658203125,
|
||||||
},
|
scale: 1154287.4728857423
|
||||||
{
|
},
|
||||||
level: 14,
|
{
|
||||||
levelValue: 14,
|
level: 10,
|
||||||
resolution: 8.58306884765625e-5,
|
levelValue: 10,
|
||||||
scale: 36071.483527679447,
|
resolution: 0.001373291015625,
|
||||||
},
|
scale: 577143.73644287116
|
||||||
{
|
},
|
||||||
level: 15,
|
{
|
||||||
levelValue: 15,
|
level: 11,
|
||||||
resolution: 4.291534423828125e-5,
|
levelValue: 11,
|
||||||
scale: 18035.741763839724,
|
resolution: 0.0006866455078125,
|
||||||
},
|
scale: 288571.86822143558
|
||||||
{
|
},
|
||||||
level: 16,
|
{
|
||||||
levelValue: 16,
|
level: 12,
|
||||||
resolution: 2.1457672119140625e-5,
|
levelValue: 12,
|
||||||
scale: 9017.8708819198619,
|
resolution: 0.00034332275390625,
|
||||||
},
|
scale: 144285.93411071779
|
||||||
{
|
},
|
||||||
level: 17,
|
{
|
||||||
levelValue: 17,
|
level: 13,
|
||||||
resolution: 1.0728836059570313e-5,
|
levelValue: 13,
|
||||||
scale: 4508.9354409599309,
|
resolution: 0.000171661376953125,
|
||||||
},
|
scale: 72142.967055358895
|
||||||
{
|
},
|
||||||
level: 18,
|
{
|
||||||
levelValue: 18,
|
level: 14,
|
||||||
resolution: 5.3644180297851563e-6,
|
levelValue: 14,
|
||||||
scale: 2254.4677204799655,
|
resolution: 8.58306884765625e-5,
|
||||||
},
|
scale: 36071.483527679447
|
||||||
{
|
},
|
||||||
level: 19,
|
{
|
||||||
levelValue: 19,
|
level: 15,
|
||||||
resolution: 2.68220901489257815e-6,
|
levelValue: 15,
|
||||||
scale: 1127.23386023998275,
|
resolution: 4.291534423828125e-5,
|
||||||
},
|
scale: 18035.741763839724
|
||||||
],
|
},
|
||||||
|
{
|
||||||
|
level: 16,
|
||||||
|
levelValue: 16,
|
||||||
|
resolution: 2.1457672119140625e-5,
|
||||||
|
scale: 9017.8708819198619
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 17,
|
||||||
|
levelValue: 17,
|
||||||
|
resolution: 1.0728836059570313e-5,
|
||||||
|
scale: 4508.9354409599309
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 18,
|
||||||
|
levelValue: 18,
|
||||||
|
resolution: 5.3644180297851563e-6,
|
||||||
|
scale: 2254.4677204799655
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 19,
|
||||||
|
levelValue: 19,
|
||||||
|
resolution: 2.68220901489257815e-6,
|
||||||
|
scale: 1127.23386023998275
|
||||||
|
},
|
||||||
|
{
|
||||||
|
level: 20,
|
||||||
|
levelValue: 20,
|
||||||
|
resolution: 1.341104507446289075e-6,
|
||||||
|
scale: 563.616930119991375
|
||||||
|
}
|
||||||
|
]
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return data[wkid]
|
||||||
},
|
},
|
||||||
img_c: "http://{subDomain}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=" +tk,
|
img_c: "http://{subDomain}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=" +tk,
|
||||||
cia_c: "http://{subDomain}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=" +tk
|
cia_c: "http://{subDomain}.tianditu.gov.cn/img_c/wmts?SERVICE=WMTS&REQUEST=GetTile&VERSION=1.0.0&LAYER=img&STYLE=default&TILEMATRIXSET=c&FORMAT=tiles&TILEMATRIX={level}&TILEROW={row}&TILECOL={col}&tk=" +tk
|
||||||
|
|
|
@ -4,6 +4,7 @@ import TianData from './Tmap'
|
||||||
import TileInfo from "@arcgis/core/layers/support/TileInfo";
|
import TileInfo from "@arcgis/core/layers/support/TileInfo";
|
||||||
import WebTileLayer from "@arcgis/core/layers/WebTileLayer";
|
import WebTileLayer from "@arcgis/core/layers/WebTileLayer";
|
||||||
import TileLayer from "@arcgis/core/layers/TileLayer.js";
|
import TileLayer from "@arcgis/core/layers/TileLayer.js";
|
||||||
|
import MapImageLayer from "@arcgis/core/layers/MapImageLayer.js";
|
||||||
import Draw from "@arcgis/core/views/draw/Draw.js";
|
import Draw from "@arcgis/core/views/draw/Draw.js";
|
||||||
import Polyline from "@arcgis/core/geometry/Polyline.js";
|
import Polyline from "@arcgis/core/geometry/Polyline.js";
|
||||||
import Polygon from "@arcgis/core/geometry/Polygon.js";
|
import Polygon from "@arcgis/core/geometry/Polygon.js";
|
||||||
|
@ -69,65 +70,70 @@ const ldMap = {
|
||||||
hightlayer: '',
|
hightlayer: '',
|
||||||
pngLayer: null,
|
pngLayer: null,
|
||||||
selectPng: '',
|
selectPng: '',
|
||||||
|
wkid: null,
|
||||||
//初始化地图
|
//初始化地图
|
||||||
initMap: function () {
|
initMap: function (wkid) {
|
||||||
|
|
||||||
self = this;
|
self = this;
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
|
|
||||||
let tileInfo = new TileInfo(TianData.infoData);
|
if (wkid == self.wkid) {
|
||||||
|
resolve()
|
||||||
|
|
||||||
let defaultInfo = {
|
} else {
|
||||||
subDomains: ["t1"],
|
let tileInfo = new TileInfo(TianData.infoData(wkid));
|
||||||
spatialReference: {
|
self.wkid = wkid
|
||||||
wkid: 4326,
|
let defaultInfo = {
|
||||||
},
|
subDomains: ["t1"],
|
||||||
tileInfo: tileInfo,
|
spatialReference: {
|
||||||
}
|
wkid: wkid,
|
||||||
let imageBasemapLayer = new WebTileLayer({
|
},
|
||||||
...defaultInfo,
|
tileInfo: tileInfo,
|
||||||
urlTemplate: TianData.img_c
|
}
|
||||||
})
|
let imageBasemapLayer = new WebTileLayer({
|
||||||
let imageNoteLayer = new WebTileLayer({
|
...defaultInfo,
|
||||||
...defaultInfo,
|
urlTemplate: TianData.img_c
|
||||||
urlTemplate: TianData.cia_c
|
})
|
||||||
})
|
let imageNoteLayer = new WebTileLayer({
|
||||||
|
...defaultInfo,
|
||||||
|
urlTemplate: TianData.cia_c
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
this.map = new Map({
|
this.map = new Map({
|
||||||
basemap: {
|
basemap: {
|
||||||
baseLayers: [imageBasemapLayer, imageNoteLayer],
|
baseLayers: [imageBasemapLayer, imageNoteLayer],
|
||||||
},
|
},
|
||||||
slider: false
|
slider: false
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
let lodsView = [
|
let lodsView = [
|
||||||
{ level: 0, resolution: 156543.033928, scale: 591657527.591555 },
|
{ level: 0, resolution: 156543.033928, scale: 591657527.591555 },
|
||||||
{ level: 1, resolution: 78271.5169639999, scale: 295828763.795777 },
|
{ level: 1, resolution: 78271.5169639999, scale: 295828763.795777 },
|
||||||
{ level: 2, resolution: 39135.7584820001, scale: 147914381.897889 },
|
{ level: 2, resolution: 39135.7584820001, scale: 147914381.897889 },
|
||||||
{ level: 3, resolution: 19567.8792409999, scale: 73957190.948944 },
|
{ level: 3, resolution: 19567.8792409999, scale: 73957190.948944 },
|
||||||
{ level: 4, resolution: 9783.93962049996, scale: 36978595.474472 },
|
{ level: 4, resolution: 9783.93962049996, scale: 36978595.474472 },
|
||||||
{ level: 5, resolution: 4891.96981024998, scale: 18489297.737236 },
|
{ level: 5, resolution: 4891.96981024998, scale: 18489297.737236 },
|
||||||
{ level: 6, resolution: 2445.98490512499, scale: 9244648.868618 },
|
{ level: 6, resolution: 2445.98490512499, scale: 9244648.868618 },
|
||||||
{ level: 7, resolution: 1222.99245256249, scale: 4622324.434309 },
|
{ level: 7, resolution: 1222.99245256249, scale: 4622324.434309 },
|
||||||
{ level: 8, resolution: 611.49622628138, scale: 2311162.217155 },
|
{ level: 8, resolution: 611.49622628138, scale: 2311162.217155 },
|
||||||
{ level: 9, resolution: 305.748113140558, scale: 1155581.108577 },
|
{ level: 9, resolution: 305.748113140558, scale: 1155581.108577 },
|
||||||
{ level: 10, resolution: 152.874056570411, scale: 577790.554289 },
|
{ level: 10, resolution: 152.874056570411, scale: 577790.554289 },
|
||||||
{ level: 11, resolution: 76.4370282850732, scale: 288895.277144 },
|
{ level: 11, resolution: 76.4370282850732, scale: 288895.277144 },
|
||||||
{ level: 12, resolution: 38.2185141425366, scale: 144447.638572 },
|
{ level: 12, resolution: 38.2185141425366, scale: 144447.638572 },
|
||||||
{ level: 13, resolution: 19.1092570712683, scale: 72223.819286 },
|
{ level: 13, resolution: 19.1092570712683, scale: 72223.819286 },
|
||||||
{ level: 14, resolution: 9.55462853563415, scale: 36111.909643 },
|
{ level: 14, resolution: 9.55462853563415, scale: 36111.909643 },
|
||||||
{ level: 15, resolution: 4.77731426794937, scale: 18055.954822 },
|
{ level: 15, resolution: 4.77731426794937, scale: 18055.954822 },
|
||||||
{ level: 16, resolution: 2.38865713397468, scale: 9027.977411 },
|
{ level: 16, resolution: 2.38865713397468, scale: 9027.977411 },
|
||||||
{ level: 17, resolution: 1.19432856685505, scale: 4513.988705 },
|
{ level: 17, resolution: 1.19432856685505, scale: 4513.988705 },
|
||||||
{ level: 18, resolution: 0.597164283559817, scale: 2256.994353 },
|
{ level: 18, resolution: 0.597164283559817, scale: 2256.994353 },
|
||||||
{ level: 19, resolution: 0.298582141647617, scale: 1128.497176 },
|
{ level: 19, resolution: 0.298582141647617, scale: 1128.497176 },
|
||||||
{ level: 20, resolution: 0.14929107082380833, scale: 564.248588 },
|
{ level: 20, resolution: 0.14929107082380833, scale: 564.248588 },
|
||||||
{ level: 21, resolution: 0.07464553541190416, scale: 282.124294 },
|
{ level: 21, resolution: 0.07464553541190416, scale: 282.124294 },
|
||||||
{ level: 22, resolution: 0.03732276770595208, scale: 141.062147 },
|
{ level: 22, resolution: 0.03732276770595208, scale: 141.062147 },
|
||||||
{ level: 23, resolution: 0.01866138385297604, scale: 70.5310735 },
|
{ level: 23, resolution: 0.01866138385297604, scale: 70.5310735 },
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
@ -135,123 +141,127 @@ const ldMap = {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
this.view = new MapView({
|
this.view = new MapView({
|
||||||
container: "viewDiv",
|
container: "viewDiv",
|
||||||
map: this.map,
|
map: this.map,
|
||||||
spatialReference: {
|
spatialReference: {
|
||||||
wkid: 4326,
|
wkid: wkid,
|
||||||
},
|
},
|
||||||
constraints: {
|
constraints: {
|
||||||
lods: lodsView,
|
lods: lodsView,
|
||||||
rotationEnabled: false,
|
rotationEnabled: false,
|
||||||
minZoom: 0,
|
minZoom: 0,
|
||||||
maxZoom: 50
|
maxZoom: 50
|
||||||
},
|
},
|
||||||
center: [116.85722842688202, 39.26485279059861],
|
center: [116.85722842688202, 39.26485279059861],
|
||||||
zoom: 15,
|
zoom: 15,
|
||||||
});
|
});
|
||||||
let measurementWidget = new DistanceMeasurement2D({
|
let measurementWidget = new DistanceMeasurement2D({
|
||||||
view: this.view
|
view: this.view
|
||||||
});
|
});
|
||||||
// this.view.ui.add(measurementWidget, "bottom-right");
|
// this.view.ui.add(measurementWidget, "bottom-right");
|
||||||
|
|
||||||
self.view.on("drag", function (event) {
|
self.view.on("drag", function (event) {
|
||||||
if (event.button == 2 && self.DrawDregType && self.ldMapActionType == 'regectionAction') {
|
if (event.button == 2 && self.DrawDregType && self.ldMapActionType == 'regectionAction') {
|
||||||
console.log(event)
|
console.log(event)
|
||||||
let point = self.view.toMap({ x: event.x, y: event.y });
|
let point = self.view.toMap({ x: event.x, y: event.y });
|
||||||
if (event.action == 'start') {
|
if (event.action == 'start') {
|
||||||
// self.DrawLine()
|
// self.DrawLine()
|
||||||
self.DrawstartPoint = [point.x, point.y];
|
self.DrawstartPoint = [point.x, point.y];
|
||||||
}
|
|
||||||
if (event.action == 'end') {
|
|
||||||
self.Bindpolygon()
|
|
||||||
self.view.graphics.removeAll();
|
|
||||||
}
|
|
||||||
if (event.action == 'update') {
|
|
||||||
// self.destroyDraw()
|
|
||||||
self.DrawenedPoint = [point.x, point.y];
|
|
||||||
let data = {
|
|
||||||
vertices: [self.DrawstartPoint, self.DrawenedPoint]
|
|
||||||
}
|
}
|
||||||
self.createPolygon(data)
|
if (event.action == 'end') {
|
||||||
}
|
self.Bindpolygon()
|
||||||
|
self.view.graphics.removeAll();
|
||||||
}
|
}
|
||||||
|
if (event.action == 'update') {
|
||||||
|
// self.destroyDraw()
|
||||||
});
|
self.DrawenedPoint = [point.x, point.y];
|
||||||
mapLog = useMapLogStore()
|
let data = {
|
||||||
self.view.ui.remove("zoom"); //移除
|
vertices: [self.DrawstartPoint, self.DrawenedPoint]
|
||||||
self.view.ui.remove("attribution"); //移除底部ESRI logo bb
|
|
||||||
|
|
||||||
self.view.on("click", (event) => {
|
|
||||||
|
|
||||||
console.log(event)
|
|
||||||
if (self.popup) {
|
|
||||||
self.popup.remove()
|
|
||||||
}
|
|
||||||
if (self.hightlayer) {
|
|
||||||
|
|
||||||
self.hightlayer.removeAll()
|
|
||||||
}
|
|
||||||
|
|
||||||
self.view.hitTest(event).then((response) => {
|
|
||||||
|
|
||||||
self.lighHight?.remove();
|
|
||||||
self.selectLine = ''
|
|
||||||
self.selectPng = ''
|
|
||||||
if (response.results && response.results[0]) {
|
|
||||||
var graphic = response.results[0].graphic;
|
|
||||||
console.log(graphic)
|
|
||||||
if (self.ldMapActionType == 'lineAction') {
|
|
||||||
if (graphic.geometry.type == "polyline") {
|
|
||||||
self.view.whenLayerView(graphic.layer).then((layerView) => {
|
|
||||||
|
|
||||||
emitter.emit('line', graphic.attributes.data)
|
|
||||||
self.selectLine = graphic
|
|
||||||
self.lighHight = layerView.highlight(graphic)
|
|
||||||
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
self.createPolygon(data)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
if (graphic.attributes?.type == 'qdf') {
|
|
||||||
self.view.whenLayerView(graphic.layer).then((layerView) => {
|
|
||||||
self.selectPng = graphic
|
|
||||||
self.lighHight = layerView.highlight(graphic)
|
|
||||||
})
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
});
|
});
|
||||||
});
|
mapLog = useMapLogStore()
|
||||||
self.view.watch("zoom", function (newValue, oldValue, propertyName, target) {
|
self.view.ui.remove("zoom"); //移除
|
||||||
|
self.view.ui.remove("attribution"); //移除底部ESRI logo bb
|
||||||
|
|
||||||
if (Number.isInteger(newValue)) {
|
self.view.on("click", (event) => {
|
||||||
console.info(newValue);
|
|
||||||
self.showeleByzoom(newValue)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
//文字
|
|
||||||
|
|
||||||
self.view.when(e => {
|
console.log(event)
|
||||||
// const print = new Print({
|
if (self.popup) {
|
||||||
// view: self.view,
|
self.popup.remove()
|
||||||
// // specify your own print service
|
}
|
||||||
// printServiceUrl:
|
if (self.hightlayer) {
|
||||||
// "http://139.224.252.239:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
|
|
||||||
// });
|
self.hightlayer.removeAll()
|
||||||
|
}
|
||||||
|
|
||||||
|
self.view.hitTest(event).then((response) => {
|
||||||
|
|
||||||
|
self.lighHight?.remove();
|
||||||
|
self.selectLine = ''
|
||||||
|
self.selectPng = ''
|
||||||
|
if (response.results && response.results[0]) {
|
||||||
|
var graphic = response.results[0].graphic;
|
||||||
|
console.log(graphic)
|
||||||
|
if (self.ldMapActionType == 'lineAction') {
|
||||||
|
if (graphic.geometry.type == "polyline") {
|
||||||
|
self.view.whenLayerView(graphic.layer).then((layerView) => {
|
||||||
|
|
||||||
|
emitter.emit('line', graphic.attributes.data)
|
||||||
|
self.selectLine = graphic
|
||||||
|
self.lighHight = layerView.highlight(graphic)
|
||||||
|
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
if (graphic.attributes?.type == 'qdf') {
|
||||||
|
self.view.whenLayerView(graphic.layer).then((layerView) => {
|
||||||
|
self.selectPng = graphic
|
||||||
|
self.lighHight = layerView.highlight(graphic)
|
||||||
|
})
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
});
|
||||||
|
self.view.watch("zoom", function (newValue, oldValue, propertyName, target) {
|
||||||
|
|
||||||
|
if (Number.isInteger(newValue)) {
|
||||||
|
console.info(newValue);
|
||||||
|
self.showeleByzoom(newValue)
|
||||||
|
}
|
||||||
|
});
|
||||||
|
//文字
|
||||||
|
|
||||||
|
self.view.when(e => {
|
||||||
|
// const print = new Print({
|
||||||
|
// view: self.view,
|
||||||
|
// // specify your own print service
|
||||||
|
// printServiceUrl:
|
||||||
|
// "http://139.224.252.239:6080/arcgis/rest/services/Utilities/PrintingTools/GPServer/Export%20Web%20Map%20Task"
|
||||||
|
// });
|
||||||
|
|
||||||
|
// // Add widget to the top right corner of the view
|
||||||
|
// self.view.ui.add(print, "top-right");
|
||||||
|
resolve()
|
||||||
|
})
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
// // Add widget to the top right corner of the view
|
|
||||||
// self.view.ui.add(print, "top-right");
|
|
||||||
resolve()
|
|
||||||
})
|
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
@ -301,10 +311,7 @@ const ldMap = {
|
||||||
self.initSketch()
|
self.initSketch()
|
||||||
},
|
},
|
||||||
removeAll() {
|
removeAll() {
|
||||||
|
|
||||||
|
|
||||||
self.view.map.removeAll();
|
self.view.map.removeAll();
|
||||||
|
|
||||||
},
|
},
|
||||||
addLayer: function (e) {
|
addLayer: function (e) {
|
||||||
|
|
||||||
|
@ -312,15 +319,17 @@ const ldMap = {
|
||||||
let data = {
|
let data = {
|
||||||
id: "layerName",
|
id: "layerName",
|
||||||
url: '',
|
url: '',
|
||||||
...e
|
...e,
|
||||||
|
spatialReference: {
|
||||||
|
wkid: self.wkid,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
var imgLayer = new TileLayer(data);
|
var imgLayer = new TileLayer(data);
|
||||||
|
|
||||||
this.map.layers.add(imgLayer);
|
this.map.add(imgLayer);
|
||||||
|
|
||||||
imgLayer.when((e) => {
|
imgLayer.when((e) => {
|
||||||
self.nowlayer = e
|
self.nowlayer = e
|
||||||
|
|
||||||
self.setCenter(e.fullExtent.center.x, e.fullExtent.center.y)
|
self.setCenter(e.fullExtent.center.x, e.fullExtent.center.y)
|
||||||
})
|
})
|
||||||
self.view.whenLayerView(imgLayer).then(function (layerView) {
|
self.view.whenLayerView(imgLayer).then(function (layerView) {
|
||||||
|
@ -497,6 +506,7 @@ const ldMap = {
|
||||||
return sketchVM;
|
return sketchVM;
|
||||||
}
|
}
|
||||||
function selectData(e) {
|
function selectData(e) {
|
||||||
|
|
||||||
if (e.graphics[0].attributes.data?.pointType == 'Station' || e.graphics[0].attributes.data?.type == 'Station') {
|
if (e.graphics[0].attributes.data?.pointType == 'Station' || e.graphics[0].attributes.data?.type == 'Station') {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -545,10 +555,13 @@ const ldMap = {
|
||||||
if (e.state == 'complete') {
|
if (e.state == 'complete') {
|
||||||
self.sketchLayer.selectGraphic = null
|
self.sketchLayer.selectGraphic = null
|
||||||
if (self.ldMapActionType != 'lineAction') {
|
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 {
|
||||||
|
|
||||||
const areas = geodesicUtils.geodesicAreas([graphic.geometry], "square-meters");
|
}
|
||||||
const area = Math.abs(areas[0]).toFixed(2)
|
|
||||||
graphic.attributes.data.area = area
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -915,7 +928,7 @@ const ldMap = {
|
||||||
type == 'left' ? paths[0][0] = nowXy : paths[0][paths[0].length - 1] = nowXy
|
type == 'left' ? paths[0][0] = nowXy : paths[0][paths[0].length - 1] = nowXy
|
||||||
const polyline = new Polyline({
|
const polyline = new Polyline({
|
||||||
paths: paths,
|
paths: paths,
|
||||||
spatialReference: self.view.spatialReference,
|
|
||||||
})
|
})
|
||||||
const length = geometryEngine.geodesicLength(polyline, "meters");
|
const length = geometryEngine.geodesicLength(polyline, "meters");
|
||||||
console.log(length.toFixed(2))
|
console.log(length.toFixed(2))
|
||||||
|
@ -945,7 +958,8 @@ const ldMap = {
|
||||||
self.sketchLayer.pointLayer.removeAll();
|
self.sketchLayer.pointLayer.removeAll();
|
||||||
self.lineLayer && self.lineLayer.removeAll()
|
self.lineLayer && self.lineLayer.removeAll()
|
||||||
self.loadelevationLayer.removeAll()
|
self.loadelevationLayer.removeAll()
|
||||||
|
self.hightlayer && self.hightlayer.removeAll()
|
||||||
|
self.textLayer && self.textLayer.removeAll()
|
||||||
},
|
},
|
||||||
//清除点位
|
//清除点位
|
||||||
removePoint() {
|
removePoint() {
|
||||||
|
@ -972,7 +986,7 @@ const ldMap = {
|
||||||
data.forEach(item => {
|
data.forEach(item => {
|
||||||
const polyline = new Polyline({
|
const polyline = new Polyline({
|
||||||
paths: item.path,
|
paths: item.path,
|
||||||
spatialReference: self.view.spatialReference,
|
|
||||||
|
|
||||||
})
|
})
|
||||||
const lineSymbol = self.returnLineSymbole(item.width, item.color)
|
const lineSymbol = self.returnLineSymbole(item.width, item.color)
|
||||||
|
@ -1022,7 +1036,7 @@ const ldMap = {
|
||||||
returnObj.line.push(self.getMapByPoint(item, []))
|
returnObj.line.push(self.getMapByPoint(item, []))
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.log(error)
|
console.log(error)
|
||||||
debugger
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1040,27 +1054,51 @@ const ldMap = {
|
||||||
return returnObj
|
return returnObj
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 开始 结束
|
||||||
|
// 线 31 118355 53
|
||||||
|
// 点 118355 53 531
|
||||||
|
// 线 53 118350 46
|
||||||
|
// 线 53 531 180
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//根据起点找终点返回数据
|
//根据起点找终点返回数据
|
||||||
getMapByPoint(item, data) {
|
getMapByPoint(item, data) {
|
||||||
let linelayer = self.lineLayer.graphics.items
|
let linelayer = self.lineLayer.graphics.items
|
||||||
let point = self.getSketchDataByType("point");
|
let point = self.getSketchDataByType("point");
|
||||||
|
|
||||||
let nowPointId = item.id
|
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 geometry = item.geometry
|
||||||
let attributes = item.attributes
|
let attributes = item.attributes
|
||||||
|
|
||||||
if (lineId && lineId != nowPointId) {
|
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){}
|
||||||
|
linedata = linedata[0]
|
||||||
if (!linedata) { return data }
|
if (!linedata) { return data }
|
||||||
let val = [geometry.x, geometry.y, attributes.data.pointType, parseInt(linedata.attributes.data.styleId), nowPointId]
|
let val = [geometry.x, geometry.y, attributes.data.pointType, parseInt(linedata.attributes.data.styleId), nowPointId]
|
||||||
data.push(val)
|
data.push(val)
|
||||||
let nextPointId = linedata.attributes.nextId
|
let nextPointId = linedata.attributes.nextId
|
||||||
|
|
||||||
let nextItem = point.filter(item => item.id == nextPointId)[0]
|
let nextItem = point.filter(item => item.id == nextPointId)
|
||||||
if (!nextItem) { debugger }
|
|
||||||
|
nextItem=nextItem[0]
|
||||||
|
if(nextItem.length >1){}
|
||||||
|
if (!nextItem) { }
|
||||||
return this.getMapByPoint(nextItem, data)
|
return this.getMapByPoint(nextItem, data)
|
||||||
} else {
|
} else {
|
||||||
//到终点
|
//到终点
|
||||||
|
@ -1202,7 +1240,7 @@ const ldMap = {
|
||||||
width: 0
|
width: 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
});
|
});
|
||||||
|
|
||||||
if (data.pointType == 'y') {
|
if (data.pointType == 'y') {
|
||||||
|
@ -1232,7 +1270,7 @@ const ldMap = {
|
||||||
width: 10
|
width: 10
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
});
|
});
|
||||||
self.pngLayer.add(pointGraphic, 10)
|
self.pngLayer.add(pointGraphic, 10)
|
||||||
},
|
},
|
||||||
|
@ -1256,7 +1294,7 @@ const ldMap = {
|
||||||
height: 20,
|
height: 20,
|
||||||
width: 20,
|
width: 20,
|
||||||
},
|
},
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
});
|
});
|
||||||
self.pngLayer.add(pointGraphic, 10)
|
self.pngLayer.add(pointGraphic, 10)
|
||||||
})
|
})
|
||||||
|
@ -1271,6 +1309,7 @@ const ldMap = {
|
||||||
|
|
||||||
let polylineLayer = self.lineLayer
|
let polylineLayer = self.lineLayer
|
||||||
|
|
||||||
|
|
||||||
let p6 = this.lineLayer.graphics.items.filter(item => {
|
let p6 = this.lineLayer.graphics.items.filter(item => {
|
||||||
return item.id == data.id || item.id == data.lineId
|
return item.id == data.id || item.id == data.lineId
|
||||||
})[0]
|
})[0]
|
||||||
|
@ -1392,26 +1431,26 @@ const ldMap = {
|
||||||
|
|
||||||
},
|
},
|
||||||
//道路高程数据展示
|
//道路高程数据展示
|
||||||
elevationData(flag,data) {
|
elevationData(flag, data) {
|
||||||
if (flag) {
|
if (flag) {
|
||||||
|
|
||||||
data.forEach((item, index) => {
|
data.forEach((item, index) => {
|
||||||
let point = new Point({ x: item[0], y: item[1] })
|
let point = new Point({ x: item[0], y: item[1] })
|
||||||
let text = item[2].toFixed(2)
|
let text = item[2].toFixed(2)
|
||||||
const graphic = new Graphic({
|
const graphic = new Graphic({
|
||||||
geometry: point,
|
geometry: point,
|
||||||
visible: !(index % ((22 - self.view.zoom) * 2)),
|
visible: !(index % ((22 - self.view.zoom) * 2)),
|
||||||
symbol: {
|
symbol: {
|
||||||
type: "text", // autocasts as new TextSymbol()
|
type: "text", // autocasts as new TextSymbol()
|
||||||
text: text,
|
text: text,
|
||||||
color: [255, 255, 255, 255],
|
color: [255, 255, 255, 255],
|
||||||
font: {
|
font: {
|
||||||
weight: "bold"
|
weight: "bold"
|
||||||
}
|
|
||||||
}
|
}
|
||||||
});
|
}
|
||||||
|
});
|
||||||
|
|
||||||
self.loadelevationLayer.add(graphic)
|
self.loadelevationLayer.add(graphic)
|
||||||
})
|
})
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
@ -1427,7 +1466,7 @@ const ldMap = {
|
||||||
const point = new Point({
|
const point = new Point({
|
||||||
x: data.path[0],
|
x: data.path[0],
|
||||||
y: data.path[1],
|
y: data.path[1],
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
})
|
})
|
||||||
|
|
||||||
const newPointGraphic = new Graphic({
|
const newPointGraphic = new Graphic({
|
||||||
|
@ -1532,7 +1571,7 @@ const ldMap = {
|
||||||
}
|
}
|
||||||
const polygon = new Polygon({
|
const polygon = new Polygon({
|
||||||
rings: path,
|
rings: path,
|
||||||
spatialReference: self.view.spatialReference
|
//
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
@ -1557,9 +1596,14 @@ const ldMap = {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (res.type == "House") {
|
if (res.type == "House") {
|
||||||
const areas = geodesicUtils.geodesicAreas([polygon], "square-meters");
|
try {
|
||||||
const area = Math.abs(areas[0]).toFixed(2)
|
const areas = geodesicUtils.geodesicAreas([polygon], "square-meters");
|
||||||
res.area = res.area || area
|
const area = Math.abs(areas[0]).toFixed(2)
|
||||||
|
res.area = res.area || area
|
||||||
|
} catch {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
const newPolygonGraphic = new Graphic({
|
const newPolygonGraphic = new Graphic({
|
||||||
geometry: polygon,
|
geometry: polygon,
|
||||||
|
@ -1619,7 +1663,6 @@ const ldMap = {
|
||||||
color: [255, 255, 255, 255],
|
color: [255, 255, 255, 255],
|
||||||
font: { // autocasts as new Font()
|
font: { // autocasts as new Font()
|
||||||
size: 12,
|
size: 12,
|
||||||
|
|
||||||
weight: "bold"
|
weight: "bold"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2076,7 +2119,7 @@ const ldMap = {
|
||||||
let polyline = {
|
let polyline = {
|
||||||
type: "polyline", // autocasts as new Polyline()
|
type: "polyline", // autocasts as new Polyline()
|
||||||
paths: vertices,
|
paths: vertices,
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
}
|
}
|
||||||
const lineSymbol = self.returnLineSymbole(3, [0, 255, 255, 255])
|
const lineSymbol = self.returnLineSymbole(3, [0, 255, 255, 255])
|
||||||
let graphic = new Graphic({
|
let graphic = new Graphic({
|
||||||
|
@ -2164,7 +2207,7 @@ const ldMap = {
|
||||||
hasZ: false,
|
hasZ: false,
|
||||||
hasM: false,
|
hasM: false,
|
||||||
rings: [rings],
|
rings: [rings],
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
})
|
})
|
||||||
let graphic = new Graphic({
|
let graphic = new Graphic({
|
||||||
geometry: polygon,
|
geometry: polygon,
|
||||||
|
@ -2604,7 +2647,7 @@ const ldMap = {
|
||||||
|
|
||||||
const polygon = new Polygon({
|
const polygon = new Polygon({
|
||||||
rings: data.path,
|
rings: data.path,
|
||||||
spatialReference: self.view.spatialReference
|
|
||||||
|
|
||||||
})
|
})
|
||||||
let graphic = new Graphic({
|
let graphic = new Graphic({
|
||||||
|
|
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/, '')
|
rewrite: (p) => p.replace(/^\/water-api/, '')
|
||||||
},
|
},
|
||||||
'/plan-api': {
|
'/plan-api': {
|
||||||
target: 'http://water.lidinghb.com:9070/',
|
target: 'http://119.3.156.115:9070/',
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/plan-api/, '')
|
rewrite: (p) => p.replace(/^\/plan-api/, '')
|
||||||
},
|
},
|
||||||
|
@ -63,6 +63,11 @@ export default defineConfig(({ mode, command }) => {
|
||||||
changeOrigin: true,
|
changeOrigin: true,
|
||||||
rewrite: (p) => p.replace(/^\/afterSales-api/, '')
|
rewrite: (p) => p.replace(/^\/afterSales-api/, '')
|
||||||
},
|
},
|
||||||
|
'/arcgis': {
|
||||||
|
target: 'http://139.224.252.239:6080',
|
||||||
|
changeOrigin: true,
|
||||||
|
rewrite: (p) => p.replace(/^\/arcgis-map/, '')
|
||||||
|
},
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
|
//fix:error:stdin>:7356:1: warning: "@charset" must be the first rule in the file
|
||||||
|
@ -87,7 +92,7 @@ export default defineConfig(({ mode, command }) => {
|
||||||
terserOptions: {
|
terserOptions: {
|
||||||
compress: {
|
compress: {
|
||||||
drop_console: true,
|
drop_console: true,
|
||||||
drop_debugger: true
|
// drop_debugger: true
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
rollupOptions:{
|
rollupOptions:{
|
||||||
|
|
Loading…
Reference in New Issue