This commit is contained in:
dongwug
2022-11-01 17:04:12 +08:00
10 changed files with 17987 additions and 7063 deletions

11384
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -38,34 +38,10 @@ import http from "./config";
// 接口-请求 // 接口-请求
// 创建编辑单层项目 // 创建编辑单层项目
export const createProject = (obj) => http.post('/admin/project/edit', { export const createProject = (obj) => http.post('/admin/project/edit', obj)
"attach": obj.attach,
"beginTime": obj.beginTime,
"boeFlag": obj.boeFlag,
"category": obj.category,
"courseSyncFlag": obj.courseSyncFlag,
"endTime": obj.endTime,
"level": obj.level,
"manager": obj.manager,
"managerId": obj.managerId,
"name": obj.name,
"notice": obj.notice,
"noticeFlag": obj.noticeFlag,
"picUrl": obj.picUrl,
"remark": obj.remark,
"sourceBelongId": obj.sourceBelongId,
"status": obj.status,
"systemId": obj.systemId,
"templateId": obj.templateId,
"type": obj.type
})
// 创建多层项目 // 创建多层项目
export const createStoreyProject = () => http.post('/admin/project/edit', { export const createStoreyProject = (obj) => http.post('/admin/project/edit', obj)
})
// 获取项目列表 // 获取项目列表
export const getProjectList = () => http.post('/admin/project/list', { export const getProjectList = (obj) => http.post('/admin/project/list', obj)
})

View File

@@ -40,19 +40,11 @@ export const uploadFile = (obj) => http.post('/test/testRequest', qs.stringify({
// 接口-请求 // 接口-请求
//创建学习路径 //创建学习路径
export const createLearnPath = (obj) => http.post('/admin/router/edit', obj, { export const createLearnPath = (obj) => http.post('/admin/router/edit', obj);
headers: {
'token': '123'
}
});
// 获取学习路径图列表 // 获取学习路径图列表
export const getLearnPath = (obj) => http.post('/admin/router/list', obj); export const getLearnPath = (obj) => http.post('/admin/router/list', obj);
//删除学习路径图 //删除学习路径图
export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj, { export const deleteLearnPath = (obj) => http.post('/admin/router/handle', obj);
headers: {
'token': '123'
}
});
//获取关卡 //获取关卡
export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj }); export const getChapter = (obj) => http.post('/admin/router/detail', { params: obj });

View File

