feat:合并

This commit is contained in:
李晓鸽
2022-11-03 17:52:40 +08:00
parent 6b6f3228f6
commit a6ae87d885
6 changed files with 83 additions and 47 deletions

View File

@@ -103,7 +103,7 @@
</div>
</a-drawer>
</template>
<script>
<script>
import { reactive, toRefs, ref } from "vue";
import CreVote from "../../components/drawers/CreVote.vue";
import * as api from "../../api/indexVote";
@@ -149,7 +149,7 @@ export default {
textV1: "",
crevotevisible: false,
time: undefined,
basevote:'',
basevote: "",
endTimes: "",
startTimes: "",
});
@@ -162,27 +162,27 @@ export default {
const showDrawerCreVote = () => {
state.crevotevisible = true;
};
//创建投票信息
const createVoteText = () => {
if (!state.inputV1) {
message.destroy();
return message.info("请输入投票名称");
}
//创建投票信息
const createVoteText = () => {
if (!state.inputV1) {
message.destroy();
return message.info("请输入投票名称");
}
if (state.basevote == '') {
state.basevote = 1;
}
if (state.basevote == "") {
state.basevote = 1;
}
if (state.time != undefined) {
state.endTimes = toDate(
new Date(state.time[0].$d).getTime() / 1000,
"Y-M-D"
);
state.startTimes = toDate(
new Date(state.time[1].$d).getTime() / 1000,
"Y-M-D"
);
}
if (state.time != undefined) {
state.endTimes = toDate(
new Date(state.time[0].$d).getTime() / 1000,
"Y-M-D"
);
state.startTimes = toDate(
new Date(state.time[1].$d).getTime() / 1000,
"Y-M-D"
);
}
let obj = {
baseVote: state.basevote,
@@ -236,7 +236,7 @@ export default {
},
};
</script>
<style lang="scss">
<style lang="scss">
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
@@ -376,4 +376,3 @@ export default {
}
}
</style>