更新数据
This commit is contained in:
@ -1,25 +1,14 @@
|
|||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div class="titleBox">
|
<div class="titleBox">
|
||||||
<PageTitle title="情报语义分析">
|
<PageTitle title="情报语义分析"></PageTitle>
|
||||||
<el-button type="primary" @click="addEdit('add', '')">
|
|
||||||
<el-icon style="vertical-align: middle"><CirclePlus /></el-icon>
|
|
||||||
<span style="vertical-align: middle">新增</span>
|
|
||||||
</el-button>
|
|
||||||
<el-button type="danger" @click="addEdit('add', '')">
|
|
||||||
<el-icon style="vertical-align: middle"><Dete /></el-icon>
|
|
||||||
<span style="vertical-align: middle">批量删除</span>
|
|
||||||
</el-button>
|
|
||||||
<el-button>
|
|
||||||
<span style="vertical-align: middle">导出</span>
|
|
||||||
</el-button>
|
|
||||||
</PageTitle>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 搜索 -->
|
<div class="flex just-between">
|
||||||
|
<!-- 左边 -->
|
||||||
|
<div class="ww49">
|
||||||
<div ref="searchBox">
|
<div ref="searchBox">
|
||||||
<Search :searchArr="searchConfiger" @submit="onSearch" :key="pageData.keyCount"></Search>
|
<Search :searchArr="searchConfiger" @submit="onSearch" />
|
||||||
</div>
|
</div>
|
||||||
<!-- 表格 -->
|
|
||||||
<div class="tabBox">
|
<div class="tabBox">
|
||||||
<MyTable
|
<MyTable
|
||||||
:tableData="pageData.tableData"
|
:tableData="pageData.tableData"
|
||||||
@ -30,9 +19,34 @@
|
|||||||
:controlsWidth="pageData.controlsWidth"
|
:controlsWidth="pageData.controlsWidth"
|
||||||
@chooseData="chooseData"
|
@chooseData="chooseData"
|
||||||
>
|
>
|
||||||
<!-- 操作 -->
|
|
||||||
<template #controls="{ row }">
|
<template #controls="{ row }">
|
||||||
<el-link type="primary" @click="addEdit('edit', row)">编辑</el-link>
|
<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="primary" @click="addEdit('edit', row)">编辑</el-link>
|
||||||
<el-link type="danger" @click="delDictItem([row.id])">删除</el-link>
|
<el-link type="danger" @click="delDictItem([row.id])">删除</el-link>
|
||||||
</template>
|
</template>
|
||||||
@ -41,11 +55,10 @@
|
|||||||
@changeNo="changeNo"
|
@changeNo="changeNo"
|
||||||
@changeSize="changeSize"
|
@changeSize="changeSize"
|
||||||
:tableHeight="pageData.tableHeight"
|
:tableHeight="pageData.tableHeight"
|
||||||
:pageConfiger="{
|
:pageConfiger="{ ...pageData.pageConfiger, total: pageData.total }"
|
||||||
...pageData.pageConfiger,
|
/>
|
||||||
total: pageData.total
|
</div>
|
||||||
}"
|
</div>
|
||||||
></Pages>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 编辑详情 -->
|
<!-- 编辑详情 -->
|
||||||
<EditAddForm ref="detailDiloag" @updateDate="getList" />
|
<EditAddForm ref="detailDiloag" @updateDate="getList" />
|
||||||
@ -64,38 +77,39 @@ const { proxy } = getCurrentInstance();
|
|||||||
const detailDiloag = ref();
|
const detailDiloag = ref();
|
||||||
const searchBox = ref(); //搜索框
|
const searchBox = ref(); //搜索框
|
||||||
const searchConfiger = ref([
|
const searchConfiger = ref([
|
||||||
{ label: "语义名称", prop: 'yymc', placeholder: "请输入语义名称", showType: "input" },
|
{
|
||||||
{ label: "要素类型", prop: 'yslx', placeholder: "请选择要素类型", showType: "select" },
|
label: "语义名称",
|
||||||
{ label: "要素名称", prop: 'ysmc', placeholder: "请输入要素名称", showType: "input" }
|
prop: "yymc",
|
||||||
|
placeholder: "请输入语义名称",
|
||||||
|
showType: "input"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "要素类型",
|
||||||
|
prop: "yslx",
|
||||||
|
placeholder: "请选择要素类型",
|
||||||
|
showType: "select"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "要素名称",
|
||||||
|
prop: "ysmc",
|
||||||
|
placeholder: "请输入要素名称",
|
||||||
|
showType: "input"
|
||||||
|
}
|
||||||
]);
|
]);
|
||||||
const queryFrom = ref({});
|
const queryFrom = ref({});
|
||||||
const pageData = reactive({
|
const pageData = reactive({
|
||||||
tableData: [
|
tableData: [{ id: 1, xh: 1, yymc: "XX公司", yslx: "实体识别", ysmc: "组织", ysms: "林芝某公司", bz: "" }], //表格数据
|
||||||
{
|
|
||||||
id: 1,
|
|
||||||
xh: 1,
|
|
||||||
yymc: "XX公司",
|
|
||||||
yslx: "实体识别",
|
|
||||||
ysmc: "组织",
|
|
||||||
ysms: "林芝某公司",
|
|
||||||
bz: ""
|
|
||||||
},
|
|
||||||
{
|
|
||||||
id: 2,
|
|
||||||
xh: 2,
|
|
||||||
yymc: "林芝工布公园",
|
|
||||||
yslx: "实体识别",
|
|
||||||
ysmc: "地点",
|
|
||||||
ysms: "工布公园",
|
|
||||||
bz: ""
|
|
||||||
}
|
|
||||||
], //表格数据
|
|
||||||
keyCount: 0,
|
keyCount: 0,
|
||||||
tableConfiger: {
|
tableConfiger: {
|
||||||
rowHieght: 61,
|
rowHieght: 61,
|
||||||
showSelectType: "checkBox",
|
showSelectType: "checkBox",
|
||||||
loading: false
|
loading: false
|
||||||
},
|
},
|
||||||
|
tableConfigerR: {
|
||||||
|
rowHieght: 61,
|
||||||
|
showSelectType: null,
|
||||||
|
loading: false
|
||||||
|
},
|
||||||
total: 0,
|
total: 0,
|
||||||
pageConfiger: {
|
pageConfiger: {
|
||||||
pageSize: 20,
|
pageSize: 20,
|
||||||
@ -107,29 +121,27 @@ const pageData = reactive({
|
|||||||
{ label: "要素类型", prop: "yslx" },
|
{ label: "要素类型", prop: "yslx" },
|
||||||
{ label: "要素名称", prop: "ysmc" },
|
{ label: "要素名称", prop: "ysmc" },
|
||||||
{ label: "要素描述", prop: "ysms" },
|
{ label: "要素描述", prop: "ysms" },
|
||||||
{ label: "备注", prop: "bz" }
|
|
||||||
]
|
]
|
||||||
});
|
});
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
// 搜索
|
// 搜索
|
||||||
const onSearch = (val) => {
|
const onSearch = (val) => {
|
||||||
queryFrom.value = {...val}
|
queryFrom.value = { ...val };
|
||||||
pageData.pageConfiger.pageCurrent = 1;
|
pageData.pageConfiger.pageCurrent = 1;
|
||||||
getList()
|
getList();
|
||||||
}
|
};
|
||||||
|
|
||||||
const changeNo = (val) => {
|
const changeNo = (val) => {
|
||||||
pageData.pageConfiger.pageNum = val;
|
pageData.pageConfiger.pageNum = val;
|
||||||
getList()
|
getList();
|
||||||
}
|
};
|
||||||
const changeSize = (val) => {
|
const changeSize = (val) => {
|
||||||
pageData.pageConfiger.pageSize = val;
|
pageData.pageConfiger.pageSize = val;
|
||||||
getList()
|
getList();
|
||||||
}
|
};
|
||||||
|
|
||||||
const getList = () => {
|
const getList = () => {
|
||||||
// pageData.tableConfiger.loading = true;
|
// pageData.tableConfiger.loading = true;
|
||||||
@ -139,7 +151,7 @@ const getList = () =>{
|
|||||||
// pageData.keyCount++;
|
// pageData.keyCount++;
|
||||||
// pageData.tableConfiger.loading = false;
|
// pageData.tableConfiger.loading = false;
|
||||||
// })
|
// })
|
||||||
}
|
};
|
||||||
|
|
||||||
// 删除
|
// 删除
|
||||||
const delDictItem = (ids) => {
|
const delDictItem = (ids) => {
|
||||||
@ -149,23 +161,32 @@ const delDictItem = (ids) =>{
|
|||||||
// getList();
|
// getList();
|
||||||
// })
|
// })
|
||||||
// }).catch(() => {});
|
// }).catch(() => {});
|
||||||
}
|
};
|
||||||
|
|
||||||
// 新增
|
// 新增
|
||||||
const addEdit = (type, row) => {
|
const addEdit = (type, row) => {
|
||||||
detailDiloag.value.init(type, row,);
|
detailDiloag.value.init(type, row);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// 表格高度计算
|
// 表格高度计算
|
||||||
const tabHeightFn = () => {
|
const tabHeightFn = () => {
|
||||||
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 250;
|
pageData.tableHeight = window.innerHeight - searchBox.value.offsetHeight - 280;
|
||||||
window.onresize = function () {
|
window.onresize = function () {
|
||||||
tabHeightFn();
|
tabHeightFn();
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<style lang="scss" scoped>
|
||||||
|
.footBnt{
|
||||||
|
width: 100%;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 10px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: center;
|
||||||
|
}
|
||||||
|
</style>
|
||||||
|
|
||||||
<style>
|
<style>
|
||||||
.el-loading-mask {
|
.el-loading-mask {
|
||||||
background: rgba(0, 0, 0, 0.5) !important;
|
background: rgba(0, 0, 0, 0.5) !important;
|
||||||
|
Reference in New Issue
Block a user