This commit is contained in:
duanxiaohai 2024-09-14 17:17:26 +08:00
commit 8f3d1e468c
2 changed files with 77 additions and 84 deletions

View File

@ -41,15 +41,15 @@
</div>
<div style="width: 100%; height: calc(100% - 110px)" class="table-els">
<div class="tabelHead">
<!-- <div><span>姓名</span>{{ data.tableData.xq.xm }}</div> -->
<div><span>地址</span>{{ data.character.dz }}</div>
<div><span>年龄</span>{{ data.character.age }}</div>
<div><span>标签</span>{{ data.character.titleName }}</div>
<div><span>姓名</span>{{data.xq.xm }}</div>
<div><span>地址</span>{{ data.xq.dz }}</div>
<div><span>年龄</span>{{data.xq.nl }}</div>
<div><span>标签</span>{{ data.xq.bq }}</div>
<div class="status">
<div class="statusMessage">
<span>状态</span>
<img
:src="lampImages[data.character.deng]"
:src="lampImages[data.xq.deng]"
@click="escalation"
/>
</div>
@ -64,10 +64,9 @@
</div>
</div>
<el-table
:data="data.tableData"
<el-table
:data="data.tableData"
height="100%"
:key="tableKey"
:header-cell-style="{ background: 'rgba(0, 143, 205, 0.63)' }"
@row-click="handleRowClick"
>
@ -81,9 +80,10 @@
>
<template #default="scope">
<!-- 状态 -->
<div v-if="item.property == 'zt'">
<div v-if="scope.row.zt == 1" class="progressGreen"></div>
<div v-if="scope.row.zt == 2" class="progressYellow"></div>
<div v-if="item.property == 'deng'">
<div v-if="scope.row.deng == 1" class="progressGreen"></div>
<div v-if="scope.row.deng == 2" class="progressYellow"></div>
<!-- <div v-for="index in 3" :key="index">
<img
style="width: 30px; height: 30px"
@ -112,18 +112,6 @@
</el-table>
</div>
<!-- <div class="pagePart">
<el-pagination
background
layout="prev, pager, next,total"
:page-size="pagination.pageSize"
:total="pagination.total"
prev-text="上一页"
next-text="下一页"
@current-change="handle"
v-model:current-page="pagination.currentPage"
/>
</div> -->
</div>
</el-dialog>
</div>
@ -246,7 +234,7 @@ const data = reactive({
typeId: "",
columns: [],
tableData: [],
character: [],
xq:{},
// pagination: {},
});
// 使
@ -263,49 +251,63 @@ const lampImages = {
};
const gridData = [];
//
const tableKey = ref(Math.random());
//
watch(
() => props.dialogShow,
(newVal, oldVal) => {
console.log(11111111);
dialogShow.value = newVal;
if(props.dialogShow==true){
console.log(333);
console.log(props.tableData);
data.xq=props.tableData.data.xq;
// data.tableData=props.tableData.data;
data.title=props.tableData.title;
data.columns=props.tableData.columns;
if(props.tableData.data.wxs.length>0){
props.tableData.data.wxs.forEach((item,index)=>{
let obj={
deng:2,
fwsx:item.fwsx,
}
data.tableData.push(obj);
})
}
if(props.tableData.data.ysx.length>0){
console.log(444);
props.tableData.data.ysx.forEach((item,index)=>{
let obj={
deng:1,
fwsx:item.fwsx,
}
data.tableData.push(obj);
})
}
}
// 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);
// data.columns = props.columns;
}
);
watch(
() => props.tableData,
(newVal, oldVal) => {
data.tableData = props.tableData;
console.log("状态7", props.tableData);
// tableKey.value = Math.random();
// data.tableData = props.tableData;
// console.log("1", data);
}
);
// watch(
// () => props.character,
// (newVal, oldVal) => {
// data.character = props.character;
// }
// );
// 使
onMounted(() => {
dialogShow.value = props.dialogShow;
data.columns = props.columns;
data.title = props.title;
data.typeId = props.typeId;
data.tableData = props.tableData;
console.log("状态", props.tableData);
// const paginationTotal = document.querySelector(".el-pagination__total");
// paginationTotal.innerText = ` ${props.pagination.total} `;
// data.columns = props.columns;
// data.title = props.title;
// data.tableData = props.tableData;
// console.log("", data);
});
// onBeforeMount(() => {
// dialogShow.value = props.dialogShow;
@ -322,10 +324,6 @@ const closeDialog = () => {
clicked.value = false;
emit("close");
};
//
const handle = (current) => {
emit("handle", current);
};
</script>
<style lang="scss" scoped>

View File

@ -169,7 +169,7 @@
style="width: 30px; height: 30px"
v-if="scope.row.deng == 0"
:src="lampImages[1]"
@click="statusDetails(scope.row)"
/>
<img
style="width: 30px; height: 30px"
@ -215,9 +215,7 @@
<DialogLamp
:dialogShow="dialogShow"
:title="tableType.title"
:typeId="tableType.typeId"
:tableData="tableType.data"
:columns="tableType.columns"
:tableData="tableType"
@close="closeJj"
>
</DialogLamp>
@ -411,7 +409,7 @@ const lampScreen = (val) => {
const dialogShow = ref(false);
const tableType = reactive({
url: `/api/ggfwyth/pg/fwjgqdxq`,
title: "",
title: "服务详情",
typeId: "",
data: [],
columns: [
@ -422,31 +420,31 @@ const tableType = reactive({
align: "center",
},
{
label: "姓名",
property: "xm",
width: "110",
label: "服务内容",
property: "fwsx",
},
{
label: "结果",
property: "deng",
width: "90",
width: "290",
align: "center",
type: "slot",
},
{
label: "地址",
property: "dz",
},
{
label: "年龄",
property: "nl",
width: "60",
},
{
label: "人口标签",
property: "bq",
type: "slot",
},
// {
// label: "",
// property: "dz",
// },
// {
// label: "",
// property: "nl",
// width: "60",
// },
// {
// label: "",
// property: "bq",
// type: "slot",
// },
// {
// label: "",
@ -465,8 +463,6 @@ const tableType = reactive({
});
//
const statusDetails = (val) => {
tableType.title = `服务详情`;
data.identNo = val.sfzhm;
if (data.identNo == null) {
ElMessage.warning({
@ -475,9 +471,7 @@ const statusDetails = (val) => {
});
} else {
getTable1(tableType);
setTimeout(() => {
dialogShow.value = true;
}, 300);
}
};
//
@ -525,7 +519,8 @@ const getTable1 = (pagination) => {
http.get(`${pagination.url}?sfzhm=${data.identNo}`).then((res) => {
if (res.code == 200) {
tableType.data = res.data;
tableType.typeId = routers.query.id;
tableType.typeId = routers.query.id;
dialogShow.value = true;
}
});
};