mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
feat:创建投票
This commit is contained in:
@@ -79,9 +79,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 查看投票弹窗 -->
|
||||
<queryStem @closeDrawer="closeStem"
|
||||
v-model:addStemVisible="addStemVisible" />
|
||||
|
||||
|
||||
|
||||
@@ -102,6 +99,7 @@
|
||||
<div class="btnbox">
|
||||
<a-range-picker
|
||||
style="width: 424px"
|
||||
v-model:value="time"
|
||||
:placeholder="[' 开始时间', ' 结束时间']"
|
||||
/>
|
||||
</div>
|
||||
@@ -111,7 +109,12 @@
|
||||
<span style="margin-right: 3px">基础投票数:</span>
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<button class="xkbtn">点击上传</button>
|
||||
<a-upload
|
||||
@change="handleChange"
|
||||
action="/vote/baseVoteupload"
|
||||
v-model:file-list="fileList"
|
||||
>
|
||||
<button class="xkbtn">点击上传</button></a-upload>
|
||||
</div>
|
||||
</div>
|
||||
<div class="main_item" style="margin-top: -25px">
|
||||
@@ -150,13 +153,13 @@ import { message } from "ant-design-vue";
|
||||
import { RouterEditTask } from "@/api/indexTask";
|
||||
import dayjs from "dayjs";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import queryStem from "./queryStem.vue"
|
||||
import { addTempTask } from "../../api/indexTaskadd";
|
||||
|
||||
export default {
|
||||
name: "AddVote",
|
||||
components: {
|
||||
CreateVote,
|
||||
queryStem,
|
||||
CreateVote
|
||||
|
||||
},
|
||||
props: {
|
||||
addvoteVisible: {
|
||||
@@ -167,7 +170,7 @@ export default {
|
||||
type: Boolean,
|
||||
default: false,
|
||||
},
|
||||
voteId: {
|
||||
EditVoteId: {
|
||||
type: Number,
|
||||
default: null,
|
||||
},
|
||||
@@ -213,7 +216,7 @@ export default {
|
||||
basevote: "",
|
||||
ascriptionId: "",
|
||||
voteStemId: null,
|
||||
voteId:"",
|
||||
EditVoteId:"",
|
||||
voteStemName:"",
|
||||
ballotName: "",
|
||||
editStem: false, //编辑状态
|
||||
@@ -221,6 +224,7 @@ export default {
|
||||
optionId: "", //删除,修改选项id
|
||||
addStemVisible:false, //
|
||||
editChild:false,
|
||||
fileList: [],
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
state.inputV1 = "",
|
||||
@@ -231,54 +235,54 @@ export default {
|
||||
ctx.emit("update:edit", false);
|
||||
};
|
||||
const afterVisibleChange = () => {
|
||||
if(props.edit){
|
||||
queryVoteInfo();
|
||||
}
|
||||
|
||||
};
|
||||
const showDrawerCreVote = () => {
|
||||
state.createVoteVisible = true;
|
||||
state.editChild = props.edit;
|
||||
|
||||
};
|
||||
const getStemId = (data) => {
|
||||
state.ballotName = data.ballotName;
|
||||
state.ballotId =data.ballotId;
|
||||
}
|
||||
|
||||
const delBox = () => {
|
||||
state.creVote = false;
|
||||
};
|
||||
|
||||
const handleChange = info => {
|
||||
if (info.file.status !== "uploading") {
|
||||
|
||||
console.log("基础票数rinfo======",info);
|
||||
}
|
||||
};
|
||||
|
||||
//删除题干信息接口
|
||||
const dleVoteStem = () => {
|
||||
let objdelstem = {
|
||||
voteStemId:state.voteStemId
|
||||
}
|
||||
api.deleteVoteStem(objdelstem)
|
||||
api.deleteVoteStem({voteStemId:state.ballotId})
|
||||
.then(() => {
|
||||
message.success('删除题干信息成功')
|
||||
delBox()
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
//根据投票id获取投票信息
|
||||
const queryVoteInfo = ()=>{
|
||||
/**
|
||||
let obj = {
|
||||
voteId:props.voteId
|
||||
}
|
||||
.queryVoteText(obj)
|
||||
|
||||
api.queryVoteDetailById({voteId:props.EditVoteId})
|
||||
.then((res)=>{
|
||||
console.log('获取投票信息成功',res);
|
||||
state.inputV1 = res.data.data.voteName
|
||||
state.time = [dayjs(res.data.data.voteEndTime).format("YYYY-MM-DD"), dayjs(res.data.data.voteEndTime).format("YYYY-MM-DD")]
|
||||
state.textV1 = res.data.data.voteExplain
|
||||
state.baseVote = res.data.data.baseVote
|
||||
state.ascriptionId = res.data.data.ascriptionId
|
||||
state.ballotId = res.data.data.ballotId
|
||||
state.inputV1 = res.data.data.voteName;
|
||||
state.textV1 = res.data.data.voteExplain;
|
||||
state.baseVote = res.data.data.baseVote;
|
||||
state.ascriptionId = res.data.data.ascriptionId;
|
||||
state.ballotId = res.data.data.ballotId;
|
||||
state.time = [
|
||||
dayjs(res.data.data.voteStartTime, "YYYY-MM-DD"),
|
||||
dayjs(res.data.data.voteEndTime, "YYYY-MM-DD"),
|
||||
];
|
||||
})
|
||||
.catch((err)=>{
|
||||
console.log('获取投票信息失败',err);
|
||||
})
|
||||
**/
|
||||
});
|
||||
|
||||
|
||||
}
|
||||
const updateToTask =(res)=>{
|
||||
@@ -316,8 +320,24 @@ export default {
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
|
||||
});
|
||||
}else if(props.isLevel ==3){
|
||||
}else if (props.isLevel == 3) {
|
||||
console.log("");
|
||||
addTempTask({
|
||||
duration: 0,
|
||||
flag: true,
|
||||
courseId: Number(res.data.data.EditVoteId),
|
||||
name: res.data.data.data.voteName,
|
||||
projectId: props.projectId,
|
||||
projectTaskId: props.projectTaskId || 0,
|
||||
stageId: props.chooseStageId,
|
||||
type: 10,
|
||||
})
|
||||
.then(() => {
|
||||
message.success(`${props.edit ? "编辑" : "新增"}阶段任务成功`);
|
||||
})
|
||||
.catch(() => {
|
||||
message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||
});
|
||||
}
|
||||
}
|
||||
//修改投票信息接口
|
||||
@@ -326,6 +346,10 @@ export default {
|
||||
message.destroy();
|
||||
return message.info("请输入投票名称");
|
||||
}
|
||||
if (!state.ballotId) {
|
||||
message.destroy();
|
||||
return message.info("请创建题干信息");
|
||||
}
|
||||
|
||||
if (state.basevote == "") {
|
||||
state.basevote = 1;
|
||||
@@ -336,16 +360,14 @@ export default {
|
||||
}
|
||||
|
||||
let obj = {
|
||||
voteId: props.edit?state.voteId : 0,
|
||||
voteId: props.edit?state.EditVoteId : 0,
|
||||
voteName: state.inputV1,
|
||||
voteStartTime: state.startTime,
|
||||
voteEndTime: state.endTime,
|
||||
voteStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||
voteEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||
ballotId: state.ballotId,
|
||||
baseVote: state.basevote,
|
||||
voteExplain: state.textV1,
|
||||
createUser:0,
|
||||
updateUser:0,
|
||||
voteTag:"",
|
||||
|
||||
}
|
||||
if(props.edit){
|
||||
api
|
||||
@@ -383,13 +405,12 @@ export default {
|
||||
showDrawerCreVote,
|
||||
afterVisibleChange,
|
||||
closeDrawer,
|
||||
getStemId,
|
||||
queryVoteInfo,
|
||||
dleVoteStem,
|
||||
updateVoteInfo,
|
||||
delBox,
|
||||
queryStem,
|
||||
closeStem,
|
||||
handleChange,
|
||||
};
|
||||
},
|
||||
};
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
</div>
|
||||
<div class="btnbox">
|
||||
<a-input
|
||||
v-model:value="voteName"
|
||||
v-model:value="ballotName"
|
||||
style="width: 424px; height: 32px"
|
||||
placeholder="请输入任务名称"
|
||||
maxlength="20"
|
||||
@@ -47,7 +47,7 @@
|
||||
<!-- 创建投票侧弹窗 -->
|
||||
</div>
|
||||
<div v-for="(item, index) in allFormsData" :key="index">
|
||||
<VoteQuestion :item="item" :ballotId="ballotId" @del="handleDel" />
|
||||
<VoteQuestion :item="item" :optionId="optionId" @del="handleDel" />
|
||||
</div>
|
||||
|
||||
<div class="footer">
|
||||
@@ -84,20 +84,22 @@
|
||||
</template>
|
||||
<script>
|
||||
import { reactive, toRefs } from "vue";
|
||||
// import { message } from "ant-design-vue";
|
||||
import { message } from "ant-design-vue";
|
||||
// import { createResearch } from "../../api/indexResearch";
|
||||
import VoteQuestion from "./VoteQuestion.vue";
|
||||
|
||||
import {
|
||||
// sortBy,
|
||||
traverseArr,
|
||||
// filterCommon,
|
||||
//filterCommon,
|
||||
// deepCloneFilterString,
|
||||
} from "../../utils/utils";
|
||||
|
||||
//import store from "@/store";
|
||||
import * as api from "@/api/indexVote";
|
||||
//import { useRouter } from "vue-router";
|
||||
import {} from "@/api/indexResearch";
|
||||
|
||||
//import { message } from "ant-design-vue";
|
||||
|
||||
export default {
|
||||
@@ -124,51 +126,71 @@ export default {
|
||||
ballotId: "",
|
||||
ballotName: "",
|
||||
allFormsData: [],
|
||||
|
||||
});
|
||||
// const router = useRouter();
|
||||
const afterVisibleChange = () => {
|
||||
handleTypes();
|
||||
getInfoDate();
|
||||
|
||||
/*
|
||||
if(){
|
||||
|
||||
}else{
|
||||
handleTypes();
|
||||
}
|
||||
*/
|
||||
};
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:createVoteVisible", false);
|
||||
ctx.emit("update:ballotId", state.ballotId);
|
||||
handleAllCancel();
|
||||
};
|
||||
// 详情
|
||||
const getInfoDate = async () => {
|
||||
if (props.editChild) {
|
||||
//stemId 多余字段
|
||||
console.log("props.editChild=====",props.editChild);
|
||||
if (props.ballotId>0) {
|
||||
console.log("props.editChild2=====",props.editChild);
|
||||
let res = await api
|
||||
.queryStemByStemId({
|
||||
stemId: 0,
|
||||
ballotId: state.ballotId,
|
||||
})
|
||||
.queryStemByStemId({ballotId:props.ballotId})
|
||||
.then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
return res.data.data;
|
||||
}
|
||||
});
|
||||
state.ballotName = res[0].ballotId;
|
||||
let renderArr = [...res];
|
||||
console.log("res====",res);
|
||||
state.ballotName = res.ballotId;
|
||||
// let renderArr = [...res];
|
||||
// sortBy(renderArr, "orderNumber"); //序号
|
||||
state.allFormsData = parseData(renderArr); //类型
|
||||
state.allFormsData = parseData(res); //类型
|
||||
|
||||
console.log( state.allFormsData);
|
||||
}
|
||||
};
|
||||
getInfoDate();
|
||||
|
||||
|
||||
// 转换成前端格式
|
||||
const parseData = (arr) => {
|
||||
const resultArr = [];
|
||||
arr.forEach((item) => {
|
||||
state.ballotId = arr.ballotId;
|
||||
state.ballotName =arr.ballotName;
|
||||
|
||||
console.log("arr.voteStemVoList=====",arr.voteStemVoList);
|
||||
arr.voteStemVoList.forEach((item) => {
|
||||
let obj = {};
|
||||
let restList = traverseArr(item.optionDetailList, {
|
||||
inputVal: "singleOptionName",
|
||||
imgVal: "singleOptionPictureAddress",
|
||||
optionId: "singleOptionId",
|
||||
inputVal: "optionName",
|
||||
imgVal: "optionPictureAddress",
|
||||
optionId: "optionId",
|
||||
voteStemId:"voteStemId",
|
||||
stem:"stem",
|
||||
}).map((itm, idx) => {
|
||||
itm.id = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
|
||||
obj = {
|
||||
voteStemName: item.singleStemName,
|
||||
voteStemId:item.voteStemId,
|
||||
valueSingle: item.voteStemName,
|
||||
singleList: restList,
|
||||
};
|
||||
resultArr.push(obj);
|
||||
@@ -179,78 +201,41 @@ export default {
|
||||
});
|
||||
return resultArr;
|
||||
};
|
||||
/**
|
||||
|
||||
// 转换成后端格式
|
||||
const restData = (arr, typeKey) => {
|
||||
const restData = (arr) => {
|
||||
const resultArr = [];
|
||||
arr.forEach((item) => {
|
||||
let obj = {};
|
||||
if (item[typeKey] === 1) {
|
||||
console.log("item=======",item);
|
||||
// if (item[typeKey] === 1) {
|
||||
let restList = traverseArr(item.singleList, {
|
||||
singleOptionName: "inputVal",
|
||||
singleOptionPictureAddress: "imgVal",
|
||||
singleOptionId: "optionId",
|
||||
optionName: "inputVal",
|
||||
optionPictureAddress: "imgVal",
|
||||
optionId: "optionId",
|
||||
voteStemId:"voteStemId",
|
||||
stem:"stem",
|
||||
}).map((itm, idx) => {
|
||||
itm.optionOrderNum = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
restList.forEach((item) => {
|
||||
item.singleOptionId = item.singleOptionId
|
||||
? item.singleOptionId
|
||||
item.optionId = item.optionId
|
||||
? item.optionId
|
||||
: "";
|
||||
});
|
||||
|
||||
obj = {
|
||||
questionType: item[typeKey],
|
||||
singleStemName: item.valueSingle,
|
||||
singleList: restList,
|
||||
orderNumber: item.orderNumber,
|
||||
};
|
||||
resultArr.push(obj);
|
||||
}
|
||||
if (item[typeKey] === 2) {
|
||||
let restList = traverseArr(item.mutilList, {
|
||||
multipleOptionName: "inputVal",
|
||||
multipleOptionPictureAddress: "imgVal",
|
||||
multipleOptionId: "optionId",
|
||||
}).map((itm, idx) => {
|
||||
itm.optionOrderNum = idx + 1;
|
||||
return itm;
|
||||
});
|
||||
restList.forEach((item) => {
|
||||
item.multipleOptionId = item.multipleOptionId
|
||||
? item.multipleOptionId
|
||||
: "";
|
||||
});
|
||||
|
||||
obj = {
|
||||
questionType: item[typeKey],
|
||||
multipleStemName: item.valueMutil,
|
||||
mutilList: restList,
|
||||
orderNumber: item.orderNumber,
|
||||
voteStemName: item.valueSingle,
|
||||
optionDetailList: restList,
|
||||
voteStemId:item.voteStemId,
|
||||
|
||||
};
|
||||
resultArr.push(obj);
|
||||
}
|
||||
if (item[typeKey] === 3) {
|
||||
obj = {
|
||||
questionType: item[typeKey],
|
||||
assessmentQaTitle: item.valueAsk,
|
||||
assessmentQaDescribe: item.valueAskDesc,
|
||||
assessmentQaId: item.optionId ? item.optionId : "",
|
||||
};
|
||||
resultArr.push(obj);
|
||||
}
|
||||
if (item[typeKey] === 4) {
|
||||
obj = {
|
||||
questionType: item[typeKey],
|
||||
assessmentScTitle: item.valuePin,
|
||||
assessmentMinScore: item.minScore,
|
||||
assessmentMaxScore: item.maxScore,
|
||||
weightScale: item.pinQuan,
|
||||
assessmentScId: item.optionId ? item.optionId : "",
|
||||
};
|
||||
resultArr.push(obj);
|
||||
}
|
||||
// }
|
||||
console.log("resultArr=======",resultArr);
|
||||
|
||||
});
|
||||
resultArr.map((itm, idx) => {
|
||||
itm.orderNumber = idx + 1;
|
||||
@@ -260,55 +245,37 @@ export default {
|
||||
};
|
||||
|
||||
// 解散传值
|
||||
const parseItem = (arr) => {
|
||||
const filterComObj = filterCommon(arr, "questionType");
|
||||
const parseItem = (arrr) => {
|
||||
// const filterComObj = filterCommon(arr, "questionType");
|
||||
let resultObj = {};
|
||||
for (let key in filterComObj) {
|
||||
if (key === "1") {
|
||||
let arrSingle = filterComObj[key];
|
||||
// for (let key in filterComObj) {
|
||||
// if (key === "1") {
|
||||
// let arrSingle = arrr
|
||||
//filterComObj[key];
|
||||
console.log("arrr======",arrr);
|
||||
/*
|
||||
let arr = [];
|
||||
arrSingle.forEach((item) => {
|
||||
console.log("item======",item);
|
||||
if (item.singleList.length) {
|
||||
item.singleList.forEach((itm) => {
|
||||
arr.push({
|
||||
...itm,
|
||||
singleStemName: item.singleStemName,
|
||||
orderNumber: item.orderNumber,
|
||||
questionType: item.questionType,
|
||||
optionName: item.optionName,
|
||||
optionOrderNum: item.optionOrderNum,
|
||||
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
resultObj.assessmentSingleChoiceDtoList = arr;
|
||||
}
|
||||
if (key === "2") {
|
||||
let arrMulti = filterComObj[key];
|
||||
let arr = [];
|
||||
arrMulti.forEach((item) => {
|
||||
if (item.mutilList.length) {
|
||||
item.mutilList.forEach((itm) => {
|
||||
arr.push({
|
||||
...itm,
|
||||
multipleStemName: item.multipleStemName,
|
||||
orderNumber: item.orderNumber,
|
||||
questionType: item.questionType,
|
||||
});
|
||||
});
|
||||
}
|
||||
});
|
||||
resultObj.assessmentMultipleChoiceDtoList = arr;
|
||||
}
|
||||
if (key === "3") {
|
||||
resultObj.assessmentEssayQuestionDtoList = filterComObj[key];
|
||||
}
|
||||
if (key === "4") {
|
||||
resultObj.assessmentScoringQuestionDtoList = filterComObj[key];
|
||||
}
|
||||
}
|
||||
});*/
|
||||
resultObj.voteStemDtoList = arrr;
|
||||
// }
|
||||
console.log("resultObj======",resultObj);
|
||||
// }
|
||||
return resultObj;
|
||||
};
|
||||
|
||||
*/
|
||||
|
||||
const handleTypes = () => {
|
||||
let obj = {
|
||||
id: state.allFormsData.length,
|
||||
@@ -339,14 +306,21 @@ export default {
|
||||
};
|
||||
|
||||
const handleSave = () => {
|
||||
/**
|
||||
|
||||
let resultPost = {};
|
||||
|
||||
let filterData = parseItem(restData(state.allFormsData, "type"));
|
||||
|
||||
if (!state.ballotName) {
|
||||
return message.warning("请输入投票名称");
|
||||
}
|
||||
// 校验s
|
||||
|
||||
// 校验
|
||||
if (!checkVal(filterData)) {
|
||||
return false;
|
||||
}
|
||||
// checkVal(filterData);
|
||||
console.log(12121212);
|
||||
console.log(filterData);
|
||||
|
||||
@@ -356,105 +330,71 @@ export default {
|
||||
ballotName: state.ballotName,
|
||||
...filterData,
|
||||
};
|
||||
/*
|
||||
resultPost = deepCloneFilterString(resultPost, [
|
||||
"assessmentMaxScore",
|
||||
"assessmentMinScore",
|
||||
]);
|
||||
]);*/
|
||||
console.log(1212334);
|
||||
console.log(resultPost);
|
||||
editResearchMessage(resultPost).then((res) => {
|
||||
api.updateStemMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.ballotId=res.data.data.ballotId
|
||||
console.log("res.data.data==============",res.data.data);
|
||||
console.log("res.state.ballotId==============",state.ballotId);
|
||||
message.success("编辑成功");
|
||||
router.push({
|
||||
path: "/researchmanage",
|
||||
});
|
||||
closeDrawer();
|
||||
}
|
||||
});
|
||||
} else {
|
||||
resultPost = {
|
||||
ballotName: state.ballotNameNew,
|
||||
assessmentMark: state.valueMore,
|
||||
ballotName: state.ballotName,
|
||||
...filterData,
|
||||
};
|
||||
/*
|
||||
resultPost = deepCloneFilterString(resultPost, [
|
||||
"assessmentMaxScore",
|
||||
"assessmentMinScore",
|
||||
]);
|
||||
createOptionMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
message.success("创建成功");
|
||||
]);*/
|
||||
|
||||
console.log("=========",resultPost);
|
||||
api.createStemMessage(resultPost).then((res) => {
|
||||
if (res.data.code === 200) {
|
||||
state.ballotId=res.data.data.ballotId
|
||||
console.log("res.data.data2==============",res.data.data);
|
||||
console.log("res.state.ballotId=2s=============",state.ballotId);
|
||||
message.success("创建成功");
|
||||
closeDrawer();
|
||||
}
|
||||
});
|
||||
}
|
||||
*/
|
||||
|
||||
};
|
||||
const handleAllCancel = () => {
|
||||
state.allFormsData = [];
|
||||
};
|
||||
/**
|
||||
|
||||
const checkVal = (filterData) => {
|
||||
// 问答
|
||||
if (
|
||||
filterData.assessmentEssayQuestionDtoList &&
|
||||
filterData.assessmentEssayQuestionDtoList.length
|
||||
) {
|
||||
let arr = filterData.assessmentEssayQuestionDtoList;
|
||||
for (let item of arr) {
|
||||
if (!item.assessmentQaTitle) {
|
||||
message.error("问答题干为必填 请确认");
|
||||
console.log("filterData.====",filterData);
|
||||
console.log("filterData.voteStemVoList====",filterData.voteStemDtoList);
|
||||
|
||||
if(!filterData.voteStemDtoList){
|
||||
message.error("请添加题干");
|
||||
return false;
|
||||
}
|
||||
let arr = filterData.voteStemDtoList;
|
||||
arr.forEach((item) => {
|
||||
console.log("item===",item);
|
||||
console.log("!item.voteStemName===",!item.voteStemName);
|
||||
if (!item.voteStemName) {
|
||||
console.log("item.voteStemName===",item.voteStemName);
|
||||
message.error("题干为必填 请确认",item.voteStemName);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 多选
|
||||
if (
|
||||
filterData.assessmentMultipleChoiceDtoList &&
|
||||
filterData.assessmentMultipleChoiceDtoList.length
|
||||
) {
|
||||
let arr = filterData.assessmentMultipleChoiceDtoList;
|
||||
for (let item of arr) {
|
||||
if (!item.multipleStemName) {
|
||||
message.error("多选题干为必填 请确认");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
// 评分
|
||||
if (
|
||||
filterData.assessmentScoringQuestionDtoList &&
|
||||
filterData.assessmentScoringQuestionDtoList.length
|
||||
) {
|
||||
let CountNum = 0;
|
||||
let CountArr = filterData.assessmentScoringQuestionDtoList;
|
||||
for (let item of CountArr) {
|
||||
if (!item.assessmentScTitle) {
|
||||
message.error("评分题干为必填 请确认");
|
||||
return false;
|
||||
}
|
||||
CountNum += Number(item["weightScale"]);
|
||||
}
|
||||
if (CountNum !== 100) {
|
||||
message.error("当前权重设置是百分制 请重新配置");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// 单选
|
||||
if (
|
||||
filterData.assessmentSingleChoiceDtoList &&
|
||||
filterData.assessmentSingleChoiceDtoList.length
|
||||
) {
|
||||
let arr = filterData.assessmentSingleChoiceDtoList;
|
||||
for (let item of arr) {
|
||||
if (!item.singleStemName) {
|
||||
message.error("单选题干为必填 请确认");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
});
|
||||
return true;
|
||||
};
|
||||
*/
|
||||
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
|
||||
Reference in New Issue
Block a user