修改升级日志
This commit is contained in:
@@ -191,7 +191,9 @@ const handlerYAxis = () => {
|
||||
color: '#000',
|
||||
fontSize: 14,
|
||||
formatter: function (value) {
|
||||
return parseFloat(value.toFixed(1)) // 格式化显示为一位小数
|
||||
// 分类轴为字符串,数值轴才做小数格式化
|
||||
if (typeof value !== 'number' || Number.isNaN(value)) return value
|
||||
return parseFloat(value.toFixed(1))
|
||||
}
|
||||
},
|
||||
splitLine: {
|
||||
|
||||
@@ -1,8 +1,22 @@
|
||||
<script lang='ts'>
|
||||
<script lang="ts">
|
||||
import { defineComponent, createVNode, reactive } from 'vue'
|
||||
import { Column } from 'vxe-table'
|
||||
import { uuid } from '@/utils/random'
|
||||
|
||||
/** storage 开启时列必须有稳定 field;序号/操作等无 field 列按 title 生成 */
|
||||
function resolveColumnField(attr: Record<string, any>): string | undefined {
|
||||
if (attr.field) return attr.field
|
||||
if (attr.prop) return attr.prop
|
||||
// checkbox / radio / expand / seq 等类型列由 vxe 内部处理,可不强制 field
|
||||
if (attr.type && ['checkbox', 'radio', 'expand', 'html'].includes(attr.type)) {
|
||||
return undefined
|
||||
}
|
||||
if (attr.title != null && attr.title !== '') {
|
||||
return `__col_${attr.title}`
|
||||
}
|
||||
return `col_${uuid()}`
|
||||
}
|
||||
|
||||
export default defineComponent({
|
||||
name: 'Column',
|
||||
props: {
|
||||
@@ -12,9 +26,13 @@ export default defineComponent({
|
||||
}
|
||||
},
|
||||
setup(props, { slots }) {
|
||||
const attr = reactive(props.attr)
|
||||
const attr = reactive({ ...props.attr })
|
||||
attr['align'] = attr['align'] ? attr['align'] : 'center'
|
||||
attr['column-key'] = attr['column-key'] ? attr['column-key'] : attr.prop || uuid()
|
||||
const field = resolveColumnField(attr)
|
||||
if (field) {
|
||||
attr.field = field
|
||||
}
|
||||
attr['column-key'] = attr['column-key'] ? attr['column-key'] : attr.field || attr.prop || uuid()
|
||||
return () => {
|
||||
return createVNode(Column, attr, slots.default)
|
||||
}
|
||||
|
||||
@@ -10,7 +10,8 @@ export const defaultAttribute: VxeTableProps = {
|
||||
rowConfig: { isCurrent: true, isHover: true },
|
||||
scrollX: { scrollToLeftOnChange: true },
|
||||
scrollY: { scrollToTopOnChange: true, enabled: true, gt: 100 },
|
||||
customConfig: { enabled: true, allowFixed: false, showFooter: false, immediate: true ,mode:'default'},
|
||||
customConfig: { enabled: true, allowFixed: true, storage: false, showFooter: false, immediate: true, mode: 'default' },
|
||||
|
||||
showOverflow: 'tooltip',
|
||||
showHeaderOverflow: false
|
||||
}
|
||||
|
||||
@@ -417,6 +417,7 @@ html.dark {
|
||||
#header-form-second {
|
||||
:deep(.el-select) {
|
||||
--el-select-width: 220px;
|
||||
width: 200px;
|
||||
}
|
||||
|
||||
:deep(.el-input) {
|
||||
|
||||
@@ -3,10 +3,12 @@
|
||||
<div v-if="showCustomColumn && !tableStore?.table?.customColumnInHeader" class="table-custom-toolbar">
|
||||
<el-button class="vxe-toolbar-custom-target" :icon="Setting" @click="openCustomColumn">列设置</el-button>
|
||||
</div>
|
||||
|
||||
<vxe-table
|
||||
ref="tableRef"
|
||||
height="auto"
|
||||
:key="key"
|
||||
:id="getTableId().feature ? getTableId().feature : getTableId()"
|
||||
:data="tableStore.table.data"
|
||||
v-loading="tableStore.table.loading"
|
||||
v-bind="tableBindProps"
|
||||
@@ -102,10 +104,22 @@ const props = withDefaults(defineProps<Props>(), {
|
||||
const attrs = useAttrs()
|
||||
const tableBindProps = computed(() => {
|
||||
const overflow = props.showOverflow ?? defaultAttribute.showOverflow
|
||||
return Object.assign({}, defaultAttribute, attrs, {
|
||||
const bindProps: Record<string, any> = Object.assign({}, defaultAttribute, attrs, {
|
||||
showOverflow: overflow,
|
||||
showHeaderOverflow: false
|
||||
})
|
||||
if (props.showCustomColumn) {
|
||||
bindProps.customConfig = {
|
||||
...(bindProps.customConfig || {}),
|
||||
enabled: true,
|
||||
allowFixed: true,
|
||||
storage: true,
|
||||
showFooter: false,
|
||||
immediate: true,
|
||||
mode: 'default'
|
||||
}
|
||||
}
|
||||
return bindProps
|
||||
})
|
||||
const openCustomColumn = () => {
|
||||
if (!tableRef.value) return
|
||||
@@ -188,6 +202,17 @@ const getTableExportFilename = () => {
|
||||
'导出'
|
||||
return buildExportBaseName({ feature })
|
||||
}
|
||||
const getTableId = () => {
|
||||
const exportName = tableStore.exportName
|
||||
if (exportName && typeof exportName === 'object') {
|
||||
return exportName
|
||||
}
|
||||
const feature =
|
||||
exportName ||
|
||||
(document.querySelectorAll('.ba-nav-tab.active')[0] as HTMLElement | undefined)?.textContent ||
|
||||
'导出'
|
||||
return feature
|
||||
}
|
||||
|
||||
watch(
|
||||
() => tableStore.table.allFlag,
|
||||
|
||||
@@ -48,7 +48,7 @@
|
||||
size="18"
|
||||
/>
|
||||
</div> -->
|
||||
"
|
||||
|
||||
|
||||
<Config />
|
||||
<PopupPwd ref="popupPwd" />
|
||||
@@ -71,6 +71,7 @@ import html2canvas from 'html2canvas'
|
||||
import PopupPwd from './popup/password.vue'
|
||||
import AdminInfo from './popup/adminInfo.vue'
|
||||
import { useNavTabs } from '@/stores/navTabs'
|
||||
import { Local } from '@/utils/storage'
|
||||
|
||||
const adminInfo = useAdminInfo()
|
||||
const navTabs = useNavTabs()
|
||||
@@ -117,7 +118,7 @@ const handleCommand = async (key: string) => {
|
||||
break
|
||||
case 'layout':
|
||||
navTabs.closeTabs()
|
||||
window.localStorage.clear()
|
||||
Local.clear()
|
||||
adminInfo.reset()
|
||||
setTimeout(() => {
|
||||
window.location.reload()
|
||||
|
||||
@@ -33,6 +33,7 @@ import { validatePwd } from '@/utils/common'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import router from '@/router'
|
||||
import { useNavTabs } from '@/stores/navTabs'
|
||||
import { Local } from '@/utils/storage'
|
||||
const adminInfo = useAdminInfo()
|
||||
const navTabs = useNavTabs()
|
||||
const dialogVisible = ref(false)
|
||||
@@ -109,7 +110,7 @@ const submit = () => {
|
||||
|
||||
setTimeout(() => {
|
||||
navTabs.closeTabs()
|
||||
window.localStorage.clear()
|
||||
Local.clear()
|
||||
adminInfo.reset()
|
||||
router.push({ name: 'login' })
|
||||
}, 0)
|
||||
|
||||
@@ -5,6 +5,7 @@ import { refreshToken } from '@/api/user-boot/user'
|
||||
import router from '@/router/index'
|
||||
import { useAdminInfo } from '@/stores/adminInfo'
|
||||
import { useNavTabs } from '@/stores/navTabs'
|
||||
import { Local } from '@/utils/storage'
|
||||
window.requests = []
|
||||
window.tokenRefreshing = false
|
||||
let loginExpireTimer: any = null
|
||||
@@ -171,7 +172,7 @@ function createAxios<Data = any, T = ApiPromise<Data>>(
|
||||
})
|
||||
adminInfo.removeToken()
|
||||
navTabs.closeTabs()
|
||||
window.localStorage.clear()
|
||||
Local.clear()
|
||||
adminInfo.reset()
|
||||
router.push({ name: 'login' })
|
||||
loginExpireTimer = null // 执行后清空定时器
|
||||
|
||||
@@ -3,8 +3,13 @@
|
||||
* @method set 设置
|
||||
* @method get 获取
|
||||
* @method remove 移除
|
||||
* @method clear 移除全部
|
||||
* @method clear 移除全部(保留表格列配置、Pinia DevTools 设置)
|
||||
*/
|
||||
const LOCAL_STORAGE_PRESERVE_KEYS = [
|
||||
'VXE_CUSTOM_STORE',
|
||||
'__VUE_DEVTOOLS_NEXT_PLUGIN_SETTINGS__dev.esm.pinia__'
|
||||
]
|
||||
|
||||
export const Local = {
|
||||
set(key: string, val: any) {
|
||||
window.localStorage.setItem(key, JSON.stringify(val))
|
||||
@@ -17,7 +22,15 @@ export const Local = {
|
||||
window.localStorage.removeItem(key)
|
||||
},
|
||||
clear() {
|
||||
const preserved: Record<string, string> = {}
|
||||
for (const key of LOCAL_STORAGE_PRESERVE_KEYS) {
|
||||
const value = window.localStorage.getItem(key)
|
||||
if (value !== null) preserved[key] = value
|
||||
}
|
||||
window.localStorage.clear()
|
||||
for (const [key, value] of Object.entries(preserved)) {
|
||||
window.localStorage.setItem(key, value)
|
||||
}
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@@ -2,11 +2,24 @@
|
||||
<div>
|
||||
<div class="custom-table-header">
|
||||
<div class="title">菜单列表</div>
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
style="width: 310px" placeholder="请输入菜单名称" class="ml10" clearable @input="search" />
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
style="width: 310px"
|
||||
placeholder="请输入菜单名称"
|
||||
class="ml10"
|
||||
clearable
|
||||
@input="search"
|
||||
/>
|
||||
<el-button :icon="Plus" type="primary" @click="addMenu" class="ml10">新增</el-button>
|
||||
</div>
|
||||
<Table @currentChange="currentChange" />
|
||||
<Table
|
||||
@currentChange="currentChange"
|
||||
:row-config="{ isCurrent: true, isHover: true, }"
|
||||
:tree-config="{ children: 'children', reserve: true }"
|
||||
:scroll-y="{ enabled: false }"
|
||||
/>
|
||||
<popupMenu ref="popupRef" @init="emits('init')"></popupMenu>
|
||||
</div>
|
||||
</template>
|
||||
@@ -50,7 +63,8 @@ const tableStore = new TableStore({
|
||||
render: 'icon'
|
||||
},
|
||||
{
|
||||
title: '操作', fixed: 'right',
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
align: 'center',
|
||||
width: '180',
|
||||
render: 'buttons',
|
||||
|
||||
@@ -17,11 +17,11 @@
|
||||
style="width: 100%"
|
||||
></el-tree-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-form-item label="告警代码">
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
style="width: 240px"
|
||||
style="width: 200px"
|
||||
v-model.trim="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入告警代码"
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div >
|
||||
<TableHeader select :showReset="false" showCustomColumn ref="TableHeaderRef">
|
||||
<template #operation>
|
||||
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
||||
@@ -26,6 +26,7 @@ const tableStore: any = new TableStore({
|
||||
url: '/cs-system-boot/csAlarmSet/listAll',
|
||||
method: 'POST',
|
||||
showPage: false,
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div >
|
||||
<TableHeader showCustomColumn ref="TableHeaderRef">
|
||||
<template #select>
|
||||
<el-form-item label="数据来源">
|
||||
@@ -36,7 +36,7 @@ import { ElMessage } from 'element-plus'
|
||||
import { pqDelete } from '@/api/algorithm-boot/scopeConfig'
|
||||
import Form from './form.vue'
|
||||
defineOptions({
|
||||
name: 'govern/alarmConfig'
|
||||
name: 'govern/scopeConfig'
|
||||
})
|
||||
const dataSourceOptions = [
|
||||
{ label: 'InfluxDB', value: 'InfluxDB' },
|
||||
@@ -54,6 +54,7 @@ const tableStore: any = new TableStore({
|
||||
url: '/algorithm-boot/pqReasonableRange/getData',
|
||||
method: 'POST',
|
||||
showPage: false,
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main" style="display: flex" :style="height">
|
||||
<div style="display: flex" :style="height">
|
||||
<div style="width: 400px; overflow: hidden">
|
||||
<div class="custom-table-header">
|
||||
<div class="title">方案列表</div>
|
||||
@@ -131,7 +131,7 @@
|
||||
</el-button>
|
||||
</div>
|
||||
<!-- <steadyStateTree /> -->
|
||||
<Tree class="borderBox" ref="treeRef" show-checkbox :showBut="false" width="370px" :height="250"
|
||||
<Tree class="borderBox" ref="treeRef" show-checkbox :showBut="false" width="370px" :height="297"
|
||||
:data="menuTree" :checkStrictly="checkStrictly"></Tree>
|
||||
</div>
|
||||
<!-- 新增/编辑弹框 -->
|
||||
@@ -171,8 +171,8 @@ import { id } from 'element-plus/es/locale'
|
||||
defineOptions({
|
||||
name: 'govern/steadyStateEvent'
|
||||
})
|
||||
const height = mainHeight(20)
|
||||
const height1 = mainHeight(90)
|
||||
const height = mainHeight(80)
|
||||
const height1 = mainHeight(140)
|
||||
const config = useConfig()
|
||||
const tableRef = ref()
|
||||
const checkAll1 = ref(false)
|
||||
@@ -263,7 +263,7 @@ const tableStore = new TableStore({
|
||||
showPage: false,
|
||||
url: '/cs-harmonic-boot/csHarmonicPlan/list',
|
||||
method: 'GET',
|
||||
publicHeight: 70,
|
||||
publicHeight: 120,
|
||||
column: [
|
||||
{ title: '方案名称', field: 'name', align: 'center' },
|
||||
{
|
||||
|
||||
@@ -1854,6 +1854,7 @@ const validateActiveTabForm = (): Promise<boolean> => {
|
||||
}
|
||||
|
||||
const next = async () => {
|
||||
connectionMethod.value = 'CLD'
|
||||
await mainForm.value.validate((valid: any) => {
|
||||
if (valid) {
|
||||
// 在新增模式下(pageStatus == 2)保存当前数据并创建下一个层级的Tab
|
||||
@@ -2987,7 +2988,7 @@ const tryRefreshAfterNavigate = () => {
|
||||
const addTopology = () => {
|
||||
markNeedRefreshAfterNavigate()
|
||||
push({
|
||||
name: 'govern/manage/gplot'
|
||||
name: 'RuntimeConfiguration'
|
||||
})
|
||||
}
|
||||
// 新增前置机
|
||||
|
||||
@@ -7,6 +7,18 @@
|
||||
<el-tab-pane label="监测设备" name="2">
|
||||
<Monitor v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="设备模板" name="3">
|
||||
<Template v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="设备版本" name="4">
|
||||
<ProgramVersion v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="设备字典" name="5">
|
||||
<Dictionary v-if="activeName == '5'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="文件管理" name="6">
|
||||
<FileService v-if="activeName == '6'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
@@ -15,6 +27,10 @@
|
||||
import { ref } from 'vue'
|
||||
import Factory from '@/views/govern/manage/factory.vue'
|
||||
import Monitor from './components/monitoring.vue'
|
||||
import Template from '@/views/govern/manage/basic/template.vue'
|
||||
import ProgramVersion from '@/views/govern/manage/programVersion/index.vue'
|
||||
import Dictionary from '@/views/govern/manage/basic/dictionary.vue'
|
||||
import FileService from '@/views/govern/device/fileService/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
name: 'govern/cloudDeviceEntry'
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
<el-form-item label="关键字筛选" v-if="!dataSet.includes('_')">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="searchValue" autocomplete="off"
|
||||
clearable @input="handleSearch" placeholder="请输入关键字筛选"
|
||||
style="width: 180px !important"></el-input>
|
||||
style="width: 200px !important"></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
<template #operation>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<!-- 文件管理 -->
|
||||
<template>
|
||||
<div class="default-main main" :style="{ height: pageHeight.height }">
|
||||
<div class="main" :style="{ height: pageHeight.height }">
|
||||
<div class="main_left">
|
||||
<DeviceTree @node-click="nodeClick" @deviceTypeChange="deviceTypeChange" @init="nodeClick"></DeviceTree>
|
||||
</div>
|
||||
@@ -170,8 +170,8 @@ import { downLoadFile } from '@/utils/downloadFile.ts'
|
||||
defineOptions({
|
||||
name: 'govern/device/fileService/index'
|
||||
})
|
||||
const pageHeight = mainHeight(20)
|
||||
const tableHeight = mainHeight(130)
|
||||
const pageHeight = mainHeight(80)
|
||||
const tableHeight = mainHeight(180)
|
||||
const adminInfo = useAdminInfo()
|
||||
const loading = ref(false)
|
||||
const loading1 = ref(false)
|
||||
@@ -763,7 +763,7 @@ onBeforeUnmount(() => {
|
||||
.main {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-bottom: 10px;
|
||||
// padding-bottom: 10px;
|
||||
|
||||
.main_left {
|
||||
// width: 280px;
|
||||
@@ -913,10 +913,13 @@ onBeforeUnmount(() => {
|
||||
margin: 0px -10px 0px 0px;
|
||||
}
|
||||
</style>
|
||||
<style lang="scss">
|
||||
<style lang="scss" scoped>
|
||||
.customInput {
|
||||
.el-input__inner {
|
||||
-webkit-text-security: disc !important;
|
||||
}
|
||||
}
|
||||
:deep(.cn-tree){
|
||||
padding: 0 10px 0 0;
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div >
|
||||
<TableHeader showCustomColumn>
|
||||
<template #select>
|
||||
<el-form-item label="数据分类">
|
||||
@@ -17,7 +17,7 @@
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.searchValue"
|
||||
<el-input maxlength="32" show-word-limit style="width: 200px" v-model.trim="tableStore.table.params.searchValue"
|
||||
placeholder="数据名称/别名/展示名称" clearable></el-input>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -52,6 +52,7 @@ const ResourcesIdSelect = dictData.getBasicData('Data_Day')
|
||||
const tableStore = new TableStore({
|
||||
url: '/system-boot/csDictData/list',
|
||||
method: 'POST',
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<template>
|
||||
<div class="default-main" v-loading="loading">
|
||||
<div v-loading="loading">
|
||||
<TableHeader ref="tableHeaderRef" showCustomColumn>
|
||||
<template #select>
|
||||
<el-form-item label="模版名称">
|
||||
<el-input maxlength="32" show-word-limit
|
||||
|
||||
|
||||
style="width: 200px"
|
||||
v-model.trim="tableStore.table.params.name"
|
||||
clearable
|
||||
placeholder="请输入名称"
|
||||
@@ -62,6 +62,7 @@ queryByCode('Direct_Connected_Device').then(res => {
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/devmodel/queryDevModelPage',
|
||||
method: 'POST',
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
field: 'index',
|
||||
|
||||
@@ -3,10 +3,18 @@
|
||||
<TableHeader ref="tableHeaderRef" :showReset="false" showExport showCustomColumn>
|
||||
<template #select>
|
||||
<el-form-item label="设备型号:">
|
||||
<el-select v-model.trim="tableStore.table.params.devType" filterable placeholder="请选择设备型号"
|
||||
clearable>
|
||||
<el-option v-for="item in DevTypeOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.devType"
|
||||
filterable
|
||||
placeholder="请选择设备型号"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in DevTypeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -57,9 +65,19 @@ const tableStore = new TableStore({
|
||||
},
|
||||
{ title: '设备型号', field: 'devTypeName', minWidth: '100' },
|
||||
{ title: '版本号', field: 'versionNo', minWidth: '100' },
|
||||
{
|
||||
title: '校验码',
|
||||
field: 'crc',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{ title: '协议版本', field: 'versionAgreement', minWidth: '100' },
|
||||
{ title: '版本日期', field: 'versionDate', minWidth: '100' },
|
||||
|
||||
{ title: '归档日期', field: 'updateTime', minWidth: '150' },
|
||||
|
||||
{ title: '描述', field: 'description', minWidth: '200' },
|
||||
// {
|
||||
// title: '状态',
|
||||
@@ -115,7 +133,6 @@ const tableStore = new TableStore({
|
||||
ElMessage.success(row.status == 0 ? '启用成功!' : '禁用成功!')
|
||||
tableStore.index()
|
||||
})
|
||||
|
||||
})
|
||||
})
|
||||
}
|
||||
@@ -149,8 +166,7 @@ const tableStore = new TableStore({
|
||||
popupVersionRef.value.open('编辑版本', row)
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
<div>
|
||||
关键字筛选
|
||||
<el-input maxlength="32" show-word-limit class="ml10" v-model="searchValue" placeholder="请输入工程/项目名称"
|
||||
clearable style="width: 240px" @input="inpChaange" />
|
||||
clearable style="width: 200px" @input="inpChaange" />
|
||||
</div>
|
||||
<div style="margin-left: auto;">
|
||||
<el-button :icon="Plus" type="primary" @click="addRole">新增工程</el-button>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div >
|
||||
<TableHeader >
|
||||
<template v-slot:operation>
|
||||
<el-upload
|
||||
@@ -37,6 +37,7 @@ const tableStore = new TableStore({
|
||||
showPage: false,
|
||||
url: '/cs-device-boot/topologyTemplate/queryImage',
|
||||
method: 'POST',
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
|
||||
@@ -1,32 +1,35 @@
|
||||
<template>
|
||||
<el-dialog draggable v-model="dialogVisible" :title="title" width="900" :close-on-click-modal="false"
|
||||
:before-close="handleClose">
|
||||
|
||||
<el-dialog
|
||||
draggable
|
||||
v-model="dialogVisible"
|
||||
:title="title"
|
||||
width="800"
|
||||
:close-on-click-modal="false"
|
||||
:before-close="handleClose"
|
||||
>
|
||||
<!-- 表格区域 -->
|
||||
<div class="table-area" :style="layout1">
|
||||
<vxe-table v-bind="defaultAttribute" :data="tableData" v-loading="loading" height="auto">
|
||||
<vxe-column type="seq" title="序号" width="80" align="center" />
|
||||
<vxe-column field="version" title="版本" min-width="120" align="center" />
|
||||
<vxe-column field="result" title="升级结果" width="120" align="center">
|
||||
<vxe-column field="versionNo" title="版本" min-width="120" align="center" />
|
||||
<vxe-column field="result" title="升级结果" :min-width="resultColumnMinWidth" align="center">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="getResultTagType(row.result)" size="small">
|
||||
{{ getResultText(row.result) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</vxe-column>
|
||||
<vxe-column field="upgradeTime" title="升级时间" width="180" align="center" />
|
||||
<vxe-column field="upgradeUser" title="升级人" width="120" align="center" />
|
||||
<vxe-column field="code" title="前置响应码" min-width="80" align="center" />
|
||||
<vxe-column field="updateTime" title="升级时间" min-width="140" align="center" />
|
||||
<vxe-column field="userName" title="升级人" min-width="120" align="center" />
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { ref, reactive } from 'vue'
|
||||
import { ref, computed } from 'vue'
|
||||
import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
import { ElMessage } from 'element-plus'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
import { getByDevId } from '@/api/cs-device-boot/cloudDeviceEntry'
|
||||
const layout1 = mainHeight(100, 2)
|
||||
@@ -39,42 +42,43 @@ const tableData = ref([])
|
||||
// 加载状态
|
||||
const loading = ref(false)
|
||||
const title = ref('升级日志')
|
||||
|
||||
/** 存在结果为 3 的长文案时加宽列 */
|
||||
const resultColumnMinWidth = computed(() =>
|
||||
tableData.value.some(row => Number(row.result) === 3) ? 200 : 100
|
||||
)
|
||||
|
||||
// 升级结果标签类型映射
|
||||
const getResultTagType = (result) => {
|
||||
const getResultTagType = result => {
|
||||
const map = {
|
||||
success: 'success',
|
||||
fail: 'danger',
|
||||
processing: 'warning'
|
||||
1: 'success',
|
||||
0: 'danger',
|
||||
2: 'info',
|
||||
3: 'warning'
|
||||
}
|
||||
return map[result] || 'info'
|
||||
}
|
||||
|
||||
// 升级结果文本映射
|
||||
const getResultText = (result) => {
|
||||
const getResultText = result => {
|
||||
const map = {
|
||||
success: '成功',
|
||||
fail: '失败',
|
||||
processing: '进行中'
|
||||
1: '成功',
|
||||
0: '失败',
|
||||
2: '进行中',
|
||||
3: '升级指令下发,未收到前置响应'
|
||||
}
|
||||
return map[result] || result
|
||||
}
|
||||
|
||||
// 打开弹框
|
||||
const open = (row) => {
|
||||
const open = row => {
|
||||
title.value = `${row.name}_升级日志`
|
||||
dialogVisible.value = true
|
||||
getByDevId({
|
||||
devId: row.id
|
||||
}).then((res) => {
|
||||
tableData = res.data
|
||||
}).then(res => {
|
||||
tableData.value = res.data
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 加载表格数据
|
||||
const loadTableData = async (deviceId) => {
|
||||
loading.value = true
|
||||
|
||||
}
|
||||
|
||||
// 关闭弹框
|
||||
@@ -88,7 +92,6 @@ const handleClose = () => {
|
||||
defineExpose({
|
||||
open
|
||||
})
|
||||
|
||||
</script>
|
||||
|
||||
<style scoped></style>
|
||||
@@ -88,7 +88,7 @@ const submit = () => {
|
||||
edDataId: form.edDataId
|
||||
})
|
||||
.then(res => {
|
||||
ElMessage.success('升级成功')
|
||||
ElMessage.success(res.message)
|
||||
loading.value = false
|
||||
dialogVisible.value = false
|
||||
})
|
||||
@@ -97,7 +97,7 @@ const submit = () => {
|
||||
})
|
||||
} catch (error) {
|
||||
loading.value = false
|
||||
ElMessage.error('升级失败')
|
||||
// ElMessage.error(error.message)
|
||||
}
|
||||
}
|
||||
})
|
||||
|
||||
@@ -1,34 +1,65 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div>
|
||||
<TableHeader ref="tableHeaderRef" showExport showCustomColumn>
|
||||
<template #select>
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input maxlength="32" show-word-limit v-model="tableStore.table.params.searchValue" clearable placeholder="请输入设备名称"
|
||||
style="width:200px" />
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
v-model="tableStore.table.params.searchValue"
|
||||
clearable
|
||||
placeholder="请输入设备名称"
|
||||
style="width: 200px"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item label="通讯状态">
|
||||
<el-select v-model.trim="tableStore.table.params.connectStatus" filterable placeholder="请选择通讯状态"
|
||||
clearable>
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.connectStatus"
|
||||
filterable
|
||||
placeholder="请选择通讯状态"
|
||||
clearable
|
||||
>
|
||||
<el-option label="中断" :value="0"></el-option>
|
||||
<el-option label="正常" :value="1"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="设备型号">
|
||||
<el-select v-model.trim="tableStore.table.params.devModel" filterable placeholder="请选择设备型号"
|
||||
clearable>
|
||||
<el-option v-for="item in DevTypeOptions" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.devModel"
|
||||
filterable
|
||||
placeholder="请选择设备型号"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in DevTypeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="icd模型">
|
||||
<el-select v-model.trim="tableStore.table.params.icd" filterable placeholder="请选择设备系列" clearable>
|
||||
<el-option v-for="item in icdList" :key="item.id" :label="item.name"
|
||||
:value="item.id"></el-option>
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.icd"
|
||||
filterable
|
||||
placeholder="请选择设备系列"
|
||||
clearable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in icdList"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="升级设备筛选">
|
||||
<el-select v-model.trim="tableStore.table.params.upgrade" filterable placeholder="请选择升级设备筛选"
|
||||
clearable>
|
||||
<el-select
|
||||
v-model.trim="tableStore.table.params.upgrade"
|
||||
filterable
|
||||
placeholder="请选择升级设备筛选"
|
||||
clearable
|
||||
>
|
||||
<el-option label="可升级" :value="1"></el-option>
|
||||
<el-option label="不可升级" :value="0"></el-option>
|
||||
</el-select>
|
||||
@@ -69,6 +100,7 @@ const { push, options, currentRoute } = useRouter()
|
||||
const tableStore: any = new TableStore({
|
||||
url: '/cs-device-boot/EquipmentDelivery/version/page',
|
||||
method: 'POST',
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
// { type: 'checkbox', width: '60', },
|
||||
{
|
||||
@@ -79,14 +111,75 @@ const tableStore: any = new TableStore({
|
||||
return (tableStore.table.params.pageNum - 1) * tableStore.table.params.pageSize + row.rowIndex + 1
|
||||
}
|
||||
},
|
||||
|
||||
{ title: '设备名称', field: 'name', minWidth: '150' },
|
||||
{ title: '版本号', field: 'version', minWidth: '100', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{ title: '协议版本', field: 'protocolVersion', minWidth: '100', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{ title: '版本日期', field: 'versionDate', minWidth: '150', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{ title: '设备型号', field: 'devModelName', minWidth: '120', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{ title: 'icd模型', field: 'icd', minWidth: '120', formatter: (row: any) => { return icdList.value?.filter((item: any) => item.id == row.cellValue)[0]?.name || '/' } },
|
||||
{ title: '所属工程', field: 'associatedEngineering', minWidth: '120', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{ title: '所属项目', field: 'associatedProject', minWidth: '120', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{
|
||||
title: '设备型号',
|
||||
field: 'devModelName',
|
||||
minWidth: '150',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '版本号',
|
||||
field: 'version',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '校验码',
|
||||
field: 'crc',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '协议版本',
|
||||
field: 'protocolVersion',
|
||||
minWidth: '100',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '版本日期',
|
||||
field: 'versionDate',
|
||||
minWidth: '150',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
|
||||
|
||||
{
|
||||
title: 'icd模型',
|
||||
field: 'icd',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return icdList.value?.filter((item: any) => item.id == row.cellValue)[0]?.name || '/'
|
||||
}
|
||||
},
|
||||
|
||||
{
|
||||
title: '所属工程',
|
||||
field: 'associatedEngineering',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '所属项目',
|
||||
field: 'associatedProject',
|
||||
minWidth: '120',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '状态',
|
||||
field: 'runStatus',
|
||||
@@ -101,8 +194,23 @@ const tableStore: any = new TableStore({
|
||||
2: '在线'
|
||||
}
|
||||
},
|
||||
{ title: '更新时间', field: 'updateTime', minWidth: '150', formatter: (row: any) => { return row.cellValue || '/' }, sortable: true },
|
||||
{ title: '修改人员', field: 'updateByName', minWidth: '100', formatter: (row: any) => { return row.cellValue || '/' } },
|
||||
{
|
||||
title: '更新时间',
|
||||
field: 'updateTime',
|
||||
minWidth: '150',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
},
|
||||
sortable: true
|
||||
},
|
||||
{
|
||||
title: '修改人员',
|
||||
field: 'updateByName',
|
||||
minWidth: '100',
|
||||
formatter: (row: any) => {
|
||||
return row.cellValue || '/'
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
fixed: 'right',
|
||||
@@ -124,7 +232,6 @@ const tableStore: any = new TableStore({
|
||||
id: [row.id],
|
||||
devModel: row.devModel,
|
||||
version: row.version
|
||||
|
||||
})
|
||||
}
|
||||
},
|
||||
@@ -167,7 +274,6 @@ const getQuery = async () => {
|
||||
icdList.value = res.data
|
||||
})
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
// 禁止点击
|
||||
@@ -188,13 +294,10 @@ const upgradeVersion = () => {
|
||||
return ElMessage.warning('请选择相同设备型号的设备进行批量升级!')
|
||||
}
|
||||
|
||||
upgradeRef.value.open(
|
||||
{
|
||||
upgradeRef.value.open({
|
||||
id: tableStore.table.selection.map(item => item.id),
|
||||
devModel: firstDevModel
|
||||
|
||||
}
|
||||
)
|
||||
})
|
||||
}
|
||||
// 版本维护
|
||||
const maintenance = () => {
|
||||
@@ -215,3 +318,8 @@ onMounted(() => {
|
||||
tableStore.index()
|
||||
})
|
||||
</script>
|
||||
<style lang="scss" scoped>
|
||||
:deep(.el-select) {
|
||||
width: 200px;
|
||||
}
|
||||
</style>
|
||||
|
||||
1370
src/views/govern/operationalQuality/index.vue
Normal file
1370
src/views/govern/operationalQuality/index.vue
Normal file
File diff suppressed because it is too large
Load Diff
1
src/views/govern/operationalQuality/treeMock.json
Normal file
1
src/views/govern/operationalQuality/treeMock.json
Normal file
File diff suppressed because one or more lines are too long
38
src/views/govern/setting/RuntimeConfiguration/index.vue
Normal file
38
src/views/govern/setting/RuntimeConfiguration/index.vue
Normal file
@@ -0,0 +1,38 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<el-tabs type="border-card" v-model.trim="activeName">
|
||||
<el-tab-pane label="拓扑图模版" name="1">
|
||||
<Gplot v-if="activeName == '1'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="稳态事件推送" name="2">
|
||||
<SteadyStateEvent v-if="activeName == '2'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="运行告警" name="3">
|
||||
<AlarmConfig v-if="activeName == '3'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="数据范围" name="4">
|
||||
<ScopeConfig v-if="activeName == '4'" />
|
||||
</el-tab-pane>
|
||||
<el-tab-pane label="统计指标" name="5">
|
||||
<StatisticalType v-if="activeName == '5'" />
|
||||
</el-tab-pane>
|
||||
</el-tabs>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { ref } from 'vue'
|
||||
import Gplot from '@/views/govern/manage/gplot/index.vue'
|
||||
import SteadyStateEvent from '@/views/govern/alarm/steadyStateEvent/index.vue'
|
||||
import AlarmConfig from '@/views/govern/alarm/alarmConfig/index.vue'
|
||||
import ScopeConfig from '@/views/govern/alarm/scopeConfig/index.vue'
|
||||
import StatisticalType from '@/views/govern/setting/statisticalType/index.vue'
|
||||
import { mainHeight } from '@/utils/layout'
|
||||
defineOptions({
|
||||
name: 'RuntimeConfiguration'
|
||||
})
|
||||
const activeName = ref('1')
|
||||
const layout = mainHeight(80)
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped></style>
|
||||
@@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div class="default-main">
|
||||
<div >
|
||||
<TableHeader :showReset="false">
|
||||
<template v-slot:operation>
|
||||
<el-button :icon="Plus" type="primary" @click="addMenu">新增</el-button>
|
||||
@@ -47,7 +47,7 @@ const tableStore = new TableStore({
|
||||
url: '/system-boot/dictTree/query',
|
||||
method: 'POST',
|
||||
paramsPOST: true,
|
||||
// publicHeight: 60,
|
||||
publicHeight: 60,
|
||||
column: [
|
||||
{
|
||||
title: '序号',
|
||||
|
||||
Reference in New Issue
Block a user