diff --git a/src/views/pqs/database/algorithm/index.vue b/src/views/pqs/database/algorithm/index.vue
index 1082ed99..4247d553 100644
--- a/src/views/pqs/database/algorithm/index.vue
+++ b/src/views/pqs/database/algorithm/index.vue
@@ -20,7 +20,7 @@
-
+
-
+
@@ -125,6 +124,8 @@ import { useMonitoringPoint } from '@/stores/monitoringPoint'
import { ElMessage, ElMessageBox } from 'element-plus'
import { deleteyById } from '@/api/supervision-boot/database/index'
import { queryAllAlgorithmLibrary, updateAlgorithmLibrary } from '@/api/supervision-boot/database/index'
+import { useAdminInfo } from '@/stores/adminInfo'
+const adminInfo = useAdminInfo()
defineOptions({
name: 'database/algorithm'
})
@@ -139,6 +140,7 @@ const treeRef = ref()
const popupEditRef = ref()
const TreeData = ref([])
const TreeValue = ref([])
+const information =adminInfo.roleCode.includes('information_info')
const defaultProps = {
label: 'name',
@@ -225,7 +227,7 @@ const onAddTree = () => {
addTreeRef.value.open('新增')
}
const deletes = () => {
- TreeValue.value = ''
+ TreeValue.value = []
queryAllAlgorithmLibrary().then(res => {
TreeData.value = res.data
})
diff --git a/src/views/pqs/database/case/components/annex.vue b/src/views/pqs/database/case/components/annex.vue
index 21979244..0cfb04ea 100644
--- a/src/views/pqs/database/case/components/annex.vue
+++ b/src/views/pqs/database/case/components/annex.vue
@@ -1,40 +1,73 @@
-
-
+
+
+
+
+ {{ tableData.name }}
+ {{ tableData.process }}
+ {{ tableData.measures }}
+ {{ tableData.effect }}
+
+
+
+
{{ item.name }}
+
+
+
+
+
+
+
+
+
+ ]
+
+
+
+
+
+
+
+
+
+
-
+
diff --git a/src/views/pqs/database/case/components/drawer.vue b/src/views/pqs/database/case/components/drawer.vue
index b0463dda..04d3632b 100644
--- a/src/views/pqs/database/case/components/drawer.vue
+++ b/src/views/pqs/database/case/components/drawer.vue
@@ -1,6 +1,15 @@
+
+
+ 上传常见治理措施
+
+
+ 下载常见治理措施
+
+
@@ -9,15 +18,12 @@
-
+
@@ -33,11 +39,16 @@ import VueOfficeExcel from '@vue-office/excel'
//引入VueOfficePdf组件
import VueOfficePdf from '@vue-office/pdf'
import { ref, reactive } from 'vue'
+import { useAdminInfo } from '@/stores/adminInfo'
+import { ElMessage } from 'element-plus'
+import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
+import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
+const adminInfo = useAdminInfo()
const drawer = ref(false)
const activeName = ref('2')
const num = ref(0)
-import { getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
const url = ref('')
+const information = adminInfo.roleCode.includes('information_info')
const open = (row: any) => {
// console.log('🚀 ~ open ~ row:', row)
// url.value = row
@@ -47,30 +58,93 @@ const open = (row: any) => {
url.value = res.data.url
})
}
+// 上传
+const choose = (e: any) => {
+ ElMessage.info('上传中,请稍等...')
+ uploadFile(e.raw, '/supervision/').then((row: any) => {
+ addStandardCase({ caseUrl: row.data.name }).then(res => {
+ ElMessage.success('上传成功!')
+ queryStandardCase().then(res => {
+ open(res.data)
+ })
+ })
+ })
+ //
+}
+const downloadTheReport = () => {
+ queryStandardCase().then(res => {
+ let urls = res.data
+ let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
+ ElMessage.info('下载中,请稍等...')
+ downloadFile({ filePath: urls }).then((res: any) => {
+ let blob = new Blob([res], {
+ type: urls.includes('.pdf')
+ ? 'application/pdf'
+ : urls.includes('.docx')
+ ? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ : urls.includes('.xls')
+ ? 'application/vnd.ms-excel'
+ : urls.includes('.xlsx')
+ ? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+ : urls.includes('.png')
+ ? 'image/png'
+ : urls.includes('.jpeg')
+ ? 'image/jpeg'
+ : urls.includes('.jpg')
+ ? 'image/jpg'
+ : ''
+ })
+ const url = window.URL.createObjectURL(blob)
+ const link = document.createElement('a')
+ link.href = url
+ link.download = name
+ document.body.appendChild(link)
+ link.click()
+ link.remove()
+ })
+ })
+}
defineExpose({ open })
diff --git a/src/views/pqs/database/case/components/form.vue b/src/views/pqs/database/case/components/form.vue
index d1b35694..66b8e70a 100644
--- a/src/views/pqs/database/case/components/form.vue
+++ b/src/views/pqs/database/case/components/form.vue
@@ -12,18 +12,18 @@
-
+
@@ -32,7 +32,7 @@
@@ -88,7 +88,7 @@ const formRef = ref()
const fileList: any = ref([])
// 注意不要和表单ref的命名冲突
const form = reactive({
- type: '',
+ // type: '',
name: '',
location: '',
process: '',
@@ -100,12 +100,12 @@ const form = reactive({
})
const rules = {
- name: [{ required: true, message: '角色名称不能为空', trigger: 'blur' }],
- type: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }],
- location: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }],
- process: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }],
- measures: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }],
- effect: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }]
+ name: [{ required: true, message: '请输入事件名称', trigger: 'blur' }],
+ // type: [{ required: true, message: '角色编码不能为空', trigger: 'blur' }],
+ location: [{ required: true, message: '请输入发生地点', trigger: 'blur' }],
+ process: [{ required: true, message: '请输入事件经过', trigger: 'blur' }],
+ measures: [{ required: true, message: '请输入处理措施', trigger: 'blur' }],
+ effect: [{ required: true, message: '请输入治理效果', trigger: 'blur' }]
}
const open = (text: string, data?: anyObj) => {
diff --git a/src/views/pqs/database/case/index.vue b/src/views/pqs/database/case/index.vue
index 4d6b85cd..f443be48 100644
--- a/src/views/pqs/database/case/index.vue
+++ b/src/views/pqs/database/case/index.vue
@@ -3,15 +3,16 @@
- 新增
+ 新增
查看标准
-
- 上传标准
+
@@ -39,6 +40,8 @@ import annex from './components/annex.vue'
import { ElMessage } from 'element-plus'
import { uploadFile, getFileNameAndFilePath, downloadFile } from '@/api/system-boot/file'
import { addStandardCase, queryStandardCase } from '@/api/supervision-boot/database/index'
+import { useAdminInfo } from '@/stores/adminInfo'
+const adminInfo = useAdminInfo()
defineOptions({
name: 'database/case'
})
@@ -49,56 +52,65 @@ const TableHeaderRef = ref()
const annexRef = ref()
const dialogVisible = ref(false)
const summary = ref('')
-
+const information = adminInfo.roleCode.includes('information_info')
const tableStore = new TableStore({
url: '/supervision-boot/libcase/pageQuery',
method: 'POST',
column: [
{ title: '电能质量事件名称', field: 'name' },
- {
- title: '发生事件',
- field: 'type'
- },
-
- {
- title: '事件经过',
- field: 'process'
- },
{
title: '发生地点',
field: 'location'
},
- {
- title: '处理措施',
- field: 'measures'
- },
- {
- title: '治理效果',
- field: 'effect'
- },
- {
- title: '事件简介',
- width: '140',
- render: 'buttons',
- buttons: [
- {
- name: 'view',
- title: '查看',
- type: 'primary',
- icon: 'el-icon-Plus',
- render: 'basicButton',
- click: row => {
- dialogVisible.value = true
- summary.value = row.summary
- }
- }
- ]
- },
+ // {
+ // title: '发生事件',
+ // field: 'type'
+ // },
+ // {
+ // title: '事件经过',
+ // field: 'process'
+ // },
+ // {
+ // title: '处理措施',
+ // field: 'measures'
+ // },
+ // {
+ // title: '治理效果',
+ // field: 'effect'
+ // },
+ // {
+ // title: '事件简介',
+ // width: '140',
+ // render: 'buttons',
+ // buttons: [
+ // {
+ // name: 'view',
+ // title: '查看',
+ // type: 'primary',
+ // icon: 'el-icon-Plus',
+ // render: 'basicButton',
+ // click: row => {
+ // dialogVisible.value = true
+ // summary.value = row.summary
+ // }
+ // }
+ // ]
+ // },
{
title: '操作',
width: '200',
render: 'buttons',
buttons: [
+ {
+ name: 'view',
+ title: '详情',
+ type: 'primary',
+ icon: 'el-icon-Plus',
+ render: 'basicButton',
+ click: row => {
+ annexRef.value.open(row)
+ }
+ },
{
name: 'view',
title: '下载附件',
@@ -113,7 +125,9 @@ const tableStore = new TableStore({
name: 'edit',
title: '修改',
type: 'primary',
-
+ disabled: row => {
+ return !information
+ },
icon: 'el-icon-Plus',
render: 'basicButton',
click: row => {
@@ -126,6 +140,9 @@ const tableStore = new TableStore({
type: 'danger',
icon: 'el-icon-Delete',
render: 'confirmButton',
+ disabled: row => {
+ return !information
+ },
popconfirm: {
confirmButtonText: '确认',
cancelButtonText: '取消',
@@ -142,7 +159,7 @@ const tableStore = new TableStore({
]
}
],
- loadCallback: () => {}
+ loadCallback: () => { }
})
// 弹框
@@ -171,7 +188,7 @@ const choose = (e: any) => {
})
//
}
-const downloadTheReport = (url: string) => {
+const downloadTheReport = () => {
queryStandardCase().then(res => {
let urls = res.data
let name = urls.match(/\/([^/]+)\.(\w+)$/)[1]
@@ -181,18 +198,18 @@ const downloadTheReport = (url: string) => {
type: urls.includes('.pdf')
? 'application/pdf'
: urls.includes('.docx')
- ? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
- : urls.includes('.xls')
- ? 'application/vnd.ms-excel'
- : urls.includes('.xlsx')
- ? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
- : urls.includes('.png')
- ? 'image/png'
- : urls.includes('.jpeg')
- ? 'image/jpeg'
- : urls.includes('.jpg')
- ? 'image/jpg'
- : ''
+ ? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ : urls.includes('.xls')
+ ? 'application/vnd.ms-excel'
+ : urls.includes('.xlsx')
+ ? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+ : urls.includes('.png')
+ ? 'image/png'
+ : urls.includes('.jpeg')
+ ? 'image/jpeg'
+ : urls.includes('.jpg')
+ ? 'image/jpg'
+ : ''
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
diff --git a/src/views/pqs/database/standard/components/addTree.vue b/src/views/pqs/database/standard/components/addTree.vue
index cb0d1142..bb6587d8 100644
--- a/src/views/pqs/database/standard/components/addTree.vue
+++ b/src/views/pqs/database/standard/components/addTree.vue
@@ -20,7 +20,7 @@
-
+
上传
diff --git a/src/views/pqs/database/standard/index.vue b/src/views/pqs/database/standard/index.vue
index 4eb076dd..196f3c34 100644
--- a/src/views/pqs/database/standard/index.vue
+++ b/src/views/pqs/database/standard/index.vue
@@ -4,37 +4,28 @@
-
+ :current-node-key="monitoringPoint.state.lineId" @node-click="handleNodeClick"
+ @init="handleNodeClick">
- 新增
- 修改
- 删除
+ 新增
+ 修改
+ 删除
下载
-
+
-
![]()
+
@@ -61,7 +52,8 @@ import VueOfficeExcel from '@vue-office/excel'
//引入VueOfficePdf组件
import VueOfficePdf from '@vue-office/pdf'
import { deleteyLibstandard } from '@/api/supervision-boot/database/index'
-
+import { useAdminInfo } from '@/stores/adminInfo'
+const adminInfo = useAdminInfo()
defineOptions({
name: 'database/standard'
})
@@ -73,6 +65,7 @@ const addTreeRef = ref()
const url = ref('')
const dotList: any = ref({})
const flag: any = ref(false)
+const information = adminInfo.roleCode.includes('information_info')
onMounted(() => {
const dom = document.getElementById('navigation-splitpanes')
if (dom) {
@@ -123,18 +116,18 @@ const download = () => {
type: urls.includes('.pdf')
? 'application/pdf'
: urls.includes('.docx')
- ? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
- : urls.includes('.xls')
- ? 'application/vnd.ms-excel'
- : urls.includes('.xlsx')
- ? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
- : urls.includes('.png')
- ? 'image/png'
- : urls.includes('.jpeg')
- ? 'image/jpeg'
- : urls.includes('.jpg')
- ? 'image/jpg'
- : ''
+ ? 'application/vnd.openxmlformats-officedocument.wordprocessingml.document'
+ : urls.includes('.xls')
+ ? 'application/vnd.ms-excel'
+ : urls.includes('.xlsx')
+ ? 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'
+ : urls.includes('.png')
+ ? 'image/png'
+ : urls.includes('.jpeg')
+ ? 'image/jpeg'
+ : urls.includes('.jpg')
+ ? 'image/jpg'
+ : ''
})
const url = window.URL.createObjectURL(blob)
const link = document.createElement('a')
@@ -150,44 +143,57 @@ const download = () => {
.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;
}
+
/* 自定义 el-empty 的样式 */
:deep(.custom-empty) {
display: flex;
justify-content: center;
align-items: center;
- height: 100%; /* 调整高度 */
- padding: 20px; /* 调整内边距 */
+ height: 100%;
+ /* 调整高度 */
+ padding: 20px;
+
+ /* 调整内边距 */
.el-empty__image {
- display: none; /* 隐藏默认图片 */
+ display: none;
+ /* 隐藏默认图片 */
}
+
.el-empty__description {
- font-size: 14px; /* 调整字体大小 */
+ font-size: 14px;
+ /* 调整字体大小 */
color: var(--vxe-font-color);
}
}
diff --git a/src/views/pqs/database/stencil/index.vue b/src/views/pqs/database/stencil/index.vue
index c12a0868..2e827ca6 100644
--- a/src/views/pqs/database/stencil/index.vue
+++ b/src/views/pqs/database/stencil/index.vue
@@ -3,7 +3,7 @@
- 新增
+ 新增
@@ -13,7 +13,6 @@