Files
sgxt_web/src/views/backOfficeSystem/ResearchJudgment/MoralAnalysis/index.vue

195 lines
5.3 KiB
Vue
Raw Normal View History

2025-04-16 23:06:01 +08:00
<template>
<div>
<div class="titleBox">
2025-07-04 11:19:35 +08:00
<PageTitle title="情报语义分析"></PageTitle>
2025-04-16 23:06:01 +08:00
</div>
2025-07-04 11:19:35 +08:00
<div class="flex just-between">
<!-- 左边 -->
<div class="ww49">
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" />
</div>
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
: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>
</template>
</MyTable>
<div class="footBnt">
<el-button type="primary">导入</el-button>
<el-button type="primary">语义分析</el-button>
</div>
</div>
</div>
<!-- 右边表格 -->
<div class="ww49">
<div ref="searchBox">
<Search :searchArr="searchConfiger" @submit="onSearch" />
</div>
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
:tableHeight="pageData.tableHeight"
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfigerR"
: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>
</template>
</MyTable>
<Pages
@changeNo="changeNo"
@changeSize="changeSize"
:tableHeight="pageData.tableHeight"
:pageConfiger="{ ...pageData.pageConfiger, total: pageData.total }"
/>
</div>
</div>
2025-04-16 23:06:01 +08:00
</div>
<!-- 编辑详情 -->
<EditAddForm ref="detailDiloag" @updateDate="getList" />
</div>
</template>
<script setup>
import PageTitle from "@/components/aboutTable/PageTitle.vue";
import MyTable from "@/components/aboutTable/MyTable.vue";
import Pages from "@/components/aboutTable/Pages.vue";
import Search from "@/components/aboutTable/Search.vue";
import EditAddForm from "./components/editAddForm.vue";
import { qcckGet, qcckPost, qcckDelete } from "@/api/qcckApi.js";
import { reactive, ref, onMounted, getCurrentInstance } from "vue";
const { proxy } = getCurrentInstance();
const detailDiloag = ref();
const searchBox = ref(); //搜索框
const searchConfiger = ref([
2025-07-04 11:19:35 +08:00
{
label: "语义名称",
prop: "yymc",
placeholder: "请输入语义名称",
showType: "input"
},
{
label: "要素类型",
prop: "yslx",
placeholder: "请选择要素类型",
showType: "select"
},
{
label: "要素名称",
prop: "ysmc",
placeholder: "请输入要素名称",
showType: "input"
}
2025-04-16 23:06:01 +08:00
]);
const queryFrom = ref({});
const pageData = reactive({
2025-07-04 11:19:35 +08:00
tableData: [{ id: 1, xh: 1, yymc: "XX公司", yslx: "实体识别", ysmc: "组织", ysms: "林芝某公司", bz: "" }], //表格数据
2025-04-16 23:06:01 +08:00
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "checkBox",
loading: false
},
2025-07-04 11:19:35 +08:00
tableConfigerR: {
rowHieght: 61,
showSelectType: null,
loading: false
},
2025-04-16 23:06:01 +08:00
total: 0,
pageConfiger: {
pageSize: 20,
pageCurrent: 1
}, //分页
controlsWidth: 160, //操作栏宽度
tableColumn: [
{ label: "语义名称", prop: "yymc" },
{ label: "要素类型", prop: "yslx" },
{ label: "要素名称", prop: "ysmc" },
{ label: "要素描述", prop: "ysms" },
]
});
onMounted(() => {
tabHeightFn();
});
// 搜索
2025-07-04 11:19:35 +08:00
const onSearch = (val) => {
queryFrom.value = { ...val };
2025-04-16 23:06:01 +08:00
pageData.pageConfiger.pageCurrent = 1;
2025-07-04 11:19:35 +08:00
getList();
};
2025-04-16 23:06:01 +08:00
2025-07-04 11:19:35 +08:00
const changeNo = (val) => {
2025-04-16 23:06:01 +08:00
pageData.pageConfiger.pageNum = val;
2025-07-04 11:19:35 +08:00
getList();
};
const changeSize = (val) => {
2025-04-16 23:06:01 +08:00
pageData.pageConfiger.pageSize = val;
2025-07-04 11:19:35 +08:00
getList();
};
2025-04-16 23:06:01 +08:00
2025-07-04 11:19:35 +08:00
const getList = () => {
2025-04-16 23:06:01 +08:00
// 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;
// })
2025-07-04 11:19:35 +08:00
};
2025-04-16 23:06:01 +08:00
// 删除
2025-07-04 11:19:35 +08:00
const delDictItem = (ids) => {
2025-04-16 23:06:01 +08:00
// proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
// qcckPost(ids,url).then(()=>{
// proxy.$message({ type: "success", message: "删除成功" });
// getList();
// })
// }).catch(() => {});
2025-07-04 11:19:35 +08:00
};
2025-04-16 23:06:01 +08:00
// 新增
const addEdit = (type, row) => {
2025-07-04 11:19:35 +08:00
detailDiloag.value.init(type, row);
2025-04-16 23:06:01 +08:00
};
// 表格高度计算
const tabHeightFn = () => {
2025-07-04 11:19:35 +08:00
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 280;
2025-04-16 23:06:01 +08:00
window.onresize = function () {
tabHeightFn();
};
};
</script>
2025-07-04 11:19:35 +08:00
<style lang="scss" scoped>
.footBnt{
width: 100%;
position: absolute;
bottom: 10px;
display: flex;
justify-content: center;
}
</style>
2025-04-16 23:06:01 +08:00
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>