修改测试问题
This commit is contained in:
@@ -4,8 +4,12 @@
|
||||
<template #select>
|
||||
<el-form-item label="装置型号:">
|
||||
<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-option
|
||||
v-for="item in DevTypeOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</template>
|
||||
@@ -14,7 +18,7 @@
|
||||
</template>
|
||||
</TableHeader>
|
||||
<Table ref="tableRef" />
|
||||
<PopupVersion ref="popupVersionRef" v-if="showPopup"></PopupVersion>
|
||||
<PopupVersion ref="popupVersionRef" v-if="showPopup" @closePopup="closePopup"></PopupVersion>
|
||||
</div>
|
||||
</template>
|
||||
<script setup lang="ts">
|
||||
@@ -50,16 +54,16 @@ const tableStore = new TableStore({
|
||||
{ title: '归档日期', field: 'updateTime' },
|
||||
{ title: '描述', field: 'description' },
|
||||
{
|
||||
title: '状态', field: 'status', render: 'tag',
|
||||
title: '状态',
|
||||
field: 'status',
|
||||
render: 'tag',
|
||||
custom: {
|
||||
0: 'error',
|
||||
1: 'success',
|
||||
|
||||
1: 'success'
|
||||
},
|
||||
replaceValue: {
|
||||
0: '禁用',
|
||||
1: '启用',
|
||||
|
||||
1: '启用'
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -75,7 +79,10 @@ const tableStore = new TableStore({
|
||||
icon: 'el-icon-EditPen',
|
||||
render: 'basicButton',
|
||||
click: row => {
|
||||
popupVersionRef.value.open('编辑版本', row)
|
||||
showPopup.value = true
|
||||
setTimeout(() => {
|
||||
popupVersionRef.value.open('编辑版本', row)
|
||||
}, 100)
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -137,29 +144,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
|
||||
|
||||
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)
|
||||
setTimeout(() => {
|
||||
popupVersionRef.value.open('新增版本')
|
||||
}, 100)
|
||||
}
|
||||
const closePopup = () => {
|
||||
showPopup.value = false
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user