fix:修改投票信息不显示问题

This commit is contained in:
wuyx
2022-11-30 23:33:24 +08:00
parent f866cbfe0d
commit d110b8f0ed
2 changed files with 126 additions and 157 deletions

View File

@@ -74,12 +74,7 @@ export const deleteVoteStemOption = (obj) => http.post('/vote/deleteVoteStemOpti
export const editVote = (obj) => http.post('/vote/editVote', obj)
//根据题干ID获取题干信息
export const queryStemByStemId = (obj) => http.post('/vote/queryStemByStemId', obj,{
headers: {
'token': '123',
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
})
export const queryStemByStemId = (ballotId) => http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`)
//修改题干信息接口
export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj);
@@ -87,12 +82,7 @@ export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', o
//上传组件
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
//根据题干ID获取投票任务
export const queryVoteDetailById = (obj) => http.post('/vote/queryVoteDetailById', obj,{
headers: {
'token': '123',
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
})
export const queryVoteDetailById = (obj) => http.post('/vote/queryVoteDetailById', obj)
// 测试方法
// import * as api from '../../api/index'

View File

@@ -1,20 +1,12 @@
<!-- 评估管理-创建评估页面 -->
<template>
<a-drawer
:visible="createVoteVisible"
class="drawerStyle createvoteDrawer"
width="100%"
placement="right"
@after-visible-change="afterVisibleChange"
>
<a-drawer :visible="createVoteVisible" class="drawerStyle createvoteDrawer" width="100%" placement="right"
@after-visible-change="afterVisibleChange">
<div class="researchadd">
<div class="header">
<div class="headerTitle">创建投票</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" />
</div>
<div class="main_left">
<div class="main_item">
@@ -25,12 +17,8 @@
<span style="margin-right: 3px">投票名称</span>
</div>
<div class="btnbox">
<a-input
v-model:value="ballotName"
style="width: 424px; height: 32px"
placeholder="请输入任务名称"
maxlength="20"
/>
<a-input v-model:value="ballotName" style="width: 424px; height: 32px" placeholder="请输入任务名称"
maxlength="20" />
</div>
</div>
<div class="main_item">
@@ -52,29 +40,20 @@
<div class="footer">
<div class="btn">
<a-button
type="primary"
style="
<a-button type="primary" style="
width: 100px;
height: 40px;
border-radius: 8px;
background-color: #409eff;
"
@click="handleSave"
>
" @click="handleSave">
保存
</a-button>
<a-button
type="primary"
ghost
style="
<a-button type="primary" ghost style="
width: 100px;
height: 40px;
margin-left: 14px;
border-radius: 8px;
"
@click="handleAllCancel"
>
" @click="handleAllCancel">
取消
</a-button>
</div>
@@ -130,7 +109,7 @@ export default {
});
// const router = useRouter();
const afterVisibleChange = () => {
if(state.ballotId>0){
if (props.ballotId) {
getInfoDate();
} else {
handleTypes();
@@ -146,10 +125,10 @@ export default {
// 详情
const getInfoDate = async () => {
console.log("props.editChild=====", props.editChild);
if (props.ballotId>0) {
if (props.ballotId) {
console.log("props.editChild2=====", props.editChild);
let res = await api
.queryStemByStemId({ballotId:props.ballotId})
.queryStemByStemId(props.ballotId)
.then((res) => {
if (res.data.code === 200) {
return res.data.data;