mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-17 23:06:47 +08:00
fix:测评列表选择问题
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
<div class="ipt_name"></div>
|
<div class="ipt_name"></div>
|
||||||
<div class="fi_input">
|
<div class="fi_input">
|
||||||
<a-input v-model:value="params.keyword" style="width: 424px; height: 40px; border-radius: 8px"
|
<a-input v-model:value="params.keyword" style="width: 424px; height: 40px; border-radius: 8px"
|
||||||
placeholder="请输入项目名称"/>
|
placeholder="请输入测评名称"/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -117,11 +117,18 @@ const taskIndex = ref(-1);
|
|||||||
|
|
||||||
const {data, loading, total, fetch} = useBoeApiPage(TEST_PAGE, params.value, {
|
const {data, loading, total, fetch} = useBoeApiPage(TEST_PAGE, params.value, {
|
||||||
init: false,
|
init: false,
|
||||||
result: res => res.result.data,
|
result: res => {
|
||||||
|
let newArr = []
|
||||||
|
for(let i=0;i<res.result.data.length;i++){
|
||||||
|
res.result.data[i].id = res.result.data[i].quiz_kid;
|
||||||
|
newArr.push(res.result.data[i])
|
||||||
|
}
|
||||||
|
return newArr
|
||||||
|
},
|
||||||
totalPage: res => res.result.total_page_num,
|
totalPage: res => res.result.total_page_num,
|
||||||
total: res => res.result.count
|
total: res => res.result.count
|
||||||
})
|
})
|
||||||
|
console.log(data)
|
||||||
watch(taskIndex, () => {
|
watch(taskIndex, () => {
|
||||||
if (taskIndex.value >= 0) {
|
if (taskIndex.value >= 0) {
|
||||||
rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
|
rowSelectKeys.value = [props.taskList[taskIndex.value].courseId]
|
||||||
@@ -182,11 +189,11 @@ const closeDrawer = () => {
|
|||||||
|
|
||||||
function confirm() {
|
function confirm() {
|
||||||
if (!selectsData.value.length || !rowSelectKeys.value.length) {
|
if (!selectsData.value.length || !rowSelectKeys.value.length) {
|
||||||
message.warning("请选择案例!");
|
message.warning("请选择测评!");
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if (taskIndex.value === -1) {
|
if (taskIndex.value === -1) {
|
||||||
const list = props.taskList
|
let list = props.taskList
|
||||||
list.push({
|
list.push({
|
||||||
name: selectsData.value[0].title,
|
name: selectsData.value[0].title,
|
||||||
type: 3,
|
type: 3,
|
||||||
|
|||||||
Reference in New Issue
Block a user