更新页面

This commit is contained in:
2025-07-06 15:07:33 +08:00
parent a1ac6938f1
commit 11a32b8fe8
7 changed files with 268 additions and 203 deletions

View File

@ -5,25 +5,28 @@
</div>
<div class="flex just-between">
<!-- 左边 -->
<div class="ww49">
<div class="ww49" style="min-width: 647px;">
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" />
<Search :searchArr="searchConfiger" @submit="onSearch">
<el-button type="primary" @click="addForm('add',null)">新增</el-button>
</Search>
</div>
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:tableHeight="pageData.tableHeight1"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #controls="{ row }">
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
<el-link type="danger" @click="delDictItem([row.id])">删除</el-link>
<el-link type="primary" @click="addForm('edit', row.id)">编辑</el-link>
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
</template>
</MyTable>
<div class="txetBox"></div>
<div class="footBnt">
<el-button type="primary">导入</el-button>
<el-button type="primary">语义分析</el-button>
@ -48,7 +51,7 @@
>
<template #controls="{ row }">
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
<el-link type="danger" @click="delDictItem([row.id])">删除</el-link>
<el-link type="danger" @click="delDictItemRight(row.id)">删除</el-link>
</template>
</MyTable>
<Pages
@ -98,13 +101,14 @@ const searchConfiger = ref([
]);
const queryFrom = ref({});
const pageData = reactive({
tableData: [{ id: 1, xh: 1, yymc: "XX公司", yslx: "实体识别", ysmc: "组织", ysms: "林芝某公司", bz: "" }], //表格数据
tableData: [], //表格数据
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
showSelectType: "null",
loading: false
},
tableHeight1:300,
tableConfigerR: {
rowHieght: 61,
showSelectType: null,
@ -117,16 +121,19 @@ const pageData = reactive({
}, //分页
controlsWidth: 160, //操作栏宽度
tableColumn: [
{ label: "语义名称", prop: "yymc" },
{ label: "要素类型", prop: "yslx" },
{ label: "要素名称", prop: "ysmc" },
{ label: "要素描述", prop: "ysms" },
{ label: "语义名称", prop: "yymc",showOverflowTooltip:true },
{ label: "要素类型", prop: "yslx",showOverflowTooltip:true },
{ label: "要素名称", prop: "ysmc",showOverflowTooltip:true },
{ label: "要素描述", prop: "ysms",showOverflowTooltip:true },
]
});
onMounted(() => {
tabHeightFn();
getList();
});
// 搜索
const onSearch = (val) => {
queryFrom.value = { ...val };
@ -134,38 +141,57 @@ const onSearch = (val) => {
getList();
};
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
};
const changeSize = (val) => {
pageData.pageConfiger.pageSize = val;
getList();
};
const getList = () => {
// pageData.tableConfiger.loading = true;
// qcckGet(queryFrom.value).then((res)=>{
// pageData.tableData = res.data.list;
// pageData.total = res.data.total;
// pageData.keyCount++;
// pageData.tableConfiger.loading = false;
// })
pageData.tableConfiger.loading = true;
qcckGet(queryFrom.value,'/mosty-gsxt/qbyy/selectList').then((res)=>{
pageData.tableData = res || [];
pageData.tableConfiger.loading = false;
})
};
// 删除
const delDictItem = (ids) => {
const delDictItem = (id) => {
proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
qcckPost({id},'/mosty-gsxt/qbyy/delete').then(()=>{
proxy.$message({ type: "success", message: "删除成功" });
getList();
})
}).catch(() => {});
};
// 删除右边
const delDictItemRight = (id) => {
// proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
// qcckPost(ids,url).then(()=>{
// qcckPost({id},'/mosty-gsxt/qbyy/delete').then(()=>{
// proxy.$message({ type: "success", message: "删除成功" });
// getList();
// })
// }).catch(() => {});
};
// 新增数据 -- 左边
const addForm = (type, id) =>{
detailDiloag.value.init(type, id);
}
const changeNo = (val) => {
// pageData.pageConfiger.pageNum = val;
// getListR();
};
const changeSize = (val) => {
// pageData.pageConfiger.pageSize = val;
// getListR();
};
// 新增
const addEdit = (type, row) => {
detailDiloag.value.init(type, row);
};
// 表格高度计算
@ -185,6 +211,15 @@ const tabHeightFn = () => {
display: flex;
justify-content: center;
}
.txetBox{
position: absolute;
bottom: 50px;
height: 210px;
width: 100%;
padding: 0 10px;
box-sizing: border-box;
background: red;
}
</style>
<style>