From c2b68cf5aaec80041ed978b04b71409fed9b3686 Mon Sep 17 00:00:00 2001 From: Ggysh-7 <102372376+Ggysh-7@users.noreply.github.com> Date: Mon, 14 Nov 2022 09:42:40 +0800 Subject: [PATCH] =?UTF-8?q?feat:=E6=8A=95=E7=A5=A8=E9=A2=98=E5=B9=B2?= =?UTF-8?q?=E5=88=A0=E9=99=A4=E5=92=8C=E9=80=89=E9=A1=B9=E5=88=A0=E9=99=A4?= =?UTF-8?q?\=E5=88=9B=E5=BB=BA=E5=88=A0=E9=99=A4=E9=A2=98=E5=B9=B2?= =?UTF-8?q?=E6=8E=A5=E5=8F=A3=E5=AF=B9=E6=8E=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/AddVote.vue | 41 +++++----- src/components/drawers/CreVote.vue | 120 +++++++++++++++-------------- vue.config.js | 1 + 3 files changed, 83 insertions(+), 79 deletions(-) diff --git a/src/components/drawers/AddVote.vue b/src/components/drawers/AddVote.vue index 57195b43..01647cc1 100644 --- a/src/components/drawers/AddVote.vue +++ b/src/components/drawers/AddVote.vue @@ -66,7 +66,7 @@
{{voteStemName}} -
+
@@ -74,7 +74,8 @@
@@ -195,7 +196,7 @@ export default { endTimes: "", startTimes: "", ascriptionId: "", - voteStemId: "", + voteStemId: null, voteId:"", voteStemName:"", }); @@ -209,6 +210,14 @@ export default { const showDrawerCreVote = () => { state.crevotevisible = true; }; + const getStemId = (data) => { + state.voteStemName = data.voteStemName; + state.voteStemId = Number(data.voteStemId); + state.creVote = data.creVote; + console.log('state.voteStemId', state.voteStemId); + console.log('state.voteStemId', state.creVote); + } + //暂时没用 之前给子用传参来着 const changeVData = (data) => { console.log("111", data); state.creVote = data.creVote; @@ -220,25 +229,11 @@ export default { }; const delBox = () => { state.creVote = false; - dleVoteStem() }; - //获取题干信息 - // const getStemText = () => { - // let objstem = { - // stemId: state.ascriptionId, - // ascriptionId: state.voteStemId, - // } - // api - // .queryStemByStemId(objstem) - // .then((res) => { - // console.log("获取成功", res); - // message.success("获取成功"); - // }) - // .catch((err) => { - // console.log(err); - // }); - // } + const updateTableData = (data) => { + console.log(data, 'data'); + } //删除题干信息接口 const dleVoteStem = () => { @@ -249,6 +244,7 @@ export default { .then((res) => { console.log('删除题干信息成功', res) message.success('删除题干信息成功') + delBox() }) } //创建投票信息 @@ -273,9 +269,6 @@ export default { ); } - // if (state.crevotevisible = false) { - // changeVData() - // }; let obj = { ascriptionId: state.ascriptionId, @@ -342,12 +335,14 @@ export default { showDrawerCreVote, afterVisibleChange, closeDrawer, + getStemId, changeVData, rowSelection, options1, dleVoteStem, createVoteText, delBox, + updateTableData, }; }, }; diff --git a/src/components/drawers/CreVote.vue b/src/components/drawers/CreVote.vue index 826218f8..7ac4071e 100644 --- a/src/components/drawers/CreVote.vue +++ b/src/components/drawers/CreVote.vue @@ -111,7 +111,7 @@ - -