|
@@ -1,6 +1,6 @@
|
|
|
<template>
|
|
|
<div class="hc-page-layout-box">
|
|
|
- <div :style="`width:${leftWidth}px;`" class="hc-layout-left-box bg-white">
|
|
|
+ <!-- <div :style="`width:${leftWidth}px;`" class="hc-layout-left-box bg-white">
|
|
|
<div class="hc-project-box">
|
|
|
<div class="hc-project-icon-box">
|
|
|
<HcIcon name="stack" />
|
|
@@ -33,14 +33,14 @@
|
|
|
</el-scrollbar>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <!-- 左右拖动 -->
|
|
|
+
|
|
|
<div class="horizontal-drag-line" @mousedown="onmousedown" />
|
|
|
- </div>
|
|
|
+ </div> -->
|
|
|
<div class="hc-page-content-box">
|
|
|
<HcNewCard>
|
|
|
<template #header>
|
|
|
<div class="w-40">
|
|
|
- <el-select v-model="searchForm.type" clearable placeholder="请选择材料类别">
|
|
|
+ <el-select v-model="searchForm.type" clearable placeholder="请选择检测类别">
|
|
|
<el-option
|
|
|
v-for="item in typeData" :key="item.value" :label="item.label"
|
|
|
:value="item.value"
|
|
@@ -50,6 +50,16 @@
|
|
|
<div class="w-64 ml-2">
|
|
|
<HcDatePicker :dates="betweenTime" clearable @change="betweenTimeUpdate" />
|
|
|
</div>
|
|
|
+ <div class="w-64 ml-2">
|
|
|
+ <el-tree-select
|
|
|
+ v-model="testId"
|
|
|
+ :data="testData"
|
|
|
+ :render-after-expand="false"
|
|
|
+ show-checkbox
|
|
|
+ style="width: 240px"
|
|
|
+ placeholder="请选择试验检测项目名称"
|
|
|
+ />
|
|
|
+ </div>
|
|
|
<div class="ml-2">
|
|
|
<el-button type="primary" @click="searchClick">
|
|
|
<HcIcon name="search-2" />
|
|
@@ -127,6 +137,7 @@ import TestTree from './components/TestTree.vue'
|
|
|
import HcTreeData from './components/HcTreeData.vue'
|
|
|
import queryApi from '~api/data-fill/query'
|
|
|
import { getArrValue } from 'js-fast-way'
|
|
|
+import { getDictionary } from '~api/other'
|
|
|
|
|
|
//初始变量
|
|
|
const router = useRouter()
|
|
@@ -148,7 +159,7 @@ watch(() => [
|
|
|
|
|
|
//渲染完成
|
|
|
onMounted(() => {
|
|
|
-
|
|
|
+ gettypeData()
|
|
|
})
|
|
|
|
|
|
//树搜索
|
|
@@ -181,30 +192,100 @@ const searchTreeClick = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-//树被勾选
|
|
|
-const nodeItemInfo = ref({})
|
|
|
-const testTreeCheckChange = ({ data, checkeds }) => {
|
|
|
- console.log(data, checkeds)
|
|
|
- //nodeItemInfo.value = data
|
|
|
- //searchForm.value.current = 1;
|
|
|
- //getTableData()
|
|
|
-}
|
|
|
-
|
|
|
+const testId = ref()
|
|
|
+const testData = ref([
|
|
|
+{
|
|
|
+ value: '1',
|
|
|
+ label: 'Level one 1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '1-1',
|
|
|
+ label: 'Level two 1-1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '1-1-1',
|
|
|
+ label: 'Level three 1-1-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2',
|
|
|
+ label: 'Level one 2',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '2-1',
|
|
|
+ label: 'Level two 2-1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '2-1-1',
|
|
|
+ label: 'Level three 2-1-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '2-2',
|
|
|
+ label: 'Level two 2-2',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '2-2-1',
|
|
|
+ label: 'Level three 2-2-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '3',
|
|
|
+ label: 'Level one 3',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '3-1',
|
|
|
+ label: 'Level two 3-1',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '3-1-1',
|
|
|
+ label: 'Level three 3-1-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ value: '3-2',
|
|
|
+ label: 'Level two 3-2',
|
|
|
+ children: [
|
|
|
+ {
|
|
|
+ value: '3-2-1',
|
|
|
+ label: 'Level three 3-2-1',
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ },
|
|
|
+])
|
|
|
//搜索表单
|
|
|
const searchForm = ref({
|
|
|
type: null, approval: null, betweenTime: null,
|
|
|
current: 1, size: 20, total: 0,
|
|
|
})
|
|
|
-
|
|
|
//检测类别
|
|
|
-const typeData = ref([
|
|
|
- { label: '自检', value: '1' },
|
|
|
- { label: '抽检', value: '2' },
|
|
|
- { label: '平行试验', value: '3' },
|
|
|
- { label: '验证试验', value: '4' },
|
|
|
- { label: '中心试验', value: '5' },
|
|
|
-])
|
|
|
-
|
|
|
+const typeData = ref([])
|
|
|
+//检测类别
|
|
|
+const gettypeData = async () => {
|
|
|
+ const { data } = await getDictionary({
|
|
|
+ code: 'trial_detection_category',
|
|
|
+ })
|
|
|
+ //处理数据
|
|
|
+ let newArr = []
|
|
|
+ const newData = getArrValue(data)
|
|
|
+ for (let i = 0; i < newData.length; i++) {
|
|
|
+ newArr.push({
|
|
|
+ label: newData[i]['dictValue'],
|
|
|
+ value: Number(newData[i]['dictKey']),
|
|
|
+ })
|
|
|
+ }
|
|
|
+ typeData.value = newArr
|
|
|
+}
|
|
|
//日期时间被选择
|
|
|
const betweenTime = ref(null)
|
|
|
const betweenTimeUpdate = ({ arr, query }) => {
|