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 store = useStore();
const isLogin = ref(false); const isLogin = ref(false);
// console.log("router", router.getRoutes(), route); // console.log("router", router.getRoutes(), route);
console.log("版本0.05------------"); console.log("版本0.06------------");
const routes = computed(() => { const routes = computed(() => {
return router.getRoutes().filter((e) => e.meta?.isLink); return router.getRoutes().filter((e) => e.meta?.isLink);
}); });

View File

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

View File

@@ -3199,20 +3199,22 @@ export default {
projectId: state.projectId, projectId: state.projectId,
topFlag: "", topFlag: "",
}; };
getProjStu(objf).then((res) => { getProjStu(objf)
console.log(res.data, "获取学员列表"); .then((res) => {
if (res.data.code === 200) { console.log(res.data, "获取学员列表");
let leng = res.data.data.rows.length; if (res.data.code === 200) {
state.total = res.data.data.total; let leng = res.data.data.rows.length;
if (leng > 0) { state.total = res.data.data.total;
let arr = res.data.data.rows; if (leng > 0) {
getTableDataList(arr); let arr = res.data.data.rows;
// studentData(); getTableDataList(arr);
// studentData();
}
} }
} })
}).catch(err=>{ .catch((err) => {
console.log('获取学员列表失败',err) console.log("获取学员列表失败", err);
}); });
}; };
//获取项目信息 //获取项目信息
const getTaskInfo = () => { const getTaskInfo = () => {
@@ -3277,7 +3279,7 @@ export default {
: "-"; : "-";
// state.fileList=info.attach.split(",") // state.fileList=info.attach.split(",")
let d = info.attach.indexOf(","); 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) { if (info.attach.length == 0) {
return; return;
} else if (info.attach.length !== 0 && d == -1) { } else if (info.attach.length !== 0 && d == -1) {