调整检测首页布局;根据不同的功能,实现不同的表格展示
This commit is contained in:
@@ -112,7 +112,8 @@ import Table from "../components/table.vue";
|
||||
import { data } from "@/api/plan/static.json";
|
||||
const treeRef = ref();
|
||||
const form: any = ref({
|
||||
activeTabs: 0, //功能选择
|
||||
activeTabs: 0, //功能选择,例如报告生成
|
||||
activeChildTabs: 0,//子功能选择,例如未检设备报告生成,或已检设备更换误差体系生成
|
||||
checkStatus: 0, //检测状态
|
||||
checkReportStatus: 0, //检测报告状态
|
||||
checkResult: 0, //检测结果
|
||||
@@ -132,6 +133,7 @@ const handleChange = (val: string[]) => {
|
||||
const handleTabsChange = (val) => {
|
||||
form.value.activeTabs = 0;
|
||||
form.value.activeTabs = 3;
|
||||
form.value.activeChildTabs = Number(val);
|
||||
console.log(val)
|
||||
}
|
||||
localStorage.setItem("color", "red");
|
||||
@@ -207,7 +209,7 @@ watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {
|
||||
if (val) {
|
||||
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs);
|
||||
tableRef1.value && tableRef1.value.changeActiveTabs(form.value.activeTabs,form.value.activeChildTabs);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -219,7 +221,8 @@ watch(
|
||||
() => form.value,
|
||||
(val, oldVal) => {
|
||||
if (val) {
|
||||
tableRef2.value && tableRef2.value.changeActiveTabs(form.value.activeTabs);
|
||||
tableRef2.value && tableRef2.value.changeActiveTabs(form.value.activeTabs,form.value.activeChildTabs);
|
||||
console.log(form.value.activeTabs,form.value.activeChildTabs);
|
||||
}
|
||||
},
|
||||
{
|
||||
@@ -281,6 +284,7 @@ const planDetail = () => {
|
||||
const handleCheckFunction = (val: any) => {
|
||||
console.log("test",val);
|
||||
editableTabsValue.value = '0';
|
||||
form.value.activeChildTabs = 0;
|
||||
tabsList.value.map((item: any, index: any) => {
|
||||
if (val == item.value) {
|
||||
item.checked = true;
|
||||
@@ -293,7 +297,7 @@ const handleCheckFunction = (val: any) => {
|
||||
|
||||
switch (val) {
|
||||
case 0://自动检测
|
||||
tabLabel1.value = "自动检测";
|
||||
tabLabel1.value = "设备检测";
|
||||
break;
|
||||
case 1://手动检测
|
||||
tabLabel1.value = "手动检测";
|
||||
@@ -398,6 +402,7 @@ onMounted(() => {
|
||||
|
||||
.item_text {
|
||||
p {
|
||||
width: 40px;
|
||||
margin: 0;
|
||||
font-weight: 800;
|
||||
color: var(--el-color-primary);
|
||||
|
||||
Reference in New Issue
Block a user