修改页面样式

This commit is contained in:
GGJ
2024-11-27 16:32:13 +08:00
parent 52b41a3248
commit a008424927
7 changed files with 67 additions and 27 deletions

View File

@@ -99,9 +99,9 @@
</el-form-item>
<el-form-item label="筛选" v-if="!dataSet.includes('_')">
<el-input style="width: 160px" v-model="searchValue" autocomplete="off" clearable
placeholder="请输入关键词"></el-input>
@input="handleSearch" placeholder="请输入关键词"></el-input>
</el-form-item>
<el-form-item label="偶数/奇数" v-if="oddAndEvenFlag && !dataSet.includes('_')">
<el-form-item label="谐波次数" v-if="oddAndEvenFlag && !dataSet.includes('_')">
<el-select v-model="oddAndEven" style="min-width: 120px !important">
<el-option v-for="item in oddAndEvenList" :key="item.value" :label="item.label"
:value="item.value" />
@@ -401,7 +401,7 @@ const tableData = ref<any[]>([])
const tableHeight = mainHeight(290).height
const tableHeightBox = mainHeight(310).height
const searchValue = ref('')
const TrendList=ref({})
const TrendList = ref({})
const oddAndEven = ref('1')
const datePickerRef = ref('1')
const oddAndEvenFlag = ref(false)
@@ -418,6 +418,10 @@ const formInline = reactive({
dataLevel: 'Secondary'
})
const oddAndEvenList = [
{
value: '3',
label: '全部',
},
{
value: '1',
label: '奇次',
@@ -426,10 +430,7 @@ const oddAndEvenList = [
value: '2',
label: '偶次',
},
{
value: '3',
label: '全部',
},
]
const detail = ref<any>(null)
@@ -561,6 +562,42 @@ const handleReturn = async () => {
})
// handleClick()
}
const handleSearch = () => {
let queryListName = queryList.value.filter((item: any) => item.id == formInline.targetType)
let list = tableData.value.filter((item: any) => {
if (item.otherName.includes(searchValue.value)) {
return item
}
})
if (oddAndEvenFlag.value) {
list = list.filter((item: any) => {
let str = item.otherName.split("次")[0]
queryListName[0].name == '间谐波电压含有率' ? str = str - 0.5 : ''
if (oddAndEven.value == '1') {
// 奇次
if (str % 2 != 0) {
return item
}
} else if (oddAndEven.value == '2') {
// 偶次
if (str % 2 == 0) {
return item
}
} else {
return item
}
})
}
nearRealTimeDataRef.value?.setData(list, queryListName)
}
const getDeviceDataTrend = (e: any) => {
detail.value = {
devId: deviceId.value,
@@ -602,16 +639,16 @@ const nodeClick = async (e: anyObj) => {
queryList.value = res.data
formInline.targetType = res.data[0].id
})
if (e.level == 2) return
deviceId.value = e?.pid
lineId.value = e?.id
TrendList.value=e
TrendList.value = e
if (!e) {
loading.value = false
return
}
//选中设备名称后,点击标签页也能查询数据,要求点击设备名称后,点击标签页默认查询第一个监测点数据
if (e.level == 3 || e.level == 2) {
loading.value = true
@@ -1012,7 +1049,7 @@ const handleClick = async (tab?: any) => {
tableData.value = res.data
formInline.total = res.data.total
let queryListName = queryList.value.filter((item: any) => item.id == formInline.targetType)
let list = res.data.filter((item: any) => {
let list = tableData.value.filter((item: any) => {
if (item.otherName.includes(searchValue.value)) {
return item
}