From 93ad2e4f710b0c40431ae82e6f33552c37116d97 Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Mon, 5 Dec 2022 00:12:32 +0800 Subject: [PATCH 01/15] =?UTF-8?q?--=E9=A1=B9=E7=9B=AE=20=E5=88=86=E9=A1=B5?= =?UTF-8?q?=E4=B8=8D=E5=AF=B9=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/drawers/ProjCheckPower.vue | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/drawers/ProjCheckPower.vue b/src/components/drawers/ProjCheckPower.vue index 0019545a..305d1e1f 100644 --- a/src/components/drawers/ProjCheckPower.vue +++ b/src/components/drawers/ProjCheckPower.vue @@ -617,7 +617,7 @@ export default { //快速选人 pageSize: 10, currentPage: 1, - tableDataTotal: 100, + tableDataTotal: 0, nameSearch: "", //搜索名称 loading: false, //受众 @@ -828,7 +828,7 @@ export default { // }; onMounted(() => { window.addEventListener("resize", getClientHeight, false); - state.tabledata = store.state.memberInitInfo; + // state.tabledata = store.state.memberInitInfo; }); onUnmounted(() => { window.removeEventListener("resize", getClientHeight, false); From 31721d0538d0be959fb95fa0568eeb4daf93e68c Mon Sep 17 00:00:00 2001 From: yuping <82253452@qq.com> Date: Mon, 5 Dec 2022 00:36:49 +0800 Subject: [PATCH 02/15] =?UTF-8?q?--=E9=A1=B9=E7=9B=AE=20=E5=BC=80=E8=AF=BE?= =?UTF-8?q?=E5=AD=A6=E5=91=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/courselibrary/CoursewareManage.vue | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/views/courselibrary/CoursewareManage.vue b/src/views/courselibrary/CoursewareManage.vue index 063a7e63..970cb9cc 100644 --- a/src/views/courselibrary/CoursewareManage.vue +++ b/src/views/courselibrary/CoursewareManage.vue @@ -2439,7 +2439,7 @@
- + 添加学员
@@ -3752,10 +3752,11 @@ export default defineComponent({ newCourseName: null, //新建开课名称 }); - const showStuAdd = () => { - state.viewpowervisible = true; + const showStuAdd = (record) => { + state.selectCourseId = record.offcoursePlanId; state.shipType = 2; state.authClassify = 3; + state.viewpowervisible = true; }; // 富文本 sssssssssssssss @@ -5309,29 +5310,31 @@ export default defineComponent({ //权限名单 const showPrower = (record) => { // console.log("record", record); - state.corpowerlistvisible = true; state.selectCourseId = record.offcourseId; + state.corpowerlistvisible = true; }; //归属权 const showOwnPrower = (record) => { // console.log("record", record); - state.ownpowervisible = true; state.selectCourseId = record.offcourseId; + state.ownpowervisible = true; }; //查看权 const showViewPrower = (record) => { // console.log("record", record); - state.viewpowervisible = true; state.selectCourseId = record.offcourseId; state.authClassify = 1; + state.viewpowervisible = true; }; //管理权 const showManagePrower = (record) => { // console.log("record", record); - state.viewpowervisible = true; + console.log(22222222) + console.log(record) state.selectCourseId = record.offcourseId; state.shipType = 1; state.authClassify = 2; + state.viewpowervisible = true; }; //添加权限 watch( From 14568127bf3160780a91c25b5b46f9fb8b178540 Mon Sep 17 00:00:00 2001 From: kclf <1195754634@qq.com> Date: Mon, 5 Dec 2022 01:26:17 +0800 Subject: [PATCH 03/15] =?UTF-8?q?=E9=83=A8=E5=88=86=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/indexVote.js | 46 +- src/components/drawers/AddVote1.vue | 3 +- src/components/vote/AddVote.vue | 206 +++--- src/components/vote/CreateVote copy.vue | 626 ++++++++++++++++++ src/components/vote/CreateVote.vue | 253 +++---- src/components/vote/VoteQuestion copy.vue | 522 +++++++++++++++ src/components/vote/VoteQuestion.vue | 82 +-- src/components/vote/VoteQuestionItem copy.vue | 495 ++++++++++++++ src/components/vote/VoteQuestionItem.vue | 36 +- src/components/vote/queryStem.vue | 148 +++-- src/utils/utils.js | 19 +- src/views/research/ResearchAdd.vue | 30 +- .../research/components/ResearchAddAsk.vue | 2 +- .../research/components/ResearchAddMulti.vue | 2 +- .../research/components/ResearchAddPin.vue | 2 +- .../research/components/ResearchAddSingle.vue | 11 +- 16 files changed, 2065 insertions(+), 418 deletions(-) create mode 100644 src/components/vote/CreateVote copy.vue create mode 100644 src/components/vote/VoteQuestion copy.vue create mode 100644 src/components/vote/VoteQuestionItem copy.vue diff --git a/src/api/indexVote.js b/src/api/indexVote.js index 07d1d268..171bbf60 100644 --- a/src/api/indexVote.js +++ b/src/api/indexVote.js @@ -1,6 +1,5 @@ import http from "./config"; -import qs from 'qs'; - +import qs from "qs"; /** * 接口传参数方式(get) @@ -42,42 +41,49 @@ import qs from 'qs'; // 接口-请求 //基础票数上传接口 -export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj, { - headers: { - 'token': '123', - 'Content-Type': 'multipart/form-data', - - } -}) +export const baseVoteupload = (obj) => + http.post("/vote/baseVoteupload", obj, { + headers: { + token: "123", + "Content-Type": "multipart/form-data", + }, + }); //创建题干信息接口 -export const createStemMessage = (obj) => http.post('/vote/createOptionMessage', obj) - +export const createStemMessage = (obj) => + http.post("/vote/createOptionMessage", obj); //投票信息创建接口 -export const createVote = (obj) => http.post('/vote/createVote', obj) +export const createVote = (obj) => http.post("/vote/createVote", obj); //删除投票信息 -export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj }) +export const deleteVoteMessage = (obj) => + http.post("/vote/deleteVoteMessage", { params: obj }); //删除题干信息接口 -export const deleteVoteStem = (voteStemId) => http.post(`/vote/deleteVoteStem?voteStemId=${voteStemId}`) +export const deleteVoteStem = (voteStemId) => + http.post(`/vote/deleteVoteStem?voteStemId=${voteStemId}`); //删除题选项息接口 -export const deleteVoteStemOption = (optionId) => http.post(`/vote/deleteVoteStemOption?optionId=${optionId}`) +export const deleteVoteStemOption = (optionId) => + http.post(`/vote/deleteVoteStemOption?optionId=${optionId}`); //修改投票信息接口 -export const editVote = (obj) => http.post('/vote/editVote', obj) +export const editVote = (obj) => http.post("/vote/editVote", obj); //根据题干ID获取题干信息 -export const queryStemByStemId = (ballotId) => http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`) +export const queryStemByStemId = (ballotId) => + http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`); //修改题干信息接口 -export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj); +export const updateStemMessage = (obj) => + http.post("/vote/updateStemMessage", obj); //上传组件 -export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj })); +export const fileUp = (obj) => + http.post("/file/upload", obj, qs.stringify({ obj })); //根据题干ID获取投票任务 -export const queryVoteDetailById = (voteID) => http.post(`/vote/queryVoteDetailById?voteId=${voteID}`) +export const queryVoteDetailById = (voteID) => + http.post(`/vote/queryVoteDetailById?voteId=${voteID}`); // 测试方法 // import * as api from '../../api/index' diff --git a/src/components/drawers/AddVote1.vue b/src/components/drawers/AddVote1.vue index 7ad5cc8d..a1b54fe3 100644 --- a/src/components/drawers/AddVote1.vue +++ b/src/components/drawers/AddVote1.vue @@ -168,8 +168,7 @@ export default { localStorage.setItem("chapterId", props.isactive); }; - const afterVisibleChange = () => { - }; + const afterVisibleChange = () => {}; const showDrawer = () => { state.visible = true; diff --git a/src/components/vote/AddVote.vue b/src/components/vote/AddVote.vue index ef50165a..d3a03f3a 100644 --- a/src/components/vote/AddVote.vue +++ b/src/components/vote/AddVote.vue @@ -1,49 +1,76 @@ diff --git a/src/views/research/ResearchAdd.vue b/src/views/research/ResearchAdd.vue index 20daa596..62a5fa61 100644 --- a/src/views/research/ResearchAdd.vue +++ b/src/views/research/ResearchAdd.vue @@ -420,7 +420,7 @@ export default { console.log(888888888); console.log(id); console.log(curItem); - + // 前端删除 state.allFormsData.forEach((item, index) => { if (item.id === id) { state.allFormsData.splice(index, 1); @@ -433,58 +433,60 @@ export default { return item; }); reload(); - - if (type === 1) { - console.log(11111); - console.log(curItem); - deleteChoiceQuestion({ - assessmentId: state.assessmentId, - questionType: "1", - orderNumber: curItem.orderNumber, - }).then((res) => { - console.log(56444); - console.log(res); - reload(); - }); - } - if (type === 2) { - console.log(11111); - console.log(curItem); - deleteChoiceQuestion({ - assessmentId: state.assessmentId, - questionType: "2", - orderNumber: curItem.orderNumber, - }).then((res) => { - console.log(56444); - console.log(res); - reload(); - }); - } - if (type === 3) { - console.log(2222); - console.log(curItem); - deleteQuestionScAndQa({ - assessmentId: state.assessmentId, - questionType: "3", - optionId: curItem.optionId, - }).then((res) => { - console.log(56444); - console.log(res); - reload(); - }); - } - if (type === 4) { - console.log(2222); - console.log(curItem); - deleteQuestionScAndQa({ - assessmentId: state.assessmentId, - questionType: "4", - optionId: curItem.optionId, - }).then((res) => { - console.log(56444); - console.log(res); - reload(); - }); + // 接口删除 + if (state.assessmentId && curItem.orderNumber) { + if (type === 1) { + console.log(11111); + console.log(curItem); + deleteChoiceQuestion({ + assessmentId: state.assessmentId, + questionType: "1", + orderNumber: curItem.orderNumber, + }).then((res) => { + console.log(56444); + console.log(res); + reload(); + }); + } + if (type === 2) { + console.log(11111); + console.log(curItem); + deleteChoiceQuestion({ + assessmentId: state.assessmentId, + questionType: "2", + orderNumber: curItem.orderNumber, + }).then((res) => { + console.log(56444); + console.log(res); + reload(); + }); + } + if (type === 3) { + console.log(2222); + console.log(curItem); + deleteQuestionScAndQa({ + assessmentId: state.assessmentId, + questionType: "3", + optionId: curItem.optionId, + }).then((res) => { + console.log(56444); + console.log(res); + reload(); + }); + } + if (type === 4) { + console.log(2222); + console.log(curItem); + deleteQuestionScAndQa({ + assessmentId: state.assessmentId, + questionType: "4", + optionId: curItem.optionId, + }).then((res) => { + console.log(56444); + console.log(res); + reload(); + }); + } } }; diff --git a/src/views/research/components/ResearchAddSingle.vue b/src/views/research/components/ResearchAddSingle.vue index 5b26f2eb..9fe4da40 100644 --- a/src/views/research/components/ResearchAddSingle.vue +++ b/src/views/research/components/ResearchAddSingle.vue @@ -126,6 +126,7 @@ export default { }); }; const del = ({ id, optionId }) => { + // 前端删除 curItem.value.singleList.forEach((item, index) => { if (item.id === id) { curItem.value.singleList.splice(index, 1); @@ -134,15 +135,17 @@ export default { curItem.value.singleList.map((item, index) => { item.id = index + 1; }); - - deleteChoiceQuestion({ - assessmentId: assessmentId.value, - questionType: "1", - optionId, - }).then((res) => { - console.log(56444); - console.log(res); - }); + // 接口删除 + if (assessmentId.value && optionId) { + deleteChoiceQuestion({ + assessmentId: assessmentId.value, + questionType: "1", + optionId, + }).then((res) => { + console.log(56444); + console.log(res); + }); + } }; return { 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 09/15] 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 @@
问答题
评分题
-
+