|
|
@ -105,12 +105,6 @@ |
|
|
|
</div> --> |
|
|
|
|
|
|
|
<div class="formulate-plan"> |
|
|
|
<!-- <div class="flex justify-between"> |
|
|
|
<div class="text-sm">生成红头文件</div> |
|
|
|
<button class="train-plan-btn px-2.5 h-6 bg-blue-500 text-sm rounded text-white" onclick="p1449927427387301888.submit()">提交</button> |
|
|
|
<div class="train-plan-status text-sm" style="display: none;">待审核</div> |
|
|
|
</div> --> |
|
|
|
|
|
|
|
<div class="mt-2.5 p-2 border border-gray-200 rounded-sm text-sm"> |
|
|
|
<div class="temp flex justify-between items-center w-full"> |
|
|
|
<p class="w-20 flex-shrink-0 text-gray-400">选择模板</p> |
|
|
@ -121,7 +115,15 @@ |
|
|
|
</div> |
|
|
|
|
|
|
|
<div class="mt-2 temp-list flex items-center"> |
|
|
|
|
|
|
|
<div class="temp-item border border-blue-400 flex justify-center items-center" style="width: 30%; height: 100px; margin-right: 5%;" onclick="p1449927427387301888.selTemp(1)"> |
|
|
|
<img style="max-width: 100%; max-height: 100%;" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
</div> |
|
|
|
<div class="temp-item border border-gray-200 flex justify-center items-center" style="width: 30%; height: 100px; margin-right: 5%;" onclick="p1449927427387301888.selTemp(2)"> |
|
|
|
<img style="max-width: 100%; max-height: 100%;" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
</div> |
|
|
|
<div class="temp-item border border-gray-200 flex justify-center items-center" style="width: 30%; height: 100px;" onclick="p1449927427387301888.selTemp(3)"> |
|
|
|
<img style="max-width: 100%; max-height: 100%;" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
|
|
|
@ -314,46 +316,46 @@ |
|
|
|
*/ |
|
|
|
getAllTemp() { |
|
|
|
var that = this; |
|
|
|
fetch(`https://test.tall.wiki/gateway/sports/training/template`, { |
|
|
|
headers: new Headers({ |
|
|
|
'Authorization': 'Bearer ' + that.token, |
|
|
|
'Content-Type': 'application/json; charset=utf-8' |
|
|
|
}), |
|
|
|
method: 'POST', |
|
|
|
body: JSON.stringify({ |
|
|
|
param: {projectId: that.projectId} |
|
|
|
}) |
|
|
|
}) |
|
|
|
.then(function(response) { |
|
|
|
return response.json(); |
|
|
|
}) |
|
|
|
.then(function(res) { |
|
|
|
const { success, code, data, msg } = res; |
|
|
|
if (success && code === 200) { |
|
|
|
for (let i = 0; i < data.length; i++) { |
|
|
|
if (data[i].type === 0) { |
|
|
|
that.tempList = data[i].templateList; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
let html = ''; |
|
|
|
|
|
|
|
for (let j = 0; j < that.tempList.length; j++) { |
|
|
|
html += `<div class="temp-item border border-blue-400 flex justify-center items-center" style="width: 30%; height: 100px; ${j % 3 == 2 ? '' : 'margin-right: 5%;'}" onclick="p1449927427387301888.selTemp(${j}, ${that.tempList[j]}}})"> |
|
|
|
<img style="max-width: 100%; max-height: 100%;" src="${that.tempList[j].path}" /> |
|
|
|
</div>`; |
|
|
|
} |
|
|
|
|
|
|
|
that.dom.querySelector('.temp-list').html = html; |
|
|
|
|
|
|
|
html += `<div class="temp-item border border-blue-400 flex justify-center items-center" style="width: 30%; height: 100px;" onclick="p1449927427387301888.selTemp(1)"> |
|
|
|
<img style="max-width: 100%; max-height: 100%;" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
</div>`; |
|
|
|
|
|
|
|
} else { |
|
|
|
console.log('msg: ', msg); |
|
|
|
} |
|
|
|
}); |
|
|
|
// fetch(`https://test.tall.wiki/gateway/sports/training/template`, { |
|
|
|
// headers: new Headers({ |
|
|
|
// 'Authorization': 'Bearer ' + that.token, |
|
|
|
// 'Content-Type': 'application/json; charset=utf-8' |
|
|
|
// }), |
|
|
|
// method: 'POST', |
|
|
|
// body: JSON.stringify({ |
|
|
|
// param: {projectId: that.projectId} |
|
|
|
// }) |
|
|
|
// }) |
|
|
|
// .then(function(response) { |
|
|
|
// return response.json(); |
|
|
|
// }) |
|
|
|
// .then(function(res) { |
|
|
|
// const { success, code, data, msg } = res; |
|
|
|
// if (success && code === 200) { |
|
|
|
// for (let i = 0; i < data.length; i++) { |
|
|
|
// if (data[i].type === 0) { |
|
|
|
// that.tempList = data[i].templateList; |
|
|
|
// } |
|
|
|
// } |
|
|
|
|
|
|
|
// let html = ''; |
|
|
|
|
|
|
|
// for (let j = 0; j < that.tempList.length; j++) { |
|
|
|
// html += `<div class="temp-item border border-blue-400 flex justify-center items-center" style="width: 30%; height: 100px; ${j % 3 == 2 ? '' : 'margin-right: 5%;'}" onclick="p1449927427387301888.selTemp(${j}, ${that.tempList[j]}}})"> |
|
|
|
// <img style="max-width: 100%; max-height: 100%;" src="${that.tempList[j].path}" /> |
|
|
|
// </div>`; |
|
|
|
// } |
|
|
|
|
|
|
|
// that.dom.querySelector('.temp-list').html = html; |
|
|
|
|
|
|
|
// html += `<div class="temp-item border border-blue-400 flex justify-center items-center" style="width: 30%; height: 100px;" onclick="p1449927427387301888.selTemp(1)"> |
|
|
|
// <img style="max-width: 100%; max-height: 100%;" src="http://test.tall.wiki/staticrec/plan.png" /> |
|
|
|
// </div>`; |
|
|
|
|
|
|
|
// } else { |
|
|
|
// console.log('msg: ', msg); |
|
|
|
// } |
|
|
|
// }); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|