@@ -101,7 +101,7 @@
</div> </div>
</a-drawer> </a-drawer>
</template> </template>
<script> <script>
import { reactive, toRefs, ref } from "vue"; import { reactive, toRefs, ref } from "vue";
import { useRouter } from "vue-router"; import { useRouter } from "vue-router";
import * as api from "../../api/indexEval"; import * as api from "../../api/indexEval";
@@ -142,7 +142,6 @@ export default {
const afterVisibleChange = (bool) => { const afterVisibleChange = (bool) => {
console.log("state", bool); console.log("state", bool);
}; };
//上传组件 //上传组件
function getBase64(img, callback) { function getBase64(img, callback) {
const reader = new FileReader(); const reader = new FileReader();
@@ -152,7 +151,7 @@ export default {
const fileList = ref([]); const fileList = ref([]);
const loading = ref(false); const loading = ref(false);
const imageUrl = ref(''); const imageUrl = ref("");
const handleChange = (info) => { const handleChange = (info) => {
if (info.file.status === 'uploading') { if (info.file.status === 'uploading') {
@@ -363,7 +362,7 @@ export default {
}, },
}; };
</script> </script>
<style lang="scss"> <style lang="scss">
.ant-table-striped :deep(.table-striped) td { .ant-table-striped :deep(.table-striped) td {
background-color: #fafafa !important; background-color: #fafafa !important;
} }
@@ -502,4 +501,3 @@ export default {
} }
} }
</style> </style>

View File

@@ -4,25 +4,21 @@
<!-- 搜索框及按钮 --> <!-- 搜索框及按钮 -->
<div class="filter"> <div class="filter">
<div class="filterItems"> <div class="filterItems">
<div class="select"> <div class="pathnameInp">
<a-select <a-input
v-model:value="projectName" v-model:value="pathnameSearch"
style="width: 270px" style="width: 270px; height: 40px; border-radius: 8px"
placeholder="请输入路径名称" placeholder="请输入路径名称"
:options="projectNameList" />
@change="selectProjectName"
allowClear
showSearch
></a-select>
</div> </div>
<div class="select"> <div class="select">
<a-select <a-select
v-model:value="projectName" v-model:value="statusValue"
style="width: 270px" style="width: 270px"
placeholder="请选择状态" placeholder="请选择状态"
:options="projectNameList" :options="statusList"
@change="selectProjectName" @change="selectStatusClassify"
allowClear allowClear
showSearch showSearch
></a-select> ></a-select>
@@ -35,19 +31,20 @@
style="width: 270px" style="width: 270px"
/> --> /> -->
<a-range-picker <a-range-picker
v-model:value="value2" v-model:value="searchdate"
separator="至" separator="至"
:placeholder="[' 开始时间', ' 结束时间']" :placeholder="[' 开始时间', ' 结束时间']"
@change="searchTimeChange"
/> />
</div> </div>
<div style="display: flex; margin-bottom: 20px"> <div style="display: flex; margin-bottom: 20px">
<div class="btn btn1"> <div class="btn btn1">
<div class="search"></div> <div class="search"></div>
<div class="btnText">搜索</div> <div class="btnText" @click="searchLearnPath">搜索</div>
</div> </div>
<div class="btnn btn2"> <div class="btnn btn2">
<div class="search"></div> <div class="search"></div>
<div class="btnText">重置</div> <div class="btnText" @click="resetLearnPath">重置</div>
</div> </div>
</div> </div>
</div> </div>
@@ -613,28 +610,6 @@ export default {
setup() { setup() {
const router = useRouter(); const router = useRouter();
const state = reactive({ const state = reactive({
projectNameList: [
{
id: 1,
value: "项目一",
label: "项目一",
},
{
id: 2,
value: "项目二",
label: "项目二",
},
{
id: 3,
value: "项目三",
label: "项目三",
},
{
id: 4,
value: "项目四",
label: "项目四",
},
],
out: false, out: false,
out1: false, out1: false,
number: null, number: null,
@@ -692,6 +667,8 @@ export default {
value1: "", value1: "",
value2: "", value2: "",
//
//创建、编辑-------------------------
pathName: "", //创建/编辑路径图名称 pathName: "", //创建/编辑路径图名称
organizationList: [ organizationList: [
{ {
@@ -722,6 +699,33 @@ export default {
createLoading: false, //创建路径loading createLoading: false, //创建路径loading
deletePathId: null, //删除路径id deletePathId: null, //删除路径id
editPathId: null, //修改路径id editPathId: null, //修改路径id
//搜索------------------------------
pathnameSearch: null, //搜索路径名称
statusList: [
{
id: 1,
value: "草稿",
label: "草稿",
classify: 0,
},
{
id: 2,
value: "已发布",
label: "已发布",
classify: 1,
},
{
id: 3,
value: "已停用",
label: "已停用",
classify: -1,
},
],
statusValue: null, //状态
statusClassify: null, //选择状态类型
searchdate: null, //选择时间
startTime: null, //开始时间
endTime: null, //结束时间
}); });
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
@@ -976,7 +980,6 @@ export default {
<a-select <a-select
style="width: 50px;margin-top:2px;margin-left:25px" style="width: 50px;margin-top:2px;margin-left:25px"
value="授权" value="授权"
// options={state.projectNameList}
dropdownClassName="tabledropdown" dropdownClassName="tabledropdown"
> >
<a-select-option value="权限名单" label="权限名单"> <a-select-option value="权限名单" label="权限名单">
@@ -1022,7 +1025,6 @@ export default {
<a-select <a-select
style="width: 50px;margin-top:2px;margin-right:20px;" style="width: 50px;margin-top:2px;margin-right:20px;"
value="更多" value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown" dropdownClassName="tabledropdown"
> >
<a-select-option <a-select-option
@@ -1075,7 +1077,6 @@ export default {
<a-select <a-select
style="width: 50px;margin-top:2px;margin-right:20px;" style="width: 50px;margin-top:2px;margin-right:20px;"
value="更多" value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown" dropdownClassName="tabledropdown"
> >
<a-select-option <a-select-option
@@ -1115,7 +1116,6 @@ export default {
<a-select <a-select
style="width: 50px;margin-top:2px;margin-right:20px;" style="width: 50px;margin-top:2px;margin-right:20px;"
value="更多" value="更多"
// options={state.projectNameList}
dropdownClassName="tabledropdown" dropdownClassName="tabledropdown"
> >
<a-select-option <a-select-option
@@ -1166,8 +1166,8 @@ export default {
}; };
//创建学习路径图 //创建学习路径图
const createLearnPath = () => { const createLearnPath = () => {
if (!state.pathName) return message.info("请输入路径图名称"); if (!state.pathName) return message.warning("请输入路径图名称");
// if (!state.organizationSelectName) return message.info("请选择归属组织"); // if (!state.organizationSelectName) return message.warning("请选择归属组织");
// state.createLoading = true; // state.createLoading = true;
let obj = { let obj = {
name: state.pathName, name: state.pathName,
@@ -1197,6 +1197,10 @@ export default {
let obj = { let obj = {
pageNo: state.currentPage, pageNo: state.currentPage,
pageSize: state.pageSize, pageSize: state.pageSize,
name: state.pathnameSearch,
status: state.statusClassify,
beginTime: state.startTime,
endTime: state.endTime,
}; };
api api
.getLearnPath(obj) .getLearnPath(obj)
@@ -1219,31 +1223,6 @@ export default {
.catch((err) => { .catch((err) => {
console.log("获取学习路径失败", err); console.log("获取学习路径失败", err);
}); });
// let getChapterObj = {
// routerId: 0,
// };
// api
// .getChapter(getChapterObj)
// .then((res) => {
// console.log("获取关卡数据", res);
// })
// .catch((err) => {
// console.log("获取关卡数据失败", err);
// });
// let editChapterObj = {
// name: "测试关卡",
// remark: "这是测试关卡说明",
// routerId: 0,
// };
// api
// .editChapter(editChapterObj)
// .then((res) => {
// console.log("添加测试关卡数据", res);
// })
// .catch((err) => {
// console.log("添加测试关卡数据失败", err);
// });
}; };
//翻页 //翻页
const changePagination = (page) => { const changePagination = (page) => {
@@ -1271,8 +1250,8 @@ export default {
}; };
//编辑学习路径图 //编辑学习路径图
const editLearnPath = () => { const editLearnPath = () => {
if (!state.pathName) return message.info("请输入路径图名称"); if (!state.pathName) return message.warning("请输入路径图名称");
// if (!state.organizationSelectName) return message.info("请选择归属组织"); // if (!state.organizationSelectName) return message.warning("请选择归属组织");
// state.createLoading = true; // state.createLoading = true;
let obj = { let obj = {
routerId: state.editPathId, routerId: state.editPathId,
@@ -1299,6 +1278,43 @@ export default {
// state.createLoading = false; // state.createLoading = false;
}); });
}; };
//选择状态
const selectStatusClassify = (e, v) => {
// console.log("eee", e, v);
state.statusValue = e;
state.statusClassify = v.classify;
};
//修改时间
const searchTimeChange = (e, date) => {
let startTime = date[0] + " 00:00:00";
let endTime = date[1] + " 23:59:59";
state.startTime = new Date(startTime).getTime() / 1000;
state.endTime = new Date(endTime).getTime() / 1000;
console.log("e", state.startTime, state.endTime);
};
//搜索学习路径
const searchLearnPath = () => {
state.currentPage = 1;
console.log(
"pathnameSearch",
state.pathnameSearch,
state.statusClassify,
state.startTime,
state.endTime
);
getLearnPath();
};
//重置学习路径
const resetLearnPath = () => {
state.currentPage = 1;
state.pathnameSearch = null;
state.statusValue = null;
state.statusClassify = null;
state.searchdate = null;
state.startTime = null;
state.endTime = null;
getLearnPath();
};
onMounted(() => { onMounted(() => {
// console.log("执行"); // console.log("执行");
getLearnPath(); getLearnPath();
@@ -1333,6 +1349,10 @@ export default {
changePagination, changePagination,
deleteLearnPath, deleteLearnPath,
editLearnPath, editLearnPath,
selectStatusClassify,
searchTimeChange,
searchLearnPath,
resetLearnPath,
}; };
}, },
}; };
@@ -1837,6 +1857,10 @@ export default {
.filterItems { .filterItems {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
.pathnameInp {
margin-right: 20px;
margin-bottom: 20px;
}
.select { .select {
margin-right: 20px; margin-right: 20px;
margin-bottom: 20px; margin-bottom: 20px;

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@@ -539,6 +539,7 @@ import AddVote from "../../components/drawers/AddVote.vue";
import { message } from "ant-design-vue"; import { message } from "ant-design-vue";
import * as api from "../../api/indexTaskadd"; import * as api from "../../api/indexTaskadd";
import * as apilive from "../../api/indexLiveBroadcast"; import * as apilive from "../../api/indexLiveBroadcast";
import * as apidiscuss from "../../api/indexDiscuss";
import * as apieval from "../../api/indexEval"; import * as apieval from "../../api/indexEval";
import * as apiinvist from "../../api/indexInvist"; import * as apiinvist from "../../api/indexInvist";
const drawercolumns = [ const drawercolumns = [
@@ -858,6 +859,7 @@ export default {
deleteLiveID: null, //删除直播id deleteLiveID: null, //删除直播id
deleteEvalID: null, //测评 deleteEvalID: null, //测评
deleteInvistID: null, //评估 deleteInvistID: null, //评估
deleteDiscussID: null, //删除讨论id
}); });
const selectProjectName = (value, index) => { const selectProjectName = (value, index) => {
console.log("value", value, index); console.log("value", value, index);
@@ -1030,7 +1032,24 @@ export default {
console.log(err); console.log(err);
}); });
}; };
//删除讨论
const deleteDiscuss = () => {
let obj = {
discussId: state.deleteDiscussID,
};
apidiscuss
.deleteDiscuss(obj)
.then((res) => {
console.log("删除成功", res);
message.success("删除成功");
state.deleteModal = false;
//重新获取列表
getTask();
})
.catch((err) => {
console.log("删除失败", err);
});
};
//删除测评测试 //删除测评测试
const deleteEvalText = () => { const deleteEvalText = () => {
let obj = { let obj = {
@@ -1194,6 +1213,7 @@ export default {
changebgc, changebgc,
getTask, getTask,
deleteLiveBroadcast, deleteLiveBroadcast,
deleteDiscuss,
deleteEvalText, deleteEvalText,
deleteInvistText, deleteInvistText,
}; };

File diff suppressed because it is too large Load Diff

View File

@@ -27,10 +27,12 @@
<a-upload <a-upload
v-model:file-list="fileList" v-model:file-list="fileList"
name="avatar" name="avatar"
action="/api/file/upload"
list-type="picture-card" list-type="picture-card"
class="avatar-uploader" class="avatar-uploader"
:show-upload-list="false" :show-upload-list="false"
:before-upload="beforeUpload" :before-upload="beforeUpload"
@change="handleChange"
> >
<!-- <img v-if="imageUrl" :src="imageUrl" alt="avatar" /> <!-- <img v-if="imageUrl" :src="imageUrl" alt="avatar" />
<div v-else> <div v-else>
@@ -39,6 +41,27 @@
<div class="ant-upload-text">Upload</div> <div class="ant-upload-text">Upload</div>
</div> --> </div> -->
</a-upload> </a-upload>
<div
style="
width: 130px;
height: 40px;
background: #388be1;
border-radius: 8px;
font-size: 14px;
font-family: PingFangSC-Regular, PingFang SC;
font-weight: 400;
color: #ffffff;
line-height: 20px;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
"
@click="golearningpath"
>
跳转
</div>
</div> </div>
</template> </template>
<script> <script>
@@ -52,6 +75,7 @@ import * as api from "../../api/index1";
// reader.addEventListener("load", () => callback(reader.result)); // reader.addEventListener("load", () => callback(reader.result));
// reader.readAsDataURL(img); // reader.readAsDataURL(img);
// } // }
import { useRouter } from "vue-router";
export default { export default {
name: "SystemManage", name: "SystemManage",
components: { components: {
@@ -141,13 +165,17 @@ export default {
} }
// return isJpgOrPng && isLt2M; // return isJpgOrPng && isLt2M;
}; };
const router = useRouter();
const golearningpath = () => {
router.push({ path: "/learningpath", params: { id: 1 } });
};
return { return {
...toRefs(state), ...toRefs(state),
showDrawer, showDrawer,
changeRadio, changeRadio,
handleChange, handleChange,
beforeUpload, beforeUpload,
golearningpath,
}; };
}, },
}; };