feat:合并

This commit is contained in:
lixg
2022-12-05 00:00:52 +08:00
11 changed files with 96 additions and 21 deletions

View File

@@ -43,7 +43,7 @@ export default defineComponent({
const store = useStore();
const isLogin = ref(false);
// console.log("router", router.getRoutes(), route);
console.log("版本0.15------------");
console.log("版本0.17------------");
const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink);
});

View File

@@ -2,7 +2,7 @@
* @Author: lixg lixg@dongwu-inc.com
* @Date: 2022-11-21 14:32:52
* @LastEditors: lixg lixg@dongwu-inc.com
* @LastEditTime: 2022-12-04 23:51:45
* @LastEditTime: 2022-12-05 00:00:40
* @FilePath: /fe-manage/src/api/config.js
* @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
*/
@@ -56,8 +56,8 @@ http.interceptors.response.use(
return response;
} else {
if (code === 1000) {
// window.open("https://u-pre.boe.com/web/", '_self');
window.open("http://111.231.196.214:12013/manage/login", '_self');
window.open("https://u-pre.boe.com/web/", '_self');
// window.open("http://111.231.196.214:12013/manage/login", '_self');
}
console.log("api %o", msg);
}

View File

@@ -12,3 +12,7 @@ export const RouterEditTask = (obj) => http.post('/admin/router/editTask',obj)
export const RouterDeleteTask = (obj) => http.post('/admin/router/deleteTask',obj);
// 删除项目任务
export const ProjectDeleteTask = (obj) => http.delete('/admin/project/deleteTask',obj);
// 判断当前在线课是否已经添加到该路径图下
export const IsExistence = (obj) => http.post('/admin/router/queryTaskDoesItExist',obj);
// 判断当前在线课是否已经添加到该项目下
export const IsExistenceProject = (obj) => http.post('/admin/project/queryTaskDoesItExistForProject',obj);

View File

