63 changed files with 4378 additions and 1634 deletions
@ -0,0 +1,20 @@ |
|||||
|
|
||||
|
// 照明系统及相关接口
|
||||
|
export enum lightingManage { |
||||
|
|
||||
|
// 主页 ========================================================
|
||||
|
|
||||
|
// 获得分区与线路
|
||||
|
getArea = '/carbon-smart/IlluminationInfo/region', |
||||
|
// 修改线路的可用/禁用状态
|
||||
|
setDisable = '/carbon-smart/IlluminationInfo/revisePanel', |
||||
|
|
||||
|
// 计划列表tab页 ================================================
|
||||
|
|
||||
|
// 获得计划列表tab页的表格数据
|
||||
|
getPlanTable = '/carbon-smart/IlluminationPlan/selectPanelPlan', |
||||
|
// 获得计划列表tab页的穿梭框左侧数据
|
||||
|
getLeftPlan = '/carbon-smart/IlluminationPlan/getPlan', |
||||
|
// 提交穿梭框被选择的数据
|
||||
|
submitLeftPlan = '/carbon-smart/IlluminationPlan/joinPlan', |
||||
|
} |
@ -0,0 +1,5 @@ |
|||||
|
export enum notificationManagementApi { |
||||
|
getTableList = '/carbon-smart/api/AlarmContactInformation/selectAlarmContactInformation', //通知管理分页
|
||||
|
upData = '/carbon-smart/api/AlarmContactInformation/update', //通知管理 修改
|
||||
|
findById = '/carbon-smart/api/AlarmContactInformation/findById', //通知管理 查询详情
|
||||
|
} |
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg"> |
||||
|
<g transform="matrix(1 0 0 1 -320 -9 )"> |
||||
|
<path d="M 5.72142857421875 4.29571427734375 L 5.72142857421875 0.0171428515625 L 10 0.0171428515625 L 10 4.29571427734375 L 5.72142857421875 4.29571427734375 Z M 14.564285722656251 0.3028571484375 L 19.84 5.57857142578125 C 19.9828571484375 5.57857142578125 19.9828571484375 5.864285703125001 20 6.0071428515625005 L 20 19.27 C 19.9828571484375 19.69857142578125 19.697142871093753 19.98428572265625 19.27 20 L 0.73 20 C 0.30142857421874997 19.98428572265625 0.015714277343749916 19.6985714453125 0 19.27 L 0 0.73 C 0.015714277343749916 0.30142857421874997 0.30142855468749996 0.015714277343749916 0.73 0.015714277343749916 L 4.29571427734375 0.015714277343749916 L 4.29571427734375 5.72142857421875 L 11.42571427734375 5.72142857421875 L 11.42571427734375 0.0171428515625 L 13.992857148437501 0.0171428515625 C 14.135714296875001 0.0171428515625 14.421428574218751 0.16 14.564285722656251 0.3028571484375 Z M 4.29571427734375 15.70428572265625 L 15.70428572265625 15.704285722656248 L 15.70428572265625 10 L 4.29571427734375 10 L 4.29571427734375 15.70428572265625 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 320 9 )" /> |
||||
|
</g> |
||||
|
</svg> |
@ -0,0 +1,6 @@ |
|||||
|
<?xml version="1.0" encoding="utf-8"?> |
||||
|
<svg version="1.1" xmlns:xlink="http://www.w3.org/1999/xlink" width="20px" height="20px" xmlns="http://www.w3.org/2000/svg"> |
||||
|
<g transform="matrix(1 0 0 1 -320 -9 )"> |
||||
|
<path d="M 17.482232142857143 6.05310267857143 L 7.481830357142856 16.053526785714283 L 3.946339285714287 12.518035714285713 L 13.946741071428567 2.5176116071428565 L 17.482232142857143 6.05310267857143 Z M 2.8571428571428568 17.142857142857142 L 2.8571428571428568 13.607142857142856 L 6.392857142857144 17.142857142857142 L 2.8571428571428568 17.142857142857142 Z M 18.013392857142858 0.4017857142857143 L 19.598214285714285 1.9866071428571428 C 20.133928571428573 2.5223214285714284 20.133928571428573 3.3995535714285703 19.598214285714285 3.937500000000002 L 18.55357142857143 4.982142857142853 L 15.017857142857142 1.4464285714285705 L 16.062499999999996 0.4017857142857143 C 16.598214285714285 -0.13392857142857142 17.47544642857143 -0.13392857142857142 18.013392857142858 0.4017857142857143 Z M 0 15.714285714285714 L 1.4285714285714284 15.714285714285714 L 1.4285714285714284 18.571428571424978 L 1.4285714285714284 20 L 0 20 L 0 15.714285714285714 Z M 18.571428571428573 20 L 1.4285714285714284 20 L 1.4285714285714284 18.571428571428573 L 18.571428571428573 18.571428571428573 L 18.571428571428573 20 Z M 20 15.714285714285714 L 20 20 L 18.571428571428573 20 L 18.571428571428573 15.714285714285714 L 20 15.714285714285714 Z " fill-rule="nonzero" fill="#ff7602" stroke="none" transform="matrix(1 0 0 1 320 9 )" /> |
||||
|
</g> |
||||
|
</svg> |
@ -1,22 +0,0 @@ |
|||||
import { department } from '/@/api/origanizemanage'; |
|
||||
|
|
||||
export const editTreeConfig = (orgId) => ({ |
|
||||
selectedKeys: ['0-0'], |
|
||||
defaultExpandAll: true, |
|
||||
api: department.queryDeptTree, |
|
||||
params: { orgId }, |
|
||||
resultField: 'data.orgInfos', |
|
||||
fieldNames: { title: 'orgName', key: 'orgId' }, |
|
||||
formConfig: { |
|
||||
schemas: [ |
|
||||
{ |
|
||||
field: 'orgName', |
|
||||
component: 'NsInput', |
|
||||
autoSubmit: true, |
|
||||
componentProps: { |
|
||||
placeholder: '请输入企业名称', |
|
||||
}, |
|
||||
}, |
|
||||
], |
|
||||
}, |
|
||||
}); |
|
@ -0,0 +1,29 @@ |
|||||
|
<template> |
||||
|
<ns-view-list-table v-bind="config" ref="mainRef" /> |
||||
|
<!-- 详情页面 --> |
||||
|
<Look ref="look" /> |
||||
|
<!-- 状态页面 --> |
||||
|
<Status ref="status" /> |
||||
|
</template> |
||||
|
<script lang="ts"> |
||||
|
import { notificationtableConfig } from './ts/config'; |
||||
|
import Look from './look.vue'; |
||||
|
import Status from './status.vue'; |
||||
|
import { ref } from 'vue'; |
||||
|
|
||||
|
export default { |
||||
|
name: 'EquipmentAlarmIndex', |
||||
|
components: { Look, Status }, |
||||
|
|
||||
|
setup() { |
||||
|
const look = ref(null); |
||||
|
const status = ref(null); |
||||
|
const config = notificationtableConfig(look, status); |
||||
|
return { |
||||
|
config, |
||||
|
look, |
||||
|
status, |
||||
|
}; |
||||
|
}, |
||||
|
}; |
||||
|
</script> |
@ -0,0 +1,234 @@ |
|||||
|
<template> |
||||
|
<ns-drawer |
||||
|
v-model:visible="visible" |
||||
|
width="520" |
||||
|
:title="' '" |
||||
|
:footer-style="{ textAlign: 'right' }" |
||||
|
:ok="btnClick" |
||||
|
:cancel="handleClose" |
||||
|
placement="right" |
||||
|
@close="handleClose"> |
||||
|
<div style="width: 100%; height: 100%; overflow-y: auto; overflow-x: hidden"> |
||||
|
<!-- top --> |
||||
|
<div class="box"> |
||||
|
<div class="card"></div> |
||||
|
<div style="left: 25px; position: absolute; height: 35px; line-height: 35px"> |
||||
|
告警编号:20230310001 |
||||
|
</div> |
||||
|
<div style="right: 20px; position: absolute; height: 35px; line-height: 35px"> |
||||
|
2024-03-10 15:08:10 |
||||
|
</div> |
||||
|
</div> |
||||
|
<!-- center --> |
||||
|
<div style="width: 100%; height: 400px"> |
||||
|
<div style="width: 100%; height: 100%" ref="graphChart"></div> |
||||
|
</div> |
||||
|
<!-- bottom --> |
||||
|
<div style="width: 100%; margin-top: 10px"> |
||||
|
<a-descriptions :column="1" bordered> |
||||
|
<a-descriptions-item label="优先级">紧急</a-descriptions-item> |
||||
|
<a-descriptions-item label="状态">新告警</a-descriptions-item> |
||||
|
<a-descriptions-item label="错误码">C003</a-descriptions-item> |
||||
|
<a-descriptions-item label="告警描述">网关心跳包丢失</a-descriptions-item> |
||||
|
<a-descriptions-item label="设备信息">1号网关_Di23j596_0001 </a-descriptions-item> |
||||
|
<a-descriptions-item label="重复次数"> 0 </a-descriptions-item> |
||||
|
</a-descriptions> |
||||
|
</div> |
||||
|
</div> |
||||
|
<template #footer> |
||||
|
<a-button type="primary" @click="handleClose">确定</a-button> |
||||
|
</template> |
||||
|
</ns-drawer> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
defineOptions({ |
||||
|
name: 'look', // 与页面路由name一致缓存才可生效 |
||||
|
}); |
||||
|
import { ref } from 'vue'; |
||||
|
import * as echarts from 'echarts'; |
||||
|
|
||||
|
let chartInstance: echarts.ECharts | null = null; |
||||
|
const graphChart = ref(null); |
||||
|
const visible = ref(false); |
||||
|
const handleClose = () => { |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const btnClick = () => { |
||||
|
console.log('btnClick'); |
||||
|
handleClose(); |
||||
|
}; |
||||
|
const toggle = (data: any) => { |
||||
|
console.log(data, 'data'); |
||||
|
visible.value = true; |
||||
|
setTimeout(() => { |
||||
|
getChatr(); |
||||
|
}, 500); |
||||
|
}; |
||||
|
const getChatr = () => { |
||||
|
let dayData = []; |
||||
|
let energyAlarm = []; |
||||
|
|
||||
|
// Extend data for 30 days |
||||
|
for (let i = 1; i < 9; i++) { |
||||
|
dayData.push('10:' + i * 9 + ':00'); |
||||
|
energyAlarm.push(Math.floor(Math.random() * 2)); |
||||
|
} |
||||
|
if (chartInstance) { |
||||
|
chartInstance.dispose(); |
||||
|
} |
||||
|
chartInstance = echarts.init(graphChart.value); |
||||
|
const option = { |
||||
|
// title: { |
||||
|
// text: '告警趋势/ 近30天', |
||||
|
// textStyle: { |
||||
|
// fontSize: 16, |
||||
|
// fontWeight: 'normal', |
||||
|
// color: '#aaaaaa', |
||||
|
// }, |
||||
|
// left: '1%', |
||||
|
// top: '2%', |
||||
|
// }, |
||||
|
tooltip: { |
||||
|
trigger: 'axis', |
||||
|
axisPointer: { |
||||
|
type: 'shadow', |
||||
|
}, |
||||
|
formatter: function (params: any) { |
||||
|
let res = params[0].marker + ' ' + params[0].seriesName + ' : ' + params[0].data; |
||||
|
return res; |
||||
|
}, |
||||
|
}, |
||||
|
grid: { |
||||
|
left: '10%', // 设置图表距离左边的距离 |
||||
|
right: '4%', // 设置图表距离右边的距离 |
||||
|
top: '6%', |
||||
|
borderWidth: 0, |
||||
|
y2: 60, // 距离底边 |
||||
|
}, |
||||
|
legend: [ |
||||
|
{ |
||||
|
show: false, |
||||
|
top: 5, |
||||
|
left: 'center', // 将图例居中显示 |
||||
|
textStyle: { |
||||
|
color: 'rgb(89, 89, 89)', |
||||
|
fontSize: '14', |
||||
|
fontWeight: 'normal', |
||||
|
}, // 注意这里的颜色值要用引号括起来 |
||||
|
data: ['状态'], |
||||
|
itemGap: 30, // 这里可以调整图例项之间的间距,单位为像素 |
||||
|
}, |
||||
|
], |
||||
|
calculable: true, |
||||
|
xAxis: [ |
||||
|
{ |
||||
|
type: 'category', |
||||
|
splitLine: { |
||||
|
show: false, |
||||
|
}, |
||||
|
axisTick: { |
||||
|
show: true, |
||||
|
}, |
||||
|
splitArea: { |
||||
|
show: false, |
||||
|
}, |
||||
|
axisLabel: { |
||||
|
show: true, // 显示 X 轴刻度标签 |
||||
|
color: 'rgb(89, 89, 89)', // X 轴刻度标签的字体颜色 |
||||
|
fontSize: 12, // X 轴刻度标签的字体大小 |
||||
|
interval: 0, // 显示所有刻度标签 |
||||
|
formatter: function (value) { |
||||
|
// 可选:格式化 X 轴刻度标签文本 |
||||
|
return value; |
||||
|
}, |
||||
|
}, |
||||
|
data: dayData, |
||||
|
}, |
||||
|
], |
||||
|
yAxis: [ |
||||
|
{ |
||||
|
type: 'value', |
||||
|
shwo: false, |
||||
|
splitLine: { |
||||
|
show: true, |
||||
|
}, |
||||
|
axisLine: { |
||||
|
show: false, |
||||
|
}, |
||||
|
axisTick: { |
||||
|
show: false, |
||||
|
}, |
||||
|
splitArea: { |
||||
|
show: false, |
||||
|
}, |
||||
|
axisLabel: { |
||||
|
show: true, // 显示 |
||||
|
formatter: function (value) { |
||||
|
return value; |
||||
|
}, |
||||
|
}, |
||||
|
interval: 1, // 设置 Y 轴刻度间隔为 1 |
||||
|
}, |
||||
|
], |
||||
|
dataZoom: [ |
||||
|
{ |
||||
|
height: 12, |
||||
|
start: 0, |
||||
|
end: 100, |
||||
|
handleSize: '300%', // 设置滑块的大小 |
||||
|
bottom: 15, |
||||
|
}, |
||||
|
], |
||||
|
series: [ |
||||
|
{ |
||||
|
name: '状态', |
||||
|
type: 'line', |
||||
|
itemStyle: { |
||||
|
normal: { |
||||
|
barBorderRadius: 0, |
||||
|
color: '#2778FF', |
||||
|
}, |
||||
|
}, |
||||
|
symbol: 'circle', // 数据点的形状,这里设置为圆形 |
||||
|
symbolSize: 8, |
||||
|
// label: { |
||||
|
// show: true, |
||||
|
// color: 'rgb(89, 89, 89)', |
||||
|
// position: 'top', |
||||
|
// top: '10', |
||||
|
// formatter: function (value) { |
||||
|
// return Number(energyAlarm[value.dataIndex]) ; |
||||
|
// }, |
||||
|
// }, |
||||
|
data: energyAlarm, |
||||
|
}, |
||||
|
], |
||||
|
}; |
||||
|
chartInstance = echarts.init(graphChart.value); |
||||
|
chartInstance.setOption(option); |
||||
|
}; |
||||
|
defineExpose({ |
||||
|
toggle, |
||||
|
}); |
||||
|
</script> |
||||
|
<style scoped lang="less"> |
||||
|
.box { |
||||
|
width: 100%; |
||||
|
height: 35px; |
||||
|
display: flex; |
||||
|
position: relative; |
||||
|
font-size: @font-size-base; |
||||
|
border-bottom: 1px solid @primary-color; |
||||
|
} |
||||
|
.card { |
||||
|
position: absolute; |
||||
|
left: 0px; |
||||
|
top: 0px; |
||||
|
width: 5px; |
||||
|
height: 35px; |
||||
|
background-color: @primary-color; |
||||
|
} |
||||
|
:deep(.ant-descriptions-item-label) { |
||||
|
width: 25%; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,108 @@ |
|||||
|
{ |
||||
|
"listData":[ |
||||
|
{ |
||||
|
"id": "d4", |
||||
|
"isDel": "0", |
||||
|
"officesId": "84", |
||||
|
"deviceCode": "37430200143", |
||||
|
"deviceName": "地听测试电表", |
||||
|
"category": "1", |
||||
|
"type": "1001", |
||||
|
"energyCount": "1", |
||||
|
"serialNumber": "69", |
||||
|
"pidCode": null, |
||||
|
"brand": "", |
||||
|
"types": "", |
||||
|
"manufacturer": "elit non in", |
||||
|
"contacts": "ad reprehenderit", |
||||
|
"phonenumber": "34", |
||||
|
"position": "in esse commodo1", |
||||
|
"activeState": "1", |
||||
|
"measurementDirection": "1", |
||||
|
"deviceMagnification": 62, |
||||
|
"deviceAccuracy": "89", |
||||
|
"frequency": "anim consequat irure", |
||||
|
"standardFrequency": "ut elit", |
||||
|
"deviceHead": "pariatur ex velit", |
||||
|
"constructor": "84566", |
||||
|
"voltageType": "cillum aliquip reprehenderit", |
||||
|
"pt": 61, |
||||
|
"ct": 64, |
||||
|
"communicationProtocol": "cupidatat nisi ea ad", |
||||
|
"ip": "", |
||||
|
"port": "", |
||||
|
"com": "", |
||||
|
"slaveAddress": "", |
||||
|
"dlt": "", |
||||
|
"conversionIdentifier": "48", |
||||
|
"multiplicationAdjustment": "1", |
||||
|
"accessMethod": "1", |
||||
|
"replacementFrequency": "0", |
||||
|
"dataDetail": "sit", |
||||
|
"insertTime": null, |
||||
|
"children": null, |
||||
|
"devicePointList": null, |
||||
|
"insertUser": null, |
||||
|
"priority": "1", |
||||
|
"alarmTitle": "电压异常告警", |
||||
|
"errorCode": "A001", |
||||
|
"monitorTime":"1", |
||||
|
"repetitions":"1", |
||||
|
"monitorTimeUnit": "分", |
||||
|
"enableRules": "1", |
||||
|
"isUse":true |
||||
|
} , { |
||||
|
"id": "d5", |
||||
|
"isDel": "0", |
||||
|
"officesId": "84", |
||||
|
"deviceCode": "37430200143", |
||||
|
"deviceName": "地听测试电表", |
||||
|
"category": "1", |
||||
|
"type": "1001", |
||||
|
"energyCount": "1", |
||||
|
"serialNumber": "69", |
||||
|
"pidCode": null, |
||||
|
"brand": "", |
||||
|
"types": "", |
||||
|
"manufacturer": "elit non in", |
||||
|
"contacts": "ad reprehenderit", |
||||
|
"phonenumber": "34", |
||||
|
"position": "in esse commodo2", |
||||
|
"activeState": "1", |
||||
|
"measurementDirection": "1", |
||||
|
"deviceMagnification": 62, |
||||
|
"deviceAccuracy": "89", |
||||
|
"frequency": "anim consequat irure", |
||||
|
"standardFrequency": "ut elit", |
||||
|
"deviceHead": "pariatur ex velit", |
||||
|
"constructor": "84566", |
||||
|
"voltageType": "cillum aliquip reprehenderit", |
||||
|
"pt": 61, |
||||
|
"ct": 64, |
||||
|
"communicationProtocol": "cupidatat nisi ea ad", |
||||
|
"ip": "", |
||||
|
"port": "", |
||||
|
"com": "", |
||||
|
"slaveAddress": "", |
||||
|
"dlt": "", |
||||
|
"conversionIdentifier": "48", |
||||
|
"multiplicationAdjustment": "1", |
||||
|
"accessMethod": "1", |
||||
|
"replacementFrequency": "0", |
||||
|
"dataDetail": "sit", |
||||
|
"insertTime": null, |
||||
|
"children": null, |
||||
|
"devicePointList": null, |
||||
|
"insertUser": null, |
||||
|
"priority": "1", |
||||
|
"alarmTitle": "电压异常告警", |
||||
|
"errorCode": "A001", |
||||
|
"monitorTime":"1", |
||||
|
"repetitions":"1", |
||||
|
"monitorTimeUnit": "分", |
||||
|
"enableRules": "0", |
||||
|
"isUse":true |
||||
|
} |
||||
|
] |
||||
|
|
||||
|
} |
@ -0,0 +1,124 @@ |
|||||
|
<template> |
||||
|
<ns-drawer |
||||
|
v-model:visible="visible" |
||||
|
width="550" |
||||
|
:title="' '" |
||||
|
:footer-style="{ textAlign: 'right' }" |
||||
|
:ok="btnClick" |
||||
|
:cancel="handleClose" |
||||
|
placement="right" |
||||
|
@close="handleClose"> |
||||
|
<a-tabs> |
||||
|
<a-tab-pane key="1" tab="更新状态"> |
||||
|
<div style="width: 100%; padding: 24px"> |
||||
|
<a-form ref="formRef" :model="infoObject" :rules="rules"> |
||||
|
<a-form-item ref="status" label="当前状态" name="status"> |
||||
|
<a-select |
||||
|
v-model:value="infoObject.status" |
||||
|
show-search |
||||
|
placeholder="请选择设备点位" |
||||
|
style="width: 85%" |
||||
|
:options="statusOptions" |
||||
|
:disabled="true" |
||||
|
:filter-option="filterDevicePoint" /> |
||||
|
</a-form-item> |
||||
|
<a-form-item label="备注" name="desc"> |
||||
|
<a-textarea |
||||
|
v-model:value="infoObject.desc" |
||||
|
placeholder="请输入异常描述" |
||||
|
:disabled="true" |
||||
|
style="width: 85%" |
||||
|
:autoSize="{ minRows: 4, maxRows: 4 }" /> |
||||
|
</a-form-item> |
||||
|
</a-form> |
||||
|
</div> |
||||
|
</a-tab-pane> |
||||
|
<a-tab-pane key="2" tab="状态流程"> |
||||
|
<NsSteps v-bind="config" /> |
||||
|
</a-tab-pane> |
||||
|
</a-tabs> |
||||
|
<template #footer> |
||||
|
<a-button type="primary" @click="btnClick">确定</a-button> |
||||
|
</template> |
||||
|
</ns-drawer> |
||||
|
</template> |
||||
|
<script> |
||||
|
import { defineComponent } from 'vue'; |
||||
|
import { ref, createVNode } from 'vue'; |
||||
|
import NsSteps from '/@/components/ns-steps.vue'; |
||||
|
import { NsMessage, NsModal } from '/nerv-lib/component'; |
||||
|
import { ExclamationCircleOutlined } from '@ant-design/icons-vue'; |
||||
|
|
||||
|
export default defineComponent({ |
||||
|
components: { NsSteps }, |
||||
|
|
||||
|
setup() { |
||||
|
const visible = ref(false); |
||||
|
const infoObject = ref({}); |
||||
|
const statusOptions = ref([ |
||||
|
{ value: '0', label: '待处理' }, |
||||
|
{ value: '1', label: '处理中' }, |
||||
|
{ value: '2', label: '已完成' }, |
||||
|
{ value: '3', label: '超时' }, |
||||
|
{ value: '4', label: '已关闭' }, |
||||
|
]); |
||||
|
const logList = ref([ |
||||
|
{ name: '李四', status: '2', time: '2024-03-10 10:00:00', desc: '完成' }, |
||||
|
{ name: '王五', status: '4', time: '2024-03-10 10:00:00' }, |
||||
|
{ name: '王五', status: '3', time: '2024-03-10 10:00:00' }, |
||||
|
{ name: '王五', status: '1', time: '2024-03-10 10:00:00', desc: '创建工单' }, |
||||
|
{ name: '赵六', status: '0', time: '2024-03-10 10:00:00' }, |
||||
|
]); |
||||
|
const config = ref({ |
||||
|
size: logList.value.length, |
||||
|
dataSource: logList.value, |
||||
|
}); |
||||
|
const handleClose = () => { |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const btnClick = () => { |
||||
|
visible.value = false; |
||||
|
}; |
||||
|
const toggle = (data) => { |
||||
|
infoObject.value = { ...logList.value[0] }; |
||||
|
let statusMap = { |
||||
|
0: '待处理', |
||||
|
1: '处理中', |
||||
|
2: '已完成', |
||||
|
3: '超时', |
||||
|
4: '已关闭', |
||||
|
}; |
||||
|
let colorMap = { |
||||
|
0: '#ff7602', |
||||
|
1: '#00a1e6', |
||||
|
2: '#04d919', |
||||
|
3: '#d9001b', |
||||
|
4: '#a6a6a6', |
||||
|
}; |
||||
|
logList.value.forEach((item) => { |
||||
|
item.statusName = statusMap[item.status]; |
||||
|
item.color = colorMap[item.status]; |
||||
|
item.src = 'status-' + item.status; |
||||
|
}); |
||||
|
visible.value = true; |
||||
|
}; |
||||
|
return { |
||||
|
infoObject, |
||||
|
statusOptions, |
||||
|
btnClick, |
||||
|
visible, |
||||
|
logList, |
||||
|
config, |
||||
|
handleClose, |
||||
|
toggle, |
||||
|
}; |
||||
|
}, |
||||
|
}); |
||||
|
</script> |
||||
|
<style scoped lang="less"> |
||||
|
:deep(.ant-form-item-label) { |
||||
|
z-index: 20; |
||||
|
text-align: right; |
||||
|
width: 17%; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,158 @@ |
|||||
|
import { dateUtil } from '/nerv-lib/util/date-util'; |
||||
|
import data from '../notificationManagementMock.json'; |
||||
|
import { http } from '/nerv-lib/util'; |
||||
|
import { ref } from 'vue'; |
||||
|
const tableKeyMap = [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
dataIndex: 'address', |
||||
|
customRender: (text: any) => { |
||||
|
return text.index + 1; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '告警编号', |
||||
|
dataIndex: 'id', |
||||
|
}, |
||||
|
{ |
||||
|
title: '告警描述', |
||||
|
dataIndex: 'deviceCode', |
||||
|
}, |
||||
|
{ |
||||
|
title: '优先级', |
||||
|
dataIndex: 'deviceName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '状态', |
||||
|
dataIndex: 'position', |
||||
|
}, |
||||
|
{ |
||||
|
title: '错误码', |
||||
|
dataIndex: 'position', |
||||
|
textEllipsis: true, |
||||
|
}, |
||||
|
{ |
||||
|
title: '设备信息', |
||||
|
dataIndex: 'position', |
||||
|
}, |
||||
|
{ |
||||
|
title: '更新时间', |
||||
|
dataIndex: 'enableRules', |
||||
|
}, |
||||
|
{ |
||||
|
title: '断网时长', |
||||
|
dataIndex: 'enableRules', |
||||
|
}, |
||||
|
]; |
||||
|
const mockData = ref(data.listData); |
||||
|
export const notificationtableConfig = (look: any, status: any) => { |
||||
|
return { |
||||
|
title: '告警记录', |
||||
|
// api: '/carbon_emission/device/getDeviceList',
|
||||
|
value: mockData.value, |
||||
|
headerActions: [{}], |
||||
|
columns: tableKeyMap, |
||||
|
// rowSelection: null, 选择按钮
|
||||
|
columnActions: { |
||||
|
title: '操作', |
||||
|
actions: [ |
||||
|
{ |
||||
|
label: '详情', |
||||
|
name: 'FeedBackDetail', |
||||
|
dynamicParams: ['uuid', 'appealType'], |
||||
|
handle: (data: any) => { |
||||
|
console.log(look.value); |
||||
|
look.value.toggle(data); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '状态', |
||||
|
name: 'FeedBackDetail', |
||||
|
dynamicParams: ['uuid', 'appealType'], |
||||
|
handle: (data: any) => { |
||||
|
status.value.toggle(data); |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
|
||||
|
formConfig: { |
||||
|
schemas: [ |
||||
|
{ |
||||
|
field: 'name', |
||||
|
label: '告警类型', |
||||
|
component: 'NsSelect', |
||||
|
defaultValue: '2', |
||||
|
componentProps: { |
||||
|
placeholder: '请选择告警优先级', |
||||
|
disabled: true, |
||||
|
options: [ |
||||
|
{ |
||||
|
label: '紧急', |
||||
|
value: '1', |
||||
|
}, |
||||
|
{ |
||||
|
label: '重要', |
||||
|
value: '2', |
||||
|
}, |
||||
|
{ |
||||
|
label: '一般', |
||||
|
value: '3', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'provider', |
||||
|
label: '状态', |
||||
|
component: 'NsSelect', |
||||
|
componentProps: { |
||||
|
placeholder: '请选择状态', |
||||
|
options: [ |
||||
|
{ |
||||
|
label: '待处理', |
||||
|
value: '1', |
||||
|
}, |
||||
|
{ |
||||
|
label: '处理中', |
||||
|
value: '2', |
||||
|
}, |
||||
|
{ |
||||
|
label: '已完成', |
||||
|
value: '3', |
||||
|
}, |
||||
|
{ |
||||
|
label: '超时', |
||||
|
value: '4', |
||||
|
}, |
||||
|
{ |
||||
|
label: '关闭', |
||||
|
value: '5', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'provider', |
||||
|
label: '错误码', |
||||
|
component: 'NsInput', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入告警错误码', |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'createTime', |
||||
|
label: '生产日期', |
||||
|
component: 'NsRangePicker', |
||||
|
fieldMap: ['manufactureBeginDate', 'manufactureEndDate'], |
||||
|
componentProps: { |
||||
|
valueFormat: 'YYYY-MM-DD', |
||||
|
placeholder: ['开始日期', '结束日期'], |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
// pagination: { pageSizeOptions: false },
|
||||
|
rowKey: 'id', |
||||
|
}; |
||||
|
}; |
@ -0,0 +1,306 @@ |
|||||
|
<template> |
||||
|
<div> |
||||
|
<!-- <a-table |
||||
|
:columns="column" |
||||
|
:data-source="data" |
||||
|
bordered |
||||
|
:pagination="false" |
||||
|
:scroll="{ x: 2000 }"> |
||||
|
<template #title> |
||||
|
<a-date-picker v-model:value="selectYear" picker="year" @change="changeYearData" valueFormat="YYYY" /> |
||||
|
</template> |
||||
|
</a-table> --> |
||||
|
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" /> |
||||
|
<!-- <a-pagination |
||||
|
:current="queryParams.pageNum" |
||||
|
:total="total" |
||||
|
:page-size="queryParams.pageSize" |
||||
|
style="display: flex;justify-content: center;margin-top: 16px;" |
||||
|
:show-size-changer="true" |
||||
|
:show-quick-jumper="true" |
||||
|
@change="onChange" /> --> |
||||
|
</div> |
||||
|
</template> |
||||
|
<script lang="ts" setup> |
||||
|
import { ref } from 'vue'; |
||||
|
import { http } from '/nerv-lib/util/http'; |
||||
|
import { Pagination } from 'ant-design-vue'; |
||||
|
import dayjs, { Dayjs } from 'dayjs'; |
||||
|
import { carbonEmission } from '/@/api/carbonEmissionFactorLibrary'; |
||||
|
defineOptions({ |
||||
|
energyType: 'CarbonEmissions', // 与页面路由name一致缓存才可生效 |
||||
|
components: { |
||||
|
'a-pagination': Pagination, |
||||
|
}, |
||||
|
}); |
||||
|
const orgId = ref(''); |
||||
|
const result = JSON.parse(sessionStorage.getItem('ORGID')!); |
||||
|
orgId.value = result; |
||||
|
const fetch = (api, params = { orgId } ) => { |
||||
|
return http.post(api, params); |
||||
|
}; |
||||
|
const data = ref([]); |
||||
|
const selectYear = ref<Dayjs>(dayjs( new Date().getFullYear().toString())); |
||||
|
const total = ref<number>() |
||||
|
const queryParams = ref({ |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
year: selectYear.value.format('YYYY'), |
||||
|
orgId: orgId.value |
||||
|
}) |
||||
|
|
||||
|
// 年份选择改变触发 |
||||
|
// const changeYearData = () => { |
||||
|
// queryParams.value.year = selectYear.value |
||||
|
// getTableList() |
||||
|
// } |
||||
|
// 表头 |
||||
|
const mainRef = ref(); |
||||
|
const column: TableColumnsType [] = [ |
||||
|
{ |
||||
|
title: '排放类型', |
||||
|
dataIndex: 'cnValue', |
||||
|
customCell: (record, rowIndex) => { |
||||
|
if (rowIndex == undefined) { |
||||
|
return { |
||||
|
rowSpan: 0, |
||||
|
colSpan: 0, |
||||
|
}; |
||||
|
} |
||||
|
const rowSpan = getRowSpan('cnValue', record, data.value); |
||||
|
if (rowIndex != 0 && data.value[rowIndex - 1].name == record.name) { |
||||
|
return { |
||||
|
rowSpan: 0, |
||||
|
colSpan: 0, |
||||
|
}; |
||||
|
} |
||||
|
return { |
||||
|
rowSpan: rowSpan, |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '能源种类', |
||||
|
dataIndex: 'energyType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '计量单位', |
||||
|
dataIndex: 'unit', |
||||
|
}, |
||||
|
{ |
||||
|
title: '加权平均', |
||||
|
dataIndex: 'averageFactorValue', |
||||
|
}, |
||||
|
{ |
||||
|
title: '全年', |
||||
|
dataIndex: 'carbonYearly', |
||||
|
}, |
||||
|
{ |
||||
|
title: '1月', |
||||
|
dataIndex: 'jan', |
||||
|
}, |
||||
|
{ |
||||
|
title: '2月', |
||||
|
dataIndex: 'feb', |
||||
|
}, |
||||
|
{ |
||||
|
title: '3月', |
||||
|
dataIndex: 'mar', |
||||
|
}, |
||||
|
{ |
||||
|
title: '4月', |
||||
|
dataIndex: 'apr', |
||||
|
}, |
||||
|
{ |
||||
|
title: '5月', |
||||
|
dataIndex: 'may', |
||||
|
}, |
||||
|
{ |
||||
|
title: '6月', |
||||
|
dataIndex: 'jun', |
||||
|
}, |
||||
|
{ |
||||
|
title: '7月', |
||||
|
dataIndex: 'jul', |
||||
|
}, |
||||
|
{ |
||||
|
title: '8月', |
||||
|
dataIndex: 'aug', |
||||
|
}, |
||||
|
{ |
||||
|
title: '9月', |
||||
|
dataIndex: 'sep', |
||||
|
}, |
||||
|
{ |
||||
|
title: '10月', |
||||
|
dataIndex: 'oct', |
||||
|
}, |
||||
|
{ |
||||
|
title: '11月', |
||||
|
dataIndex: 'nov', |
||||
|
}, |
||||
|
{ |
||||
|
title: '12月', |
||||
|
dataIndex: 'dec', |
||||
|
}, |
||||
|
]; |
||||
|
const year = ref(selectYear.value.format('YYYY')) |
||||
|
const tableConfig = ref({ |
||||
|
title: '碳排统计', |
||||
|
api: carbonEmission.carbonEmissionStatistics, |
||||
|
params: { |
||||
|
orgId, |
||||
|
year |
||||
|
}, |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: '排放类型', |
||||
|
dataIndex: 'cnValue', |
||||
|
customCell: (record, rowIndex) => { |
||||
|
if (rowIndex == undefined) { |
||||
|
return { |
||||
|
rowSpan: 0, |
||||
|
colSpan: 0, |
||||
|
}; |
||||
|
} |
||||
|
const rowSpan = getRowSpan('cnValue', record, data.value); |
||||
|
if (rowIndex != 0 && data.value[rowIndex - 1].name == record.name) { |
||||
|
return { |
||||
|
rowSpan: 0, |
||||
|
colSpan: 0, |
||||
|
}; |
||||
|
} |
||||
|
return { |
||||
|
rowSpan: rowSpan, |
||||
|
}; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '能源种类', |
||||
|
dataIndex: 'energyType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '计量单位', |
||||
|
dataIndex: 'unit', |
||||
|
}, |
||||
|
{ |
||||
|
title: '加权平均', |
||||
|
dataIndex: 'averageFactorValue', |
||||
|
}, |
||||
|
{ |
||||
|
title: '全年', |
||||
|
dataIndex: 'carbonYearly', |
||||
|
}, |
||||
|
{ |
||||
|
title: '1月', |
||||
|
dataIndex: 'jan', |
||||
|
}, |
||||
|
{ |
||||
|
title: '2月', |
||||
|
dataIndex: 'feb', |
||||
|
}, |
||||
|
{ |
||||
|
title: '3月', |
||||
|
dataIndex: 'mar', |
||||
|
}, |
||||
|
{ |
||||
|
title: '4月', |
||||
|
dataIndex: 'apr', |
||||
|
}, |
||||
|
{ |
||||
|
title: '5月', |
||||
|
dataIndex: 'may', |
||||
|
}, |
||||
|
{ |
||||
|
title: '6月', |
||||
|
dataIndex: 'jun', |
||||
|
}, |
||||
|
{ |
||||
|
title: '7月', |
||||
|
dataIndex: 'jul', |
||||
|
}, |
||||
|
{ |
||||
|
title: '8月', |
||||
|
dataIndex: 'aug', |
||||
|
}, |
||||
|
{ |
||||
|
title: '9月', |
||||
|
dataIndex: 'sep', |
||||
|
}, |
||||
|
{ |
||||
|
title: '10月', |
||||
|
dataIndex: 'oct', |
||||
|
}, |
||||
|
{ |
||||
|
title: '11月', |
||||
|
dataIndex: 'nov', |
||||
|
}, |
||||
|
{ |
||||
|
title: '12月', |
||||
|
dataIndex: 'dec', |
||||
|
}, |
||||
|
], |
||||
|
formConfig: { |
||||
|
schemas: [ |
||||
|
{ |
||||
|
field: 'year', |
||||
|
label: '年份', |
||||
|
component: 'NsDatePicker', |
||||
|
componentProps: { |
||||
|
picker: 'year', |
||||
|
valueFormat: 'YYYY', |
||||
|
defaultValue: selectYear.value.format('YYYY'), |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
params: {}, |
||||
|
}, |
||||
|
rowKey: 'id', |
||||
|
}); |
||||
|
// 合并单元格 |
||||
|
const getRowSpan = (dataIndex: string, record: any, data: any, dependents: string[] = []) => { |
||||
|
let rowSpan = 1; |
||||
|
for (let i = data.indexOf(record) + 1; i < data.length; i++) { |
||||
|
let shouldMerge = true; |
||||
|
for (const dependent of dependents) { |
||||
|
if (data[i][dependent] !== record[dependent]) { |
||||
|
shouldMerge = false; |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
if (shouldMerge && data[i][dataIndex] === record[dataIndex]) { |
||||
|
rowSpan++; |
||||
|
} else { |
||||
|
break; |
||||
|
} |
||||
|
} |
||||
|
return rowSpan; |
||||
|
}; |
||||
|
// 获取表格数据 |
||||
|
// const getTableList = () => { |
||||
|
// fetch(carbonEmission.carbonEmissionStatistics , queryParams.value).then((res) => { |
||||
|
// data.value = res.data.records |
||||
|
// total.value = res.data.total |
||||
|
// }); |
||||
|
// }; |
||||
|
// 分页器 |
||||
|
// const onChange = (pageNumber: number,size: number) => { |
||||
|
// queryParams.value.pageNum = pageNumber; |
||||
|
// queryParams.value.pageSize = size; |
||||
|
// getTableList() |
||||
|
// }; |
||||
|
</script> |
||||
|
<style scoped lang="less"> |
||||
|
::v-deep .ant-table-title{ |
||||
|
display: flex; |
||||
|
} |
||||
|
::v-deep .ant-table-container{ |
||||
|
padding: 0px 16px; |
||||
|
} |
||||
|
</style> |
||||
|
<style scoped> |
||||
|
th.column-money, |
||||
|
td.column-money { |
||||
|
text-align: right !important; |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,283 @@ |
|||||
|
import { ref } from 'vue'; |
||||
|
import { http } from '/nerv-lib/util'; |
||||
|
import { origanizemanage } from '/@/api/origanizemanage'; |
||||
|
import { carbonEmissionFactorLibrary } from '/@/api/carbonEmissionFactorLibrary'; |
||||
|
export const formConfig = (disabled) => { |
||||
|
return ref([ |
||||
|
{ |
||||
|
field: 'fields', |
||||
|
component: 'NsChildForm', |
||||
|
componentProps: { |
||||
|
schemas: [ |
||||
|
{ |
||||
|
label: '排放源', |
||||
|
field: 'emissionSources', |
||||
|
component: 'NsInput', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入排放源', |
||||
|
maxLength: 20, |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请输入排放源', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
field: 'emissionType', |
||||
|
label: '排放分类', |
||||
|
component: 'NsCascader', |
||||
|
fieldMap: ['emissionType'], |
||||
|
componentProps: { |
||||
|
placeholder: '请选择排放分类', |
||||
|
api: carbonEmissionFactorLibrary.getCarbonFactorTree, |
||||
|
fieldNames: { label: 'emissionName', value: 'id' }, |
||||
|
showSearch: true, |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请选择排放分类', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
field: 'emissionGas', |
||||
|
label: '排放气体', |
||||
|
component: 'NsSelect', |
||||
|
componentProps: { |
||||
|
allowClear: true, |
||||
|
placeholder: '请选择排放气体', |
||||
|
options: [ |
||||
|
{ |
||||
|
label: 'CO2', |
||||
|
value: 'CO2', |
||||
|
}, |
||||
|
{ |
||||
|
label: 'CO2e', |
||||
|
value: 'CO2e', |
||||
|
}, |
||||
|
{ |
||||
|
label: 'SF6', |
||||
|
value:'SF6', |
||||
|
}, |
||||
|
{ |
||||
|
label: 'CH4', |
||||
|
value: 'CH4', |
||||
|
}, |
||||
|
{ |
||||
|
label: 'PFCs', |
||||
|
value: 'PFCs', |
||||
|
}, |
||||
|
{ |
||||
|
label: 'HFCs', |
||||
|
value: 'HFCs', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请选择排放气体', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
// {
|
||||
|
// field: 'emissionProcess',
|
||||
|
// label: '排放环节',
|
||||
|
// component: 'NsSelectApi',
|
||||
|
// componentProps: {
|
||||
|
// api: carbonEmissionFactorLibrary.getEmissionProcess,
|
||||
|
// params: {
|
||||
|
// emissionType: sessionStorage.getItem('checkedTreeNode'),
|
||||
|
// },
|
||||
|
// resultField: 'data',
|
||||
|
// labelField: 'emissionProcess',
|
||||
|
// valueField: 'emissionProcess',
|
||||
|
// immediate: true,
|
||||
|
// autoSelectFirst: false,
|
||||
|
// filterOption:false,
|
||||
|
// showSearch:true,
|
||||
|
// autoClearSearchValue:false
|
||||
|
// },
|
||||
|
// },
|
||||
|
{ |
||||
|
label: '排放环节', |
||||
|
field: 'emissionProcess', |
||||
|
component: 'NsInput', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入排放环节', |
||||
|
maxLength: 20, |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请输入排放环节', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
label: '排放因子', |
||||
|
field: 'emissionFactors', |
||||
|
component: 'NsInputNumber', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入排放因子值', |
||||
|
maxLength: 20, |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请输入排放因子值', |
||||
|
trigger: 'change', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
field: 'carbonEmissionPrefix', |
||||
|
label: '碳排前缀', |
||||
|
component: 'NsSelect', |
||||
|
componentProps: { |
||||
|
disabled: true, |
||||
|
allowClear: true, |
||||
|
defaultValue: 't', |
||||
|
placeholder: '请选择碳排前缀', |
||||
|
options: [ |
||||
|
{ |
||||
|
label: 'g', |
||||
|
value: 'g', |
||||
|
}, |
||||
|
{ |
||||
|
label: 'kg', |
||||
|
value: 'kg', |
||||
|
}, |
||||
|
{ |
||||
|
label: 't', |
||||
|
value: 't', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请选择碳排前缀', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
label: '碳排后缀', |
||||
|
field: 'carbonEmissionSuffix', |
||||
|
component: 'NsInput', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入碳排后缀', |
||||
|
maxLength: 20, |
||||
|
}, |
||||
|
rules: [ |
||||
|
{ |
||||
|
required: true, |
||||
|
message: '请输入碳排后缀', |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
{ |
||||
|
label: '已引用数', |
||||
|
field: 'numberOfReferences', |
||||
|
component: 'NsInput', |
||||
|
componentProps: { |
||||
|
defaultValue: 10, |
||||
|
disabled: true, |
||||
|
maxLength: 20, |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '参考文献', |
||||
|
field: 'reference', |
||||
|
component: 'NsTextarea', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入参考文献', |
||||
|
maxLength: 20, |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
}, |
||||
|
]); |
||||
|
}; |
||||
|
const options = ref([]); |
||||
|
|
||||
|
const getUserPerList = (transform, params = {}) => { |
||||
|
return http.post(origanizemanage.queryUserPerList, { ...params }).then((res) => { |
||||
|
return res.data?.map((item) => { |
||||
|
item = { ...item, ...transform(item) }; |
||||
|
return item; |
||||
|
}); |
||||
|
}); |
||||
|
}; |
||||
|
export const formConfig2 = (casData: any) => { |
||||
|
return ref([ |
||||
|
{ |
||||
|
field: 'information', |
||||
|
component: 'NsCascader', |
||||
|
componentProps: { |
||||
|
placeholder: '请选择', |
||||
|
displayRender: ({ labels, selectedOptions }: any) => { |
||||
|
console.log(labels, selectedOptions); |
||||
|
|
||||
|
casData.value = selectedOptions.map(({ label, value }) => { |
||||
|
return { label, value }; |
||||
|
}); |
||||
|
return labels.join('/'); |
||||
|
}, |
||||
|
loadData: (selectedOptions, options) => { |
||||
|
console.log(selectedOptions, options, 'selectedOptions, options'); |
||||
|
|
||||
|
const targetOption = selectedOptions[selectedOptions.length - 1]; |
||||
|
let transForm, params; |
||||
|
// load options lazily
|
||||
|
if (!selectedOptions.length) { |
||||
|
transForm = (data) => { |
||||
|
data['label'] = data.orgName; |
||||
|
data['value'] = data.orgId; |
||||
|
data['isLeaf'] = false; |
||||
|
data['level'] = 1; |
||||
|
return data; |
||||
|
}; |
||||
|
getUserPerList(transForm).then((res) => { |
||||
|
options.value = [...res]; |
||||
|
}); |
||||
|
} |
||||
|
const id = targetOption?.value; |
||||
|
const level = targetOption?.level; |
||||
|
if (targetOption) { |
||||
|
targetOption.loading = true; |
||||
|
} |
||||
|
|
||||
|
if (level === 1) { |
||||
|
transForm = (data) => { |
||||
|
data['label'] = data.deptName; |
||||
|
data['value'] = data.deptId; |
||||
|
data['isLeaf'] = false; |
||||
|
data['level'] = 2; |
||||
|
return data; |
||||
|
}; |
||||
|
params = { orgId: id }; |
||||
|
} else if (level === 2) { |
||||
|
transForm = (data) => { |
||||
|
data['label'] = data.roleName; |
||||
|
data['value'] = data.roleId; |
||||
|
data['level'] = 3; |
||||
|
return data; |
||||
|
}; |
||||
|
params = { deptId: id }; |
||||
|
} |
||||
|
if (targetOption) { |
||||
|
getUserPerList(transForm, { ...params }).then((res) => { |
||||
|
targetOption.loading = false; |
||||
|
targetOption.children = [...res]; |
||||
|
}); |
||||
|
} |
||||
|
}, |
||||
|
}, |
||||
|
}, |
||||
|
]); |
||||
|
}; |
@ -0,0 +1,406 @@ |
|||||
|
<template> |
||||
|
<div class="main"> |
||||
|
<div class="left"> |
||||
|
<div class="top"> |
||||
|
<a-form style="width: 100%;margin: 0 auto;"> |
||||
|
<div class="ns-form-title"><div class="title">2024年济阳站碳盘查报告</div></div> |
||||
|
<div style="padding: 0 16px !important;width: 100%;"> |
||||
|
<a-row> |
||||
|
<a-col :span="24" style="margin-bottom: 16px;"> |
||||
|
<a-input-search v-model:value="searchValue" style="margin-bottom: 8px" placeholder="请输入关键词" /> |
||||
|
</a-col> |
||||
|
</a-row> |
||||
|
</div> |
||||
|
</a-form> |
||||
|
<a-tree |
||||
|
:expanded-keys="expandedKeys" |
||||
|
:auto-expand-parent="autoExpandParent" |
||||
|
:tree-data="gData" |
||||
|
:height="233" |
||||
|
show-line |
||||
|
style="padding: 0 16px !important;" |
||||
|
@expand="onExpand" |
||||
|
> |
||||
|
<template #title="{ title }"> |
||||
|
<span v-if="title.indexOf(searchValue) > -1"> |
||||
|
{{ title.substring(0, title.indexOf(searchValue)) }} |
||||
|
<span style="color: #f50">{{ searchValue }}</span> |
||||
|
{{ title.substring(title.indexOf(searchValue) + searchValue.length) }} |
||||
|
</span> |
||||
|
<span v-else>{{ title }}</span> |
||||
|
</template> |
||||
|
</a-tree> |
||||
|
</div> |
||||
|
<div class="bottom"> |
||||
|
<a-form style="width: 100%;margin: 0 auto;"> |
||||
|
<div class="ns-form-title"><div class="title">报告相关</div></div> |
||||
|
<div class="button" style="padding: 0 16px !important;"> |
||||
|
<div class="changePage">排放统计</div> |
||||
|
<div class="changePage">碳排流向</div> |
||||
|
</div> |
||||
|
</a-form> |
||||
|
</div> |
||||
|
</div> |
||||
|
<div class="right"> |
||||
|
<div class="ns-table-title ns-title-extra-box">排放源</div> |
||||
|
<div class="mainLeft"></div> |
||||
|
<div class="mainRight"> |
||||
|
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" :scroll="{ x: 1500}" /> |
||||
|
</div> |
||||
|
</div> |
||||
|
</div> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref, watch } from 'vue'; |
||||
|
import type { TreeProps } from 'ant-design-vue'; |
||||
|
import { energyConsumption } from '/@/api/carbonEmissionFactorLibrary'; |
||||
|
const orgId = ref(''); |
||||
|
const result = JSON.parse(sessionStorage.getItem('ORGID')!); |
||||
|
orgId.value = result; |
||||
|
const fetch = (api, params = { orgId } ) => { |
||||
|
return http.post(api, params); |
||||
|
}; |
||||
|
// 树结构 |
||||
|
const x = 3; |
||||
|
const y = 2; |
||||
|
const z = 1; |
||||
|
const genData: TreeProps['treeData'] = []; |
||||
|
|
||||
|
const generateData = (_level: number, _preKey?: string, _tns?: TreeProps['treeData']) => { |
||||
|
const preKey = _preKey || '0'; |
||||
|
const tns = _tns || genData; |
||||
|
|
||||
|
const children = []; |
||||
|
for (let i = 0; i < x; i++) { |
||||
|
const key = `${preKey}-${i}`; |
||||
|
tns.push({ title: key, key }); |
||||
|
if (i < y) { |
||||
|
children.push(key); |
||||
|
} |
||||
|
} |
||||
|
if (_level < 0) { |
||||
|
return tns; |
||||
|
} |
||||
|
const level = _level - 1; |
||||
|
children.forEach((key, index) => { |
||||
|
tns[index].children = []; |
||||
|
return generateData(level, key, tns[index].children); |
||||
|
}); |
||||
|
}; |
||||
|
generateData(z); |
||||
|
|
||||
|
const dataList: TreeProps['treeData'] = []; |
||||
|
const generateList = (data: TreeProps['treeData']) => { |
||||
|
for (let i = 0; i < data.length; i++) { |
||||
|
const node = data[i]; |
||||
|
const key = node.key; |
||||
|
dataList.push({ key, title: key }); |
||||
|
if (node.children) { |
||||
|
generateList(node.children); |
||||
|
} |
||||
|
} |
||||
|
}; |
||||
|
generateList(genData); |
||||
|
|
||||
|
const getParentKey = ( |
||||
|
key: string | number, |
||||
|
tree: TreeProps['treeData'], |
||||
|
): string | number | undefined => { |
||||
|
let parentKey; |
||||
|
for (let i = 0; i < tree.length; i++) { |
||||
|
const node = tree[i]; |
||||
|
if (node.children) { |
||||
|
if (node.children.some(item => item.key === key)) { |
||||
|
parentKey = node.key; |
||||
|
} else if (getParentKey(key, node.children)) { |
||||
|
parentKey = getParentKey(key, node.children); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
return parentKey; |
||||
|
}; |
||||
|
const expandedKeys = ref<(string | number)[]>([]); |
||||
|
const searchValue = ref<string>(''); |
||||
|
const autoExpandParent = ref<boolean>(true); |
||||
|
const gData = ref<TreeProps['treeData']>(genData); |
||||
|
|
||||
|
const onExpand = (keys: string[]) => { |
||||
|
expandedKeys.value = keys; |
||||
|
autoExpandParent.value = false; |
||||
|
}; |
||||
|
|
||||
|
watch(searchValue, value => { |
||||
|
const expanded = dataList |
||||
|
.map((item: TreeProps['treeData'][number]) => { |
||||
|
if (item.title.indexOf(value) > -1) { |
||||
|
return getParentKey(item.key, gData.value); |
||||
|
} |
||||
|
return null; |
||||
|
}) |
||||
|
.filter((item, i, self) => item && self.indexOf(item) === i); |
||||
|
expandedKeys.value = expanded; |
||||
|
searchValue.value = value; |
||||
|
autoExpandParent.value = true; |
||||
|
}); |
||||
|
// 填报表格数据 |
||||
|
const queryParams = ref({ |
||||
|
pageNum: 1, |
||||
|
pageSize: 10, |
||||
|
orgId: orgId.value, |
||||
|
}) |
||||
|
const tableConfig = ref({ |
||||
|
title: '能耗统计', |
||||
|
api: energyConsumption.pageList, |
||||
|
params: queryParams.value, |
||||
|
headerActions: [ |
||||
|
{ |
||||
|
label: '新增', |
||||
|
name: 'userAdd', |
||||
|
type: 'primary', |
||||
|
handle: () => { |
||||
|
getDictList() |
||||
|
visible.value = true |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '导入', |
||||
|
type: 'primary', |
||||
|
name: 'userImport', |
||||
|
handle: () => {}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '导出', |
||||
|
type: 'primary', |
||||
|
name: 'userExports', |
||||
|
}, |
||||
|
{ |
||||
|
label: '模板下载', |
||||
|
type: 'primary', |
||||
|
name: 'userExports', |
||||
|
}, |
||||
|
{ |
||||
|
label: '上传凭证', |
||||
|
type: 'primary', |
||||
|
handle: () => { |
||||
|
openUpload.value = true; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '凭证下载', |
||||
|
type: 'primary', |
||||
|
name: 'userExports', |
||||
|
}, |
||||
|
], |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
customRender: (text: any) => { |
||||
|
return text.index + 1; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '能源种类', |
||||
|
dataIndex: 'energyType', |
||||
|
}, |
||||
|
{ |
||||
|
title: '计量单位', |
||||
|
className: 'unitName', |
||||
|
dataIndex: 'unitName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '全年', |
||||
|
dataIndex: 'yearly', |
||||
|
}, |
||||
|
{ |
||||
|
title: '1月', |
||||
|
dataIndex: 'jan', |
||||
|
}, |
||||
|
{ |
||||
|
title: '2月', |
||||
|
dataIndex: 'feb', |
||||
|
}, |
||||
|
{ |
||||
|
title: '3月', |
||||
|
dataIndex: 'mar', |
||||
|
}, |
||||
|
{ |
||||
|
title: '4月', |
||||
|
dataIndex: 'apr', |
||||
|
}, |
||||
|
{ |
||||
|
title: '5月', |
||||
|
dataIndex: 'may', |
||||
|
}, |
||||
|
{ |
||||
|
title: '6月', |
||||
|
dataIndex: 'jun', |
||||
|
}, |
||||
|
{ |
||||
|
title: '7月', |
||||
|
dataIndex: 'jul', |
||||
|
}, |
||||
|
{ |
||||
|
title: '8月', |
||||
|
dataIndex: 'aug', |
||||
|
}, |
||||
|
{ |
||||
|
title: '9月', |
||||
|
dataIndex: 'sep', |
||||
|
}, |
||||
|
{ |
||||
|
title: '10月', |
||||
|
dataIndex: 'oct', |
||||
|
}, |
||||
|
{ |
||||
|
title: '11月', |
||||
|
dataIndex: 'nov', |
||||
|
}, |
||||
|
{ |
||||
|
title: '12月', |
||||
|
dataIndex: 'dec', |
||||
|
}, |
||||
|
], |
||||
|
columnActions: { |
||||
|
title: '操作', |
||||
|
actions: [ |
||||
|
{ |
||||
|
label: '编辑', |
||||
|
name: 'userEdit', |
||||
|
handle: (record: any) => { |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '删除', |
||||
|
name: 'userDelete', |
||||
|
dynamicParams: { id: 'id' }, |
||||
|
confirm: true, |
||||
|
isReload: true, |
||||
|
api: energyConsumption.del, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
|
||||
|
formConfig: { |
||||
|
schemas: [ |
||||
|
{ |
||||
|
field: 'year', |
||||
|
label: '年份', |
||||
|
component: 'NsDatePicker', |
||||
|
componentProps: { |
||||
|
picker: 'year', |
||||
|
valueFormat: 'YYYY', |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
params: {}, |
||||
|
}, |
||||
|
rowKey: 'id', |
||||
|
}); |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less" scoped> |
||||
|
.main { |
||||
|
background-color: @ns-content-bg; |
||||
|
display: flex; |
||||
|
height: 100%; |
||||
|
} |
||||
|
.left { |
||||
|
width: 300px; |
||||
|
margin-right: @ns-gap; |
||||
|
min-width: fit-content; |
||||
|
> div { |
||||
|
background-color: @white; |
||||
|
flex: 1; |
||||
|
} |
||||
|
|
||||
|
display: flex; |
||||
|
flex-direction: column; |
||||
|
.top{ |
||||
|
position: relative; |
||||
|
height: 80%; |
||||
|
.ns-form-title{ |
||||
|
font-weight: bold; |
||||
|
user-select: text; |
||||
|
padding: 16px; |
||||
|
margin-bottom: 16px; |
||||
|
padding-bottom: 10px; |
||||
|
border-bottom: 1px solid #e9e9e9; |
||||
|
} |
||||
|
.title{ |
||||
|
text-align: left; |
||||
|
height: 32px; |
||||
|
line-height: 32px; |
||||
|
font-weight: bold; |
||||
|
user-select: text; |
||||
|
position: relative; |
||||
|
padding-left: 9px; |
||||
|
} |
||||
|
.title::before { |
||||
|
content: ''; |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
top: 50%; |
||||
|
transform: translateY(-50%); |
||||
|
height: 13px; |
||||
|
width: 3px; |
||||
|
border-radius: 1px; |
||||
|
background-color: #2778FF; |
||||
|
} |
||||
|
} |
||||
|
.bottom{ |
||||
|
position: relative; |
||||
|
height: 20%; |
||||
|
.ns-form-title{ |
||||
|
font-weight: bold; |
||||
|
user-select: text; |
||||
|
padding: 16px; |
||||
|
margin-bottom: 16px; |
||||
|
padding-bottom: 10px; |
||||
|
border-bottom: 1px solid #e9e9e9; |
||||
|
} |
||||
|
.title{ |
||||
|
text-align: left; |
||||
|
height: 32px; |
||||
|
line-height: 32px; |
||||
|
font-weight: bold; |
||||
|
user-select: text; |
||||
|
position: relative; |
||||
|
padding-left: 9px; |
||||
|
} |
||||
|
.title::before { |
||||
|
content: ''; |
||||
|
position: absolute; |
||||
|
left: 0; |
||||
|
top: 50%; |
||||
|
transform: translateY(-50%); |
||||
|
height: 13px; |
||||
|
width: 3px; |
||||
|
border-radius: 1px; |
||||
|
background-color: #2778FF; |
||||
|
} |
||||
|
.changePage{ |
||||
|
height: 3vh; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
.right { |
||||
|
flex: 1; |
||||
|
min-width: 0; |
||||
|
height: 100%; |
||||
|
padding: @ns-gap; |
||||
|
background-color: @white; |
||||
|
border-radius: @ns-border-radius; |
||||
|
box-shadow: @ns-content-box-shadow; |
||||
|
.ns-table-title { |
||||
|
text-align: left; |
||||
|
font-size: 16px; |
||||
|
font-weight: bold; |
||||
|
user-select: text; |
||||
|
width: 100%; |
||||
|
margin-bottom: @ns-gap; |
||||
|
} |
||||
|
} |
||||
|
</style> |
@ -0,0 +1,225 @@ |
|||||
|
<template> |
||||
|
<!-- 首页 --> |
||||
|
<div v-if="isMainPage"> |
||||
|
<ns-view-list-table v-bind="tableConfig" :model="data" ref="mainRef" /> |
||||
|
</div> |
||||
|
<!-- 填报页 --> |
||||
|
<div v-if="fillInPage"> |
||||
|
<fillIn /> |
||||
|
</div> |
||||
|
<!-- 新增报告弹窗 --> |
||||
|
<a-drawer |
||||
|
:width="500" |
||||
|
:visible="visible" |
||||
|
:body-style="{ paddingBottom: '80px' }" |
||||
|
:footer-style="{ textAlign: 'right' }" |
||||
|
destroyOnClose |
||||
|
@close="onClose"> |
||||
|
<a-form |
||||
|
ref="formRef" |
||||
|
:model="formState" |
||||
|
:rules="rules" |
||||
|
:label-col="labelCol" |
||||
|
:wrapper-col="wrapperCol" |
||||
|
> |
||||
|
<a-form-item ref="name" label="报告名称" name="reportName"> |
||||
|
<a-input v-model:value="formState.reportName" placeholder="请输入报告名称" /> |
||||
|
</a-form-item> |
||||
|
<a-form-item ref="name" label="报告年度" name="reportYear"> |
||||
|
<a-date-picker v-model:value="formState.reportYear" picker="year" valueFormat="YYYY" /> |
||||
|
</a-form-item> |
||||
|
<a-form-item ref="name" label="适用标准" name="genericStandard"> |
||||
|
<a-input v-model:value="formState.genericStandard" placeholder="请输入适用标准" /> |
||||
|
</a-form-item> |
||||
|
<a-form-item label="报告周期" name="reportPeriod"> |
||||
|
<a-select v-model:value="formState.reportPeriod" placeholder="请选择排放类型"> |
||||
|
<a-select-option value="1">年度</a-select-option> |
||||
|
<a-select-option value="2">月度</a-select-option> |
||||
|
</a-select> |
||||
|
</a-form-item> |
||||
|
<a-form-item ref="name" label="报告范围" name="reportScope"> |
||||
|
<a-range-picker v-model:value="formState.reportScope" picker="month" valueFormat="YYYY-MM" /> |
||||
|
</a-form-item> |
||||
|
</a-form> |
||||
|
<template #footer> |
||||
|
<a-button style="margin-right: 8px" @click="onClose">取消</a-button> |
||||
|
<a-button type="primary" @click="onSubmit">确定</a-button> |
||||
|
</template> |
||||
|
</a-drawer> |
||||
|
</template> |
||||
|
|
||||
|
<script lang="ts" setup> |
||||
|
import { ref,toRaw } from 'vue'; |
||||
|
import { http } from '/nerv-lib/util/http'; |
||||
|
import { carbonInventoryCheck } from '/@/api/carbonEmissionFactorLibrary'; |
||||
|
import fillIn from './fillInPage/index.vue'; |
||||
|
defineOptions({ name: 'CarbonInventoryCheck' }); |
||||
|
const orgId = ref(''); |
||||
|
const result = JSON.parse(sessionStorage.getItem('ORGID')!); |
||||
|
orgId.value = result; |
||||
|
const fetch = (api, params = { orgId }) => { |
||||
|
return http.post(api, params); |
||||
|
}; |
||||
|
// 判断展示哪个页面 |
||||
|
const isMainPage = ref(true); |
||||
|
const fillInPage = ref(false); |
||||
|
// 新增相关数据 |
||||
|
const visible = ref(false); |
||||
|
const formState = ref({}) |
||||
|
const formRef = ref(); |
||||
|
const labelCol = { span: 5 }; |
||||
|
const wrapperCol = { span: 19 }; |
||||
|
// 定义form表单的必填 |
||||
|
const rules: Record<string, Rule[]> = { |
||||
|
reportName: [{ required: true, message: '请输入报告名称', trigger: 'change' }], |
||||
|
reportYear: [{ required: true, message: '请选择报告年度', trigger: 'change' }], |
||||
|
genericStandard: [{ required: true, message: '请输入适用标准', trigger: 'change' }], |
||||
|
reportPeriod: [{ required: true, message: '请选择排放类型', trigger: 'change' }], |
||||
|
reportScope: [{ required: true, message: '请选择报告范围', trigger: 'change' }], |
||||
|
}; |
||||
|
// 关闭新增抽屉 |
||||
|
const onClose = () => { |
||||
|
visible.value = false; |
||||
|
formState.value = {} |
||||
|
formRef.value.resetFields(); |
||||
|
}; |
||||
|
// 点击确定提交 |
||||
|
const onSubmit = () => { |
||||
|
formRef.value |
||||
|
.validate() |
||||
|
.then(() => { |
||||
|
console.log('values', formState, toRaw(formState)); |
||||
|
formState.value.enterpriseOrgId = orgId.value |
||||
|
formState.value.startTime = formState.value.reportScope[0] |
||||
|
formState.value.endTime = formState.value.reportScope[1] |
||||
|
fetch(carbonInventoryCheck.createOrUpdate,formState.value).then((res) => { |
||||
|
visible.value = false |
||||
|
mainRef.value?.nsTableRef.reload(); |
||||
|
}); |
||||
|
}) |
||||
|
.catch(error => { |
||||
|
console.log('error', error); |
||||
|
}); |
||||
|
}; |
||||
|
// 表格相关数据 |
||||
|
const data = ref([]); |
||||
|
const mainRef = ref(); |
||||
|
const tableConfig = ref({ |
||||
|
title: '数据库', |
||||
|
api: carbonInventoryCheck.carbonInventoryList, |
||||
|
params: { |
||||
|
orgId |
||||
|
}, |
||||
|
headerActions: [ |
||||
|
{ |
||||
|
label: '新增', |
||||
|
name: 'userAdd', |
||||
|
type: 'primary', |
||||
|
handle: () => { |
||||
|
visible.value = true |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
columns: [ |
||||
|
{ |
||||
|
title: '序号', |
||||
|
customRender: (text: any) => { |
||||
|
return text.index + 1; |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
title: '企业名称', |
||||
|
dataIndex: 'enterpriseName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '报告名称', |
||||
|
dataIndex: 'reportName', |
||||
|
}, |
||||
|
{ |
||||
|
title: '报告年度', |
||||
|
dataIndex: 'reportYear', |
||||
|
}, |
||||
|
{ |
||||
|
title: '适用标准', |
||||
|
dataIndex: 'genericStandard', |
||||
|
}, |
||||
|
{ |
||||
|
title: '更新人', |
||||
|
dataIndex: 'updateUser', |
||||
|
}, |
||||
|
{ |
||||
|
title: '更新时间', |
||||
|
dataIndex: 'updateTime', |
||||
|
}, |
||||
|
], |
||||
|
columnActions: { |
||||
|
title: '操作', |
||||
|
actions: [ |
||||
|
{ |
||||
|
label: '编辑', |
||||
|
name: 'userEdit', |
||||
|
handle: (record: any) => { |
||||
|
visible.value = true |
||||
|
fetch(carbonInventoryCheck.findById,{id:record.id}).then((res) => { |
||||
|
formState.value = res.data |
||||
|
formState.value.reportScope = [res.data.startTime,res.data.endTime] |
||||
|
}); |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '填报', |
||||
|
name: 'fillIn', |
||||
|
handle: (record: any) => { |
||||
|
isMainPage.value = false |
||||
|
fillInPage.value = true |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '下载', |
||||
|
name: 'download', |
||||
|
handle: (record: any) => { |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
label: '删除', |
||||
|
name: 'userDelete', |
||||
|
dynamicParams: { id: 'id' }, |
||||
|
confirm: true, |
||||
|
isReload: true, |
||||
|
api: carbonInventoryCheck.delete, |
||||
|
}, |
||||
|
], |
||||
|
}, |
||||
|
formConfig: { |
||||
|
schemas: [ |
||||
|
{ |
||||
|
field: 'reportName', |
||||
|
label: '报告名称', |
||||
|
component: 'NsInput', |
||||
|
componentProps: { |
||||
|
placeholder: '请输入报告名称', |
||||
|
maxLength: 30, |
||||
|
}, |
||||
|
}, |
||||
|
{ |
||||
|
field: 'reportYear', |
||||
|
label: '报告年度', |
||||
|
component: 'NsRangePicker', |
||||
|
fieldMap: ['startYear', 'endYear'], |
||||
|
componentProps: { |
||||
|
valueFormat: 'YYYY', |
||||
|
placeholder: ['报告年度', '报告年度'], |
||||
|
picker:"year" |
||||
|
}, |
||||
|
}, |
||||
|
], |
||||
|
params: {}, |
||||
|
}, |
||||
|
rowKey: 'id', |
||||
|
}); |
||||
|
// 填报页 |
||||
|
</script> |
||||
|
|
||||
|
<style lang="less" scoped> |
||||
|
|
||||
|
</style> |
@ -0,0 +1,45 @@ |
|||||
|
import { ref } from 'vue'; |
||||
|
import { origanizemanage } from '/@/api/origanizemanage'; |
||||
|
import { http } from '/nerv-lib/saas'; |
||||
|
|
||||
|
export const mockData = ref([ |
||||
|
{ |
||||
|
id: 3, |
||||
|
zhanghao: 'axb', |
||||
|
name: '张三', |
||||
|
sex: '男', |
||||
|
phone: '123456789', |
||||
|
email: '1234567889', |
||||
|
relation: '1', |
||||
|
role: '1', |
||||
|
status: '1', |
||||
|
}, |
||||
|
]); |
||||
|
|
||||
|
export const mockData2 = ref([ |
||||
|
{ |
||||
|
information: '铁路局1/产品部1/产品总监1', |
||||
|
}, |
||||
|
]); |
||||
|
|
||||
|
export const treeData = ref([ |
||||
|
{ |
||||
|
title: '铁路总局', |
||||
|
key: '0-0', |
||||
|
children: [ |
||||
|
{ title: '济阳站', key: '0-0-0' }, |
||||
|
{ title: '临沂站', key: '0-0-1' }, |
||||
|
], |
||||
|
}, |
||||
|
]); |
||||
|
|
||||
|
export const treeData2 = [ |
||||
|
{ |
||||
|
title: '全部', |
||||
|
key: '0-0', |
||||
|
children: [ |
||||
|
{ title: '产品部', key: '0-0-0' }, |
||||
|
{ title: '运维部', key: '0-0-1' }, |
||||
|
], |
||||
|
}, |
||||
|
]; |
@ -0,0 +1,439 @@ |
|||||
|
// 抽屉 |
||||
|
.drawer-item { |
||||
|
|
||||
|
.light-area, |
||||
|
.circuit-area, |
||||
|
.control-area, |
||||
|
.control-scene-area, |
||||
|
.light-parameters-area { |
||||
|
width: 100%; |
||||
|
margin-top: 20px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.light-area-tab, |
||||
|
.circuit-tab, |
||||
|
.control-tab, |
||||
|
.control-scene-tab, |
||||
|
.light-parameters-tab { |
||||
|
width: 5px; |
||||
|
height: 23px; |
||||
|
opacity: 1; |
||||
|
background: rgba(26, 174, 251, 1); |
||||
|
margin-right: 4px; |
||||
|
} |
||||
|
|
||||
|
.light-area-text, |
||||
|
.circuit-text, |
||||
|
.control-text, |
||||
|
.control-scene-text, |
||||
|
.light-parameters-text { |
||||
|
font-size: 14px; |
||||
|
color: white; |
||||
|
padding-left: 5px; |
||||
|
line-height: 23px; |
||||
|
width: 110px; |
||||
|
height: 23px; |
||||
|
background: linear-gradient(270deg, rgba(86, 221, 253, 0) 0%, rgba(25, 176, 255, 1) 100%); |
||||
|
user-select: none; |
||||
|
} |
||||
|
|
||||
|
.light-area-tab, |
||||
|
.light-area-text { |
||||
|
display: inline-block; |
||||
|
justify-content: center; |
||||
|
} |
||||
|
|
||||
|
.plan.enabled { |
||||
|
border: none; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
border-radius: 5px; |
||||
|
vertical-align: top; |
||||
|
margin-left: 235px; |
||||
|
width: 88px; |
||||
|
height: 32px; |
||||
|
background: linear-gradient(180deg, rgba(103, 222, 0, 1) 0%, rgba(0, 181, 6, 1) 100%); |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.plan.disabled { |
||||
|
border: none; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
border-radius: 5px; |
||||
|
color: white; |
||||
|
vertical-align: top; |
||||
|
margin-left: 235px; |
||||
|
width: 88px; |
||||
|
height: 32px; |
||||
|
background-color: red; |
||||
|
} |
||||
|
|
||||
|
.plan:disabled { |
||||
|
cursor: not-allowed; |
||||
|
} |
||||
|
|
||||
|
.openPlan.enabled2 { |
||||
|
border: none; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
border-radius: 5px; |
||||
|
color: white; |
||||
|
vertical-align: top; |
||||
|
width: 88px; |
||||
|
height: 32px; |
||||
|
background: linear-gradient(180deg, rgba(103, 222, 0, 1) 0%, rgba(0, 181, 6, 1) 100%); |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.openPlan.disabled2 { |
||||
|
border: none; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
border-radius: 5px; |
||||
|
color: white; |
||||
|
vertical-align: top; |
||||
|
width: 88px; |
||||
|
height: 32px; |
||||
|
background-color: red; |
||||
|
} |
||||
|
|
||||
|
.openPlan:disabled { |
||||
|
cursor: not-allowed; |
||||
|
} |
||||
|
|
||||
|
.btn2 { |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
margin-left: 80px; |
||||
|
} |
||||
|
|
||||
|
.openzm { |
||||
|
cursor: pointer; |
||||
|
color: rgba(34, 183, 255, 1); |
||||
|
margin-left: 20px; |
||||
|
font-size: 14px; |
||||
|
} |
||||
|
|
||||
|
.custom-checkbox { |
||||
|
width: 13px; |
||||
|
height: 13px; |
||||
|
} |
||||
|
|
||||
|
.both { |
||||
|
width: 59.79px; |
||||
|
height: 32px; |
||||
|
opacity: 1; |
||||
|
background: linear-gradient(180deg, |
||||
|
rgba(255, 187, 0, 1) 0%, |
||||
|
rgba(255, 112, 3, 1) 91.21%, |
||||
|
rgba(255, 129, 3, 1) 100%); |
||||
|
margin-left: 8px; |
||||
|
font-size: 12px; |
||||
|
color: white; |
||||
|
border: none; |
||||
|
border-radius: 5px; |
||||
|
} |
||||
|
|
||||
|
.btn2 { |
||||
|
button { |
||||
|
margin: 0 5px; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.allBtn { |
||||
|
border: 0; |
||||
|
width: 40px; |
||||
|
color: white; |
||||
|
background-color: transparent; |
||||
|
} |
||||
|
|
||||
|
.blue-background.ant-switch-checked { |
||||
|
background-color: linear-gradient(180deg, |
||||
|
rgba(1, 206, 255, 1) 0%, |
||||
|
rgba(0, 150, 229, 1) 100%) !important; |
||||
|
} |
||||
|
|
||||
|
.grey-background.ant-switch { |
||||
|
background-color: grey !important; |
||||
|
} |
||||
|
|
||||
|
.blue-background.ant-switch-checked .ant-switch-handle { |
||||
|
background-color: linear-gradient(180deg, |
||||
|
rgba(1, 206, 255, 1) 0%, |
||||
|
rgba(0, 150, 229, 1) 100%) !important; |
||||
|
} |
||||
|
|
||||
|
.grey-background.ant-switch .ant-switch-handle { |
||||
|
background-color: grey !important; |
||||
|
} |
||||
|
|
||||
|
p { |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.area, |
||||
|
.btnArea, |
||||
|
.control-mode-btn-area, |
||||
|
.control-scene-btn-area { |
||||
|
margin-left: -17px; |
||||
|
|
||||
|
button { |
||||
|
width: 21%; |
||||
|
padding: 0 2%; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
.btn { |
||||
|
width: 92px; |
||||
|
height: 40px; |
||||
|
border-radius: 4px; |
||||
|
opacity: 1; |
||||
|
margin-top: 10px; |
||||
|
margin-left: 17px; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
opacity: 1; |
||||
|
border: 1px solid rgba(207, 212, 219, 1); |
||||
|
line-height: 20.27px; |
||||
|
color: white; |
||||
|
text-align: center; |
||||
|
vertical-align: top; |
||||
|
background-color: rgba(255, 255, 255, 0.1); |
||||
|
} |
||||
|
|
||||
|
.selected { |
||||
|
background: linear-gradient(180deg, rgba(201, 245, 255, 1) 0%, rgba(138, 215, 255, 1) 100%); |
||||
|
color: rgba(0, 61, 90, 1); |
||||
|
border: 1px solid white; |
||||
|
} |
||||
|
|
||||
|
.btn:hover { |
||||
|
background-color: rgba(207, 212, 219, 1); |
||||
|
} |
||||
|
|
||||
|
.btn:active { |
||||
|
background-color: rgba(102, 102, 102, 1); |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
.circuit-area, |
||||
|
.control-scene-area, |
||||
|
.light-parameters-area { |
||||
|
left: 51px; |
||||
|
width: 100%; |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
|
||||
|
.circuit-tab, |
||||
|
.circuit-text { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.batch { |
||||
|
width: 60px; |
||||
|
height: 32px; |
||||
|
opacity: 1; |
||||
|
border: 1px solid rgba(67, 136, 251, 1); |
||||
|
color: rgba(67, 136, 251, 1); |
||||
|
border-radius: 5px; |
||||
|
background-color: white; |
||||
|
margin-left: 11px; |
||||
|
} |
||||
|
|
||||
|
.control-area { |
||||
|
left: 51px; |
||||
|
width: 100%; |
||||
|
margin-top: 20px; |
||||
|
} |
||||
|
|
||||
|
.control-tab, |
||||
|
.control-text { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
:deep(.cell) { |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
:deep(#pane-first) { |
||||
|
height: 100%; |
||||
|
} |
||||
|
|
||||
|
.control-scene-tab, |
||||
|
.control-scene-text { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.light-parameters-tab, |
||||
|
.light-parameters-text { |
||||
|
display: inline-block; |
||||
|
} |
||||
|
|
||||
|
.light-parameters-textarea>p { |
||||
|
height: 100%; |
||||
|
display: flex; |
||||
|
border: 1px solid rgba(236, 239, 245, 1); |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.bottom { |
||||
|
width: 100%; |
||||
|
height: 64px; |
||||
|
display: flex; |
||||
|
justify-content: flex-end; |
||||
|
align-items: center; |
||||
|
position: fixed; |
||||
|
bottom: 0; |
||||
|
right: 0; |
||||
|
} |
||||
|
|
||||
|
.execute { |
||||
|
margin-right: 20px; |
||||
|
width: 74px; |
||||
|
height: 40px; |
||||
|
opacity: 1; |
||||
|
cursor: pointer; |
||||
|
border-radius: 4px; |
||||
|
background: rgba(67, 136, 251, 1); |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
color: white; |
||||
|
border: 0; |
||||
|
margin: 0 10px; |
||||
|
} |
||||
|
|
||||
|
.flushed { |
||||
|
width: 74px; |
||||
|
height: 40px; |
||||
|
cursor: pointer; |
||||
|
opacity: 1; |
||||
|
border-radius: 4px; |
||||
|
font-size: 14px; |
||||
|
font-weight: 400; |
||||
|
color: rgba(102, 102, 102, 1); |
||||
|
background: white; |
||||
|
border: 1px solid rgba(193, 197, 204, 1); |
||||
|
margin: 0 10px; |
||||
|
} |
||||
|
|
||||
|
:deep(.ant-table-pagination) { |
||||
|
visibility: hidden; |
||||
|
} |
||||
|
|
||||
|
.drawer-content { |
||||
|
margin-left: 20px; |
||||
|
} |
||||
|
|
||||
|
.arrow-indicator { |
||||
|
position: absolute; |
||||
|
top: 50%; |
||||
|
left: 0; |
||||
|
transform: translateY(-50%); |
||||
|
z-index: 1; |
||||
|
} |
||||
|
|
||||
|
.drawer-title1 { |
||||
|
position: fixed; |
||||
|
width: 33px; |
||||
|
height: 33px; |
||||
|
top: 0; |
||||
|
bottom: 0; |
||||
|
right: 20px; |
||||
|
margin: auto; |
||||
|
z-index: 99999; |
||||
|
} |
||||
|
|
||||
|
.drawer-title2 { |
||||
|
position: fixed; |
||||
|
width: 33px; |
||||
|
height: 33px; |
||||
|
top: 0; |
||||
|
bottom: 0; |
||||
|
right: 495px; |
||||
|
margin: auto; |
||||
|
z-index: 99999; |
||||
|
} |
||||
|
|
||||
|
.arrowbtn { |
||||
|
display: flex; |
||||
|
justify-content: center; |
||||
|
align-items: center; |
||||
|
width: 28px; |
||||
|
height: 28px; |
||||
|
background: rgba(0, 0, 0, 1); |
||||
|
opacity: 0.5; |
||||
|
border: none; |
||||
|
} |
||||
|
|
||||
|
:deep(.ant-tabs-tab-btn) { |
||||
|
color: white; |
||||
|
} |
||||
|
|
||||
|
:deep(.ant-table) { |
||||
|
background-color: transparent; |
||||
|
} |
||||
|
|
||||
|
:deep(.ant-table-bordered) { |
||||
|
background-color: transparent; |
||||
|
} |
||||
|
|
||||
|
:deep(.ant-table-thead) { |
||||
|
background-color: transparent; |
||||
|
} |
||||
|
|
||||
|
:deep(.ant-table-cell) { |
||||
|
background-color: transparent; |
||||
|
color: #fff; |
||||
|
} |
||||
|
|
||||
|
.custom-table { |
||||
|
border-collapse: collapse; |
||||
|
width: 416px; |
||||
|
height: 60px; |
||||
|
color: rgba(255, 255, 255, 1); |
||||
|
} |
||||
|
|
||||
|
.custom-table th, |
||||
|
.custom-table td { |
||||
|
border: 1px solid rgba(163, 192, 243, 1); |
||||
|
text-align: left; |
||||
|
padding: 8px; |
||||
|
text-align: center; |
||||
|
} |
||||
|
|
||||
|
.table1 { |
||||
|
margin-top: 20px; |
||||
|
width: 100%; |
||||
|
cellspacing: 0; |
||||
|
cellpadding: 0; |
||||
|
border: 1px solid rgba(255, 255, 255); |
||||
|
border-radius: 5px; |
||||
|
background: rgba(255, 255, 255, 0.1); |
||||
|
} |
||||
|
|
||||
|
.light-area, |
||||
|
.circuit-area, |
||||
|
.control-area, |
||||
|
.control-scene-area, |
||||
|
.light-parameters-area { |
||||
|
width: 100%; |
||||
|
margin-top: 20px; |
||||
|
display: flex; |
||||
|
align-items: center; |
||||
|
} |
||||
|
|
||||
|
.zmhlbtn { |
||||
|
position: relative; |
||||
|
} |
||||
|
|
||||
|
// 禁用图标 |
||||
|
.anticon-stop { |
||||
|
position: absolute; |
||||
|
right: 3px; |
||||
|
bottom: 3px; |
||||
|
} |
||||
|
} |
File diff suppressed because it is too large
Loading…
Reference in new issue