main
kgdxpr 1 year ago
parent 02b68247ef
commit 206ff51e16

@ -54,6 +54,25 @@
border: 1px solid rgba(144, 147, 153, .2);
white-space: nowrap;
}
.woo-tool-text-delimiter {
width: 1px;
height: 12px;
background: #EEEEEE;
display: inline-block;
margin: 0 6px 0 4px;
}
.woo-theme-color {
color: #2d8cf0 !important;
}
.woo-tool-span {
margin: 0 3px;
position: relative;
top: -1px;
cursor: pointer;
}
</style>
</head>
@ -70,7 +89,19 @@
</div>
<table class="layui-table" id="myTable"></table>
<script type="text/html" id="table-bar">
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="edit"><a
class="woo-theme-color">编辑</a></span>
<i class="woo-tool-text-delimiter"></i>
<span class="woo-tool-span woo-tool-text-span" data-tool-sort="120" lay-event="remove"><a
class="woo-theme-color">删除</a></span>
</script>
</div>
</div>
@ -89,7 +120,7 @@
table.render({
elem: '#myTable',
url: '/QingLong/zbdc/getXxzbdcList?dcb_id=1',
url: '/QingLong/zbdc/getXxzbdcList?dcb_id=1',
height: 'full-70',
cols: [
[
@ -98,16 +129,16 @@
{ title: '主要设备', field: 'lb_sb_name', align: 'center', width: "160", rowspan: 2 },
{ title: '品牌', field: 'pinpai', align: 'center', width: "110", rowspan: 2 },
{ title: '型号', field: 'xinghao', align: 'center', width: "110", rowspan: 2 },
{ title: '现状', align: 'center', colspan: 3 },
{ title: '现状', align: 'center', colspan: 3 },
{ title: '工作状态', align: 'center', colspan: 6 },
{ title: '网络带宽MB', field: 'wangluodaikuan', align: 'center', width: "135", rowspan: 2 },
{ title: '网络服务供应商', field: 'wangluofuwushang', align: 'center', width: "135", rowspan: 2 },
{ title: '操作',fixed: 'right', align: 'center', width: "110", rowspan: 2 }
{ title: '操作', fixed: 'right', align: 'center', width: "110", rowspan: 2, toolbar: '#table-bar' }
],
[
{ title: '具体装备情况', field: 'jtzbqk', align: 'center', width: "115", rowspan: 2 },
{ title: '台数', field: 'taishu', align: 'center', width: "60", rowspan: 2 },
{ title: '启用日期', field: 'qiyongriqi', align: 'center', width: "110", rowspan: 2 },
{ title: '启用日期', align: 'center', width: "110", rowspan: 2, templet: '{{= d.qiyongriqi }}' },
{ title: '正常使用(台)', field: 'zhengchang', align: 'center', width: "110", rowspan: 2 },
{ title: '待修(台)', field: 'daixiu', align: 'center', width: "90", rowspan: 2 },
{ title: '在修(台)', field: 'zaixiu', align: 'center', width: "90", rowspan: 2 },
@ -142,6 +173,21 @@
return false;
});
table.on('tool(myTable)', function (obj) {
if (obj.event === 'remove') {
window.remove(obj);
} else if (obj.event === 'edit') {
layer.open({
type: 2,
title: '编辑',
shade: 0.1,
area: ['930px', '512px'],
content: './xxjszb_jchj_update.html?id=' + obj.data.id
});
}
});

@ -130,7 +130,7 @@
<div class="layui-input-block" id="zysbView" style="margin-left: 205px !important;">
</div>
<script id="zysbScript" type="text/html">
<select id="" name="lb_sb_id">
<select id="lb_sb_id" name="lb_sb_id">
{{# layui.each(d, function(index, item){ }}
<option value="{{item.lb_sb_id}}">{{item.lb_sb_name}}</option>
{{# }); }}
@ -370,16 +370,16 @@
async: false,
url: "/QingLong/zbdc/getXxzbdcSingle?dcb_id=1&id=" + id,
success: function (res) {
$("#lb").val(res.lb_id);
getZysb();
$("#lb_sb_id").val(res.lb_sb_id);
form.val("myForm", {
"pinpai": res.pinpai
, "xinghao": res.xinghao
, "wl_tjss": res.wl_tjss
, "taishu": res.taishu
, "qiyongriqi": res.qiyongriqi
, "qiyongriqi": res.qiyongriqi == '1900-01-01' ? '' : res.qiyongriqi
, "zhengchang": res.zhengchang
, "daixiu": res.daixiu
, "zaixiu": res.zaixiu
@ -405,7 +405,7 @@
},
success: function (result) {
if (result.success) {
layer.msg("新增成功!", {
layer.msg("编辑成功!", {
icon: 1,
time: 1300
}, function () {

Loading…
Cancel
Save