This commit is contained in:
XXAY
2021-09-24 16:05:56 +08:00
parent 04b4cbc2ed
commit 8908b88284
48 changed files with 2472 additions and 520 deletions
+101 -1
View File
@@ -148,6 +148,7 @@
temp = $('#main_show')
temp.empty()
temp.append(String.raw`{% include 'tools/gff_to_gtf.html' %}`)
gff()
form.render();
}
@@ -155,6 +156,7 @@
temp = $('#main_show')
temp.empty()
temp.append(String.raw`{% include 'tools/orf.html' %}`)
orf_run()
form.render();
}
@@ -226,7 +228,36 @@
, bindAction: '#gen_to_fa_run'
, done: function (res, index) {
layer.closeAll('loading'); //关闭loading
ab = '<a href="http://' + url_up + '/chart/down?file_id=' + res.id + '">' + ' <button type="button" class="layui-btn">downlode</button></a>'
ab = '<a href= "' + url_up + '/chart/down?file_id=' + res.id + "&file_downlode_type=fasta&ee=1" + '">' + ' <button type="button" class="layui-btn">downlode</button></a>'
$("#down").append(ab)
}
, error: function (index, upload) {
layer.closeAll('loading'); //关闭loading
}
})
;
})
}
function gff() {
layui.use(['upload'], function () {
var $ = layui.jquery
, layer = layui.layer;
upload.render({
elem: '#select_gff'
, url: url_up + '/tools/' + "gff_to_gtf"
, auto: false
, accept: 'file'
, data: {
csrfmiddlewaretoken: '{{ csrf_token }}'
}
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(1); //上传loading
}
, bindAction: '#gff_run'
, done: function (res, index) {
layer.closeAll('loading'); //关闭loading
ab = '<a href= "' + url_up + '/chart/down?file_id=' + res.id + "&file_downlode_type=gtf&ee=1" + '">' + ' <button type="button" class="layui-btn">downlode</button></a>'
$("#down").append(ab)
}
, error: function (index, upload) {
@@ -238,6 +269,75 @@
}
function orf_run() {
layui.use(['upload'], function () {
var $ = layui.jquery
, layer = layui.layer;
upload.render({
elem: '#select_orf'
, url: url_up + '/tools/' + "orf"
, auto: false
, accept: 'file'
, data: {
csrfmiddlewaretoken: '{{ csrf_token }}',
begin: document.getElementById("begin").value,
end: document.getElementById("end").value,
Cyclotype: document.getElementById("Cyclotype").value,
Codons: document.getElementById("Codons").value,
outfmt: document.getElementById("outfmt").value,
}
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(1); //上传loading
}
, bindAction: '#orf_run'
, done: function (res, index) {
layer.closeAll('loading'); //关闭loading
ab = '<a href= "' + url_up + '/chart/down?file_id=' + res.id + "&file_downlode_type=txt&ee=1" + '">' + ' <button type="button" class="layui-btn">downlode</button></a>'
$("#down").append(ab)
}
, error: function (index, upload) {
layer.closeAll('loading'); //关闭loading
}
})
;
})
}
function basics_run() {
layui.use(['upload'], function () {
var $ = layui.jquery
, layer = layui.layer;
upload.render({
elem: '#select_fa'
, url: url_up + '/tools/' + "basics"
, auto: false
, accept: 'file'
, data: {
csrfmiddlewaretoken: '{{ csrf_token }}',
Sequence_cleaning: document.getElementById("Sequence_cleaning").value,
Sequence_length: document.getElementById("Sequence_length").value,
GC_content: document.getElementById("GC_content").value,
Sequence_flip: document.getElementById("Sequence_flip").value,
Reverse_complementarity: document.getElementById("Reverse_complementarity").value,
Codon_preference: document.getElementById("Codon_preference").value,
Codon_frequency: document.getElementById("Codon_frequency").value,
}
, before: function (obj) { //obj参数包含的信息,跟 choose回调完全一致,可参见上文。
layer.load(1); //上传loading
}
, bindAction: '#orf_run'
, done: function (res, index) {
layer.closeAll('loading'); //关闭loading
ab = '<a href= "' + url_up + '/chart/down?file_id=' + res.id + "&file_downlode_type=txt&ee=1" + '">' + ' <button type="button" class="layui-btn">downlode</button></a>'
$("#down").append(ab)
}
, error: function (index, upload) {
layer.closeAll('loading'); //关闭loading
}
})
;
})
}
</script>