设备基础管理

This commit is contained in:
仲么了
2024-01-23 14:14:26 +08:00
parent e949b31ab4
commit 8808d415c4
6 changed files with 290 additions and 340 deletions

View File

@@ -1,34 +1,42 @@
<template>
<div class='default-main'>
<TableHeader ref='tableHeaderRef'>
<div class="default-main">
<TableHeader ref="tableHeaderRef">
<template #select>
<el-form-item label='模版名称'>
<el-input v-model='tableStore.table.params.name' clearable placeholder='请输入名称'></el-input>
<el-form-item label="模版名称">
<el-input v-model="tableStore.table.params.name" clearable placeholder="请输入名称"></el-input>
</el-form-item>
<el-form-item label='装置型号'>
<el-select v-model='tableStore.table.params.devType' placeholder='请选择' style='width: 100%'
clearable>
<el-option v-for='item in DevTypeOptions' :key='item.id' :label='item.name'
:value='item.id'></el-option>
<el-form-item label="装置型号">
<el-select
v-model="tableStore.table.params.devType"
placeholder="请选择"
style="width: 100%"
clearable
>
<el-option
v-for="item in DevTypeOptions"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
</el-form-item>
</template>
<template #operation>
<el-upload
action=''
class='upload-demo'
:show-file-list='false'
:auto-upload='false'
:on-change='chooseFile'
action=""
class="upload-demo"
:show-file-list="false"
:auto-upload="false"
:on-change="chooseFile"
>
<el-button :icon='Plus' type='primary' class='ml10'>新增模版</el-button>
<el-button :icon="Plus" type="primary" class="ml10">新增模版</el-button>
</el-upload>
</template>
</TableHeader>
<Table ref='tableRef' />
<Table ref="tableRef" />
</div>
</template>
<script setup lang='ts'>
<script setup lang="ts">
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
@@ -44,8 +52,8 @@ defineOptions({
})
const DevTypeOptions = ref()
const tableHeaderRef = ref()
queryByCode('Direct_Connected_Device').then((res) => {
queryByid(res.data.id).then((res) => {
queryByCode('Direct_Connected_Device').then(res => {
queryByid(res.data.id).then(res => {
DevTypeOptions.value = res.data
})
})
@@ -87,7 +95,7 @@ const tableStore = new TableStore({
}
]
}
],
]
})
tableStore.table.params.devType = ''
tableStore.table.params.name = ''