添加 标准库 模版库 页面
修改 终端台账管理 页面
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 算法库 -->
|
||||
<div class="default-main" :style="height">
|
||||
<!-- 算法库 -->
|
||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||
<pane :size="size">
|
||||
<algorithmTree
|
||||
|
||||
@@ -1,22 +1,56 @@
|
||||
<template>
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="700px">
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="1200px">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" label-width="auto" :rules="rules" ref="formRef">
|
||||
<el-form-item label="算法名称">
|
||||
<el-input v-model="form.name" placeholder="请输入算法名称" />
|
||||
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
||||
<el-form-item label="事件名称">
|
||||
<el-input v-model="form.name" placeholder="请输入事件名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="定义">
|
||||
<el-input v-model="form.code" placeholder="请输入定义" />
|
||||
<el-form-item label="发生事件">
|
||||
<el-input v-model="form.code" placeholder="请输入发生事件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计算公式">
|
||||
<el-input v-model="form.remark" :rows="2" type="textarea" placeholder="请输入计算公式" />
|
||||
<el-form-item label="发生地点">
|
||||
<el-input v-model="form.remark" placeholder="请输入发生地点" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="计算周期">
|
||||
<el-input v-model="form.code" placeholder="请输入计算周期" />
|
||||
<el-form-item label="事件简介">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入事件简介"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="数据来源">
|
||||
<el-input v-model="form.code" placeholder="请输入数据来源" />
|
||||
<el-form-item label="事件经过">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入事件经过"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理措施">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入处理措施"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="治理效果">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入治理效果"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<el-upload v-model:file-list="fileList" action="" multiple :limit="3" :on-exceed="handleExceed">
|
||||
<el-button type="primary">Click to upload</el-button>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">jpg/png files with a size less than 500KB.</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
@@ -38,6 +72,7 @@ const dialogVisible = ref(false)
|
||||
const title = ref('')
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const fileList = ref([])
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive<anyObj>({
|
||||
code: '',
|
||||
@@ -50,6 +85,8 @@ const rules = {
|
||||
code: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const handleExceed = (files: any, uploadFiles: any) => {}
|
||||
|
||||
const open = (text: string, data?: anyObj) => {
|
||||
title.value = text
|
||||
dialogVisible.value = true
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<!-- 案例库 -->
|
||||
<div class="default-main">
|
||||
<!-- 案例库 -->
|
||||
<TableHeader ref="TableHeaderRef" datePicker>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||
@@ -73,7 +73,7 @@ const tableStore = new TableStore({
|
||||
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEditRef.value.open('新增算法')
|
||||
popupEditRef.value.open('新增案例')
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
|
||||
@@ -1,11 +1,89 @@
|
||||
<template>
|
||||
|
||||
<div> 标准</div>
|
||||
|
||||
<div class="default-main" :style="height">
|
||||
<!-- 标准库 -->
|
||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||
<pane :size="size">
|
||||
<standardTree
|
||||
:default-expand-all="false"
|
||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||
:current-node-key="monitoringPoint.state.lineId"
|
||||
@node-click="handleNodeClick"
|
||||
@init="handleNodeClick"
|
||||
></standardTree>
|
||||
</pane>
|
||||
<pane style="background: #fff" :style="height">
|
||||
<div class="pd10" style="display: flex; justify-content: end">
|
||||
<el-button icon="el-icon-Plus" type="primary">新增</el-button>
|
||||
<el-button icon="el-icon-Edit" type="primary">修改</el-button>
|
||||
<el-button icon="el-icon-Delete" type="primary">删除</el-button>
|
||||
</div>
|
||||
<div :style="`height: calc(${height.height} - 60px) `"></div>
|
||||
</pane>
|
||||
</splitpanes>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive } from 'vue'
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
import 'splitpanes/dist/splitpanes.css'
|
||||
import { Splitpanes, Pane } from 'splitpanes'
|
||||
import standardTree from '@/components/tree/pqs/standardTree.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { getLineExport, getList, selectReleation } from '@/api/event-boot/report'
|
||||
import { useMonitoringPoint } from '@/stores/monitoringPoint'
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'database/standard'
|
||||
})
|
||||
const monitoringPoint = useMonitoringPoint()
|
||||
const height = mainHeight(20)
|
||||
const size = ref(0)
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
const dotList: any = ref({
|
||||
name: monitoringPoint.state.lineName.split('>')[3],
|
||||
id: monitoringPoint.state.lineId,
|
||||
level: 6
|
||||
})
|
||||
|
||||
onMounted(() => {
|
||||
const dom = document.getElementById('navigation-splitpanes')
|
||||
if (dom) {
|
||||
size.value = Math.round((180 / dom.offsetHeight) * 100)
|
||||
}
|
||||
})
|
||||
|
||||
const handleNodeClick = (data: any, node: any) => {
|
||||
dotList.value = data
|
||||
}
|
||||
</script>
|
||||
<style lang="scss">
|
||||
.splitpanes.default-theme .splitpanes__pane {
|
||||
background: #eaeef1;
|
||||
}
|
||||
.grid-content {
|
||||
text-align: center;
|
||||
}
|
||||
.divBox {
|
||||
width: 250px;
|
||||
height: 31px;
|
||||
margin: auto;
|
||||
line-height: 32px;
|
||||
border: 1px solid #c9c9c9;
|
||||
&:hover {
|
||||
border: 1px solid #002255;
|
||||
}
|
||||
}
|
||||
.box {
|
||||
padding: 10px;
|
||||
// margin-top: 10px;
|
||||
overflow-y: auto;
|
||||
font-size: 15px;
|
||||
}
|
||||
.el-divider--horizontal {
|
||||
margin: 10px 0;
|
||||
}
|
||||
.mTop {
|
||||
margin-top: 5px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
121
src/views/pqs/database/stencil/components/form.vue
Normal file
121
src/views/pqs/database/stencil/components/form.vue
Normal file
@@ -0,0 +1,121 @@
|
||||
<template>
|
||||
<el-dialog draggable class="cn-operate-dialog" v-model="dialogVisible" :title="title" width="1200px">
|
||||
<el-scrollbar>
|
||||
<el-form :inline="false" :model="form" class="form-two" label-width="auto" :rules="rules" ref="formRef">
|
||||
<el-form-item label="事件名称">
|
||||
<el-input v-model="form.name" placeholder="请输入事件名称" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发生事件">
|
||||
<el-input v-model="form.code" placeholder="请输入发生事件" />
|
||||
</el-form-item>
|
||||
<el-form-item label="发生地点">
|
||||
<el-input v-model="form.remark" placeholder="请输入发生地点" />
|
||||
</el-form-item>
|
||||
|
||||
<el-form-item label="事件简介">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入事件简介"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="事件经过">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入事件经过"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="处理措施">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入处理措施"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="治理效果">
|
||||
<el-input
|
||||
v-model="form.code"
|
||||
placeholder="请输入治理效果"
|
||||
:autosize="{ minRows: 2, maxRows: 4 }"
|
||||
type="textarea"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="附件">
|
||||
<el-upload v-model:file-list="fileList" action="" multiple :limit="3" :on-exceed="handleExceed">
|
||||
<el-button type="primary">Click to upload</el-button>
|
||||
<template #tip>
|
||||
<div class="el-upload__tip">jpg/png files with a size less than 500KB.</div>
|
||||
</template>
|
||||
</el-upload>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</el-scrollbar>
|
||||
<template #footer>
|
||||
<span class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">取消</el-button>
|
||||
<el-button type="primary" @click="submit">确认</el-button>
|
||||
</span>
|
||||
</template>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import TableStore from '@/utils/tableStore' // 若不是列表页面弹框可删除
|
||||
|
||||
const dialogVisible = ref(false)
|
||||
const title = ref('')
|
||||
const tableStore = inject('tableStore') as TableStore
|
||||
const formRef = ref()
|
||||
const fileList = ref([])
|
||||
// 注意不要和表单ref的命名冲突
|
||||
const form = reactive<anyObj>({
|
||||
code: '',
|
||||
name: '',
|
||||
remark: '',
|
||||
id: ''
|
||||
})
|
||||
const rules = {
|
||||
name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
|
||||
code: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
|
||||
}
|
||||
|
||||
const handleExceed = (files: any, uploadFiles: any) => {}
|
||||
|
||||
const open = (text: string, data?: anyObj) => {
|
||||
title.value = text
|
||||
dialogVisible.value = true
|
||||
if (data) {
|
||||
// 表单赋值
|
||||
for (let key in form) {
|
||||
form[key] = data[key]
|
||||
}
|
||||
} else {
|
||||
// 在此处恢复默认表单
|
||||
for (let key in form) {
|
||||
form[key] = ''
|
||||
}
|
||||
}
|
||||
}
|
||||
const submit = () => {
|
||||
formRef.value.validate(async (valid: boolean) => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
// await update(form)
|
||||
} else {
|
||||
// await create(form)
|
||||
}
|
||||
ElMessage.success('保存成功')
|
||||
tableStore.index()
|
||||
dialogVisible.value = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
defineExpose({ open })
|
||||
</script>
|
||||
@@ -1,11 +1,84 @@
|
||||
<template>
|
||||
|
||||
<div> 模版</div>
|
||||
|
||||
<div class="default-main">
|
||||
<!-- 模版 -->
|
||||
<TableHeader ref="TableHeaderRef" datePicker>
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser">新增</el-button>
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef"></Table>
|
||||
<!-- 弹框 -->
|
||||
<PopupEdit ref="popupEditRef" />
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang='ts'>
|
||||
import { ref, reactive } from 'vue'
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
<script setup lang="ts">
|
||||
import { onMounted, ref, provide } from 'vue'
|
||||
|
||||
</style>
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import TableHeader from '@/components/table/header/index.vue'
|
||||
|
||||
import Table from '@/components/table/index.vue'
|
||||
import PopupEdit from './components/form.vue'
|
||||
defineOptions({
|
||||
name: 'database/case'
|
||||
})
|
||||
|
||||
const popupEditRef = ref()
|
||||
|
||||
const TableHeaderRef = ref()
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/user-boot/dept/deptTree',
|
||||
method: 'POST',
|
||||
column: [
|
||||
{ title: '模版名称', field: 'name' },
|
||||
{
|
||||
title: '创建时间',
|
||||
field: 'name1'
|
||||
},
|
||||
// {
|
||||
// title: '发生地点',
|
||||
// field: 'name2'
|
||||
// },
|
||||
// {
|
||||
// title: '处理措施',
|
||||
// field: 'name3'
|
||||
// },
|
||||
// {
|
||||
// title: '治理效果',
|
||||
// field: 'name4'
|
||||
// }
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data = [
|
||||
{
|
||||
name: '测试名称',
|
||||
name1: 'xxx',
|
||||
name2: 'XXX',
|
||||
name3: '1月',
|
||||
name4: '单体系统',
|
||||
name5: '1'
|
||||
},
|
||||
{
|
||||
name: '测试名称',
|
||||
name1: 'xxx',
|
||||
name2: 'XXX',
|
||||
name3: '1月',
|
||||
name4: '单体系统',
|
||||
name5: '0'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
|
||||
// 弹框
|
||||
const addUser = () => {
|
||||
popupEditRef.value.open('新增案例')
|
||||
}
|
||||
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss"></style>
|
||||
|
||||
Reference in New Issue
Block a user