summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorchenjinsong <[email protected]>2019-10-28 18:15:25 +0800
committerchenjinsong <[email protected]>2019-10-28 18:15:25 +0800
commit3522977df51aa85ee999694028c453dbf1f8b22f (patch)
treec240a1c8ee29ce849cfd13a39aeb2f0e74493f34
parent5c6b51668e97edd48249d0727f7fdd96e458ecc2 (diff)
监测相关样式调整
-rw-r--r--nezha-admin/src/main/resources/statics/css/addDetectType.css17
-rw-r--r--nezha-admin/src/main/resources/statics/css/main.css19
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/addType.js16
-rw-r--r--nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js22
-rw-r--r--nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html20
5 files changed, 47 insertions, 47 deletions
diff --git a/nezha-admin/src/main/resources/statics/css/addDetectType.css b/nezha-admin/src/main/resources/statics/css/addDetectType.css
index c05591ea..72e7a327 100644
--- a/nezha-admin/src/main/resources/statics/css/addDetectType.css
+++ b/nezha-admin/src/main/resources/statics/css/addDetectType.css
@@ -1,14 +1,3 @@
-/*滚动条颜色*/
-.ps__thumb-y {
- background-color: #ddd;
-}
-/*将滚动条放在最顶层*/
-.ps__rail-y{
- top: 32px;
- right: 0px;
- height: 135px;
- z-index:99999;
-}
.metatype-question {
display: inline-block;
margin-left: 2px;
@@ -25,9 +14,6 @@
padding-top: 18px;
width: 400px;
}
-.meta-details .form-horizontal {
- width:400px;
-}
.meta-win_list{
float:left;
display:inline-block;
@@ -47,6 +33,9 @@
position: relative;
top:3px;
}
+.meta-win_list-foot>i {
+ cursor: pointer;
+}
.meta-win_item {
padding: 15px 7px 7px 15px;
border-bottom: 1px solid #ffffff;
diff --git a/nezha-admin/src/main/resources/statics/css/main.css b/nezha-admin/src/main/resources/statics/css/main.css
index 43825e92..c63e14ad 100644
--- a/nezha-admin/src/main/resources/statics/css/main.css
+++ b/nezha-admin/src/main/resources/statics/css/main.css
@@ -22,7 +22,9 @@ html { overflow-x:hidden; }
.ps__thumb-y {
background-color: #ddd;
}
-
+.ps__rail-y {
+ z-index: 99999;
+}
.content-header {
position: relative;
padding: 0 0 3px 8px
@@ -111,8 +113,12 @@ tbody > tr > th {font-weight: normal; }
}
-.form-horizontal{
- width:550px;padding-top:20px;
+.form-horizontal {
+ width: 550px;
+ padding-top: 20px;
+}
+.form-horizontal_400 {
+ width: 400px;
}
.form-horizontal .form-control {
display: inline-block;
@@ -122,7 +128,7 @@ tbody > tr > th {font-weight: normal; }
.form-control_error-msg {
color: #f57f6c;
}
-.required-symbol, .required-symbol_meta-model {
+.required-symbol, .required-symbol_400 {
color: #f57f6c;
font-size: 20px;
display: inline-block;
@@ -132,12 +138,9 @@ tbody > tr > th {font-weight: normal; }
.required-symbol {
left: 370px;
}
-.required-symbol_meta-model {
+.required-symbol_400 {
left: 270px;
}
-.required-symbol {
- left: 370px;
-}
.multiselect {
border-radius: 4px;
border-radius: 4px;
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js b/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js
index 33e6d326..e1514851 100644
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js
+++ b/nezha-admin/src/main/resources/templates/js/modules/detect/addType.js
@@ -695,7 +695,8 @@ var addType=Vue.extend({
metaReset:true,
paramReset:true,
metaRequired:true,
- paramRequired:true
+ paramRequired:true,
+ typeNotLayer: true
}
},
validations:{
@@ -728,6 +729,9 @@ var addType=Vue.extend({
temp.getDataTypes();
temp.getDicTypes();
temp.initDeteType();
+ if (temp.$parent.typeNotLayer == false) {
+ temp.typeNotLayer = false;
+ }
},
initDeteType:function(){
var temp=this;
@@ -777,9 +781,9 @@ var addType=Vue.extend({
if(temp.parentLayerId!=undefined&&temp.parentLayerId!=null) {
$("#metaWindow").appendTo($('body'))
parentLayer= $("#layui-layer" + temp.parentLayerId).get(0);
- var oldParentLeft = parentLayer.style.left;
}
var metaComponets=null;
+ $(parentLayer).animate({right: "600px"}, "normal");
var index = layer.open({
area: ['600px', '100%'],
shade: 0.01,
@@ -794,7 +798,7 @@ var addType=Vue.extend({
zIndex: layer.zIndex,
success: function(layero,index){
if(temp.parentLayerId!=undefined&&temp.parentLayerId!=null){
- parentLayer.style.left='250px';
+ $(parentLayer).animate({right: "600px"});
}
},
cancel:function(){
@@ -806,9 +810,11 @@ var addType=Vue.extend({
}
if(temp.parentLayerId!=undefined&&temp.parentLayerId!=null){
- parentLayer.style.left=oldParentLeft;
+ $(parentLayer).animate({right: 0}, "normal");
}
-
+ },
+ end: function() {
+ $("html").css("overflow-y", "hidden");
}
});
if(typeof(i)=="number"){
diff --git a/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js b/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js
index 87bef553..149a0c84 100644
--- a/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js
+++ b/nezha-admin/src/main/resources/templates/js/modules/detect/deteSet.js
@@ -144,7 +144,8 @@ var vm = new Vue({
typeId:null,
layerId:null,
layerReset:true,
- isUpdate:false
+ isUpdate:false,
+ typeNotLayer: false
},
created: function () {
this.getSetState();
@@ -347,7 +348,7 @@ var vm = new Vue({
vm.deteTypeIsNull=false;
vm.showNodeSelect = true;
var index = layer.open({
- area: ['50%', '100%'],
+ area: ['610px', '100%'],
shade: 0,
title: "<@spring.message 'common.selectNodeOrNodeGroup'/>",
type: 1,
@@ -367,9 +368,9 @@ var vm = new Vue({
},
openAddTypePannel: function () {
var index = layer.open({
- area: ['600px', '100%'],
+ area: ['540px', '100%'],
shade: 0,
- title: "",
+ title: "监测类别",
type: 1,
maxmin: false,
scrollbar: false,
@@ -377,13 +378,14 @@ var vm = new Vue({
closeBtn: 1,
move: false,
content: $("#add-type-layer-view"),
- zIndex: layer.zIndex,
- success: function(layero){
- layero.find(".layui-layer-close").removeClass('layui-layer-close2');
- layero.find(".layui-layer-close").addClass('layui-layer-close1');
- },
+ end: function() {
+ $("html").css("overflow-y", "auto");
+ }
});
- this.layerId=index;
+ this.layerId = index;
+ addType.typeNotLayer = false;
+ $("#layui-layer" + index).get(0).style.left = "unset";
+ $("#layui-layer" + index).get(0).style.right = "0";
var ps3 = new PerfectScrollbar('.nodeTree');
},
getTabDatas:function(tabData){
diff --git a/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html b/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html
index 9d2facf7..a345d259 100644
--- a/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html
+++ b/nezha-admin/src/main/resources/templates/modules/detect/addTypeTemplate.html
@@ -1,6 +1,6 @@
<script type="text/x-template" id="addTypeTemplate">
- <div class="panel panel-default">
- <div class="panel-heading">{{title}}</div>
+ <div :class="{'panel panel-default':typeNotLayer}" style="overflow-x: hidden">
+ <div v-show="typeNotLayer" class="panel-heading">{{title}}</div>
<form class="form-horizontal">
<div class="form-group">
<div class="col-sm-2 control-label">名称:</div>
@@ -182,7 +182,7 @@
</template>
<!-- 新增按钮 -->
<div class="meta-win_list-foot">
- <span @click="addMeta"><i class="fa fa-plus"></i></span>
+ <i @click="addMeta" class="fa fa-plus"></i>
</div>
</div>
<!-- meta详情 -->
@@ -206,13 +206,13 @@
</div>
<div v-id:[metaDetailDomIdKey]="index" class="r-dete-meta-detail" >
<div>
- <form class="form-horizontal" >
+ <form class="form-horizontal form-horizontal_400" >
<div>
<div class="form-group">
<div class="col-sm-3 control-label"><@spring.message 'common.name'/>:</div>
<div class="col-sm-9">
<input type="text" class="form-control nameEvent" v-model="$v.deteMeta.name.$model"/>
- <span class="required-symbol_meta-model">*</span>
+ <span class="required-symbol_400">*</span>
<div class="form-control_error-msg" v-if="$v.deteMeta.name.$dirty&&!$v.deteMeta.name.required"><@spring.message 'validate.common.required'/></div>
<div class="form-control_error-msg" v-if="$v.deteMeta.name.$dirty&&!$v.deteMeta.name.inPageNameRepeat"><@spring.message 'validate.deteType.name.repeat'/></div>
</div>
@@ -237,7 +237,7 @@
</template>
</multiselect>
- <span class="required-symbol_meta-model">*</span>
+ <span class="required-symbol_400">*</span>
<div class="form-control_error-msg" v-if="$v.deteMeta.fieldType.$dirty&&!$v.deteMeta.fieldType.required"><@spring.message 'validate.common.required'/></div>
</div>
</div>
@@ -260,7 +260,7 @@
</div>
</template>
</multiselect>
- <span class="required-symbol_meta-model">*</span>
+ <span class="required-symbol_400">*</span>
<div class="form-control_error-msg" v-if="$v.deteMeta.dataType.$dirty&&!$v.deteMeta.dataType.required"><@spring.message 'validate.common.required'/></div>
</div>
</div>
@@ -268,7 +268,7 @@
<div class="col-sm-3 control-label"><@spring.message 'deteType.dataLenth'/>:</div>
<div class="col-sm-9">
<input type="text" class="form-control" v-model="$v.deteMeta.dataLenth.$model"/>
- <span class="required-symbol_meta-model">*</span>
+ <span class="required-symbol_400">*</span>
<div class="form-control_error-msg" v-if="$v.deteMeta.dataLenth.$dirty&&!$v.deteMeta.dataLenth.required"><@spring.message 'validate.common.required'/></div>
</div>
</div>
@@ -276,7 +276,7 @@
<div class="col-sm-3 control-label">OID:</div>
<div class="col-sm-9">
<input type="text" class="form-control" v-model="$v.deteMeta.oid.$model"/>
- <span class="required-symbol_meta-model">*</span>
+ <span class="required-symbol_400">*</span>
<div class="form-control_error-msg" v-if="deteMethod.code=='2'&&$v.deteMeta.oid.$dirty&&!$v.deteMeta.oid.required"><@spring.message 'validate.common.required'/></div>
</div>
</div>
@@ -284,7 +284,7 @@
<div class="col-sm-3 control-label"><@spring.message 'deteType.unit'/>:</div>
<div class="col-sm-9">
<input type="text" class="form-control" v-model="$v.deteMeta.unit.$model"/>
- <span class="required-symbol_meta-model">*</span>
+ <span class="required-symbol_400">*</span>
<div class="form-control_error-msg" v-if="$v.deteMeta.unit.$dirty&&!$v.deteMeta.unit.required"><@spring.message 'validate.common.required'/></div>
</div>
</div>