提交代码
This commit is contained in:
@@ -115,7 +115,6 @@ const form: any = reactive({
|
||||
const tabList: any = ref([])
|
||||
const activeName = ref(0)
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
console.log("🚀 ~ handleNodeClick ~ data:", data)
|
||||
if (data.level == 6) {
|
||||
dotList.value = data
|
||||
}
|
||||
@@ -125,13 +124,13 @@ const submit = () => {
|
||||
if (form.loadData == '') {
|
||||
return ElMessage.warning('请选择负荷数据')
|
||||
}
|
||||
|
||||
if (form.index.length == 0) {
|
||||
showTabs.value = false
|
||||
} else {
|
||||
let timeList = loadDataOptions.value.filter((item: any) => item.id == form.loadData)[0]
|
||||
console.log("🚀 ~ submit ~ timeList:", timeList)
|
||||
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 = []
|
||||
list.forEach((item: any) => {
|
||||
tabList.value.push({
|
||||
@@ -161,7 +160,7 @@ const execute = (item: any, index: number) => {
|
||||
// userDataId:form.loadData,
|
||||
lineId:dotList.value.id
|
||||
}).then((res: any) => {
|
||||
|
||||
|
||||
})
|
||||
tabList.value[index].showExecute = true
|
||||
}
|
||||
|
||||
@@ -45,13 +45,9 @@ watch(
|
||||
|
||||
if (!newLineId) return
|
||||
// 在这里处理 lineId 的变化
|
||||
console.log(123333333);
|
||||
|
||||
monitoringPoint.setValue('lineId', router.currentRoute.value.query.lineId)
|
||||
monitoringPoint.setValue('lineName', router.currentRoute.value.query.lineName)
|
||||
setTimeout(() => {
|
||||
|
||||
|
||||
navigationRef.value?.handleNodeClick({
|
||||
level: 6,
|
||||
id: router.currentRoute.value.query.lineId
|
||||
|
||||
101
src/views/system/ReportConfiguration/components/disposition.vue
Normal file
101
src/views/system/ReportConfiguration/components/disposition.vue
Normal 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>
|
||||
20
src/views/system/ReportConfiguration/index.vue
Normal file
20
src/views/system/ReportConfiguration/index.vue
Normal 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>
|
||||
Reference in New Issue
Block a user