|
@@ -47,68 +47,93 @@
|
|
format: 'yyyy-MM-dd',
|
|
format: 'yyyy-MM-dd',
|
|
type : 'date'
|
|
type : 'date'
|
|
});
|
|
});
|
|
- $('#area1Name').on("change", function () {
|
|
|
|
|
|
+ $('#area1Id').on("change", function () {
|
|
var aname = $("#area1Name").val()
|
|
var aname = $("#area1Name").val()
|
|
- var code = ''
|
|
|
|
- $.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
|
|
- $.each(data,function(index,obj){
|
|
|
|
- var cityName = obj["city_name"];
|
|
|
|
- if(aname.indexOf(cityName) != -1){
|
|
|
|
- code = obj["city_code"]
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- setTimeout(function(){
|
|
|
|
- if(code != ''){
|
|
|
|
- $.getJSON("${ctx}/worklog/workLog/getWeather?code="+code,function (data){
|
|
|
|
- if(data.code === 1) {
|
|
|
|
- var json = data.data.data.forecast;
|
|
|
|
- var weather = json[0];
|
|
|
|
- var lowTem = weather.low;
|
|
|
|
- var highTem = weather.high;
|
|
|
|
- var type = weather.type;
|
|
|
|
- var fx = weather.fx;
|
|
|
|
- $("#lowTem1").val(lowTem);
|
|
|
|
- $("#weather1").val(type);
|
|
|
|
- $("#highTem1").val(highTem);
|
|
|
|
- $("#wind1").val(fx);
|
|
|
|
- }
|
|
|
|
|
|
+ var areaId = $("#area1Id").val()
|
|
|
|
+ var city = ''
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:"${ctx}/sys/area/getParent",
|
|
|
|
+ type:"POST",
|
|
|
|
+ data:{"areaId":areaId},
|
|
|
|
+ success:function(result){
|
|
|
|
+ city = result.city;
|
|
|
|
+ var code = ''
|
|
|
|
+ $.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
|
|
+ $.each(data,function(index,obj){
|
|
|
|
+ var cityName = obj["city_name"];
|
|
|
|
+ if(city.indexOf(cityName) != -1){
|
|
|
|
+ code = obj["city_code"]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
})
|
|
})
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ if(code != ''){
|
|
|
|
+ $.getJSON("${ctx}/worklog/workLog/getWeather?code="+code,function (data){
|
|
|
|
+ if(data.code === 1) {
|
|
|
|
+ var json = data.data.data.forecast;
|
|
|
|
+ var weather = json[0];
|
|
|
|
+ var lowTem = weather.low;
|
|
|
|
+ var highTem = weather.high;
|
|
|
|
+ var type = weather.type;
|
|
|
|
+ var fx = weather.fx;
|
|
|
|
+ $("#lowTem1").val(lowTem);
|
|
|
|
+ $("#weather1").val(type);
|
|
|
|
+ $("#highTem1").val(highTem);
|
|
|
|
+ $("#wind1").val(fx);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }, 1000)
|
|
|
|
+ },
|
|
}
|
|
}
|
|
- }, 1000)
|
|
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|
|
|
|
|
|
- $('#areaName').on("change", function () {
|
|
|
|
|
|
+ $('#areaId').on("change", function () {
|
|
var aname = $("#areaName").val()
|
|
var aname = $("#areaName").val()
|
|
- var code = ''
|
|
|
|
- $.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
|
|
- $.each(data,function(index,obj){
|
|
|
|
- var cityName = obj["city_name"];
|
|
|
|
- if(aname.indexOf(cityName) != -1){
|
|
|
|
- code = obj["city_code"]
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
- })
|
|
|
|
- setTimeout(function(){
|
|
|
|
- if(code != ''){
|
|
|
|
- $.getJSON("${ctx}/worklog/workLog/getWeather?code="+code,function (data){
|
|
|
|
- if(data.code === 1) {
|
|
|
|
- var json = data.data.data.forecast;
|
|
|
|
- var weather = json[0];
|
|
|
|
- var lowTem = weather.low;
|
|
|
|
- var highTem = weather.high;
|
|
|
|
- var type = weather.type;
|
|
|
|
- var fx = weather.fx;
|
|
|
|
- $("#lowTem").val(lowTem);
|
|
|
|
- $("#weather").val(type);
|
|
|
|
- $("#highTem").val(highTem);
|
|
|
|
- $("#wind").val(fx);
|
|
|
|
- }
|
|
|
|
- })
|
|
|
|
|
|
+ var areaId = $("#areaId").val()
|
|
|
|
+ var city = ''
|
|
|
|
+ $.ajax({
|
|
|
|
+ url:"${ctx}/sys/area/getParent",
|
|
|
|
+ type:"POST",
|
|
|
|
+ data:{"areaId":areaId},
|
|
|
|
+ success:function(result){
|
|
|
|
+ city = result.city;
|
|
|
|
+ var code = ''
|
|
|
|
+ $.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
|
|
+ $.each(data,function(index,obj){
|
|
|
|
+ var cityName = obj["city_name"];
|
|
|
|
+ if(aname.indexOf(cityName) != -1){
|
|
|
|
+ code = obj["city_code"]
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ setTimeout(function(){
|
|
|
|
+ if(code != ''){
|
|
|
|
+ $.getJSON("${ctx}/worklog/workLog/getWeather?code="+code,function (data){
|
|
|
|
+ if(data.code === 1) {
|
|
|
|
+ var json = data.data.data.forecast;
|
|
|
|
+ var weather = json[0];
|
|
|
|
+ var lowTem = weather.low;
|
|
|
|
+ var highTem = weather.high;
|
|
|
|
+ var type = weather.type;
|
|
|
|
+ var fx = weather.fx;
|
|
|
|
+ $("#lowTem").val(lowTem);
|
|
|
|
+ $("#weather").val(type);
|
|
|
|
+ $("#highTem").val(highTem);
|
|
|
|
+ $("#wind").val(fx);
|
|
|
|
+ }
|
|
|
|
+ })
|
|
|
|
+ }
|
|
|
|
+ }, 1000)
|
|
|
|
+ },
|
|
}
|
|
}
|
|
- }, 1000)
|
|
|
|
|
|
+ )
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
})
|
|
})
|
|
@@ -168,12 +193,13 @@
|
|
$("#d7").siblings().hide();
|
|
$("#d7").siblings().hide();
|
|
$("#startDate").val(getNowFormatDate());
|
|
$("#startDate").val(getNowFormatDate());
|
|
var aname = $("#areaName1").val()
|
|
var aname = $("#areaName1").val()
|
|
|
|
+ var city= $("#city").val()
|
|
// var aname1 = aname.substring(0,aname.length-1);
|
|
// var aname1 = aname.substring(0,aname.length-1);
|
|
var code = ''
|
|
var code = ''
|
|
$.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
$.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
$.each(data,function(index,obj){
|
|
$.each(data,function(index,obj){
|
|
var cityName = obj["city_name"];
|
|
var cityName = obj["city_name"];
|
|
- if(aname.indexOf(cityName) != -1){
|
|
|
|
|
|
+ if(city.indexOf(cityName) != -1){
|
|
code = obj["city_code"]
|
|
code = obj["city_code"]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -202,11 +228,12 @@
|
|
$("#d8").siblings().hide();
|
|
$("#d8").siblings().hide();
|
|
$("#startDate1").val(getNowFormatDate());
|
|
$("#startDate1").val(getNowFormatDate());
|
|
var aname = $("#areaName1").val()
|
|
var aname = $("#areaName1").val()
|
|
|
|
+ var city= $("#city").val()
|
|
var code = ''
|
|
var code = ''
|
|
$.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
$.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
$.each(data,function(index,obj){
|
|
$.each(data,function(index,obj){
|
|
var cityName = obj["city_name"];
|
|
var cityName = obj["city_name"];
|
|
- if(aname.indexOf(cityName) != -1){
|
|
|
|
|
|
+ if(city.indexOf(cityName) != -1){
|
|
code = obj["city_code"]
|
|
code = obj["city_code"]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -249,11 +276,12 @@
|
|
|
|
|
|
$('#areaId').on("change", function () {
|
|
$('#areaId').on("change", function () {
|
|
var aname = $("#areaName").val()
|
|
var aname = $("#areaName").val()
|
|
|
|
+ var city = $("#city").val()
|
|
var code = ''
|
|
var code = ''
|
|
$.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
$.getJSON("${ctxStatic}/json/city.json", function (data){
|
|
$.each(data,function(index,obj){
|
|
$.each(data,function(index,obj){
|
|
var cityName = obj["city_name"];
|
|
var cityName = obj["city_name"];
|
|
- if(aname.indexOf(cityName) != -1){
|
|
|
|
|
|
+ if(city.indexOf(cityName) != -1){
|
|
code = obj["city_code"]
|
|
code = obj["city_code"]
|
|
}
|
|
}
|
|
})
|
|
})
|
|
@@ -386,6 +414,7 @@
|
|
<sys:message content="${message}"/>
|
|
<sys:message content="${message}"/>
|
|
<input type="hidden" name="pfId" id="pfId" value="${projectControlTable.pfId}">
|
|
<input type="hidden" name="pfId" id="pfId" value="${projectControlTable.pfId}">
|
|
<input type="hidden" id="areaName1" value="${area.name}">
|
|
<input type="hidden" id="areaName1" value="${area.name}">
|
|
|
|
+ <input type="hidden" id="city" value="${city}">
|
|
<div class="form-group layui-row first">
|
|
<div class="form-group layui-row first">
|
|
<div class="form-group-label"><h2>基础信息</h2></div>
|
|
<div class="form-group-label"><h2>基础信息</h2></div>
|
|
<div class="layui-item layui-col-sm6">
|
|
<div class="layui-item layui-col-sm6">
|