main
kgdxpr 8 months ago
parent 4da3661ae2
commit b463ec8735

@ -88,21 +88,12 @@
{ title: '序号', align: 'center', width: "5%", type: 'numbers' }, { title: '序号', align: 'center', width: "5%", type: 'numbers' },
{ title: '分类', field: 'parent_name', align: 'center' }, { title: '分类', field: 'parent_name', align: 'center' },
{ title: '数据集', field: 'dataset_name', align: 'center' }, { title: '数据集', field: 'dataset_name', align: 'center' },
{ title: '已填数据(条)', field: 'fill_count', align: 'center' }, // { title: '已填数据(条)', field: 'fill_count', align: 'center' },
// { title: '表名', field: 'table_name', align: 'center' }, // { title: '表名', field: 'table_name', align: 'center' },
{ title: '操作', toolbar: '#table-bar', align: 'center', width: 390 } { title: '操作', toolbar: '#table-bar', align: 'center', width: 390 }
]], ]],
skin: 'line', skin: 'line',
defaultToolbar: [], defaultToolbar: []
parseData: function (res) {
var data = res.data;
for (var i = 0; i < data.length; i++) {
if (data[i].fill_count > 0) {
data[i].LAY_CHECKED = true;
}
}
return res;
}
}); });
table.on('tool(data-table)', function (obj) { table.on('tool(data-table)', function (obj) {
@ -120,12 +111,10 @@
content: './upload_proxy_city.html?id=' + obj.data.id content: './upload_proxy_city.html?id=' + obj.data.id
}); });
} else if (obj.event === 'downloadSample') {
window.location.href = "/dsBase/dataease/downSampleExcel?id=" + obj.data.id;
} else if (obj.event === 'downloadData') { } else if (obj.event === 'downloadData') {
window.location.href = "/dsBase/dataease/downloadExcelByCity?id=" + obj.data.id; window.location.href = "/dsBase/dataease/downloadExcelByCity?id=" + obj.data.id;
} else { } else {
window.location.href = "./dataMod_proxy.html?id=" + obj.data.id window.location.href = "./dataMod_proxy_city.html?id=" + obj.data.id
} }
}); });
}); });

@ -76,7 +76,7 @@
table.render({ table.render({
elem: '#data-table', elem: '#data-table',
url: '/dsBase/dataease/getDataSetByCity', url: '/dsBase/dataease/getDataSetByProvince',
height: 'full-35', height: 'full-35',
page: { page: {
limit: 20 limit: 20
@ -88,25 +88,16 @@
{ title: '序号', align: 'center', width: "5%", type: 'numbers' }, { title: '序号', align: 'center', width: "5%", type: 'numbers' },
{ title: '分类', field: 'parent_name', align: 'center' }, { title: '分类', field: 'parent_name', align: 'center' },
{ title: '数据集', field: 'dataset_name', align: 'center' }, { title: '数据集', field: 'dataset_name', align: 'center' },
{ title: '已填数据(条)', field: 'fill_count', align: 'center' }, // { title: '已填数据(条)', field: 'fill_count', align: 'center' },
// { title: '表名', field: 'table_name', align: 'center' }, // { title: '表名', field: 'table_name', align: 'center' },
{ title: '操作', toolbar: '#table-bar', align: 'center', width: 390 } { title: '操作', toolbar: '#table-bar', align: 'center', width: 390 }
]], ]],
skin: 'line', skin: 'line',
defaultToolbar: [], defaultToolbar: []
parseData: function (res) {
var data = res.data;
for (var i = 0; i < data.length; i++) {
if (data[i].fill_count > 0) {
data[i].LAY_CHECKED = true;
}
}
return res;
}
}); });
table.on('tool(data-table)', function (obj) { table.on('tool(data-table)', function (obj) {
window.location.href = "./dataMod_proxy_city.html?id=" + obj.data.id; window.location.href = "./dataMod_proxy_province.html?id=" + obj.data.id;
}); });
@ -117,15 +108,13 @@
title: '上传数据', title: '上传数据',
area: ['600px', '230px'], area: ['600px', '230px'],
shade: 0.1, shade: 0.1,
content: './upload_proxy_city.html?id=' + obj.data.id content: './upload_proxy_province.html?id=' + obj.data.id
}); });
} else if (obj.event === 'downloadSample') {
window.location.href = "/dsBase/dataease/downSampleExcel?id=" + obj.data.id;
} else if (obj.event === 'downloadData') { } else if (obj.event === 'downloadData') {
window.location.href = "/dsBase/dataease/downloadExcelByCity?id=" + obj.data.id; window.location.href = "/dsBase/dataease/downloadExcelByProvince?id=" + obj.data.id;
} else { } else {
window.location.href = "./dataMod_proxy.html?id=" + obj.data.id window.location.href = "./dataMod_proxy_province.html?id=" + obj.data.id
} }
}); });
}); });

@ -107,7 +107,7 @@
$.ajax({ $.ajax({
type: "GET", type: "GET",
async: false, async: false,
url: '/dsBase/dataease/getDataSetContentByCity?id=' + id, url: '/dsBase/dataease/getDataSetContentByProvince?id=' + id,
dataType: "json", dataType: "json",
success: function (res) { success: function (res) {
_data = res.data; _data = res.data;
@ -157,7 +157,7 @@
type: "POST", type: "POST",
dataType: "json", dataType: "json",
async: false, async: false,
url: '/dsBase/dataease/saveDataSetByCity', url: '/dsBase/dataease/saveDataSetByProvince',
data: { data: {
"id": id, "id": id,
"data": JSON.stringify(cleanedData) "data": JSON.stringify(cleanedData)

@ -95,7 +95,7 @@
upload.render({ upload.render({
elem: '#ID-upload-demo-choose', elem: '#ID-upload-demo-choose',
url: '/dsBase/dataease/uploadExcelByCity', url: '/dsBase/dataease/uploadExcelByProvince',
data: { data: {
id, id,
}, },

Loading…
Cancel
Save