@@ -408,6 +408,7 @@ export default {
ctx.emit("update:addfaceteachVisible", false);
localStorage.setItem("stageId", props.chooseStageId);
localStorage.setItem("chapterId", props.isactive);
state.fileList = []
clear();
};
const afterVisibleChange = (bool) => {

View File

@@ -291,6 +291,7 @@ export default {
resetForm();
};
const closeDrawer2 = () => {
ctx.emit("update:edit", false);
ctx.emit("update:addhomeworkVisible", false);
resetForm();
};

View File

@@ -134,7 +134,7 @@ import * as api from "../../api/indexOnline.js";
import * as apiTask from "../../api/indexTaskadd";
// import { setCookie } from "../../api/method"
import { message } from "ant-design-vue";
import { RouterEditTask } from "@/api/indexTask";
import { RouterEditTask, IsExistence, IsExistenceProject } from "@/api/indexTask";
import { addTempTask } from "../../api/indexTaskadd";
export default {
name: "AddOnline",
@@ -272,6 +272,7 @@ export default {
const onSelectChange = (selectedRowKeys,selectedRows) => {
state.selectedRowKeys = selectedRowKeys;
state.addOnlineList = selectedRows;
console.log(selectedRowKeys,selectedRows)
if( props.edit && selectedRows.length > 0 ){
selectedRows.map((value)=>{
if(value.courseId == props.EditOnlineId){
@@ -311,7 +312,6 @@ export default {
}
});
state.tableData = array;
state.tableDataTotal = state.tableData.length
};
//获取全部在线信息接口
const getAllOnlineText = () => {
@@ -330,17 +330,80 @@ export default {
"sysType3": "",
})
.then((res) => {
let arr = res.data.data;
let arr = res.data.data.list;
state.tableDataTotal = res.data.data.count
if (res.status === 200) {
console.log('获取在线课列表数据', res)
getTableDate(arr);
}
})
.catch((err) => {
console.log(err,'请求失败在线');});
};
// 校验当前在线课是否已经添加进来了
const isExistence = (id) => {
console.log({
"chapterId": Number(props.isactive),
"courseTaskId": Number(id),
"routerId": props.routerId,
"type": 1
})
IsExistence({
"chapterId": Number(props.isactive),
"courseTaskId": Number(id),
"routerId": props.routerId,
"type": 1
}).then(res=>{
console.log('我是不是已经添加了',res)
}).catch(err=>{
console.log(err)
})
}
// 判断项目中是否添加当前在线课
const IsExistenceProjects = () => {
IsExistenceProject({
"courseTaskId": props.projectTaskId || 0,
"projectId": props.projectId,
"stageId": props.chooseStageId || 0,
"type": 1
}).then(res=>{
console.log(res)
}).catch(err=>{
console.log(err)
})
}
const updateTask = () => {
if(props.isLevel == 1){
// isExistence(23)
// return
// let routerarr = []
// console.log('我是要便利的数据1', state.addOnlineList)
// state.addOnlineList.map((value) => {
// routerarr.push(isExistence(value.courseId))
// })
// console.log('当前是否已经添加了',routerarr)
}
if(props.isLevel == 2){
console.log('我是要便利的数据2', state.addOnlineList)
}
if(props.isLevel == 3){
console.log('我是要便利的数据3', state.addOnlineList)
}
if (props.isLevel == 1) {
state.addOnlineList.map((value) => {
console.log(value)
RouterEditTask({
chapterId: Number(props.isactive),
courseId: value.num,
@@ -445,6 +508,8 @@ export default {
updateTask,
searchList,
resetOnline,
isExistence,
IsExistenceProjects
};
},
};

View File

@@ -2970,6 +2970,7 @@
v-model:addAuthList="addAuthList"
:authClassify="authClassify"
classify="course"
:type="shipType"
/>
</div>
@@ -3160,7 +3161,7 @@ const columns1 = [
key: "9",
align: "center",
customRender: ({ text }) => {
return text ? getdateToTime(text * 1000) : "-";
return text ? text : "-";
},
},
{
@@ -3501,6 +3502,7 @@ export default defineComponent({
},
setup() {
const state = reactive({
shipType: 1,
addLoading: false,
currentPlanItem: {},
teacherId: null,
@@ -3752,6 +3754,7 @@ export default defineComponent({
const showStuAdd = () => {
state.viewpowervisible = true;
state.shipType = 2;
state.authClassify = 3;
};
@@ -3913,6 +3916,7 @@ export default defineComponent({
beginTime: startTime,
});
const { rows, total } = res.data.data;
console.log(res.data.data);
state.tableDataTotal1 = total;
const datas = traverseArr(
rows,
@@ -5326,6 +5330,7 @@ export default defineComponent({
// console.log("record", record);
state.viewpowervisible = true;
state.selectCourseId = record.offcourseId;
state.shipType = 1;
state.authClassify = 2;
};
//添加权限
@@ -5369,7 +5374,7 @@ export default defineComponent({
watch(
() => state.addAuthList,
(res) => {
console.log("res 添加学员", res, state.addStudentList);
console.log("res", res, state.addStudentList);
if (state.authClassify === 3) {
let obj = {
deptList: res[1],

View File

@@ -65,7 +65,6 @@
import { reactive, toRefs, onMounted } from "vue";
import { courseListView } from "../../api/indexAudit";
import * as api1 from "@/api/index1";
import { toDate } from "../../api/method";
export default {
name: "CoursereViewed",
@@ -123,7 +122,7 @@ export default {
key: "time",
align: "center",
customRender: (time) => {
return <div style="color:#387DF7">{toDate(time.record.time, "Y-M-D h:m")}</div>;
return <div style="color:#387DF7">{time.record.time}</div>;
},
},

View File

@@ -318,7 +318,6 @@
<script>
import { reactive, toRefs, onMounted, ref } from "vue";
import { list, courseAuditView, courseDetail } from "../../api/indexAudit";
import { toDate } from "../../api/method";
import { message } from "ant-design-vue";
import { Editor } from "@wangeditor/editor-for-vue";
import { iframeUrl } from "../../api/method";
@@ -585,7 +584,7 @@ export default {
: "-",
change: "-",
creater: item.createName,
time: toDate(item.createTime, "Y-M-D h:m"),
time: item.createTime,
createrId: item.createId,
offId: item.offcourseId,
};

View File

@@ -1471,7 +1471,7 @@ export default {
path: "/projectadd",
query: {
parentId: value.record.projectId,
parentName: value.record.name,
parentName: value.record.parentName + '——' + value.record.name,
},
});
}}
@@ -1573,7 +1573,7 @@ export default {
data.forEach((e) => {
e.parentName = parentName;
e.key = e.projectId;
initDataSublist(e.name, e.subList);
initDataSublist((parentName ? (parentName + '——') : '') + e.name, e.subList);
e.subList && e.subList.length && (e.children = e.subList);
});
}

View File

@@ -4,11 +4,12 @@
<div class="left clearfix">
<div class="leftmain">
<div class="tit">
阶段<img
src="../../assets/images/projectadd/right.png"
style="margin-left: 10px; cursor: pointer"
@click="showCancel"
/>
阶段
<!-- <img-->
<!-- src="../../assets/images/projectadd/right.png"-->
<!-- style="margin-left: 10px; cursor: pointer"-->
<!-- @click="showCancel"-->
<!-- />-->
</div>
<div class="btn btn3" @click="showModal()" style="margin-left: 19px">
<div class="search"></div>