This commit is contained in:
lcw
2025-09-26 16:13:54 +08:00
parent e7a5f443f2
commit eb91b68d03
86 changed files with 143 additions and 170 deletions

View File

@ -8,6 +8,12 @@
</el-icon>
<span style="vertical-align: middle">新增</span>
</el-button>
<el-button type="primary" @click="handleDelete(ids)">
<el-icon style="vertical-align: middle">
<CirclePlus />
</el-icon>
<span style="vertical-align: middle">批量删除</span>
</el-button>
</PageTitle>
</div>
<!-- 搜索 -->
@ -24,8 +30,8 @@
</template>
<template #answer="{ row }">
<span v-if="row.type == '01' || row.type == '02'">
<span v-for="val in row.correctAnswer" class="flex items-center just-center">
<DictTag :value="val" :tag="false" :options="D_BA_TKDA" />
<span v-for="(val,idx) in row.correctAnswer" >
{{val}}<span v-if="row.correctAnswer.length - 1 != idx">,</span>
</span>
</span>
<span v-else>{{ row.isTrue }}</span>
@ -75,7 +81,7 @@ const pageData = reactive({
keyCount: 0,
tableConfiger: {
rowHieght: 61,
showSelectType: "null",
showSelectType: "checkBox",
loading: false
},
total: 0,
@ -92,7 +98,7 @@ const pageData = reactive({
{ label: "选项C", prop: "optionC" },
{ label: "选项D", prop: "optionD" },
{ label: "选项E", prop: "optionE" },
{ label: "答案", prop: "answer", showSolt: true}
{ label: "答案", prop: "answer", showSolt: true }
]
});
@ -107,7 +113,10 @@ const onSearch = (val) => {
pageData.pageConfiger.pageCurrent = 1;
getList();
};
const ids=ref()
const chooseData = (val) => {
ids.value=val.map(item=>item.id)
}
const changeNo = (val) => {
pageData.pageConfiger.pageNum = val;
getList();
@ -122,6 +131,8 @@ const getList = () => {
pageData.tableConfiger.loading = true;
let data = { ...pageData.pageConfiger, ...queryFrom.value };
qcckPost(data, "/bagl/mosty-base/baxx/tkgl/page").then((res) => {
console.log(res);
let arr = res.records || []
arr.forEach(item => {
item.correctAnswer = item.correctAnswer.split(',')
@ -138,7 +149,7 @@ const getList = () => {
// 删除
const handleDelete = (ids) => {
proxy.$modal.confirm("是否确认删除该题目?").then(() => {
qcckPost(ids, "/bagl/mosty-base/baxx/tkgl/remove").then(() => {
qcckPost({idList:ids}, "/bagl/mosty-base/baxx/tkgl/remove").then(() => {
proxy.$modal.msgSuccess("删除成功");
getList();
});