|
@@ -48,7 +48,7 @@
|
|
<body style="height:100%">
|
|
<body style="height:100%">
|
|
<input style="display: none;" id="addtext" value=""/>
|
|
<input style="display: none;" id="addtext" value=""/>
|
|
<div class="layui-main-bgc">
|
|
<div class="layui-main-bgc">
|
|
- <sys:message content="${message}"/>
|
|
|
|
|
|
+ <%--<sys:message content="${message}"/>--%>
|
|
<div class="layui-row layui-col-space15">
|
|
<div class="layui-row layui-col-space15">
|
|
<div class="layui-col-md12">
|
|
<div class="layui-col-md12">
|
|
<div class="layui-card">
|
|
<div class="layui-card">
|
|
@@ -58,7 +58,7 @@
|
|
<div class="layui-btn-group">
|
|
<div class="layui-btn-group">
|
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-meself" onclick="addProject()"><i class="layui-icon"></i>新建</button>
|
|
<button type="button" class="layui-btn layui-btn-normal layui-btn-meself" onclick="addProject()"><i class="layui-icon"></i>新建</button>
|
|
<button type="button" class="layui-btn layui-btn-primary layui-btn-meself" onclick="refresh()"><img class="layui-meself-img1" src="${ctxp}/icon/refush.png" alt=""> 刷新</button>
|
|
<button type="button" class="layui-btn layui-btn-primary layui-btn-meself" onclick="refresh()"><img class="layui-meself-img1" src="${ctxp}/icon/refush.png" alt=""> 刷新</button>
|
|
- <button type="button" class="layui-btn layui-btn-warm layui-btn-meself" onclick="refresh()"><img class="layui-meself-img1" src="${ctxp}/icon/refush.png" alt=""> 导出</button>
|
|
|
|
|
|
+ <button type="button" class="layui-btn layui-btn-warm layui-btn-meself" href="#"><img class="layui-meself-img1" src="${ctxp}/icon/daochu2.png" alt=""> 导出</button>
|
|
</div>
|
|
</div>
|
|
<table id="table1" class="layui-table" lay-filter="table1"></table>
|
|
<table id="table1" class="layui-table" lay-filter="table1"></table>
|
|
</div>
|
|
</div>
|
|
@@ -97,32 +97,35 @@
|
|
////对操作进行初始化
|
|
////对操作进行初始化
|
|
var xml = "";
|
|
var xml = "";
|
|
if(d.status==1){
|
|
if(d.status==1){
|
|
- xml += "<a class='layui-btn layui-btn-primary layui-btn-xs' onclick=\"look( '${ctx}/project/form?id=" + d.id + "&tabId=1')\">查看</a>"
|
|
|
|
- +"<a class='layui-btn layui-btn-xs' onclick=\"update( '${ctx}/project/form?id=" + d.id + "&tabId=2')\">修改</a>"
|
|
|
|
|
|
+ <%--xml += "<a class='layui-btn layui-btn-primary layui-btn-xs' onclick=\"look( '${ctx}/project/form?id=" + d.id + "&tabId=1')\">查看</a>"--%>
|
|
|
|
+ <%--+"<a class='layui-btn layui-btn-xs' onclick=\"update( '${ctx}/project/form?id=" + d.id + "&tabId=2')\">修改</a>"--%>
|
|
|
|
+ <%--+"<a class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加项目</a>";--%>
|
|
|
|
+ xml += "<a class='layui-btn layui-btn-primary layui-btn-xs'>查看</a>"
|
|
|
|
+ +"<a class='layui-btn layui-btn-xs'>修改</a>"
|
|
+"<a class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加项目</a>";
|
|
+"<a class='layui-btn layui-btn-normal layui-btn-xs' lay-event='add'>添加项目</a>";
|
|
}
|
|
}
|
|
if(d.status==2){
|
|
if(d.status==2){
|
|
xml +="<span class='myspan'>操作</span>";
|
|
xml +="<span class='myspan'>操作</span>";
|
|
}
|
|
}
|
|
if(d.status==3){
|
|
if(d.status==3){
|
|
- xml +="<a class='layui-btn layui-btn-xs' href=\"${ctx}/jkxl/list?id="+d.id+"&type="+d.type+"\">编辑</a>";
|
|
|
|
|
|
+ <%--xml +="<a class='layui-btn layui-btn-xs' href=\"${ctx}/jkxl/list?id="+d.id+"&type="+d.type+"\">编辑</a>";--%>
|
|
|
|
+ xml +="<a class='layui-btn layui-btn-xs'>编辑</a>";
|
|
}
|
|
}
|
|
|
|
|
|
return xml;
|
|
return xml;
|
|
}}
|
|
}}
|
|
]],
|
|
]],
|
|
"data": [
|
|
"data": [
|
|
- <c:if test="${ not empty list}">
|
|
|
|
- <c:forEach items="${list}" var="data" varStatus="index">
|
|
|
|
{
|
|
{
|
|
- "id": "${data.id}",
|
|
|
|
- "gcmc":"${data.projectName}",
|
|
|
|
- "xmsl": "${data.number}",
|
|
|
|
- "cjsq": "<fmt:formatDate value="${data.createDate}" pattern="yyyy/MM/dd"/>",
|
|
|
|
- "djr":"${data.userName}",
|
|
|
|
|
|
+ "id": "1",
|
|
|
|
+ "gcmc":"某线路工程",
|
|
|
|
+ "xmsl": "3",
|
|
|
|
+ "cjsq": "2018/8/14",
|
|
|
|
+ "djr":"home",
|
|
"status":"1",
|
|
"status":"1",
|
|
"pid": -1
|
|
"pid": -1
|
|
},
|
|
},
|
|
|
|
+
|
|
{
|
|
{
|
|
"id": "2",
|
|
"id": "2",
|
|
"gcmc":"项目名称",
|
|
"gcmc":"项目名称",
|
|
@@ -130,25 +133,110 @@
|
|
"cjsq": "项目划分",
|
|
"cjsq": "项目划分",
|
|
"djr":"创建时间",
|
|
"djr":"创建时间",
|
|
"status":"2",
|
|
"status":"2",
|
|
- "pid": "${data.id}"
|
|
|
|
|
|
+ "pid": 1
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ "id": "7",
|
|
|
|
+ "gcmc":"项目名称",
|
|
|
|
+ "xmsl": "施工单位",
|
|
|
|
+ "cjsq": "项目类型",
|
|
|
|
+ "djr":"创建时间",
|
|
|
|
+ "status":"2",
|
|
|
|
+ "pid": 6
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "id": "3",
|
|
|
|
+ "gcmc":"某项目",
|
|
|
|
+ "xmsl": "某施工单位一",
|
|
|
|
+ "cjsq": "架空线路",
|
|
|
|
+ "djr":"2018/8/14",
|
|
|
|
+ "status":"3",
|
|
|
|
+ "pid": 2
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "id": "4",
|
|
|
|
+ "gcmc":"某项目",
|
|
|
|
+ "xmsl": "某施工单位一",
|
|
|
|
+ "cjsq": "架空线路",
|
|
|
|
+ "djr":"2018/8/14",
|
|
|
|
+ "status":"3",
|
|
|
|
+ "pid": 2
|
|
},
|
|
},
|
|
- </c:forEach>
|
|
|
|
- </c:if>
|
|
|
|
- <c:forEach items="${list}" var="item" varStatus="index">
|
|
|
|
- <c:forEach items="${item.wbsItems}" var="items" varStatus="index">
|
|
|
|
{
|
|
{
|
|
- "id": "${items.id}",
|
|
|
|
- "type":"${items.type}",
|
|
|
|
- "gcmc":"${items.itemName}",
|
|
|
|
|
|
+ "id": "5",
|
|
|
|
+ "gcmc":"某项目",
|
|
"xmsl": "某施工单位一",
|
|
"xmsl": "某施工单位一",
|
|
- <%--"cjsq": <c:if test="${items.type eq '1'}">"架空线路"</c:if><c:if test="${items.type eq '2'}">"电缆线路"</c:if>,--%>
|
|
|
|
- "cjsq":<c:if test="${items.type eq '1'}">"架空线路"</c:if><c:if test="${items.type eq '2'}">"电缆线路"</c:if>,
|
|
|
|
- "djr":"<fmt:formatDate value="${items.createDate}" pattern="yyyy/MM/dd"/>",
|
|
|
|
|
|
+ "cjsq": "架空线路",
|
|
|
|
+ "djr":"2018/8/14",
|
|
"status":"3",
|
|
"status":"3",
|
|
- "pid": "${items.projectId}"
|
|
|
|
|
|
+ "pid": 2
|
|
},
|
|
},
|
|
- </c:forEach>
|
|
|
|
- </c:forEach>
|
|
|
|
|
|
+ {
|
|
|
|
+ "id": "6",
|
|
|
|
+ "gcmc":"某线路工程二",
|
|
|
|
+ "xmsl": "1",
|
|
|
|
+ "cjsq": "2018/8/15",
|
|
|
|
+ "djr":"home1",
|
|
|
|
+ "status":"1",
|
|
|
|
+ "pid": -1
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ {
|
|
|
|
+ "id": "8",
|
|
|
|
+ "gcmc":"某项目",
|
|
|
|
+ "xmsl": "某施工单位一",
|
|
|
|
+ "cjsq": "架空线路",
|
|
|
|
+ "djr":"2018/8/14",
|
|
|
|
+ "status":"3",
|
|
|
|
+ "pid": 7
|
|
|
|
+ },
|
|
|
|
+ {
|
|
|
|
+ "id": "9",
|
|
|
|
+ "gcmc":"某项目",
|
|
|
|
+ "xmsl": "某施工单位一",
|
|
|
|
+ "cjsq": "架空线路",
|
|
|
|
+ "djr":"2018/8/14",
|
|
|
|
+ "status":"3",
|
|
|
|
+ "pid": 7
|
|
|
|
+ },
|
|
|
|
+ <%--<c:if test="${ not empty list}">--%>
|
|
|
|
+ <%--<c:forEach items="${list}" var="data" varStatus="index">--%>
|
|
|
|
+ <%--{--%>
|
|
|
|
+ <%--"id": "${data.id}",--%>
|
|
|
|
+ <%--"gcmc":"${data.projectName}",--%>
|
|
|
|
+ <%--"xmsl": "${data.number}",--%>
|
|
|
|
+ <%--"cjsq": "<fmt:formatDate value="${data.createDate}" pattern="yyyy/MM/dd"/>",--%>
|
|
|
|
+ <%--"djr":"${data.userName}",--%>
|
|
|
|
+ <%--"status":"1",--%>
|
|
|
|
+ <%--"pid": -1--%>
|
|
|
|
+ <%--},--%>
|
|
|
|
+ <%--{--%>
|
|
|
|
+ <%--"id": "2",--%>
|
|
|
|
+ <%--"gcmc":"项目名称",--%>
|
|
|
|
+ <%--"xmsl": "施工单位",--%>
|
|
|
|
+ <%--"cjsq": "项目划分",--%>
|
|
|
|
+ <%--"djr":"创建时间",--%>
|
|
|
|
+ <%--"status":"2",--%>
|
|
|
|
+ <%--"pid": "${data.id}"--%>
|
|
|
|
+ <%--},--%>
|
|
|
|
+ <%--</c:forEach>--%>
|
|
|
|
+ <%--</c:if>--%>
|
|
|
|
+ <%--<c:forEach items="${list}" var="item" varStatus="index">--%>
|
|
|
|
+ <%--<c:forEach items="${item.wbsItems}" var="items" varStatus="index">--%>
|
|
|
|
+ <%--{--%>
|
|
|
|
+ <%--"id": "${items.id}",--%>
|
|
|
|
+ <%--"type":"${items.type}",--%>
|
|
|
|
+ <%--"gcmc":"${items.itemName}",--%>
|
|
|
|
+ <%--"xmsl": "某施工单位一",--%>
|
|
|
|
+ <%--<%–"cjsq": <c:if test="${items.type eq '1'}">"架空线路"</c:if><c:if test="${items.type eq '2'}">"电缆线路"</c:if>,–%>--%>
|
|
|
|
+ <%--"cjsq":<c:if test="${items.type eq '1'}">"架空线路"</c:if><c:if test="${items.type eq '2'}">"电缆线路"</c:if>,--%>
|
|
|
|
+ <%--"djr":"<fmt:formatDate value="${items.createDate}" pattern="yyyy/MM/dd"/>",--%>
|
|
|
|
+ <%--"status":"3",--%>
|
|
|
|
+ <%--"pid": "${items.projectId}"--%>
|
|
|
|
+ <%--},--%>
|
|
|
|
+ <%--</c:forEach>--%>
|
|
|
|
+ <%--</c:forEach>--%>
|
|
],
|
|
],
|
|
|
|
|
|
done: function () {
|
|
done: function () {
|
|
@@ -205,24 +293,36 @@
|
|
window.location.reload();
|
|
window.location.reload();
|
|
}
|
|
}
|
|
function addProject(){
|
|
function addProject(){
|
|
- layer.prompt({title: '请输入工程名称', formType: 3}, function(text, index){
|
|
|
|
- layer.close(index);
|
|
|
|
- $.ajax({
|
|
|
|
- type: "post",
|
|
|
|
- url: "${ctx}/project/save",
|
|
|
|
- data:{projectName:text},
|
|
|
|
- dataType: "json",
|
|
|
|
- success: function(data){
|
|
|
|
- if(data.success){
|
|
|
|
- layer.msg(data.msg, {icon: 1});
|
|
|
|
- window.location.reload();
|
|
|
|
- }else{
|
|
|
|
- layer.msg('添加失败', {icon: 1});
|
|
|
|
- }
|
|
|
|
|
|
+ layer.open({
|
|
|
|
+ type: 2,
|
|
|
|
+ title: '添加工程',
|
|
|
|
+ area: ['43%', '90%'],
|
|
|
|
+ shade: 0.8,
|
|
|
|
+ shadeClose: true,
|
|
|
|
+ content: '${ctxp}/webpage/modules/sg/project/addItem2Form.jsp'
|
|
|
|
+ , btn: ['确定','关闭']
|
|
|
|
+ ,yes: function(index, layero){
|
|
|
|
+ // var bodyparent = layer.getChildFrame('body', index);
|
|
|
|
+ // bodyparent.find('#newProject').click();
|
|
|
|
+ var body = layer.getChildFrame('body', index);
|
|
|
|
+ var iframeWin = layero.find('iframe')[0]; //得到iframe页的窗口对象,执行iframe页的方法:iframeWin.method();
|
|
|
|
+ var inputForm = body.find('#inputForm');
|
|
|
|
+ var top_iframe;
|
|
|
|
+ if(target){
|
|
|
|
+ top_iframe = target;//如果指定了iframe,则在改frame中跳转
|
|
|
|
+ }else{
|
|
|
|
+ top_iframe = top.getActiveTab().attr("name");//获取当前active的tab的iframe
|
|
}
|
|
}
|
|
- });
|
|
|
|
|
|
+ inputForm.attr("target",top_iframe);//表单提交成功后,从服务器返回的url在当前tab中展示
|
|
|
|
+ iframeWin.contentWindow.doSubmit();
|
|
|
|
|
|
- });
|
|
|
|
|
|
+ layer.close(index);//关闭对话框。
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ ,btn2: function(index, layero){
|
|
|
|
+ layer.close(index);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
}
|
|
}
|
|
</script>
|
|
</script>
|
|
<script>
|
|
<script>
|