You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

74 lines
2.4 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

layui.use(['laytpl'], function () {
var form = layui.form
, laytpl = layui.laytpl
, upload = layui.upload;
var pid = '111';
var tpl = timeLineScript.innerHTML,
view = document.getElementById('timeLineView');
timeLineLoadData();
function timeLineLoadData() {
$.ajax({
type: "GET",
url: '/dsBase/global/getTestBBB',
dataType: "json",
success: function (data) {
laytpl(tpl).render(data, function (html) {
view.innerHTML = html;
});
var _data = { id: pid, name: 'a' };
upload.render({
elem: '#uploadFile' //绑定元素
, url: '/dsBase/global/getTestCCC' //上传接口
, data: _data
, done: function (res) {
//上传完毕回调
}
, error: function () {
//请求异常回调
}
});
}
});
}
$(".xmjd").click(function () {
let _id = $(this).attr("id");
$(this).siblings().find("#divShadow").removeClass('xmjdshadowSelected');
$(this).find("#divShadow").addClass('xmjdshadowSelected');
timeLineData = {
list: [
{ "iconName": "icon-niandushishijihua", "title": _id + "项目单位上报(长春市第一中学)", "text": "解读容器的 2020寻找云原生的下一站", "visibility": "visible" },
{ "iconName": "icon-yusuanguanli", "title": _id + "归口部门审核(长春市教育技术装备与信息中心)", "text": "《Machine Learning in Action》—— 浅谈线性回归的那些事", "visibility": "hidden" },
{ "iconName": "icon-shijichengben", "title": _id + "财务审计处审批(财务审计处)", "text": "写给程序员的机器学习入门 (九) - 对象识别 RCNN 与 Fast-RCNN", "visibility": "visible" }
]
};
timeLineLoadData();
});
$("#back").click(function () {
window.history.back();
});
// form.render();
});
function uploadFile(element) {
console.log(element.id);
};
function uploadImg(element) {
console.log(element.id);
}
function delFile(element) {
console.log(element);
}