From 0f041d8ba0ccb0fa6c084036e02c847535d6462a Mon Sep 17 00:00:00 2001 From: kclf <1195754634@qq.com> Date: Mon, 5 Dec 2022 11:11:06 +0800 Subject: [PATCH] t --- src/components/vote/CreateVote.vue | 19 ++++--- src/components/vote/VoteQuestion.vue | 11 +--- src/components/vote/VoteQuestionItem.vue | 5 -- src/views/research/ResearchAdd.vue | 56 +++++-------------- .../research/components/ResearchAddItem.vue | 26 ++++----- .../research/components/ResearchAddSingle.vue | 42 ++++---------- 6 files changed, 49 insertions(+), 110 deletions(-) diff --git a/src/components/vote/CreateVote.vue b/src/components/vote/CreateVote.vue index c46b96a1..4ebd6111 100644 --- a/src/components/vote/CreateVote.vue +++ b/src/components/vote/CreateVote.vue @@ -47,7 +47,10 @@ -
+
@@ -252,6 +255,13 @@ export default { console.log(888888888); console.log(id); console.log(curItem); + // 接口删除 + if (curItem.voteStemId) { + api.deleteVoteStem(curItem.voteStemId).then((res) => { + console.log(56444); + console.log(res); + }); + } // 前端删除 state.allFormsData.forEach((item, index) => { if (item.id === id) { @@ -264,13 +274,6 @@ export default { item.id = index + 1; return item; }); - // 接口删除 - if (curItem.voteStemId) { - api.deleteVoteStem(curItem.voteStemId).then((res) => { - console.log(56444); - console.log(res); - }); - } }; const handleSave = () => { diff --git a/src/components/vote/VoteQuestion.vue b/src/components/vote/VoteQuestion.vue index 142fbd81..3aef2b9f 100644 --- a/src/components/vote/VoteQuestion.vue +++ b/src/components/vote/VoteQuestion.vue @@ -26,9 +26,8 @@ { - curItem.value.optionDetailList.forEach((item) => { - if (item.id === id) { - item.inputVal = val; - } - }); - }; const imgSrc = ({ id, src }) => { curItem.value.optionDetailList.forEach((item) => { if (item.id === id) { @@ -124,7 +116,6 @@ export default { curItem, handleTypesDel, handleSingleAdd, - input, imgSrc, delImg, del, diff --git a/src/components/vote/VoteQuestionItem.vue b/src/components/vote/VoteQuestionItem.vue index 1a44f0a5..347b6245 100644 --- a/src/components/vote/VoteQuestionItem.vue +++ b/src/components/vote/VoteQuestionItem.vue @@ -12,7 +12,6 @@ show-count :maxlength="30" style="border-radius: 8px" - @change="handleInput" />
@@ -67,9 +66,6 @@ export default { hasImgName: "", }); - const handleInput = () => { - emit("input", { id: curItem.value.id, val: curItem.value.inputVal }); - }; const handleDel = () => { handleCancel(); emit("del", { id: curItem.value.id, optionId: curItem.value.optionId }); @@ -112,7 +108,6 @@ export default { return { ...toRefs(state), curItem, - handleInput, handleDel, handleCancel, beforeUpload, diff --git a/src/views/research/ResearchAdd.vue b/src/views/research/ResearchAdd.vue index 62a5fa61..9c8c1d95 100644 --- a/src/views/research/ResearchAdd.vue +++ b/src/views/research/ResearchAdd.vue @@ -17,7 +17,10 @@
问答题
评分题
-
+