|
@@ -0,0 +1,106 @@
|
|
|
+<template>
|
|
|
+ <hc-card-item class="hc-test-sample-card-item">
|
|
|
+ <template #header>
|
|
|
+ <div class="w-200px">
|
|
|
+ <el-select v-model="searchForm.contractId" placeholder="选择合同段" filterable clearable block>
|
|
|
+ <el-option label="测试1" value="1" />
|
|
|
+ <el-option label="测试2" value="2" />
|
|
|
+ </el-select>
|
|
|
+ </div>
|
|
|
+ <div class="ml-2 w-150px">
|
|
|
+ <el-date-picker v-model="searchForm.date" class="block" type="date" format="YYYY-MM-DD" value-format="YYYY-MM-DD" clearable placeholder="废除时间" />
|
|
|
+ </div>
|
|
|
+ <div class="ml-2 w-250px">
|
|
|
+ <hc-search-input v-model="searchForm.queryValue" @search="searchClick" />
|
|
|
+ </div>
|
|
|
+ </template>
|
|
|
+ <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }">
|
|
|
+ <template #action="{ row }">
|
|
|
+ <el-link type="primary" @click="rowView(row)">查看报告</el-link>
|
|
|
+ </template>
|
|
|
+ </hc-table>
|
|
|
+ <template #action>
|
|
|
+ <hc-pages :pages="searchForm" @change="pageChange" />
|
|
|
+ </template>
|
|
|
+ </hc-card-item>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script setup>
|
|
|
+import { onMounted, ref, watch } from 'vue'
|
|
|
+import { useAppStore } from '~src/store'
|
|
|
+import { getObjValue } from 'js-fast-way'
|
|
|
+
|
|
|
+//参数
|
|
|
+const props = defineProps({
|
|
|
+ tree: {
|
|
|
+ type: Object,
|
|
|
+ default: () => ({}),
|
|
|
+ },
|
|
|
+})
|
|
|
+
|
|
|
+//变量
|
|
|
+const store = useAppStore()
|
|
|
+const projectId = ref(store.getProjectId)
|
|
|
+const contractId = ref(store.getContractId)
|
|
|
+
|
|
|
+//渲染完成
|
|
|
+onMounted(() => {
|
|
|
+
|
|
|
+})
|
|
|
+
|
|
|
+//监听数据
|
|
|
+const treeInfo = ref({})
|
|
|
+watch(() => props.tree, (obj) => {
|
|
|
+ treeInfo.value = getObjValue(obj)
|
|
|
+})
|
|
|
+
|
|
|
+//搜索表单
|
|
|
+const searchForm = ref({ current: 1, size: 20, total: 0 })
|
|
|
+
|
|
|
+//搜索
|
|
|
+const searchClick = () => {
|
|
|
+ searchForm.value.current = 1
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
+
|
|
|
+//分页被点击
|
|
|
+const pageChange = ({ current, size }) => {
|
|
|
+ searchForm.value.current = current
|
|
|
+ searchForm.value.size = size
|
|
|
+ getTableData()
|
|
|
+}
|
|
|
+
|
|
|
+//表格数据
|
|
|
+const tableColumn = ref([
|
|
|
+ { key: 'key1', name: '取样名称' },
|
|
|
+ { key: 'key2', name: '规格型号', align: 'center' },
|
|
|
+ { key: 'key3', name: '试样数量', align: 'center' },
|
|
|
+ { key: 'key4', name: '试验数量', align: 'center' },
|
|
|
+ { key: 'key5', name: '废除数量', align: 'center' },
|
|
|
+ { key: 'key6', name: '计算单位', align: 'center' },
|
|
|
+ { key: 'key7', name: '拟用部位' },
|
|
|
+ { key: 'key8', name: '代表数量', align: 'center' },
|
|
|
+ { key: 'key9', name: '委托上报时间', align: 'center' },
|
|
|
+ { key: 'key9', name: '入库时间', align: 'center' },
|
|
|
+ { key: 'key9', name: '创建试验时间', align: 'center' },
|
|
|
+ { key: 'key9', name: '是否留样', align: 'center' },
|
|
|
+ { key: 'key9', name: '留样时间', align: 'center' },
|
|
|
+ { key: 'key9', name: '废除时间', align: 'center' },
|
|
|
+ { key: 'key9', name: '废除原因', align: 'center' },
|
|
|
+ { key: 'action', name: '操作', width: 100, align: 'center', fixed: 'right' },
|
|
|
+])
|
|
|
+const tableData = ref([
|
|
|
+ {},
|
|
|
+])
|
|
|
+
|
|
|
+//获取表格数据
|
|
|
+const tableLoading = ref(false)
|
|
|
+const getTableData = async () => {
|
|
|
+
|
|
|
+}
|
|
|
+
|
|
|
+//查看报告
|
|
|
+const rowView = (row) => {
|
|
|
+
|
|
|
+}
|
|
|
+</script>
|