mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 12:26:47 +08:00
feat:合并
This commit is contained in:
@@ -97,7 +97,6 @@ export default {
|
|||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:assessmentVisible", false);
|
ctx.emit("update:assessmentVisible", false);
|
||||||
|
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state getAllInvistText", bool);
|
console.log("state getAllInvistText", bool);
|
||||||
|
|||||||
@@ -145,6 +145,9 @@ export default {
|
|||||||
}
|
}
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
console.log("state", bool);
|
console.log("state", bool);
|
||||||
|
state.assessmentId=null;
|
||||||
|
state.assessmentName="";
|
||||||
|
state.assessment=null;
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateTask =()=>{
|
const updateTask =()=>{
|
||||||
|
|||||||
@@ -17,9 +17,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="display: flex; flex-direction: row">
|
<div style="display: flex; flex-direction: row">
|
||||||
<a-button style="width:100px;"
|
<a-button style="width:100px;"
|
||||||
@click="()=>{isOuter = 1}"
|
@click="changeOuter(1)"
|
||||||
:class="[isOuter == 1? 'outer' : '' ]">系统考试</a-button>
|
: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>
|
:class="[isOuter == 2? 'outer' : '' ]" >外部考试</a-button>
|
||||||
</div>
|
</div>
|
||||||
<a-form
|
<a-form
|
||||||
@@ -551,6 +551,10 @@ export default {
|
|||||||
formState.questionArrangement = "";
|
formState.questionArrangement = "";
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
const changeOuter = (value) => {
|
||||||
|
console.log(value)
|
||||||
|
state.isOuter = value
|
||||||
|
}
|
||||||
return {
|
return {
|
||||||
formState,
|
formState,
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
@@ -569,6 +573,7 @@ export default {
|
|||||||
rules,
|
rules,
|
||||||
updateTest,
|
updateTest,
|
||||||
queryTest,
|
queryTest,
|
||||||
|
changeOuter,
|
||||||
...toRefs(state)
|
...toRefs(state)
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -40,7 +40,7 @@
|
|||||||
/>
|
/>
|
||||||
<div class="votename">创建投票:</div>
|
<div class="votename">创建投票:</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="votebtn">创建投票</div>
|
<div class="votebtn" @click="showVoteDrawer">创建投票</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 创建投票 -->
|
<!-- 创建投票 -->
|
||||||
<!-- 起止时间 -->
|
<!-- 起止时间 -->
|
||||||
@@ -135,6 +135,17 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</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>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs } from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
@@ -147,7 +158,9 @@ export default {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
setup(props, ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({});
|
const state = reactive({
|
||||||
|
voteDrawerShow:false,
|
||||||
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addvoteVisible", false);
|
ctx.emit("update:addvoteVisible", false);
|
||||||
};
|
};
|
||||||
@@ -160,12 +173,20 @@ export default {
|
|||||||
state.visible = true;
|
state.visible = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const showVoteDrawer = () => {
|
||||||
|
state.voteDrawerShow = true;
|
||||||
|
}
|
||||||
|
const afterVoteVisibleChange = () => {
|
||||||
|
|
||||||
|
};
|
||||||
return {
|
return {
|
||||||
...toRefs(state),
|
...toRefs(state),
|
||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
showDrawer,
|
showDrawer,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
// change,
|
// change,
|
||||||
|
showVoteDrawer,
|
||||||
|
afterVoteVisibleChange
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -79,7 +79,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- 创建投票侧弹窗 -->
|
<!-- 创建投票侧弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<cre-vote
|
<create-vote
|
||||||
v-model:crevoteVisible="crevotevisible"
|
v-model:crevoteVisible="crevotevisible"
|
||||||
@getData="getStemId"
|
@getData="getStemId"
|
||||||
v-model:ballotId="ballotId"
|
v-model:ballotId="ballotId"
|
||||||
@@ -136,7 +136,7 @@
|
|||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs} from "vue";
|
import { reactive, toRefs} from "vue";
|
||||||
import CreVote from "./CreateVote.vue";
|
import CreateVote from "./CreateVote.vue";
|
||||||
import * as api from "../../api/indexVote";
|
import * as api from "../../api/indexVote";
|
||||||
import { message } from "ant-design-vue";
|
import { message } from "ant-design-vue";
|
||||||
import { RouterEditTask } from "@/api/indexTask";
|
import { RouterEditTask } from "@/api/indexTask";
|
||||||
@@ -147,7 +147,7 @@ import * as apiTask from "../../api/indexTaskadd";
|
|||||||
export default {
|
export default {
|
||||||
name: "AddVote",
|
name: "AddVote",
|
||||||
components: {
|
components: {
|
||||||
CreVote,
|
CreateVote,
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
addvoteVisible: {
|
addvoteVisible: {
|
||||||
|
|||||||
@@ -1,128 +1,86 @@
|
|||||||
<!-- 评估管理-创建评估页面 -->
|
<!-- 评估管理-创建评估页面 -->
|
||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer :visible="createVoteVisible" class="drawerStyle createvoteDrawer" width="100%" placement="right"
|
||||||
:visible="createVoteVisible"
|
@after-visible-change="afterVisibleChange">
|
||||||
class="drawerStyle createvoteDrawer"
|
<div class="researchadd">
|
||||||
width="80%"
|
|
||||||
placement="right"
|
|
||||||
@after-visible-change="afterVisibleChange"
|
|
||||||
>
|
|
||||||
<div class="researchadd">
|
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div class="headerTitle">创建投票</div>
|
<div class="headerTitle">创建投票</div>
|
||||||
<img
|
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
|
||||||
style="width: 29px; height: 29px; cursor: pointer"
|
@click="closeDrawer" />
|
||||||
src="../../assets/images/basicinfo/close.png"
|
|
||||||
@click="closeDrawer"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="main_left">
|
<div class="main_left">
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<span style="margin-right: 3px">投票名称:</span>
|
<span style="margin-right: 3px">投票名称:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-input
|
<a-input v-model:value="voteName" style="width: 424px; height: 32px" placeholder="请输入任务名称" maxlength="20" />
|
||||||
v-model:value="voteName"
|
|
||||||
style="width: 424px; height: 32px"
|
|
||||||
placeholder="请输入任务名称"
|
|
||||||
maxlength="20"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
<div class="signbox">
|
<div class="signbox">
|
||||||
<div class="sign">
|
<div class="sign">
|
||||||
<img
|
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
|
||||||
src="@/assets/images/coursewareManage/asterisk.png"
|
|
||||||
alt=""
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<span>创建题干:</span>
|
<span>创建题干:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<button
|
<button class="xkbtn" @click="handleTypes">
|
||||||
class="xkbtn"
|
添加题干
|
||||||
@click="handleTypes"
|
|
||||||
>
|
|
||||||
创建题干
|
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div> <!-- 创建投票侧弹窗 -->
|
</div> <!-- 创建投票侧弹窗 -->
|
||||||
</div>
|
</div>
|
||||||
<div v-for="(item, index) in allFormsData" :key="index">
|
<div v-for="(item, index) in allFormsData" :key="index">
|
||||||
<VoteQuestion
|
<VoteQuestion :item="item" :ballotId="ballotId" @del="handleDel" />
|
||||||
:item="item"
|
|
||||||
:ballotId="ballotId"
|
|
||||||
@del="handleDel"
|
|
||||||
|
|
||||||
/>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button
|
<a-button type="primary" style="width: 100px;height: 40px;border-radius: 8px; background-color: #409eff;"
|
||||||
type="primary"
|
@click="handleSave">
|
||||||
style="width: 100px;height: 40px;border-radius: 8px; background-color: #409eff;"
|
|
||||||
@click="handleSave"
|
|
||||||
>
|
|
||||||
保存
|
保存
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button type="primary" ghost style="width: 100px;height: 40px;margin-left: 14px;border-radius: 8px;"
|
||||||
type="primary"
|
@click="handleAllCancel">
|
||||||
ghost
|
|
||||||
style="width: 100px;height: 40px;margin-left: 14px;border-radius: 8px;"
|
|
||||||
@click="handleAllCancel"
|
|
||||||
>
|
|
||||||
取消
|
取消
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive,toRefs} from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
// import { message } from "ant-design-vue";
|
// import { message } from "ant-design-vue";
|
||||||
// import { createResearch } from "../../api/indexResearch";
|
// import { createResearch } from "../../api/indexResearch";
|
||||||
import VoteQuestion from "./VoteQuestion.vue";
|
import VoteQuestion from "./VoteQuestion.vue";
|
||||||
|
|
||||||
import {
|
import {
|
||||||
// sortBy,
|
// sortBy,
|
||||||
traverseArr,
|
traverseArr,
|
||||||
// filterCommon,
|
// filterCommon,
|
||||||
// deepCloneFilterString,
|
// deepCloneFilterString,
|
||||||
} from "../../utils/utils";
|
} from "../../utils/utils";
|
||||||
|
|
||||||
|
|
||||||
//import store from "@/store";
|
//import store from "@/store";
|
||||||
import {
|
import * as api from "@/api/indexVote";
|
||||||
//createOptionMessage,
|
import {} from "@/api/indexResearch";
|
||||||
queryStemByStemId
|
|
||||||
}from "@/api/indexVote";
|
|
||||||
import {
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} from "@/api/indexResearch";
|
|
||||||
//import { message } from "ant-design-vue";
|
//import { message } from "ant-design-vue";
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "CreateVote",
|
name: "CreateVote",
|
||||||
components: {
|
components: {
|
||||||
VoteQuestion,
|
VoteQuestion,
|
||||||
|
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
createVoteVisible: {
|
createVoteVisible: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false,
|
default: false,
|
||||||
@@ -136,8 +94,8 @@ props: {
|
|||||||
default: false,
|
default: false,
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
setup(props,ctx) {
|
setup(props, ctx) {
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
ballotId: "",
|
ballotId: "",
|
||||||
ballotName: "",
|
ballotName: "",
|
||||||
@@ -157,7 +115,8 @@ setup(props,ctx) {
|
|||||||
const getInfoDate = async () => {
|
const getInfoDate = async () => {
|
||||||
if (props.editChild) {
|
if (props.editChild) {
|
||||||
//stemId 多余字段
|
//stemId 多余字段
|
||||||
let res = await queryStemByStemId({stemId:0,
|
let res = await api.queryStemByStemId({
|
||||||
|
stemId: 0,
|
||||||
ballotId: state.ballotId,
|
ballotId: state.ballotId,
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
@@ -347,10 +306,10 @@ setup(props,ctx) {
|
|||||||
],
|
],
|
||||||
};
|
};
|
||||||
state.allFormsData.push(obj);
|
state.allFormsData.push(obj);
|
||||||
console.log("state.allFormsData=====",state.allFormsData,state.allFormsData.length);
|
console.log("state.allFormsData=====", state.allFormsData, state.allFormsData.length);
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleDel = ({ id ,curItem}) => {
|
const handleDel = ({ id, curItem }) => {
|
||||||
state.allFormsData.forEach((item, index) => {
|
state.allFormsData.forEach((item, index) => {
|
||||||
if (item.id === id) {
|
if (item.id === id) {
|
||||||
state.allFormsData.splice(index, 1);
|
state.allFormsData.splice(index, 1);
|
||||||
@@ -360,11 +319,9 @@ setup(props,ctx) {
|
|||||||
item.id = index + 1;
|
item.id = index + 1;
|
||||||
return item;
|
return item;
|
||||||
});
|
});
|
||||||
console.log("curItem.orderNumber",curItem.orderNumber);
|
console.log("curItem.orderNumber", curItem.orderNumber);
|
||||||
|
|
||||||
// orderNumber: curItem.orderNumber,
|
// orderNumber: curItem.orderNumber,
|
||||||
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const handleSave = () => {
|
const handleSave = () => {
|
||||||
@@ -495,7 +452,7 @@ setup(props,ctx) {
|
|||||||
afterVisibleChange,
|
afterVisibleChange,
|
||||||
closeDrawer,
|
closeDrawer,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@@ -508,6 +465,7 @@ setup(props,ctx) {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
margin-bottom: 25px;
|
margin-bottom: 25px;
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -516,27 +474,34 @@ setup(props,ctx) {
|
|||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_left {
|
.main_left {
|
||||||
|
margin-left: 50px;
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-right: 1px solid #e8e8e8;
|
border-right: 1px solid #e8e8e8;
|
||||||
|
|
||||||
.main_item {
|
.main_item {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.sign {
|
.sign {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnbox {
|
.btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -548,14 +513,17 @@ setup(props,ctx) {
|
|||||||
color: #fff;
|
color: #fff;
|
||||||
margin-right: 10px;
|
margin-right: 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fileTigan {
|
.fileTigan {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding: 3px 5px;
|
padding: 3px 5px;
|
||||||
background-color: rgba(42, 103, 209, 0.4);
|
background-color: rgba(42, 103, 209, 0.4);
|
||||||
|
|
||||||
span {
|
span {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.delBox {
|
.delBox {
|
||||||
width: 13px;
|
width: 13px;
|
||||||
height: 13px;
|
height: 13px;
|
||||||
@@ -566,28 +534,34 @@ setup(props,ctx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_item2 {
|
.main_item2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: flex-start;
|
align-items: flex-start;
|
||||||
margin-bottom: 32px;
|
margin-bottom: 32px;
|
||||||
|
|
||||||
.signbox {
|
.signbox {
|
||||||
width: 120px;
|
width: 120px;
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: end;
|
justify-content: end;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
|
||||||
.sign {
|
.sign {
|
||||||
margin-right: 5px;
|
margin-right: 5px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.kqszbox {
|
.kqszbox {
|
||||||
.qdqtbox {
|
.qdqtbox {
|
||||||
margin-left: 56px;
|
margin-left: 56px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.setbox {
|
.setbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
margin-top: 10px;
|
margin-top: 10px;
|
||||||
margin-bottom: 24px;
|
margin-bottom: 24px;
|
||||||
|
|
||||||
.timerbox {
|
.timerbox {
|
||||||
margin-top: 6px;
|
margin-top: 6px;
|
||||||
margin-right: 32px;
|
margin-right: 32px;
|
||||||
@@ -597,10 +571,12 @@ setup(props,ctx) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btnbox2 {
|
.btnbox2 {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
justify-content: flex-start;
|
justify-content: flex-start;
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
|
|||||||
Reference in New Issue
Block a user