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