需求变更整改

This commit is contained in:
guanj
2025-07-15 16:31:06 +08:00
parent 96518a4c9d
commit aa323c0d9c
50 changed files with 582 additions and 263 deletions

View File

@@ -22,6 +22,7 @@ export const auditEdData = (data) => {
data: data,
})
}
// 修改工程
export const auditEngineering = (data) => {
return request({
url: '/cs-device-boot/engineering/auditEngineering',
@@ -30,3 +31,12 @@ export const auditEngineering = (data) => {
data: data,
})
}
// 修改项目
export const updateProject = (data) => {
return request({
url: '/cs-device-boot/project/updateProject',
method: 'post',
data: data,
})
}

View File

@@ -1,4 +1,4 @@
export let color = [ '#07CCCA','#00BFF5', '#FFBF00', '#77DA63', '#D5FF6B', '#Ff6600', '#FF9100', '#5B6E96', '#66FFCC', '#B3B3B3']
export const gradeColor3 = ['#339966', '#FFCC33', '#CC0000']
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#CC0000']
export const gradeColor3 = ['#339966', '#FFCC33', '#A52a2a']
export const gradeColor5 = ['#00CC00', '#99CC99', '#FF9900','#996600','#A52a2a']

View File

@@ -745,7 +745,7 @@ export default {
zhou = waveDatas[0].RMSSMinDetail.secondeZhou;
}
colors.push("#FFCC00");
colors.push("#DAA520");
colors.push("#fff");
colors.push("#fff");
break;
@@ -783,8 +783,8 @@ export default {
rmsvY = waveDatas[0].RMSSMinDetail.rmsvSecondY;
zhou = waveDatas[0].RMSSMinDetail.secondeZhou;
}
colors.push("#FFCC00");
colors.push("#009900");
colors.push("#DAA520");
colors.push("#2E8B57");
colors.push("#fff");
break;
case 3:
@@ -822,9 +822,9 @@ export default {
rmsvY = waveDatas[0].RMSSMinDetail.rmsvSecondY;
zhou = waveDatas[0].RMSSMinDetail.secondeZhou;
}
colors.push("#FFCC00");
colors.push("#009900");
colors.push("#CC0000");
colors.push("#DAA520");
colors.push("#2E8B57");
colors.push("#A52a2a");
break;
}
if (waveDatas[0].unit === "电压") {
@@ -1090,7 +1090,7 @@ export default {
symbol: "none",
sampling: "average",
itemStyle: {
color: "#FFCC00",
color: "#DAA520",
},
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
@@ -1105,7 +1105,7 @@ export default {
symbol: "none",
sampling: "average",
itemStyle: {
color: "#009900",
color: "#2E8B57",
},
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
@@ -1120,7 +1120,7 @@ export default {
symbol: "none",
sampling: "average",
itemStyle: {
color: "#CC0000",
color: "#A52a2a",
},
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
@@ -1518,7 +1518,7 @@ export default {
symbol: "none",
sampling: "average",
itemStyle: {
color: "#FFCC00",
color: "#DAA520",
},
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
@@ -1533,7 +1533,7 @@ export default {
symbol: "none",
sampling: "average",
itemStyle: {
color: "#009900",
color: "#2E8B57",
},
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染
@@ -1548,7 +1548,7 @@ export default {
symbol: "none",
sampling: "average",
itemStyle: {
color: "#CC0000",
color: "#A52a2a",
},
progressive: 500,
// 渲染阈值,大于此值则启动渐进渲染

View File

@@ -461,7 +461,7 @@ export default {
adata = waveDatas[0].shunshiS.shunshiSA
}
colors.push('#FFCC00')
colors.push('#DAA520')
colors.push('#fff')
colors.push('#fff')
break
@@ -481,8 +481,8 @@ export default {
adata = waveDatas[0].shunshiS.shunshiSA
bdata = waveDatas[0].shunshiS.shunshiSB
}
colors.push('#FFCC00')
colors.push('#009900')
colors.push('#DAA520')
colors.push('#2E8B57')
colors.push('#fff')
break
case 3:
@@ -505,9 +505,9 @@ export default {
cdata = waveDatas[0].shunshiS.shunshiSC
}
colors.push('#FFCC00')
colors.push('#009900')
colors.push('#CC0000')
colors.push('#DAA520')
colors.push('#2E8B57')
colors.push('#A52a2a')
break
}
@@ -754,7 +754,7 @@ export default {
symbol: 'none',
sampling: 'average',
itemStyle: {
color: '#FFCC00'
color: '#DAA520'
},
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
@@ -770,7 +770,7 @@ export default {
symbol: 'none',
sampling: 'average',
itemStyle: {
color: '#009900'
color: '#2E8B57'
},
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
@@ -786,7 +786,7 @@ export default {
symbol: 'none',
sampling: 'average',
itemStyle: {
color: '#CC0000'
color: '#A52a2a'
},
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
@@ -844,24 +844,24 @@ export default {
switch (this.iphasic) {
case 1:
a = waveDataTemp.title.aTitle
colors.push('#FFCC00')
colors.push('#DAA520')
colors.push('#fff')
colors.push('#fff')
break
case 2:
a = waveDataTemp.title.aTitle
b = waveDataTemp.title.bTitle
colors.push('#FFCC00')
colors.push('#009900')
colors.push('#DAA520')
colors.push('#2E8B57')
colors.push('#fff')
break
case 3:
a = waveDataTemp.title.aTitle
b = waveDataTemp.title.bTitle
c = waveDataTemp.title.cTitle
colors.push('#FFCC00')
colors.push('#009900')
colors.push('#CC0000')
colors.push('#DAA520')
colors.push('#2E8B57')
colors.push('#A52a2a')
break
}
@@ -1123,7 +1123,7 @@ export default {
symbol: 'none',
sampling: 'average',
itemStyle: {
color: '#FFCC00'
color: '#DAA520'
},
large: true,
progressive: 1000,
@@ -1138,7 +1138,7 @@ export default {
symbol: 'none',
sampling: 'average',
itemStyle: {
color: '#009900'
color: '#2E8B57'
},
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染
@@ -1153,7 +1153,7 @@ export default {
symbol: 'none',
sampling: 'average',
itemStyle: {
color: '#CC0000'
color: '#A52a2a'
},
progressive: 1000,
// 渲染阈值,大于此值则启动渐进渲染

View File

@@ -1,23 +1,44 @@
<template>
<div :style="{ height: tableStore.table.height }">
<vxe-table ref="tableRef" height="auto" :data="tableStore.table.data" v-loading="tableStore.table.loading"
v-bind="Object.assign({}, defaultAttribute, $attrs)" @checkbox-all="selectChangeEvent"
@checkbox-change="selectChangeEvent" :showOverflow="showOverflow">
<vxe-table
ref="tableRef"
height="auto"
:key="key"
:data="tableStore.table.data"
v-loading="tableStore.table.loading"
v-bind="Object.assign({}, defaultAttribute, $attrs)"
@checkbox-all="selectChangeEvent"
@checkbox-change="selectChangeEvent"
:showOverflow="showOverflow"
:sort-config="{ remote: true }"
@sort-change="handleSortChange"
>
<!-- Column 组件内部是 el-table-column -->
<template v-if="isGroup">
<GroupColumn :column="tableStore.table.column" />
</template>
<template v-else>
<Column :attr="item" :key="key + '-column'" v-for="(item, key) in tableStore.table.column"
:tree-node="item.treeNode">
<Column
:attr="item"
:key="key + '-column'"
v-for="(item, key) in tableStore.table.column"
:tree-node="item.treeNode"
>
<!-- tableStore 预设的列 render 方案 -->
<template v-if="item.render" #default="scope">
<FieldRender :field="item" :row="scope.row" :column="scope.column" :index="scope.rowIndex" :key="key +
'-' +
item.render +
'-' +
(item.field ? '-' + item.field + '-' + scope.row[item.field] : '')
" />
<FieldRender
:field="item"
:row="scope.row"
:column="scope.column"
:index="scope.rowIndex"
:key="
key +
'-' +
item.render +
'-' +
(item.field ? '-' + item.field + '-' + scope.row[item.field] : '')
"
/>
</template>
</Column>
</template>
@@ -26,11 +47,16 @@
</div>
<div v-if="tableStore.showPage" class="table-pagination">
<el-pagination :currentPage="tableStore.table.params!.pageNum" :page-size="tableStore.table.params!.pageSize"
:page-sizes="pageSizes" background
<el-pagination
:currentPage="tableStore.table.params!.pageNum"
:page-size="tableStore.table.params!.pageSize"
:page-sizes="pageSizes"
background
:layout="config.layout.shrink ? 'prev, next, jumper' : 'sizes,total, ->, prev, pager, next, jumper'"
:total="tableStore.table.total" @size-change="onTableSizeChange"
@current-change="onTableCurrentChange"></el-pagination>
:total="tableStore.table.total"
@size-change="onTableSizeChange"
@current-change="onTableCurrentChange"
></el-pagination>
</div>
<slot name="footer"></slot>
</template>
@@ -51,7 +77,7 @@ const config = useConfig()
const tableRef = ref<VxeTableInstance>()
const tableStore = inject('tableStore') as TableStoreClass
const router = useRouter()
const key = ref(0)
interface Props extends /* @vue-ignore */ Partial<InstanceType<typeof ElTable>> {
isGroup?: boolean
showOverflow?: boolean
@@ -82,7 +108,32 @@ const pageSizes = computed(() => {
}
return defaultSizes
})
const handleSortChange = ({ field, order }: any) => {
// console.log('🚀 ~ handleSortChange ~ prop, order :', field, order)
if (field && order) {
// 根据当前排序条件对所有数据进行排序
const list = tableStore.table.copyData.sort((a, b) => {
if (order === 'asc') {
return a[field] > b[field] ? 1 : -1
} else {
return a[field] < b[field] ? 1 : -1
}
})
console.log(tableStore.isWebPaging)
if (tableStore.isWebPaging) {
tableStore.table.data = JSON.parse(
JSON.stringify(
window.XEUtils.chunk(list, tableStore.table.params!.pageSize)[tableStore.table.params!.pageNum - 1]
)
)
} else {
tableStore.table.data = JSON.parse(JSON.stringify(list))
}
// key.value += 1
}
}
/*
* 记录选择的项
*/
@@ -98,8 +149,6 @@ watch(
() => tableStore.table.allFlag,
newVal => {
if (tableStore.table.allFlag) {
console.log("🚀 ~ tableStore.table:", tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '')
tableRef.value?.exportData({
filename: tableStore.exportName || document.querySelectorAll('.ba-nav-tab.active')[0].textContent || '', // 文件名字
sheetName: 'Sheet1',
@@ -107,14 +156,15 @@ watch(
useStyle: true,
data: tableStore.table.allData, // 数据源 // 过滤那个字段导出
columnFilterMethod: function (column: any) {
return !(column.column.title === undefined || column.column.title === '序号' || column.column.title === '操作')
return !(
column.column.title === undefined ||
column.column.title === '序号' ||
column.column.title === '操作'
)
}
})
tableStore.table.allFlag = false
}
}
)
watch(

View File

@@ -134,7 +134,7 @@ const defaultProps = {
label: 'name',
value: 'id'
}
const process = ref('2')
const process = ref('')
//治理设备数据
const zlDeviceData = ref([])
const zlDevList = ref<any>([])
@@ -181,6 +181,9 @@ watch(process, val => {
}, 0)
})
function filterProcess(nodes: any) {
if (process.value == '') {
return nodes
}
return nodes
.map(node => {
// 递归处理子节点

View File

@@ -32,6 +32,7 @@ const config = useConfig()
const tree = ref()
const treRef = ref()
const changeDeviceType = (val: any, obj: any) => {
console.log("🚀 ~ changeDeviceType ~ val:", val,obj)
emit('deviceTypeChange', val, obj)
}
getDeviceTree().then(res => {

View File

@@ -119,7 +119,7 @@ const props = withDefaults(defineProps<Props>(), {
type: '',
data: []
})
const process = ref('2')
const process = ref('')
const route = useRoute()
const { proxy } = useCurrentInstance()
const menuCollapse = ref(false)
@@ -238,12 +238,16 @@ const filterNode = (value: string, data: any, node: any) => {
}
}
function filterProcess(nodes: any) {
if (process.value == '') {
return nodes
}
return nodes
.map(node => {
// 递归处理子节点
const children = node.children ? filterProcess(node.children) : []
// 如果当前节点的process=4或者有子节点满足条件则保留当前节点
if (node.process == process.value || children.length > 0) {
return {
...node,

View File

@@ -34,6 +34,7 @@ export default class TableStore {
ref: null,
selection: [],
data: [],
copyData: [],
allData: [],
allFlag: false,
webPagingData: [],
@@ -93,6 +94,7 @@ export default class TableStore {
this.table.data = []
this.table.total = 0
}
this.table.copyData = filtration(this.table.data)
if (Array.isArray(res)) {
this.table.data = res
}
@@ -204,7 +206,7 @@ export default class TableStore {
this.table.allData = filtration(res.data.records || res.data)
this.table.allFlag = data.showAllFlag || true
})
},1500)
}, 1500)
}
]
])

View File

@@ -29,7 +29,7 @@ const tableStore = new TableStore({
{ title: '角色', field: 'roleName' },
// { title: '部门', field: 'deptId' },
{ title: '电话', field: 'phoneShow' },
{ title: '注册时间', field: 'registerTime' },
{ title: '注册时间', field: 'registerTime', sortable: true },
{ title: '类型', field: 'casualUserName' },
{ title: '状态', field: 'stateName' },
{

View File

@@ -53,8 +53,8 @@ const tableStore = new TableStore({
{ title: '角色', field: 'roleName', minWidth: '130' },
// { title: '部门', field: 'deptName', minWidth: '200' },
{ title: '电话', field: 'phoneShow', minWidth: '100' },
{ title: '注册时间', field: 'registerTime', minWidth: '130' },
{ title: '登录时间', field: 'loginTime', minWidth: '130' },
{ title: '注册时间', field: 'registerTime', minWidth: '130', sortable: true },
{ title: '登录时间', field: 'loginTime', minWidth: '130', sortable: true },
{ title: '类型', field: 'casualUserName', minWidth: '80' },
{
title: '状态',

View File

@@ -25,8 +25,13 @@
</template> -->
<template #select>
<el-form-item label="设备名称">
<el-input maxlength="32" clearable show-word-limit v-model.trim="tableStore.table.params.searchValue"
placeholder="请输入设备名称" />
<el-input
maxlength="32"
clearable
show-word-limit
v-model.trim="tableStore.table.params.searchValue"
placeholder="请输入设备名称"
/>
</el-form-item>
</template>
</TableHeader>
@@ -80,9 +85,16 @@ const tableStore = new TableStore({
exportName: '异常事件',
publicHeight: 65,
column: [
{
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '设备名称', field: 'ndid', align: 'center' },
{ title: '异常时间', field: 'evtTime', align: 'center' },
{ title: '告警代码', field: 'code', align: 'center' },
{ title: '异常时间', field: 'evtTime', align: 'center', sortable: true },
{ title: '告警代码', field: 'code', align: 'center', sortable: true }
]
})
@@ -112,6 +124,6 @@ onMounted(() => {
setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any
}, 0)
const addMenu = () => { }
const addMenu = () => {}
</script>
<style></style>

View File

@@ -76,10 +76,17 @@ const tableStore = new TableStore({
exportName: '设备告警',
publicHeight: 65,
column: [
{
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center', minWidth: 110, sortable: true },
{
title: '模块信息',
field: 'moduleNo',
@@ -92,9 +99,11 @@ const tableStore = new TableStore({
title: '告警代码',
field: 'code',
align: 'center',
formatter: (row: any) => {
return row.cellValue ? row.cellValue : '/'
}
},
sortable: true
},
{
title: '事件描述',
@@ -103,10 +112,26 @@ const tableStore = new TableStore({
{
title: '级别',
field: 'level',
formatter: (row: any) => {
return row.cellValue == 1 ? '1级' : row.cellValue == 2 ? '2级' : row.cellValue == 3 ? '3级' : '/'
render: 'tag',
custom: {
1: 'danger',
2: 'warning',
3: 'success'
},
replaceValue: {
1: '1级',
2: '2级',
3: '3级'
}
}
// {
// title: '级别',
// field: 'level',
// formatter: (row: any) => {
// return row.cellValue == 1 ? '1级' : row.cellValue == 2 ? '2级' : row.cellValue == 3 ? '3级' : '/'
// }
// }
],
beforeSearchFun: () => {}
})

View File

@@ -76,10 +76,17 @@ const tableStore = new TableStore({
exportName: '稳态越限告警',
publicHeight: 65,
column: [
{
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center', sortable: true },
{ title: '事件描述', field: 'showName', align: 'center' }
],

View File

@@ -121,17 +121,23 @@ const tableStore = new TableStore({
method: 'POST',
publicHeight: 65,
exportName: '暂态事件',
column: [
column: [ {
title: '序号',
width: 80,
formatter: (row: any) => {
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '设备名称', field: 'equipmentName', align: 'center' },
{ title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' },
{ title: '发生时刻', field: 'startTime', align: 'center', width: '240' },
{ title: '发生时刻', field: 'startTime', align: 'center', width: '240',sortable: true },
{ title: '监测点名称', field: 'lineName', align: 'center' },
{ title: '事件描述', field: 'showName', align: 'center' },
{ title: '事件发生位置', field: 'evtParamPosition', align: 'center' },
{ title: '相别', field: 'evtParamPhase', align: 'center' },
{ title: '持续时间(s)', field: 'evtParamTm', align: 'center' },
{ title: '暂降(聚升)幅值(%)', minWidth: 100, field: 'evtParamVVaDepth', align: 'center' },
{ title: '持续时间(s)', field: 'evtParamTm', align: 'center',sortable: true },
{ title: '暂降(聚升)幅值(%)', minWidth: 100, field: 'evtParamVVaDepth', align: 'center',sortable: true },
{
title: '操作',

View File

@@ -1,6 +1,6 @@
<template>
<div class="default-main analyze-apf" :style="{ height: pageHeight.height }" v-loading="loading">
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
<DeviceTree @node-click="nodeClick" @init="nodeClick" @deviceTypeChange="deviceTypeChange"></DeviceTree>
<div class="analyze-apf-right" v-if="formInline.devId">
<div ref="headerRef">
<TableHeader :showSearch="false" ref="tableHeaderRef" @selectChange="selectChange">
@@ -101,6 +101,7 @@ const formInline = reactive({
const timeFlag = ref(true)
const frequencyShow = ref(false)
const devCapacity = ref(0)
const flag = ref(false)
const typelist = [
{
label: '平均值',
@@ -139,8 +140,12 @@ const init = () => {
})
})
}
const deviceTypeChange = (val: any, obj: any) => {
flag.value = true
nodeClick(obj)
}
const nodeClick = async (e: anyObj) => {
if (e.level == 2) {
if (e.level == 2 && flag.value) {
formInline.devId = e.id
loading.value = true
if (zblist.value.length === 0) {
@@ -222,7 +227,7 @@ const search = () => {
let lineName = lineStyle[Object.keys(anotherList).indexOf(k)]
let phaseList = processingOfData(anotherList[k], 'phase')
for (let j in phaseList) {
color.push(j == 'A' ? '#FFCC00' : j == 'B' ? '#009900' : j == 'C' ? '#CC0000' : '#0000CC')
color.push(j == 'A' ? '#DAA520' : j == 'B' ? '#2E8B57' : j == 'C' ? '#A52a2a' : '#0000CC')
legend.push(
j == 'M' ? k : j == 'A' ? `A相_${k}` : j == 'B' ? `B相_${k}` : j == 'C' ? `C相_${k}` : j
)

View File

@@ -1,21 +1,36 @@
<template>
<div class="default-main">
<div class="analyze-dvr" v-show="!isWaveCharts" :style="{ height: pageHeight.height }" v-loading="loading">
<DeviceTree @node-click="nodeClick" @init="nodeClick"></DeviceTree>
<DeviceTree @node-click="nodeClick" @init="nodeClick" @deviceTypeChange="deviceTypeChange"></DeviceTree>
<div class="analyze-dvr-right" v-if="tableStore.table.params.deviceId">
<TableHeader datePicker showExport>
<template v-slot:select>
<el-form-item label="事件类型">
<el-select v-model.trim="tableStore.table.params.eventType" clearable placeholder="请选择事件类型">
<el-option v-for="item in eventList" :key="item.value" :label="item.label"
:value="item.value" />
<el-select
v-model.trim="tableStore.table.params.eventType"
clearable
placeholder="请选择事件类型"
>
<el-option
v-for="item in eventList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
<el-form-item label="位置">
<el-select v-model.trim="tableStore.table.params.location" clearable placeholder="请选择位置">
<el-option v-for="item in locationList" :key="item.value" :label="item.label"
:value="item.value" />
<el-select
v-model.trim="tableStore.table.params.location"
clearable
placeholder="请选择位置"
>
<el-option
v-for="item in locationList"
:key="item.value"
:label="item.label"
:value="item.value"
/>
</el-select>
</el-form-item>
</template>
@@ -24,8 +39,14 @@
</div>
<el-empty v-else description="请选择设备" class="analyze-dvr-right" />
</div>
<waveFormAnalysis v-loading="loading" v-if="isWaveCharts" ref="waveFormAnalysisRef"
@handleHideCharts="isWaveCharts = false" :wp="wp" style="padding: 10px;" />
<waveFormAnalysis
v-loading="loading"
v-if="isWaveCharts"
ref="waveFormAnalysisRef"
@handleHideCharts="isWaveCharts = false"
:wp="wp"
style="padding: 10px"
/>
<!-- <div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
<el-row>
<el-col :span="12">
@@ -67,14 +88,14 @@ import { mainHeight } from '@/utils/layout'
import DeviceTree from '@/components/tree/govern/deviceTree.vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue';
import waveFormAnalysis from '@/views/govern/device/control/tabs/components/waveFormAnalysis.vue'
import { analyseWave } from '@/api/common'
import TableHeader from '@/components/table/header/index.vue'
import { getFileZip } from '@/api/cs-harmonic-boot/datatrend'
import { ElMessage } from 'element-plus'
defineOptions({
name: 'analyze/DVR/index'
name: 'govern/analyze/DVR/index'
})
const pageHeight = mainHeight(20)
const loading = ref(false)
@@ -85,43 +106,49 @@ const isWaveCharts = ref(false)
const bxactiveName = ref('ssbx')
const boxoList: any = ref({})
const wp = ref({})
const eventList = ref([{
value: 'Evt_Sys_DipStr',
label: '电压暂降'
},
{
value: 'Evt_Sys_SwlStr',
label: '电压暂升'
},
{
value: 'Evt_Sys_IntrStr',
label: '电压中断'
}])
const locationList = ref([{
value: 'grid',
label: '电网侧'
},
{
value: 'load',
label: '负载侧'
}])
const eventList = ref([
{
value: 'Evt_Sys_DipStr',
label: '电压暂降'
},
{
value: 'Evt_Sys_SwlStr',
label: '电压暂升'
},
{
value: 'Evt_Sys_IntrStr',
label: '电压中断'
}
])
const locationList = ref([
{
value: 'grid',
label: '电网侧'
},
{
value: 'load',
label: '负载侧'
}
])
const waveFormAnalysisRef = ref()
const tableStore = new TableStore({
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
method: 'POST',
column: [
{ title: '事件描述', field: 'showName', },
{ title: '事件描述', field: 'showName' },
{ title: '发生位置', field: 'evtParamPosition' },
{ title: '持续时间(s)', field: 'evtParamTm' },
{ title: '持续时间(s)', field: 'evtParamTm', sortable: true },
{
title: '暂降(聚升)幅值(%)', field: 'evtParamVVaDepth', formatter: (row: any) => {
title: '暂降(聚升)幅值(%)',
field: 'evtParamVVaDepth',
formatter: (row: any) => {
let a = row.cellValue.split('%')[0] - 0
console.log("🚀 ~ a:", a)
console.log('🚀 ~ a:', a)
return a ? a.toFixed(2) : '/'
}
}, sortable: true
},
{ title: '发生时刻', field: 'startTime' },
{ title: '发生时刻', field: 'startTime', sortable: true },
{
title: '操作',
align: 'center',
@@ -147,11 +174,10 @@ const tableStore = new TableStore({
row.loading1 = false
if (res != undefined) {
boxoList.value = row
boxoList.value.featureAmplitude = row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
boxoList.value.featureAmplitude =
row.evtParamVVaDepth != '-' ? row.evtParamVVaDepth - 0 : null
// boxoList.value.systemType = 'WX'
wp.value = res.data
}
loading.value = false
})
@@ -161,7 +187,8 @@ const tableStore = new TableStore({
})
nextTick(() => {
waveFormAnalysisRef.value && waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
waveFormAnalysisRef.value &&
waveFormAnalysisRef.value.getWpData(wp.value, boxoList.value, true)
waveFormAnalysisRef.value && waveFormAnalysisRef.value.setHeight(false, 150)
})
}
@@ -174,9 +201,7 @@ const tableStore = new TableStore({
render: 'basicButton',
disabled: row => {
return !(!row.wavePath && row.evtParamTm < 20)
},
}
},
{
name: 'edit',
@@ -199,10 +224,9 @@ const tableStore = new TableStore({
document.body.appendChild(link)
link.click() //执行下载
document.body.removeChild(link) //释放标签
})
}
},
}
]
}
],
@@ -210,17 +234,21 @@ const tableStore = new TableStore({
tableStore.table.data.forEach((item: any) => {
item.loading = false
item.evtParamTm = item.evtParamTm.split('s')[0]
})
}
})
const flag = ref(false)
tableStore.table.params.type = 0
tableStore.table.params.eventType = ''
tableStore.table.params.location = ''
provide('tableStore', tableStore)
const deviceTypeChange = (val: any, obj: any) => {
flag.value = true
nodeClick(obj)
}
const nodeClick = async (e: anyObj) => {
// console.log("🚀 ~ nodeClick ~ e:", e)
if (e.level == 2) {
if (e.level == 2&& flag.value) {
loading.value = false
tableStore.table.params.deviceId = e.id
nextTick(() => {

View File

@@ -58,8 +58,8 @@ const tableStore: any = new TableStore({
}
},
{ field: 'successCount', title: '成功解析数', minWidth: 150 },
{ field: 'startTime', title: '导入开始时间', minWidth: 170 },
{ field: 'endTime', title: '导入结束时间', minWidth: 170 },
{ field: 'startTime', title: '导入开始时间', minWidth: 170, sortable: true },
{ field: 'endTime', title: '导入结束时间', minWidth: 170 , sortable: true},
{
title: '解析状态',
field: 'status',

View File

@@ -42,9 +42,9 @@ const tableStore: any = new TableStore({
}
},
{ field: 'name', title: '文件名称', minWidth: 170 },
{ field: 'createTime', title: '导入时间', minWidth: 170 },
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 },
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170 },
{ field: 'createTime', title: '导入时间', minWidth: 170 , sortable: true},
{ field: 'allCount', title: '数据总数(条)', minWidth: 170 , sortable: true},
{ field: 'realCount', title: '已入库总数(条)', minWidth: 170, sortable: true },
{
title: '解析状态',
field: 'state',

View File

@@ -270,7 +270,7 @@ const init = () => {
}
}
if ((echartsData.value.legend = ['A相', 'B相', 'C相'])) {
echartsData.value.color = ['#FFCC00', '#009900', '#CC0000']
echartsData.value.color = ['#DAA520', '#2E8B57', '#A52a2a']
}
} else {

View File

@@ -208,7 +208,7 @@
</el-button>
<el-button
type="primary"
v-if="dataSet.indexOf('_moduleData') != -1"
v-if="dataSet.indexOf('_moduleData') != -1 && moduleFlag"
:icon="Refresh"
@click="refreshTheState"
>
@@ -582,6 +582,7 @@ const tableLoading = ref(false)
const getGroupLoading = ref(false)
const deviceData = ref<any>(null)
const dataSet = ref('')
const moduleFlag = ref(false)
const testItemRecordsRef = ref()
const moduleDataRef = ref()
const nearRealTimeDataRef = ref()
@@ -1284,6 +1285,7 @@ const handleClick = async (tab?: any) => {
tableLoading.value = false
setTimeout(() => {
//targetType
res.data.length > 0 ? (moduleFlag.value = true) : (moduleFlag.value = false)
moduleDataRef.value?.setData(res.data)
}, 500)
setTimeout(() => {

View File

@@ -4,7 +4,7 @@
<div class="container">
<div class="tabs-container">
<!-- 左侧标签头 -->
<div class="tab-list" :style="titleHeight" style="overflow-y: auto">
<div class="tab-list" :style="titleHeight" style="overflow-y: auto" v-loading="loadingLeft">
<button
v-for="(item, index) in list"
:key="index"
@@ -71,6 +71,7 @@ import { yMethod } from '@/utils/echartMethod'
import { k } from 'vite/dist/node/types.d-aGj9QkWt'
const list: any = ref([])
const loading = ref(false)
const loadingLeft = ref(false)
const height = ref(mainHeight(290))
const titleHeight = ref(mainHeight(302))
const echartHeight = ref(mainHeight(342))
@@ -129,7 +130,7 @@ const setData = (data: any) => {
}
],
itemStyle: {
color: '#FFB74D' // 图例标记颜色与数据标记一致
color: '#ccc' // 图例标记颜色与数据标记一致
}
},
toolbox: {
@@ -229,8 +230,8 @@ const setData = (data: any) => {
name: k.stateDesc,
coord: [k.time, k.stateDesc == '离线' ? 0.03 : k.stateDesc == '运行' ? 1 : 0.5],
itemStyle: {
color: '#FFB74D', // 亮黄色填充
borderColor: '#FFB74D', // 边框颜色
color: k.stateDesc == '离线' ? "#f56c6c" : k.stateDesc == '运行' ? '#67c23a' : '#e6a23c', //'#FFB74D', // 亮黄色填充
borderColor: k.stateDesc == '离线' ? "#f56c6c" : k.stateDesc == '运行' ? '#67c23a' : '#e6a23c',//'#FFB74D', // 边框颜色
borderWidth: 1 // 边框宽度
}
}))
@@ -269,7 +270,7 @@ const setData = (data: any) => {
min: loadMin,
max: loadMax
},
color: ['#FFCC00', '#009900', '#CC0000'],
color: ['#DAA520', '#2E8B57', '#A52a2a'],
options: {
series: [
{
@@ -333,7 +334,7 @@ const setData = (data: any) => {
min: modOuMin,
max: modOuMax
},
color: ['#FFCC00', '#009900', '#CC0000'],
color: ['#DAA520', '#2E8B57', '#A52a2a'],
options: {
series: [
{
@@ -373,7 +374,7 @@ const setData = (data: any) => {
echarts.connect('group')
}
const getModule = async (id: string) => {
loading.value = true
loadingLeft.value = true
await getModuleState({ id: id }).then(res => {
res.data.forEach((item: any) => {
list.value.forEach((k: any) => {
@@ -385,7 +386,7 @@ const getModule = async (id: string) => {
ElMessage.success('刷新成功')
})
loading.value = false
loadingLeft.value = false
}
const changeTab = (e: any) => {
echartList.value = list.value[e]

View File

@@ -210,7 +210,7 @@ const tableStore = new TableStore({
return row.cellValue === 'MQTT' ? 'MQTT' : row.cellValue === 'cloud' ? 'CLD' : row.cellValue
}
},
{ title: '录入时间', field: 'createTime' },
{ title: '录入时间', field: 'createTime', sortable: true },
{ title: '网络设备ID', field: 'ndid' },
{
title: '状态',

View File

@@ -40,7 +40,7 @@ const tableStore: any = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'startTime', title: '发生时刻', minWidth: 170 },
{ field: 'startTime', title: '发生时刻', minWidth: 170, sortable: true },
{ field: 'showName', title: '事件描述', minWidth: 170 },
{
field: 'phaseType',
@@ -58,7 +58,7 @@ const tableStore: any = new TableStore({
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
return row.cellValue
}
}, sortable: true
},
{
field: 'featureAmplitude',

View File

@@ -273,21 +273,21 @@ const initRadioCharts = () => {
value: 0,
name: 'A相',
itemStyle: {
color: '#FFCC00'
color: '#DAA520'
}
},
{
value: 0,
name: 'B相',
itemStyle: {
color: '#009900'
color: '#2E8B57'
}
},
{
value: 0,
name: 'C相',
itemStyle: {
color: '#CC0000'
color: '#A52a2a'
}
}
]
@@ -373,21 +373,21 @@ const initRadioCharts = () => {
value: 0,
name: 'A相',
itemStyle: {
color: '#FFCC00'
color: '#DAA520'
}
},
{
value: 0,
name: 'B相',
itemStyle: {
color: '#009900'
color: '#2E8B57'
}
},
{
value: 0,
name: 'C相',
itemStyle: {
color: '#CC0000'
color: '#A52a2a'
}
}
]

View File

@@ -341,7 +341,7 @@ const init = async () => {
return str
}
},
color: ['#FFCC00', '#009900', '#CC0000', ...color],
color: ['#DAA520', '#2E8B57', '#A52a2a', ...color],
xAxis: {
type: 'time',
axisLabel: {
@@ -461,7 +461,7 @@ const init = async () => {
: kk[0].anotherName,
type: 'line',
smooth: true,
color: colorName == 'A' ? '#FFCC00' : colorName == 'B' ? '#009900' : colorName == 'C' ? '#CC0000' : '',
color: colorName == 'A' ? '#DAA520' : colorName == 'B' ? '#2E8B57' : colorName == 'C' ? '#A52a2a' : '',
symbol: 'none',
data: seriesList,
lineStyle: lineStyle[lineS],

View File

@@ -44,7 +44,7 @@ const tableStore = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ field: 'startTime', title: '发生时刻', minWidth: 170 },
{ field: 'startTime', title: '发生时刻', minWidth: 170, sortable: true },
{ field: 'showName', title: '事件描述', minWidth: 170 },
{
field: 'phaseType',
@@ -62,7 +62,7 @@ const tableStore = new TableStore({
formatter: (row: any) => {
row.cellValue = row.cellValue ? row.cellValue.toFixed(2) : '/'
return row.cellValue
}
}, sortable: true
},
{
field: 'featureAmplitude',
@@ -74,7 +74,7 @@ const tableStore = new TableStore({
row.cellValue = String(row.cellValue).split('.')[0]
}
return row.cellValue
}
}, sortable: true
},
{
title: '操作',

View File

@@ -431,7 +431,7 @@ const refreshTree = () => {
const range = (start: any, end: any, step: any) => {
return Array.from({ length: (end - start) / step + 1 }, (_, i) => start + i * step)
}
const colors = ['#FFCC00', '#009900', '#CC0000']
const colors = ['#DAA520', '#2E8B57', '#A52a2a']
const lineStyle = [{ type: 'solid', }, { type: 'dashed', }, { type: 'dotted', }]
const titleList: any = ref('')
@@ -627,7 +627,7 @@ const init = (flag: boolean) => {
return str
}
},
// color: ['#FFCC00', '#009900', '#CC0000', ...color],
// color: ['#DAA520', '#2E8B57', '#A52a2a', ...color],
xAxis: {
type: 'time',
axisLabel: {
@@ -714,7 +714,7 @@ const init = (flag: boolean) => {
? kk[0].phase + '相' + kk[0].anotherName
: kk[0].anotherName,
type: 'line',
color: colorName == 'A' ? '#FFCC00' : colorName == 'B' ? '#009900' : colorName == 'C' ? '#CC0000' : '',
color: colorName == 'A' ? '#DAA520' : colorName == 'B' ? '#2E8B57' : colorName == 'C' ? '#A52a2a' : '',
smooth: true,
symbol: 'none',
lineStyle: lineStyle[lineS],

View File

@@ -32,8 +32,8 @@ const tableStore = new TableStore({
return row.cellValue == 1 ? '设备登记' : row.cellValue == 2 ? '功能调试' : row.cellValue == 3 ? '出厂调试' : row.cellValue == 4 ? '设备投运' : ''
}
},
{ title: '开始时间', field: 'startTime', align: 'center' },
{ title: '结束时间', field: 'endTime', align: 'center' }
{ title: '开始时间', field: 'startTime', align: 'center', sortable: true },
{ title: '结束时间', field: 'endTime', align: 'center', sortable: true }
],
loadCallback: () => {

View File

@@ -18,10 +18,10 @@ const tableStore = new TableStore({
url: '/cs-device-boot/cslog/queryLog',
method: 'POST',
column: [
{ title: '操作日期', field: 'createTime', align: 'center' },
{ title: '操作日期', field: 'createTime', align: 'center', sortable: true },
{ title: '操作描述', field: 'operate', align: 'center', width: '300' },
{ title: '用户名称', field: 'userName', align: 'center' },
{ title: '更新时间', field: 'updateTime', align: 'center' },
{ title: '更新时间', field: 'updateTime', align: 'center', sortable: true },
{ title: '失败原因', field: 'failReason', align: 'center' },
{ title: '状态', field: 'result', align: 'center' },
{ title: '登录名', field: 'loginName', align: 'center' }

View File

@@ -20,7 +20,7 @@ const tableStore = new TableStore({
column: [
{ title: '推送用户', field: 'userName', align: 'center' },
{ title: '推送内容', field: 'showName', align: 'center' },
{ title: '推送时间', field: 'sendTime', align: 'center' },
{ title: '推送时间', field: 'sendTime', align: 'center', sortable: true },
]
})

View File

@@ -61,6 +61,7 @@ const tableStore = new TableStore({
{ title: '数据名称', field: 'name', minWidth: 220 },
{ title: '别名', field: 'otherName', minWidth: 220 },
{ title: '展示名称', field: 'showName', minWidth: 170 },
{ title: '告警码', field: 'defaultValue', minWidth: 170 },
{ title: '相别', field: 'phaseName', minWidth: 80 },
{ title: '单位', field: 'unit', minWidth: 80 },
{ title: '基础数据类型', field: 'type', minWidth: 170 },

View File

@@ -82,52 +82,52 @@
<el-divider content-position="center">拓展数据</el-divider>
</div>
<el-form class="form-two" :model="form" label-width="140px" ref="formRef2" :rules="rules">
<el-form-item label="参数缺省值:" prop="defaultValue">
<el-form-item label="告警码(缺省值):" >
<el-input maxlength="32" show-word-limit v-model.trim="form.defaultValue" autocomplete="off"
placeholder="请输入参数缺省值"></el-input>
placeholder="请输入告警码(缺省值)"></el-input>
</el-form-item>
<el-form-item label="事件类别:" prop="eventType">
<el-form-item label="事件类别:" >
<el-input maxlength="32" show-word-limit v-model.trim="form.eventType" autocomplete="off"
placeholder="请输入事件类别"></el-input>
</el-form-item>
<el-form-item label="设置最大值:" prop="maxNum">
<el-form-item label="设置最大值:" >
<el-input maxlength="32" show-word-limit type="number" v-model.trim="form.maxNum" autocomplete="off"
placeholder="请输入设置最大值"></el-input>
</el-form-item>
<el-form-item label="设置最小值:" prop="minNum">
<el-form-item label="设置最小值:" >
<el-input maxlength="32" show-word-limit type="number" v-model.trim="form.minNum" autocomplete="off"
placeholder="请输入设置最小值"></el-input>
</el-form-item>
<el-form-item label="枚举序列:" prop="setValue">
<el-form-item label="枚举序列:">
<el-input maxlength="32" show-word-limit v-model.trim="form.setValue" autocomplete="off"
placeholder="请输入枚举序列"></el-input>
</el-form-item>
<el-form-item label="字符串长度上限:" prop="strlen">
<el-form-item label="字符串长度上限:" >
<el-input maxlength="32" show-word-limit type="number" v-model.trim="form.strlen" autocomplete="off"
placeholder="请输入字符串长度上限"></el-input>
</el-form-item>
<el-form-item label="上送规则:" prop="tranRule">
<el-form-item label="上送规则:" >
<el-input maxlength="32" show-word-limit v-model.trim="form.tranRule" autocomplete="off"
placeholder="请输入上送规则"></el-input>
</el-form-item>
<el-form-item label="是否可远程控制:" prop="ctlSts">
<el-form-item label="是否可远程控制:" >
<el-radio v-model.trim="form.ctlSts" :label="1"></el-radio>
<el-radio v-model.trim="form.ctlSts" :label="0"></el-radio>
</el-form-item>
<el-form-item label="是否需遥控校验:" prop="curSts">
<el-form-item label="是否需遥控校验:" >
<el-radio v-model.trim="form.curSts" :label="1"></el-radio>
<el-radio v-model.trim="form.curSts" :label="0"></el-radio>
</el-form-item>
<el-form-item label="是否存储:" prop="storeFlag">
<el-form-item label="是否存储:" >
<el-radio v-model.trim="form.storeFlag" :label="1"></el-radio>
<el-radio v-model.trim="form.storeFlag" :label="0"></el-radio>
</el-form-item>
<el-form-item label="是否加密:" prop="storeFlag">
<el-form-item label="是否加密:" >
<el-radio v-model.trim="form.storeFlag" :label="1"></el-radio>
<el-radio v-model.trim="form.storeFlag" :label="0"></el-radio>
</el-form-item>
<el-form-item label="数据是否上送:" prop="tranFlag">
<el-form-item label="数据是否上送:" >
<el-radio v-model.trim="form.tranFlag" :label="1"></el-radio>
<el-radio v-model.trim="form.tranFlag" :label="0"></el-radio>
</el-form-item>

View File

@@ -51,7 +51,7 @@ const tableStore = new TableStore({
{ title: '装置型号', field: 'devTypeName' },
{ title: '模板名称', field: 'name' },
{ title: '版本号', field: 'versionNo' },
{ title: '版本时间', field: 'versionDate' },
{ title: '版本时间', field: 'versionDate', sortable: true },
{
title: '操作',
align: 'center',

View File

@@ -1,8 +1,15 @@
<template>
<div class="default-main" :style="{ height: pageHeight.height }">
<vxe-table v-loading="tableStore.table.loading" height="auto" auto-resize ref="tableRef"
v-bind="defaultAttribute" :data="tableStore.table.data" :column-config="{ resizable: true }"
:tree-config="{ expandAll: true }">
<vxe-table
v-loading="tableStore.table.loading"
height="auto"
auto-resize
ref="tableRef"
v-bind="defaultAttribute"
:data="tableStore.table.data"
:column-config="{ resizable: true }"
:tree-config="{ expandAll: true }"
>
<vxe-column field="name" align="left" title="名称" tree-node></vxe-column>
<vxe-column field="area" title="区域">
<template #default="{ row }">
@@ -14,9 +21,16 @@
{{ row.remark || '/' }}
</template>
</vxe-column>
<vxe-column field="remark" title="操作" width="100px">
<vxe-column field="remark" title="操作" width="150px">
<template #default="{ row }">
<el-popconfirm title="确定删除吗?" confirm-button-type='danger' @confirm="deletes(row)" v-if="!row.path">
<el-button type="primary" link @click="edit(row)" v-if="!row.path">编辑</el-button>
<el-popconfirm
title="确定删除吗?"
confirm-button-type="danger"
@confirm="deletes(row)"
v-if="!row.path"
>
<template #reference>
<el-button type="danger" link>删除</el-button>
</template>
@@ -24,21 +38,54 @@
</template>
</vxe-column>
</vxe-table>
<el-dialog v-model="dialogVisible" title="编辑" width="500">
<el-form :model="form" ref="ruleFormRef" label-width="80px" :rules="rules">
<el-form-item label="名称" prop="name">
<el-input v-model="form.name" clearable placeholder="请输入名称" />
</el-form-item>
<el-form-item label="区域" :prop="form.pid == '0' ? 'city' : 'area'">
<!-- <el-input v-model="form.city" clearable placeholder="请输入区域" /> -->
<el-cascader
v-model="form.city"
v-if="form.pid == '0'"
style="width: 100%"
:options="areaTree"
:props="props"
clearable
filterable
placeholder="请输入区域"
/>
<el-input v-else v-model="form.area" clearable placeholder="请输入区域" />
</el-form-item>
<el-form-item label="备注" prop="description">
<el-input v-model="form.description" :rows="2" type="textarea" clearable placeholder="请输入备注" />
</el-form-item>
</el-form>
<template #footer>
<div class="dialog-footer">
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="save">保存</el-button>
</div>
</template>
</el-dialog>
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import { useDictData } from '@/stores/dictData'
import { defaultAttribute } from '@/components/table/defaultAttribute'
import { mainHeight } from '@/utils/layout'
import { ElMessageBox, ElMessage } from 'element-plus'
import { auditEngineering } from '@/api/cs-device-boot/edData';
import { auditEngineering, updateProject } from '@/api/cs-device-boot/edData'
import { activateUser, deluser, passwordConfirm } from '@/api/user-boot/user'
defineOptions({
name: 'govern/manage/engineering'
})
const dictData = useDictData()
const tableRef = ref()
const dialogVisible = ref(false)
const pageHeight = mainHeight(20)
const tableStore = new TableStore({
url: '/cs-device-boot/csLedger/getProjectTree',
@@ -51,7 +98,28 @@ const tableStore = new TableStore({
}, 500)
}
})
const ruleFormRef = ref()
const rules = ref({
name: [{ required: true, message: '请输入名称', trigger: 'blur' }],
city: [{ required: true, message: '请输入区域', trigger: 'blur' }],
area: [{ required: true, message: '请输入区域', trigger: 'blur' }],
description: [{ required: true, message: '请输入描述', trigger: 'blur' }]
})
const areaTree: any = filterFirstTwoLevels(dictData.state.areaTree)
const props = {
label: 'name',
value: 'id',
children: 'children',
checkStrictly: true
}
const form = ref({
id: '',
pid: '',
area: '',
name: '',
city: '',
description: ''
})
provide('tableStore', tableStore)
onMounted(() => {
@@ -67,18 +135,16 @@ const deletes = (row: any) => {
customClass: 'customInput',
inputType: 'text',
beforeClose: (action, instance, done) => {
if (action === 'confirm') {
if (instance.inputValue == null) {
return ElMessage.warning('请输入密码')
} else if (instance.inputValue?.length > 32) {
return ElMessage.warning('密码长度不能超过32位,当前密码长度为' + instance.inputValue.length)
} else {
done();
done()
}
} else {
done();
done()
}
}
}).then(({ value }) => {
@@ -92,11 +158,75 @@ const deletes = (row: any) => {
})
})
})
}
const addMenu = () => { }
// 编辑
const edit = (row: any) => {
form.value = {
id: row.id,
pid: row.pid,
name: row.name,
city: row.cityId,
area: row.area,
description: row.remark
}
dialogVisible.value = true
}
const save = () => {
ruleFormRef.value.validate((valid: any) => {
if (valid) {
if (form.value.pid == '0') {
auditEngineering({ ...form.value, city: form.value.city[form.value.city.length - 1] }).then(
(res: any) => {
ElMessage.success('保存成功')
dialogVisible.value = false
tableStore.index()
}
)
} else {
let params = new FormData()
params.append('id', form.value.id)
params.append('area', form.value.area)
params.append('description', form.value.description)
params.append('name', form.value.name)
updateProject(form.value).then((res: any) => {
ElMessage.success('保存成功')
dialogVisible.value = false
tableStore.index()
})
}
}
})
}
/**
* 过滤树结构只保留前2层级
*/
function filterFirstTwoLevels(tree) {
// 处理根节点为数组的情况(如多棵树)
if (Array.isArray(tree)) {
return tree.map(node => filterNode(node, 1)) // 根节点为第1层
} else {
// 处理单个根节点的情况
return filterNode(tree, 1)
}
function filterNode(node, level) {
// 复制当前节点的所有属性(避免修改原始对象)
const filteredNode = { ...node }
// 如果是第1层需要保留其children即第2层但需过滤第2层的children
if (level === 1 && node.children && Array.isArray(node.children)) {
filteredNode.children = node.children.map(child => filterNode(child, 2))
}
// 如果是第2层或更深直接删除children截断层级
else {
delete filteredNode.children
}
return filteredNode
}
}
</script>
<style lang="scss">
.customInput {

View File

@@ -312,15 +312,16 @@ const tableStore = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '设备名称', field: 'name' },
{ title: '网络设备ID', field: 'ndid' },
{ title: '设备名称', field: 'name', minWidth: 120 },
{ title: '网络设备ID', field: 'ndid', minWidth: 120 },
{
title: '设备类型',
field: 'devType',
formatter: row => {
return devTypeOptions.value.find((item: any) => item.value == row.cellValue).label
}
},
minWidth: 120
},
{
@@ -328,16 +329,18 @@ const tableStore = new TableStore({
field: 'devModel',
formatter: row => {
return devModelOptions.value.find((item: any) => item.value == row.cellValue).label
}
},
minWidth: 120
},
{
title: '通讯协议',
field: 'devAccessMethod',
formatter: row => {
return row.cellValue === 'MQTT' ? 'MQTT' : row.cellValue === 'CLD' ? 'CLD' : row.cellValue
}
},
minWidth: 120
},
{ title: '录入时间', field: 'createTime', sortable: true },
{ title: '录入时间', field: 'createTime', sortable: true, minWidth: 150 },
{
title: '使用状态',
@@ -397,7 +400,8 @@ const tableStore = new TableStore({
replaceValue: {
未连接: '未连接',
已连接: '已连接'
}
},
minWidth: 80
},
{
@@ -412,7 +416,8 @@ const tableStore = new TableStore({
replaceValue: {
1: '离线',
2: '在线'
}
},
minWidth: 80
},
{
title: '流程阶段',
@@ -428,18 +433,9 @@ const tableStore = new TableStore({
2: '功能调试',
3: '出厂调试',
4: '正式投运'
}
// formatter: row => {
// return row.cellValue == '1'
// ? '设备登记'
// : row.cellValue == '2'
// ? '功能调试'
// : row.cellValue == '3'
// ? '出厂调试'
// : row.cellValue == '4'
// ? '设备投运'
// : row.cellValue
// }
},
minWidth: 80
},
{
title: '操作',

View File

@@ -28,7 +28,7 @@ const tableStore = new TableStore({
column: [
{ title: '标题', field: 'title', align: 'center' },
{ title: '描述', field: 'description', align: 'center' },
{ title: '发布时间', field: 'createTime', align: 'center' },
{ title: '发布时间', field: 'createTime', align: 'center' , sortable: true},
{
title: '状态',
field: 'status',

View File

@@ -1,7 +1,15 @@
<template>
<div class="default-main">
<TableHeader datePicker ref="refheader" showExport>
<template v-slot:select></template>
<template v-slot:select>
<el-form-item label="流程阶段">
<el-select v-model.trim="tableStore.table.params.process" clearable placeholder="请选择状态">
<el-option label="功能调试" :value="2"></el-option>
<el-option label="出厂调试" :value="3"></el-option>
<el-option label="正式投运" :value="4"></el-option>
</el-select>
</el-form-item>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
@@ -12,6 +20,9 @@ import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { queryByCode, queryByid, queryCsDictTree } from '@/api/system-boot/dictTree'
defineOptions({
name: 'manage/monthly'
})
const refheader = ref()
const devModelOptions: any = ref([])
queryByCode('Device_Type').then(res => {
@@ -39,22 +50,57 @@ const tableStore = new TableStore({
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
}
},
{ title: '工程名称', field: 'engineeringName' },
{ title: '项目名称', field: 'projectName' },
{ title: '设备名称', field: 'devName' },
{ title: '工程名称', field: 'engineeringName', minWidth: 150 },
{ title: '项目名称', field: 'projectName', minWidth: 130 },
{ title: '设备名称', field: 'devName', minWidth: 130 },
{ title: '监测点名称', field: 'lineName', minWidth: 130 },
{
title: '投运时间',
field: 'operationalTime',
width: 180,
sortable: true
},
{
title: '数据更新时间',
field: 'latestTime',
width: 180,
sortable: true,
formatter: (row: any) => {
return row.cellValue || '/'
}
},
{
title: '设备型号',
field: 'devType',
width: 130,
formatter: row => {
return devModelOptions.value.filter((item: any) => item.value == row.cellValue)[0]?.label
}
},
{ title: 'Mac地址', field: 'mac' },
{ title: '监测点名称', field: 'lineName' },
{ title: 'Mac地址', field: 'mac', width: 140 },
{
title: '流程阶段',
field: 'process',
width: 100,
render: 'tag',
custom: {
2: 'warning',
3: 'warning',
4: 'success'
},
replaceValue: {
2: '功能调试',
3: '出厂调试',
4: '正式投运'
},
minWidth: 80
},
{
title: '运行状态',
field: 'operationalStatus',
render: 'tag',
width: 100,
custom: {
停运: 'danger',
在运: 'success'
@@ -78,26 +124,15 @@ const tableStore = new TableStore({
在线: '在线'
}
},
{
title: '投运时间',
field: 'operationalTime',
width: 160
},
{
title: '数据更新时间',
field: 'latestTime',
width: 160,
formatter: (row: any) => {
return row.cellValue || '/'
}
},
{ title: '在线率(%)', field: 'onlineRate' },
{ title: '完整性(%)', field: 'integrity' }
{ title: '在线率(%)', width: 100, field: 'onlineRate', sortable: true },
{ title: '完整性(%)', width: 100, field: 'integrity', sortable: true }
],
beforeSearchFun: () => {}
})
provide('tableStore', tableStore)
tableStore.table.params.process = 4
// "target": [],
// "type": "",
// "userId": ""

View File

@@ -44,8 +44,8 @@ const tableStore: any = new TableStore({
return row.cellValue == 1 ? '电能质量报表类型' : row.cellValue == 2 ? '用能报表类型' : ''
} },
{ field: 'updateBy', title: '更新用户' },
{ field: 'createTime', title: '创建时间' },
{ field: 'updateTime', title: '更新时间' },
{ field: 'createTime', title: '创建时间' , sortable: true},
{ field: 'updateTime', title: '更新时间', sortable: true },
{
title: '操作',
width: '220',

View File

@@ -203,7 +203,7 @@ const tableStore = new TableStore({
return row.cellValue === 'MQTT' ? 'MQTT' : row.cellValue === 'cloud' ? 'CLD' : row.cellValue
}
},
{ title: '录入时间', field: 'createTime' },
{ title: '录入时间', field: 'createTime' , sortable: true},
{ title: '网络设备ID', field: 'ndid' },
{
title: '状态',

View File

@@ -204,7 +204,7 @@ const tableStore = new TableStore({
return row.cellValue === 'MQTT' ? 'MQTT' : row.cellValue === 'cloud' ? 'CLD' : row.cellValue
}
},
{ title: '录入时间', field: 'createTime' },
{ title: '录入时间', field: 'createTime', sortable: true },
{ title: '网络设备ID', field: 'ndid' },
{
title: '状态',

View File

@@ -252,9 +252,9 @@ const histogram = (res: any) => {
} else if (0.4 < params.value && params.value <= 0.8 && params.value !== 0.05) {
return '#FF9900'
} else if (0 < params.value && params.value <= 0.4 && params.value !== 0.05) {
return '#CC0000'
return '#A52a2a'
} else if (params.value == 0.05) {
return '#CC0000'
return '#A52a2a'
}
}
}
@@ -276,13 +276,13 @@ const histogram = (res: any) => {
name: '',
yAxis: 0.4,
lineStyle: {
color: '#CC0000'
color: '#A52a2a'
},
label: {
// position: "middle",
formatter: '{b}',
textStyle: {
color: '#CC0000'
color: '#A52a2a'
}
}
},

View File

@@ -163,7 +163,7 @@ const map = (res: any) => {
}
],
inRange: {
color: ['#ccc', '#CC0000', '#FF9900', '#3399CC', '#339966']
color: ['#ccc', '#A52a2a', '#FF9900', '#3399CC', '#339966']
}
},
@@ -284,9 +284,9 @@ const histogram = (res: any) => {
} else if (0.4 < params.value && params.value <= 0.8 && params.value !== 0.05) {
return '#FF9900'
} else if (0 < params.value && params.value <= 0.4 && params.value !== 0.05) {
return '#CC0000'
return '#A52a2a'
} else if (params.value == 0.05) {
return '#CC0000'
return '#A52a2a'
}
}
}
@@ -308,13 +308,13 @@ const histogram = (res: any) => {
name: '',
yAxis: 0.4,
lineStyle: {
color: '#CC0000'
color: '#A52a2a'
},
label: {
// position: "middle",
formatter: '{b}',
textStyle: {
color: '#CC0000'
color: '#A52a2a'
}
}
},

View File

@@ -33,7 +33,7 @@ const tableStore = new TableStore({
url: '/system-boot/audit/getAuditLog',
method: 'POST',
column: [
{ title: '操作时间', field: 'time', align: 'center', width: 200 },
{ title: '操作时间', field: 'time', align: 'center', width: 200 , sortable: true},
{ title: '操作人员', field: 'userName', align: 'center', width: 120 },
{ title: '操作类型', field: 'operate', align: 'center', width: 220 },
{ title: '事件描述', field: 'describe', align: 'center', showOverflow: true, minWidth: 200 },

View File

@@ -61,14 +61,14 @@ const tableStore = new TableStore({
{ title: '供电公司', field: 'gdName', align: 'center', width: 120 },
{ title: '变电站', field: 'bdName', align: 'center', showOverflow: true, minWidth: 100 },
{ title: '终端编号', field: 'devName', align: 'center', width: 160 },
{ title: '投运时间', field: 'loginTime', align: 'center', width: 200 },
{ title: '投运时间', field: 'loginTime', align: 'center', width: 200 , sortable: true},
{ title: '厂家', field: 'manufacturer', align: 'center', width: 160 },
{ title: '型号', field: 'devType', align: 'center', width: 200 },
{ title: '网络参数', field: 'ip', align: 'center', width: 200 },
{ title: '端口', field: 'port', align: 'center', width: 100 },
{ title: '终端状态', field: 'runFlag', align: 'center', width: 100 },
{ title: '通讯状态', field: 'comFlag', align: 'center', width: 100 },
{ title: '最新数据', field: 'updateTime', align: 'center', width: 200 },
{ title: '最新数据', field: 'updateTime', align: 'center', width: 200, sortable: true },
{
title: '评价',
field: 'onlineEvaluate',

View File

@@ -18,8 +18,8 @@
<span class="smallBlock" style="background: #996600"></span>
热备用
</span>
<span style="color: #cc0000">
<span class="smallBlock" style="background: #cc0000"></span>
<span style="color: #A52a2a">
<span class="smallBlock" style="background: #A52a2a"></span>
停运
</span>
</span>
@@ -33,8 +33,8 @@
<span style="color: #daa520">
<span class="smallBlock" style="background: #daa520"></span>
{{ '60 %≤在线率 < 90 %' }} </span>
<span style="color: #cc0000">
<span class="smallBlock" style="background: #cc0000"></span>
<span style="color: #A52a2a">
<span class="smallBlock" style="background: #A52a2a"></span>
{{ '在线率 < 60 %' }} </span>
</span>
</div>
@@ -174,7 +174,7 @@ const tableStore = new TableStore({
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 1,
color: '#cc0000'
color: '#A52a2a'
}
])
} else if ((params.value = 3.14159)) {
@@ -216,7 +216,7 @@ const tableStore = new TableStore({
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 1,
color: '#CC0000'
color: '#A52a2a'
}
])
} else if ((params.value = 3.14159)) {
@@ -309,7 +309,7 @@ const tableStore = new TableStore({
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 1,
color: '#cc0000'
color: '#A52a2a'
}
])
} else if ((params.value = 3.14159)) {
@@ -351,7 +351,7 @@ const tableStore = new TableStore({
return new echarts.graphic.LinearGradient(0, 1, 0, 0, [
{
offset: 1,
color: '#CC0000'
color: '#A52a2a'
}
])
} else if ((params.value = 3.14159)) {

View File

@@ -46,8 +46,8 @@ const tableStore = new TableStore({
{ title: '开启等级', field: 'openLevelName' },
{ title: '开启算法', field: 'openDescribeName' },
{ title: '字典描述', field: 'remark' },
{ title: '创建时间', field: 'createTime' },
{ title: '更新时间', field: 'updateTime' },
{ title: '创建时间', field: 'createTime', sortable: true },
{ title: '更新时间', field: 'updateTime', sortable: true},
{
title: '状态',
field: 'stateName',

View File

@@ -78,7 +78,7 @@ const tableStore = new TableStore({
},
{ title: '版本号', field: 'versionName', width: '150' },
{ title: '创建时间', field: 'createTime', width: '220' },
{ title: '创建时间', field: 'createTime', width: '220', sortable: true },
{
title: '发布类型', field: 'sev', formatter: (row,) => {
return row.cellValue == 0 ? '优化' : 'bug调整'

View File

@@ -42,8 +42,8 @@ const tableStore: any = new TableStore({
{ field: 'name', title: '模板名称' },
{ field: 'createBy', title: '创建用户' },
{ field: 'updateBy', title: '更新用户' },
{ field: 'createTime', title: '创建时间' },
{ field: 'updateTime', title: '更新时间' },
{ field: 'createTime', title: '创建时间', sortable: true },
{ field: 'updateTime', title: '更新时间', sortable: true },
{
title: '操作',
width: '220',

1
types/table.d.ts vendored
View File

@@ -8,6 +8,7 @@ declare global {
interface CnTable {
ref: VxeTableInstance | null
data: TableRow[] | any
copyData: TableRow[] | any
allData: TableRow[] | any
allFlag: Boolean
// 前端分页数据