This commit is contained in:
XXAY
2021-10-08 17:46:57 +08:00
parent 978ad340b2
commit da9d2a79da
39 changed files with 8936 additions and 148 deletions
+55
View File
@@ -123,6 +123,7 @@
var url_up = "{{ url }}"
var upload = layui.upload
var element = layui.element
var isss = "{{ id }}"
// 页面跳转加载函数
@@ -201,7 +202,61 @@
// blast
function blast_run() {
layui.use('upload', function () {
var upload = layui.upload;
//执行实例
var uploadInst = upload.render({
elem: '#select_blast_seq' //绑定元素
, url: url_up + '/tools/' + "blast"
, data: {
csrfmiddlewaretoken: '{{ csrf_token }}',
fl: 1,
id: isss,
}
, accept: 'file'
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(1); //上传loading
}
, done: function (res, index) {
layer.closeAll('loading'); //关闭loading
}
, error: function (index, upload) {
layer.closeAll('loading'); //关闭loading
}
});
});
layui.use(['upload'], function () {
var $ = layui.jquery
, layer = layui.layer;
upload.render({
elem: '#select_blast_seq'
, url: url_up + '/tools/' + "blast"
, auto: false
, accept: 'file'
, data: {
csrfmiddlewaretoken: '{{ csrf_token }}',
outfmt: document.getElementById("outfmt").value,
evalue: document.getElementById("evalue").value,
num_descriptions: document.getElementById("num_descriptions").value,
type: document.getElementById("type").value,
id: isss,
}
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(1); //上传loading
}
, bindAction: '#blast_run'
, done: function (res, index) {
layer.closeAll('loading'); //关闭loading
ab = '<a href= "' + url_up + '/chart/down?file_id=' + res.id + "&file_downlode_type=blast&ee=1" + '">' + ' <button type="button" class="layui-btn">downlode</button></a>'
$("#down").append(ab)
}
, error: function (index, upload) {
layer.closeAll('loading'); //关闭loading
}
})
;
})
}