投票字段校验

This commit is contained in:
zhangyc
2022-12-05 22:11:22 +08:00
parent 7fe1e72afc
commit 53256b70b5
2 changed files with 51 additions and 5 deletions

View File

@@ -55,7 +55,7 @@
<div v-if="ballotId > 0">
<a-tag closable color="processing" @close="handlelog">
<span style="font-size: 14px; line-height: 33px">
删除投票
{{ ballot_name }}
</span>
</a-tag>
</div>
@@ -64,6 +64,7 @@
v-model:createVoteVisible="createVoteVisible"
v-model:ballotId="ballotId"
v-model:editChild="editChild"
v-model:ballot_name="ballot_name"
/>
</div>
<button
@@ -75,7 +76,7 @@
</button>
<div :style="{ display: creVote ? 'block' : 'none' }">
<div class="fileTigan">
<span style="color: #388be1">{{ ballotName }}</span>
<span style="color: #388be1">{{ ballot_name }}</span>
<div class="delBox" @click="dleVoteStem()"></div>
</div>
</div>
@@ -93,6 +94,12 @@
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">起止时间</span>
</div>
<div class="btnbox">
@@ -105,6 +112,12 @@
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
</div>
<span style="margin-right: 3px">基础投票数</span>
</div>
<div class="btnbox">
@@ -142,6 +155,7 @@
v-model:value="textV1"
placeholder="请输入投票说明"
allow-clear
:rows="6"
maxlength="150"
/>
</div>
@@ -231,7 +245,7 @@ export default {
voteStemId: null,
EditVoteId: "",
voteStemName: "",
ballotName: "",
ballot_name: "",
editStem: false, //编辑状态
ballotId: 0, //题干id
optionId: "", //删除修改选项id
@@ -240,6 +254,7 @@ export default {
fileList: [],
voteCount: null,
projectTemplateId: null,
});
const closeDrawer = () => {
(state.inputV1 = ""),
@@ -289,6 +304,7 @@ export default {
console.log("file========", file);
console.log("file========", file.response);
state.voteCount = file.response.data;
}
});
//fileList.value = resFileList;
@@ -386,8 +402,12 @@ export default {
return message.info("请创建题干信息");
}
if (state.basevote == "") {
state.basevote = 1;
if (!state.time) {
message.destroy();
return message.warning("请输入直播时间");
}
if (!state.basevote) {
return message.info("请上传投票基数");
}
if (state.time != undefined) {
state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD");
@@ -672,6 +692,27 @@ export default {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.textarea {
width: 423px;
.ant-input {
width: 100%;
}
.ant-input-textarea-show-count {
position: relative;
}
.ant-input-textarea-show-count::after {
position: absolute;
right: 10px;
bottom: 0px;
}
.ant-input {
border-radius: 8px;
}
}
.signbox {
width: 120px;