mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 21:36:44 +08:00
feat:增加项目/学习路径图直播管理界面
This commit is contained in:
@@ -15,21 +15,21 @@
|
||||
@click="closeDrawer"
|
||||
/>
|
||||
</div>
|
||||
<div class="headersup"><span>评估名称:<span style="color:#999ba3">管理者进阶投票</span></span></div>
|
||||
<div class="headersup"><span>投票名称:<span style="color:#999ba3">{{voteResource.voteName}}</span></span></div>
|
||||
<div class="main">
|
||||
<div class="basetext"><span>投票说明</span></div>
|
||||
<div class="basequestion">
|
||||
<div class="ques" v-for=" item,index in queData" :key="index">
|
||||
<div class="quename">{{ index+1 +"."+ item.quename }}</div>
|
||||
<div class="basetext"><span>投票题目</span></div>
|
||||
<div v-if="voteResource" class="basequestion">
|
||||
<div class="ques" v-for=" item,index in voteResource.ballotVo.voteStemVoList" :key="index">
|
||||
<div class="quename">{{ index+1 +"."+ item.voteStemName }}</div>
|
||||
<div class="queanswer">
|
||||
<a-radio-group v-model:value="item.value">
|
||||
<a-radio-group v-model:value="currentChoice[index]">
|
||||
<div class="queaboxs" :style="{display: item.quetype ? 'flex' : 'block'}">
|
||||
<div class="queabox" v-for="items,index in item.answer" :key="index">
|
||||
<div class="queabox" v-for="items,index in item.optionDetailList" :key="index">
|
||||
<a-radio
|
||||
v-model:checked="checked"
|
||||
:value="items.value"
|
||||
:value="items.optionId"
|
||||
>
|
||||
{{items.answercontent}}
|
||||
{{items.optionName}}
|
||||
</a-radio>
|
||||
</div>
|
||||
</div>
|
||||
@@ -39,8 +39,8 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="btnn">
|
||||
<button class="btn1">取消</button>
|
||||
<button class="btn2">确定</button>
|
||||
<button class="btn1" @click="closeDrawer">取消</button>
|
||||
<button class="btn2" @click="closeDrawer">确定</button>
|
||||
</div>
|
||||
</div>
|
||||
</a-drawer>
|
||||
@@ -48,6 +48,10 @@
|
||||
|
||||
<script>
|
||||
import { toRefs,reactive } from '@vue/reactivity';
|
||||
import {computed} from "vue";
|
||||
import { useStore } from "vuex";
|
||||
import * as api from "../../api/indexTaskManage";
|
||||
|
||||
export default {
|
||||
name:"CheckWork",
|
||||
props:{
|
||||
@@ -55,8 +59,18 @@ export default {
|
||||
type:Boolean,
|
||||
default:false,
|
||||
},
|
||||
voteID: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
courseID: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
},
|
||||
setup(props,ctx){
|
||||
const store = useStore();
|
||||
|
||||
const state = reactive({
|
||||
valueE1:"",
|
||||
queData:[
|
||||
@@ -91,6 +105,8 @@ export default {
|
||||
]
|
||||
}
|
||||
],
|
||||
voteResource:"",
|
||||
currentChoice: [], // 当前投票项
|
||||
})
|
||||
|
||||
const closeDrawer = ()=> {
|
||||
@@ -98,11 +114,56 @@ export default {
|
||||
}
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log(bool);
|
||||
if(bool){
|
||||
console.log('当前的投票id为', props.voteID)
|
||||
getData();
|
||||
}
|
||||
}
|
||||
|
||||
const userInfo = computed(()=>store.state.userInfo)
|
||||
|
||||
// 获取投票基础信息查询
|
||||
function getData() {
|
||||
console.log('我是请求的参数', {
|
||||
"courseId": props.courseID,
|
||||
"studentId": userInfo.value.id,
|
||||
"voteSubmitId": props.voteID
|
||||
})
|
||||
api.QueryVoteTaskDetailById({
|
||||
"courseId": props.courseID,
|
||||
"studentId": userInfo.value.id,
|
||||
"voteSubmitId": props.voteID
|
||||
}).then(res=>{
|
||||
console.log(res)
|
||||
state.voteResource = res.data.data
|
||||
|
||||
let choiceArr = []
|
||||
let dataQuestion = state.voteResource.ballotVo.voteStemVoList
|
||||
for(let i=0;i<dataQuestion.length;i++){
|
||||
for(let j=0;j<dataQuestion[i].optionDetailList.length;j++){
|
||||
if(dataQuestion[i].optionDetailList[j].isAnswer){
|
||||
choiceArr.push(dataQuestion[i].optionDetailList[j].optionId)
|
||||
break
|
||||
}
|
||||
if(j==dataQuestion[i].optionDetailList.length - 1 && dataQuestion[i].optionDetailList[j].isAnswer == false){
|
||||
choiceArr.push("")
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
state.currentChoice = choiceArr
|
||||
|
||||
|
||||
}).catch(err=>{
|
||||
console.log(err)
|
||||
})
|
||||
}
|
||||
|
||||
return{
|
||||
...toRefs(state),
|
||||
closeDrawer,
|
||||
afterVisibleChange,
|
||||
userInfo
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user