Commit 302712d3 authored by Kimber's avatar Kimber

'update'

parent e780df3e
......@@ -169,9 +169,9 @@
background-image:linear-gradient(to bottom, rgba(20, 72, 247, .4), transparent);
}
.selects select{
position:relative;z-index:2;max-width:150px;
position:relative;z-index:2;max-width:150px;margin:0 10px;
background-color:transparent;color:#92f9ff;
border-color:transparent;outline:none;
border-color:#C99B03;outline:none;
option{
background-color:rgba(20, 72, 247, .5);
}
......@@ -250,7 +250,6 @@
style="height: 120px;background-image: url('static/title.png');background-size: 100% 100%;">
<div style="margin-top: -44px;">中和地信应急管理平台</div>
<!-- <div class="floating-text">中和地信有限公司欢迎您</div> -->
<!-- <div class="a0a_" id="h_tab">
<ul>
<li data-id="2" class="" >自然资源</li>
......@@ -265,18 +264,6 @@
<!-- 选择列表 -->
<div class="selects" id="mselect">
<select style="margin:0 20px;" id="province">
<option v-for="(item, i) in province" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="city">
<option v-for="(item, i) in city" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="area">
<option v-for="(item, i) in area" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="scompany">
<option v-for="(item, i) in scompany" :value="item.id">{{item.name}}</option>
</select>
</div>
<div>
......@@ -1033,11 +1020,6 @@
markerTypeName: ['应急队伍', '应急物资', '应急预案', '应急演练'],
markerSearchName: '', // 搜索的对应 应急队伍、应急物资、应急预案、应急演练 名称
province:[],
city:[],
area:[],
scompany:[],
mineType:void 0,
}
},
......@@ -1112,13 +1094,13 @@
};
}; */
// 区域选择列表
var mselect = document.getElementById("mselect");
var selects = mselect.children;
// 请求三级联动
this.reqSelectArea(selects);
var arealist = [
{type:'province'},
{type:'city'},
{type:'area'},
];
this.reqSelectArea(arealist);
// left3 daterange event
......@@ -1160,56 +1142,79 @@
})();
},
methods: {
reqSelectArea(selects){
var that = this, i = 0;
reqSelectArea(guides){
var that = this, i = 0, compselect;
// 区域选择列表
var selectbox = this.$el.querySelector("#mselect");
return (function reqiust(id, i){
var gitem = guides[i], pervItem = guides[i-1];
gitem.select = gitem.select || document.createElement("select");
var req = {
params: {
id:id
}
params: {id:id}
};
var select = selects[i];
axios.get(host + '/api/yingji/deptandenterprise/dept', req).then(res => {
res = res.data, list = res.body;
i++;
that[select.id] = list;
var res = res.data, list = res.body;
select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
if(i<3){
reqiust(value, i);
}else{
that.reqEnterprise(value, selects[i]);
};
// 添加全部
if(i !== 0){
list.unshift({
name: "全部",
label: "全部",
id: id,
});
};
if(i < 3){
gitem.id = id;
if(gitem.id === (pervItem && pervItem.id)){
gitem.select.style.display = 'none';
}else{
gitem.select.style.display = 'block';
};
gitem.select.dataset.type = gitem.type;
!selectbox.contains(gitem.select) && selectbox.appendChild(gitem.select);
qf.UI.selectRender(gitem.select, list, {
'value':'id',
onchange: function(val){
if(i<3){
reqiust(~~val, i);
}else{
that.reqEnterprise(~~val, compselect);
};
},
});
// increase
i++;
// 判断是否为最后一级
if(guides[i]){
reqiust(list[0].id, i);
}else{
var item = {
name: "全部",
label: "全部",
id: 24,
};
list.unshift(item);
that.reqEnterprise(list[0] && list[0].id || 0, selects[i]);
compselect = compselect || document.createElement("select");
!selectbox.contains(compselect) && selectbox.appendChild(compselect);
that.reqEnterprise(list[0] && list[0].id || 0, compselect);
};
});
})(0, i);
},
reqEnterprise(value, select){
var that = this;
var req = {
params: {
deptId:(this.deptId = value || 0),
}
params: {deptId:(this.deptId = value || 0),}
};
axios.get(host + '/api/yingji/deptandenterprise/enterprise', req).then(res => {
res = res.data;
var list = res.body || [];
this[select.id] = list;
qf.UI.selectRender(select, list, {
'value':'id',
onchange: function(val){
that.reqMines(that.enterpriseId = ~~val);
},
});
this.isReady = true;
if(list[0]){
this.enterpriseId = list[0].id;
......@@ -1220,16 +1225,6 @@
// 矿山数据
this.reqMines();
//this.setMap();
});
var that = this;
!select.onchange && (select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
that.enterpriseId = value;
that.reqMines(that.enterpriseId);
});
},
left1(){
......@@ -1312,7 +1307,6 @@
});
},
left2(){
var req = {
params: {
......
......@@ -169,9 +169,9 @@
background-image:linear-gradient(to bottom, rgba(20, 72, 247, .4), transparent);
}
.selects select{
position:relative;z-index:2;max-width:150px;
position:relative;z-index:2;max-width:150px;margin:0 10px;
background-color:transparent;color:#92f9ff;
border-color:transparent;outline:none;
border-color:#C99B03;outline:none;
option{
background-color:rgba(20, 72, 247, .5);
}
......@@ -275,18 +275,6 @@
<!-- 选择列表 -->
<div class="selects" id="mselect">
<select style="margin:0 20px;" id="province">
<option v-for="(item, i) in province" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="city">
<option v-for="(item, i) in city" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="area">
<option v-for="(item, i) in area" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="scompany">
<option v-for="(item, i) in scompany" :value="item.id">{{item.name}}</option>
</select>
</div>
<div>
......@@ -895,11 +883,6 @@
markerTypeName: ['应急队伍', '应急物资', '应急预案', '应急演练'],
markerSearchName: '', // 搜索的对应 应急队伍、应急物资、应急预案、应急演练 名称
province:[],
city:[],
area:[],
scompany:[],
mineType:void 0,
}
},
......@@ -958,15 +941,13 @@
}, 10 * 1000);
// 区域选择列表
var mselect = document.getElementById("mselect");
var selects = mselect.children;
// 请求三级联动
this.reqSelectArea(selects, onloadDataFinish);
function onloadDataFinish(){
}
var arealist = [
{type:'province'},
{type:'city'},
{type:'area'},
];
this.reqSelectArea(arealist);
// left3 daterange event
var left3t2 = rightbar.querySelector("#daterage1>.m-t2");
......@@ -1007,81 +988,92 @@
})();
},
methods: {
reqSelectArea(selects, callback){
var that = this, i = 0;
reqSelectArea(guides){
var that = this, i = 0, compselect;
// 区域选择列表
var selectbox = this.$el.querySelector("#mselect");
return (function reqiust(id, i){
var gitem = guides[i], pervItem = guides[i-1];
gitem.select = gitem.select || document.createElement("select");
var req = {
params: {
id:id
}
params: {id:id}
};
var select = selects[i];
axios.get(host + '/api/yingji/deptandenterprise/dept', req).then(res => {
res = res.data, list = res.body;
i++;
that[select.id] = list;
var res = res.data, list = res.body;
select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
if(i<3){
reqiust(value, i);
}else{
that.reqEnterprise(value, selects[i]);
};
// 添加全部
if(i !== 0){
list.unshift({
name: "全部",
label: "全部",
id: id,
});
};
if(i < 3){
gitem.id = id;
if(gitem.id === (pervItem && pervItem.id)){
gitem.select.style.display = 'none';
}else{
gitem.select.style.display = 'block';
};
gitem.select.dataset.type = gitem.type;
!selectbox.contains(gitem.select) && selectbox.appendChild(gitem.select);
qf.UI.selectRender(gitem.select, list, {
'value':'id',
onchange: function(val){
if(i<3){
reqiust(~~val, i);
}else{
that.reqEnterprise(~~val, compselect);
};
},
});
// increase
i++;
// 判断是否为最后一级
if(guides[i]){
reqiust(list[0].id, i);
}else{
var item = {
name: "全部",
label: "全部",
id: 24,
};
list.unshift(item);
that.reqEnterprise(list[0] && list[0].id || 0, selects[i], callback);
compselect = compselect || document.createElement("select");
!selectbox.contains(compselect) && selectbox.appendChild(compselect);
that.reqEnterprise(list[0] && list[0].id || 0, compselect);
};
});
})(0, i);
},
reqEnterprise(value, select, callback){
reqEnterprise(value, select){
var that = this;
var req = {
params: {
deptId:(this.deptId = value || 0)
}
params: {deptId:(this.deptId = value || 0),}
};
axios.get(host + '/api/yingji/deptandenterprise/enterprise', req).then(res => {
var res = res.data, list = res.body;
res = res.data;
var list = res.body || [];
qf.UI.selectRender(select, list, {
'value':'id',
onchange: function(val){
that.reqMines(that.enterpriseId = ~~val);
},
});
this[select.id] = list;
this.isReady = true;
if(list[0]){
this.enterpriseId = list[0].id;
}else{
this.enterpriseId = 0;
this.marker = [];
};
this.reqDispense(this.enterpriseId);
// 设置地图
this.setMap();
callback && callback();
});
}
var that = this;
!select.onchange && (select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
that.enterpriseId = value;
that.reqDispense(that.enterpriseId);
// 矿山数据
this.reqMines();
});
},
reqDeviceStatus(){
var req = {
params: {
......
......@@ -169,9 +169,9 @@
background-image:linear-gradient(to bottom, rgba(20, 72, 247, .4), transparent);
}
.selects select{
position:relative;z-index:2;max-width:150px;
position:relative;z-index:2;max-width:150px;margin:0 10px;
background-color:transparent;color:#92f9ff;
border-color:transparent;outline:none;
border-color:#C99B03;outline:none;
option{
background-color:rgba(20, 72, 247, .5);
}
......@@ -322,28 +322,17 @@
<div id="app" class="natural">
<div class="fixed wp100 hv100" style="background-color: #000000;left: 0;top: 0;z-index: 1999;" v-show="!isReady"></div>
<!-- title -->
<!-- main -->
<div class="wp100 hv100" style="display:flex;justify-content:center;">
<!-- title -->
<div class="flex-text color-theme f30 wp100 relative maxIndex fixed"
:class="isFullScreen?'tr-top':'tr-top-re'"
style="height: 120px;background-image: url('static/title.png');background-size: 100% 100%;">
<div style="margin-top: -44px;">中和地信水利系统管理平台</div>
style="height:120px;background-image:url('static/title.png');background-size:100% 100%;pointer-events:none;">
<div style="margin-top:-44px;">中和地信水利系统管理平台</div>
</div>
<!-- 选择列表 -->
<div class="selects" id="mselect">
<select style="margin:0 20px;" id="province">
<option v-for="(item, i) in province" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="city">
<option v-for="(item, i) in city" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="area">
<option v-for="(item, i) in area" :value="item.id">{{item.name}}</option>
</select>
<select style="margin:0 20px;" id="scompany">
<option v-for="(item, i) in scompany" :value="item.id">{{item.name}}</option>
</select>
</div>
<div>
......@@ -1008,11 +997,6 @@
markerTypeName: ['应急队伍', '应急物资', '应急预案', '应急演练'],
markerSearchName: '', // 搜索的对应 应急队伍、应急物资、应急预案、应急演练 名称
province:[],
city:[],
area:[],
scompany:[],
mineType:void 0,
}
},
......@@ -1085,13 +1069,16 @@
this.noticeIndex = this.noticeIndex + 1;
}, 10 * 1000);
var mselect = document.getElementById("mselect");
var selects = mselect.children;
// 请求三级联动
this.reqSelectArea(selects, onloadDataFinish);
var arealist = [
{type:'province'},
{type:'city'},
{type:'area'},
];
this.reqSelectArea(arealist);
function onloadDataFinish(){
......@@ -1199,6 +1186,8 @@
})();
}
onloadDataFinish();
this.seriesDataFormat = function(data, opts){
var names = data.names || [], list = data.list || data.lists, series = [], categories = [], maxVal = 0;
if(names[0] && list){
......@@ -1229,79 +1218,88 @@
};
},
methods: {
reqSelectArea(selects, callback){
var that = this, i = 0;
reqSelectArea(guides, callback){
var that = this, i = 0, compselect;
// 区域选择列表
var selectbox = this.$el.querySelector("#mselect");
return (function reqiust(id, i){
var gitem = guides[i], pervItem = guides[i-1];
gitem.select = gitem.select || document.createElement("select");
var req = {
params: {
id:id
}
params: {id:id}
};
var select = selects[i];
axios.get(host + '/api/yingji/deptandenterprise/dept', req).then(res => {
res = res.data, list = res.body;
i++;
that[select.id] = list;
var res = res.data, list = res.body;
select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
if(i<3){
reqiust(value, i);
}else{
that.reqEnterprise(value, selects[i]);
};
// 添加全部
if(i !== 0){
list.unshift({
name: "全部",
label: "全部",
id: id,
});
};
gitem.id = id;
if(gitem.id === (pervItem && pervItem.id)){
gitem.select.style.display = 'none';
}else{
gitem.select.style.display = 'block';
};
gitem.select.dataset.type = gitem.type;
!selectbox.contains(gitem.select) && selectbox.appendChild(gitem.select);
qf.UI.selectRender(gitem.select, list, {
'value':'id',
onchange: function(val){
if(i<3){
reqiust(~~val, i);
}else{
that.reqEnterprise(~~val, compselect);
};
},
});
if(i < 3){
// increase
i++;
// 判断是否为最后一级
if(guides[i]){
reqiust(list[0].id, i);
}else{
var item = {
name: "全部",
label: "全部",
id: 24,
};
list.unshift(item);
that.reqEnterprise(list[0] && list[0].id || 0, selects[i], callback);
compselect = compselect || document.createElement("select");
!selectbox.contains(compselect) && selectbox.appendChild(compselect);
that.reqEnterprise(list[0] && list[0].id || 0, compselect);
};
});
})(0, i);
},
reqEnterprise(value, select, callback){
reqEnterprise(value, select){
var that = this;
var req = {
params: {
deptId:(this.deptId = value || 0)
}
params: {deptId:(this.deptId = value || 0),}
};
axios.get(host + '/api/yingji/deptandenterprise/enterprise', req).then(res => {
var res = res.data, list = res.body;
res = res.data;
var list = res.body || [];
qf.UI.selectRender(select, list, {
'value':'id',
onchange: function(val){
that.reqMines(that.enterpriseId = ~~val);
},
});
this[select.id] = list;
this.isReady = true;
if(list[0]){
this.enterpriseId = list[0].id;
}else{
this.enterpriseId = 0;
this.marker = [];
};
}
this.reqDispense(this.enterpriseId);
// 设置地图
this.setMap();
callback && callback();
});
var that = this;
!select.onchange && (select.onchange = function(e){
var tag = e.target || e.srcElement;
var value = tag.selectedOptions[0].value;
that.enterpriseId = value;
that.reqDispense(that.enterpriseId);
});
},
......
......@@ -127,7 +127,7 @@ export default {
location.href = host + "/datav/watersource.html";
} else if (type === "电子档案馆") {
// this.$router.push({ path: "home4Center" });
this.$router.push({ path: "/user/center" });
this.$router.push({ path: "/1/edoc" });
}else if (type === "生态环境") {
// this.$router.push({ path: "home4Center" });
// this.$router.push({ path: "/user/center" });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment