mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-12 04:16:47 +08:00
Merge branch 'master' of http://gitlab.dongwu-inc.com:10080/BOE/fe-manage
This commit is contained in:
@@ -48,16 +48,34 @@
|
|||||||
</div>
|
</div>
|
||||||
<span>创建投票:</span>
|
<span>创建投票:</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="btnbox" >
|
<div class="btnbox">
|
||||||
<button class="xkbtn" :style="{ display: creVote ? 'none' : 'block'}" @click="showDrawerCreVote">创建投票</button>
|
<button
|
||||||
<button class="xkbtn" :style="{ display: creVote ? 'block' : 'none'}" @click="showDrawerCreVote">编辑投票</button>
|
class="xkbtn"
|
||||||
<div :style="{ display: creVote ? 'block' : 'none'}" ><div class="fileTigan" ><span style="color:#388be1 ;">传过来的name</span> <div class="delBox" @click="delBox()"></div></div></div>
|
:style="{ display: creVote ? 'none' : 'block' }"
|
||||||
|
@click="showDrawerCreVote"
|
||||||
|
>
|
||||||
|
创建投票
|
||||||
|
</button>
|
||||||
|
<button
|
||||||
|
class="xkbtn"
|
||||||
|
:style="{ display: creVote ? 'block' : 'none' }"
|
||||||
|
@click="showDrawerCreVote"
|
||||||
|
>
|
||||||
|
编辑投票
|
||||||
|
</button>
|
||||||
|
<div :style="{ display: creVote ? 'block' : 'none' }">
|
||||||
|
<div class="fileTigan">
|
||||||
|
<span style="color: #388be1">传过来的name</span>
|
||||||
|
<div class="delBox" @click="delBox()"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 创建投票侧弹窗 -->
|
<!-- 创建投票侧弹窗 -->
|
||||||
<div>
|
<div>
|
||||||
<cre-vote v-model:crevoteVisible="crevotevisible"
|
<cre-vote
|
||||||
@getData="changeVData"/>
|
v-model:crevoteVisible="crevotevisible"
|
||||||
|
@getData="changeVData"
|
||||||
|
/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 创建投票侧弹窗 -->
|
<!-- 创建投票侧弹窗 -->
|
||||||
</div>
|
</div>
|
||||||
@@ -170,14 +188,15 @@ export default {
|
|||||||
const state = reactive({
|
const state = reactive({
|
||||||
inputV1: "",
|
inputV1: "",
|
||||||
textV1: "",
|
textV1: "",
|
||||||
creVote:false,
|
creVote: false,
|
||||||
crevotevisible: false,
|
crevotevisible: false,
|
||||||
time: undefined,
|
time: undefined,
|
||||||
basevote: "",
|
basevote: "",
|
||||||
endTimes: "",
|
endTimes: "",
|
||||||
startTimes: "",
|
startTimes: "",
|
||||||
ascriptionId:"",
|
ascriptionId: "",
|
||||||
voteStemId:"",
|
voteStemId: "",
|
||||||
|
voteId:"",
|
||||||
});
|
});
|
||||||
const closeDrawer = () => {
|
const closeDrawer = () => {
|
||||||
ctx.emit("update:addvoteVisible", false);
|
ctx.emit("update:addvoteVisible", false);
|
||||||
@@ -190,15 +209,45 @@ export default {
|
|||||||
state.crevotevisible = true;
|
state.crevotevisible = true;
|
||||||
};
|
};
|
||||||
const changeVData = (data) => {
|
const changeVData = (data) => {
|
||||||
console.log('111', data);
|
console.log("111", data);
|
||||||
state.creVote = data.creVote
|
state.creVote = data.creVote;
|
||||||
state.ascriptionId = data.ascriptionId
|
state.ascriptionId = data.ascriptionId;
|
||||||
state.voteStemId = data.voteStemId
|
state.voteStemId = data.voteStemId;
|
||||||
console.log('222',state.creVote);
|
console.log("222", state.creVote);
|
||||||
console.log('333',state.ascriptionId);
|
console.log("333", state.ascriptionId);
|
||||||
}
|
};
|
||||||
const delBox = () => {
|
const delBox = () => {
|
||||||
state.creVote = false;
|
state.creVote = false;
|
||||||
|
dleVoteStem()
|
||||||
|
};
|
||||||
|
|
||||||
|
//获取题干信息
|
||||||
|
// const getStemText = () => {
|
||||||
|
// let objstem = {
|
||||||
|
// stemId: state.ascriptionId,
|
||||||
|
// ascriptionId: state.voteStemId,
|
||||||
|
// }
|
||||||
|
// api
|
||||||
|
// .queryStemByStemId(objstem)
|
||||||
|
// .then((res) => {
|
||||||
|
// console.log("获取成功", res);
|
||||||
|
// message.success("获取成功");
|
||||||
|
// })
|
||||||
|
// .catch((err) => {
|
||||||
|
// console.log(err);
|
||||||
|
// });
|
||||||
|
// }
|
||||||
|
|
||||||
|
//删除题干信息接口
|
||||||
|
const dleVoteStem = () => {
|
||||||
|
let objdelstem = {
|
||||||
|
voteStemId:state.voteStemId
|
||||||
|
}
|
||||||
|
api.deleteVoteStem(objdelstem)
|
||||||
|
.then((res) => {
|
||||||
|
console.log('删除题干信息成功', res)
|
||||||
|
message.success('删除题干信息成功')
|
||||||
|
})
|
||||||
}
|
}
|
||||||
//创建投票信息
|
//创建投票信息
|
||||||
const createVoteText = () => {
|
const createVoteText = () => {
|
||||||
@@ -227,17 +276,13 @@ export default {
|
|||||||
// };
|
// };
|
||||||
|
|
||||||
let obj = {
|
let obj = {
|
||||||
|
ascriptionId: state.ascriptionId,
|
||||||
baseVote: state.basevote,
|
baseVote: state.basevote,
|
||||||
createTime: "",
|
|
||||||
createUser: 0,
|
createUser: 0,
|
||||||
stem: "",
|
|
||||||
stemId: 0,
|
|
||||||
updateTime: "",
|
|
||||||
updateUser: 0,
|
updateUser: 0,
|
||||||
voteEndTime: state.endTimes,
|
voteEndTime: state.endTimes,
|
||||||
voteExplain: state.textV1,
|
voteExplain: state.textV1,
|
||||||
voteFlag: "",
|
voteFlag: "",
|
||||||
voteId: 0,
|
|
||||||
voteName: state.inputV1,
|
voteName: state.inputV1,
|
||||||
voteStartTime: state.startTimes,
|
voteStartTime: state.startTimes,
|
||||||
voteTag: "",
|
voteTag: "",
|
||||||
@@ -245,22 +290,23 @@ export default {
|
|||||||
api
|
api
|
||||||
.createVote(obj)
|
.createVote(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("创建成功", res);
|
console.log("创建成功123", res);
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
|
ctx.emit("getData", res.data.data.voteId);
|
||||||
closeDrawer();
|
closeDrawer();
|
||||||
if (props.learn == 0)
|
if (props.learn == 0)
|
||||||
apitaskadd
|
apitaskadd
|
||||||
.addTask({
|
.addTask({
|
||||||
courseId: 0,
|
courseId: 0,
|
||||||
duration: 0,
|
duration: 0,
|
||||||
flag: true,
|
flag: true,
|
||||||
name: obj.voteName,
|
name: obj.voteName,
|
||||||
projectId: props.projectId,
|
projectId: props.projectId,
|
||||||
projectTaskId: 0,
|
projectTaskId: 0,
|
||||||
stageId: props.chooseStageId,
|
stageId: props.chooseStageId,
|
||||||
type: 12,
|
type: 12,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("调用项目添加接口后", res.data);
|
console.log("调用项目添加接口后", res.data);
|
||||||
//自定义事件给父组件传值
|
//自定义事件给父组件传值
|
||||||
ctx.emit("changeData", false);
|
ctx.emit("changeData", false);
|
||||||
@@ -271,7 +317,7 @@ export default {
|
|||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
});
|
});
|
||||||
else {
|
else {
|
||||||
let editObj1 = {
|
let editObj1 = {
|
||||||
chapterId: 36,
|
chapterId: 36,
|
||||||
courseId: 0,
|
courseId: 0,
|
||||||
@@ -282,7 +328,7 @@ export default {
|
|||||||
routerTaskId: 0,
|
routerTaskId: 0,
|
||||||
type: 12,
|
type: 12,
|
||||||
};
|
};
|
||||||
RouterEditTask(editObj1)
|
RouterEditTask(editObj1);
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
@@ -297,6 +343,7 @@ export default {
|
|||||||
changeVData,
|
changeVData,
|
||||||
rowSelection,
|
rowSelection,
|
||||||
options1,
|
options1,
|
||||||
|
dleVoteStem,
|
||||||
createVoteText,
|
createVoteText,
|
||||||
delBox,
|
delBox,
|
||||||
};
|
};
|
||||||
@@ -359,15 +406,15 @@ 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;
|
||||||
background-image: url(@/assets/images/basicinfo/ch.png);
|
background-image: url(@/assets/images/basicinfo/ch.png);
|
||||||
|
|||||||
@@ -157,6 +157,7 @@ export default {
|
|||||||
console.log("state", bool);
|
console.log("state", bool);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
//创建题干接口
|
||||||
const createQueTit = () => {
|
const createQueTit = () => {
|
||||||
if (!state.questions[0].inputV) {
|
if (!state.questions[0].inputV) {
|
||||||
message.destroy();
|
message.destroy();
|
||||||
@@ -170,11 +171,9 @@ export default {
|
|||||||
let obj = [
|
let obj = [
|
||||||
{
|
{
|
||||||
ascriptionId: 0,
|
ascriptionId: 0,
|
||||||
createTime: "",
|
|
||||||
createUser: 0,
|
createUser: 0,
|
||||||
optionDetailList: [
|
optionDetailList: [
|
||||||
{
|
{
|
||||||
createTime: "",
|
|
||||||
createUser: 0,
|
createUser: 0,
|
||||||
optionId: 0,
|
optionId: 0,
|
||||||
optionName: "",
|
optionName: "",
|
||||||
@@ -201,6 +200,20 @@ export default {
|
|||||||
console.log('res.data.data[0].ascriptionId',res.data.data[0].ascriptionId);
|
console.log('res.data.data[0].ascriptionId',res.data.data[0].ascriptionId);
|
||||||
console.log('res.data.data[0].voteStemId',res.data.data[0].voteStemId);
|
console.log('res.data.data[0].voteStemId',res.data.data[0].voteStemId);
|
||||||
message.success("创建成功");
|
message.success("创建成功");
|
||||||
|
//获取题干信息
|
||||||
|
let objstem = {
|
||||||
|
stemId: res.data.data[0].ascriptionId,
|
||||||
|
ascriptionId: res.data.data[0].voteStemId,
|
||||||
|
}
|
||||||
|
api
|
||||||
|
.queryStemByStemId(objstem)
|
||||||
|
.then((res) => {
|
||||||
|
console.log("获取成功", res);
|
||||||
|
message.success("获取成功");
|
||||||
|
})
|
||||||
|
.catch((err) => {
|
||||||
|
console.log(err);
|
||||||
|
});
|
||||||
let stemData = {
|
let stemData = {
|
||||||
creVote: state.creVote,
|
creVote: state.creVote,
|
||||||
ascriptionId: res.data.data[0].ascriptionId,
|
ascriptionId: res.data.data[0].ascriptionId,
|
||||||
|
|||||||
@@ -314,6 +314,7 @@
|
|||||||
<add-vote
|
<add-vote
|
||||||
v-model:addvoteVisible="addvotevisible"
|
v-model:addvoteVisible="addvotevisible"
|
||||||
@changeData="updateTableData"
|
@changeData="updateTableData"
|
||||||
|
@getData="changeVData"
|
||||||
v-model:edit="edit"
|
v-model:edit="edit"
|
||||||
v-model:projectId="projectId"
|
v-model:projectId="projectId"
|
||||||
v-model:chooseStageId="chooseStageId"
|
v-model:chooseStageId="chooseStageId"
|
||||||
@@ -1028,6 +1029,7 @@ export default {
|
|||||||
deleteInvistID: 4, //评估
|
deleteInvistID: 4, //评估
|
||||||
deleteDiscussID: null, //删除讨论id
|
deleteDiscussID: null, //删除讨论id
|
||||||
deleteActivityID: null, //删除活动id
|
deleteActivityID: null, //删除活动id
|
||||||
|
voteId:"", //删除投票id
|
||||||
deleteID: "",
|
deleteID: "",
|
||||||
selectRow: [], //选择行
|
selectRow: [], //选择行
|
||||||
selectAll: 0, //0:未选择,1:全选,2:部分选择
|
selectAll: 0, //0:未选择,1:全选,2:部分选择
|
||||||
@@ -1300,6 +1302,11 @@ export default {
|
|||||||
|
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
//获取删除id(投票)
|
||||||
|
const changeVData = (data) => {
|
||||||
|
console.log("8989", data);
|
||||||
|
state.voteId = data.voteId;
|
||||||
|
}
|
||||||
//数据变化
|
//数据变化
|
||||||
const updateTableData = (data) => {
|
const updateTableData = (data) => {
|
||||||
console.log("添加数据", data);
|
console.log("添加数据", data);
|
||||||
@@ -1545,7 +1552,8 @@ export default {
|
|||||||
api
|
api
|
||||||
.deleteTask(obj)
|
.deleteTask(obj)
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log(res);
|
console.log(res,'gggggggggggggggg');
|
||||||
|
// deleteVoteText();
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
console.log(err);
|
console.log(err);
|
||||||
@@ -1555,7 +1563,7 @@ export default {
|
|||||||
//删除投票信息
|
//删除投票信息
|
||||||
const deleteVoteText = () => {
|
const deleteVoteText = () => {
|
||||||
let obj = {
|
let obj = {
|
||||||
voteId: "",
|
voteId: state.voteId,
|
||||||
};
|
};
|
||||||
apivote
|
apivote
|
||||||
.deleteVoteMessage(obj)
|
.deleteVoteMessage(obj)
|
||||||
@@ -1910,6 +1918,7 @@ export default {
|
|||||||
deleteTask,
|
deleteTask,
|
||||||
editStage,
|
editStage,
|
||||||
updateTableData,
|
updateTableData,
|
||||||
|
changeVData,
|
||||||
changeRow,
|
changeRow,
|
||||||
selectRowAll,
|
selectRowAll,
|
||||||
changeCourseType,
|
changeCourseType,
|
||||||
|
|||||||
Reference in New Issue
Block a user