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 @@
-
+
-

+
任务名称:
-

+
创建投票:
-
+
-
@@ -73,12 +108,23 @@
基础投票数:
-
- 点击上传
-
+
+ 点击上传
+
+
+
+ {{ voteCount }}票
+
+
+
@@ -92,7 +138,12 @@
投票说明:
@@ -117,8 +168,7 @@ import { addTempTask } from "../../api/indexTaskadd";
export default {
name: "AddVote",
components: {
- CreateVote
-
+ CreateVote,
},
props: {
addvoteVisible: {
@@ -145,11 +195,13 @@ export default {
type: Number,
default: 0,
},
- isLevel: { // 是否是关卡页面触发
+ isLevel: {
+ // 是否是关卡页面触发
type: Number,
default: null,
},
- projectTaskId: { // 要编辑的projectId
+ projectTaskId: {
+ // 要编辑的projectId
type: Number,
default: null,
},
@@ -164,9 +216,7 @@ export default {
projectTemplateId: {
type: Number,
default: null,
- }
-
-
+ },
},
setup(props, ctx) {
const state = reactive({
@@ -182,7 +232,7 @@ export default {
EditVoteId: "",
voteStemName: "",
ballotName: "",
- editStem: false, //编辑状态
+ editStem: false, //编辑状态
ballotId: 0, //题干id
optionId: "", //删除,修改选项id
addStemVisible: false, //
@@ -190,14 +240,13 @@ export default {
fileList: [],
voteCount: null,
projectTemplateId: null,
-
});
const closeDrawer = () => {
- state.inputV1 = "",
- state.textV1 = "",
- state.time = undefined,
- state.basevote = "",
- state.ballotId = "",
+ (state.inputV1 = ""),
+ (state.textV1 = ""),
+ (state.time = undefined),
+ (state.basevote = ""),
+ (state.ballotId = ""),
ctx.emit("update:addvoteVisible", false);
ctx.emit("update:edit", false);
};
@@ -207,38 +256,33 @@ export default {
}
state.projectTemplateId = props.projectTemplateId;
console.log("projectTemplateId visible====", state.projectTemplateId);
-
};
-
const showDrawerCreVote = () => {
state.createVoteVisible = true;
state.editChild = props.edit;
-
-
};
// 限制文件格式上传
const beforeUpload = (obj) => {
- console.log(obj)
- }
+ console.log(obj);
+ };
- const handleChange = info => {
- console.log(info.file.type, info.file.type.indexOf('sheet'))
- if (info.file.type.indexOf('sheet') == -1) {
- message.destroy()
- message.error("请上传正确的文件格式")
+ const handleChange = (info) => {
+ console.log(info.file.type, info.file.type.indexOf("sheet"));
+ if (info.file.type.indexOf("sheet") == -1) {
+ message.destroy();
+ message.error("请上传正确的文件格式");
- console.log(state.fileList)
+ console.log(state.fileList);
- state.fileList = []
- return
+ state.fileList = [];
+ return;
}
let resFileList = [...info.fileList];
-
- resFileList.map(file => {
+ resFileList.map((file) => {
if (file.response) {
// Component will show file.url as link
file.url = file.response.url;
@@ -246,26 +290,23 @@ export default {
console.log("file========", file.response);
state.voteCount = file.response.data;
}
-
});
//fileList.value = resFileList;
};
//删除题干信息接口
const dleVoteStem = () => {
- api.deleteVoteStem({ voteStemId: state.ballotId })
- .then(() => {
- message.success('删除题干信息成功')
-
- })
- }
+ api.deleteVoteStem({ voteStemId: state.ballotId }).then(() => {
+ message.success("删除题干信息成功");
+ });
+ };
//根据投票id获取投票信息
const queryVoteInfo = () => {
-
- api.queryVoteDetailById(props.EditVoteId)
+ api
+ .queryVoteDetailById(props.EditVoteId)
.then((res) => {
- console.log('获取投票信息成功', res);
+ console.log("获取投票信息成功", res);
state.inputV1 = res.data.data.voteName;
state.textV1 = res.data.data.voteExplain;
state.baseVote = res.data.data.baseVote;
@@ -277,11 +318,9 @@ export default {
];
})
.catch((err) => {
- console.log('获取投票信息失败', err);
+ console.log("获取投票信息失败", err);
});
-
-
- }
+ };
const updateToTask = (res) => {
console.log("props.isLevel=====", props.isLevel);
if (props.isLevel == 1) {
@@ -319,7 +358,6 @@ export default {
////message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
});
} else if (props.isLevel == 3) {
-
addTempTask({
courseId: res.data.data.voteId,
name: res.data.data.voteName,
@@ -336,7 +374,7 @@ export default {
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
}
- }
+ };
//修改投票信息接口
const updateVoteInfo = () => {
if (!state.inputV1) {
@@ -364,8 +402,7 @@ export default {
ballotId: state.ballotId,
baseVote: state.basevote,
voteExplain: state.textV1,
-
- }
+ };
if (props.edit) {
api
.editVote(obj)
@@ -374,12 +411,12 @@ export default {
await updateToTask(res);
closeDrawer();
message.destroy();
- message.success("修改投票信息成功")
+ message.success("修改投票信息成功");
})
.catch(() => {
message.destroy();
- message.error("修改投票信息失败")
- })
+ message.error("修改投票信息失败");
+ });
} else {
api
.createVote(obj)
@@ -387,22 +424,21 @@ export default {
await updateToTask(res);
closeDrawer();
message.destroy();
- message.success("创建投票信息成功")
+ message.success("创建投票信息成功");
})
.catch(() => {
message.destroy();
- message.error("创建投票信息失败")
- })
+ message.error("创建投票信息失败");
+ });
}
-
- }
+ };
const queryStem = () => {
state.addStemVisible = true;
};
const closeStem = () => {
state.addStemVisible = false;
};
- const log = e => {
+ const log = (e) => {
state.ballotId = null;
console.log(e);
};
@@ -450,8 +486,10 @@ export default {
position: absolute;
width: calc(100%);
height: 40px;
- background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
- rgba(78, 166, 255, 0) 100%);
+ background: linear-gradient(
+ rgba(78, 166, 255, 0.2) 0%,
+ rgba(78, 166, 255, 0) 100%
+ );
}
.del_main {
diff --git a/src/components/vote/CreateVote copy.vue b/src/components/vote/CreateVote copy.vue
new file mode 100644
index 00000000..74f9ae1e
--- /dev/null
+++ b/src/components/vote/CreateVote copy.vue
@@ -0,0 +1,626 @@
+
+
+
+
+
+
+
+
+
+

+
+
投票名称:
+
+
+
+
+
+
+

+
+
创建题干:
+
+
+ 添加题干
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/vote/CreateVote.vue b/src/components/vote/CreateVote.vue
index 36a713f3..803d594e 100644
--- a/src/components/vote/CreateVote.vue
+++ b/src/components/vote/CreateVote.vue
@@ -1,12 +1,20 @@
-
+
-
+
+
diff --git a/src/components/vote/VoteQuestionItem.vue b/src/components/vote/VoteQuestionItem.vue
index d38f3bc6..1a44f0a5 100644
--- a/src/components/vote/VoteQuestionItem.vue
+++ b/src/components/vote/VoteQuestionItem.vue
@@ -7,27 +7,41 @@
选项{{ item.id }}
删除
-
+
+添加图片
{{ hasImgName }}
-

+ "
+ src="../../assets/images/basicinfo/close.png"
+ @click="handleCancel"
+ />
@@ -53,14 +67,12 @@ export default {
hasImgName: "",
});
- const handleInput = (value) => {
- console.log(value.target.value)
- emit("edit", curItem)
- emit("input", { id: curItem.value.id, val: value.target.value });
+ 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, data: curItem });
+ emit("del", { id: curItem.value.id, optionId: curItem.value.optionId });
};
const handleCancel = () => {
state.hasImgName = "";
@@ -87,6 +99,7 @@ export default {
const formData = new FormData();
formData.append("file", file);
+ console.log(file);
fileUp(formData).then((res) => {
if (res.data.code === 200) {
state.hasImgName = file.name;
@@ -381,7 +394,8 @@ export default {
//line-height: 24px;
}
- .ant-radio-wrapper {}
+ .ant-radio-wrapper {
+ }
.ant-input {
border-radius: 5px;
diff --git a/src/components/vote/queryStem.vue b/src/components/vote/queryStem.vue
index e3be6c23..84336677 100644
--- a/src/components/vote/queryStem.vue
+++ b/src/components/vote/queryStem.vue
@@ -1,86 +1,92 @@
-
-
-
投票查看
-
-
{{index+1}}. {{item.voteStemName}}
-
-
- {{item.optionDetailList[0].optionName}}
-
-
- {{item.optionDetailList[1].optionName}}
-
-
-
-
-
+
+
+
投票查看
+
+
{{ index + 1 }}. {{ item.voteStemName }}
+
+
+ {{ item.optionDetailList[0].optionName }}
+
+
+ {{ item.optionDetailList[1].optionName }}
+
+
+
+
\ No newline at end of file
diff --git a/src/utils/utils.js b/src/utils/utils.js
index c3c7891d..7bcad4bf 100644
--- a/src/utils/utils.js
+++ b/src/utils/utils.js
@@ -57,19 +57,16 @@ export function deepCloneFilterString(obj, fillterKeys) {
return obj;
}
-export function sortBy(arr, ...keys) {
+export function sortBy(arr, key) {
return arr.sort((x, y) => {
- for (const key of keys) {
- const valueX = typeof key === "function" ? key(x) : x[key];
- const valueY = typeof key === "function" ? key(y) : y[key];
- if (valueX > valueY) {
- return 1;
- }
- if (valueX < valueY) {
- return -1;
- }
+ const valueX = parseInt(x[key]);
+ const valueY = parseInt(y[key]);
+ if (valueX > valueY) {
+ return 1;
+ }
+ if (valueX < valueY) {
+ return -1;
}
- return 0;
});
}
diff --git a/src/views/research/ResearchAdd.vue b/src/views/research/ResearchAdd.vue
index 3a97ca47..20daa596 100644
--- a/src/views/research/ResearchAdd.vue
+++ b/src/views/research/ResearchAdd.vue
@@ -88,7 +88,7 @@
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 @@
问答题
评分题
-