This commit is contained in:
duanxiaohai 2024-09-14 17:16:32 +08:00
parent 44c19272ba
commit f03b2b831c
2 changed files with 37 additions and 8 deletions

View File

@ -65,7 +65,7 @@
</div>
<el-table
:data="data.tableData.tableData.yxs"
:data="data.tableData"
height="100%"
:key="tableKey"
:header-cell-style="{ background: 'rgba(0, 143, 205, 0.63)' }"
@ -131,6 +131,7 @@
<script setup>
import {
onMounted,
onBeforeMount,
reactive,
ref,
onBeforeUnmount,
@ -167,6 +168,13 @@ const props = defineProps({
return [];
},
},
typeId: {
type: String,
default: () => {
return [];
},
},
tableData: {
type: Array,
default: () => {
@ -235,6 +243,7 @@ const cancelEvent = () => {
const dialogShow = ref();
const data = reactive({
title: "",
typeId: "",
columns: [],
tableData: [],
character: [],
@ -262,15 +271,23 @@ watch(
dialogShow.value = newVal;
// data.tableData = props.tableData;
data.columns = props.columns;
console.log("状态5", props.columns);
}
);
watch(
() => props.typeId,
(newVal, oldVal) => {
dialogShow.value = newVal;
data.typeId = props.typeId;
console.log("状态6", props.typeId);
}
);
watch(
() => props.tableData,
(newVal, oldVal) => {
data.tableData = props.tableData;
console.log("状态1", data);
tableKey.value = Math.random();
console.log("状态7", props.tableData);
// tableKey.value = Math.random();
}
);
// watch(
@ -284,11 +301,21 @@ onMounted(() => {
dialogShow.value = props.dialogShow;
data.columns = props.columns;
data.title = props.title;
data.typeId = props.typeId;
data.tableData = props.tableData;
console.log("状态", data);
console.log("状态", props.tableData);
// const paginationTotal = document.querySelector(".el-pagination__total");
// paginationTotal.innerText = ` ${props.pagination.total} `;
});
// onBeforeMount(() => {
// dialogShow.value = props.dialogShow;
// data.columns = props.columns;
// data.title = props.title;
// data.typeId = props.typeId;
// data.tableData = props.tableData;
// console.log("3", data);
// });
const closeDialog = () => {
dialogShow.value = false;

View File

@ -215,9 +215,9 @@
<DialogLamp
:dialogShow="dialogShow"
:title="tableType.title"
:typeId="tableType.typeId"
:tableData="tableType.data"
:columns="tableType.columns"
:character="tableType.columns"
@close="closeJj"
>
</DialogLamp>
@ -424,7 +424,7 @@ const tableType = reactive({
{
label: "姓名",
property: "xm",
width: "90",
width: "110",
},
{
label: "结果",
@ -475,7 +475,9 @@ const statusDetails = (val) => {
});
} else {
getTable1(tableType);
dialogShow.value = true;
setTimeout(() => {
dialogShow.value = true;
}, 300);
}
};
//