feat:合并

This commit is contained in:
王熙东
2022-11-17 09:26:30 +08:00
parent 8d0cb128a1
commit ea5384632d
6 changed files with 418 additions and 414 deletions

View File

@@ -97,7 +97,6 @@ export default {
});
const closeDrawer = () => {
ctx.emit("update:assessmentVisible", false);
};
const afterVisibleChange = (bool) => {
console.log("state getAllInvistText", bool);

View File

@@ -145,6 +145,9 @@ export default {
}
const afterVisibleChange = (bool) => {
console.log("state", bool);
state.assessmentId=null;
state.assessmentName="";
state.assessment=null;
};
const updateTask =()=>{

View File

@@ -17,9 +17,9 @@
</div>
<div style="display: flex; flex-direction: row">
<a-button style="width:100px;"
@click="()=>{isOuter = 1}"
@click="changeOuter(1)"
:class="[isOuter == 1? 'outer' : '' ]">系统考试</a-button>
<a-button style="width:100px;" @click="()=>{isOuter = 2}"
<a-button style="width:100px;" @click="changeOuter(2)"
:class="[isOuter == 2? 'outer' : '' ]" >外部考试</a-button>
</div>
<a-form
@@ -551,6 +551,10 @@ export default {
formState.questionArrangement = "";
}
}
const changeOuter = (value) => {
console.log(value)
state.isOuter = value
}
return {
formState,
afterVisibleChange,
@@ -569,6 +573,7 @@ export default {
rules,
updateTest,
queryTest,
changeOuter,
...toRefs(state)
};
},

View File

@@ -40,7 +40,7 @@
/>
<div class="votename">创建投票</div>
</div>
<div class="votebtn">创建投票</div>
<div class="votebtn" @click="showVoteDrawer">创建投票</div>
</div>
<!-- 创建投票 -->
<!-- 起止时间 -->
@@ -135,6 +135,17 @@
</div>
</div>
</a-drawer>
<a-drawer
v-model:visible="voteDrawerShow"
class="custom-class"
title="创建投票"
placement="right"
@after-visible-change="afterVoteVisibleChange"
>
<p>Some contents...</p>
<p>Some contents...</p>
<p>Some contents...</p>
</a-drawer>
</template>
<script>
import { reactive, toRefs } from "vue";
@@ -147,7 +158,9 @@ export default {
},
},
setup(props, ctx) {
const state = reactive({});
const state = reactive({
voteDrawerShow:false,
});
const closeDrawer = () => {
ctx.emit("update:addvoteVisible", false);
};
@@ -160,12 +173,20 @@ export default {
state.visible = true;
};
const showVoteDrawer = () => {
state.voteDrawerShow = true;
}
const afterVoteVisibleChange = () => {
};
return {
...toRefs(state),
afterVisibleChange,
showDrawer,
closeDrawer,
// change,
showVoteDrawer,
afterVoteVisibleChange
};
},
};

View File

@@ -79,7 +79,7 @@
</div>
<!-- 创建投票侧弹窗 -->
<div>
<cre-vote
<create-vote
v-model:crevoteVisible="crevotevisible"
@getData="getStemId"
v-model:ballotId="ballotId"
@@ -136,7 +136,7 @@
</template>
<script>
import { reactive, toRefs} from "vue";
import CreVote from "./CreateVote.vue";
import CreateVote from "./CreateVote.vue";
import * as api from "../../api/indexVote";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
@@ -147,7 +147,7 @@ import * as apiTask from "../../api/indexTaskadd";
export default {
name: "AddVote",
components: {
CreVote,
CreateVote,
},
props: {
addvoteVisible: {

View File

@@ -1,86 +1,52 @@
<!-- 评估管理-创建评估页面 -->
<template>
<a-drawer
:visible="createVoteVisible"
class="drawerStyle createvoteDrawer"
width="80%"
placement="right"
@after-visible-change="afterVisibleChange"
>
<a-drawer :visible="createVoteVisible" class="drawerStyle createvoteDrawer" width="100%" placement="right"
@after-visible-change="afterVisibleChange">
<div class="researchadd">
<div class="header">
<div class="headerTitle">创建投票</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" />
</div>
<div class="main_left">
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
</div>
<span style="margin-right: 3px">投票名称</span>
</div>
<div class="btnbox">
<a-input
v-model:value="voteName"
style="width: 424px; height: 32px"
placeholder="请输入任务名称"
maxlength="20"
/>
<a-input v-model:value="voteName" style="width: 424px; height: 32px" placeholder="请输入任务名称" maxlength="20" />
</div>
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
</div>
<span>创建题干</span>
</div>
<div class="btnbox">
<button
class="xkbtn"
@click="handleTypes"
>
创建题干
<button class="xkbtn" @click="handleTypes">
添加题干
</button>
</div>
</div> <!-- 创建投票侧弹窗 -->
</div>
<div v-for="(item, index) in allFormsData" :key="index">
<VoteQuestion
:item="item"
:ballotId="ballotId"
@del="handleDel"
/>
<VoteQuestion :item="item" :ballotId="ballotId" @del="handleDel" />
</div>
<div class="footer">
<div class="btn">
<a-button
type="primary"
style="width: 100px;height: 40px;border-radius: 8px; background-color: #409eff;"
@click="handleSave"
>
<a-button type="primary" style="width: 100px;height: 40px;border-radius: 8px; background-color: #409eff;"
@click="handleSave">
保存
</a-button>
<a-button
type="primary"
ghost
style="width: 100px;height: 40px;margin-left: 14px;border-radius: 8px;"
@click="handleAllCancel"
>
<a-button type="primary" ghost style="width: 100px;height: 40px;margin-left: 14px;border-radius: 8px;"
@click="handleAllCancel">
取消
</a-button>
</div>
@@ -103,16 +69,8 @@ traverseArr,
//import store from "@/store";
import {
//createOptionMessage,
queryStemByStemId
}from "@/api/indexVote";
import {
} from "@/api/indexResearch";
import * as api from "@/api/indexVote";
import {} from "@/api/indexResearch";
//import { message } from "ant-design-vue";
@@ -157,7 +115,8 @@ setup(props,ctx) {
const getInfoDate = async () => {
if (props.editChild) {
//stemId 多余字段
let res = await queryStemByStemId({stemId:0,
let res = await api.queryStemByStemId({
stemId: 0,
ballotId: state.ballotId,
}).then((res) => {
if (res.data.code === 200) {
@@ -363,8 +322,6 @@ setup(props,ctx) {
console.log("curItem.orderNumber", curItem.orderNumber);
// orderNumber: curItem.orderNumber,
};
const handleSave = () => {
@@ -508,6 +465,7 @@ setup(props,ctx) {
align-items: center;
flex-shrink: 0;
margin-bottom: 25px;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -516,27 +474,34 @@ setup(props,ctx) {
margin-left: 24px;
}
}
.main_left {
margin-left: 50px;
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
.main_item {
display: flex;
align-items: center;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -548,14 +513,17 @@ setup(props,ctx) {
color: #fff;
margin-right: 10px;
}
.fileTigan {
display: flex;
align-items: center;
padding: 3px 5px;
background-color: rgba(42, 103, 209, 0.4);
span {
margin-right: 5px;
}
.delBox {
width: 13px;
height: 13px;
@@ -566,28 +534,34 @@ setup(props,ctx) {
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 56px;
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
@@ -597,10 +571,12 @@ setup(props,ctx) {
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;