feat:合并

This commit is contained in:
lixg
2022-11-30 23:54:51 +08:00
16 changed files with 983 additions and 976 deletions

View File

@@ -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: {
'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 deleteVoteStem = (obj) => http.post('/vote/deleteVoteStem', obj,{
export const deleteVoteStem = (obj) => http.post('/vote/deleteVoteStem', obj, {
headers: {
'token': '123',
'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)
//根据题干ID获取题干信息
export const queryStemByStemId = (obj) => http.post('/vote/queryStemByStemId', obj,{
headers: {
'token': '123',
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
})
export const queryStemByStemId = (ballotId) => http.post(`/vote/queryStemByStemId?ballotId=${ballotId}`)
//修改题干信息接口
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 }));
//根据题干ID获取投票任务
export const queryVoteDetailById = (obj) => http.post('/vote/queryVoteDetailById', obj,{
headers: {
'token': '123',
'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8',
}
})
export const queryVoteDetailById = (voteID) => http.post(`/vote/queryVoteDetailById?voteId=${voteID}`)
// 测试方法
// import * as api from '../../api/index'

View File

@@ -136,7 +136,9 @@
</div>
<div class="kqszbox">
<div class="qdqtbox">
<div class="qdbtn"><div class="btntext">签到</div></div>
<div class="qdbtn">
<div class="btntext">签到</div>
</div>
</div>
<div class="setbox">
<div class="timerbox">
@@ -173,7 +175,9 @@
</div>
</div>
<div class="qdqtbox">
<div class="qtbtn"><div class="btntext">签退</div></div>
<div class="qtbtn">
<div class="btntext">签退</div>
</div>
</div>
<div class="setbox">
<div class="timerbox">
@@ -204,10 +208,12 @@
<div class="btnbox">
<a-radio-group v-model:value="radioV1">
<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
>签到签退全部完成
</a-radio
>
</a-radio-group>
</div>
@@ -222,11 +228,11 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs } from "vue";
import {reactive, toRefs} from "vue";
import * as api from "../../api/indexActivity";
import * as apiTask from "../../api/indexTaskadd";
import { RouterEditTask } from "@/api/indexTask";
import { message } from "ant-design-vue";
import {RouterEditTask} from "@/api/indexTask";
import {message} from "ant-design-vue";
import dayjs from "dayjs";
export default {
@@ -282,7 +288,7 @@ export default {
type: Number,
default: null,
},
projectTemplateId:{
projectTemplateId: {
type: Number,
default: null,
},
@@ -353,7 +359,8 @@ export default {
dayjs(res.data.data.activityEndTime, "YYYY-MM-DD"),
];
})
.catch(() => {});
.catch(() => {
});
};
const afterVisibleChange = (bool) => {
if (bool && props.edit) {
@@ -365,9 +372,9 @@ export default {
state.radioV1 = "";
}
};
const updateTask = (res) => {
const updateTask = async (res) => {
if (props.isLevel == 1) {
RouterEditTask({
await RouterEditTask({
chapterId: props.isactive,
courseId: res.data.data.activityId,
duration: res.data.data.activityDuration,
@@ -383,7 +390,7 @@ export default {
//message.error(`${props.edit ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apiTask
await apiTask
.addTask({
courseId: res.data.data.activityId,
duration: res.data.data.activityDuration,
@@ -400,7 +407,7 @@ export default {
//////message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
apiTask
await apiTask
.addTempTask({
courseId: res.data.data.activityId,
duration: res.data.data.activityDuration,
@@ -463,9 +470,9 @@ export default {
//更新编辑活动信息
api
.updateActivity(obj)
.then((res) => {
.then(async (res) => {
closeDrawer();
updateTask(res);
await updateTask(res);
ctx.emit("changeData", false);
message.destroy();
message.success("更新成功");
@@ -478,11 +485,11 @@ export default {
//新建活动信息
api
.createActivity(obj)
.then((res) => {
.then(async (res) => {
message.destroy();
message.success("创建成功");
closeDrawer();
updateTask(res);
await updateTask(res);
ctx.emit("changeData", false);
})
.catch(() => {
@@ -507,6 +514,7 @@ export default {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.addactiveDrawer {
.drawerMain {
.header {
@@ -516,6 +524,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -524,40 +533,49 @@ export default {
margin-left: 24px;
}
}
.contentMain {
display: flex;
justify-content: space-between;
.ant-input {
height: 88px;
width: 384px;
border-radius: 8px;
}
.ant-picker {
border-radius: 8px;
}
.main_left {
margin-top: 32px;
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
.main_item {
display: flex;
align-items: center;
margin-top: 32px;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -570,24 +588,29 @@ export default {
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 5px;
cursor: pointer;
}
.qdbtn,
.qtbtn {
width: 75px;
@@ -598,15 +621,18 @@ export default {
display: flex;
align-items: center;
justify-content: center;
.btntext {
color: #387df7;
}
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
@@ -616,10 +642,12 @@ export default {
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -636,6 +664,7 @@ export default {
}
}
}
.main_btns {
height: 72px;
width: 100%;
@@ -645,6 +674,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -654,6 +684,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -281,7 +281,7 @@ export default {
.addTask({
courseId: state.apiTaskList[i].casesId,
name: state.apiTaskList[i].title,
projectTemplateId: props.projectTemplateId,
projectId: props.projectId,
projectTaskId: props.projectTaskId,
stageId: Number(props.chooseStageId),
type: 3,
@@ -305,7 +305,7 @@ export default {
duration: 0,
flag: true,
name: state.apiTaskList[i].caseName,
projectId: props.projectId,
projectTaskId: props.projectTaskId,
projectTemplateId: props.projectTemplateId,
stageId: props.chooseStageId || 0,
type: 3,

View File

@@ -106,15 +106,16 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs } from "vue";
import {reactive, toRefs} from "vue";
// import { useRouter } from "vue-router";
import EvList from "./EvList.vue";
import * as api from "../../api/indexEval";
import * as apitaskadd from "../../api/indexTaskadd";
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
import {message} from "ant-design-vue";
import {RouterEditTask} from "@/api/indexTask";
import dayjs from "dayjs";
import { addTempTask } from "../../api/indexTaskadd";
import {addTempTask} from "../../api/indexTaskadd";
export default {
name: "AddEval",
components: {
@@ -172,7 +173,7 @@ export default {
EvalListVisible: false,
// addLoading:false,
});
const checkFinish = (value)=> {
const checkFinish = (value) => {
state.evaluationTypeId = value.quiz_kid ? value.quiz_kid : null
state.evaluationTypeName = value.title ? value.title : ""
}
@@ -201,9 +202,9 @@ export default {
state.evaluationTypeName = "";
};
//向关卡或阶段渲染
const updateTask = (value) => {
const updateTask = async (value) => {
if (props.isLevel == 1) {
RouterEditTask({
await RouterEditTask({
chapterId: props.isactive,
courseId: Number(value.evaluationId),
name: value.evaluationName,
@@ -218,7 +219,7 @@ export default {
//message.error(`${props.EditTestId ? "编辑" : "新增"}关卡任务失败`);
});
} else if (props.isLevel == 2) {
apitaskadd
await apitaskadd
.addTask({
duration: 0,
flag: true,
@@ -238,7 +239,7 @@ export default {
//message.error(`${props.edit ? "编辑" : "新增"}阶段任务失败`);
});
} else if (props.isLevel == 3) {
addTempTask({
await addTempTask({
courseId: Number(value.evaluationId),
name: value.evaluationName,
projectTemplateId: props.projectTemplateId,
@@ -270,23 +271,23 @@ export default {
state.time = res.data.data.evaluationStartTime ? [
dayjs(res.data.data.evaluationStartTime, "YYYY-MM-DD"),
dayjs(res.data.data.evaluationEndTime, "YYYY-MM-DD"),
] : undefined ;
] : undefined;
state.description = res.data.data.evaluationExplain
})
.catch((err) => {
message.destroy()
message.error("获取测量平信息失败");
console.log(err,"erererrerererererer");
console.log(err, "erererrerererererer");
});
}
const creoredit = ()=> {
if(props.edit){
const creoredit = () => {
if (props.edit) {
editInvistText()
}else{
} else {
createEvalText()
}
}
const editInvistText = ()=> {
const editInvistText = () => {
if (!state.inputV1) {
message.destroy();
return message.info("请输入测评名称");
@@ -309,8 +310,8 @@ export default {
};
api
.updateEvaluation(objei)
.then((res) => {
updateTask(res.data.data);
.then(async (res) => {
await updateTask(res.data.data);
closeDrawer();
ctx.emit("changeData", false);
message.destroy();
@@ -334,11 +335,11 @@ export default {
let obj = {
evaluationName: state.inputV1,
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") : "",
evaluationTypeId: state.evaluationTypeId,
evaluationTypeName: state.evaluationTypeName,
evaluationExplain:state.description,
evaluationExplain: state.description,
evaluationFlag: "",
evaluationPictureAddress: "",
evaluationTag: "",
@@ -346,8 +347,8 @@ export default {
};
api
.createEvaluation(obj)
.then((res) => {
updateTask(res.data.data);
.then(async (res) => {
await updateTask(res.data.data);
closeDrawer();
ctx.emit("changeData", false);
message.destroy();
@@ -380,6 +381,7 @@ export default {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.addevalDrawer {
.drawerMain {
.header {
@@ -389,6 +391,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -397,32 +400,39 @@ export default {
margin-left: 24px;
}
}
.contentMain {
display: flex;
justify-content: space-between;
.main_left {
margin-top: 32px;
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
.main_item {
display: flex;
align-items: center;
margin-top: 32px;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.checkEval {
cursor: pointer;
width: 130px;
@@ -433,34 +443,41 @@ export default {
margin-left: 15px;
color: #fff;
}
.tag-style {
color: rgb(113, 113, 237);
background-color: #d7d1f7;
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 56px;
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
@@ -470,10 +487,12 @@ export default {
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -490,6 +509,7 @@ export default {
}
}
}
.main_btns {
height: 72px;
width: 100%;
@@ -499,6 +519,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -508,6 +529,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -522,7 +522,7 @@ export default {
editPlan(obj)
.then((res) => {
message.destroy();
message.error(`添加成功`);
message.sucsess(`添加成功`);
updateTask(res);
ctx.emit("changeData", false);
closeDrawer();

View File

@@ -182,7 +182,7 @@ export default {
});
const state = reactive({
addLoading: false,
fileUrl: null,
workEnclosureAddress: "",
});
const formRef = ref();
@@ -254,6 +254,8 @@ export default {
console.log("info", info);
if (info.file.status !== "uploading") {
console.log(info.file, info.fileList);
state.workEnclosureAddress = info.fileList[0].response.data;
console.log("state.workEnclosureAddress", state.workEnclosureAddress);
}
if (info.file.status === "done") {
@@ -278,6 +280,7 @@ export default {
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
fileList.value = [];
state.workEnclosureAddress = "";
resetForm();
};
const afterVisibleChange = () => {
@@ -292,7 +295,9 @@ export default {
let obj = {
submitEndTime: dayjs(formState.choosedTime[1]).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,
workName: formState.workName,
workRequirement: formState.workRequirement,
@@ -413,11 +418,12 @@ export default {
};
const cle = () => {
console.log("xx", formState);
let obj = {
submitEndTime: dayjs(formState.choosedTime[1]).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,
workName: formState.workName,
workRequirement: formState.workRequirement,

View File

@@ -212,11 +212,12 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs } from "vue";
import { RouterEditTask } from "@/api/indexTask";
import { message } from "ant-design-vue";
import {reactive, toRefs} from "vue";
import {RouterEditTask} from "@/api/indexTask";
import {message} from "ant-design-vue";
import * as apiProj from "../../api/index.js";
import dayjs from "dayjs";
export default {
name: "AddProject",
props: {
@@ -435,7 +436,7 @@ export default {
state.selectedRows.forEach((item) => {
let origin = JSON.parse(props.chooseProjectList);
console.log("ccxx", origin);
if(origin==null){
if (origin == null) {
closeSameModal();
closeDrawer();
message.destroy();
@@ -464,9 +465,9 @@ export default {
});
};
const updateTask = (res) => {
const updateTask = async (res) => {
if (props.isLevel == 1) {
RouterEditTask({
await RouterEditTask({
chapterId: props.isactive,
courseId: res.key,
name: res.name,
@@ -496,11 +497,13 @@ export default {
state.sameProj = null;
state.sameModal = false;
};
const sureSameModal = () => {
const sureSameModal = async () => {
// updateTask(state.sameProj);
state.selectedRows.forEach((item) => {
updateTask(item);
});
if (state.selectedRows && state.selectedRows.length) {
for (const item in state.selectedRows) {
await updateTask(item);
}
}
state.sameProj = null;
state.sameModal = false;
closeDrawer();
@@ -530,17 +533,21 @@ export default {
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.sameModal {
.ant-modal {
width: 424px !important;
height: 258px !important;
.ant-modal-content {
width: 424px !important;
height: 258px !important;
.ant-modal-body {
width: 424px !important;
height: 258px !important;
padding: 0 !important;
.delete {
z-index: 999;
width: 424px;
@@ -561,15 +568,18 @@ export default {
rgba(78, 166, 255, 0) 100%
);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.icon {
width: 16px;
height: 16px;
@@ -577,6 +587,7 @@ export default {
background-image: url(@/assets/images/taskpage/gan.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
@@ -587,6 +598,7 @@ export default {
background-size: 100% 100%;
}
}
.body {
width: 100%;
margin: 34px auto 56px auto;
@@ -596,6 +608,7 @@ export default {
flex-direction: column;
// background-color: red;
position: relative;
.back {
position: absolute;
top: 30px;
@@ -604,10 +617,12 @@ export default {
color: #666666;
}
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
@@ -619,17 +634,20 @@ export default {
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
margin-right: 14px;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
@@ -641,6 +659,7 @@ export default {
}
}
}
.addrefDrawer {
.drawerMain {
// .main_notice {
@@ -680,6 +699,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -688,35 +708,43 @@ export default {
margin-left: 24px;
}
}
.contentMain {
display: flex;
justify-content: space-between;
.main_left {
margin-top: 32px;
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
.main_item {
display: flex;
align-items: center;
margin-top: 32px;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.ant-input {
height: 100%;
}
.xkbtn {
cursor: pointer;
width: 130px;
@@ -729,32 +757,40 @@ export default {
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.textarea {
width: 423px;
.ant-input {
width: 100%;
}
.ant-input-textarea-show-count {
position: relative;
}
.ant-input-textarea-show-count::after {
position: absolute;
right: 10px;
bottom: 0px;
}
.ant-input {
border-radius: 8px;
}
@@ -762,6 +798,7 @@ export default {
}
}
}
.main_btns {
height: 72px;
width: 100%;
@@ -771,6 +808,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -780,6 +818,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -176,7 +176,7 @@ export default {
console.log(errors);
// message.error("handleFinishFailed");
};
const updateTask = (res) => {
const updateTask = async (res) => {
if (props.isLevel == 1) {
RouterEditTask({
chapterId: props.isactive,
@@ -186,9 +186,9 @@ export default {
routerTaskId: props.routerTaskId || 0,
type: 7,
})
.then(() => {
.then(async () => {
// message.success(`${props.edit ? "编辑" : "新增"}关卡任务成功`);
ctx.emit("changeData", false);
await ctx.emit("changeData", false);
closeDrawer();
state.addLoading = false;
})
@@ -254,18 +254,18 @@ export default {
if (props.edit) {
api
.updateLinks(obj)
.then((res) => {
.then(async (res) => {
message.success("编辑成功");
updateTask(res);
await updateTask(res);
ctx.emit("changeData", false);
})
.catch(() => {});
} else {
api
.createExternalChain(obj)
.then((res) => {
.then(async (res) => {
message.success("提交成功");
updateTask(res);
await updateTask(res);
ctx.emit("changeData", false);
})
.catch(() => {});

View File

@@ -39,7 +39,7 @@
<div class="set_content">
<div class="setc_name"><span>资源归属</span></div>
<div class="setc_main">
<span style="color: #999999">{{ sourceBelong }}</span>
<span style="color: #999999">{{ sourceBelongName }}</span>
</div>
</div>
<div class="set_content">
@@ -261,12 +261,11 @@ export default {
state.showDetail = !state.showDetail;
};
const subMit = () => {
if (state.valueSuggest == null || state.valueSuggest == undefined || state.valueSuggest == "") {
message.destroy();
message.error("请输入审核意见");
if(!state.valueSuggest){
message.error(`请输入审核意见!`);
return
}
auditView({
createId: props.chooseCreateId,
createName: props.chooseCreater,

View File

@@ -1,83 +1,54 @@
<template>
<a-drawer
:visible="addvoteVisible"
class="drawerStyle addvoteDrawer"
width="80%"
title="添加投票"
placement="right"
@after-visible-change="afterVisibleChange"
>
<a-drawer :visible="addvoteVisible" class="drawerStyle addvoteDrawer" width="80%" title="添加投票" placement="right"
@after-visible-change="afterVisibleChange">
<div class="drawerMain">
<div class="header">
<div v-if="edit" class="headerTitle">编辑投票</div>
<div v-else class="headerTitle">添加投票</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" />
</div>
<div class="contentMain">
<div class="main_left">
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
</div>
<span style="margin-right: 3px">任务名称</span>
</div>
<div class="btnbox">
<a-input
v-model:value="inputV1"
style="width: 424px; height: 32px"
placeholder="请输入投票名称"
maxlength="20"
/>
<a-input v-model:value="inputV1" style="width: 424px; height: 32px" placeholder="请输入投票名称"
maxlength="20" />
</div>
</div>
<div class="main_item">
<div class="signbox">
<div class="sign">
<img
src="@/assets/images/coursewareManage/asterisk.png"
alt=""
/>
<img src="@/assets/images/coursewareManage/asterisk.png" alt="" />
</div>
<span>创建投票</span>
</div>
<div class="btnbox">
<button
class="xkbtn"
@click="showDrawerCreVote"
>
<button class="xkbtn" @click="showDrawerCreVote">
{{ ballotId ? "编辑" : "添加" }}投票
</button>
<div v-if = "ballotId>0">
<div v-if="ballotId > 0">
<a-tag closable color="processing" @close="log">
<span style="font-size:14px;line-height: 33px;" >删除投票</span>
</a-tag></div>
<div>
<CreateVote
v-model:createVoteVisible="createVoteVisible"
v-model:ballotId="ballotId"
v-model:editChild="editChild"
/>
<span style="font-size:14px;line-height: 33px;">删除投票</span>
</a-tag>
</div>
<button
class="xkbtn"
:style="{ display: creVote ? 'block' : 'none' }"
@click="showDrawerCreVote"
>
<div>
<CreateVote v-model:createVoteVisible="createVoteVisible" v-model:ballotId="ballotId"
v-model:editChild="editChild" />
</div>
<button class="xkbtn" :style="{ display: creVote ? 'block' : 'none' }" @click="showDrawerCreVote">
编辑投票
</button>
<div :style="{ display: creVote ? 'block' : 'none' }">
<div class="fileTigan">
<span style="color: #388be1">{{ballotName}}</span>
<span style="color: #388be1">{{ ballotName }}</span>
<div class="delBox" @click="dleVoteStem()"></div>
</div>
</div>
@@ -85,11 +56,7 @@
<!-- 创建投票侧弹窗 -->
<div>
<create-vote
v-model:crevoteVisible="crevotevisible"
@getData="getStemId"
v-model:ballotId="ballotId"
/>
<create-vote v-model:crevoteVisible="crevotevisible" @getData="getStemId" v-model:ballotId="ballotId" />
</div>
<!-- 创建投票侧弹窗 -->
</div>
@@ -98,11 +65,7 @@
<span style="margin-right: 3px">起止时间</span>
</div>
<div class="btnbox">
<a-range-picker
style="width: 424px"
v-model:value="time"
:placeholder="[' 开始时间', ' 结束时间']"
/>
<a-range-picker style="width: 424px" v-model:value="time" :placeholder="[' 开始时间', ' 结束时间']" />
</div>
</div>
<div class="main_item">
@@ -110,15 +73,12 @@
<span style="margin-right: 3px">基础投票数</span>
</div>
<div class="btnbox">
<a-upload
@change="handleChange"
:multiple="true"
:max-count="1"
action="/manageApi/vote/baseVoteupload"
v-model:file-list="fileList"
>
<a-upload @change="handleChange" :multiple="true" :max-count="1" action="/manageApi/vote/baseVoteupload"
v-model:file-list="fileList">
<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 class="main_item" style="margin-top: -25px">
@@ -132,12 +92,7 @@
<span style="margin-right: 3px">投票说明</span>
</div>
<div class="textarea">
<a-textarea
v-model:value="textV1"
placeholder="请输入投票说明"
allow-clear
maxlength="150"
/>
<a-textarea v-model:value="textV1" placeholder="请输入投票说明" allow-clear maxlength="150" />
</div>
</div>
</div>
@@ -150,7 +105,7 @@
</a-drawer>
</template>
<script>
import { reactive, toRefs} from "vue";
import { reactive, toRefs } from "vue";
import CreateVote from "./CreateVote.vue";
import * as api from "../../api/indexVote";
import { message } from "ant-design-vue";
@@ -206,7 +161,7 @@ export default {
type: Number,
default: null,
},
projectTemplateId:{
projectTemplateId: {
type: Number,
default: null,
}
@@ -219,22 +174,22 @@ export default {
textV1: "",
createVoteVisible: false,
time: undefined,
startTime:"",
endTime:"",
startTime: "",
endTime: "",
basevote: "",
ascriptionId: "",
voteStemId: null,
EditVoteId:"",
voteStemName:"",
EditVoteId: "",
voteStemName: "",
ballotName: "",
editStem: false, //编辑状态
ballotId: 0, //题干id
optionId: "", //删除修改选项id
addStemVisible:false, //
editChild:false,
addStemVisible: false, //
editChild: false,
fileList: [],
voteCount:null,
projectTemplateId:null,
voteCount: null,
projectTemplateId: null,
});
const closeDrawer = () => {
@@ -242,16 +197,16 @@ export default {
state.textV1 = "",
state.time = undefined,
state.basevote = "",
state.ballotId ="",
state.ballotId = "",
ctx.emit("update:addvoteVisible", false);
ctx.emit("update:edit", false);
};
const afterVisibleChange = (bool) => {
if(props.edit&&bool){
if (props.edit && bool) {
queryVoteInfo();
}
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) {
// Component will show file.url as link
file.url = file.response.url;
console.log("file========",file);
console.log("file========",file.response);
console.log("file========", file);
console.log("file========", file.response);
state.voteCount = file.response.data;
}
@@ -282,7 +237,7 @@ export default {
//删除题干信息接口
const dleVoteStem = () => {
api.deleteVoteStem({voteStemId:state.ballotId})
api.deleteVoteStem({ voteStemId: state.ballotId })
.then(() => {
message.success('删除题干信息成功')
@@ -290,11 +245,11 @@ export default {
}
//根据投票id获取投票信息
const queryVoteInfo = ()=>{
const queryVoteInfo = () => {
api.queryVoteDetailById({voteId:props.EditVoteId})
.then((res)=>{
console.log('获取投票信息成功',res);
api.queryVoteDetailById(props.EditVoteId)
.then((res) => {
console.log('获取投票信息成功', res);
state.inputV1 = res.data.data.voteName;
state.textV1 = res.data.data.voteExplain;
state.baseVote = res.data.data.baseVote;
@@ -305,15 +260,15 @@ export default {
dayjs(res.data.data.voteEndTime, "YYYY-MM-DD"),
];
})
.catch((err)=>{
console.log('获取投票信息失败',err);
.catch((err) => {
console.log('获取投票信息失败', err);
});
}
const updateToTask =(res)=>{
console.log("props.isLevel=====",props.isLevel);
if(props.isLevel ==1){
const updateToTask = (res) => {
console.log("props.isLevel=====", props.isLevel);
if (props.isLevel == 1) {
RouterEditTask({
chapterId: props.isactive,
courseId: res.data.data.voteId,
@@ -327,13 +282,13 @@ export default {
ctx.emit("changeData", false);
state.addLoading = false;
})
.catch(( ) => {
.catch(() => {
//message.error(`${props.edit ? '编辑' : '新增'}关卡任务失败`)
});
}else if(props.isLevel ==2){
} else if (props.isLevel == 2) {
apiTask
.addTask({
courseId:res.data.data.voteId,
courseId: res.data.data.voteId,
name: res.data.data.voteName,
projectId: props.projectId,
projectTaskId: props.projectTaskId || 0,
@@ -347,7 +302,7 @@ export default {
.catch(() => {
////message.error(`${props.edit ? '编辑' : '新增'}阶段任务失败`)
});
}else if (props.isLevel == 3) {
} else if (props.isLevel == 3) {
addTempTask({
courseId: res.data.data.voteId,
@@ -380,13 +335,13 @@ export default {
if (state.basevote == "") {
state.basevote = 1;
}
if(state.time != undefined){
if (state.time != undefined) {
state.startTime = dayjs(state.time[0]).format("YYYY-MM-DD");
state.endTime = dayjs(state.time[1]).format("YYYY-MM-DD");
}
let obj = {
voteId: props.edit?state.EditVoteId : 0,
voteId: props.edit ? props.EditVoteId : 0,
voteName: state.inputV1,
voteStartTime: dayjs(state.time[0]).format("YYYY-MM-DD"),
voteEndTime: dayjs(state.time[1]).format("YYYY-MM-DD"),
@@ -395,7 +350,7 @@ export default {
voteExplain: state.textV1,
}
if(props.edit){
if (props.edit) {
api
.editVote(obj)
.then((res) => {
@@ -409,7 +364,7 @@ export default {
message.destroy();
message.error("修改投票信息失败")
})
}else{
} else {
api
.createVote(obj)
.then((res) => {
@@ -432,7 +387,7 @@ export default {
state.addStemVisible = false;
};
const log = e => {
state.ballotId=null;
state.ballotId = null;
console.log(e);
};
return {
@@ -456,13 +411,16 @@ export default {
.ant-modal {
width: 424px !important;
height: 258px !important;
.ant-modal-content {
width: 424px !important;
height: 258px !important;
.ant-modal-body {
width: 424px !important;
height: 258px !important;
padding: 0 !important;
.delete {
z-index: 999;
width: 424px;
@@ -470,24 +428,26 @@ export default {
background: #ffffff;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.21);
border-radius: 4px;
.del_header {
position: absolute;
width: calc(100%);
height: 40px;
background: linear-gradient(
rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%
);
background: linear-gradient(rgba(78, 166, 255, 0.2) 0%,
rgba(78, 166, 255, 0) 100%);
}
.del_main {
width: 100%;
position: relative;
.header {
display: flex;
align-items: center;
padding-top: 20px;
padding-left: 26px;
font-size: 16px;
.icon {
width: 16px;
height: 16px;
@@ -495,6 +455,7 @@ export default {
background-image: url(@/assets/images/coursewareManage/QR.png);
background-size: 100% 100%;
}
.close_exit {
position: absolute;
right: 42px;
@@ -505,6 +466,7 @@ export default {
background-size: 100% 100%;
}
}
.body {
width: 100%;
margin: 34px auto 56px auto;
@@ -513,6 +475,7 @@ export default {
align-items: center;
flex-direction: column;
position: relative;
.back {
position: absolute;
top: 30px;
@@ -521,10 +484,12 @@ export default {
color: #666666;
}
}
.del_btnbox {
display: flex;
margin: 30px auto;
justify-content: center;
.del_btn {
width: 100px;
height: 40px;
@@ -535,17 +500,20 @@ export default {
justify-content: center;
flex-shrink: 0;
cursor: pointer;
.btnText {
font-size: 14px;
font-weight: 400;
line-height: 40px;
}
}
.btn1 {
border: 1px solid rgba(64, 158, 255, 1);
color: #4ea6ff;
margin-right: 14px;
}
.btn2 {
background-color: #4ea6ff;
color: #ffffff;
@@ -557,9 +525,11 @@ export default {
}
}
}
.ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important;
}
.addvoteDrawer {
.drawerMain {
.header {
@@ -569,6 +539,7 @@ export default {
justify-content: space-between;
align-items: center;
flex-shrink: 0;
.headerTitle {
font-size: 18px;
font-weight: 600;
@@ -577,31 +548,38 @@ export default {
margin-left: 24px;
}
}
.contentMain {
display: flex;
justify-content: space-between;
.main_left {
padding-right: 30px;
flex: 1;
border-right: 1px solid #e8e8e8;
margin-top: 32px;
.main_item {
display: flex;
align-items: center;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.btnbox {
display: flex;
flex: 1;
align-items: center;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -613,14 +591,17 @@ export default {
color: #fff;
margin-right: 10px;
}
.fileTigan {
display: flex;
align-items: center;
padding: 3px 5px;
background-color: rgba(42, 103, 209, 0.4);
span {
margin-right: 5px;
}
.delBox {
width: 13px;
height: 13px;
@@ -631,28 +612,34 @@ export default {
}
}
}
.main_item2 {
display: flex;
align-items: flex-start;
margin-bottom: 32px;
.signbox {
width: 120px;
display: flex;
justify-content: end;
align-items: center;
.sign {
margin-right: 5px;
}
}
.kqszbox {
.qdqtbox {
margin-left: 56px;
}
.setbox {
display: flex;
flex-wrap: wrap;
margin-top: 10px;
margin-bottom: 24px;
.timerbox {
margin-top: 6px;
margin-right: 32px;
@@ -662,10 +649,12 @@ export default {
}
}
}
.btnbox2 {
display: flex;
flex-direction: column;
justify-content: flex-start;
.xkbtn {
cursor: pointer;
width: 130px;
@@ -682,6 +671,7 @@ export default {
}
}
}
.main_btns {
height: 72px;
width: 100%;
@@ -691,6 +681,7 @@ export default {
align-items: center;
justify-content: center;
box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
.btn1 {
width: 100px;
height: 40px;
@@ -700,6 +691,7 @@ export default {
background-color: #fff;
cursor: pointer;
}
.btn2 {
cursor: pointer;
width: 100px;

View File

@@ -1,20 +1,12 @@
<!-- 评估管理-创建评估页面 -->
<template>
<a-drawer
:visible="createVoteVisible"
class="drawerStyle createvoteDrawer"
width="100%"
placement="right"
@after-visible-change="afterVisibleChange"
>
<a-drawer :visible="createVoteVisible" class="drawerStyle createvoteDrawer" width="100%" placement="right"
@after-visible-change="afterVisibleChange">
<div class="researchadd">
<div class="header">
<div class="headerTitle">创建投票</div>
<img
style="width: 29px; height: 29px; cursor: pointer"
src="../../assets/images/basicinfo/close.png"
@click="closeDrawer"
/>
<img style="width: 29px; height: 29px; cursor: pointer" src="../../assets/images/basicinfo/close.png"
@click="closeDrawer" />
</div>
<div class="main_left">
<div class="main_item">
@@ -25,12 +17,8 @@
<span style="margin-right: 3px">投票名称</span>
</div>
<div class="btnbox">
<a-input
v-model:value="ballotName"
style="width: 424px; height: 32px"
placeholder="请输入任务名称"
maxlength="20"
/>
<a-input v-model:value="ballotName" style="width: 424px; height: 32px" placeholder="请输入任务名称"
maxlength="20" />
</div>
</div>
<div class="main_item">
@@ -52,29 +40,20 @@
<div class="footer">
<div class="btn">
<a-button
type="primary"
style="
<a-button type="primary" style="
width: 100px;
height: 40px;
border-radius: 8px;
background-color: #409eff;
"
@click="handleSave"
>
" @click="handleSave">
保存
</a-button>
<a-button
type="primary"
ghost
style="
<a-button type="primary" ghost style="
width: 100px;
height: 40px;
margin-left: 14px;
border-radius: 8px;
"
@click="handleAllCancel"
>
" @click="handleAllCancel">
取消
</a-button>
</div>
@@ -84,7 +63,7 @@
</template>
<script>
import { reactive, toRefs } from "vue";
import { message } from "ant-design-vue";
import { message } from "ant-design-vue";
// import { createResearch } from "../../api/indexResearch";
import VoteQuestion from "./VoteQuestion.vue";
@@ -98,7 +77,7 @@ import {
//import store from "@/store";
import * as api from "@/api/indexVote";
//import { useRouter } from "vue-router";
import {} from "@/api/indexResearch";
import { } from "@/api/indexResearch";
//import { message } from "ant-design-vue";
@@ -130,9 +109,9 @@ export default {
});
// const router = useRouter();
const afterVisibleChange = () => {
if(state.ballotId>0){
if (props.ballotId) {
getInfoDate();
}else{
} else {
handleTypes();
}
@@ -145,23 +124,23 @@ export default {
};
// 详情
const getInfoDate = async () => {
console.log("props.editChild=====",props.editChild);
if (props.ballotId>0) {
console.log("props.editChild2=====",props.editChild);
console.log("props.editChild=====", props.editChild);
if (props.ballotId) {
console.log("props.editChild2=====", props.editChild);
let res = await api
.queryStemByStemId({ballotId:props.ballotId})
.queryStemByStemId(props.ballotId)
.then((res) => {
if (res.data.code === 200) {
return res.data.data;
}
});
console.log("res====",res);
console.log("res====", res);
state.ballotName = res.ballotId;
// let renderArr = [...res];
// sortBy(renderArr, "orderNumber"); //序号
state.allFormsData = parseData(res); //类型
console.log( state.allFormsData);
console.log(state.allFormsData);
}
};
@@ -170,24 +149,24 @@ export default {
const parseData = (arr) => {
const resultArr = [];
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) => {
let obj = {};
let restList = traverseArr(item.optionDetailList, {
inputVal: "optionName",
imgVal: "optionPictureAddress",
optionId: "optionId",
voteStemId:"voteStemId",
stem:"stem",
voteStemId: "voteStemId",
stem: "stem",
}).map((itm, idx) => {
itm.id = idx + 1;
return itm;
});
obj = {
voteStemId:item.voteStemId,
voteStemId: item.voteStemId,
valueSingle: item.voteStemName,
singleList: restList,
};
@@ -205,14 +184,14 @@ export default {
const resultArr = [];
arr.forEach((item) => {
let obj = {};
console.log("item=======",item);
console.log("item=======", item);
// if (item[typeKey] === 1) {
let restList = traverseArr(item.singleList, {
optionName: "inputVal",
optionPictureAddress: "imgVal",
optionId: "optionId",
voteStemId:"voteStemId",
stem:"stem",
voteStemId: "voteStemId",
stem: "stem",
}).map((itm, idx) => {
itm.optionOrderNum = idx + 1;
return itm;
@@ -227,12 +206,12 @@ export default {
voteStemName: item.valueSingle,
optionDetailList: restList,
voteStemId:item.voteStemId,
voteStemId: item.voteStemId,
};
resultArr.push(obj);
// }
console.log("resultArr=======",resultArr);
console.log("resultArr=======", resultArr);
});
resultArr.map((itm, idx) => {
@@ -250,7 +229,7 @@ export default {
// if (key === "1") {
// let arrSingle = arrr
//filterComObj[key];
console.log("arrr======",arrr);
console.log("arrr======", arrr);
/*
let arr = [];
arrSingle.forEach((item) => {
@@ -268,7 +247,7 @@ export default {
});*/
resultObj.voteStemDtoList = arrr;
// }
console.log("resultObj======",resultObj);
console.log("resultObj======", resultObj);
// }
return resultObj;
};
@@ -342,9 +321,9 @@ export default {
console.log(resultPost);
api.updateStemMessage(resultPost).then((res) => {
if (res.data.code === 200) {
state.ballotId=res.data.data.ballotId
console.log("res.data.data==============",res.data.data);
console.log("res.state.ballotId==============",state.ballotId);
state.ballotId = res.data.data.ballotId
console.log("res.data.data==============", res.data.data);
console.log("res.state.ballotId==============", state.ballotId);
message.success("编辑成功");
closeDrawer();
}
@@ -360,12 +339,12 @@ export default {
"assessmentMinScore",
]);*/
console.log("=========",resultPost);
console.log("=========", resultPost);
api.createStemMessage(resultPost).then((res) => {
if (res.data.code === 200) {
state.ballotId=res.data.data.ballotId
console.log("res.data.data2==============",res.data.data);
console.log("res.state.ballotId=2s=============",state.ballotId);
state.ballotId = res.data.data.ballotId
console.log("res.data.data2==============", res.data.data);
console.log("res.state.ballotId=2s=============", state.ballotId);
message.success("创建成功");
closeDrawer();
}
@@ -378,20 +357,20 @@ export default {
};
const checkVal = (filterData) => {
console.log("filterData.====",filterData);
console.log("filterData.voteStemVoList====",filterData.voteStemDtoList);
console.log("filterData.====", filterData);
console.log("filterData.voteStemVoList====", filterData.voteStemDtoList);
if(!filterData.voteStemDtoList){
if (!filterData.voteStemDtoList) {
message.error("请添加题干");
return false;
}
let arr = filterData.voteStemDtoList;
arr.forEach((item) => {
console.log("item===",item);
console.log("!item.voteStemName===",!item.voteStemName);
console.log("item===", item);
console.log("!item.voteStemName===", !item.voteStemName);
if (!item.voteStemName) {
console.log("item.voteStemName===",item.voteStemName);
message.error("题干为必填 请确认",item.voteStemName);
console.log("item.voteStemName===", item.voteStemName);
message.error("题干为必填 请确认", item.voteStemName);
return false;
}
});

View File

@@ -1294,38 +1294,38 @@ export default {
],
// 共享文档列表
docList: [
{
name: "测试文档1.doc",
src: "",
},
{
name: "测试文档2.doc",
src: "",
},
{
name: "测试文档3.doc",
src: "",
},
// {
// name: "测试文档1.doc",
// src: "",
// },
// {
// name: "测试文档2.doc",
// src: "",
// },
// {
// name: "测试文档3.doc",
// src: "",
// },
],
huodModal: false,
zhibModal: false,
//任务大纲列表
taskSyllabus: [
{
name: "关卡1 初级产品经理",
taskList: [
{
course: "在线",
name: "时间管理",
classify: "选修",
beginTime: "2022-09-10 14:03",
total: 50, //总人数
complete: 20, //完成人数
percent: 40,
routerTaskId: 0,
},
],
},
// {
// name: "关卡1 初级产品经理",
// taskList: [
// {
// course: "在线",
// name: "时间管理",
// classify: "选修",
// beginTime: "2022-09-10 14:03",
// total: 50, //总人数
// complete: 20, //完成人数
// percent: 40,
// routerTaskId: 0,
// },
// ],
// },
],
activeKey: ref("1"),
value: ref(" "),

View File

@@ -1082,11 +1082,11 @@ export default {
? JSON.parse(storage.get("routerId"))
: null,
level: [
{
chapterId: "1",
remark: "关卡说明",
name: "默认关卡",
},
// {
// chapterId: "1",
// remark: "关卡说明",
// name: "默认关卡",
// },
],
tableData: [
// {
@@ -1103,78 +1103,15 @@ export default {
// },
],
tableData2: [
{
key: 1,
name: "张三",
com: "产研部",
gang: "产品经理",
cur: "关卡2",
jin: "2/10",
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",
},
// {
// key: 1,
// name: "张三",
// com: "产研部",
// gang: "产品经理",
// cur: "关卡2",
// jin: "2/10",
// time: "2022-07-15 14:00",
// },
],
//项目抽屉、列表参数
currentPage: 1,

View File

@@ -13,7 +13,7 @@
</div>
</div>
<div class="content">
<div class="main">
<div class="main">s
<div class="name">
<div class="namebox">
<img

View File

@@ -1367,28 +1367,39 @@ export default {
// console.log("stage",Object.prototype.toString.call(stage))
getStageData(res.data.data.stageList);
if (stage !== "null") {
if (stage != null) {
console.log(stage);
let stageList = res.data.data.stageList; //阶段数组
let result = stageList.find((item) => item.stageId == stage);
console.log("又找到了", result);
if (result != null) {
if(result!=null){
getTableData(result.taskList);
}
} else {
}else{
//没有选中的阶段时,获取全部的任务
console.log(stage);
let stageList = res.data.data.stageList; //阶段数组
if (stageList != null) {
let taskListAll = null;
if(stageList!=null){
let taskListAll;
stageList.forEach((item) => {
taskListAll = [taskListAll, ...item.taskList];
taskListAll=[...item.taskList];
});
console.log("taskListAll", taskListAll);
console.log("taskListAll",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
// let arr = res.data.data.stageList[0].taskList;
// console.log("任务列表", stage, arr);
@@ -1624,6 +1635,7 @@ export default {
console.log("删除阶段成功", res);
message.success("删除阶段成功");
closeDeleteStage();
localStorage.setItem("stageId", "")
getTask();
})
.catch((err) => {