mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/fe-manage.git
synced 2025-12-19 15:56:47 +08:00
fix:模板库部分显示判断,无阶段显示判断
This commit is contained in:
@@ -955,13 +955,17 @@ export default defineComponent({
|
|||||||
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
state.projectInfo.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
||||||
state.projectInfo.attach = res.data.data.projectTemplateInfo.attach;
|
state.projectInfo.attach = res.data.data.projectTemplateInfo.attach;
|
||||||
state.projectInfo.category = res.data.data.projectTemplateInfo.category;
|
state.projectInfo.category = res.data.data.projectTemplateInfo.category;
|
||||||
state.fileList = JSON.parse(res.data.data.projectTemplateInfo.attach);
|
try{
|
||||||
|
state.fileList = JSON.parse(res.data.data.projectTemplateInfo.attach);
|
||||||
|
}catch{
|
||||||
|
state.fileList = [];
|
||||||
|
}
|
||||||
state.attachSwitch = res.data.data.projectTemplateInfo.attachSwitch == 1 ? true : false
|
state.attachSwitch = res.data.data.projectTemplateInfo.attachSwitch == 1 ? true : false
|
||||||
let data = res.data.data.stageList;
|
let data = res.data.data.stageList;
|
||||||
console.log("data=====", data);
|
console.log("data=====", data);
|
||||||
for (let i in data) {
|
for (let i in data) {
|
||||||
console.log("what ------ > ", i, data);
|
console.log("what ------ > ", i, data);
|
||||||
state.taskSyllabus.push({ text: data[i].name, children: [] });
|
state.taskSyllabus.push({ text: data[i].name?data[i].name:'无阶段任务', children: [] });
|
||||||
for (let j in data[i].taskList) {
|
for (let j in data[i].taskList) {
|
||||||
state.taskSyllabus[i].children.push({
|
state.taskSyllabus[i].children.push({
|
||||||
course: checkType(data[i].taskList[j].type),
|
course: checkType(data[i].taskList[j].type),
|
||||||
|
|||||||
@@ -148,7 +148,7 @@
|
|||||||
<!-- <img class="img2" src="../../assets/images/projectadd/keep.png" />
|
<!-- <img class="img2" src="../../assets/images/projectadd/keep.png" />
|
||||||
<div class="pub">保存</div>
|
<div class="pub">保存</div>
|
||||||
<div class="line"></div> -->
|
<div class="line"></div> -->
|
||||||
<router-link to="/taskpage">
|
<router-link to="/libraryAdd">
|
||||||
<div style="display: flex">
|
<div style="display: flex">
|
||||||
<img
|
<img
|
||||||
class="img2"
|
class="img2"
|
||||||
@@ -1388,7 +1388,13 @@ export default {
|
|||||||
};
|
};
|
||||||
array.push(obj);
|
array.push(obj);
|
||||||
});
|
});
|
||||||
state.level = array;
|
console.log(array)
|
||||||
|
if(array[0].id=='0'){
|
||||||
|
state.level = [];
|
||||||
|
}else{
|
||||||
|
state.level = array;
|
||||||
|
}
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const tableDataFunc = () => {
|
const tableDataFunc = () => {
|
||||||
@@ -1525,11 +1531,12 @@ export default {
|
|||||||
api
|
api
|
||||||
.templateDetail(localStorage.getItem("projectTemplateId"))
|
.templateDetail(localStorage.getItem("projectTemplateId"))
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
|
console.log('获取的任务列表信息',res)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
console.log("22222", res.data.data.stageList);
|
console.log("22222", res.data.data.stageList);
|
||||||
state.projectTitle = res.data.data.projectTemplateInfo.name;
|
state.projectTitle = res.data.data.projectTemplateInfo.name;
|
||||||
state.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
state.picUrl = res.data.data.projectTemplateInfo.picUrl;
|
||||||
let leng = res.data.data.stageList.length;
|
let leng = res.data.data.stageList[0].name!==null ?res.data.data.stageList.length:0;
|
||||||
if (leng > 0) {
|
if (leng > 0) {
|
||||||
let stage = localStorage.getItem("templateStageId")
|
let stage = localStorage.getItem("templateStageId")
|
||||||
? localStorage.getItem("templateStageId")
|
? localStorage.getItem("templateStageId")
|
||||||
|
|||||||
Reference in New Issue
Block a user