修改 bug

This commit is contained in:
GGJ
2024-09-25 16:36:53 +08:00
parent 470c8f5bd6
commit cb8e49646d
11 changed files with 246 additions and 205 deletions

View File

@@ -76,6 +76,7 @@ const rankOptions = ref([
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/zl-event-boot/csDevErrEvt/list', url: '/zl-event-boot/csDevErrEvt/list',
method: 'POST', method: 'POST',
publicHeight: 65,
column: [ column: [
{ title: '设备名称', field: 'ndid', align: 'center' }, { title: '设备名称', field: 'ndid', align: 'center' },
{ title: '告警代码', field: 'code', align: 'center' }, { title: '告警代码', field: 'code', align: 'center' },
@@ -95,6 +96,7 @@ tableStore.table.params.eventIds = []
tableStore.table.params.status = '' tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.searchValue = ''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[0] || '' tableStore.table.params.engineeringid = e[0] || ''
@@ -108,6 +110,6 @@ onMounted(() => {
setTimeout(() => { setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any tableStore.table.height = mainHeight(200).height as any
}, 0) }, 0)
const addMenu = () => {} const addMenu = () => { }
</script> </script>
<style></style> <style></style>

View File

@@ -3,6 +3,7 @@
<template v-slot:select> <template v-slot:select>
<el-form-item label="数据来源"> <el-form-item label="数据来源">
<el-cascader <el-cascader
v-model="tableStore.table.params.cascader"
placeholder="请选择数据来源" placeholder="请选择数据来源"
@change="sourceChange" @change="sourceChange"
:options="props.deviceTree" :options="props.deviceTree"
@@ -25,7 +26,7 @@
</template> </template>
</TableHeader> </TableHeader>
<!-- <div style="height: 300px;"> --> <!-- <div style="height: 300px;"> -->
<Table ref="tableRef" :isGroup="true" /> <Table ref="tableRef" :isGroup="true"/>
<!-- </div> --> <!-- </div> -->
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
@@ -71,6 +72,7 @@ const rankOptions = ref([
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/cs-harmonic-boot/eventUser/queryEventpage', url: '/cs-harmonic-boot/eventUser/queryEventpage',
method: 'POST', method: 'POST',
publicHeight:65,
column: [ column: [
{ title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' },
@@ -85,6 +87,8 @@ provide('tableStore', tableStore)
// "target": [], // "target": [],
// "type": "", // "type": "",
// "userId": "" // "userId": ""
tableStore.table.params.cascader = ''
tableStore.table.params.level=''
tableStore.table.params.engineeringid = '' tableStore.table.params.engineeringid = ''
tableStore.table.params.projectId = '' tableStore.table.params.projectId = ''
tableStore.table.params.deviceId = '' tableStore.table.params.deviceId = ''
@@ -94,6 +98,7 @@ tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[0] || '' tableStore.table.params.engineeringid = e[0] || ''
tableStore.table.params.projectId = e[1] || '' tableStore.table.params.projectId = e[1] || ''
@@ -104,7 +109,7 @@ onMounted(() => {
tableStore.index() tableStore.index()
}) })
setTimeout(() => { setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any // tableStore.table.height = mainHeight(200).height as any
}, 0) }, 0)
const addMenu = () => {} const addMenu = () => {}
</script> </script>

View File

@@ -3,6 +3,7 @@
<template v-slot:select> <template v-slot:select>
<el-form-item label="数据来源"> <el-form-item label="数据来源">
<el-cascader <el-cascader
v-model="tableStore.table.params.cascader"
placeholder="请选择数据来源" placeholder="请选择数据来源"
@change="sourceChange" @change="sourceChange"
:options="props.deviceTree" :options="props.deviceTree"
@@ -71,6 +72,7 @@ const rankOptions = ref([
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/cs-harmonic-boot/eventUser/queryEventpage', url: '/cs-harmonic-boot/eventUser/queryEventpage',
method: 'POST', method: 'POST',
publicHeight:65,
column: [ column: [
{ title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' },
@@ -92,6 +94,8 @@ tableStore.table.params.eventIds = []
tableStore.table.params.status = '' tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.cascader = ''
tableStore.table.params.level=''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[0] || '' tableStore.table.params.engineeringid = e[0] || ''

View File

@@ -3,24 +3,15 @@
<TableHeader datePicker> <TableHeader datePicker>
<template v-slot:select> <template v-slot:select>
<el-form-item label="数据来源"> <el-form-item label="数据来源">
<el-cascader <el-cascader placeholder="请选择数据来源" @change="sourceChange" v-model="tableStore.table.params.cascader"
placeholder="请选择数据来源" :options="props.deviceTree" :show-all-levels="false" :props="{ checkStrictly: true }"
@change="sourceChange" clearable></el-cascader>
:options="props.deviceTree"
:show-all-levels="false"
:props="{ checkStrictly: true }"
clearable
></el-cascader>
<!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> --> <!-- <el-input v-model="tableStore.table.params.searchValue" placeholder="请输入设备名称" /> -->
</el-form-item> </el-form-item>
<el-form-item label="级别"> <el-form-item label="级别">
<el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable> <el-select v-model="tableStore.table.params.level" placeholder="请选择级别" clearable>
<el-option <el-option v-for="item in rankOptions" :key="item.value" :label="item.label"
v-for="item in rankOptions" :value="item.value"></el-option>
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</template> </template>
@@ -31,55 +22,32 @@
<div style="padding: 10px" v-if="!view"> <div style="padding: 10px" v-if="!view">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<span v-if="view2" style="font-size: 14px; font-weight: ; line-height: 30px">值类型选择:</span> <div v-if="view2" style="display: flex">
<el-select v-if="view2" @change="changeView" v-model="value" placeholder="请选择值类型"> <span style="font-size: 14px; line-height: 30px">值类型选择:</span>
<el-option <el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
v-for="item in options" <el-option v-for="item in options" :key="item.value" :label="item.label"
:key="item.value" :value="item.value"></el-option>
:label="item.label" </el-select>
:value="item.value" </div>
></el-option>
</el-select>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button <el-button v-if="view2" @click="backbxlb" type="primary" class="el-icon-refresh-right"
v-if="view2" icon="el-icon-Back" style="float: right">
@click="backbxlb"
type="primary"
class="el-icon-refresh-right"
icon="el-icon-CloseBold"
style="float: right"
>
返回 返回
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick"> <el-tabs v-if="view2" v-model="bxactiveName" @tab-click="bxhandleClick">
<el-tab-pane <el-tab-pane label="瞬时波形" name="ssbx" class="boxbx pt10 pb10"
label="瞬时波形" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
name="ssbx" <shushiboxi v-if="bxactiveName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
class="boxbx pt10 pb10" </shushiboxi>
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<shushiboxi
v-if="bxactiveName == 'ssbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></shushiboxi>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="RMS波形" class="boxbx pt10 pb10" name="rmsbx"
label="RMS波形" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
class="boxbx pt10 pb10" <rmsboxi v-if="bxactiveName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
name="rmsbx" </rmsboxi>
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<rmsboxi
v-if="bxactiveName == 'rmsbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></rmsboxi>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> --> <!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
@@ -133,6 +101,7 @@ const rankOptions = ref([
const tableStore = new TableStore({ const tableStore = new TableStore({
url: '/cs-harmonic-boot/eventUser/queryEventpage', url: '/cs-harmonic-boot/eventUser/queryEventpage',
method: 'POST', method: 'POST',
publicHeight: 65,
column: [ column: [
{ title: '工程名称', field: 'engineeringName', align: 'center' }, { title: '工程名称', field: 'engineeringName', align: 'center' },
{ title: '项目名称', field: 'projectName', align: 'center' }, { title: '项目名称', field: 'projectName', align: 'center' },
@@ -174,6 +143,18 @@ const tableStore = new TableStore({
row.loading = false row.loading = false
}) })
} }
},
{
name: 'edit',
text: '暂无波形',
type: 'info',
icon: 'el-icon-DataLine',
render: 'basicButton',
disabled: row => {
return !(!row.wavePath && row.evtParamTm < 20)
},
} }
] ]
} }
@@ -198,6 +179,8 @@ tableStore.table.params.eventIds = []
tableStore.table.params.status = '' tableStore.table.params.status = ''
tableStore.table.params.target = [] tableStore.table.params.target = []
tableStore.table.params.userId = '' tableStore.table.params.userId = ''
tableStore.table.params.cascader = ''
tableStore.table.params.level=''
const sourceChange = (e: any) => { const sourceChange = (e: any) => {
tableStore.table.params.engineeringid = e[0] || '' tableStore.table.params.engineeringid = e[0] || ''
@@ -244,6 +227,6 @@ setTimeout(() => {
tableStore.table.height = mainHeight(200).height as any tableStore.table.height = mainHeight(200).height as any
}, 0) }, 0)
const addMenu = () => {} const addMenu = () => { }
</script> </script>
<style scoped lang="scss"></style> <style scoped lang="scss"></style>

View File

@@ -5,22 +5,14 @@
<el-form :inline="true"> <el-form :inline="true">
<el-form-item label="统计指标:"> <el-form-item label="统计指标:">
<el-select v-model="formInline.statisticalId" filterable placeholder="请选择"> <el-select v-model="formInline.statisticalId" filterable placeholder="请选择">
<el-option <el-option v-for="item in zblist" :key="item.value" :label="item.label"
v-for="item in zblist" :value="item.value"></el-option>
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="值类型:"> <el-form-item label="值类型:">
<el-select v-model="formInline.valueType" filterable placeholder="请选择"> <el-select v-model="formInline.valueType" filterable placeholder="请选择">
<el-option <el-option v-for="item in typelist" :key="item.value" :label="item.label"
v-for="item in typelist" :value="item.value"></el-option>
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="时间:"> <el-form-item label="时间:">
@@ -248,8 +240,10 @@ const search = () => {
{ {
name: '畸变率:(%)', name: '畸变率:(%)',
type: 'value', type: 'value',
max: 10, // max: 10,
min: 0, min: 0,
minInterval: 1,
// interval: 1,
axisLine: { axisLine: {
show: true, show: true,
//symbol: ["none", "arrow"], //symbol: ["none", "arrow"],
@@ -262,15 +256,20 @@ const search = () => {
name: '电流:(A)', name: '电流:(A)',
type: 'value', type: 'value',
min: 0, min: 0,
minInterval: 1, //分割刻度
// 寻找data最大值 // 寻找data最大值
// interval: 1,
max: max:
series[0].data.reduce((a, b) => Math.max(a, b)) > devCapacity.value series[0].data.reduce((a, b) => Math.max(a, b)) > devCapacity.value
? series[0].data.reduce((a, b) => Math.max(a, b)) ? series[0].data.reduce((a, b) => Math.max(a, b))
: devCapacity.value + devCapacity.value * 0.5, : devCapacity.value + devCapacity.value * 0.5,
interval: // interval:
(series[0].data.reduce((a, b) => Math.max(a, b)) > devCapacity.value // (series[0].data.reduce((a, b) => Math.max(a, b)) > devCapacity.value
? series[0].data.reduce((a, b) => Math.max(a, b)) // ? series[0].data.reduce((a, b) => Math.max(a, b)).toFixed(0)
: devCapacity.value) / 10, // : (devCapacity.value) / 10).toFixed(0),
splitLine: {
show: false,
},
axisLine: { axisLine: {
show: true, show: true,
//symbol: ["none", "arrow"], //symbol: ["none", "arrow"],
@@ -287,8 +286,11 @@ const search = () => {
} else { } else {
echartsData.value = null echartsData.value = null
} }
loading.value = false
}) })
setTimeout(() => {
loading.value = false
}, 0)
} }
</script> </script>

View File

@@ -10,56 +10,32 @@
<div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view"> <div :style="{ height: pageHeight.height }" style="padding: 10px; overflow: hidden" v-if="!view">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<span v-if="view2" style="font-size: 14px; font-weight: ; line-height: 30px">值类型选择:</span> <div v-if="view2" style="display: flex">
<el-select v-if="view2" @change="changeView" v-model="value" placeholder="请选择值类型"> <span style="font-size: 14px; line-height: 30px">值类型选择:</span>
<el-option <el-select @change="changeView" style="width: 240px" v-model="value" placeholder="请选择值类型">
v-for="item in options" <el-option v-for="item in options" :key="item.value" :label="item.label"
:key="item.value" :value="item.value"></el-option>
:label="item.label" </el-select>
:value="item.value" </div>
></el-option>
</el-select>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
<el-button <el-button v-if="view2" @click="backbxlb" type="primary" class="el-icon-refresh-right"
v-if="view2" icon="el-icon-Back" style="float: right">
@click="backbxlb"
type="primary"
class="el-icon-refresh-right"
icon="el-icon-CloseBold"
style="float: right"
>
返回 返回
</el-button> </el-button>
</el-col> </el-col>
</el-row> </el-row>
<el-tabs v-if="view2" class="default-main" v-model="bxactiveName" @tab-click="bxhandleClick"> <el-tabs v-if="view2" class="default-main" v-model="bxactiveName" @tab-click="bxhandleClick">
<el-tab-pane <el-tab-pane label="瞬时波形" name="ssbx" class="boxbx pt10 pb10"
label="瞬时波形" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
name="ssbx" <shushiboxi v-if="bxactiveName == 'ssbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
class="boxbx pt10 pb10" </shushiboxi>
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<shushiboxi
v-if="bxactiveName == 'ssbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></shushiboxi>
</el-tab-pane> </el-tab-pane>
<el-tab-pane <el-tab-pane label="RMS波形" class="boxbx pt10 pb10" name="rmsbx"
label="RMS波形" :style="'height:' + bxecharts + ';overflow-y: scroll;'">
class="boxbx pt10 pb10" <rmsboxi v-if="bxactiveName == 'rmsbx' && showBoxi" :value="value" :boxoList="boxoList" :wp="wp">
name="rmsbx" </rmsboxi>
:style="'height:' + bxecharts + ';overflow-y: scroll;'"
>
<rmsboxi
v-if="bxactiveName == 'rmsbx' && showBoxi"
:value="value"
:boxoList="boxoList"
:wp="wp"
></rmsboxi>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> --> <!-- <xiebofenxi ref="child" :bxshuju="bxshuju" @backfh="back"></xiebofenxi> -->
@@ -139,6 +115,18 @@ const tableStore = new TableStore({
row.loading = false row.loading = false
}) })
} }
},
{
name: 'edit',
text: '暂无波形',
type: 'info',
icon: 'el-icon-DataLine',
render: 'basicButton',
disabled: row => {
return !(!row.wavePath && row.evtParamTm < 20)
},
} }
] ]
} }

