mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-14 21:36:44 +08:00
feat:合并
This commit is contained in:
@@ -42,10 +42,10 @@ import qs from 'qs';
|
|||||||
// 接口-请求
|
// 接口-请求
|
||||||
|
|
||||||
//基础票数上传接口
|
//基础票数上传接口
|
||||||
export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj,{
|
export const baseVoteupload = (obj) => http.post('/vote/baseVoteupload', obj, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': '123',
|
'token': '123',
|
||||||
'Content-Type' : 'multipart/form-data',
|
'Content-Type': 'multipart/form-data',
|
||||||
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
@@ -60,7 +60,7 @@ export const createVote = (obj) => http.post('/vote/createVote', obj)
|
|||||||
export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj })
|
export const deleteVoteMessage = (obj) => http.post('/vote/deleteVoteMessage', { params: obj })
|
||||||
|
|
||||||
//删除题干信息接口
|
//删除题干信息接口
|
||||||
export const deleteVoteStem = (obj) => http.post('/vote/deleteVoteStem', obj,{
|
export const deleteVoteStem = (obj) => http.post('/vote/deleteVoteStem', obj, {
|
||||||
headers: {
|
headers: {
|
||||||
'token': '123',
|
'token': '123',
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
||||||
@@ -74,12 +74,7 @@ export const deleteVoteStemOption = (obj) => http.post('/vote/deleteVoteStemOpti
|
|||||||
export const editVote = (obj) => http.post('/vote/editVote', obj)
|
export const editVote = (obj) => http.post('/vote/editVote', obj)
|
||||||
|
|
||||||
//根据题干ID获取题干信息
|
//根据题干ID获取题干信息
|
||||||
export const queryStemByStemId = (obj) => http.post('/vote/queryStemByStemId', obj,{
|
export const queryStemByStemId = (ballotId) => http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`)
|
||||||
headers: {
|
|
||||||
'token': '123',
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
//修改题干信息接口
|
//修改题干信息接口
|
||||||
export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj);
|
export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', obj);
|
||||||
@@ -87,12 +82,7 @@ export const updateStemMessage = (obj) => http.post('/vote/updateStemMessage', o
|
|||||||
//上传组件
|
//上传组件
|
||||||
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
export const fileUp = (obj) => http.post('/file/upload', obj, qs.stringify({ obj }));
|
||||||
//根据题干ID获取投票任务
|
//根据题干ID获取投票任务
|
||||||
export const queryVoteDetailById = (obj) => http.post('/vote/queryVoteDetailById', obj,{
|
export const queryVoteDetailById = (voteID) => http.post(`/vote/queryVoteDetailById?voteId=${voteID}`)
|
||||||
headers: {
|
|
||||||
'token': '123',
|
|
||||||
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
// 测试方法
|
// 测试方法
|
||||||
// import * as api from '../../api/index'
|
// import * as api from '../../api/index'
|
||||||
|
|||||||
@@ -136,7 +136,9 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="kqszbox">
|
<div class="kqszbox">
|
||||||
<div class="qdqtbox">
|
<div class="qdqtbox">
|
||||||
<div class="qdbtn"><div class="btntext">签到</div></div>
|
<div class="qdbtn">
|
||||||
|
<div class="btntext">签到</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setbox">
|
<div class="setbox">
|
||||||
<div class="timerbox">
|
<div class="timerbox">
|
||||||
@@ -173,7 +175,9 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="qdqtbox">
|
<div class="qdqtbox">
|
||||||
<div class="qtbtn"><div class="btntext">签退</div></div>
|
<div class="qtbtn">
|
||||||
|
<div class="btntext">签退</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="setbox">
|
<div class="setbox">
|
||||||
<div class="timerbox">
|
<div class="timerbox">
|
||||||
@@ -204,10 +208,12 @@
|
|||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-radio-group v-model:value="radioV1">
|
<a-radio-group v-model:value="radioV1">
|
||||||
<a-radio v-model:checked="checked" :value="1" @click="cloradio1"
|
<a-radio v-model:checked="checked" :value="1" @click="cloradio1"
|
||||||
>仅签到</a-radio
|
>仅签到
|
||||||
|
</a-radio
|
||||||
>
|
>
|
||||||
<a-radio v-model:checked="checked" :value="2" @click="cloradio1"
|
<a-radio v-model:checked="checked" :value="2" @click="cloradio1"
|
||||||
>签到、签退全部完成</a-radio
|
>签到、签退全部完成
|
||||||
|
</a-radio
|
||||||
>
|
>
|
||||||
</a-radio-group>
|
</a-radio-group>
|
||||||
</div>
|
</div>
|
||||||
@@ -222,11 +228,11 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs } from "vue";
|
import {reactive, toRefs} from "vue";
|
||||||
import * as api from "../../api/indexActivity";
|
import * as api from "../../api/indexActivity";
|
||||||
import * as apiTask from "../../api/indexTaskadd";
|
import * as apiTask from "../../api/indexTaskadd";
|
||||||
import { RouterEditTask } from "@/api/indexTask";
|
import {RouterEditTask} from "@/api/indexTask";
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@@ -282,7 +288,7 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
projectTemplateId:{
|
projectTemplateId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
@@ -353,7 +359,8 @@ export default {
|
|||||||
dayjs(res.data.data.activityEndTime, "YYYY-MM-DD"),
|
dayjs(res.data.data.activityEndTime, "YYYY-MM-DD"),
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {
|
||||||
|
});
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
if (bool && props.edit) {
|
if (bool && props.edit) {
|
||||||
@@ -365,9 +372,9 @@ export default {
|
|||||||
state.radioV1 = "";
|
state.radioV1 = "";
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
const updateTask = (res) => {
|
const updateTask = async (res) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
RouterEditTask({
|
await RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
courseId: res.data.data.activityId,
|
courseId: res.data.data.activityId,
|
||||||
duration: res.data.data.activityDuration,
|
duration: res.data.data.activityDuration,
|
||||||
@@ -383,7 +390,7 @@ export default {
|
|||||||
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 2) {
|
} else if (props.isLevel == 2) {
|
||||||
apiTask
|
await apiTask
|
||||||
.addTask({
|
.addTask({
|
||||||
courseId: res.data.data.activityId,
|
courseId: res.data.data.activityId,
|
||||||
duration: res.data.data.activityDuration,
|
duration: res.data.data.activityDuration,
|
||||||
@@ -400,7 +407,7 @@ export default {
|
|||||||
//////message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
//////message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
apiTask
|
await apiTask
|
||||||
.addTempTask({
|
.addTempTask({
|
||||||
courseId: res.data.data.activityId,
|
courseId: res.data.data.activityId,
|
||||||
duration: res.data.data.activityDuration,
|
duration: res.data.data.activityDuration,
|
||||||
@@ -463,9 +470,9 @@ export default {
|
|||||||
//更新编辑活动信息
|
//更新编辑活动信息
|
||||||
api
|
api
|
||||||
.updateActivity(obj)
|
.updateActivity(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("更新成功");
|
message.success("更新成功");
|
||||||
@@ -478,11 +485,11 @@ export default {
|
|||||||
//新建活动信息
|
//新建活动信息
|
||||||
api
|
api
|
||||||
.createActivity(obj)
|
.createActivity(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {
|
.catch(() => {
|
||||||
@@ -507,6 +514,7 @@ export default {
|
|||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addactiveDrawer {
|
.addactiveDrawer {
|
||||||
.drawerMain {
|
.drawerMain {
|
||||||
.header {
|
.header {
|
||||||
@@ -516,6 +524,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -524,40 +533,49 @@ export default {
|
|||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentMain {
|
.contentMain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.ant-input {
|
.ant-input {
|
||||||
height: 88px;
|
height: 88px;
|
||||||
width: 384px;
|
width: 384px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-picker {
|
.ant-picker {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_left {
|
.main_left {
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
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-top: 32px;
|
margin-top: 32px;
|
||||||
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;
|
||||||
@@ -570,24 +588,29 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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: 5px;
|
margin-left: 5px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.qdbtn,
|
.qdbtn,
|
||||||
.qtbtn {
|
.qtbtn {
|
||||||
width: 75px;
|
width: 75px;
|
||||||
@@ -598,15 +621,18 @@ export default {
|
|||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.btntext {
|
.btntext {
|
||||||
color: #387df7;
|
color: #387df7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -616,10 +642,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -636,6 +664,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_btns {
|
.main_btns {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -645,6 +674,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -654,6 +684,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@@ -281,7 +281,7 @@ export default {
|
|||||||
.addTask({
|
.addTask({
|
||||||
courseId: state.apiTaskList[i].casesId,
|
courseId: state.apiTaskList[i].casesId,
|
||||||
name: state.apiTaskList[i].title,
|
name: state.apiTaskList[i].title,
|
||||||
projectTemplateId: props.projectTemplateId,
|
projectId: props.projectId,
|
||||||
projectTaskId: props.projectTaskId,
|
projectTaskId: props.projectTaskId,
|
||||||
stageId: Number(props.chooseStageId),
|
stageId: Number(props.chooseStageId),
|
||||||
type: 3,
|
type: 3,
|
||||||
@@ -305,7 +305,7 @@ export default {
|
|||||||
duration: 0,
|
duration: 0,
|
||||||
flag: true,
|
flag: true,
|
||||||
name: state.apiTaskList[i].caseName,
|
name: state.apiTaskList[i].caseName,
|
||||||
projectId: props.projectId,
|
projectTaskId: props.projectTaskId,
|
||||||
projectTemplateId: props.projectTemplateId,
|
projectTemplateId: props.projectTemplateId,
|
||||||
stageId: props.chooseStageId || 0,
|
stageId: props.chooseStageId || 0,
|
||||||
type: 3,
|
type: 3,
|
||||||
|
|||||||
@@ -106,15 +106,16 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs } from "vue";
|
import {reactive, toRefs} from "vue";
|
||||||
// import { useRouter } from "vue-router";
|
// import { useRouter } from "vue-router";
|
||||||
import EvList from "./EvList.vue";
|
import EvList from "./EvList.vue";
|
||||||
import * as api from "../../api/indexEval";
|
import * as api from "../../api/indexEval";
|
||||||
import * as apitaskadd from "../../api/indexTaskadd";
|
import * as apitaskadd from "../../api/indexTaskadd";
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import { RouterEditTask } from "@/api/indexTask";
|
import {RouterEditTask} from "@/api/indexTask";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
import { addTempTask } from "../../api/indexTaskadd";
|
import {addTempTask} from "../../api/indexTaskadd";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddEval",
|
name: "AddEval",
|
||||||
components: {
|
components: {
|
||||||
@@ -172,7 +173,7 @@ export default {
|
|||||||
EvalListVisible: false,
|
EvalListVisible: false,
|
||||||
// addLoading:false,
|
// addLoading:false,
|
||||||
});
|
});
|
||||||
const checkFinish = (value)=> {
|
const checkFinish = (value) => {
|
||||||
state.evaluationTypeId = value.quiz_kid ? value.quiz_kid : null
|
state.evaluationTypeId = value.quiz_kid ? value.quiz_kid : null
|
||||||
state.evaluationTypeName = value.title ? value.title : ""
|
state.evaluationTypeName = value.title ? value.title : ""
|
||||||
}
|
}
|
||||||
@@ -201,9 +202,9 @@ export default {
|
|||||||
state.evaluationTypeName = "";
|
state.evaluationTypeName = "";
|
||||||
};
|
};
|
||||||
//向关卡或阶段渲染
|
//向关卡或阶段渲染
|
||||||
const updateTask = (value) => {
|
const updateTask = async (value) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
RouterEditTask({
|
await RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
courseId: Number(value.evaluationId),
|
courseId: Number(value.evaluationId),
|
||||||
name: value.evaluationName,
|
name: value.evaluationName,
|
||||||
@@ -218,7 +219,7 @@ export default {
|
|||||||
//message.error(`${props.EditTestId ? "编辑" : "新增"}关卡任务失败`);
|
//message.error(`${props.EditTestId ? "编辑" : "新增"}关卡任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 2) {
|
} else if (props.isLevel == 2) {
|
||||||
apitaskadd
|
await apitaskadd
|
||||||
.addTask({
|
.addTask({
|
||||||
duration: 0,
|
duration: 0,
|
||||||
flag: true,
|
flag: true,
|
||||||
@@ -238,7 +239,7 @@ export default {
|
|||||||
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
|
||||||
});
|
});
|
||||||
} else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
addTempTask({
|
await addTempTask({
|
||||||
courseId: Number(value.evaluationId),
|
courseId: Number(value.evaluationId),
|
||||||
name: value.evaluationName,
|
name: value.evaluationName,
|
||||||
projectTemplateId: props.projectTemplateId,
|
projectTemplateId: props.projectTemplateId,
|
||||||
@@ -270,23 +271,23 @@ export default {
|
|||||||
state.time = res.data.data.evaluationStartTime ? [
|
state.time = res.data.data.evaluationStartTime ? [
|
||||||
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
|
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
|
||||||
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
|
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
|
||||||
] : undefined ;
|
] : undefined;
|
||||||
state.description = res.data.data.evaluationExplain
|
state.description = res.data.data.evaluationExplain
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
message.destroy()
|
message.destroy()
|
||||||
message.error("获取测量平信息失败");
|
message.error("获取测量平信息失败");
|
||||||
console.log(err,"erererrerererererer");
|
console.log(err, "erererrerererererer");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
const creoredit = ()=> {
|
const creoredit = () => {
|
||||||
if(props.edit){
|
if (props.edit) {
|
||||||
editInvistText()
|
editInvistText()
|
||||||
}else{
|
} else {
|
||||||
createEvalText()
|
createEvalText()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const editInvistText = ()=> {
|
const editInvistText = () => {
|
||||||
if (!state.inputV1) {
|
if (!state.inputV1) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
return message.info("请输入测评名称");
|
return message.info("请输入测评名称");
|
||||||
@@ -309,8 +310,8 @@ export default {
|
|||||||
};
|
};
|
||||||
api
|
api
|
||||||
.updateEvaluation(objei)
|
.updateEvaluation(objei)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
updateTask(res.data.data);
|
await updateTask(res.data.data);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
@@ -334,11 +335,11 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
evaluationName: state.inputV1,
|
evaluationName: state.inputV1,
|
||||||
evaluationEndTime: state.time ? dayjs(state.time[1]).format("YYYY-MM-DD") : "",
|
evaluationEndTime: state.time ? dayjs(state.time[1]).format("YYYY-MM-DD") : "",
|
||||||
evaluationId: props.evaluationId ,
|
evaluationId: props.evaluationId,
|
||||||
evaluationStartTime: state.time ? dayjs(state.time[0]).format("YYYY-MM-DD") : "",
|
evaluationStartTime: state.time ? dayjs(state.time[0]).format("YYYY-MM-DD") : "",
|
||||||
evaluationTypeId: state.evaluationTypeId,
|
evaluationTypeId: state.evaluationTypeId,
|
||||||
evaluationTypeName: state.evaluationTypeName,
|
evaluationTypeName: state.evaluationTypeName,
|
||||||
evaluationExplain:state.description,
|
evaluationExplain: state.description,
|
||||||
evaluationFlag: "",
|
evaluationFlag: "",
|
||||||
evaluationPictureAddress: "",
|
evaluationPictureAddress: "",
|
||||||
evaluationTag: "",
|
evaluationTag: "",
|
||||||
@@ -346,8 +347,8 @@ export default {
|
|||||||
};
|
};
|
||||||
api
|
api
|
||||||
.createEvaluation(obj)
|
.createEvaluation(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
updateTask(res.data.data);
|
await updateTask(res.data.data);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
message.destroy();
|
message.destroy();
|
||||||
@@ -380,6 +381,7 @@ export default {
|
|||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addevalDrawer {
|
.addevalDrawer {
|
||||||
.drawerMain {
|
.drawerMain {
|
||||||
.header {
|
.header {
|
||||||
@@ -389,6 +391,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -397,32 +400,39 @@ export default {
|
|||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentMain {
|
.contentMain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.main_left {
|
.main_left {
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
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-top: 32px;
|
margin-top: 32px;
|
||||||
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;
|
||||||
|
|
||||||
.checkEval {
|
.checkEval {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -433,34 +443,41 @@ export default {
|
|||||||
margin-left: 15px;
|
margin-left: 15px;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tag-style {
|
.tag-style {
|
||||||
color: rgb(113, 113, 237);
|
color: rgb(113, 113, 237);
|
||||||
background-color: #d7d1f7;
|
background-color: #d7d1f7;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -470,10 +487,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -490,6 +509,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_btns {
|
.main_btns {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -499,6 +519,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -508,6 +529,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@@ -522,7 +522,7 @@ export default {
|
|||||||
editPlan(obj)
|
editPlan(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
message.error(`添加成功`);
|
message.sucsess(`添加成功`);
|
||||||
updateTask(res);
|
updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
|
|||||||
@@ -182,7 +182,7 @@ export default {
|
|||||||
});
|
});
|
||||||
const state = reactive({
|
const state = reactive({
|
||||||
addLoading: false,
|
addLoading: false,
|
||||||
fileUrl: null,
|
workEnclosureAddress: "",
|
||||||
});
|
});
|
||||||
const formRef = ref();
|
const formRef = ref();
|
||||||
|
|
||||||
@@ -254,6 +254,8 @@ export default {
|
|||||||
console.log("info", info);
|
console.log("info", info);
|
||||||
if (info.file.status !== "uploading") {
|
if (info.file.status !== "uploading") {
|
||||||
console.log(info.file, info.fileList);
|
console.log(info.file, info.fileList);
|
||||||
|
state.workEnclosureAddress = info.fileList[0].response.data;
|
||||||
|
console.log("state.workEnclosureAddress", state.workEnclosureAddress);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (info.file.status === "done") {
|
if (info.file.status === "done") {
|
||||||
@@ -278,6 +280,7 @@ export default {
|
|||||||
localStorage.setItem("stageId", props.chooseStageId);
|
localStorage.setItem("stageId", props.chooseStageId);
|
||||||
localStorage.setItem("chapterId", props.isactive);
|
localStorage.setItem("chapterId", props.isactive);
|
||||||
fileList.value = [];
|
fileList.value = [];
|
||||||
|
state.workEnclosureAddress = "";
|
||||||
resetForm();
|
resetForm();
|
||||||
};
|
};
|
||||||
const afterVisibleChange = () => {
|
const afterVisibleChange = () => {
|
||||||
@@ -292,7 +295,9 @@ export default {
|
|||||||
let obj = {
|
let obj = {
|
||||||
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||||
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||||
workEnclosureAddress: state.fileUrl,
|
workEnclosureAddress: state.workEnclosureAddress
|
||||||
|
? state.workEnclosureAddress
|
||||||
|
: "",
|
||||||
workId: props.edit ? props.EditWorkId : 0,
|
workId: props.edit ? props.EditWorkId : 0,
|
||||||
workName: formState.workName,
|
workName: formState.workName,
|
||||||
workRequirement: formState.workRequirement,
|
workRequirement: formState.workRequirement,
|
||||||
@@ -413,11 +418,12 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const cle = () => {
|
const cle = () => {
|
||||||
console.log("xx", formState);
|
|
||||||
let obj = {
|
let obj = {
|
||||||
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
submitEndTime: dayjs(formState.choosedTime[1]).format("YYYY-MM-DD"),
|
||||||
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
submitStartTime: dayjs(formState.choosedTime[0]).format("YYYY-MM-DD"),
|
||||||
workEnclosureAddress: state.fileUrl,
|
workEnclosureAddress: state.workEnclosureAddress
|
||||||
|
? state.workEnclosureAddress
|
||||||
|
: "",
|
||||||
workId: props.EditWorkId > 0 ? props.EditWorkId : 0,
|
workId: props.EditWorkId > 0 ? props.EditWorkId : 0,
|
||||||
workName: formState.workName,
|
workName: formState.workName,
|
||||||
workRequirement: formState.workRequirement,
|
workRequirement: formState.workRequirement,
|
||||||
|
|||||||
@@ -212,11 +212,12 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs } from "vue";
|
import {reactive, toRefs} from "vue";
|
||||||
import { RouterEditTask } from "@/api/indexTask";
|
import {RouterEditTask} from "@/api/indexTask";
|
||||||
import { message } from "ant-design-vue";
|
import {message} from "ant-design-vue";
|
||||||
import * as apiProj from "../../api/index.js";
|
import * as apiProj from "../../api/index.js";
|
||||||
import dayjs from "dayjs";
|
import dayjs from "dayjs";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "AddProject",
|
name: "AddProject",
|
||||||
props: {
|
props: {
|
||||||
@@ -435,7 +436,7 @@ export default {
|
|||||||
state.selectedRows.forEach((item) => {
|
state.selectedRows.forEach((item) => {
|
||||||
let origin = JSON.parse(props.chooseProjectList);
|
let origin = JSON.parse(props.chooseProjectList);
|
||||||
console.log("ccxx", origin);
|
console.log("ccxx", origin);
|
||||||
if(origin==null){
|
if (origin == null) {
|
||||||
closeSameModal();
|
closeSameModal();
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
message.destroy();
|
message.destroy();
|
||||||
@@ -464,9 +465,9 @@ export default {
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateTask = (res) => {
|
const updateTask = async (res) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
RouterEditTask({
|
await RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
courseId: res.key,
|
courseId: res.key,
|
||||||
name: res.name,
|
name: res.name,
|
||||||
@@ -496,11 +497,13 @@ export default {
|
|||||||
state.sameProj = null;
|
state.sameProj = null;
|
||||||
state.sameModal = false;
|
state.sameModal = false;
|
||||||
};
|
};
|
||||||
const sureSameModal = () => {
|
const sureSameModal = async () => {
|
||||||
// updateTask(state.sameProj);
|
// updateTask(state.sameProj);
|
||||||
state.selectedRows.forEach((item) => {
|
if (state.selectedRows && state.selectedRows.length) {
|
||||||
updateTask(item);
|
for (const item in state.selectedRows) {
|
||||||
});
|
await updateTask(item);
|
||||||
|
}
|
||||||
|
}
|
||||||
state.sameProj = null;
|
state.sameProj = null;
|
||||||
state.sameModal = false;
|
state.sameModal = false;
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
@@ -530,17 +533,21 @@ export default {
|
|||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sameModal {
|
.sameModal {
|
||||||
.ant-modal {
|
.ant-modal {
|
||||||
width: 424px !important;
|
width: 424px !important;
|
||||||
height: 258px !important;
|
height: 258px !important;
|
||||||
|
|
||||||
.ant-modal-content {
|
.ant-modal-content {
|
||||||
width: 424px !important;
|
width: 424px !important;
|
||||||
height: 258px !important;
|
height: 258px !important;
|
||||||
|
|
||||||
.ant-modal-body {
|
.ant-modal-body {
|
||||||
width: 424px !important;
|
width: 424px !important;
|
||||||
height: 258px !important;
|
height: 258px !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|
||||||
.delete {
|
.delete {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
width: 424px;
|
width: 424px;
|
||||||
@@ -561,15 +568,18 @@ export default {
|
|||||||
rgba(78, 166, 255, 0) 100%
|
rgba(78, 166, 255, 0) 100%
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
.del_main {
|
.del_main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
padding-left: 26px;
|
padding-left: 26px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@@ -577,6 +587,7 @@ export default {
|
|||||||
background-image: url(@/assets/images/taskpage/gan.png);
|
background-image: url(@/assets/images/taskpage/gan.png);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close_exit {
|
.close_exit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 42px;
|
right: 42px;
|
||||||
@@ -587,6 +598,7 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 34px auto 56px auto;
|
margin: 34px auto 56px auto;
|
||||||
@@ -596,6 +608,7 @@ export default {
|
|||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
// background-color: red;
|
// background-color: red;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30px;
|
top: 30px;
|
||||||
@@ -604,10 +617,12 @@ export default {
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.del_btnbox {
|
.del_btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 30px auto;
|
margin: 30px auto;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.del_btn {
|
.del_btn {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -619,17 +634,20 @@ export default {
|
|||||||
|
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.btnText {
|
.btnText {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
border: 1px solid rgba(64, 158, 255, 1);
|
border: 1px solid rgba(64, 158, 255, 1);
|
||||||
color: #4ea6ff;
|
color: #4ea6ff;
|
||||||
margin-right: 14px;
|
margin-right: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
background-color: #4ea6ff;
|
background-color: #4ea6ff;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@@ -641,6 +659,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.addrefDrawer {
|
.addrefDrawer {
|
||||||
.drawerMain {
|
.drawerMain {
|
||||||
// .main_notice {
|
// .main_notice {
|
||||||
@@ -680,6 +699,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -688,35 +708,43 @@ export default {
|
|||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentMain {
|
.contentMain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.main_left {
|
.main_left {
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
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-top: 32px;
|
margin-top: 32px;
|
||||||
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;
|
||||||
|
|
||||||
.ant-input {
|
.ant-input {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.xkbtn {
|
.xkbtn {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 130px;
|
width: 130px;
|
||||||
@@ -729,32 +757,40 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.textarea {
|
.textarea {
|
||||||
width: 423px;
|
width: 423px;
|
||||||
|
|
||||||
.ant-input {
|
.ant-input {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-textarea-show-count {
|
.ant-input-textarea-show-count {
|
||||||
position: relative;
|
position: relative;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input-textarea-show-count::after {
|
.ant-input-textarea-show-count::after {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
bottom: 0px;
|
bottom: 0px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-input {
|
.ant-input {
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
}
|
}
|
||||||
@@ -762,6 +798,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_btns {
|
.main_btns {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -771,6 +808,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -780,6 +818,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@@ -176,7 +176,7 @@ export default {
|
|||||||
console.log(errors);
|
console.log(errors);
|
||||||
// message.error("handleFinishFailed");
|
// message.error("handleFinishFailed");
|
||||||
};
|
};
|
||||||
const updateTask = (res) => {
|
const updateTask = async (res) => {
|
||||||
if (props.isLevel == 1) {
|
if (props.isLevel == 1) {
|
||||||
RouterEditTask({
|
RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
@@ -186,9 +186,9 @@ export default {
|
|||||||
routerTaskId: props.routerTaskId || 0,
|
routerTaskId: props.routerTaskId || 0,
|
||||||
type: 7,
|
type: 7,
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(async () => {
|
||||||
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
|
||||||
ctx.emit("changeData", false);
|
await ctx.emit("changeData", false);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
})
|
})
|
||||||
@@ -254,18 +254,18 @@ export default {
|
|||||||
if (props.edit) {
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.updateLinks(obj)
|
.updateLinks(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
} else {
|
} else {
|
||||||
api
|
api
|
||||||
.createExternalChain(obj)
|
.createExternalChain(obj)
|
||||||
.then((res) => {
|
.then(async (res) => {
|
||||||
message.success("提交成功");
|
message.success("提交成功");
|
||||||
updateTask(res);
|
await updateTask(res);
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
})
|
})
|
||||||
.catch(() => {});
|
.catch(() => {});
|
||||||
|
|||||||
@@ -39,7 +39,7 @@
|
|||||||
<div class="set_content">
|
<div class="set_content">
|
||||||
<div class="setc_name"><span>资源归属:</span></div>
|
<div class="setc_name"><span>资源归属:</span></div>
|
||||||
<div class="setc_main">
|
<div class="setc_main">
|
||||||
<span style="color: #999999">{{ sourceBelong }}</span>
|
<span style="color: #999999">{{ sourceBelongName }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="set_content">
|
<div class="set_content">
|
||||||
@@ -261,12 +261,11 @@ export default {
|
|||||||
state.showDetail = !state.showDetail;
|
state.showDetail = !state.showDetail;
|
||||||
};
|
};
|
||||||
const subMit = () => {
|
const subMit = () => {
|
||||||
|
if(!state.valueSuggest){
|
||||||
if (state.valueSuggest == null || state.valueSuggest == undefined || state.valueSuggest == "") {
|
message.error(`请输入审核意见!`);
|
||||||
message.destroy();
|
|
||||||
message.error("请输入审核意见");
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
auditView({
|
auditView({
|
||||||
createId: props.chooseCreateId,
|
createId: props.chooseCreateId,
|
||||||
createName: props.chooseCreater,
|
createName: props.chooseCreater,
|
||||||
|
|||||||
@@ -1,83 +1,54 @@
|
|||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer :visible="addvoteVisible" class="drawerStyle addvoteDrawer" width="80%" title="添加投票" placement="right"
|
||||||
:visible="addvoteVisible"
|
@after-visible-change="afterVisibleChange">
|
||||||
class="drawerStyle addvoteDrawer"
|
|
||||||
width="80%"
|
|
||||||
title="添加投票"
|
|
||||||
placement="right"
|
|
||||||
@after-visible-change="afterVisibleChange"
|
|
||||||
>
|
|
||||||
<div class="drawerMain">
|
<div class="drawerMain">
|
||||||
<div class="header">
|
<div class="header">
|
||||||
<div v-if="edit" class="headerTitle">编辑投票</div>
|
<div v-if="edit" class="headerTitle">编辑投票</div>
|
||||||
<div v-else class="headerTitle">添加投票</div>
|
<div v-else 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="contentMain">
|
<div class="contentMain">
|
||||||
<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="inputV1" style="width: 424px; height: 32px" placeholder="请输入投票名称"
|
||||||
v-model:value="inputV1"
|
maxlength="20" />
|
||||||
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="showDrawerCreVote">
|
||||||
class="xkbtn"
|
|
||||||
|
|
||||||
@click="showDrawerCreVote"
|
|
||||||
>
|
|
||||||
{{ ballotId ? "编辑" : "添加" }}投票
|
{{ ballotId ? "编辑" : "添加" }}投票
|
||||||
|
|
||||||
</button>
|
</button>
|
||||||
<div v-if = "ballotId>0">
|
<div v-if="ballotId > 0">
|
||||||
<a-tag closable color="processing" @close="log">
|
<a-tag closable color="processing" @close="log">
|
||||||
<span style="font-size:14px;line-height: 33px;" >删除投票</span>
|
<span style="font-size:14px;line-height: 33px;">删除投票</span>
|
||||||
</a-tag></div>
|
</a-tag>
|
||||||
<div>
|
|
||||||
<CreateVote
|
|
||||||
v-model:createVoteVisible="createVoteVisible"
|
|
||||||
v-model:ballotId="ballotId"
|
|
||||||
v-model:editChild="editChild"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<button
|
<div>
|
||||||
class="xkbtn"
|
<CreateVote v-model:createVoteVisible="createVoteVisible" v-model:ballotId="ballotId"
|
||||||
:style="{ display: creVote ? 'block' : 'none' }"
|
v-model:editChild="editChild" />
|
||||||
@click="showDrawerCreVote"
|
</div>
|
||||||
>
|
<button class="xkbtn" :style="{ display: creVote ? 'block' : 'none' }" @click="showDrawerCreVote">
|
||||||
编辑投票
|
编辑投票
|
||||||
</button>
|
</button>
|
||||||
<div :style="{ display: creVote ? 'block' : 'none' }">
|
<div :style="{ display: creVote ? 'block' : 'none' }">
|
||||||
<div class="fileTigan">
|
<div class="fileTigan">
|
||||||
<span style="color: #388be1">{{ballotName}}</span>
|
<span style="color: #388be1">{{ ballotName }}</span>
|
||||||
<div class="delBox" @click="dleVoteStem()"></div>
|
<div class="delBox" @click="dleVoteStem()"></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -85,11 +56,7 @@
|
|||||||
|
|
||||||
<!-- 创建投票侧弹窗 -->
|
<!-- 创建投票侧弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<create-vote
|
<create-vote v-model:crevoteVisible="crevotevisible" @getData="getStemId" v-model:ballotId="ballotId" />
|
||||||
v-model:crevoteVisible="crevotevisible"
|
|
||||||
@getData="getStemId"
|
|
||||||
v-model:ballotId="ballotId"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 创建投票侧弹窗 -->
|
<!-- 创建投票侧弹窗 -->
|
||||||
</div>
|
</div>
|
||||||
@@ -98,11 +65,7 @@
|
|||||||
<span style="margin-right: 3px">起止时间:</span>
|
<span style="margin-right: 3px">起止时间:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-range-picker
|
<a-range-picker style="width: 424px" v-model:value="time" :placeholder="[' 开始时间', ' 结束时间']" />
|
||||||
style="width: 424px"
|
|
||||||
v-model:value="time"
|
|
||||||
:placeholder="[' 开始时间', ' 结束时间']"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
@@ -110,15 +73,12 @@
|
|||||||
<span style="margin-right: 3px">基础投票数:</span>
|
<span style="margin-right: 3px">基础投票数:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox">
|
<div class="btnbox">
|
||||||
<a-upload
|
<a-upload @change="handleChange" :multiple="true" :max-count="1" action="/manageApi/vote/baseVoteupload"
|
||||||
@change="handleChange"
|
v-model:file-list="fileList">
|
||||||
:multiple="true"
|
|
||||||
:max-count="1"
|
|
||||||
action="/manageApi/vote/baseVoteupload"
|
|
||||||
v-model:file-list="fileList"
|
|
||||||
>
|
|
||||||
<button class="xkbtn">点击上传</button></a-upload>
|
<button class="xkbtn">点击上传</button></a-upload>
|
||||||
<div v-if="voteCount > 0"><a-tag color="processing"> <span style="font-size:14px;line-height: 33px;" >{{voteCount}}票</span></a-tag></div>
|
<div v-if="voteCount > 0"><a-tag color="processing"> <span style="font-size:14px;line-height: 33px;">{{
|
||||||
|
voteCount
|
||||||
|
}}票</span></a-tag></div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item" style="margin-top: -25px">
|
<div class="main_item" style="margin-top: -25px">
|
||||||
@@ -132,12 +92,7 @@
|
|||||||
<span style="margin-right: 3px">投票说明:</span>
|
<span style="margin-right: 3px">投票说明:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="textarea">
|
<div class="textarea">
|
||||||
<a-textarea
|
<a-textarea v-model:value="textV1" placeholder="请输入投票说明" allow-clear maxlength="150" />
|
||||||
v-model:value="textV1"
|
|
||||||
placeholder="请输入投票说明"
|
|
||||||
allow-clear
|
|
||||||
maxlength="150"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -150,7 +105,7 @@
|
|||||||
</a-drawer>
|
</a-drawer>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import { reactive, toRefs} from "vue";
|
import { reactive, toRefs } from "vue";
|
||||||
import CreateVote 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";
|
||||||
@@ -206,7 +161,7 @@ export default {
|
|||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
},
|
},
|
||||||
projectTemplateId:{
|
projectTemplateId: {
|
||||||
type: Number,
|
type: Number,
|
||||||
default: null,
|
default: null,
|
||||||
}
|
}
|
||||||
@@ -219,22 +174,22 @@ export default {
|
|||||||
textV1: "",
|
textV1: "",
|
||||||
createVoteVisible: false,
|
createVoteVisible: false,
|
||||||
time: undefined,
|
time: undefined,
|
||||||
startTime:"",
|
startTime: "",
|
||||||
endTime:"",
|
endTime: "",
|
||||||
basevote: "",
|
basevote: "",
|
||||||
ascriptionId: "",
|
ascriptionId: "",
|
||||||
voteStemId: null,
|
voteStemId: null,
|
||||||
EditVoteId:"",
|
EditVoteId: "",
|
||||||
voteStemName:"",
|
voteStemName: "",
|
||||||
ballotName: "",
|
ballotName: "",
|
||||||
editStem: false, //编辑状态
|
editStem: false, //编辑状态
|
||||||
ballotId: 0, //题干id
|
ballotId: 0, //题干id
|
||||||
optionId: "", //删除,修改选项id
|
optionId: "", //删除,修改选项id
|
||||||
addStemVisible:false, //
|
addStemVisible: false, //
|
||||||
editChild:false,
|
editChild: false,
|
||||||
fileList: [],
|
fileList: [],
|
||||||
voteCount:null,
|
voteCount: null,
|
||||||
projectTemplateId:null,
|
projectTemplateId: null,
|
||||||
|
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
@@ -242,16 +197,16 @@ export default {
|
|||||||
state.textV1 = "",
|
state.textV1 = "",
|
||||||
state.time = undefined,
|
state.time = undefined,
|
||||||
state.basevote = "",
|
state.basevote = "",
|
||||||
state.ballotId ="",
|
state.ballotId = "",
|
||||||
ctx.emit("update:addvoteVisible", false);
|
ctx.emit("update:addvoteVisible", false);
|
||||||
ctx.emit("update:edit", false);
|
ctx.emit("update:edit", false);
|
||||||
};
|
};
|
||||||
const afterVisibleChange = (bool) => {
|
const afterVisibleChange = (bool) => {
|
||||||
if(props.edit&&bool){
|
if (props.edit && bool) {
|
||||||
queryVoteInfo();
|
queryVoteInfo();
|
||||||
}
|
}
|
||||||
state.projectTemplateId = props.projectTemplateId;
|
state.projectTemplateId = props.projectTemplateId;
|
||||||
console.log("projectTemplateId visible====",state.projectTemplateId);
|
console.log("projectTemplateId visible====", state.projectTemplateId);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -271,8 +226,8 @@ export default {
|
|||||||
if (file.response) {
|
if (file.response) {
|
||||||
// Component will show file.url as link
|
// Component will show file.url as link
|
||||||
file.url = file.response.url;
|
file.url = file.response.url;
|
||||||
console.log("file========",file);
|
console.log("file========", file);
|
||||||
console.log("file========",file.response);
|
console.log("file========", file.response);
|
||||||
state.voteCount = file.response.data;
|
state.voteCount = file.response.data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -282,7 +237,7 @@ export default {
|
|||||||
|
|
||||||
//删除题干信息接口
|
//删除题干信息接口
|
||||||
const dleVoteStem = () => {
|
const dleVoteStem = () => {
|
||||||
api.deleteVoteStem({voteStemId:state.ballotId})
|
api.deleteVoteStem({ voteStemId: state.ballotId })
|
||||||
.then(() => {
|
.then(() => {
|
||||||
message.success('删除题干信息成功')
|
message.success('删除题干信息成功')
|
||||||
|
|
||||||
@@ -290,11 +245,11 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
//根据投票id获取投票信息
|
//根据投票id获取投票信息
|
||||||
const queryVoteInfo = ()=>{
|
const queryVoteInfo = () => {
|
||||||
|
|
||||||
api.queryVoteDetailById({voteId:props.EditVoteId})
|
api.queryVoteDetailById(props.EditVoteId)
|
||||||
.then((res)=>{
|
.then((res) => {
|
||||||
console.log('获取投票信息成功',res);
|
console.log('获取投票信息成功', res);
|
||||||
state.inputV1 = res.data.data.voteName;
|
state.inputV1 = res.data.data.voteName;
|
||||||
state.textV1 = res.data.data.voteExplain;
|
state.textV1 = res.data.data.voteExplain;
|
||||||
state.baseVote = res.data.data.baseVote;
|
state.baseVote = res.data.data.baseVote;
|
||||||
@@ -305,15 +260,15 @@ export default {
|
|||||||
dayjs(res.data.data.voteEndTime, "YYYY-MM-DD"),
|
dayjs(res.data.data.voteEndTime, "YYYY-MM-DD"),
|
||||||
];
|
];
|
||||||
})
|
})
|
||||||
.catch((err)=>{
|
.catch((err) => {
|
||||||
console.log('获取投票信息失败',err);
|
console.log('获取投票信息失败', err);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
const updateToTask =(res)=>{
|
const updateToTask = (res) => {
|
||||||
console.log("props.isLevel=====",props.isLevel);
|
console.log("props.isLevel=====", props.isLevel);
|
||||||
if(props.isLevel ==1){
|
if (props.isLevel == 1) {
|
||||||
RouterEditTask({
|
RouterEditTask({
|
||||||
chapterId: props.isactive,
|
chapterId: props.isactive,
|
||||||
courseId: res.data.data.voteId,
|
courseId: res.data.data.voteId,
|
||||||
@@ -327,13 +282,13 @@ export default {
|
|||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
state.addLoading = false;
|
state.addLoading = false;
|
||||||
})
|
})
|
||||||
.catch(( ) => {
|
.catch(() => {
|
||||||
//message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
|
//message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
|
||||||
});
|
});
|
||||||
}else if(props.isLevel ==2){
|
} else if (props.isLevel == 2) {
|
||||||
apiTask
|
apiTask
|
||||||
.addTask({
|
.addTask({
|
||||||
courseId:res.data.data.voteId,
|
courseId: res.data.data.voteId,
|
||||||
name: res.data.data.voteName,
|
name: res.data.data.voteName,
|
||||||
projectId: props.projectId,
|
projectId: props.projectId,
|
||||||
projectTaskId: props.projectTaskId || 0,
|
projectTaskId: props.projectTaskId || 0,
|
||||||
@@ -347,7 +302,7 @@ export default {
|
|||||||
.catch(() => {
|
.catch(() => {
|
||||||
////message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
|
////message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
|
||||||
});
|
});
|
||||||
}else if (props.isLevel == 3) {
|
} else if (props.isLevel == 3) {
|
||||||
|
|
||||||
addTempTask({
|
addTempTask({
|
||||||
courseId: res.data.data.voteId,
|
courseId: res.data.data.voteId,
|
||||||
@@ -380,13 +335,13 @@ export default {
|
|||||||
if (state.basevote == "") {
|
if (state.basevote == "") {
|
||||||
state.basevote = 1;
|
state.basevote = 1;
|
||||||
}
|
}
|
||||||
if(state.time != undefined){
|
if (state.time != undefined) {
|
||||||
state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD");
|
state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD");
|
||||||
state.endTime = dayjs(state.time[1]).format("YYYY-MM-DD");
|
state.endTime = dayjs(state.time[1]).format("YYYY-MM-DD");
|
||||||
}
|
}
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
voteId: props.edit?state.EditVoteId : 0,
|
voteId: props.edit ? props.EditVoteId : 0,
|
||||||
voteName: state.inputV1,
|
voteName: state.inputV1,
|
||||||
voteStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
voteStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
|
||||||
voteEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
voteEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
|
||||||
@@ -395,7 +350,7 @@ export default {
|
|||||||
voteExplain: state.textV1,
|
voteExplain: state.textV1,
|
||||||
|
|
||||||
}
|
}
|
||||||
if(props.edit){
|
if (props.edit) {
|
||||||
api
|
api
|
||||||
.editVote(obj)
|
.editVote(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -409,7 +364,7 @@ export default {
|
|||||||
message.destroy();
|
message.destroy();
|
||||||
message.error("修改投票信息失败")
|
message.error("修改投票信息失败")
|
||||||
})
|
})
|
||||||
}else{
|
} else {
|
||||||
api
|
api
|
||||||
.createVote(obj)
|
.createVote(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -432,7 +387,7 @@ export default {
|
|||||||
state.addStemVisible = false;
|
state.addStemVisible = false;
|
||||||
};
|
};
|
||||||
const log = e => {
|
const log = e => {
|
||||||
state.ballotId=null;
|
state.ballotId = null;
|
||||||
console.log(e);
|
console.log(e);
|
||||||
};
|
};
|
||||||
return {
|
return {
|
||||||
@@ -456,13 +411,16 @@ export default {
|
|||||||
.ant-modal {
|
.ant-modal {
|
||||||
width: 424px !important;
|
width: 424px !important;
|
||||||
height: 258px !important;
|
height: 258px !important;
|
||||||
|
|
||||||
.ant-modal-content {
|
.ant-modal-content {
|
||||||
width: 424px !important;
|
width: 424px !important;
|
||||||
height: 258px !important;
|
height: 258px !important;
|
||||||
|
|
||||||
.ant-modal-body {
|
.ant-modal-body {
|
||||||
width: 424px !important;
|
width: 424px !important;
|
||||||
height: 258px !important;
|
height: 258px !important;
|
||||||
padding: 0 !important;
|
padding: 0 !important;
|
||||||
|
|
||||||
.delete {
|
.delete {
|
||||||
z-index: 999;
|
z-index: 999;
|
||||||
width: 424px;
|
width: 424px;
|
||||||
@@ -470,24 +428,26 @@ export default {
|
|||||||
background: #ffffff;
|
background: #ffffff;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
|
||||||
border-radius: 4px;
|
border-radius: 4px;
|
||||||
|
|
||||||
.del_header {
|
.del_header {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
width: calc(100%);
|
width: calc(100%);
|
||||||
height: 40px;
|
height: 40px;
|
||||||
background: linear-gradient(
|
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
|
||||||
rgba(78, 166, 255, 0.2) 0%,
|
rgba(78, 166, 255, 0) 100%);
|
||||||
rgba(78, 166, 255, 0) 100%
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.del_main {
|
.del_main {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.header {
|
.header {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
padding-top: 20px;
|
padding-top: 20px;
|
||||||
padding-left: 26px;
|
padding-left: 26px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
|
||||||
.icon {
|
.icon {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
@@ -495,6 +455,7 @@ export default {
|
|||||||
background-image: url(@/assets/images/coursewareManage/QR.png);
|
background-image: url(@/assets/images/coursewareManage/QR.png);
|
||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
.close_exit {
|
.close_exit {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
right: 42px;
|
right: 42px;
|
||||||
@@ -505,6 +466,7 @@ export default {
|
|||||||
background-size: 100% 100%;
|
background-size: 100% 100%;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.body {
|
.body {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
margin: 34px auto 56px auto;
|
margin: 34px auto 56px auto;
|
||||||
@@ -513,6 +475,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
||||||
.back {
|
.back {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
top: 30px;
|
top: 30px;
|
||||||
@@ -521,10 +484,12 @@ export default {
|
|||||||
color: #666666;
|
color: #666666;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.del_btnbox {
|
.del_btnbox {
|
||||||
display: flex;
|
display: flex;
|
||||||
margin: 30px auto;
|
margin: 30px auto;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
|
|
||||||
.del_btn {
|
.del_btn {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -535,17 +500,20 @@ export default {
|
|||||||
justify-content: center;
|
justify-content: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
|
|
||||||
.btnText {
|
.btnText {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: 400;
|
font-weight: 400;
|
||||||
line-height: 40px;
|
line-height: 40px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
border: 1px solid rgba(64, 158, 255, 1);
|
border: 1px solid rgba(64, 158, 255, 1);
|
||||||
color: #4ea6ff;
|
color: #4ea6ff;
|
||||||
margin-right: 14px;
|
margin-right: 14px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
background-color: #4ea6ff;
|
background-color: #4ea6ff;
|
||||||
color: #ffffff;
|
color: #ffffff;
|
||||||
@@ -557,9 +525,11 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.ant-table-striped :deep(.table-striped) td {
|
.ant-table-striped :deep(.table-striped) td {
|
||||||
background-color: #fafafa !important;
|
background-color: #fafafa !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
.addvoteDrawer {
|
.addvoteDrawer {
|
||||||
.drawerMain {
|
.drawerMain {
|
||||||
.header {
|
.header {
|
||||||
@@ -569,6 +539,7 @@ export default {
|
|||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-shrink: 0;
|
flex-shrink: 0;
|
||||||
|
|
||||||
.headerTitle {
|
.headerTitle {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
@@ -577,31 +548,38 @@ export default {
|
|||||||
margin-left: 24px;
|
margin-left: 24px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.contentMain {
|
.contentMain {
|
||||||
display: flex;
|
display: flex;
|
||||||
justify-content: space-between;
|
justify-content: space-between;
|
||||||
|
|
||||||
.main_left {
|
.main_left {
|
||||||
padding-right: 30px;
|
padding-right: 30px;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
border-right: 1px solid #e8e8e8;
|
border-right: 1px solid #e8e8e8;
|
||||||
margin-top: 32px;
|
margin-top: 32px;
|
||||||
|
|
||||||
.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;
|
||||||
@@ -613,14 +591,17 @@ export default {
|
|||||||
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;
|
||||||
@@ -631,28 +612,34 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -662,10 +649,12 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.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;
|
||||||
@@ -682,6 +671,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.main_btns {
|
.main_btns {
|
||||||
height: 72px;
|
height: 72px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
@@ -691,6 +681,7 @@ export default {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
|
||||||
|
|
||||||
.btn1 {
|
.btn1 {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
@@ -700,6 +691,7 @@ export default {
|
|||||||
background-color: #fff;
|
background-color: #fff;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.btn2 {
|
.btn2 {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
|
|||||||
@@ -1,20 +1,12 @@
|
|||||||
<!-- 评估管理-创建评估页面 -->
|
<!-- 评估管理-创建评估页面 -->
|
||||||
<template>
|
<template>
|
||||||
<a-drawer
|
<a-drawer :visible="createVoteVisible" class="drawerStyle createvoteDrawer" width="100%" placement="right"
|
||||||
:visible="createVoteVisible"
|
@after-visible-change="afterVisibleChange">
|
||||||
class="drawerStyle createvoteDrawer"
|
|
||||||
width="100%"
|
|
||||||
placement="right"
|
|
||||||
@after-visible-change="afterVisibleChange"
|
|
||||||
>
|
|
||||||
<div class="researchadd">
|
<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">
|
||||||
@@ -25,12 +17,8 @@
|
|||||||
<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="ballotName" style="width: 424px; height: 32px" placeholder="请输入任务名称"
|
||||||
v-model:value="ballotName"
|
maxlength="20" />
|
||||||
style="width: 424px; height: 32px"
|
|
||||||
placeholder="请输入任务名称"
|
|
||||||
maxlength="20"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="main_item">
|
<div class="main_item">
|
||||||
@@ -52,29 +40,20 @@
|
|||||||
|
|
||||||
<div class="footer">
|
<div class="footer">
|
||||||
<div class="btn">
|
<div class="btn">
|
||||||
<a-button
|
<a-button type="primary" style="
|
||||||
type="primary"
|
|
||||||
style="
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
background-color: #409eff;
|
background-color: #409eff;
|
||||||
"
|
" @click="handleSave">
|
||||||
@click="handleSave"
|
|
||||||
>
|
|
||||||
保存
|
保存
|
||||||
</a-button>
|
</a-button>
|
||||||
<a-button
|
<a-button type="primary" ghost style="
|
||||||
type="primary"
|
|
||||||
ghost
|
|
||||||
style="
|
|
||||||
width: 100px;
|
width: 100px;
|
||||||
height: 40px;
|
height: 40px;
|
||||||
margin-left: 14px;
|
margin-left: 14px;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
"
|
" @click="handleAllCancel">
|
||||||
@click="handleAllCancel"
|
|
||||||
>
|
|
||||||
取消
|
取消
|
||||||
</a-button>
|
</a-button>
|
||||||
</div>
|
</div>
|
||||||
@@ -84,7 +63,7 @@
|
|||||||
</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";
|
||||||
|
|
||||||
@@ -98,7 +77,7 @@ import {
|
|||||||
//import store from "@/store";
|
//import store from "@/store";
|
||||||
import * as api from "@/api/indexVote";
|
import * as api from "@/api/indexVote";
|
||||||
//import { useRouter } from "vue-router";
|
//import { useRouter } from "vue-router";
|
||||||
import {} from "@/api/indexResearch";
|
import { } from "@/api/indexResearch";
|
||||||
|
|
||||||
//import { message } from "ant-design-vue";
|
//import { message } from "ant-design-vue";
|
||||||
|
|
||||||
@@ -130,9 +109,9 @@ export default {
|
|||||||
});
|
});
|
||||||
// const router = useRouter();
|
// const router = useRouter();
|
||||||
const afterVisibleChange = () => {
|
const afterVisibleChange = () => {
|
||||||
if(state.ballotId>0){
|
if (props.ballotId) {
|
||||||
getInfoDate();
|
getInfoDate();
|
||||||
}else{
|
} else {
|
||||||
handleTypes();
|
handleTypes();
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -145,23 +124,23 @@ export default {
|
|||||||
};
|
};
|
||||||
// 详情
|
// 详情
|
||||||
const getInfoDate = async () => {
|
const getInfoDate = async () => {
|
||||||
console.log("props.editChild=====",props.editChild);
|
console.log("props.editChild=====", props.editChild);
|
||||||
if (props.ballotId>0) {
|
if (props.ballotId) {
|
||||||
console.log("props.editChild2=====",props.editChild);
|
console.log("props.editChild2=====", props.editChild);
|
||||||
let res = await api
|
let res = await api
|
||||||
.queryStemByStemId({ballotId:props.ballotId})
|
.queryStemByStemId(props.ballotId)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
return res.data.data;
|
return res.data.data;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log("res====",res);
|
console.log("res====", res);
|
||||||
state.ballotName = res.ballotId;
|
state.ballotName = res.ballotId;
|
||||||
// let renderArr = [...res];
|
// let renderArr = [...res];
|
||||||
// sortBy(renderArr, "orderNumber"); //序号
|
// sortBy(renderArr, "orderNumber"); //序号
|
||||||
state.allFormsData = parseData(res); //类型
|
state.allFormsData = parseData(res); //类型
|
||||||
|
|
||||||
console.log( state.allFormsData);
|
console.log(state.allFormsData);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -170,24 +149,24 @@ export default {
|
|||||||
const parseData = (arr) => {
|
const parseData = (arr) => {
|
||||||
const resultArr = [];
|
const resultArr = [];
|
||||||
state.ballotId = arr.ballotId;
|
state.ballotId = arr.ballotId;
|
||||||
state.ballotName =arr.ballotName;
|
state.ballotName = arr.ballotName;
|
||||||
|
|
||||||
console.log("arr.voteStemVoList=====",arr.voteStemVoList);
|
console.log("arr.voteStemVoList=====", arr.voteStemVoList);
|
||||||
arr.voteStemVoList.forEach((item) => {
|
arr.voteStemVoList.forEach((item) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
let restList = traverseArr(item.optionDetailList, {
|
let restList = traverseArr(item.optionDetailList, {
|
||||||
inputVal: "optionName",
|
inputVal: "optionName",
|
||||||
imgVal: "optionPictureAddress",
|
imgVal: "optionPictureAddress",
|
||||||
optionId: "optionId",
|
optionId: "optionId",
|
||||||
voteStemId:"voteStemId",
|
voteStemId: "voteStemId",
|
||||||
stem:"stem",
|
stem: "stem",
|
||||||
}).map((itm, idx) => {
|
}).map((itm, idx) => {
|
||||||
itm.id = idx + 1;
|
itm.id = idx + 1;
|
||||||
return itm;
|
return itm;
|
||||||
});
|
});
|
||||||
|
|
||||||
obj = {
|
obj = {
|
||||||
voteStemId:item.voteStemId,
|
voteStemId: item.voteStemId,
|
||||||
valueSingle: item.voteStemName,
|
valueSingle: item.voteStemName,
|
||||||
singleList: restList,
|
singleList: restList,
|
||||||
};
|
};
|
||||||
@@ -205,14 +184,14 @@ export default {
|
|||||||
const resultArr = [];
|
const resultArr = [];
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
console.log("item=======",item);
|
console.log("item=======", item);
|
||||||
// if (item[typeKey] === 1) {
|
// if (item[typeKey] === 1) {
|
||||||
let restList = traverseArr(item.singleList, {
|
let restList = traverseArr(item.singleList, {
|
||||||
optionName: "inputVal",
|
optionName: "inputVal",
|
||||||
optionPictureAddress: "imgVal",
|
optionPictureAddress: "imgVal",
|
||||||
optionId: "optionId",
|
optionId: "optionId",
|
||||||
voteStemId:"voteStemId",
|
voteStemId: "voteStemId",
|
||||||
stem:"stem",
|
stem: "stem",
|
||||||
}).map((itm, idx) => {
|
}).map((itm, idx) => {
|
||||||
itm.optionOrderNum = idx + 1;
|
itm.optionOrderNum = idx + 1;
|
||||||
return itm;
|
return itm;
|
||||||
@@ -227,12 +206,12 @@ export default {
|
|||||||
|
|
||||||
voteStemName: item.valueSingle,
|
voteStemName: item.valueSingle,
|
||||||
optionDetailList: restList,
|
optionDetailList: restList,
|
||||||
voteStemId:item.voteStemId,
|
voteStemId: item.voteStemId,
|
||||||
|
|
||||||
};
|
};
|
||||||
resultArr.push(obj);
|
resultArr.push(obj);
|
||||||
// }
|
// }
|
||||||
console.log("resultArr=======",resultArr);
|
console.log("resultArr=======", resultArr);
|
||||||
|
|
||||||
});
|
});
|
||||||
resultArr.map((itm, idx) => {
|
resultArr.map((itm, idx) => {
|
||||||
@@ -250,7 +229,7 @@ export default {
|
|||||||
// if (key === "1") {
|
// if (key === "1") {
|
||||||
// let arrSingle = arrr
|
// let arrSingle = arrr
|
||||||
//filterComObj[key];
|
//filterComObj[key];
|
||||||
console.log("arrr======",arrr);
|
console.log("arrr======", arrr);
|
||||||
/*
|
/*
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arrSingle.forEach((item) => {
|
arrSingle.forEach((item) => {
|
||||||
@@ -268,7 +247,7 @@ export default {
|
|||||||
});*/
|
});*/
|
||||||
resultObj.voteStemDtoList = arrr;
|
resultObj.voteStemDtoList = arrr;
|
||||||
// }
|
// }
|
||||||
console.log("resultObj======",resultObj);
|
console.log("resultObj======", resultObj);
|
||||||
// }
|
// }
|
||||||
return resultObj;
|
return resultObj;
|
||||||
};
|
};
|
||||||
@@ -342,9 +321,9 @@ export default {
|
|||||||
console.log(resultPost);
|
console.log(resultPost);
|
||||||
api.updateStemMessage(resultPost).then((res) => {
|
api.updateStemMessage(resultPost).then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
state.ballotId=res.data.data.ballotId
|
state.ballotId = res.data.data.ballotId
|
||||||
console.log("res.data.data==============",res.data.data);
|
console.log("res.data.data==============", res.data.data);
|
||||||
console.log("res.state.ballotId==============",state.ballotId);
|
console.log("res.state.ballotId==============", state.ballotId);
|
||||||
message.success("编辑成功");
|
message.success("编辑成功");
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
}
|
}
|
||||||
@@ -360,12 +339,12 @@ export default {
|
|||||||
"assessmentMinScore",
|
"assessmentMinScore",
|
||||||
]);*/
|
]);*/
|
||||||
|
|
||||||
console.log("=========",resultPost);
|
console.log("=========", resultPost);
|
||||||
api.createStemMessage(resultPost).then((res) => {
|
api.createStemMessage(resultPost).then((res) => {
|
||||||
if (res.data.code === 200) {
|
if (res.data.code === 200) {
|
||||||
state.ballotId=res.data.data.ballotId
|
state.ballotId = res.data.data.ballotId
|
||||||
console.log("res.data.data2==============",res.data.data);
|
console.log("res.data.data2==============", res.data.data);
|
||||||
console.log("res.state.ballotId=2s=============",state.ballotId);
|
console.log("res.state.ballotId=2s=============", state.ballotId);
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
}
|
}
|
||||||
@@ -378,20 +357,20 @@ export default {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const checkVal = (filterData) => {
|
const checkVal = (filterData) => {
|
||||||
console.log("filterData.====",filterData);
|
console.log("filterData.====", filterData);
|
||||||
console.log("filterData.voteStemVoList====",filterData.voteStemDtoList);
|
console.log("filterData.voteStemVoList====", filterData.voteStemDtoList);
|
||||||
|
|
||||||
if(!filterData.voteStemDtoList){
|
if (!filterData.voteStemDtoList) {
|
||||||
message.error("请添加题干");
|
message.error("请添加题干");
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
let arr = filterData.voteStemDtoList;
|
let arr = filterData.voteStemDtoList;
|
||||||
arr.forEach((item) => {
|
arr.forEach((item) => {
|
||||||
console.log("item===",item);
|
console.log("item===", item);
|
||||||
console.log("!item.voteStemName===",!item.voteStemName);
|
console.log("!item.voteStemName===", !item.voteStemName);
|
||||||
if (!item.voteStemName) {
|
if (!item.voteStemName) {
|
||||||
console.log("item.voteStemName===",item.voteStemName);
|
console.log("item.voteStemName===", item.voteStemName);
|
||||||
message.error("题干为必填 请确认",item.voteStemName);
|
message.error("题干为必填 请确认", item.voteStemName);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1294,38 +1294,38 @@ export default {
|
|||||||
],
|
],
|
||||||
// 共享文档列表
|
// 共享文档列表
|
||||||
docList: [
|
docList: [
|
||||||
{
|
// {
|
||||||
name: "测试文档1.doc",
|
// name: "测试文档1.doc",
|
||||||
src: "",
|
// src: "",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "测试文档2.doc",
|
// name: "测试文档2.doc",
|
||||||
src: "",
|
// src: "",
|
||||||
},
|
// },
|
||||||
{
|
// {
|
||||||
name: "测试文档3.doc",
|
// name: "测试文档3.doc",
|
||||||
src: "",
|
// src: "",
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
huodModal: false,
|
huodModal: false,
|
||||||
zhibModal: false,
|
zhibModal: false,
|
||||||
//任务大纲列表
|
//任务大纲列表
|
||||||
taskSyllabus: [
|
taskSyllabus: [
|
||||||
{
|
// {
|
||||||
name: "关卡1 初级产品经理",
|
// name: "关卡1 初级产品经理",
|
||||||
taskList: [
|
// taskList: [
|
||||||
{
|
// {
|
||||||
course: "在线",
|
// course: "在线",
|
||||||
name: "时间管理",
|
// name: "时间管理",
|
||||||
classify: "选修",
|
// classify: "选修",
|
||||||
beginTime: "2022-09-10 14:03",
|
// beginTime: "2022-09-10 14:03",
|
||||||
total: 50, //总人数
|
// total: 50, //总人数
|
||||||
complete: 20, //完成人数
|
// complete: 20, //完成人数
|
||||||
percent: 40,
|
// percent: 40,
|
||||||
routerTaskId: 0,
|
// routerTaskId: 0,
|
||||||
},
|
// },
|
||||||
],
|
// ],
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
activeKey: ref("1"),
|
activeKey: ref("1"),
|
||||||
value: ref(" "),
|
value: ref(" "),
|
||||||
|
|||||||
@@ -1082,11 +1082,11 @@ export default {
|
|||||||
? JSON.parse(storage.get("routerId"))
|
? JSON.parse(storage.get("routerId"))
|
||||||
: null,
|
: null,
|
||||||
level: [
|
level: [
|
||||||
{
|
// {
|
||||||
chapterId: "1",
|
// chapterId: "1",
|
||||||
remark: "关卡说明",
|
// remark: "关卡说明",
|
||||||
name: "默认关卡",
|
// name: "默认关卡",
|
||||||
},
|
// },
|
||||||
],
|
],
|
||||||
tableData: [
|
tableData: [
|
||||||
// {
|
// {
|
||||||
@@ -1103,78 +1103,15 @@ export default {
|
|||||||
// },
|
// },
|
||||||
],
|
],
|
||||||
tableData2: [
|
tableData2: [
|
||||||
{
|
// {
|
||||||
key: 1,
|
// key: 1,
|
||||||
name: "张三",
|
// name: "张三",
|
||||||
com: "产研部",
|
// com: "产研部",
|
||||||
gang: "产品经理",
|
// gang: "产品经理",
|
||||||
cur: "关卡2",
|
// cur: "关卡2",
|
||||||
jin: "2/10",
|
// jin: "2/10",
|
||||||
time: "2022-07-15 14:00",
|
// time: "2022-07-15 14:00",
|
||||||
},
|
// },
|
||||||
{
|
|
||||||
key: 2,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡2",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 3,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡2",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 4,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡1",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 5,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡1",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 6,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡2",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 7,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡2",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
key: 8,
|
|
||||||
name: "张三",
|
|
||||||
com: "产研部",
|
|
||||||
gang: "产品经理",
|
|
||||||
cur: "关卡2",
|
|
||||||
jin: "2/10",
|
|
||||||
time: "2022-07-15 14:00",
|
|
||||||
},
|
|
||||||
],
|
],
|
||||||
//项目抽屉、列表参数
|
//项目抽屉、列表参数
|
||||||
currentPage: 1,
|
currentPage: 1,
|
||||||
|
|||||||
@@ -13,7 +13,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="main">
|
<div class="main">s
|
||||||
<div class="name">
|
<div class="name">
|
||||||
<div class="namebox">
|
<div class="namebox">
|
||||||
<img
|
<img
|
||||||
|
|||||||
@@ -1367,28 +1367,39 @@ export default {
|
|||||||
|
|
||||||
// console.log("stage",Object.prototype.toString.call(stage))
|
// console.log("stage",Object.prototype.toString.call(stage))
|
||||||
getStageData(res.data.data.stageList);
|
getStageData(res.data.data.stageList);
|
||||||
if (stage !== "null") {
|
if (stage != null) {
|
||||||
console.log(stage);
|
console.log(stage);
|
||||||
let stageList = res.data.data.stageList; //阶段数组
|
let stageList = res.data.data.stageList; //阶段数组
|
||||||
let result = stageList.find((item) => item.stageId == stage);
|
let result = stageList.find((item) => item.stageId == stage);
|
||||||
console.log("又找到了", result);
|
console.log("又找到了", result);
|
||||||
if (result != null) {
|
if(result!=null){
|
||||||
getTableData(result.taskList);
|
getTableData(result.taskList);
|
||||||
}
|
}else{
|
||||||
} else {
|
|
||||||
//没有选中的阶段时,获取全部的任务
|
//没有选中的阶段时,获取全部的任务
|
||||||
console.log(stage);
|
console.log(stage);
|
||||||
let stageList = res.data.data.stageList; //阶段数组
|
let stageList = res.data.data.stageList; //阶段数组
|
||||||
if (stageList != null) {
|
if(stageList!=null){
|
||||||
let taskListAll = null;
|
let taskListAll;
|
||||||
stageList.forEach((item) => {
|
stageList.forEach((item) => {
|
||||||
taskListAll = [taskListAll, ...item.taskList];
|
taskListAll=[...item.taskList];
|
||||||
});
|
});
|
||||||
console.log("taskListAll", taskListAll);
|
console.log("taskListAll",taskListAll);
|
||||||
getTableData(taskListAll);
|
getTableData(taskListAll);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else{
|
||||||
|
console.log(stage);
|
||||||
|
let stageList = res.data.data.stageList; //阶段数组
|
||||||
|
if(stageList!=null){
|
||||||
|
let taskListAll;
|
||||||
|
stageList.forEach((item) => {
|
||||||
|
taskListAll=[...item.taskList];
|
||||||
|
});
|
||||||
|
console.log("taskListAll",taskListAll);
|
||||||
|
getTableData(taskListAll);
|
||||||
|
}
|
||||||
|
}
|
||||||
// 每次都获取了第一条taskList
|
// 每次都获取了第一条taskList
|
||||||
// let arr = res.data.data.stageList[0].taskList;
|
// let arr = res.data.data.stageList[0].taskList;
|
||||||
// console.log("任务列表", stage, arr);
|
// console.log("任务列表", stage, arr);
|
||||||
@@ -1624,6 +1635,7 @@ export default {
|
|||||||
console.log("删除阶段成功", res);
|
console.log("删除阶段成功", res);
|
||||||
message.success("删除阶段成功");
|
message.success("删除阶段成功");
|
||||||
closeDeleteStage();
|
closeDeleteStage();
|
||||||
|
localStorage.setItem("stageId", "")
|
||||||
getTask();
|
getTask();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|||||||
Reference in New Issue
Block a user