Files
admin-govern/src/views/govern/device/control/analysisList/index.vue

88 lines
2.7 KiB
Vue
Raw Normal View History

2024-07-23 17:28:31 +08:00
<!-- 解析列表 -->
<template>
<el-dialog v-model="dialogVisible" title="解析列表" width="70%" draggable @closed="close">
<!-- <div class="header_btn">
<el-button type="primary" size="small" @click="handleBack" :icon="ArrowLeft">返回</el-button>
</div> -->
<Table ref="tableRef" />
<template #footer>
<div class="dialog-footer">
<el-button @click="close">取消</el-button>
<!-- <el-button type="primary" @click="close">提交</el-button> -->
</div>
</template>
</el-dialog>
</template>
<script lang="ts" setup>
import { ref, onMounted, provide } from 'vue'
import TableStore from '@/utils/tableStore'
import Table from '@/components/table/index.vue'
import { ArrowLeft } from '@element-plus/icons-vue'
const emit = defineEmits(['back'])
const dialogVisible = ref(false)
const tableStore: any = new TableStore({
url: '/cs-device-boot/EquipmentDelivery/list',
publicHeight: 210,
method: 'POST',
column: [
// { width: '60', type: 'checkbox', fixed: 'left' },
{ title: '序号', type: 'seq', width: 80 },
{ field: 'name', title: '文件名称', minWidth: 170 },
{ field: 'createTime', title: '导入时间', minWidth: 170 },
{ field: 'devModel', title: '数据总数(条)', minWidth: 170 },
{ field: 'devAccessMethod', title: '已入库总数(条)', minWidth: 170 },
{
title: '解析状态',
field: 'status',
width: 100,
render: 'tag',
custom: {
1: 'warning',
2: 'success',
3: 'primary',
4: 'primary',
5: 'warning',
null:''
},
replaceValue: {
1: '失败',
2: '成功',
3: '失败',
4: '失败',
5: '失败',
null:'/'
}
// formatter: row => {
// return row.cellValue == 1 ? '未注册' : row.cellValue == 2 ? '注册' : '接入'
// },
},
],
beforeSearchFun: () => {
// tableStore.table.params.devId = tableParams.value.devId
// tableStore.table.params.lineId = tableParams.value.lineId
// tableStore.table.params.list = tableParams.value.list
// tableStore.table.params.type = 3
},
loadCallback: () => {}
})
provide('tableStore', tableStore)
//返回
const handleBack = () => {
emit('back')
}
const open=()=>{
dialogVisible.value=true
tableStore.index()
}
const close=()=>{
dialogVisible.value=false
}
const initTable = () => {
}
onMounted(() => {
})
defineExpose({ open })
</script>
<style lang="scss" scoped></style>