修改测试bug
This commit is contained in:
@@ -25,7 +25,7 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import popupApi from './popupApi.vue'
|
||||
import { deleteMenu } from '@/api/user-boot/function'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'auth/menu/api'
|
||||
})
|
||||
@@ -95,6 +95,8 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: row => {
|
||||
deleteMenu(row.id).then(() => {
|
||||
ElMessage.success('删除成功!')
|
||||
|
||||
tableStore.index()
|
||||
})
|
||||
}
|
||||
|
||||
@@ -17,7 +17,7 @@ import TableStore from '@/utils/tableStore'
|
||||
import Table from '@/components/table/index.vue'
|
||||
import popupMenu from './popupMenu.vue'
|
||||
import { delMenu } from '@/api/systerm'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'auth/menu/menu'
|
||||
})
|
||||
@@ -89,6 +89,8 @@ const tableStore = new TableStore({
|
||||
},
|
||||
click: row => {
|
||||
delMenu(row.id).then(() => {
|
||||
ElMessage.success('删除成功!')
|
||||
|
||||
emits('init')
|
||||
})
|
||||
}
|
||||
|
||||
@@ -58,7 +58,7 @@
|
||||
import { ref, inject } from 'vue'
|
||||
import { reactive } from 'vue'
|
||||
import { update, add } from '@/api/user-boot/function'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'auth/menu/popupApi'
|
||||
})
|
||||
@@ -114,11 +114,15 @@ const submit = async () => {
|
||||
formRef.value.validate(async valid => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
await update(form)
|
||||
await update(form).then(() => {
|
||||
ElMessage.success('修改成功!')
|
||||
})
|
||||
} else {
|
||||
let obj = JSON.parse(JSON.stringify(form))
|
||||
delete obj.id
|
||||
await add(obj)
|
||||
await add(obj).then(() => {
|
||||
ElMessage.success('新增成功!')
|
||||
})
|
||||
}
|
||||
emits('init')
|
||||
dialogVisible.value = false
|
||||
|
||||
@@ -56,7 +56,7 @@ import { reactive } from 'vue'
|
||||
import TableStore from '@/utils/tableStore'
|
||||
import IconSelector from '@/components/baInput/components/iconSelector.vue'
|
||||
import { updateMenu, addMenu } from '@/api/systerm'
|
||||
|
||||
import { ElMessage } from 'element-plus'
|
||||
defineOptions({
|
||||
name: 'auth/menu/popupMenu'
|
||||
})
|
||||
@@ -118,14 +118,18 @@ const submit = async () => {
|
||||
if (valid) {
|
||||
if (form.id) {
|
||||
form.pid = form.pid || '0'
|
||||
await updateMenu(form)
|
||||
await updateMenu(form).then(() => {
|
||||
ElMessage.success('编辑成功!')
|
||||
})
|
||||
} else {
|
||||
form.code = 'menu'
|
||||
form.pid = form.pid || '0'
|
||||
let obj = JSON.parse(JSON.stringify(form))
|
||||
delete obj.id
|
||||
|
||||
await addMenu(obj)
|
||||
|
||||
await addMenu(obj).then(() => {
|
||||
ElMessage.success('新增成功!')
|
||||
})
|
||||
}
|
||||
emits('init')
|
||||
dialogVisible.value = false
|
||||
|
||||
@@ -57,33 +57,33 @@ const tabsList = ref([
|
||||
])
|
||||
const rankOptions = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '1级'
|
||||
value: '1,7',
|
||||
label: '1级(ERROR)'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '2级'
|
||||
value: '2,6',
|
||||
label: '2级(WARN)'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '3级'
|
||||
value: '3,4,5',
|
||||
label: '3级(DEBUG,NORMAL)'
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
label: 'DEBUG'
|
||||
},
|
||||
{
|
||||
value: '5',
|
||||
label: 'NORMAL'
|
||||
},
|
||||
{
|
||||
value: '6',
|
||||
label: 'WARN'
|
||||
},
|
||||
{
|
||||
value: '7',
|
||||
label: 'ERROR'
|
||||
}
|
||||
// {
|
||||
// value: '4',
|
||||
// label: 'DEBUG'
|
||||
// },
|
||||
// {
|
||||
// value: '5',
|
||||
// label: 'NORMAL'
|
||||
// },
|
||||
// {
|
||||
// value: '6',
|
||||
// label: 'WARN'
|
||||
// },
|
||||
// {
|
||||
// value: '7',
|
||||
// label: 'ERROR'
|
||||
// }
|
||||
])
|
||||
|
||||
const tableStore = new TableStore({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<TableHeader datePicker ref="refheader" showExport>
|
||||
<template v-slot:select>
|
||||
<el-form-item label="关键词">
|
||||
<el-form-item label="关键字筛选">
|
||||
<el-input
|
||||
maxlength="32"
|
||||
show-word-limit
|
||||
@@ -36,34 +36,34 @@ const props = defineProps(['deviceTree'])
|
||||
|
||||
const refheader = ref()
|
||||
const rankOptions = ref([
|
||||
{
|
||||
value: '1',
|
||||
label: '1级'
|
||||
{
|
||||
value: '1,7',
|
||||
label: '1级(ERROR)'
|
||||
},
|
||||
{
|
||||
value: '2',
|
||||
label: '2级'
|
||||
value: '2,6',
|
||||
label: '2级(WARN)'
|
||||
},
|
||||
{
|
||||
value: '3',
|
||||
label: '3级'
|
||||
value: '3,4,5',
|
||||
label: '3级(DEBUG,NORMAL)'
|
||||
},
|
||||
{
|
||||
value: '4',
|
||||
label: 'DEBUG'
|
||||
},
|
||||
{
|
||||
value: '5',
|
||||
label: 'NORMAL'
|
||||
},
|
||||
{
|
||||
value: '6',
|
||||
label: 'WARN'
|
||||
},
|
||||
{
|
||||
value: '7',
|
||||
label: 'ERROR'
|
||||
}
|
||||
// {
|
||||
// value: '4',
|
||||
// label: 'DEBUG'
|
||||
// },
|
||||
// {
|
||||
// value: '5',
|
||||
// label: 'NORMAL'
|
||||
// },
|
||||
// {
|
||||
// value: '6',
|
||||
// label: 'WARN'
|
||||
// },
|
||||
// {
|
||||
// value: '7',
|
||||
// label: 'ERROR'
|
||||
// }
|
||||
])
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-harmonic-boot/eventUser/frontWarnInfo',
|
||||
|
||||
@@ -158,6 +158,7 @@ const nodeClick = async (e: anyObj) => {
|
||||
getDevCapacity(formInline.devId)
|
||||
.then(res => {
|
||||
devCapacity.value = res.data
|
||||
|
||||
search()
|
||||
})
|
||||
.catch(() => {
|
||||
|
||||
@@ -646,7 +646,7 @@
|
||||
:controls="false"
|
||||
:min="1"
|
||||
style="width: 48%"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="lineItem.ptRatio"
|
||||
:disabled="
|
||||
!(
|
||||
@@ -671,7 +671,7 @@
|
||||
:controls="false"
|
||||
:min="1"
|
||||
style="width: 48%"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="lineItem.pt2Ratio"
|
||||
:disabled="
|
||||
!(
|
||||
@@ -696,7 +696,7 @@
|
||||
:controls="false"
|
||||
:min="1"
|
||||
style="width: 48%"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="lineItem.ctRatio"
|
||||
:disabled="
|
||||
!(
|
||||
@@ -721,7 +721,7 @@
|
||||
:controls="false"
|
||||
:min="1"
|
||||
style="width: 48%"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
oninput="value=value.replace(/[^\d]/g,'')"
|
||||
v-model.number="lineItem.ct2Ratio"
|
||||
:disabled="
|
||||
!(
|
||||
@@ -1079,7 +1079,7 @@ import MacAddressInput from '@/components/form/mac/MacAddressInput.vue'
|
||||
import { auditEngineering } from '@/api/cs-device-boot/edData'
|
||||
import { convertToObject } from 'typescript'
|
||||
import { Loading } from '@element-plus/icons-vue'
|
||||
import { getListByIds } from '@/api/cs-harmonic-boot/recruitment'
|
||||
import { getList } from '@/api/cs-harmonic-boot/recruitment'
|
||||
import { getDicDataByTypeCode } from '@/api/system-boot/csDictData'
|
||||
|
||||
defineOptions({
|
||||
@@ -2858,8 +2858,11 @@ const area = async () => {
|
||||
console.error('查询过程中出现错误:', error)
|
||||
})
|
||||
|
||||
getListByIds().then(res => {
|
||||
userList.value = res.data
|
||||
getList({
|
||||
pageNum: 1,
|
||||
pageSize: 2000
|
||||
}).then(res => {
|
||||
userList.value = res.data.records
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -37,14 +37,16 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-collapse-item>
|
||||
|
||||
|
||||
|
||||
</el-collapse>
|
||||
|
||||
<div class="view_bot">
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-colgroup align="center" :title="`电压有效值(${voltageUnit})`">
|
||||
<vxe-column align="center" field="vRmsA" title="A相"></vxe-column>
|
||||
<vxe-column align="center" field="vRmsB" title="B相"></vxe-column>
|
||||
@@ -67,8 +69,13 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<br />
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-column align="center" field="freq" width="140" title="频率(Hz)"></vxe-column>
|
||||
<vxe-column align="center" field="freqDev" width="120" title="频率偏差(Hz)"></vxe-column>
|
||||
<vxe-column align="center" width="180" field="vUnbalance" title="电压不平衡度(%)"></vxe-column>
|
||||
@@ -85,8 +92,13 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<br />
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-colgroup align="center" title="电压偏差(%)">
|
||||
<vxe-column align="center" field="vDevA" title="A相"></vxe-column>
|
||||
<vxe-column align="center" field="vDevB" title="B相"></vxe-column>
|
||||
@@ -110,8 +122,13 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
<br />
|
||||
<vxe-table border height="" :data="realList" :column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }">
|
||||
<vxe-table
|
||||
border
|
||||
height=""
|
||||
:data="realList"
|
||||
:column-config="{ resizable: true, tooltip: true }"
|
||||
:tooltip-config="{ enterable: true }"
|
||||
>
|
||||
<vxe-colgroup align="center" :title="`无功功率(${reactivePowerUnit})`">
|
||||
<vxe-column align="center" field="qA" title="A相"></vxe-column>
|
||||
<vxe-column align="center" field="qB" title="B相"></vxe-column>
|
||||
@@ -142,10 +159,6 @@
|
||||
</vxe-colgroup>
|
||||
</vxe-table>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
@@ -171,7 +184,7 @@ const echartsDataA1: any = ref({})
|
||||
const echartsDataA2: any = ref({})
|
||||
const echartsDataA3: any = ref({})
|
||||
|
||||
const currentDataLevel = ref('Primary')
|
||||
const currentDataLevel = ref('Primary')
|
||||
const previousDataLevel = ref('')
|
||||
|
||||
//渲染中间相角图
|
||||
@@ -264,10 +277,17 @@ const initRadioCharts = () => {
|
||||
}
|
||||
},
|
||||
|
||||
// // 指针设置
|
||||
// pointer: {
|
||||
// length: '80%',
|
||||
// width: 3
|
||||
// },
|
||||
// 指针设置
|
||||
pointer: {
|
||||
length: '80%',
|
||||
width: 3
|
||||
icon: 'path://m368.01136,209.80637l173.00807,-193.72679c19.14653,-21.43943 50.16392,-21.43943 69.31045,0l172.93149,193.72679c1.22537,1.37213 1.22537,3.51607 0,4.8882l-47.63657,53.34133c-1.22538,1.37213 -3.14003,1.37213 -4.36541,0l-113.65381,-127.26452c-1.91465,-2.14395 -5.20785,-0.60031 -5.20785,2.40122l0,731.94254c0,1.88667 -1.37855,3.43031 -3.06345,3.43031l-67.39579,0c-1.6849,0 -3.06345,-1.54364 -3.06345,-3.43031l0,-731.94254c0,-3.08728 -3.2932,-4.54517 -5.20785,-2.40122l-113.65381,127.26452c-1.22538,1.37213 -3.14003,1.37213 -4.36541,0l-47.63657,-53.34133c-1.22537,-1.37213 -1.22537,-3.51607 0,-4.88819l0,-0.00001M539,861.23064h73v800h-73z',
|
||||
length: '90%',
|
||||
width: 15,
|
||||
opacity: 1
|
||||
},
|
||||
detail: {
|
||||
show: false
|
||||
@@ -364,10 +384,17 @@ const initRadioCharts = () => {
|
||||
}
|
||||
},
|
||||
|
||||
// // 指针设置
|
||||
// pointer: {
|
||||
// length: '90%',
|
||||
// width: 6
|
||||
// },
|
||||
// 指针设置
|
||||
pointer: {
|
||||
icon: 'path://m368.01136,209.80637l173.00807,-193.72679c19.14653,-21.43943 50.16392,-21.43943 69.31045,0l172.93149,193.72679c1.22537,1.37213 1.22537,3.51607 0,4.8882l-47.63657,53.34133c-1.22538,1.37213 -3.14003,1.37213 -4.36541,0l-113.65381,-127.26452c-1.91465,-2.14395 -5.20785,-0.60031 -5.20785,2.40122l0,731.94254c0,1.88667 -1.37855,3.43031 -3.06345,3.43031l-67.39579,0c-1.6849,0 -3.06345,-1.54364 -3.06345,-3.43031l0,-731.94254c0,-3.08728 -3.2932,-4.54517 -5.20785,-2.40122l-113.65381,127.26452c-1.22538,1.37213 -3.14003,1.37213 -4.36541,0l-47.63657,-53.34133c-1.22537,-1.37213 -1.22537,-3.51607 0,-4.88819l0,-0.00001M539,861.23064h73v800h-73z',
|
||||
length: '90%',
|
||||
width: 6
|
||||
width: 15,
|
||||
opacity: 1
|
||||
},
|
||||
detail: {
|
||||
show: false
|
||||
@@ -549,25 +576,25 @@ const realList = ref<any>([])
|
||||
|
||||
// 计算电压单位
|
||||
const voltageUnit = computed(() => {
|
||||
return currentDataLevel.value === 'Primary' ? 'kV' : 'V'
|
||||
return currentDataLevel.value === 'Primary' ? 'kV' : 'V'
|
||||
})
|
||||
|
||||
// 计算功率单位
|
||||
const powerUnit = computed(() => {
|
||||
return currentDataLevel.value === 'Primary' ? 'kW' : 'W'
|
||||
return currentDataLevel.value === 'Primary' ? 'kW' : 'W'
|
||||
})
|
||||
|
||||
// 计算无功功率单位
|
||||
const reactivePowerUnit = computed(() => {
|
||||
return currentDataLevel.value === 'Primary' ? 'kVar' : 'Var'
|
||||
return currentDataLevel.value === 'Primary' ? 'kVar' : 'Var'
|
||||
})
|
||||
|
||||
// 计算视在功率单位
|
||||
const apparentPowerUnit = computed(() => {
|
||||
return currentDataLevel.value === 'Primary' ? 'kVA' : 'VA'
|
||||
return currentDataLevel.value === 'Primary' ? 'kVA' : 'VA'
|
||||
})
|
||||
|
||||
const setRealData = (val: any,dataLevel:string) => {
|
||||
const setRealData = (val: any, dataLevel: string) => {
|
||||
// 只有当 dataLevel 真正改变时才更新
|
||||
if (dataLevel !== previousDataLevel.value) {
|
||||
currentDataLevel.value = dataLevel
|
||||
@@ -808,7 +835,6 @@ onMounted(() => {
|
||||
}
|
||||
|
||||
:deep(.view_bot) {
|
||||
|
||||
.vxe-table--render-default .vxe-body--column:not(.col--ellipsis),
|
||||
.vxe-table--render-default .vxe-footer--column:not(.col--ellipsis),
|
||||
.vxe-table--render-default .vxe-header--column:not(.col--ellipsis) {
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
</el-button> -->
|
||||
<el-button
|
||||
icon="el-icon-Refresh"
|
||||
v-if="showButtom"
|
||||
v-if="showButtom && pName == '治理设备'"
|
||||
@click="handleRestartDevice"
|
||||
type="primary"
|
||||
:loading="deviceRestartLoading"
|
||||
@@ -115,7 +115,7 @@ import { defaultAttribute } from '@/components/table/defaultAttribute'
|
||||
const pageHeight = mainHeight(20)
|
||||
const adminInfo = useAdminInfo()
|
||||
const showButtom = ref(adminInfo.roleCode.includes('operation_manager') || adminInfo.roleCode.includes('root'))
|
||||
|
||||
const pName = ref('')
|
||||
const loading = ref(true)
|
||||
const nDid = ref<string>('')
|
||||
const tableLoading = ref(false)
|
||||
@@ -137,11 +137,13 @@ const deviceTypeChange = (val: any, obj: any) => {
|
||||
}
|
||||
// 树节点点击
|
||||
const nodeClick = (e: anyObj) => {
|
||||
console.log('🚀 ~ nodeClick ~ e:', e)
|
||||
if (!e) {
|
||||
loading.value = false
|
||||
return
|
||||
}
|
||||
if (e.level == 2) {
|
||||
pName.value = e.pName
|
||||
nDid.value = e.ndid
|
||||
loading.value = true
|
||||
getDeviceData(e.id, 'rt', '').then((res: any) => {
|
||||
|
||||
Reference in New Issue
Block a user