mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-20 08:16:46 +08:00
合并
This commit is contained in:
@@ -41,4 +41,7 @@ import http from "./config";
|
||||
export const createProject = (obj) => http.post('/admin/project/edit', obj)
|
||||
|
||||
// 获取项目列表
|
||||
export const getProjectList = (obj) => http.post('/admin/project/list', obj)
|
||||
export const getProjectList = (obj) => http.post('/admin/project/list', obj)
|
||||
|
||||
// 获取项目详情信息(包含阶段及任务列表)
|
||||
export const getProjectDetail = (obj) => http.get('/admin/project/detail', { params: obj })
|
||||
8
src/api/indexStage.js
Normal file
8
src/api/indexStage.js
Normal file
@@ -0,0 +1,8 @@
|
||||
import http from "./config";
|
||||
|
||||
//添加阶段
|
||||
export const editStage = (obj) => http.post('/admin/project/editStage', obj, {
|
||||
headers: {
|
||||
'token': '123'
|
||||
}
|
||||
});
|
||||
@@ -224,6 +224,7 @@
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/indexActivity";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
import { toDate } from "../../api/method.js";
|
||||
const rowSelection = ref({
|
||||
@@ -332,8 +333,7 @@ export default {
|
||||
};
|
||||
api
|
||||
.createActivity(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
.then((res) => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
state.radioV1 = "";
|
||||
@@ -347,7 +347,26 @@ export default {
|
||||
state.textV2 = "";
|
||||
state.time = "";
|
||||
ctx.emit("update:addactiveVisible", false);
|
||||
}, 1000);
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: obj.activityDuration,
|
||||
flag: true,
|
||||
name: obj.activityName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 9,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败",err);
|
||||
|
||||
@@ -3,7 +3,6 @@
|
||||
:visible="adddiscussVisible"
|
||||
class="drawerStyle addrefDrawer"
|
||||
width="80%"
|
||||
title="添加讨论"
|
||||
placement="right"
|
||||
@after-visible-change="afterVisibleChange"
|
||||
>
|
||||
@@ -72,6 +71,7 @@
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import * as api from "../../api/indexDiscuss";
|
||||
import * as apiTask from "../../api/indexTaskadd";
|
||||
import { message } from "ant-design-vue";
|
||||
const rowSelection = ref({
|
||||
checkStrictly: false,
|
||||
@@ -105,6 +105,7 @@ export default {
|
||||
inputV2: "",
|
||||
textV1: "",
|
||||
checkedC1: "",
|
||||
add: true,
|
||||
});
|
||||
const closeDrawer = () => {
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
@@ -137,13 +138,33 @@ export default {
|
||||
api
|
||||
.createDiscuss(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
state.inputV1 = "";
|
||||
state.textV1 = "";
|
||||
message.success("创建成功");
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
}, 1000);
|
||||
console.log("创建成功", res);
|
||||
state.inputV1 = "";
|
||||
state.textV1 = "";
|
||||
message.success("创建成功");
|
||||
ctx.emit("update:adddiscussVisible", false);
|
||||
//ctx.emit("changeData","传的参数");
|
||||
//console.log("discussName",obj.discussName);
|
||||
apiTask
|
||||
.addTask({
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.discussName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 8,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log(err);
|
||||
});
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
|
||||
@@ -149,14 +149,15 @@ export default {
|
||||
courseId: 0,
|
||||
duration: 0,
|
||||
flag: true,
|
||||
name: obj.inputV1,
|
||||
name: obj.linkName,
|
||||
projectId: 28,
|
||||
projectTaskId: 0,
|
||||
stageId: 3,
|
||||
type: 7,
|
||||
})
|
||||
.then((res) => {
|
||||
console.log("调用项目添加接口后", res.data);
|
||||
console.log("调用项目添加接口后111", res.data);
|
||||
ctx.emit("changeData", false);
|
||||
//重新获取任务列表
|
||||
// apiTask.getTask({ projectId: 28 });
|
||||
// router.push("/taskadd");
|
||||
|
||||
@@ -103,7 +103,7 @@
|
||||
</div>
|
||||
</a-drawer>
|
||||
</template>
|
||||
<script>
|
||||
<script>
|
||||
import { reactive, toRefs, ref } from "vue";
|
||||
import CreVote from "../../components/drawers/CreVote.vue";
|
||||
import * as api from "../../api/indexVote";
|
||||
@@ -149,7 +149,7 @@ export default {
|
||||
textV1: "",
|
||||
crevotevisible: false,
|
||||
time: undefined,
|
||||
basevote:'',
|
||||
basevote: "",
|
||||
endTimes: "",
|
||||
startTimes: "",
|
||||
});
|
||||
@@ -162,27 +162,27 @@ export default {
|
||||
const showDrawerCreVote = () => {
|
||||
state.crevotevisible = true;
|
||||
};
|
||||
//创建投票信息
|
||||
const createVoteText = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.info("请输入投票名称");
|
||||
}
|
||||
//创建投票信息
|
||||
const createVoteText = () => {
|
||||
if (!state.inputV1) {
|
||||
message.destroy();
|
||||
return message.info("请输入投票名称");
|
||||
}
|
||||
|
||||
if (state.basevote == '') {
|
||||
state.basevote = 1;
|
||||
}
|
||||
if (state.basevote == "") {
|
||||
state.basevote = 1;
|
||||
}
|
||||
|
||||
if (state.time != undefined) {
|
||||
state.endTimes = toDate(
|
||||
new Date(state.time[0].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
state.startTimes = toDate(
|
||||
new Date(state.time[1].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
}
|
||||
if (state.time != undefined) {
|
||||
state.endTimes = toDate(
|
||||
new Date(state.time[0].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
state.startTimes = toDate(
|
||||
new Date(state.time[1].$d).getTime() / 1000,
|
||||
"Y-M-D"
|
||||
);
|
||||
}
|
||||
|
||||
let obj = {
|
||||
baseVote: state.basevote,
|
||||
@@ -235,7 +235,7 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss">
|
||||
.ant-table-striped :deep(.table-striped) td {
|
||||
background-color: #fafafa !important;
|
||||
}
|
||||
@@ -375,4 +375,3 @@ export default {
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -1292,7 +1292,11 @@ export default {
|
||||
message.destroy();
|
||||
return message.warning("请输入路径图名称");
|
||||
}
|
||||
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
||||
|
||||
// if (!state.organizationSelectName){
|
||||
// message.destroy();
|
||||
// return message.warning("请选择归属组织");
|
||||
// }
|
||||
// state.createLoading = true;
|
||||
let obj = {
|
||||
name: state.pathName,
|
||||
@@ -1303,14 +1307,19 @@ export default {
|
||||
api
|
||||
.createLearnPath(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("创建成功", res);
|
||||
message.success("创建成功");
|
||||
// state.createLoading = false;
|
||||
state.currentPage = 1;
|
||||
router.push("/leveladd");
|
||||
// getLearnPath();
|
||||
}, 1000);
|
||||
console.log("创建成功", res);
|
||||
message.destroy();
|
||||
message.success("创建成功");
|
||||
router.push("/leveladd");
|
||||
// setTimeout(() => {
|
||||
// console.log("创建成功", res);
|
||||
// message.destroy();
|
||||
// message.success("创建成功");
|
||||
// // state.createLoading = false;
|
||||
// state.currentPage = 1;
|
||||
// router.push("/leveladd");
|
||||
// // getLearnPath();
|
||||
// }, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("创建失败", err);
|
||||
@@ -1365,6 +1374,7 @@ export default {
|
||||
.handleLearnPath(obj)
|
||||
.then((res) => {
|
||||
console.log("删除成功", res);
|
||||
message.destroy();
|
||||
message.success("删除成功");
|
||||
state.deleteModal = false;
|
||||
getLearnPath();
|
||||
@@ -1375,8 +1385,15 @@ export default {
|
||||
};
|
||||
//编辑学习路径图
|
||||
const editLearnPath = () => {
|
||||
if (!state.pathName) return message.warning("请输入路径图名称");
|
||||
// if (!state.organizationSelectName) return message.warning("请选择归属组织");
|
||||
if (!state.pathName) {
|
||||
message.destroy();
|
||||
return message.warning("请输入路径图名称");
|
||||
}
|
||||
|
||||
// if (!state.organizationSelectName){
|
||||
// message.destroy();
|
||||
// return message.warning("请选择归属组织");
|
||||
// }
|
||||
// state.createLoading = true;
|
||||
let obj = {
|
||||
routerId: state.editPathId,
|
||||
@@ -1388,15 +1405,23 @@ export default {
|
||||
api
|
||||
.createLearnPath(obj)
|
||||
.then((res) => {
|
||||
setTimeout(() => {
|
||||
console.log("修改成功", res);
|
||||
message.success("修改成功");
|
||||
// state.createLoading = false;
|
||||
// state.currentPage = 1;
|
||||
state.out1 = false;
|
||||
// router.push("/leveladd");
|
||||
getLearnPath();
|
||||
}, 1000);
|
||||
console.log("修改成功", res);
|
||||
message.destroy();
|
||||
message.success("修改成功");
|
||||
// state.createLoading = false;
|
||||
// state.currentPage = 1;
|
||||
state.out1 = false;
|
||||
// router.push("/leveladd");
|
||||
getLearnPath();
|
||||
// setTimeout(() => {
|
||||
// console.log("修改成功", res);
|
||||
// message.success("修改成功");
|
||||
// // state.createLoading = false;
|
||||
// // state.currentPage = 1;
|
||||
// state.out1 = false;
|
||||
// // router.push("/leveladd");
|
||||
// getLearnPath();
|
||||
// }, 1000);
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("修改失败", err);
|
||||
@@ -2175,6 +2200,7 @@ export default {
|
||||
.g1 {
|
||||
color: #4ea6ff;
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -258,9 +258,7 @@
|
||||
</router-link>
|
||||
</div>
|
||||
<!-- 无数据显示快速创建 -->
|
||||
<router-link
|
||||
:to="{ path: '/leveladddetail', query: { routerId: routerId } }"
|
||||
>
|
||||
<router-link :to="{ path: '/leveladddetail' }">
|
||||
<div
|
||||
class="taskbox"
|
||||
style="background: linear-gradient(180deg, #fef3dd, #fffaf0)"
|
||||
|
||||
@@ -567,6 +567,7 @@ export default {
|
||||
},
|
||||
setup() {
|
||||
const state = reactive({
|
||||
routerId: localStorage.getItem("routerId"),
|
||||
level: [
|
||||
{
|
||||
chapterId: "1",
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -565,7 +565,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</a-modal>
|
||||
<!-- 存为模板弹窗 -->
|
||||
<!-- 存为模版弹窗 -->
|
||||
<a-modal v-model:visible="startModal" :footer="null" :closable="closeStart" wrapClassName="CopyModal"
|
||||
centered="true">
|
||||
<div class="delete">
|
||||
@@ -577,7 +577,7 @@
|
||||
<div class="close_exit" @click="closeStartModal"></div>
|
||||
</div>
|
||||
<div class="body">
|
||||
<span>您确定要存为模板吗</span>
|
||||
<span>您确定要存为模版吗</span>
|
||||
</div>
|
||||
<div class="del_btnbox">
|
||||
<div class="del_btn btn1">
|
||||
@@ -1358,15 +1358,15 @@ export default {
|
||||
<a-select-option value="基础信息" label="基础信息">
|
||||
<router-link to="/taskpage">基础信息</router-link>
|
||||
</a-select-option>
|
||||
<a-select-option value="存为模板" label="存为模板">
|
||||
{/* <a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal();
|
||||
}}
|
||||
>
|
||||
存为模板
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option>
|
||||
</a-select-option> */}
|
||||
</a-select>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1860,13 +1860,13 @@ export default {
|
||||
删除
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="存为模板" label="存为模板">
|
||||
<a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal();
|
||||
}}
|
||||
>
|
||||
存为模板
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="基础信息" label="基础信息">
|
||||
@@ -1880,13 +1880,13 @@ export default {
|
||||
// options={state.projectNameList}
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="存为模板" label="存为模板">
|
||||
<a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal();
|
||||
}}
|
||||
>
|
||||
存为模板
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="结束" label="结束">
|
||||
@@ -1918,13 +1918,13 @@ export default {
|
||||
// options={state.projectNameList}
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="存为模板" label="存为模板">
|
||||
<a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal();
|
||||
}}
|
||||
>
|
||||
存为模板
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="删除" label="删除">
|
||||
@@ -1947,13 +1947,13 @@ export default {
|
||||
// options={state.projectNameList}
|
||||
dropdownClassName="tabledropdown"
|
||||
>
|
||||
<a-select-option value="存为模板" label="存为模板">
|
||||
<a-select-option value="存为模版" label="存为模版">
|
||||
<div
|
||||
onClick={() => {
|
||||
showStartModal();
|
||||
}}
|
||||
>
|
||||
存为模板
|
||||
存为模版
|
||||
</div>
|
||||
</a-select-option>
|
||||
<a-select-option value="撤回" label="撤回">
|
||||
@@ -2214,7 +2214,7 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style lang="scss">
|
||||
<style lang="scss">
|
||||
.projectManage {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
@@ -173,7 +173,10 @@
|
||||
</div>
|
||||
<!-- 添加外链侧弹窗 -->
|
||||
<div>
|
||||
<add-ref v-model:addrefVisible="addrefvisible" />
|
||||
<add-ref
|
||||
v-model:addrefVisible="addrefvisible"
|
||||
@changeData="updateTableData"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加外链侧弹窗 -->
|
||||
<div class="lin"></div>
|
||||
@@ -187,7 +190,10 @@
|
||||
</div>
|
||||
<!-- 添加讨论侧弹窗 -->
|
||||
<div>
|
||||
<add-discuss v-model:adddiscussVisible="adddiscussvisible" />
|
||||
<add-discuss
|
||||
v-model:adddiscussVisible="adddiscussvisible"
|
||||
@changeData="updateTableData"
|
||||
/>
|
||||
</div>
|
||||
<!-- 添加讨论侧弹窗 -->
|
||||
<div class="lin"></div>
|
||||
@@ -367,11 +373,17 @@
|
||||
<div class="modalMain" style="width: 100%">
|
||||
<div class="name">
|
||||
<div class="namebox">
|
||||
<div>
|
||||
<img
|
||||
src="@/assets/images/coursewareManage/asterisk.png"
|
||||
alt=""
|
||||
/>
|
||||
</div>
|
||||
<div class="inname">阶段名称:</div>
|
||||
</div>
|
||||
<div class="in">
|
||||
<a-input
|
||||
v-model:value="valueE"
|
||||
v-model:value="valuesname"
|
||||
show-count
|
||||
:maxlength="20"
|
||||
placeholder="请输入阶段名称"
|
||||
@@ -384,7 +396,7 @@
|
||||
</div>
|
||||
<div class="intext" style="margin-left: 14px">
|
||||
<a-textarea
|
||||
v-model:value="value"
|
||||
v-model:value="valuesnotice"
|
||||
style="height: 88px"
|
||||
show-count
|
||||
:maxlength="100"
|
||||
@@ -415,7 +427,7 @@
|
||||
取消
|
||||
</button>
|
||||
<button
|
||||
@click="closeModal"
|
||||
@click="editStage"
|
||||
style="
|
||||
cursor: pointer;
|
||||
margin-left: 16px;
|
||||
@@ -551,6 +563,7 @@ import * as apiactivity from "../../api/indexActivity";
|
||||
import * as apieval from "../../api/indexEval";
|
||||
import * as apiinvist from "../../api/indexInvist";
|
||||
import * as apivote from "../../api/indexVote";
|
||||
import * as apistage from "../../api/indexStage";
|
||||
const drawercolumns = [
|
||||
{
|
||||
title: "项目名称",
|
||||
@@ -770,6 +783,8 @@ export default {
|
||||
addvotevisible: false,
|
||||
stage: false,
|
||||
selectedRowKeys: [],
|
||||
valuesname: "",
|
||||
valuesnotice: "",
|
||||
confirmModal: false, //确认添加阶段弹窗
|
||||
cC: false,
|
||||
cancelModal: false, //确认取消阶段弹窗
|
||||
@@ -793,6 +808,28 @@ export default {
|
||||
const afterVisibleChange = (bool) => {
|
||||
console.log("visible", bool);
|
||||
};
|
||||
//添加阶段
|
||||
const editStage = () => {
|
||||
if (!state.valuesname) {
|
||||
message.destroy();
|
||||
return message.warning("请输入阶段名称");
|
||||
}
|
||||
let obj = {
|
||||
name: state.valuesname,
|
||||
projectId: 28,
|
||||
remark: state.valuesnotice,
|
||||
};
|
||||
apistage
|
||||
.editStage(obj)
|
||||
.then((res) => {
|
||||
console.log("添加阶段成功", res);
|
||||
message.default();
|
||||
message.success("添加阶段成功");
|
||||
})
|
||||
.catch((err) => {
|
||||
console.log("添加阶段失败", err);
|
||||
});
|
||||
};
|
||||
// 把数据放到state里
|
||||
const getTableData = (tableData) => {
|
||||
let data = tableData;
|
||||
@@ -1366,14 +1403,13 @@ export default {
|
||||
state.stage = true;
|
||||
//关闭确认框
|
||||
closeConfirm();
|
||||
|
||||
};
|
||||
const showModal1 = () => {
|
||||
//关闭确认框
|
||||
state.deleteModal = false;
|
||||
deleteTask();
|
||||
message.success("删除成功");
|
||||
getTask()
|
||||
getTask();
|
||||
};
|
||||
const closeModal = () => {
|
||||
state.stage = false;
|
||||
@@ -1453,6 +1489,7 @@ export default {
|
||||
state.isactive = index;
|
||||
state.isActive = !state.isActive;
|
||||
};
|
||||
|
||||
return {
|
||||
...toRefs(state),
|
||||
selectProjectName,
|
||||
@@ -1501,6 +1538,7 @@ export default {
|
||||
editVotePath,
|
||||
getTableData,
|
||||
deleteTask,
|
||||
editStage,
|
||||
updateTableData,
|
||||
};
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user