...
|
...
|
@@ -17,7 +17,8 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat |
|
|
var currSelect = 0;
|
|
|
var dateLimit = ""
|
|
|
var createTime = "month"
|
|
|
|
|
|
var manufactureArr = [];
|
|
|
var machineArr = [];
|
|
|
|
|
|
//日期范围选择
|
|
|
laydate.render({
|
...
|
...
|
@@ -125,14 +126,27 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat |
|
|
limit: common.limit,
|
|
|
limits: common.limits,
|
|
|
even: true,
|
|
|
cols: [[ {type: 'checkbox'},{
|
|
|
field: 'machineRoomName', title: '机房', align: 'center',
|
|
|
cols: [[
|
|
|
{type: 'checkbox'},{
|
|
|
field: 'machineRoomName', title: '机房', align: 'center',templet: function (d) {
|
|
|
if(machineArr && machineArr.length>0){
|
|
|
$.each(machineArr, function (i, v) {
|
|
|
if(d.machineRoomId==v.id){}
|
|
|
return v.name;
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
field: 'manufacturerName', title: '工作单位', align: 'center',templet: function (d) {
|
|
|
if(d.manufacturerId == '0'){
|
|
|
return d.manufacturerOther;
|
|
|
}else {
|
|
|
return d.manufacturerName;
|
|
|
if(manufactureArr && manufactureArr.length>0){
|
|
|
$.each(manufactureArr, function (i, v) {
|
|
|
if(d.manufacturerId==v.id){}
|
|
|
return v.name;
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
...
|
...
|
@@ -216,13 +230,27 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat |
|
|
limits: common.limits,
|
|
|
even: true,
|
|
|
cols: [[ {type: 'checkbox'},{
|
|
|
field: 'machineRoomName', title: '机房', align: 'center',
|
|
|
field: 'machineRoomName', title: '机房', align: 'center',templet: function (d) {
|
|
|
if(machineArr && machineArr.length>0){
|
|
|
$.each(machineArr, function (i, v) {
|
|
|
if(d.machineRoomId==v.id) {
|
|
|
return v.name;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}, {
|
|
|
field: 'manufacturerName', title: '工作单位', align: 'center',templet: function (d) {
|
|
|
if(d.manufacturerId == '0'){
|
|
|
return d.manufacturerOther;
|
|
|
}else {
|
|
|
return d.manufacturerName;
|
|
|
if(manufactureArr && manufactureArr.length>0){
|
|
|
$.each(manufactureArr, function (i, v) {
|
|
|
if(d.manufacturerId==v.id) {
|
|
|
return v.name;
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}, {
|
...
|
...
|
@@ -312,16 +340,32 @@ layui.define(['table', 'form', 'sessions', 'admin', 'common', 'echarts', 'laydat |
|
|
// 加载查询条件下拉框
|
|
|
function loadConditionSelect() {
|
|
|
admin.req({
|
|
|
url: domainName + '/api-web/bWorkreportGroup/findManufacturerList'
|
|
|
url: domainName + '/cmdb-CI/supplier/list?page=1&limit=10&supplierType=0'
|
|
|
}).done(function (response) {
|
|
|
var options = "<option value=''>=工作单位=</option>";
|
|
|
$.each(response.data, function (i, v) {
|
|
|
options += "<option value='" + v.id + "'>" + v.manufacturerName + "</option>"
|
|
|
options += "<option value='" + v.id + "'>" + v.shortName + "</option>"
|
|
|
var obj = {};
|
|
|
obj[id] = v.id;
|
|
|
obj[name] = v.shortName;
|
|
|
manufactureArr.push(obj);
|
|
|
});
|
|
|
options += "<option value='0'>其他</option>";
|
|
|
$('#slt-staff-group').html(options);
|
|
|
form.render();
|
|
|
});
|
|
|
admin.req({
|
|
|
url: domainName + '/cmdb-CI/cmdbci/findList?page=1&limit=20&objId=2BB920718F284CB38A2911BFAE5A97D'
|
|
|
}).done(function (response) {
|
|
|
var options = "<option value=''>=归属机房=</option>";
|
|
|
$.each(response.data, function (i, v) {
|
|
|
options += "<option value='" + v.id + "'>" + v.shortName + "</option>"
|
|
|
var obj = {};
|
|
|
obj[id] = v.id;
|
|
|
obj[name] = v.shortName;
|
|
|
machineArr.push(obj);
|
|
|
});
|
|
|
});
|
|
|
}
|
|
|
|
|
|
$("#device-export-excel").on('click', function () {
|
...
|
...
|
|