云平台自测问题修改
This commit is contained in:
@@ -72,7 +72,7 @@ const initListByIds = () => {
|
|||||||
|
|
||||||
const templateListData = () => {
|
const templateListData = () => {
|
||||||
getTemplateList({}).then(res => {
|
getTemplateList({}).then(res => {
|
||||||
templateList.value = res.data.filter(item => item.name === '稳态治理报表')
|
templateList.value = res.data.filter(item => item.reportForm == 4)
|
||||||
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
|
if (!tableStore.table.params.tempId && templateList.value?.length > 0) {
|
||||||
tableStore.table.params.tempId = templateList.value[0].id
|
tableStore.table.params.tempId = templateList.value[0].id
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ const initLineList = async () => {
|
|||||||
cslineList({}).then(res => {
|
cslineList({}).then(res => {
|
||||||
lineList.value = res.data
|
lineList.value = res.data
|
||||||
tableStore.table.params.lineId = lineList.value[0].lineId
|
tableStore.table.params.lineId = lineList.value[0].lineId
|
||||||
|
initCode()
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -434,7 +435,6 @@ watch(
|
|||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await initLineList()
|
await initLineList()
|
||||||
await initCode()
|
|
||||||
})
|
})
|
||||||
|
|
||||||
watch(
|
watch(
|
||||||
|
|||||||
@@ -136,19 +136,28 @@ const tableStore = new TableStore({
|
|||||||
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
url: '/cs-harmonic-boot/eventUser/queryEventpageWeb',
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
column: [
|
column: [
|
||||||
{ title: '事件描述', field: 'showName' },
|
{ title: '事件描述', field: 'showName', minWidth: 150 },
|
||||||
{ title: '发生位置', field: 'evtParamPosition' },
|
{ title: '发生位置', field: 'evtParamPosition', minWidth: 150 },
|
||||||
{ title: '持续时间(s)', field: 'evtParamTm', sortable: true },
|
{
|
||||||
|
title: '持续时间(s)',
|
||||||
|
field: 'evtParamTm',
|
||||||
|
sortable: true,
|
||||||
|
minWidth: 110,
|
||||||
|
formatter: (row: any) => {
|
||||||
|
return Math.floor(row.cellValue * 10000) / 100
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
title: '暂降(聚升)幅值(%)',
|
title: '暂降(聚升)幅值(%)',
|
||||||
field: 'evtParamVVaDepth',
|
field: 'evtParamVVaDepth',
|
||||||
|
minWidth: 150,
|
||||||
formatter: (row: any) => {
|
formatter: (row: any) => {
|
||||||
let a = row.cellValue.split('%')[0] - 0
|
let a = row.cellValue.split('%')[0] - 0
|
||||||
console.log('🚀 ~ a:', a)
|
|
||||||
return a ? a.toFixed(2) : '/'
|
return a ? a.toFixed(2) : '/'
|
||||||
}, sortable: true
|
},
|
||||||
|
sortable: true
|
||||||
},
|
},
|
||||||
{ title: '发生时刻', field: 'startTime', sortable: true },
|
{ title: '发生时刻', field: 'startTime', sortable: true, minWidth: 180 },
|
||||||
{
|
{
|
||||||
title: '操作',
|
title: '操作',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
@@ -243,12 +252,12 @@ tableStore.table.params.eventType = ''
|
|||||||
tableStore.table.params.location = ''
|
tableStore.table.params.location = ''
|
||||||
provide('tableStore', tableStore)
|
provide('tableStore', tableStore)
|
||||||
const deviceTypeChange = (val: any, obj: any) => {
|
const deviceTypeChange = (val: any, obj: any) => {
|
||||||
flag.value = true
|
flag.value = true
|
||||||
nodeClick(obj)
|
nodeClick(obj)
|
||||||
}
|
}
|
||||||
const nodeClick = async (e: anyObj) => {
|
const nodeClick = async (e: anyObj) => {
|
||||||
// console.log("🚀 ~ nodeClick ~ e:", e)
|
// console.log("🚀 ~ nodeClick ~ e:", e)
|
||||||
if (e.level == 2&& flag.value) {
|
if (e.level == 2 && flag.value) {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
tableStore.table.params.deviceId = e.id
|
tableStore.table.params.deviceId = e.id
|
||||||
nextTick(() => {
|
nextTick(() => {
|
||||||
|
|||||||
@@ -12,7 +12,7 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table ref="tableRef" />
|
<Table ref="tableRef" :height="`calc(45vh - 50px)`"/>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
<popup ref="detailRef"></popup>
|
<popup ref="detailRef"></popup>
|
||||||
<!-- 离线数据导入组件 -->
|
<!-- 离线数据导入组件 -->
|
||||||
|
|||||||
@@ -498,9 +498,9 @@ const range = (start: any, end: any, step: any) => {
|
|||||||
const colors = ['#DAA520', '#2E8B57', '#A52a2a']
|
const colors = ['#DAA520', '#2E8B57', '#A52a2a']
|
||||||
const lineStyle = [{ type: 'solid' }, { type: 'dashed' }, { type: 'dotted' }]
|
const lineStyle = [{ type: 'solid' }, { type: 'dashed' }, { type: 'dotted' }]
|
||||||
|
|
||||||
const titleList: any = ref('')
|
const titleList: any = ref('(未绑定数据)')
|
||||||
const init = (flag: boolean) => {
|
const init = (flag: boolean) => {
|
||||||
titleList.value = ''
|
titleList.value = '(未绑定数据)'
|
||||||
let list: any = []
|
let list: any = []
|
||||||
|
|
||||||
//颜色数组
|
//颜色数组
|
||||||
@@ -574,6 +574,8 @@ const init = (flag: boolean) => {
|
|||||||
}).then(res => {
|
}).then(res => {
|
||||||
if (res.data.length == 0) {
|
if (res.data.length == 0) {
|
||||||
titleList.value = '(未绑定数据)'
|
titleList.value = '(未绑定数据)'
|
||||||
|
}else{
|
||||||
|
titleList.value = ''
|
||||||
}
|
}
|
||||||
chartTitle.value = chartTitle.value + titleList.value
|
chartTitle.value = chartTitle.value + titleList.value
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -23,7 +23,7 @@ const tableStore = new TableStore({
|
|||||||
{ title: '用户名称', field: 'userName', align: 'center', minWidth: '130' },
|
{ title: '用户名称', field: 'userName', align: 'center', minWidth: '130' },
|
||||||
{ title: '更新时间', field: 'updateTime', align: 'center', sortable: true, minWidth: '150' },
|
{ title: '更新时间', field: 'updateTime', align: 'center', sortable: true, minWidth: '150' },
|
||||||
{ title: '失败原因', field: 'failReason', align: 'center', minWidth: '200' },
|
{ title: '失败原因', field: 'failReason', align: 'center', minWidth: '200' },
|
||||||
{ title: '状态', field: 'result', align: 'center', minWidth: '120' },
|
{ title: '状态', field: 'result', align: 'center', minWidth: '100' },
|
||||||
{ title: '登录名', field: 'loginName', align: 'center', minWidth: '120' }
|
{ title: '登录名', field: 'loginName', align: 'center', minWidth: '120' }
|
||||||
],
|
],
|
||||||
|
|
||||||
|
|||||||
@@ -3,19 +3,34 @@
|
|||||||
<TableHeader ref="tableHeaderRef">
|
<TableHeader ref="tableHeaderRef">
|
||||||
<template #select>
|
<template #select>
|
||||||
<el-form-item label="模版名称">
|
<el-form-item label="模版名称">
|
||||||
<el-input maxlength="32" show-word-limit v-model.trim="tableStore.table.params.name" clearable
|
<el-input
|
||||||
placeholder="请输入名称"></el-input>
|
maxlength="32"
|
||||||
|
show-word-limit
|
||||||
|
v-model.trim="tableStore.table.params.name"
|
||||||
|
clearable
|
||||||
|
placeholder="请输入名称"
|
||||||
|
></el-input>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="装置型号">
|
<el-form-item label="装置型号">
|
||||||
<el-select v-model.trim="tableStore.table.params.devType" placeholder="请选择" clearable>
|
<el-select v-model.trim="tableStore.table.params.devType" placeholder="请选择" clearable>
|
||||||
<el-option v-for="item in DevTypeOptions" :key="item.id" :label="item.name"
|
<el-option
|
||||||
:value="item.id"></el-option>
|
v-for="item in DevTypeOptions"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</template>
|
</template>
|
||||||
<template #operation>
|
<template #operation>
|
||||||
<el-upload action="" class="upload-demo" :show-file-list="false" :auto-upload="false"
|
<el-upload
|
||||||
:on-change="chooseFile">
|
action=""
|
||||||
|
class="upload-demo"
|
||||||
|
:accept="'.json'"
|
||||||
|
:show-file-list="false"
|
||||||
|
:auto-upload="false"
|
||||||
|
:on-change="chooseFile"
|
||||||
|
>
|
||||||
<el-button :icon="Plus" type="primary" class="ml10">新增模版</el-button>
|
<el-button :icon="Plus" type="primary" class="ml10">新增模版</el-button>
|
||||||
</el-upload>
|
</el-upload>
|
||||||
</template>
|
</template>
|
||||||
@@ -33,7 +48,7 @@ import { queryByCode, queryByid } from '@/api/system-boot/dictTree'
|
|||||||
import { Plus } from '@element-plus/icons-vue'
|
import { Plus } from '@element-plus/icons-vue'
|
||||||
import { addDevModel } from '@/api/access-boot/analyzeModel'
|
import { addDevModel } from '@/api/access-boot/analyzeModel'
|
||||||
import { AuditDevModel } from '@/api/cs-device-boot/devmodel'
|
import { AuditDevModel } from '@/api/cs-device-boot/devmodel'
|
||||||
|
import { getFileUrl, downLoadFile } from '@/api/cs-system-boot/manage'
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/manage/basic/template'
|
name: 'govern/manage/basic/template'
|
||||||
})
|
})
|
||||||
@@ -58,6 +73,16 @@ const tableStore = new TableStore({
|
|||||||
width: '180',
|
width: '180',
|
||||||
render: 'buttons',
|
render: 'buttons',
|
||||||
buttons: [
|
buttons: [
|
||||||
|
{
|
||||||
|
name: 'productSetting',
|
||||||
|
title: '下载模版',
|
||||||
|
type: 'primary',
|
||||||
|
icon: 'el-icon-EditPen',
|
||||||
|
render: 'basicButton',
|
||||||
|
click: row => {
|
||||||
|
downloadTheReport(row.filePath,row.devTypeName)
|
||||||
|
}
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: 'del',
|
name: 'del',
|
||||||
title: '删除',
|
title: '删除',
|
||||||
@@ -94,14 +119,31 @@ const loading = ref(false)
|
|||||||
const chooseFile = (e: any) => {
|
const chooseFile = (e: any) => {
|
||||||
console.warn(e)
|
console.warn(e)
|
||||||
loading.value = true
|
loading.value = true
|
||||||
addDevModel(e.raw).then((res: any) => {
|
addDevModel(e.raw)
|
||||||
if (res.code == 'A0000') {
|
.then((res: any) => {
|
||||||
|
if (res.code == 'A0000') {
|
||||||
|
loading.value = false
|
||||||
|
tableStore.index()
|
||||||
|
}
|
||||||
|
})
|
||||||
|
.catch(e => {
|
||||||
loading.value = false
|
loading.value = false
|
||||||
tableStore.index()
|
})
|
||||||
}
|
}
|
||||||
|
// 下载报告
|
||||||
}).catch((e) => {
|
const downloadTheReport = (filePath: string,name:string) => {
|
||||||
loading.value = false
|
downLoadFile(filePath).then(res => {
|
||||||
|
let blob = new Blob([res], {
|
||||||
|
type: ' application/json'
|
||||||
|
})
|
||||||
|
const url = window.URL.createObjectURL(blob)
|
||||||
|
const link = document.createElement('a') // 创建a标签
|
||||||
|
link.href = url
|
||||||
|
link.download = name+'.json' // 设置下载的文件名
|
||||||
|
document.body.appendChild(link)
|
||||||
|
link.click() //执行下载
|
||||||
|
document.body.removeChild(link)
|
||||||
|
ElMessage.success('下载成功')
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -128,7 +128,7 @@ defineOptions({
|
|||||||
const adminInfo = useAdminInfo()
|
const adminInfo = useAdminInfo()
|
||||||
|
|
||||||
const hasAdmin =
|
const hasAdmin =
|
||||||
adminInfo.userType.some(item => item.includes('operation_manager') || item.includes('root')) ||
|
adminInfo.roleCode.some(item => item.includes('operation_manager') || item.includes('root')) ||
|
||||||
adminInfo.userType == 1
|
adminInfo.userType == 1
|
||||||
const tableRef = ref()
|
const tableRef = ref()
|
||||||
const popupRef = ref()
|
const popupRef = ref()
|
||||||
|
|||||||
@@ -112,7 +112,7 @@ const choose = (files: any) => {
|
|||||||
const isJPEG = files.raw.type === 'image/jpeg'
|
const isJPEG = files.raw.type === 'image/jpeg'
|
||||||
const isPNG = files.raw.type === 'image/png'
|
const isPNG = files.raw.type === 'image/png'
|
||||||
if (!isJPG && !isPNG && !isJPEG) {
|
if (!isJPG && !isPNG && !isJPEG) {
|
||||||
ElMessage.warning('上传文件只能是 JPG/PNG 格式!')
|
ElMessage.warning('上传文件只能是 jpg/png 格式!')
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -150,7 +150,7 @@ onMounted(() => {
|
|||||||
// })
|
// })
|
||||||
|
|
||||||
const stencil = (val: any) => {
|
const stencil = (val: any) => {
|
||||||
templatePolicy.value = val.filter((item: any) => item.name != '稳态治理报表')
|
templatePolicy.value = val.filter((item: any) => item.reportForm != '4')
|
||||||
Template.value = templatePolicy.value[0]
|
Template.value = templatePolicy.value[0]
|
||||||
reportForm.value = templatePolicy.value[0]?.reportForm
|
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -174,7 +174,7 @@ const initListByIds = () => {
|
|||||||
}
|
}
|
||||||
const stencil = (val: any) => {
|
const stencil = (val: any) => {
|
||||||
console.log('🚀 ~ stencil ~ val:', val)
|
console.log('🚀 ~ stencil ~ val:', val)
|
||||||
templatePolicy.value = val.filter((item: any) => item.name == '稳态治理报表')
|
templatePolicy.value = val.filter((item: any) => item.reportForm == '4')
|
||||||
Template.value = templatePolicy.value[0]
|
Template.value = templatePolicy.value[0]
|
||||||
reportForm.value = templatePolicy.value[0]?.reportForm
|
reportForm.value = templatePolicy.value[0]?.reportForm
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<el-dialog draggable :title="title" v-model.trim="formVisible" width="30%" :before-close="closeDialog">
|
<el-dialog draggable :title="title" v-model.trim="formVisible" width="500px" :before-close="closeDialog">
|
||||||
<el-form :model="formdata" label-width="100px" :rules="rules" ref="ruleForm">
|
<el-form :model="formdata" label-width="100px" :rules="rules" ref="ruleForm" class="form-one">
|
||||||
<el-form-item label="模板名称:" prop="name">
|
<el-form-item label="模板名称:" prop="name">
|
||||||
<el-input maxlength="32" show-word-limit placeholder="模板名称" v-model.trim="formdata.name"
|
<el-input maxlength="32" show-word-limit placeholder="模板名称" v-model.trim="formdata.name"
|
||||||
style="width: 100%"></el-input>
|
style="width: 100%"></el-input>
|
||||||
@@ -56,11 +56,15 @@ const reportFormList = [
|
|||||||
{
|
{
|
||||||
value: '2',
|
value: '2',
|
||||||
label: '统计报表'
|
label: '统计报表'
|
||||||
|
}, {
|
||||||
|
value: '4',
|
||||||
|
label: '治理前后对比报表'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
value: '3',
|
value: '3',
|
||||||
label: '自定义报表'
|
label: '自定义报表'
|
||||||
}
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
const rules = {
|
const rules = {
|
||||||
name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
|
name: [{ required: true, message: '请输入模板名称', trigger: 'blur' }],
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ const tableStore: any = new TableStore({
|
|||||||
column: [
|
column: [
|
||||||
{ field: 'name', title: '模板名称' },
|
{ field: 'name', title: '模板名称' },
|
||||||
{ field: 'reportForm', title: '模板类型',formatter: (row) => {
|
{ field: 'reportForm', title: '模板类型',formatter: (row) => {
|
||||||
return row.cellValue == 1 ? '电能质量报表类型' : row.cellValue == 2 ? '用能报表类型' : ''
|
return row.cellValue == 1 ? '分析报表' : row.cellValue == 2 ? '统计报表' : row.cellValue == 3 ? '自定义报表' : '治理前后对比报表'
|
||||||
} },
|
} },
|
||||||
{ field: 'updateBy', title: '更新用户' },
|
{ field: 'updateBy', title: '更新用户' },
|
||||||
{ field: 'createTime', title: '创建时间' , sortable: true},
|
{ field: 'createTime', title: '创建时间' , sortable: true},
|
||||||
|
|||||||
@@ -31,7 +31,6 @@
|
|||||||
</template>
|
</template>
|
||||||
<template v-slot:operation>
|
<template v-slot:operation>
|
||||||
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增</el-button>
|
<el-button type="primary" class="ml10" @click="add" icon="el-icon-Plus">新增</el-button>
|
||||||
|
|
||||||
</template>
|
</template>
|
||||||
</TableHeader>
|
</TableHeader>
|
||||||
<Table
|
<Table
|
||||||
@@ -71,7 +70,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div>
|
<div>
|
||||||
<template v-if="data.id">
|
<template v-if="data.id">
|
||||||
<el-tooltip content="编辑" placement="top">
|
<el-tooltip content="编辑" placement="left">
|
||||||
<el-button
|
<el-button
|
||||||
style="margin-left: 4px"
|
style="margin-left: 4px"
|
||||||
icon="el-icon-Edit"
|
icon="el-icon-Edit"
|
||||||
@@ -82,16 +81,15 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</template>
|
</template>
|
||||||
<template v-else>
|
<template v-else>
|
||||||
<el-popconfirm title="确定重启吗?" placement="bottom" @confirm="restart(data)">
|
<el-popconfirm title="确定重启吗?" placement="left" @confirm="restart(data)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-tooltip content="重启" placement="top">
|
<el-button
|
||||||
<el-button
|
style="margin-left: 4px"
|
||||||
style="margin-left: 4px"
|
icon="el-icon-Refresh"
|
||||||
icon="el-icon-Refresh"
|
type="warning"
|
||||||
type="warning"
|
link
|
||||||
link
|
@click.stop
|
||||||
/>
|
/>
|
||||||
</el-tooltip>
|
|
||||||
</template>
|
</template>
|
||||||
<template #actions="{ confirm, cancel }">
|
<template #actions="{ confirm, cancel }">
|
||||||
<el-button size="small" @click="cancel">取消</el-button>
|
<el-button size="small" @click="cancel">取消</el-button>
|
||||||
@@ -179,12 +177,17 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
|
|
||||||
<!-- 绑定进程号 -->
|
<!-- 绑定进程号 -->
|
||||||
<el-dialog draggable title="绑定进程号" v-model="popUps" :close-on-click-modal="false" width="400px">
|
<el-dialog draggable title="绑定进程号" v-model="popUps" :close-on-click-modal="false" width="400px">
|
||||||
<el-form :model="bindProcessForm" ref="bindProcessFormRef" label-width="80px" :rules="rules2" >
|
<el-form :model="bindProcessForm" ref="bindProcessFormRef" label-width="80px" :rules="rules2">
|
||||||
<el-form-item label="前置机" prop="nodeId">
|
<el-form-item label="前置机" prop="nodeId">
|
||||||
<el-select v-model="bindProcessForm.nodeId" placeholder="请选择前置机" style="width: 100%" clearable @change="handleNodeChange">
|
<el-select
|
||||||
|
v-model="bindProcessForm.nodeId"
|
||||||
|
placeholder="请选择前置机"
|
||||||
|
style="width: 100%"
|
||||||
|
clearable
|
||||||
|
@change="handleNodeChange"
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in tableStore.table.data"
|
v-for="item in tableStore.table.data"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
@@ -195,7 +198,12 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<el-form-item label="进程号" prop="processNo">
|
<el-form-item label="进程号" prop="processNo">
|
||||||
<el-select v-model="bindProcessForm.processNo" placeholder="请选择进程号" style="width: 100%" clearable>
|
<el-select
|
||||||
|
v-model="bindProcessForm.processNo"
|
||||||
|
placeholder="请选择进程号"
|
||||||
|
style="width: 100%"
|
||||||
|
clearable
|
||||||
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in processOptions"
|
v-for="item in processOptions"
|
||||||
:key="item.name"
|
:key="item.name"
|
||||||
@@ -211,7 +219,6 @@
|
|||||||
<el-button type="primary" @click="bindTheProcess">确 定</el-button>
|
<el-button type="primary" @click="bindTheProcess">确 定</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
<script setup lang="ts">
|
<script setup lang="ts">
|
||||||
@@ -222,7 +229,14 @@ import { ref, onMounted, provide, reactive, nextTick } from 'vue'
|
|||||||
import Table from '@/components/table/index.vue'
|
import Table from '@/components/table/index.vue'
|
||||||
import TableHeader from '@/components/table/header/index.vue'
|
import TableHeader from '@/components/table/header/index.vue'
|
||||||
import { ElButton } from 'element-plus'
|
import { ElButton } from 'element-plus'
|
||||||
import {addNode,updateNode,delNode,nodeDeviceTree,restartProcess,updateProcess} from '@/api/cs-device-boot/frontManagement'
|
import {
|
||||||
|
addNode,
|
||||||
|
updateNode,
|
||||||
|
delNode,
|
||||||
|
nodeDeviceTree,
|
||||||
|
restartProcess,
|
||||||
|
updateProcess
|
||||||
|
} from '@/api/cs-device-boot/frontManagement'
|
||||||
|
|
||||||
defineOptions({
|
defineOptions({
|
||||||
name: 'govern/setting/frontManagement'
|
name: 'govern/setting/frontManagement'
|
||||||
@@ -427,7 +441,6 @@ const currentChangeEvent = () => {
|
|||||||
|
|
||||||
// 重启进程
|
// 重启进程
|
||||||
const restart = (data: any) => {
|
const restart = (data: any) => {
|
||||||
|
|
||||||
restartProcess({
|
restartProcess({
|
||||||
nodeId: nodeId.value,
|
nodeId: nodeId.value,
|
||||||
processNo: data.processNo
|
processNo: data.processNo
|
||||||
@@ -442,11 +455,10 @@ const change = (val: any) => {
|
|||||||
treeRef.value!.filter(filterText.value)
|
treeRef.value!.filter(filterText.value)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 修改 edit 方法
|
// 修改 edit 方法
|
||||||
const edit = (data: any) => {
|
const edit = (data: any) => {
|
||||||
bindProcessForm.value.processNo = data.nodeProcess
|
bindProcessForm.value.processNo = data.nodeProcess
|
||||||
bindProcessForm.value.nodeId = nodeId.value // 默认选中当前节点
|
bindProcessForm.value.nodeId = nodeId.value // 默认选中当前节点
|
||||||
processId.value = data.id
|
processId.value = data.id
|
||||||
popUps.value = true
|
popUps.value = true
|
||||||
|
|
||||||
@@ -466,7 +478,6 @@ const loadProcessOptionsForNode = (nodeId: string) => {
|
|||||||
} else {
|
} else {
|
||||||
processOptions.value = []
|
processOptions.value = []
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -477,13 +488,12 @@ const handleNodeChange = (nodeId: any) => {
|
|||||||
bindProcessForm.value.processNo = ''
|
bindProcessForm.value.processNo = ''
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
// 清除之前选中的进程号
|
// 清除之前选中的进程号
|
||||||
bindProcessForm.value.processNo = ''
|
bindProcessForm.value.processNo = ''
|
||||||
// 加载新选中前置机的进程号选项
|
// 加载新选中前置机的进程号选项
|
||||||
loadProcessOptionsForNode(nodeId)
|
loadProcessOptionsForNode(nodeId)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// 更新进程号
|
// 更新进程号
|
||||||
const bindTheProcess = () => {
|
const bindTheProcess = () => {
|
||||||
bindProcessFormRef.value.validate((valid: any) => {
|
bindProcessFormRef.value.validate((valid: any) => {
|
||||||
@@ -499,8 +509,6 @@ const bindTheProcess = () => {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const filterNode = (value: string, data: any, node: any) => {
|
const filterNode = (value: string, data: any, node: any) => {
|
||||||
if (!value) return true
|
if (!value) return true
|
||||||
@@ -537,7 +545,6 @@ const chooseNode = (value: string, data: any, node: any) => {
|
|||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
tableStore.table.params.orderBy = 'desc'
|
tableStore.table.params.orderBy = 'desc'
|
||||||
tableStore.table.params.nodeGrade = ''
|
tableStore.table.params.nodeGrade = ''
|
||||||
tableStore.table.params.searchState = ''
|
tableStore.table.params.searchState = ''
|
||||||
@@ -591,8 +598,6 @@ onMounted(() => {
|
|||||||
tableStore.index()
|
tableStore.index()
|
||||||
}, 100)
|
}, 100)
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss" scoped>
|
<style lang="scss" scoped>
|
||||||
@@ -623,7 +628,6 @@ onMounted(() => {
|
|||||||
}
|
}
|
||||||
:deep(.default) {
|
:deep(.default) {
|
||||||
display: flex;
|
display: flex;
|
||||||
|
|
||||||
}
|
}
|
||||||
.custom-tree-node {
|
.custom-tree-node {
|
||||||
flex: 1;
|
flex: 1;
|
||||||
|
|||||||
Reference in New Issue
Block a user