feat:修改版本

This commit is contained in:
lixg
2022-11-30 14:38:57 +08:00
parent 55a0519268
commit 29d3c8a8a1
3 changed files with 68 additions and 41 deletions

View File

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

View File

@@ -210,7 +210,7 @@
class="learnBgItem"
:style="{
border:
learnPathBg === item.dictCode
pathBgId === item.dictCode
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #C7CBD2',
'background-image': 'url(' + item.dictValue + ')',
@@ -344,7 +344,7 @@
class="learnBgItem"
:style="{
border:
learnPathBg2 === item.dictCode
pathBgId === item.dictCode
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
'background-image': 'url(' + item.dictValue + ')',
@@ -670,7 +670,7 @@
class="learnBgItem"
:style="{
border:
learnPathBg2 === item.id
pathBgId === item.id
? '2px solid rgba(78, 166, 255, 1)'
: '1px solid #ccc',
'background-image': 'url(' + item.source + ')',
@@ -749,8 +749,8 @@ export default {
// source: require("../../assets/images/leveladd/1.png"),
// },
],
learnPathBg: null, //创建路径选择的路径图背景
learnPathBg2: null, //编辑路径选择的路径图背景
// learnPathBg: null, //创建路径选择的路径图背景
// learnPathBg2: null, //编辑路径选择的路径图背景
pub: false, //发布弹窗
checked: false, //发布弹窗switch
checkedTeacher: false, //发布弹窗勾选
@@ -784,7 +784,8 @@ export default {
], //归属组织
organizationSelectName: null, //归属组织选择名称
organizationSelectId: null, //归属组织选择id
pathBg: "", //路径图选择背景
pathBg: null, //路径图选择背景
pathBgId: null, //路径图选择id
pathIntro: "", //路径说明
createLoading: false, //创建路径loading
deletePathId: null, //删除路径id
@@ -849,6 +850,7 @@ export default {
// console.log("打开创建路径弹窗");
state.pathName = "";
state.pathBg = "";
state.pathBgId = "";
state.organizationSelectName = null;
state.organizationSelectId = null;
state.pathIntro = "";
@@ -857,6 +859,7 @@ export default {
const handleOut1 = () => {
state.pathName = "";
state.pathBg = "";
state.pathBgId = "";
state.organizationSelectName = null;
state.organizationSelectId = null;
state.pathIntro = "";
@@ -865,11 +868,13 @@ export default {
};
const chooseImg = (item) => {
// console.log(item);
state.learnPathBg = item.dictCode;
state.pathBgId = item.dictCode;
state.pathBg = item.dictValue;
};
const chooseImg2 = (item) => {
// console.log(item);
state.learnPathBg2 = item.dictCode;
state.pathBgId = item.dictCode;
state.pathBg = item.dictValue;
};
//发布弹窗
const showPub = (routerId) => {
@@ -1141,14 +1146,9 @@ export default {
<div
class="jc"
onClick={() => {
console.log("text.record", text.record);
state.out1 = true;
state.pathName = text.record.manager;
// state.pathBg = "";
// state.organizationSelectName = null;
// state.organizationSelectId = null;
state.pathIntro = text.record.remark;
state.editPathId = text.record.id;
// console.log("text.record", text.record);
getLearnPathInfo(text.record);
}}
>
编辑
@@ -1418,11 +1418,14 @@ export default {
message.destroy();
return message.warning("请输入路径图名称");
}
// if (!state.organizationSelectName){
// message.destroy();
// return message.warning("请选择归属组织");
// }
if (!state.organizationSelectName) {
message.destroy();
return message.warning("请选择归属组织");
}
if (!state.pathBg) {
message.destroy();
return message.warning("请选择背景图");
}
state.lpLoading = true;
let obj = {
name: state.pathName,
@@ -1520,17 +1523,39 @@ export default {
console.log("删除失败", err);
});
};
//获取路径图详细信息
const getLearnPathInfo = (item) => {
state.out1 = true;
state.pathName = item.manager;
state.pathBg = "";
state.pathBgId = "";
state.organizationSelectName = null;
state.organizationSelectId = null;
state.pathIntro = item.remark;
state.editPathId = item.id;
console.log("state.imgData", state.imgData);
let arr = state.imgData;
for (let i = 0; i < arr.length; i++) {
if (arr[i].dictCode === state.pathBgId) {
state.pathBgId = arr[i].dictValue;
}
}
};
//编辑学习路径图
const editLearnPath = () => {
if (!state.pathName) {
message.destroy();
return message.warning("请输入路径图名称");
}
// if (!state.organizationSelectName){
// message.destroy();
// return message.warning("请选择归属组织");
// }
if (!state.organizationSelectName) {
message.destroy();
return message.warning("请选择归属组织");
}
if (!state.pathBgId) {
message.destroy();
return message.warning("请选择背景图");
}
// state.createLoading = true;
let obj = {
routerId: state.editPathId,

View File

@@ -3199,7 +3199,8 @@ export default {
projectId: state.projectId,
topFlag: "",
};
getProjStu(objf).then((res) => {
getProjStu(objf)
.then((res) => {
console.log(res.data, "获取学员列表");
if (res.data.code === 200) {
let leng = res.data.data.rows.length;
@@ -3210,8 +3211,9 @@ export default {
// studentData();
}
}
}).catch(err=>{
console.log('获取学员列表失败',err)
})
.catch((err) => {
console.log("获取学员列表失败", err);
});
};
//获取项目信息
@@ -3277,7 +3279,7 @@ export default {
: "-";
// state.fileList=info.attach.split(",")
let d = info.attach.indexOf(",");
console.log(info.attach, "xgo", info.attach.length);
// console.log(info.attach, "xgo", info.attach.length);
if (info.attach.length == 0) {
return;
} else if (info.attach.length !== 0 && d == -1) {