From 5972c5e0070c00d65eb9d08b4c49357dbf3808c4 Mon Sep 17 00:00:00 2001 From: 18516761980 <4761516tqsxp> Date: 星期四, 07 四月 2022 16:55:51 +0800 Subject: [PATCH] . --- src/main/webapp/static/js/item/item.js | 62 ++++++++++++++++++++++++++----- 1 files changed, 52 insertions(+), 10 deletions(-) diff --git a/src/main/webapp/static/js/item/item.js b/src/main/webapp/static/js/item/item.js index a1794b9..68b8d2f 100644 --- a/src/main/webapp/static/js/item/item.js +++ b/src/main/webapp/static/js/item/item.js @@ -24,22 +24,22 @@ {type: 'checkbox'} // ,{field: 'id', align: 'center',title: 'ID'} // ,{field: 'hostId', align: 'center',title: ''} - ,{field: 'uuid', align: 'center',title: '椤圭洰缂栧彿'} - ,{field: 'name', align: 'center',title: '椤圭洰鍚嶇О'} - ,{field: 'inUuid', align: 'center',title: '鍐呴儴缂栧彿', hide: true} + ,{field: 'uuid', align: 'center',title: '璁㈠崟鍙�', width: 130} + ,{field: 'name', align: 'center',title: '椤圭洰鍚嶇О', width: 130} + ,{field: 'inUuid', align: 'center',title: '椤圭洰缂栧彿', hide: true} // ,{field: 'cstmrUuid', align: 'center',title: '瀹㈡埛缂栧彿'} ,{field: 'cstmrUuid$', align: 'center',title: '瀹㈡埛鍚嶇О'} ,{field: 'projectStatus$', align: 'center', title: '椤圭洰杩涘害'} // ,{field: 'member', align: 'center',title: '椤圭洰鎴愬憳'} // ,{field: 'leader', align: 'center',title: '椤圭洰缁忕悊'} - ,{field: 'startTime0$', align: 'center',title: '璁″垝寮�濮嬫椂闂�'} - ,{field: 'endTime0$', align: 'center',title: '璁″垝缁撴潫鏃堕棿'} - ,{field: 'realStartTime0$', align: 'center', title: '瀹為檯寮�濮嬫椂闂�'} - ,{field: 'realEndTime0$', align: 'center', title: '瀹為檯缁撴潫鏃堕棿'} + ,{field: 'startTime0$', align: 'center',title: '璁″垝寮�濮嬫椂闂�', width: 115} + ,{field: 'endTime0$', align: 'center',title: '璁″垝缁撴潫鏃堕棿', width: 115} + ,{field: 'realStartTime0$', align: 'center', title: '瀹為檯寮�濮嬫椂闂�', width: 115} + ,{field: 'realEndTime0$', align: 'center', title: '瀹為檯缁撴潫鏃堕棿', width: 115} ,{field: 'type$', align: 'center', title: '椤圭洰绫诲瀷'} ,{field: 'originArea', align: 'center', title: '鐢熶骇鍦�'} - ,{field: 'realMonth', align: 'center', title: '鏃堕棿璺ㄥ害(鏈�)'} + ,{field: 'realMonth', align: 'center', title: '鏃堕棿璺ㄥ害(澶�)', width: 115} ,{field: 'dutyMan', align: 'center', title: '璐d换浜�'} ,{field: 'dutyDepartment', align: 'center', title: '璐d换閮ㄩ棬'} ,{field: 'status$', align: 'center',title: '鐘舵��'} @@ -49,7 +49,7 @@ // ,{field: 'updateTime$', align: 'center',title: '淇敼鏃堕棿'} ,{field: 'memo', align: 'center',title: '澶囨敞'} - ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:150} + ,{fixed: 'right', title:'鎿嶄綔', align: 'center', toolbar: '#operate', width:165} ]], request: { pageName: 'curr', @@ -159,9 +159,23 @@ var ids = [data.id]; del(ids); break; + case "initPlan": + initPlan(data.id); + break; + case "report": + initReport(obj); + break; } }); + function initReport(obj) { + admin.open({ + type: 1, + area: '600px', + title: '鎬荤粨鐢熸垚', + content: $('#initReport').html() + }); + } /* 寮圭獥 - 鏂板銆佷慨鏀� */ function showEditModel(mData) { admin.open({ @@ -228,6 +242,34 @@ }); } + /* 鍒濆鍖栭」鐩妭鐐� */ + function initPlan(id) { + layer.confirm('纭畾瑕佺敓鎴愯椤圭洰璁″垝鑺傜偣鍚楋紵', { + skin: 'layui-layer-admin', + shade: .1 + }, function (i) { + layer.close(i); + var loadIndex = layer.load(2); + $.ajax({ + url: baseUrl+"/item/initPlan/auth", + headers: {'token': localStorage.getItem('token')}, + data: {id: id}, + method: 'POST', + success: function (res) { + layer.close(loadIndex); + if (res.code === 200){ + layer.msg(res.msg, {icon: 1}); + tableReload(); + } else if (res.code === 403){ + top.location.href = baseUrl+"/"; + } else { + layer.msg(res.msg, {icon: 2}); + } + } + }) + }); + } + // 鎼滅储 form.on('submit(search)', function (data) { @@ -244,7 +286,7 @@ // 鏃堕棿閫夋嫨鍣� function layDateRender(mData) { - // console.log(mData) + console.log(mData) setTimeout(function () { layDate.render({ elem: '#startTime', -- Gitblit v1.9.1