feat:创建题干接口

This commit is contained in:
dongwug
2022-11-08 14:22:57 +08:00
parent 7b52d58288
commit 305cfb9830
2 changed files with 41 additions and 17 deletions

View File

@@ -176,6 +176,8 @@ export default {
basevote: "",
endTimes: "",
startTimes: "",
ascriptionId:"",
voteStemId:"",
});
const closeDrawer = () => {
ctx.emit("update:addvoteVisible", false);
@@ -189,8 +191,11 @@ export default {
};
const changeVData = (data) => {
console.log('111', data);
state.creVote = data
state.creVote = data.creVote
state.ascriptionId = data.ascriptionId
state.voteStemId = data.voteStemId
console.log('222',state.creVote);
console.log('333',state.ascriptionId);
}
const delBox = () => {
state.creVote = false;

View File

@@ -167,27 +167,46 @@ export default {
// return message.info("请输入选项");
// }
console.log(state.questions[0].inputV);
let obj = {
createTime: "",
createUser: 0,
optionDto: [
{
optionId: 0,
optionName: "",
optionPictureAddress: "",
},
],
stemName: "",
updateTime: "",
updateUser: 0,
voteStemId: 0,
};
let obj = [
{
ascriptionId: 0,
createTime: "",
createUser: 0,
optionDetailList: [
{
createTime: "",
createUser: 0,
optionId: 0,
optionName: "",
optionOrderNum: "",
optionPictureAddress: "",
stem: "",
updateTime: "",
updateUser: 0,
voteStemId: 0,
},
],
orderNumber: "",
updateTime: "",
updateUser: 0,
voteStemFlag: "",
voteStemId: 0,
voteStemName: "",
},
];
api
.createOptionMessage(obj)
.then((res) => {
console.log("创建成功", res);
console.log('res.data.data[0].ascriptionId',res.data.data[0].ascriptionId);
console.log('res.data.data[0].voteStemId',res.data.data[0].voteStemId);
message.success("创建成功");
ctx.emit("getData", state.creVote);
let stemData = {
creVote: state.creVote,
ascriptionId: res.data.data[0].ascriptionId,
voteStemId:res.data.data[0].voteStemId
};
ctx.emit("getData", stemData);
closeDrawer();
})
.catch((err) => {