mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-23 01:36:47 +08:00
feat:投票参数修改
This commit is contained in:
@@ -159,15 +159,21 @@ export default {
|
||||
|
||||
//创建题干接口
|
||||
const createQueTit = () => {
|
||||
if (!state.questions[0].inputV) {
|
||||
if (state.inputV1 == "") {
|
||||
message.destroy();
|
||||
return message.info("请输入题干");
|
||||
return message.info("请输入投票名称");
|
||||
}
|
||||
// if (!state.questions.inputV) {
|
||||
// message.destroy();
|
||||
// return message.info("请输入题干");
|
||||
// }
|
||||
// if (!state.questions.optins.opvalue) {
|
||||
// message.destroy();
|
||||
// return message.info("请输入选项");
|
||||
// }
|
||||
console.log(state.questions[0].inputV);
|
||||
console.log('111111',state.questions);
|
||||
// console.log('22222',state.questions.inputV);
|
||||
// console.log('333333',state.questions.options);
|
||||
let obj = [
|
||||
{
|
||||
ascriptionId: 0,
|
||||
@@ -176,7 +182,7 @@ export default {
|
||||
{
|
||||
createUser: 0,
|
||||
optionId: 0,
|
||||
optionName: "",
|
||||
optionName: state.questions[0].options[0].opvalue,
|
||||
optionOrderNum: "",
|
||||
optionPictureAddress: "",
|
||||
stem: "",
|
||||
@@ -190,15 +196,16 @@ export default {
|
||||
updateUser: 0,
|
||||
voteStemFlag: "",
|
||||
voteStemId: 0,
|
||||
voteStemName: "",
|
||||
voteStemName: state.questions[0].inputV,
|
||||
},
|
||||
];
|
||||
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);
|
||||
// console.log('res.data.data[0].ascriptionId',res.data.data[0].ascriptionId);
|
||||
// console.log('res.data.data[0].voteStemId',res.data.data[0].voteStemId);
|
||||
// console.log('state.questions[0].inputV',state.questions[0].inputV);
|
||||
message.success("创建成功");
|
||||
//获取题干信息
|
||||
let objstem = {
|
||||
@@ -217,7 +224,8 @@ export default {
|
||||
let stemData = {
|
||||
creVote: state.creVote,
|
||||
ascriptionId: res.data.data[0].ascriptionId,
|
||||
voteStemId:res.data.data[0].voteStemId
|
||||
voteStemId: res.data.data[0].voteStemId,
|
||||
voteStemName: state.questions[0].inputV,
|
||||
};
|
||||
ctx.emit("getData", stemData);
|
||||
closeDrawer();
|
||||
|
||||
Reference in New Issue
Block a user