修改现场反馈问题
This commit is contained in:
@@ -3,7 +3,7 @@
|
||||
<TableHeader ref="tableHeaderRef">
|
||||
<template #select>
|
||||
<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"
|
||||
:value="item.id"></el-option>
|
||||
</el-select>
|
||||
@@ -14,7 +14,7 @@
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<PopupVersion ref="popupVersionRef"></PopupVersion>
|
||||
<PopupVersion ref="popupVersionRef" v-if="showPopup"></PopupVersion>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -35,14 +35,10 @@ defineOptions({
|
||||
})
|
||||
const popupVersionRef = ref()
|
||||
const dictData = useDictData()
|
||||
const showPopup = ref(false)
|
||||
const DevTypeOptions = ref()
|
||||
const tableHeaderRef = ref()
|
||||
queryByCode('Direct_Connected_Device').then(res => {
|
||||
// console.log(res)
|
||||
queryByid(res.data.id).then(res => {
|
||||
DevTypeOptions.value = res.data
|
||||
})
|
||||
})
|
||||
|
||||
const tableStore = new TableStore({
|
||||
url: '/cs-device-boot/edData/queryEdDataPage',
|
||||
method: 'POST',
|
||||
@@ -53,7 +49,19 @@ const tableStore = new TableStore({
|
||||
{ title: '版本日期', field: 'versionDate' },
|
||||
{ title: '归档日期', field: 'updateTime' },
|
||||
{ title: '描述', field: 'description' },
|
||||
{ title: '状态', field: 'statusName' },
|
||||
{
|
||||
title: '状态', field: 'status', render: 'tag',
|
||||
custom: {
|
||||
1: 'error',
|
||||
0: 'success',
|
||||
|
||||
},
|
||||
replaceValue: {
|
||||
1: '禁用',
|
||||
0: '启用',
|
||||
|
||||
}
|
||||
},
|
||||
{
|
||||
title: '操作',
|
||||
align: 'center',
|
||||
@@ -119,7 +127,7 @@ const tableStore = new TableStore({
|
||||
],
|
||||
loadCallback: () => {
|
||||
tableStore.table.data.forEach((item: any) => {
|
||||
item.statusName = item.status === 1 ? '禁用' : '启用'
|
||||
item.statusName = item.status == 1 ? '禁用' : '启用'
|
||||
for (let key in item) {
|
||||
if (typeof item[key] !== 'number') {
|
||||
item[key] = item[key] || '/'
|
||||
@@ -128,12 +136,30 @@ const tableStore = new TableStore({
|
||||
})
|
||||
}
|
||||
})
|
||||
queryByCode('Device_Type').then(res => {
|
||||
const id = res.data.id
|
||||
queryByid(id).then(res1 => {
|
||||
res1.data.map((item: any, index: any) => {
|
||||
if (item.pid == id) {
|
||||
res1.data.splice(index, 1)
|
||||
}
|
||||
})
|
||||
console.log("🚀 ~ res1.data.map ~ res1.data:", res1.data)
|
||||
|
||||
DevTypeOptions.value = res1.data
|
||||
|
||||
})
|
||||
})
|
||||
tableStore.table.params.devType = ''
|
||||
provide('tableStore', tableStore)
|
||||
onMounted(() => {
|
||||
|
||||
tableHeaderRef.value.onComSearch()
|
||||
})
|
||||
const addMenu = () => {
|
||||
showPopup.value = true
|
||||
setTimeout(() => {
|
||||
popupVersionRef.value.open('新增版本')
|
||||
}, 100)
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user