Merge branch 'master' of ssh://gitlab.dongwu-inc.com:10022/BOE/fe-manage

This commit is contained in:
王熙东
2022-11-04 19:13:33 +08:00
2 changed files with 61 additions and 5 deletions

View File

@@ -45,14 +45,18 @@
alt=""
/>
</div>
<span style="margin-right: 3px">创建投票</span>
<span>创建投票</span>
</div>
<div class="btnbox" @click="showDrawerCreVote">
<button class="xkbtn">创建投票</button>
<div class="btnbox" >
<button class="xkbtn" :style="{ display: creVote ? 'none' : 'block'}" @click="showDrawerCreVote">创建投票</button>
<button class="xkbtn" :style="{ display: creVote ? 'block' : 'none'}" @click="showDrawerCreVote">编辑投票</button>
<div :style="{ display: creVote ? 'block' : 'none'}" ><div class="fileTigan" ><span style="color:#388be1 ;">传过来的name</span> <div class="delBox" @click="delBox()"></div></div></div>
</div>
<!-- 创建投票侧弹窗 -->
<div>
<cre-vote v-model:crevoteVisible="crevotevisible"/>
<cre-vote v-model:crevoteVisible="crevotevisible"
@getData="changeVData"/>
</div>
<!-- 创建投票侧弹窗 -->
</div>
@@ -157,6 +161,7 @@ export default {
const state = reactive({
inputV1: "",
textV1: "",
creVote:false,
crevotevisible: false,
time: undefined,
basevote: "",
@@ -172,6 +177,14 @@ export default {
const showDrawerCreVote = () => {
state.crevotevisible = true;
};
const changeVData = (data) => {
console.log('111', data);
state.creVote = data
console.log('222',state.creVote);
}
const delBox = () => {
state.creVote = false;
}
//创建投票信息
const createVoteText = () => {
if (!state.inputV1) {
@@ -194,6 +207,10 @@ export default {
);
}
// if (state.crevotevisible = false) {
// changeVData()
// };
let obj = {
baseVote: state.basevote,
createTime: "",
@@ -262,9 +279,11 @@ export default {
showDrawerCreVote,
afterVisibleChange,
closeDrawer,
changeVData,
rowSelection,
options1,
createVoteText,
delBox,
};
},
};
@@ -323,6 +342,23 @@ export default {
border: 0;
margin-right: 8px;
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;
background-image: url(@/assets/images/basicinfo/ch.png);
background-size: 100% 100%;
border-radius: 50%;
}
}
}
}

View File

@@ -17,6 +17,24 @@
/>
</div>
<div class="contentMain">
<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">
<a-input
v-model:value="inputV1"
style="width: 424px; height: 32px"
placeholder="请输入投票名称"
/>
</div>
</div>
<div class="box" @click="showDrawerCreVote">
<button class="cjtpbtn" @click="addQue()">创建题干</button>
</div>
@@ -93,6 +111,8 @@ export default {
},
setup(props, ctx) {
const state = reactive({
inputV1: "",
creVote:true,
questions: [
{
inputV: "",
@@ -173,7 +193,7 @@ export default {
.then((res) => {
console.log("创建成功", res);
message.success("创建成功");
// ctx.emit("setStemId",obj.stem);
ctx.emit("getData",state.creVote);
closeDrawer();
})
.catch((err) => {