修改冀北问题
This commit is contained in:
@@ -47,7 +47,7 @@ const defaultProps = {
|
|||||||
value: 'id'
|
value: 'id'
|
||||||
}
|
}
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }]
|
name: [{ required: true, message: '请输入名称', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
const dataTree = ref([])
|
const dataTree = ref([])
|
||||||
const open = (text: string, data?: anyObj) => {
|
const open = (text: string, data?: anyObj) => {
|
||||||
|
|||||||
@@ -3,15 +3,10 @@
|
|||||||
<!-- 算法库 -->
|
<!-- 算法库 -->
|
||||||
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
<splitpanes style="height: 100%" class="default-theme" id="navigation-splitpanes">
|
||||||
<pane :size="size">
|
<pane :size="size">
|
||||||
<algorithmTree
|
<algorithmTree ref="treeRef" :default-expand-all="false"
|
||||||
ref="treeRef"
|
|
||||||
:default-expand-all="false"
|
|
||||||
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
:default-expanded-keys="monitoringPoint.state.lineId ? [monitoringPoint.state.lineId] : []"
|
||||||
:current-node-key="monitoringPoint.state.lineId"
|
:current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
|
||||||
@node-click="handleNodeClick"
|
@init="handleNodeClick" @onAddTree="onAddTree"></algorithmTree>
|
||||||
@init="handleNodeClick"
|
|
||||||
@onAddTree="onAddTree"
|
|
||||||
></algorithmTree>
|
|
||||||
</pane>
|
</pane>
|
||||||
<pane style="background: #fff" :style="height">
|
<pane style="background: #fff" :style="height">
|
||||||
<div class="boxTop">
|
<div class="boxTop">
|
||||||
@@ -21,12 +16,7 @@
|
|||||||
</el-radio-group>
|
</el-radio-group>
|
||||||
</div>
|
</div>
|
||||||
<div v-if="information">
|
<div v-if="information">
|
||||||
<el-button
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser">
|
||||||
icon="el-icon-Plus"
|
|
||||||
type="primary"
|
|
||||||
@click="addUser"
|
|
||||||
v-if="dotList?.childrens?.length > 0"
|
|
||||||
>
|
|
||||||
新增
|
新增
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
<el-button icon="el-icon-Edit" type="primary" @click="revise">修改</el-button>
|
||||||
@@ -45,24 +35,20 @@
|
|||||||
row.period == 0
|
row.period == 0
|
||||||
? '日'
|
? '日'
|
||||||
: row.period == 1
|
: row.period == 1
|
||||||
? '月'
|
? '月'
|
||||||
: row.period == 2
|
: row.period == 2
|
||||||
? '季'
|
? '季'
|
||||||
: row.period == 3
|
: row.period == 3
|
||||||
? '年'
|
? '年'
|
||||||
: ''
|
: ''
|
||||||
}}
|
}}
|
||||||
</template>
|
</template>
|
||||||
</vxe-column>
|
</vxe-column>
|
||||||
<vxe-column field="source" title="数据来源"></vxe-column>
|
<vxe-column field="source" title="数据来源"></vxe-column>
|
||||||
<vxe-column field="useFLag" title="是否启用">
|
<vxe-column field="useFLag" title="是否启用">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-tag
|
<el-tag :type="row.useFLag === 1 ? 'success' : 'info'" effect="dark"
|
||||||
:type="row.useFLag === 1 ? 'success' : 'info'"
|
style="cursor: pointer" @click="change(row)">
|
||||||
effect="dark"
|
|
||||||
style="cursor: pointer"
|
|
||||||
@click="change(row)"
|
|
||||||
>
|
|
||||||
{{ row.useFLag === 1 ? '是' : '否' }}
|
{{ row.useFLag === 1 ? '是' : '否' }}
|
||||||
</el-tag>
|
</el-tag>
|
||||||
</template>
|
</template>
|
||||||
@@ -85,23 +71,13 @@
|
|||||||
<!-- 树弹框 -->
|
<!-- 树弹框 -->
|
||||||
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
|
<addTree ref="addTreeRef" @getTree="treeRef.loadData(dotList.id)" />
|
||||||
<!-- 弹框 -->
|
<!-- 弹框 -->
|
||||||
<PopupEdit
|
<PopupEdit ref="popupEditRef" v-if="popupEditFlag"
|
||||||
ref="popupEditRef"
|
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)" />
|
||||||
v-if="popupEditFlag"
|
|
||||||
@getTree="treeRef.loadData(dotList.id), (popupEditFlag = false)"
|
|
||||||
/>
|
|
||||||
<!-- 删除 -->
|
<!-- 删除 -->
|
||||||
<el-dialog v-model="dialogVisible" title="请选择需要删除的数据" width="400">
|
<el-dialog v-model="dialogVisible" title="请选择需要删除的数据" width="400">
|
||||||
<el-tree-select
|
<el-tree-select v-model="TreeValue" :data="TreeData" filterable check-strictly :props="defaultProps"
|
||||||
v-model="TreeValue"
|
default-expand-all :render-after-expand="false" />
|
||||||
:data="TreeData"
|
<template #footer>
|
||||||
filterable
|
|
||||||
check-strictly
|
|
||||||
:props="defaultProps"
|
|
||||||
default-expand-all
|
|
||||||
:render-after-expand="false"
|
|
||||||
/>
|
|
||||||
<template #footer>
|
|
||||||
<div class="dialog-footer">
|
<div class="dialog-footer">
|
||||||
<el-button @click="dialogVisible = false">取消</el-button>
|
<el-button @click="dialogVisible = false">取消</el-button>
|
||||||
<el-button type="primary" @click="del">删除</el-button>
|
<el-button type="primary" @click="del">删除</el-button>
|
||||||
@@ -140,7 +116,7 @@ const treeRef = ref()
|
|||||||
const popupEditRef = ref()
|
const popupEditRef = ref()
|
||||||
const TreeData = ref([])
|
const TreeData = ref([])
|
||||||
const TreeValue = ref([])
|
const TreeValue = ref([])
|
||||||
const information =adminInfo.roleCode.includes('information_info')
|
const information = adminInfo.roleCode.includes('information_info')
|
||||||
|
|
||||||
const defaultProps = {
|
const defaultProps = {
|
||||||
label: 'name',
|
label: 'name',
|
||||||
@@ -274,6 +250,7 @@ const change = (row: any) => {
|
|||||||
.splitpanes.default-theme .splitpanes__pane {
|
.splitpanes.default-theme .splitpanes__pane {
|
||||||
background: #eaeef1;
|
background: #eaeef1;
|
||||||
}
|
}
|
||||||
|
|
||||||
.grid-content {
|
.grid-content {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
@@ -281,10 +258,12 @@ const change = (row: any) => {
|
|||||||
.el-divider--horizontal {
|
.el-divider--horizontal {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mTop {
|
.mTop {
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.boxTop {
|
.boxTop {
|
||||||
height: 52px;
|
height: 52px;
|
||||||
padding: 10px 10px 10px 0;
|
padding: 10px 10px 10px 0;
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<el-drawer v-model="drawer" size="1000px">
|
<el-drawer v-model="drawer" size="60%">
|
||||||
<div class="box mt20">
|
<div class="box mt20">
|
||||||
<el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
<el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||||
v-if="information">
|
v-if="information">
|
||||||
@@ -53,10 +53,10 @@ const open = (row: any) => {
|
|||||||
// console.log('🚀 ~ open ~ row:', row)
|
// console.log('🚀 ~ open ~ row:', row)
|
||||||
// url.value = row
|
// url.value = row
|
||||||
drawer.value = true
|
drawer.value = true
|
||||||
|
url.value = `/api-doc/excelreport` + row
|
||||||
getFileNameAndFilePath({ filePath: row }).then(res => {
|
// getFileNameAndFilePath({ filePath: row }).then(res => {
|
||||||
url.value = res.data.url
|
// url.value = res.data.url
|
||||||
})
|
// })
|
||||||
}
|
}
|
||||||
// 上传
|
// 上传
|
||||||
const choose = (e: any) => {
|
const choose = (e: any) => {
|
||||||
|
|||||||
@@ -4,7 +4,7 @@
|
|||||||
<TableHeader ref="TableHeaderRef" datePicker>
|
<TableHeader ref="TableHeaderRef" datePicker>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
<el-button icon="el-icon-Plus" type="primary" @click="addUser" v-if="information">新增</el-button>
|
||||||
<el-button icon="el-icon-View" type="primary" @click="checkOutTheCriteria">查看标准</el-button>
|
<el-button icon="el-icon-View" type="primary" @click="checkOutTheCriteria">查看常见治理措施</el-button>
|
||||||
|
|
||||||
<!-- <el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
<!-- <el-upload :show-file-list="false" action="" :auto-upload="false" class="ml10" :on-change="choose"
|
||||||
v-if="information">
|
v-if="information">
|
||||||
|
|||||||
@@ -21,7 +21,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="标准" v-if="form.pid?.length > 0">
|
<el-form-item label="标准" v-if="form.pid?.length > 0">
|
||||||
<el-upload v-model:file-list="urlList" action="" :limit="1" :auto-upload="false" multiple>
|
<el-upload v-model:file-list="urlList" ref="upload" action="" :limit="1" :auto-upload="false"
|
||||||
|
:on-exceed="handleExceed">
|
||||||
<el-button type="primary">上传</el-button>
|
<el-button type="primary">上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -41,6 +42,10 @@ import { reactive } from 'vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { queryAll, libstandardAdd, updateStandardLibrary } from '@/api/supervision-boot/database/index'
|
import { queryAll, libstandardAdd, updateStandardLibrary } from '@/api/supervision-boot/database/index'
|
||||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
|
import { genFileId } from 'element-plus'
|
||||||
|
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||||
|
|
||||||
|
const upload = ref<UploadInstance>()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const emit = defineEmits(['getTree', 'onSubmit'])
|
const emit = defineEmits(['getTree', 'onSubmit'])
|
||||||
@@ -90,6 +95,13 @@ const open = (text: string, data?: anyObj) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const handleExceed: UploadProps['onExceed'] = (files) => {
|
||||||
|
upload.value!.clearFiles()
|
||||||
|
const file = files[0] as UploadRawFile
|
||||||
|
file.uid = genFileId()
|
||||||
|
upload.value!.handleStart(file)
|
||||||
|
}
|
||||||
|
|
||||||
const getTheTree = () => {
|
const getTheTree = () => {
|
||||||
queryAll().then(res => {
|
queryAll().then(res => {
|
||||||
dataTree.value = res.data
|
dataTree.value = res.data
|
||||||
|
|||||||
@@ -79,9 +79,13 @@ const handleNodeClick = (data: any, node: any) => {
|
|||||||
flag.value = false
|
flag.value = false
|
||||||
if (data?.url != null && data?.url != '') {
|
if (data?.url != null && data?.url != '') {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
|
||||||
url.value = res.data.url
|
setTimeout(() => {
|
||||||
})
|
url.value = `/api-doc/excelreport` + data.url
|
||||||
|
// getFileNameAndFilePath({ filePath: data.url }).then(res => {
|
||||||
|
// url.value = res.data.url
|
||||||
|
// })
|
||||||
|
},100)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// 删除
|
// 删除
|
||||||
|
|||||||
@@ -7,7 +7,8 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="模版">
|
<el-form-item label="模版">
|
||||||
<el-upload v-model:file-list="urlList" action="" :limit="1" :auto-upload="false" multiple>
|
<el-upload v-model:file-list="urlList" ref="upload" action="" :limit="1" :auto-upload="false"
|
||||||
|
:on-exceed="handleExceed">
|
||||||
<el-button type="primary">上传</el-button>
|
<el-button type="primary">上传</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@@ -27,9 +28,13 @@ import { reactive } from 'vue'
|
|||||||
import { ElMessage } from 'element-plus'
|
import { ElMessage } from 'element-plus'
|
||||||
import { libtemplateAdd, updateTemplate } from '@/api/supervision-boot/database/index'
|
import { libtemplateAdd, updateTemplate } from '@/api/supervision-boot/database/index'
|
||||||
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
import { uploadFile, getFileNameAndFilePath } from '@/api/system-boot/file'
|
||||||
|
import { genFileId } from 'element-plus'
|
||||||
|
import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
|
||||||
|
|
||||||
|
const upload = ref<UploadInstance>()
|
||||||
const dialogVisible = ref(false)
|
const dialogVisible = ref(false)
|
||||||
const title = ref('')
|
const title = ref('')
|
||||||
const emit = defineEmits([ 'onSubmit'])
|
const emit = defineEmits(['onSubmit'])
|
||||||
const formRef = ref()
|
const formRef = ref()
|
||||||
// 注意不要和表单ref的命名冲突
|
// 注意不要和表单ref的命名冲突
|
||||||
const form = reactive<anyObj>({
|
const form = reactive<anyObj>({
|
||||||
@@ -43,7 +48,7 @@ const defaultProps = {
|
|||||||
value: 'id'
|
value: 'id'
|
||||||
}
|
}
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }]
|
name: [{ required: true, message: '请输入模版名称', trigger: 'blur' }]
|
||||||
}
|
}
|
||||||
const dataTree: any = ref([])
|
const dataTree: any = ref([])
|
||||||
const open = (text: string, data?: anyObj) => {
|
const open = (text: string, data?: anyObj) => {
|
||||||
@@ -72,6 +77,13 @@ const open = (text: string, data?: anyObj) => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const handleExceed: UploadProps['onExceed'] = (files) => {
|
||||||
|
upload.value!.clearFiles()
|
||||||
|
const file = files[0] as UploadRawFile
|
||||||
|
file.uid = genFileId()
|
||||||
|
upload.value!.handleStart(file)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
const submit = () => {
|
const submit = () => {
|
||||||
formRef.value.validate(async (valid: boolean) => {
|
formRef.value.validate(async (valid: boolean) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user