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

230 lines
6.0 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">
<!-- 左边 -->
2025-07-06 15:07:33 +08:00
<div class="ww49" style="min-width: 647px;">
2025-07-04 11:19:35 +08:00
<div ref="searchBox">
2025-07-06 15:07:33 +08:00
<Search :searchArr="searchConfiger" @submit="onSearch">
<el-button type="primary" @click="addForm('add',null)">新增</el-button>
</Search>
2025-07-04 11:19:35 +08:00
</div>
<div class="tabBox">
<MyTable
:tableData="pageData.tableData"
:tableColumn="pageData.tableColumn"
2025-07-06 15:07:33 +08:00
:tableHeight="pageData.tableHeight1"
2025-07-04 11:19:35 +08:00
:key="pageData.keyCount"
:tableConfiger="pageData.tableConfiger"
:controlsWidth="pageData.controlsWidth"
@chooseData="chooseData"
>
<template #controls="{ row }">
2025-07-06 15:07:33 +08:00
<el-link type="primary" @click="addForm('edit', row.id)">编辑</el-link>
<el-link type="danger" @click="delDictItem(row.id)">删除</el-link>
2025-07-04 11:19:35 +08:00
</template>
</MyTable>
2025-07-06 15:07:33 +08:00
<div class="txetBox"></div>
2025-07-04 11:19:35 +08:00
<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>
2025-07-06 15:07:33 +08:00
<el-link type="danger" @click="delDictItemRight(row.id)">删除</el-link>
2025-07-04 11:19:35 +08:00
</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-06 15:07:33 +08:00
tableData: [], //表格数据
2025-04-16 23:06:01 +08:00
keyCount: 0,
tableConfiger: {
rowHieght: 61,
2025-07-06 15:07:33 +08:00
showSelectType: "null",
2025-04-16 23:06:01 +08:00
loading: false
},
2025-07-06 15:07:33 +08:00
tableHeight1:300,
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: [
2025-07-06 15:07:33 +08:00
{ label: "语义名称", prop: "yymc",showOverflowTooltip:true },
{ label: "要素类型", prop: "yslx",showOverflowTooltip:true },
{ label: "要素名称", prop: "ysmc",showOverflowTooltip:true },
{ label: "要素描述", prop: "ysms",showOverflowTooltip:true },
2025-04-16 23:06:01 +08:00
]
});
onMounted(() => {
tabHeightFn();
2025-07-06 15:07:33 +08:00
getList();
2025-04-16 23:06:01 +08:00
});
2025-07-06 15:07:33 +08:00
2025-04-16 23:06:01 +08:00
// 搜索
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-06 15:07:33 +08:00
2025-04-16 23:06:01 +08:00
2025-07-04 11:19:35 +08:00
const getList = () => {
2025-07-06 15:07:33 +08:00
pageData.tableConfiger.loading = true;
qcckGet(queryFrom.value,'/mosty-gsxt/qbyy/selectList').then((res)=>{
pageData.tableData = res || [];
pageData.tableConfiger.loading = false;
})
2025-07-04 11:19:35 +08:00
};
2025-04-16 23:06:01 +08:00
// 删除
2025-07-06 15:07:33 +08:00
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) => {
2025-04-16 23:06:01 +08:00
// proxy.$confirm("确定要删除", "警告", {type: "warning"}).then(() => {
2025-07-06 15:07:33 +08:00
// qcckPost({id},'/mosty-gsxt/qbyy/delete').then(()=>{
2025-04-16 23:06:01 +08:00
// proxy.$message({ type: "success", message: "删除成功" });
// getList();
// })
// }).catch(() => {});
2025-07-04 11:19:35 +08:00
};
2025-04-16 23:06:01 +08:00
2025-07-06 15:07:33 +08:00
// 新增数据 -- 左边
const addForm = (type, id) =>{
detailDiloag.value.init(type, id);
}
const changeNo = (val) => {
2025-07-15 16:56:26 +08:00
// pageData.pageConfiger.pageCurrent = val;
2025-07-06 15:07:33 +08:00
// getListR();
};
const changeSize = (val) => {
// pageData.pageConfiger.pageSize = val;
// getListR();
};
2025-04-16 23:06:01 +08:00
// 新增
const addEdit = (type, row) => {
2025-07-06 15:07:33 +08:00
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;
}
2025-07-06 15:07:33 +08:00
.txetBox{
position: absolute;
bottom: 50px;
height: 210px;
width: 100%;
padding: 0 10px;
box-sizing: border-box;
2025-07-10 19:55:38 +08:00
background: #ccc;
2025-07-06 15:07:33 +08:00
}
2025-07-04 11:19:35 +08:00
</style>
2025-04-16 23:06:01 +08:00
<style>
.el-loading-mask {
background: rgba(0, 0, 0, 0.5) !important;
}
</style>