提交代码

This commit is contained in:
GGJ
2025-01-23 14:02:19 +08:00
parent 9c688c3bd3
commit 91fa9ffb19
4 changed files with 124 additions and 8 deletions

View File

@@ -115,7 +115,6 @@ const form: any = reactive({
const tabList: any = ref([]) const tabList: any = ref([])
const activeName = ref(0) const activeName = ref(0)
const handleNodeClick = (data: any, node: any) => { const handleNodeClick = (data: any, node: any) => {
console.log("🚀 ~ handleNodeClick ~ data:", data)
if (data.level == 6) { if (data.level == 6) {
dotList.value = data dotList.value = data
} }
@@ -125,13 +124,13 @@ const submit = () => {
if (form.loadData == '') { if (form.loadData == '') {
return ElMessage.warning('请选择负荷数据') return ElMessage.warning('请选择负荷数据')
} }
if (form.index.length == 0) { if (form.index.length == 0) {
showTabs.value = false showTabs.value = false
} else { } else {
let timeList = loadDataOptions.value.filter((item: any) => item.id == form.loadData)[0] let timeList = loadDataOptions.value.filter((item: any) => item.id == form.loadData)[0]
console.log("🚀 ~ submit ~ timeList:", timeList)
showTabs.value = true showTabs.value = true
let list = JSON.parse(JSON.stringify(form.index)) let list = JSON.parse(JSON.stringify(form.index)).sort((a, b) => a - b)
tabList.value = [] tabList.value = []
list.forEach((item: any) => { list.forEach((item: any) => {
tabList.value.push({ tabList.value.push({

View File

@@ -45,13 +45,9 @@ watch(
if (!newLineId) return if (!newLineId) return
// 在这里处理 lineId 的变化 // 在这里处理 lineId 的变化
console.log(123333333);
monitoringPoint.setValue('lineId', router.currentRoute.value.query.lineId) monitoringPoint.setValue('lineId', router.currentRoute.value.query.lineId)
monitoringPoint.setValue('lineName', router.currentRoute.value.query.lineName) monitoringPoint.setValue('lineName', router.currentRoute.value.query.lineName)
setTimeout(() => { setTimeout(() => {
navigationRef.value?.handleNodeClick({ navigationRef.value?.handleNodeClick({
level: 6, level: 6,
id: router.currentRoute.value.query.lineId id: router.currentRoute.value.query.lineId

View File

@@ -0,0 +1,101 @@
<template>
<div class="default-main">
<TableHeader ref="TableHeaderRef">
<template v-slot:select>
<el-form-item label="模板类型">
<el-select v-model="tableStore.table.params.type" placeholder="Select" size="large">
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
</el-select>
</el-form-item>
</template>
<template #operation>
<el-button icon="el-icon-Memo" type="primary" @click="add">报告字典管理</el-button>
<el-button icon="el-icon-Plus" type="primary" @click="add">新增模版</el-button>
</template>
</TableHeader>
<Table ref="tableRef" />
</div>
</template>
<script setup lang="ts">
import { ref, onMounted, provide, nextTick } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import TableHeader from '@/components/table/header/index.vue'
import { delTemplate } from '@/api/harmonic-boot/luckyexcel'
import { useDictData } from '@/stores/dictData'
import { ElMessage } from 'element-plus'
defineOptions({
name: 'BusinessAdministrator/ReportTemplate/ReportConfiguration'
})
const options = ([
{ value: '0', label: '监测点报告' },
{ value: '1', label: '区域报告' },
])
const tableStore: any = new TableStore({
url: '/system-boot/EventTemplate/getList',
method: 'POST',
column: [
{ field: 'name', title: '模板名称' },
{ field: 'code', title: '模板描述' },
{
title: '操作',
width: '220',
render: 'buttons',
buttons: [
{
name: 'edit',
title: '编辑',
type: 'primary',
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
}
},
{
name: 'del',
text: '删除',
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
confirmButtonType: 'danger',
title: '确定删除?'
},
click: row => {
delTemplate({ tempId: row.id, deptId: row.deptId }).then(res => {
ElMessage.success('删除成功')
tableStore.index()
})
}
}
]
}
],
loadCallback: () => { }
})
tableStore.table.params = {}
tableStore.table.params.type = '0'
provide('tableStore', tableStore)
const add = () => {
}
onMounted(() => {
tableStore.index()
})
</script>

View File

@@ -0,0 +1,20 @@
<template>
<div >
<disposition />
<!-- <el-tabs v-model="activeName" type="card">
<el-tab-pane label="报告模板配置" name="1">
</el-tab-pane>
</el-tabs> -->
</div>
</template>
<script setup lang='ts'>
import { ref, reactive } from 'vue'
import disposition from '@/views/system/ReportConfiguration/components/disposition.vue'
const activeName = ref('1')
</script>
<style lang="scss" scoped></style>