修改测试问题

This commit is contained in:
guanj
2026-06-30 08:38:05 +08:00
parent 490b52b525
commit 536f22584d
103 changed files with 3220 additions and 2394 deletions

View File

@@ -32,7 +32,7 @@ height.value = window.innerHeight < 1080 ? 230 : 450
const tableStore: any = new TableStore({
url: '',
// publicHeight: height.value,
showPage: false,
column: [
{ width: '60', type: 'checkbox', fixed: 'left' },
@@ -94,7 +94,7 @@ const open = (val: any) => {
dialogVisible.value = true
tableData.value = val
setTimeout(() => {
tableStore.index()
// tableStore.index()
}, 10)
}
const close = () => {

View File

@@ -693,12 +693,12 @@ const lineId: any = ref('')
const dataLevel: any = ref('')
const dataSource = ref([])
const engineeringName = ref('')
const devConType = ref('')
const nodeClick = async (e: anyObj, node?: any) => {
console.log("🚀 ~ nodeClick ~ node:", e)
if (e == undefined) {
return (loading.value = false)
}
if (e.pname?.includes('便携')) {
if (e?.pname.includes('便携')) {
deviceType.value = '1'
} else {
deviceType.value = '2'
@@ -1140,6 +1140,7 @@ const handleClick = async (tab?: any) => {
devId: deviceId.value, //e.id
lineId: lineId.value, //e.pid
engineeringName: engineeringName.value, //e.name
lineName: (TrendList.value as any)?.name || devData.value?.name,
type: 3,
list: [
{
@@ -1391,7 +1392,11 @@ const downloadTxt = () => {
URL.revokeObjectURL(url)
}
onMounted(() => { })
onMounted(() => {
setTimeout(() => {
loading.value=false
}, 3000)
})
onBeforeUnmount(() => {
clearInterval(realDataTimer.value)
clearInterval(trendTimer.value)

View File

@@ -381,7 +381,6 @@ const changeDataType = () => {
? list.value[activeTab.value]?.modOutList.map(k => (k.data == 3.14159 ? 0 : k.data))
: [0]
let [modOuMin, modOuMax] = yMethod([...data1||[0], ...data2||[0]])
console.log("🚀 ~ changeDataType ~ modOuMin:", modOuMin,modOuMax)
echartsData.value.yAxis[0] = {
name: 'A',
@@ -396,7 +395,7 @@ const changeDataType = () => {
{
name: 'A相负载电流',
type: 'line',
data: list.value[activeTab.value].loadList
data: list.value[activeTab.value]?.loadList
.filter((k: any) => k.phasicType == 'A')
.map((k: any) => [k.time, k.data == 3.14159 ? null : k.data, 'A', lineStyle[0].type]),
smooth: true, //让线变得平滑
@@ -408,7 +407,7 @@ const changeDataType = () => {
{
name: 'B相负载电流',
type: 'line',
data: list.value[activeTab.value].loadList
data: list.value[activeTab.value]?.loadList
.filter((k: any) => k.phasicType == 'B')
.map((k: any) => [k.time, k.data == 3.14159 ? null : k.data, 'A', lineStyle[0].type]),
smooth: true, //让线变得平滑
@@ -420,7 +419,7 @@ const changeDataType = () => {
{
name: 'C相负载电流',
type: 'line',
data: list.value[activeTab.value].loadList
data: list.value[activeTab.value]?.loadList
.filter((k: any) => k.phasicType == 'C')
.map((k: any) => [k.time, k.data == 3.14159 ? null : k.data, 'A', lineStyle[0].type]),
smooth: true, //让线变得平滑

View File

@@ -81,8 +81,8 @@
</el-form-item>
</el-form>
<template #footer>
<el-button @click="resetForm"> </el-button>
<el-button type="primary" @click="onSubmit"> </el-button>
<el-button @click="resetForm">取消</el-button>
<el-button type="primary" @click="onSubmit" :loading="loading"></el-button>
</template>
</el-dialog>
@@ -116,7 +116,7 @@ import { fullUrl } from '@/utils/common'
defineOptions({
name: 'govern/log/debug'
})
const loading = ref(false)
const devTypeOptions: any = ref([])
const deivce: any = ref({})
const ruleFormRef = ref()
@@ -510,17 +510,22 @@ const add = () => {
const onSubmit = () => {
ruleFormRef.value.validate((valid: any) => {
if (valid) {
loading.value = true
if (dialogTitle.value == '新增设备') {
addEquipmentDelivery(form).then(res => {
ElMessage.success('新增成功')
resetForm()
tableStore.onTableAction('search', {})
}).finally(() => {
loading.value = false
})
} else {
editEquipmentDelivery(form).then(res => {
ElMessage.success('修改成功')
resetForm()
tableStore.onTableAction('search', {})
}).finally(() => {
loading.value = false
})
}
}

View File

@@ -254,6 +254,11 @@ const tableStore: any = new TableStore({
tableStore.table.params.list = tableParams.value.list
tableStore.table.params.type = 3
},
exportProcessingData: () => {
tableStore.table.allData?.forEach((row: any) => {
row.lineName = row.lineName || tableParams.value.lineName || '/'
})
},
loadCallback: () => { }
})
Object.assign(tableStore.table.params, {
@@ -283,6 +288,7 @@ const isWaveCharts = ref(false)
const getTableParams = (val: any) => {
tableParams.value = val
isWaveCharts.value = false
tableStore.exportName = { subject: val.lineName, feature: '暂态事件' }
tableStore.index()
}
const onFilterConfirm = () => {

View File

@@ -199,6 +199,23 @@ const init = () => {
}
}
},
dataZoom: [
{
type: 'inside',
height: 13,
start: 70,
bottom: '20px',
end: 100,
filterMode: 'none'
},
{
start: 0,
height: 13,
bottom: '20px',
end: 100,
filterMode: 'none'
}],
series: buildColoredStepSeries(list.value)
}
}

View File

@@ -5,7 +5,7 @@
<TableHeader ref="tableHeaderRef" :showSearch="false" @selectChange="selectChange">
<template v-slot:select>
<el-form-item>
<DatePicker ref="datePickerRef" :timeKeyList="[ '3', '4', '5']"></DatePicker>
<DatePicker ref="datePickerRef" :timeKeyList="['3', '4', '5']"></DatePicker>
</el-form-item>
<el-form-item label="统计指标" label-width="80px">
<el-select style="width: 200px" multiple :multiple-limit="3" collapse-tags filterable
@@ -331,7 +331,7 @@ const setEchart = () => {
itemStyle: { opacity: 0 }, //去圆点
type: 'scroll', // 开启滚动分页
// orient: 'vertical', // 垂直排列
// width: 550,
// height: 50
},
@@ -503,7 +503,8 @@ const setEchart = () => {
echartsData.value.options.series.push({
name: kk[0].phase ? kk[0].phase + '相' + kk[0].anotherName : kk[0].anotherName,
type: 'line',
smooth: true,
smooth: true,
color:
colorName == 'A' ? '#DAA520' : colorName == 'B' ? '#2E8B57' : colorName == 'C' ? '#A52a2a' : '',
symbol: 'none',
@@ -538,6 +539,7 @@ const selectChange = (flag: boolean) => {
pageHeight.value = mainHeight(290)
}
}
//导出
const historyChart = ref()
// const chart: any = ref(null)

View File

@@ -26,7 +26,7 @@
<template #footer>
<el-button @click="handleClose">取消</el-button>
<el-button type="primary" @click="handleConfirm">
<el-button type="primary" @click="handleConfirm" :loading="loading">
确定
</el-button>
</template>
@@ -53,6 +53,7 @@ const height = mainHeight(295).height
const dataList = ref([])
const key: any = ref(0)
const ruleFormRef = ref()
const loading = ref(false)
const adminInfo = useAdminInfo()
const showButtom = ref(adminInfo.roleCode.includes('operation_manager') || adminInfo.roleCode.includes('root'))
const dialogVisible = ref(false)
@@ -111,14 +112,18 @@ const handleClose = () => {
const handleConfirm = () => {
ruleFormRef.value.validate((valid: any) => {
if (valid) {
loading.value = true
let data = betweenDay(new Date(form.proStartTime), new Date(form.proEndTime))
if (data < 0) {
loading.value = false
ElMessage.warning('数据结束时间不能小于数据起始时间')
} else {
updateRecordData(form).then((res) => {
ElMessage.success(res.message)
dialogVisible.value = false
emit('onSubmit')
}).finally(() => {
loading.value = false
})
}
}

View File

@@ -63,8 +63,8 @@
</vxe-table>
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="addMarketData"> </el-button>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="addMarketData" :loading="loading1"></el-button>
</span>
</template>
</el-dialog>
@@ -84,7 +84,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
const pageHeight = mainHeight(60)
const loading = ref(false)
const loading1 = ref(false)
const tableHeight = mainHeight(173)
const user: any = ref({})
const tableData = ref([])
@@ -145,10 +145,13 @@ const addMarketData = () => {
userId: user.value.id
})
})
loading1.value = true
add(form).then((res: any) => {
ElMessage.success(res.message)
selectUser(user.value)
dialogVisible.value = false
}).finally(() => {
loading1.value = false
})
}
</script>

View File

@@ -136,7 +136,7 @@
<template #footer>
<div class="dialog-footer">
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="submitDeviceDir">确定</el-button>
<el-button type="primary" @click="submitDeviceDir" :loading="loading1">确定</el-button>
</div>
</template>
</el-dialog>
@@ -174,6 +174,7 @@ const pageHeight = mainHeight(20)
const tableHeight = mainHeight(130)
const adminInfo = useAdminInfo()
const loading = ref(false)
const loading1 = ref(false)
//nDid
const nDid = ref<string>('')
const devId = ref<string>('')
@@ -502,6 +503,7 @@ const reloadCurrentMenu = (msg: string) => {
const submitDeviceDir = () => {
formRef.value.validate((valid: any) => {
if (valid) {
loading1.value = true
if (devConType.value == 'CLD') {
let obj = {
devId: devId.value,
@@ -516,6 +518,8 @@ const submitDeviceDir = () => {
reloadCurrentMenu(res.message)
addDeviceDirOpen.value = false
}
}).finally(() => {
loading1.value = false
})
} else {
let obj = {
@@ -531,6 +535,8 @@ const submitDeviceDir = () => {
reloadCurrentMenu(res.message)
addDeviceDirOpen.value = false
}
}).finally(() => {
loading1.value = false
})
}
}

View File

@@ -144,7 +144,6 @@ const handleDownLoad = () => {
}
})
.catch(e => {
console.log(e, '0000000')
if (e) {
downLoading.value = false
}

View File

@@ -42,8 +42,8 @@
</el-tree>
</div>
<template #footer="">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="submit">确定</el-button>
</template>
</el-dialog>
</template>

View File

@@ -126,8 +126,8 @@
<template #footer>
<span class="dialog-footer">
<el-button @click="dialogVisible = false"> </el-button>
<el-button type="primary" @click="addData"> </el-button>
<el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="addData" :loading="loading1"></el-button>
</span>
</template>
</el-dialog>
@@ -156,7 +156,7 @@ import { ElMessage, ElMessageBox } from 'element-plus'
const pageHeight = mainHeight(60)
const pageHeight1 = mainHeight(125)
const loading = ref(false)
const loading1 = ref(false)
const user: any = ref({})
const tableData = ref([])
const deviceTableData = ref([]) // 设备表格数据
@@ -291,12 +291,14 @@ const addData = () => {
selectedDevices.forEach((item: any) => {
form.portableDevList.push(item.id)
})
loading1.value = true
// 发送请求
add(form).then((res: any) => {
ElMessage.success(res.message)
selectUser(user.value)
dialogVisible.value = false
}).finally(() => {
loading1.value = false
})
}
const treeRef = ref()

View File

@@ -96,8 +96,8 @@
</el-tab-pane>
</el-tabs>
<template #footer="">
<el-button @click="close"> </el-button>
<el-button type="primary" @click="submit"> </el-button>
<el-button @click="close">取消</el-button>
<el-button type="primary" @click="submit">确定</el-button>
</template>
</el-dialog>
</template>

View File

@@ -153,12 +153,12 @@ const tableStore = new TableStore({
isWaveCharts.value = true
row.loading1 = false
if (res != undefined) {
boxoList.value = {
...row,
featureAmplitude:
row.featureAmplitude != '-' ? (row.featureAmplitude - 0) / 100 : null,
systemType: 'YPT',
}
boxoList.value = {
...row,
featureAmplitude:
row.featureAmplitude != '-' ? (row.featureAmplitude - 0) / 100 : null,
systemType: 'YPT',
}
wp.value = res.data
@@ -225,7 +225,7 @@ const tableStore = new TableStore({
render: 'basicButton',
disabled: row => {
let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code
return !(code == 'Direct_Connected_Device' || code == 'Gateway')
return !((code == 'Direct_Connected_Device' || code == 'Gateway') && row.wavePath == null)
},
},
@@ -237,7 +237,8 @@ const tableStore = new TableStore({
render: 'basicButton',
loading: 'loading2',
disabled: row => {
return row.wavePath
let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code
return !((code == 'Portable' || code == 'DEV_CLD') && row.wavePath == null)
},
click: row => {
let code = DeviceType.value.filter((item: any) => item.id == row.devType)[0]?.code

File diff suppressed because it is too large Load Diff

View File

@@ -30,7 +30,6 @@ const tableData = ref([])
const treeRef = ref(null)
const ignoreCheckChange = ref(false)
const checkChange = (data: any) => {
console.log("🚀 ~ checkChange ~ data:", data)
if (data == undefined) return (loading.value = false)
if (data.data.pName == '便携式设备') {
if (ignoreCheckChange.value) {