feat: 增加语料的搜索
This commit is contained in:
parent
d53fbef178
commit
e71ff4ad95
@ -22,6 +22,27 @@
|
|||||||
</el-table>
|
</el-table>
|
||||||
|
|
||||||
<el-dialog title="选择语料" v-model="open" width="700px">
|
<el-dialog title="选择语料" v-model="open" width="700px">
|
||||||
|
<el-form
|
||||||
|
:model="queryParams"
|
||||||
|
ref="queryRef"
|
||||||
|
:inline="true"
|
||||||
|
label-width="68px"
|
||||||
|
>
|
||||||
|
<el-form-item label="语料名称" prop="corpusName">
|
||||||
|
<el-input
|
||||||
|
v-model="queryParams.corpusName"
|
||||||
|
placeholder="请输入语料名称"
|
||||||
|
clearable
|
||||||
|
@keyup.enter="getList"
|
||||||
|
/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item>
|
||||||
|
<el-button type="primary" icon="Search" @click="getList"
|
||||||
|
>搜索</el-button
|
||||||
|
>
|
||||||
|
<el-button icon="Refresh" @click="resetForm">重置</el-button>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
<el-table
|
<el-table
|
||||||
ref="tableRef"
|
ref="tableRef"
|
||||||
:data="corpusList"
|
:data="corpusList"
|
||||||
@ -117,41 +138,48 @@ const selectable = (row) => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const getList = () => {
|
const queryParams = ref({
|
||||||
if (props.type === "1") {
|
|
||||||
listCorpus({
|
|
||||||
pageNum: 1,
|
pageNum: 1,
|
||||||
pageSize: 100000,
|
pageSize: 100000,
|
||||||
type: "TEST",
|
type: "TEST",
|
||||||
continuous: 1,
|
corpusName: '',
|
||||||
|
continuous: 1
|
||||||
})
|
})
|
||||||
|
const getList = () => {
|
||||||
|
if (props.type === "1") {
|
||||||
|
queryParams.value.continuous = 1
|
||||||
|
listCorpus(queryParams.value)
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
corpusList.value = response.rows;
|
corpusList.value = response.rows;
|
||||||
})
|
})
|
||||||
.catch((err) => {});
|
.catch((err) => {});
|
||||||
} else {
|
} else {
|
||||||
getBatchCorpus({
|
queryParams.value.continuous = 0
|
||||||
pageNum: 1,
|
getBatchCorpus(queryParams.value)
|
||||||
pageSize: 100000,
|
|
||||||
type: "TEST",
|
|
||||||
continuous: 0,
|
|
||||||
})
|
|
||||||
.then((response) => {
|
.then((response) => {
|
||||||
corpusList.value = response.rows;
|
corpusList.value = response.rows;
|
||||||
})
|
})
|
||||||
.catch((err) => {});
|
.catch((err) => {});
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const resetForm = () => {
|
||||||
|
queryParams.value.corpusName = ''
|
||||||
|
getList()
|
||||||
|
}
|
||||||
|
|
||||||
const tableRef = ref();
|
const tableRef = ref();
|
||||||
const submitForm = () => {
|
const submitForm = () => {
|
||||||
const rows = tableRef.value.getSelectionRows();
|
const rows = tableRef.value.getSelectionRows();
|
||||||
selectList.value = rows;
|
selectList.value = rows;
|
||||||
open.value = false;
|
open.value = false;
|
||||||
emits("updateSelectRows", rows);
|
emits("updateSelectRows", rows);
|
||||||
|
resetForm()
|
||||||
};
|
};
|
||||||
|
|
||||||
const cancel = () => {
|
const cancel = () => {
|
||||||
open.value = false;
|
open.value = false;
|
||||||
|
resetForm()
|
||||||
};
|
};
|
||||||
|
|
||||||
const getSelectList = (corpusIds) => {
|
const getSelectList = (corpusIds) => {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user