157 lines
5.4 KiB
Vue
157 lines
5.4 KiB
Vue
<template>
|
|
<div>
|
|
<div>
|
|
<TableHeader area ref="TableHeaderRef">
|
|
<template #select>
|
|
<el-form-item label="终端名称">
|
|
<el-select v-model="tableStore.table.params.searchState" placeholder="请选择终端名称">
|
|
<el-option
|
|
v-for="item in uploadData"
|
|
:key="item.id"
|
|
:label="item.label"
|
|
:value="item.id"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
<el-form-item label="生产厂家">
|
|
<el-select v-model="tableStore.table.params.searchStat1e" placeholder="请选择生产厂家">
|
|
<el-option
|
|
v-for="item in uploadData"
|
|
:key="item.id"
|
|
:label="item.label"
|
|
:value="item.id"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
|
|
<el-form-item label="检测结果">
|
|
<el-select v-model="tableStore.table.params.searchState3" placeholder="请输入检测结果">
|
|
<el-option
|
|
v-for="item in uploadData"
|
|
:key="item.id"
|
|
:label="item.label"
|
|
:value="item.id"
|
|
></el-option>
|
|
</el-select>
|
|
</el-form-item>
|
|
</template>
|
|
<template #operation>
|
|
<el-button icon="el-icon-Plus" type="primary" @click="add">新增</el-button>
|
|
<el-button icon="el-icon-Edit" type="primary">修改</el-button>
|
|
<el-button icon="el-icon-Delete" type="primary">删除</el-button>
|
|
<el-button icon="el-icon-Download" type="primary">导出</el-button>
|
|
<el-button icon="el-icon-Download" type="primary">下载模板</el-button>
|
|
<el-button icon="el-icon-Upload" type="primary">excel导入</el-button>
|
|
<el-button icon="el-icon-Upload" type="primary">上传原始报告</el-button>
|
|
</template>
|
|
</TableHeader>
|
|
<Table ref="tableRef" />
|
|
<!-- 新增 -->
|
|
<newlyIncreased ref="addRef" />
|
|
</div>
|
|
</div>
|
|
</template>
|
|
<script setup lang="ts">
|
|
import { ref, onMounted, provide, nextTick } from 'vue'
|
|
import TableStore from '@/utils/tableStore'
|
|
import Table from '@/components/table/index.vue'
|
|
import TableHeader from '@/components/table/header/index.vue'
|
|
import newlyIncreased from './add.vue'
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
import { mainHeight } from '@/utils/layout'
|
|
import { useDictData } from '@/stores/dictData'
|
|
import { addUse, updateUse, removeUse } from '@/api/advance-boot/bearingCapacity'
|
|
|
|
const dictData = useDictData()
|
|
const uploadData = [
|
|
{
|
|
id: 0,
|
|
|
|
label: '未上传'
|
|
},
|
|
{
|
|
id: 1,
|
|
|
|
label: '已上传'
|
|
}
|
|
]
|
|
|
|
const dialogVisible = ref(false)
|
|
const TableHeaderRef = ref()
|
|
const addRef = ref()
|
|
|
|
const ruleFormRef = ref()
|
|
const tableStore = new TableStore({
|
|
url: '/system-boot/area/areaSelect',
|
|
publicHeight: 85,
|
|
method: 'POST',
|
|
column: [
|
|
{ width: '60', type: 'checkbox' },
|
|
|
|
{ field: 'orgName', title: '所属单位' },
|
|
{ field: 'id', title: '终端编号' },
|
|
{ field: 'name', title: '终端名称' },
|
|
{ field: 'manufacture', title: '生产厂家' },
|
|
{ field: 'installPlace', title: '安装位置' },
|
|
{ field: 'inspectionUnit', title: '送检单位' },
|
|
{ field: 'testResults', title: '检测结果' },
|
|
{ field: 'inspectionTime', title: '检测时间' },
|
|
{ field: 'nextInspectionTime', title: '下次检测时间' },
|
|
{
|
|
title: '操作',
|
|
width: '180',
|
|
render: 'buttons',
|
|
fixed: 'right',
|
|
buttons: [
|
|
{
|
|
name: 'edit',
|
|
title: '下载原始数据报告',
|
|
type: 'primary',
|
|
icon: 'el-icon-EditPen',
|
|
render: 'basicButton',
|
|
disabled: row => {
|
|
return row.originalReport == null
|
|
},
|
|
click: row => {}
|
|
},
|
|
{
|
|
name: 'edit',
|
|
title: '下载检测报告',
|
|
type: 'primary',
|
|
icon: 'el-icon-EditPen',
|
|
render: 'basicButton',
|
|
disabled: row => {
|
|
return row.inspectionReport == null
|
|
},
|
|
click: row => {}
|
|
}
|
|
]
|
|
}
|
|
],
|
|
|
|
loadCallback: () => {
|
|
tableStore.table.data = [
|
|
{
|
|
status: 2
|
|
}
|
|
]
|
|
}
|
|
})
|
|
|
|
tableStore.table.params.searchState = ''
|
|
tableStore.table.params.searchValue = ''
|
|
tableStore.table.params.type = ''
|
|
|
|
provide('tableStore', tableStore)
|
|
|
|
const add = () => {
|
|
addRef.value.open({
|
|
title: '新增'
|
|
})
|
|
}
|
|
|
|
onMounted(() => {
|
|
tableStore.index()
|
|
})
|
|
</script>
|