mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-13 04:46:46 +08:00
fix:学员查看,模板和学员搜索·重置,添加考试样式,
This commit is contained in:
@@ -16,11 +16,11 @@
|
||||
/>
|
||||
</div>
|
||||
<div style="display: flex; flex-direction: row">
|
||||
<a-button style="width:100px;"
|
||||
<button style="width:100px;"
|
||||
@click="changeOuter(1)"
|
||||
:class="[isOuter == 1? 'outer' : '' ]">系统考试</a-button>
|
||||
<a-button style="width:100px;" @click="changeOuter(2)"
|
||||
:class="[isOuter == 2? 'outer' : '' ]" >外部考试</a-button>
|
||||
:class="[isOuter == 1? 'outer' : 'notOuter' ]">系统考试</button>
|
||||
<button style="width:100px;" @click="changeOuter(2)"
|
||||
:class="[isOuter == 2? 'outer' : 'notOuter' ]" >外部考试</button>
|
||||
</div>
|
||||
<a-form
|
||||
ref="formRef"
|
||||
@@ -59,16 +59,34 @@
|
||||
</div>
|
||||
<div class="main_item">
|
||||
<div class="btnbox">
|
||||
<a-form-item has-feedback label="选择考试" name="choosedTest">
|
||||
<a-select
|
||||
<a-form-item has-feedback label="选择试卷" name="choosedTest">
|
||||
<!-- <a-select
|
||||
dropdownClassName="dropdown-style"
|
||||
style="width: 424px;margin-left: 35px;"
|
||||
placeholder="请输入考试名称"
|
||||
:options="options1"
|
||||
v-model:value="formState.choosedTest"
|
||||
allowClear
|
||||
showSearch
|
||||
/>
|
||||
/> -->
|
||||
<a-dropdown >
|
||||
<a-button type="primary" style="width: 100px;margin-left: 35px;" class="outer" @click.prevent>
|
||||
选择试卷
|
||||
<DownOutlined />
|
||||
</a-button>
|
||||
<template #overlay>
|
||||
<a-menu>
|
||||
<a-menu-item v-for="item in formState.choosedTest" :key="item.key">
|
||||
<a @click="chooseTest(item.key-1)">{{item.value}}</a>
|
||||
</a-menu-item>
|
||||
</a-menu>
|
||||
</template>
|
||||
</a-dropdown>
|
||||
<span style="margin-left: 10px">
|
||||
<a-tag class="tag-style"
|
||||
v-for="item in choosedTestList" :closable="true"
|
||||
@close="closeTag(item.key)"
|
||||
:key="item.key">{{item.value}}</a-tag>
|
||||
</span>
|
||||
</a-form-item>
|
||||
|
||||
</div>
|
||||
@@ -274,10 +292,29 @@ export default {
|
||||
showAnalysis:2,
|
||||
showAnswers:2,
|
||||
choosedTime:'',
|
||||
choosedTest:[
|
||||
{
|
||||
key:1,
|
||||
value:'提高核心竞争力'
|
||||
},
|
||||
{
|
||||
key:2,
|
||||
value:'增强创新意识感'
|
||||
},
|
||||
{
|
||||
key:3,
|
||||
value:'巩固基础求发展'
|
||||
},
|
||||
],
|
||||
|
||||
});
|
||||
const state = reactive({
|
||||
addLoading: false,
|
||||
isOuter:1, // 是否为外部考试
|
||||
choosedTestList:[{
|
||||
value:'提高核心竞争力',
|
||||
key:1,
|
||||
}],
|
||||
})
|
||||
const formRef = ref();
|
||||
let checkExaminationName = async (_rule, value) => {
|
||||
@@ -555,6 +592,16 @@ export default {
|
||||
console.log(value)
|
||||
state.isOuter = value
|
||||
}
|
||||
const chooseTest = (index) => {
|
||||
for(let i in state.choosedTestList ) {
|
||||
if(state.choosedTestList[i].key == formState.choosedTest[index].key) return;
|
||||
}
|
||||
state.choosedTestList.push(formState.choosedTest[index])
|
||||
}
|
||||
const closeTag = (removedTag) => {
|
||||
const tags = state.choosedTestList.filter(item => item.key != removedTag);
|
||||
state.choosedTestList = tags;
|
||||
}
|
||||
return {
|
||||
formState,
|
||||
afterVisibleChange,
|
||||
@@ -574,6 +621,8 @@ export default {
|
||||
updateTest,
|
||||
queryTest,
|
||||
changeOuter,
|
||||
chooseTest,
|
||||
closeTag,
|
||||
...toRefs(state)
|
||||
};
|
||||
},
|
||||
@@ -583,6 +632,26 @@ export default {
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
.outer {
|
||||
background-color: #4ea6ff;
|
||||
color: #fff;
|
||||
border-radius: 5px;
|
||||
border:1px solid #a09292;
|
||||
height: 36px;
|
||||
margin-right: 10px;
|
||||
}
|
||||
.notOuter {
|
||||
color: #000;
|
||||
border-radius: 5px;
|
||||
border:1px solid #a09292;
|
||||
background:#fff;
|
||||
margin-right: 10px;
|
||||
padding:3px;
|
||||
}
|
||||
.tag-style {
|
||||
color:rgb(113, 113, 237);
|
||||
background-color:#d7d1f7;
|
||||
}
|
||||
.addtestDrawer {
|
||||
.drawerMain {
|
||||
.header {
|
||||
|
||||
Reference in New Issue
Block a user