diff --git a/src/components/drawers/AddVote.vue b/src/components/drawers/AddVote.vue index d13fe14e..57195b43 100644 --- a/src/components/drawers/AddVote.vue +++ b/src/components/drawers/AddVote.vue @@ -27,7 +27,7 @@ alt="" /> - 投票名称: + 任务名称:
创建题干
+
+ +
删除题干
+
@@ -44,7 +48,9 @@ alt="" />
- 题干 + {{ q.stemTit }}{{ index + 1 }}
-
+
- {{ o.title }} + {{ o.title }}{{index+1}}
-
- - + 上传图片 - 删除 +
+
+ + +
+ + 上传图片 +
-
-
添加选项
+
+
+
添加选项
+
@@ -112,14 +123,15 @@ export default { creVote: true, questions: [ { + stemTit: "题干", inputV: "", options: [ { - title: "选项1", + title: "选项", opvalue: "", }, { - title: "选项2", + title: "选项", opvalue: "", }, ], @@ -129,14 +141,15 @@ export default { const addQue = () => { state.questions.push({ + stemTit: "题干", inputV: "", options: [ { - title: "选项1", + title: "选项", opvalue: "", }, { - title: "选项2", + title: "选项", opvalue: "", }, ], @@ -145,10 +158,16 @@ export default { const addOpt = (value) => { console.log(value); value.push({ - title: "选项" + (value.length + 1 * 1), + // title: "选项" + (value.length + 1 * 1), + title: "选项", opvalue: "", }); }; + const delOpt = (value) => { + console.log('gys', value); + // delete value[0] + value.pop() + } const closeDrawer = () => { ctx.emit("update:crevoteVisible", false); @@ -171,7 +190,7 @@ export default { // message.destroy(); // return message.info("请输入选项"); // } - console.log('111111',state.questions); + console.log("111111", state.questions); // console.log('22222',state.questions.inputV); // console.log('333333',state.questions.options); let obj = [ @@ -207,11 +226,11 @@ export default { // 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 = { stemId: res.data.data[0].ascriptionId, ascriptionId: res.data.data[0].voteStemId, - } + }; api .queryStemByStemId(objstem) .then((res) => { @@ -240,6 +259,7 @@ export default { closeDrawer, addQue, addOpt, + delOpt, createQueTit, }; }, @@ -291,6 +311,7 @@ export default { display: flex; justify-content: end; align-items: center; + margin-right: 5px; .sign { margin-right: 5px; } @@ -299,24 +320,9 @@ export default { display: flex; flex: 1; align-items: center; - .tjxxbtn { - display: flex; - align-items: center; - justify-content: center; - cursor: pointer; - width: 130px; - height: 40px; - background: #388be1; - border-radius: 8px; - border: 0; - margin-right: 8px; - .btntext { - color: #fff; - } - } } } - .main_item2 { + .mainoptions { display: flex; align-items: flex-start; margin-bottom: 32px; @@ -325,43 +331,128 @@ export default { display: flex; justify-content: end; align-items: center; + padding-top: 5px; + margin-right: 5px; .sign { margin-right: 5px; } } - .kqszbox { - .qdqtbox { - margin-left: 56px; - } - .setbox { + .optionbox { + .btnbox { display: flex; - flex-wrap: wrap; - margin-top: 10px; - margin-bottom: 24px; - .timerbox { - margin-top: 6px; - margin-right: 32px; + align-items: center; + } + .delbtn { + border: none; + color: #4ea6ff; + background-color: #fff; + cursor: pointer; + } + } + } + .queBox { + border: 1px solid #e8e8e8; + box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21); + padding-top: 30px; + margin-bottom: 30px; + .delBtn { + width: 130px; + height: 40px; + border: 1px solid #4ea6ff; + border-radius: 8px; + color: #4ea6ff; + background-color: #fff; + cursor: pointer; + display: flex; + align-items: center; + justify-content: center; + margin-left: 20px; + margin-bottom: 20px; + img { + margin-right: 10px; + } + } + .main_item { + display: flex; + align-items: center; + margin-bottom: 32px; + .signbox { + width: 120px; + display: flex; + justify-content: end; + align-items: center; + .sign { + margin-right: 5px; + } + } + .btnbox { + display: flex; + flex: 1; + align-items: center; + .tjxxbtn { display: flex; align-items: center; - flex-wrap: nowrap; + justify-content: center; + cursor: pointer; + width: 130px; + height: 40px; + background: #388be1; + border-radius: 8px; + border: 0; + margin-right: 8px; + .btntext { + color: #fff; + } } } } - .btnbox2 { + .main_item2 { display: flex; - flex-direction: column; - justify-content: flex-start; - .xkbtn { - cursor: pointer; - width: 130px; - height: 40px; - background: #388be1; - border-radius: 8px; - border: 0; - margin-right: 16px 8px 32px 0; - color: #fff; - margin-top: 16px; - margin-bottom: 60px; + align-items: flex-start; + margin-bottom: 32px; + .signbox { + width: 120px; + display: flex; + justify-content: end; + align-items: center; + .sign { + margin-right: 5px; + } + } + .kqszbox { + .qdqtbox { + margin-left: 56px; + } + .setbox { + display: flex; + flex-wrap: wrap; + margin-top: 10px; + margin-bottom: 24px; + .timerbox { + margin-top: 6px; + margin-right: 32px; + display: flex; + align-items: center; + flex-wrap: nowrap; + } + } + } + .btnbox2 { + display: flex; + flex-direction: column; + justify-content: flex-start; + .xkbtn { + cursor: pointer; + width: 130px; + height: 40px; + background: #388be1; + border-radius: 8px; + border: 0; + margin-right: 16px 8px 32px 0; + color: #fff; + margin-top: 16px; + margin-bottom: 60px; + } } } }