View File

@@ -0,0 +1,39 @@
<!-- CustomInputRenderer.vue -->
<template>
<el-input
ref="inputRef"
v-model="inputValue"
type="password"
placeholder="请输入密码"
autocomplete="new-password"
/>
</template>
<script setup>
import { ref, onMounted } from 'vue';
const props = defineProps({
value: {
type: String,
default: ''
}
});
const emit = defineEmits(['update:value']);
const inputValue = ref(props.value);
onMounted(() => {
emit('update:value', inputValue.value);
});
const inputRef = ref(null);
function getInputValue() {
return inputValue.value;
}
defineExpose({
getInputValue
});
</script>

View File

@@ -7,13 +7,11 @@
<div class="main_right" v-loading="loading"> <div class="main_right" v-loading="loading">
<div class="right_nav"> <div class="right_nav">
<div class="menu" v-if="activePathList.length != 0"> <div class="menu" v-if="activePathList.length != 0">
<el-breadcrumb :separator-icon="ArrowRight">
<el-breadcrumb-item <el-breadcrumb separator="/">
v-for="(item, index) in activePathList" <el-breadcrumb-item v-for="(item, index) in activePathList" style="cursor: pointer" :key="index"
style="cursor: pointer" @click="handleIntoByPath(item)">
:key="index"
@click="handleIntoByPath(item)"
>
<span>{{ outPutPath(item, index) }}</span> <span>{{ outPutPath(item, index) }}</span>
</el-breadcrumb-item> </el-breadcrumb-item>
</el-breadcrumb> </el-breadcrumb>
@@ -24,28 +22,19 @@
</div> </div>
<div class="filter" v-if="activePathList.length != 0"> <div class="filter" v-if="activePathList.length != 0">
<el-input <el-input style="width: 200px; height: 32px" placeholder="请输入文件或文件夹名称" clearable
style="width: 200px; height: 32px" v-model="filterFileName"></el-input>
placeholder="请输入文件或文件夹名称"
clearable
v-model="filterFileName"
></el-input>
<el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button> <el-button type="primary" @click="handleSearch" :icon="Search">搜索</el-button>
<el-button @click="handleRefresh" :icon="Refresh">重置</el-button> <el-button @click="handleRefresh" :icon="Refresh">重置</el-button>
<el-upload <el-upload v-if="activePath != '/'" action="" :auto-upload="false" :show-file-list="false" :on-change="(file: any, fileList: any) => {
v-if="activePath != '/'" handleUpload(file, fileList, activePath)
action="" }
:auto-upload="false" ">
:show-file-list="false"
:on-change="
(file:any, fileList:any) => {
handleUpload(file, fileList, activePath)
}
"
>
<el-button> <el-button>
文件上传 文件上传
<el-icon class="el-icon--right"><Upload /></el-icon> <el-icon class="el-icon--right">
<Upload />
</el-icon>
</el-button> </el-button>
</el-upload> </el-upload>
<el-button @click="handleAddNewDir" v-if="activePath != '/'" type="primary" :icon="Plus"> <el-button @click="handleAddNewDir" v-if="activePath != '/'" type="primary" :icon="Plus">
@@ -62,17 +51,16 @@
<div class="list" v-if="dirList.length != 0 && !loading"> <div class="list" v-if="dirList.length != 0 && !loading">
<div class="list_item" v-for="(item, index) in dirList" :key="index"> <div class="list_item" v-for="(item, index) in dirList" :key="index">
<div class="item_download"> <div class="item_download">
<el-button <el-button v-if="activePath && activePath != '/'" type="danger" size="small"
v-if="activePath && activePath != '/'" @click="handleDelDirOrFile(item)" circle>
type="danger" <el-icon>
size="small" <Delete />
@click="handleDelDirOrFile(item)" </el-icon>
circle
>
<el-icon><Delete /></el-icon>
</el-button> </el-button>
<el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle> <el-button v-if="item?.type == 'file'" size="small" @click="handleDownLoad(item)" circle>
<el-icon><Download /></el-icon> <el-icon>
<Download />
</el-icon>
</el-button> </el-button>
<!-- <el-popconfirm <!-- <el-popconfirm
@@ -88,22 +76,18 @@
<el-icon><Delete /></el-icon> <el-icon><Delete /></el-icon>
</el-button> </el-button>
</template> </template>
</el-popconfirm> --> </el-popconfirm> -->
</div> </div>
<img v-if="item?.type == 'dir'" @click="handleIntoDir(item)" src="@/assets/img/wenjianjia.svg" /> <img v-if="item?.type == 'dir'" @click="handleIntoDir(item)" src="@/assets/img/wenjianjia.svg" />
<img <img class="img_file" @click="handleIntoDir(item)" v-if="item?.type == 'file'"
class="img_file" src="@/assets/img/wenjian.svg" />
@click="handleIntoDir(item)"
v-if="item?.type == 'file'"
src="@/assets/img/wenjian.svg"
/>
<span v-if="!item.type">暂无数据</span> <span v-if="!item.type">暂无数据</span>
<p> <p>
{{ {{
item && item &&
item?.prjDataPath && item?.prjDataPath &&
item?.prjDataPath.includes(activePath) && item?.prjDataPath.includes(activePath) &&
item?.prjDataPath.length > activePath.length item?.prjDataPath.length > activePath.length
? item?.prjDataPath.replace(activePath, ' ').replace('/', ' ') ? item?.prjDataPath.replace(activePath, ' ').replace('/', ' ')
: item?.prjDataPath.replace('/', ' ') : item?.prjDataPath.replace('/', ' ')
}} }}
@@ -113,20 +97,11 @@
<el-empty v-if="dirList.length === 0" /> <el-empty v-if="dirList.length === 0" />
</div> </div>
<popup ref="fileRef"></popup> <popup ref="fileRef"></popup>
<el-dialog <el-dialog v-model="addDeviceDirOpen" :destroy-on-close="true" title="新建文件夹目录" width="500" @closed="close">
v-model="addDeviceDirOpen" <el-form ref="formRef" :model="form"
:destroy-on-close="true" :rules="{ path: [{ required: true, message: '请输入文件夹名称', trigger: 'blur' }] }">
title="新建文件夹目录" <el-form-item label="文件夹名称" prop="path">
width="500" <el-input v-model="form.path" placeholder="请输入文件夹名称" />
@closed="close"
>
<el-form
ref="formRef"
:model="form"
:rules="{ path: [{ required: true, message: '请输入文件夹路径', trigger: 'blur' }] }"
>
<el-form-item label="文件夹路径" prop="path">
<el-input v-model="form.path" placeholder="请输入文件夹路径" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<template #footer> <template #footer>
@@ -184,7 +159,9 @@ const activePath = ref<string>('')
//判断是否是根目录 //判断是否是根目录
const isRoot = ref<boolean>(true) const isRoot = ref<boolean>(true)
//储存所有点击过的目录 //储存所有点击过的目录
const activePathList: any = ref([]) const activePathList: any = ref([
])
const nodeClick = (e: any) => { const nodeClick = (e: any) => {
if (e.level == 2) { if (e.level == 2) {
loading.value = true loading.value = true
@@ -235,14 +212,11 @@ const deviceRestartLoading = ref<boolean>(false)
const handleRestartDevice = () => { const handleRestartDevice = () => {
deviceRestartLoading.value = true deviceRestartLoading.value = true
ElMessageBox.prompt('二次校验密码确认', '装置重启', { ElMessageBox.prompt('二次校验密码确认', '装置重启', {
// confirmButtonText: '确认',
// cancelButtonText: '取消',
// customClass: 'customInput',
// inputType: 'text'
confirmButtonText: '确认', confirmButtonText: '确认',
cancelButtonText: '取消', cancelButtonText: '取消',
customClass: 'custom-message-box',
inputType: 'text' inputType: 'text'
}) })
.then(({ value }) => { .then(({ value }) => {
if (!value) { if (!value) {
@@ -297,14 +271,20 @@ const handleIntoDir = (row: any) => {
activePathList.value.splice(index, 1) activePathList.value.splice(index, 1)
} }
}) })
isRoot.value = false
}).catch(e => {
loading.value = false
}) })
isRoot.value = false
} }
//处理导航栏路径 //处理导航栏路径
const outPutPath = (row: any, key: any) => { const outPutPath = (row: any, key: any) => {
let path = '' let path = ''
if (key <= 1) { if (key == 0) {
path = '/根目录'
}
if (key == 1) {
path = row.path path = row.path
} }
if (key > 1) { if (key > 1) {
@@ -313,9 +293,10 @@ const outPutPath = (row: any, key: any) => {
} }
if (row.path.split('/').length !== 0) { if (row.path.split('/').length !== 0) {
path = '/' + row.path.split('/')[row.path.split('/').length - 1] path = '/' + row.path.split('/')[row.path.split('/').length - 1]
} }
} }
return path return path.split('/')[1]
} }
//根据面包屑导航切换 //根据面包屑导航切换
@@ -335,8 +316,10 @@ const handleIntoByPath = async (val: any) => {
} }
}) })
loading.value = false loading.value = false
}).catch(e => {
loading.value = false
}) })
isRoot.value = false
} }
const form = ref({ const form = ref({
path: '' path: ''
@@ -354,6 +337,7 @@ const handleAddNewDir = () => {
const formRef = ref() const formRef = ref()
//重新加载当前页面菜单 //重新加载当前页面菜单
const reloadCurrentMenu = (msg: string) => { const reloadCurrentMenu = (msg: string) => {
loading.value = true
getFileServiceFileOrDir({ nDid: nDid.value, name: activePath.value, type: 'dir' }).then((resp: any) => { getFileServiceFileOrDir({ nDid: nDid.value, name: activePath.value, type: 'dir' }).then((resp: any) => {
if (resp.code == 'A0000') { if (resp.code == 'A0000') {
loading.value = false loading.value = false
@@ -364,10 +348,18 @@ const reloadCurrentMenu = (msg: string) => {
activePathList.value.splice(index, 1) activePathList.value.splice(index, 1)
} }
}) })
loading.value = false
if (!msg) return if (!msg) return
ElMessage({ message: msg, type: 'success', duration: 5000 }) ElMessage({ message: msg, type: 'success', duration: 5000 })
} }
}).catch(e => {
loading.value = false
}) })
// setTimeout(() => {
// loading.value = false
// },0)
} }
//新建文件夹 //新建文件夹
const submitDeviceDir = () => { const submitDeviceDir = () => {
@@ -393,7 +385,7 @@ const submitDeviceDir = () => {
} }
//删除文件夹或文件 //删除文件夹或文件
const handleDelDirOrFile = (row: any) => { const handleDelDirOrFile = (row: any) => {
loading.value = true
// delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => { // delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => {
// if (res.code == 'A0000') { // if (res.code == 'A0000') {
// reloadCurrentMenu(res.message) // reloadCurrentMenu(res.message)
@@ -410,15 +402,17 @@ const handleDelDirOrFile = (row: any) => {
.then(({ value }) => { .then(({ value }) => {
if (!value) { if (!value) {
ElMessage.warning('请输入密码') ElMessage.warning('请输入密码')
loading.value = false
} else { } else {
loading.value = true
passwordConfirm(value) passwordConfirm(value)
.then((resp: any) => { .then((resp: any) => {
if (resp.code == 'A0000') { if (resp.code == 'A0000') {
delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => { delDeviceDir({ nDid: nDid.value, path: row.prjDataPath }).then((res: any) => {
if (res.code == 'A0000') { if (res.code == 'A0000') {
reloadCurrentMenu(res.message) reloadCurrentMenu(res.message)
loading.value = false
// ElMessage({ message: res.message, type: 'success', duration: 5000 }) // ElMessage({ message: res.message, type: 'success', duration: 5000 })
} }
}) })
@@ -429,15 +423,13 @@ const handleDelDirOrFile = (row: any) => {
}) })
} }
}) })
.catch(() => {
loading.value = false
})
} }
const changeType = ref<any>('') const changeType = ref<any>('')
//下载文件 //下载文件
const fileRef = ref() const fileRef = ref()
const handleDownLoad = async (row: any) => { const handleDownLoad = async (row: any) => {
;(await nDid.value) && fileRef.value && fileRef.value.open(row, nDid.value) ; (await nDid.value) && fileRef.value && fileRef.value.open(row, nDid.value)
fileName.value = row?.prjDataPath.split('/')[row?.prjDataPath.split('/').length - 1] fileName.value = row?.prjDataPath.split('/')[row?.prjDataPath.split('/').length - 1]
localStorage.setItem('fileName', fileName.value) localStorage.setItem('fileName', fileName.value)
changeType.value = 'download' changeType.value = 'download'
@@ -546,24 +538,29 @@ onBeforeUnmount(() => {
.main { .main {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
.main_left { .main_left {
// width: 280px; // width: 280px;
} }
.main_right { .main_right {
overflow: hidden; overflow: hidden;
flex: 1; flex: 1;
padding: 10px 10px 10px 10px; padding: 10px 10px 10px 10px;
//margin-left: 10px; //margin-left: 10px;
border: 1px solid #eee; border: 1px solid #eee;
.el-input__wrapper { .el-input__wrapper {
-webkit-text-security: disc !important; -webkit-text-security: disc !important;
} }
.right_nav { .right_nav {
width: 100%; width: 100%;
height: 32px; height: 32px;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
.menu { .menu {
width: 100%; width: 100%;
height: 100%; height: 100%;
@@ -573,6 +570,7 @@ onBeforeUnmount(() => {
align-items: center; align-items: center;
background-color: var(--el-color-primary); background-color: var(--el-color-primary);
border-radius: 4px; border-radius: 4px;
span { span {
font-size: 14px; font-size: 14px;
font-weight: 800; font-weight: 800;
@@ -581,6 +579,7 @@ onBeforeUnmount(() => {
cursor: pointer; cursor: pointer;
} }
} }
.el-button { .el-button {
margin: 0 10px; margin: 0 10px;
} }
@@ -592,9 +591,11 @@ onBeforeUnmount(() => {
display: flex; display: flex;
margin-top: 10px; margin-top: 10px;
justify-content: flex-start; justify-content: flex-start;
.el-button { .el-button {
margin-left: 10px; margin-left: 10px;
} }
.upload_progress { .upload_progress {
flex: 1; flex: 1;
height: 30px; height: 30px;
@@ -602,12 +603,14 @@ onBeforeUnmount(() => {
align-items: center; align-items: center;
justify-content: flex-start; justify-content: flex-start;
margin-left: 10px; margin-left: 10px;
.el-progress { .el-progress {
width: 300px; width: 300px;
margin-left: 10px; margin-left: 10px;
} }
} }
} }
.list { .list {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
@@ -619,6 +622,7 @@ onBeforeUnmount(() => {
padding-bottom: 200px; padding-bottom: 200px;
z-index: 100; z-index: 100;
position: relative; position: relative;
.list_upload { .list_upload {
position: absolute; position: absolute;
width: 100px; width: 100px;
@@ -626,6 +630,7 @@ onBeforeUnmount(() => {
right: 20px; right: 20px;
top: 10px; top: 10px;
} }
.list_item { .list_item {
flex: none; flex: none;
width: 23.3%; width: 23.3%;
@@ -640,6 +645,7 @@ onBeforeUnmount(() => {
cursor: pointer; cursor: pointer;
position: relative; position: relative;
z-index: 1001 !important; z-index: 1001 !important;
.item_download, .item_download,
.item_upload { .item_upload {
position: absolute; position: absolute;
@@ -647,19 +653,23 @@ onBeforeUnmount(() => {
right: 10px; right: 10px;
z-index: 2001; z-index: 2001;
} }
.img_file { .img_file {
width: 60px; width: 60px;
height: 60px; height: 60px;
} }
img { img {
width: 50px; width: 50px;
height: 50px; height: 50px;
cursor: pointer !important; cursor: pointer !important;
} }
p { p {
margin-top: 10px; margin-top: 10px;
} }
} }
.list_item:nth-child(4n + 2), .list_item:nth-child(4n + 2),
.list_item:nth-child(4n + 3) { .list_item:nth-child(4n + 3) {
margin: 10px 0.8%; margin: 10px 0.8%;
@@ -667,10 +677,13 @@ onBeforeUnmount(() => {
} }
} }
} }
.el-form { .el-form {
padding: 20px 10px; padding: 20px 10px;
box-sizing: border-box; box-sizing: border-box;
} }
.customInput {
:deep(.el-breadcrumb__separator) {
margin: 0px -10px 0px 0px;
} }
</style> </style>

View File

@@ -58,17 +58,17 @@
<div class="right"> <div class="right">
<a :style="{ marginRight: '0.5rem' }" v-if="data.children"> <a :style="{ marginRight: '0.5rem' }" v-if="data.children">
<el-icon :style="{ color: '#0000FF' }"> <el-icon :style="{ color: '#0000FF' }">
<Plus @click="add(node, data)" /> <Plus @click.stop="add(node, data)" />
</el-icon> </el-icon>
</a> </a>
<a :style="{ marginRight: '0.5rem' }"> <a :style="{ marginRight: '0.5rem' }">
<el-icon :style="{ color: '#DA3434' }"> <el-icon :style="{ color: '#DA3434' }">
<Delete @click="del(node, data)" /> <Delete @click.stop="del(node, data)" />
</el-icon> </el-icon>
</a> </a>
<a :style="{ marginRight: '0.5rem' }"> <a :style="{ marginRight: '0.5rem' }">
<el-icon :style="{ color: '#0000FF' }"> <el-icon :style="{ color: '#0000FF' }">
<Edit @click="edit(node, data)" /> <Edit @click.stop="edit(node, data)" />
</el-icon> </el-icon>
</a> </a>
</div> </div>

View File

@@ -19,7 +19,8 @@
<div class="history_title"> <div class="history_title">
<p>测试项信息</p> <p>测试项信息</p>
</div> </div>
<el-tabs v-model="activeName" type="border-card" @click="init()"> <!-- @click="init()" -->
<el-tabs v-model="activeName" type="border-card">
<el-tab-pane <el-tab-pane
v-for="(item, index) in deviceData.records" v-for="(item, index) in deviceData.records"
:label="item.itemName" :label="item.itemName"
@@ -178,7 +179,7 @@ import { queryStatistical } from '@/api/system-boot/csstatisticalset'
import { TrendCharts, Plus } from '@element-plus/icons-vue' import { TrendCharts, Plus } from '@element-plus/icons-vue'
const dictData = useDictData() const dictData = useDictData()
defineOptions({ defineOptions({
name: 'govern/device/manage' name: 'govern/device/planData/index'
}) })
//电压等级 //电压等级
const voltageLevelList = dictData.getBasicData('Dev_Voltage') const voltageLevelList = dictData.getBasicData('Dev_Voltage')

View File

@@ -146,7 +146,7 @@ import html2canvas from 'html2canvas'
import { fullUrl } from '@/utils/common' import { fullUrl } from '@/utils/common'
defineOptions({ defineOptions({
name: 'govern/log/debug' name: 'govern/manage/factory'
}) })
const devTypeOptions: any = ref([]) const devTypeOptions: any = ref([])
@@ -504,14 +504,18 @@ const tableStore = new TableStore({
} }
], ],
beforeSearchFun: () => { beforeSearchFun: () => {
for (let key in tableStore.table.params) { // for (let key in tableStore.table.params) {
if (tableStore.table.params[key] === '') { // if (tableStore.table.params[key] === '') {
delete tableStore.table.params[key] // delete tableStore.table.params[key]
} // }
} // }
} }
}) })
tableStore.table.params.orderBy = 'desc' tableStore.table.params.orderBy = 'desc'
tableStore.table.params.devType=''
tableStore.table.params.devModel=''
tableStore.table.params.devAccessMethod=''
tableStore.table.params.status=''
// 设备类型 // 设备类型
const devTypeChange = (e: any) => { const devTypeChange = (e: any) => {