| | |
| | | <style> |
| | | .v-headStyle:first-child{ |
| | | margin-top: 15rpx; |
| | | } |
| | | .v-headStyle .txt_title{ |
| | | font-size: 34rpx; |
| | | text-align: right; |
| | | display: inline-block; |
| | | vertical-align: 24rpx; |
| | | } |
| | | .v-headStyle input{ |
| | | display: inline-block; |
| | | /* border: 1px solid #d5d5d5; */ |
| | | /* width: 65%; */ |
| | | width: 85%; |
| | | height: 52rpx; |
| | | line-height: 34rpx; |
| | | background: #FFF; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | padding: 10rpx 8rpx 12rpx; |
| | | font-size: 34rpx; |
| | | font-family: inherit; |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | margin-top: 4rpx; |
| | | } |
| | | .v-headStyle input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | | .input-wrapper{ |
| | | border: 1px solid #d5d5d5; |
| | | display: inline-block; |
| | | width: 65%; |
| | | line-height: 22rpx; |
| | | } |
| | | [nvue] uni-view { |
| | | position: relative; |
| | | border: 0 solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | .uni-input { |
| | | /* border: none; */ |
| | | } |
| | | .uni-icon{ |
| | | /* border: 1px solid red; */ |
| | | width: 8%; |
| | | font-family: uniicons; |
| | | font-size: 40rpx; |
| | | font-weight: 400; |
| | | font-style: normal; |
| | | /* width: 48rpx; */ |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | color: #2d8cf0; |
| | | cursor: pointer; |
| | | display: inline-block; |
| | | vertical-align: 18rpx; |
| | | } |
| | | .v-content{ |
| | | height: 945rpx; |
| | | overflow: hide; |
| | | /* border:0.1px solid red; */ |
| | | } |
| | | .view-content{ |
| | | margin-top: 10rpx; |
| | | } |
| | | .dv-panel-bkcolor{ |
| | | background-color:#efefef; |
| | | } |
| | | .dv-panel{ |
| | | background-color:#efefef; |
| | | padding: 20rpx 20rpx 20rpx 0px; |
| | | border-radius: 12rpx; |
| | | margin-bottom: 20rpx; |
| | | text-align: right; |
| | | } |
| | | .dv-listHtml-Panel, |
| | | .dv-panel-input{ |
| | | vertical-align: middle; |
| | | width: 91%; |
| | | display: inline-block; |
| | | text-align: left; |
| | | } |
| | | .dv-panel-buticon{ |
| | | line-height: 0rpx; |
| | | text-align: left; |
| | | /* font-size: 17px; */ |
| | | padding: 0 30rpx; |
| | | } |
| | | .dv-panel-buticon .btn-padding{ |
| | | padding: 0rpx 20rpx; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | } |
| | | .dv-panel-buticon a i { |
| | | font-size: 38rpx; |
| | | } |
| | | .dv-panel-buticon button{ |
| | | min-width: 120rpx; |
| | | font-size: 32rpx; |
| | | padding: 20rpx 20rpx 0rpx 20rpx; |
| | | line-height: 1; |
| | | background: #4D6AF4; |
| | | border: none; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | border-radius: 8rpx; |
| | | } |
| | | .dv-panel .txt_title{ |
| | | font-size: 34rpx; |
| | | text-align: right; |
| | | display: inline-block; |
| | | } |
| | | .dv-panel input{ |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | | border: 2rpx solid #d5d5d5; |
| | | width: 68%; |
| | | height: 52rpx; |
| | | line-height: 34rpx; |
| | | background: #FFF; |
| | | border-radius: 14rpx !important; |
| | | color: #2d8cf0; |
| | | padding: 6rpx 8rpx 8rpx; |
| | | font-size: 32rpx; |
| | | font-family: inherit; |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | margin-top: 0rpx; |
| | | } |
| | | .dv-panel input::-webkit-input-placeholder { |
| | | font-size: 10rpx; |
| | | } |
| | | .dv-panel .form-item-span{ |
| | | vertical-align: text-top; |
| | | color: #2d8cf0; |
| | | white-space: normal; |
| | | word-break: break-all; |
| | | display: inline-block; |
| | | width: calc(100% - 100px); |
| | | } |
| | | .dv-panel-button{ |
| | | display: inline-block; |
| | | } |
| | | .dv-panel-button checkbox-group { |
| | | display: inline-block; |
| | | } |
| | | .dv-panel-button uni-checkbox .uni-checkbox-input{ |
| | | width: 34rpx; |
| | | height: 34rpx; |
| | | } |
| | | .dv-panel-button a i { |
| | | font-size: 36rpx; |
| | | } |
| | | .dv-panel-button button { |
| | | height: 50rpx; |
| | | font-size: 26rpx; |
| | | padding: 0 24rpx; |
| | | } |
| | | .view-floor{ |
| | | padding: 0 20rpx; |
| | | /* border:1px solid red; */ |
| | | } |
| | | button.btn_refresh { |
| | | width:49.5%; |
| | | margin-top: 25rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #4D6AF4; |
| | | border: none; |
| | | color: #fff; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | | display: inline-block; |
| | | } |
| | | button.btn_cancel { |
| | | width:49.5%; |
| | | margin-top: 25rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #fff; |
| | | border: none; |
| | | color: #000; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | | display: inline-block; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .bk-active{ |
| | | background-color: #D6FCB2; |
| | | } |
| | | .uni-padding-wrap{ |
| | | margin-top: 20rpx; |
| | | background-color: #98DAEA; |
| | | width: 104rpx; |
| | | height: 80rpx; |
| | | text-align: center; |
| | | border-radius: 54rpx; |
| | | padding: 24rpx 0 0 0; |
| | | float: right; |
| | | display: inline-block; |
| | | } |
| | | .uni-padding-wrap a{ |
| | | font-size: 40rpx; |
| | | } |
| | | #dv_select{ |
| | | display: inline-block; |
| | | width: 66%; |
| | | background: #FFF; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | /* padding: 10rpx 8rpx 12rpx; */ |
| | | font-size: 34rpx; |
| | | font-family: inherit; |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | margin-top: 0rpx; |
| | | vertical-align: 20rpx; |
| | | } |
| | | #dv_select .uni-select{ |
| | | border: 2rpx solid #ccc; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | } |
| | | #dv_select .uni-select__input-text{ |
| | | color: #2d8cf0; |
| | | } |
| | | .input-disabled{ |
| | | background-color: #f3f3f3 !important; |
| | | } |
| | | |
| | | .dv_panel_condent{ |
| | | background-color:#D6FCB2; |
| | | padding: 20rpx; |
| | | border-radius: 12rpx; |
| | | } |
| | | .dv_panel_attr{ |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .dv_panel_attr .dv_inline{ |
| | | display: inline-block; |
| | | text-align: center; |
| | | } |
| | | .dv_panel_attr i{ |
| | | vertical-align: 25px; |
| | | margin: 0 10px; |
| | | } |
| | | .dv_panel_attr .dv_inline p{ |
| | | background: #4D6AF4; |
| | | color: #fff; |
| | | padding: 10rpx 15rpx; |
| | | line-height: 1.5; |
| | | border-radius: 10rpx; |
| | | } |
| | | .scroll-Y { |
| | | height: 100%; |
| | | } |
| | | .scroll-view_H { |
| | | white-space: nowrap; |
| | | width: 100%; |
| | | } |
| | | |
| | | .dv_panel_content{ |
| | | margin: 0 10px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr{ |
| | | margin-bottom: 5px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr i{ |
| | | vertical-align: super; |
| | | margin: 0 10px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr .circel_node{} |
| | | /* 是菱形的 */ |
| | | .dv_panel_content .dv_panel_attr .dv_diamond_node p{ |
| | | width: 50px; |
| | | height: 50px; |
| | | background-color: #4D6AF4; |
| | | transform: rotate(45deg); |
| | | -ms-transform: rotate(45deg); |
| | | -moz-transform: rotate(45deg); |
| | | -webkit-transform: rotate(45deg); |
| | | -o-transform: rotate(45deg); |
| | | margin: 15px auto; |
| | | padding: 9px; |
| | | // line-height: 28px; |
| | | text-align: center; |
| | | } |
| | | .dv_panel_content .dv_panel_attr .dv_diamond_node p span{ |
| | | color: #fff; |
| | | transform: rotate(-45deg); |
| | | display: inline-block; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | // white-space: nowrap; |
| | | } |
| | | /* 默认形 */ |
| | | .dv_panel_content .dv_panel_attr .dv_box_node, |
| | | .dv_panel_content .dv_panel_attr .dv_diamond_node{ |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | | text-align: center; |
| | | width: 100px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr .dv_box_node p{ |
| | | background: #4D6AF4; |
| | | color: #fff; |
| | | padding: 3px 7px; |
| | | line-height: 1.5; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
| | | <style lang="scss"> |
| | | .demo-uni-row { |
| | | margin-bottom: 0px; |
| | | display: block; |
| | | } |
| | | ::v-deep .uni-row { |
| | | margin-bottom: 0px; |
| | | } |
| | | .view-tabpage ::v-deep .uni-row { |
| | | margin-bottom: 5px; |
| | | } |
| | | .demo-uni-col { |
| | | height: 36px; |
| | | border-radius: 5px; |
| | | } |
| | | .demo-uni-row .uni-input{ |
| | | width: calc(100% - 120px); |
| | | } |
| | | </style> |
| | | |
| | | <template> |
| | | <view class="content"> |
| | |
| | | |
| | | <script> |
| | | import Base64 from '../../components/js-base64/base64.js' |
| | | import classUtils from "@/js/utils.js" |
| | | export default { |
| | | modules:{ |
| | | Base64, |
| | |
| | | uni.setNavigationBarTitle({ title: options.titlename}); //设置顶部标题 |
| | | this.$data.title = options.titlename; |
| | | this.$data.param = JSON.parse(options.param); |
| | | this.isFilter=true; |
| | | if(this.param.ShowFilter) |
| | | this.isFilter=false; |
| | | //获取数据类的自定义表单参数 |
| | | if(this.param.Query_Panel){ |
| | | this.Head_UIStyleGetInfo(this.param.DataCls.id,this.param.Query_Panel.id); |
| | | } |
| | | if(this.param.ListPage.ListItem_UIDef?.ui_type=="HTML页面"){ |
| | | // HTML页面 |
| | | //获取数据类的HTML页面 |
| | | await this.Html_UIstyleGetInfo(this.param.DataCls.id,this.param.ListPage.ListItem_UIDef.id); |
| | | }else{ |
| | | await this.Detail1_UIstyleGetInfo(this.param.DataCls.id,this.param.ListPage.ListItem_UIDef.id); |
| | | } |
| | | this.orderby = this.param.Order?this.param.Order:'T_CREATE Desc'; |
| | | if(this.param.Query_Event){ |
| | | await this.onSearChange(this.param.DataCls.id,this.param.Query_Event.id); |
| | | } else{ |
| | | this.wheres = this.param.Condition; |
| | | this.pageindex = 1; |
| | | this.page_size = 3; |
| | | this.query_id = ""; |
| | | await this.loadDataGetList(); |
| | | } |
| | | console.log(this.$data.param); |
| | | this.initial(); |
| | | // this.isFilter=true; |
| | | // if(this.param.ShowFilter) |
| | | // this.isFilter=false; |
| | | // //获取数据类的自定义表单参数 |
| | | // if(this.param.Query_Panel){ |
| | | // this.Head_UIStyleGetInfo(this.param.DataCls.id,this.param.Query_Panel.id); |
| | | // } |
| | | // if(this.param.ListPage.ListItem_UIDef?.ui_type=="HTML页面"){ |
| | | // // HTML页面 |
| | | // //获取数据类的HTML页面 |
| | | // await this.Html_UIstyleGetInfo(this.param.DataCls.id,this.param.ListPage.ListItem_UIDef.id); |
| | | // }else{ |
| | | // await this.Detail1_UIstyleGetInfo(this.param.DataCls.id,this.param.ListPage.ListItem_UIDef.id); |
| | | // } |
| | | // this.orderby = this.param.Order?this.param.Order:'T_CREATE Desc'; |
| | | // if(this.param.Query_Event){ |
| | | // await this.onSearChange(this.param.DataCls.id,this.param.Query_Event.id); |
| | | // } else{ |
| | | // this.wheres = this.param.Condition; |
| | | // this.pageindex = 1; |
| | | // this.page_size = 3; |
| | | // this.query_id = ""; |
| | | // await this.loadDataGetList(); |
| | | // } |
| | | // console.log(this.$data.param); |
| | | //页面初始化获取焦点 |
| | | // this.focusMateria=true; |
| | | }, |
| | | methods: { |
| | | //初始化 |
| | | async initial(){ |
| | | this.styledef={}; |
| | | this.head_styledef={ |
| | | form:{ |
| | | items:[] |
| | | } |
| | | }; |
| | | this.detail1_styledef={}; |
| | | this.detail1StyleDefList=[]; |
| | | this.detail2_styledef={}; |
| | | this.detail2StyleDefList=[]; |
| | | this.items=[]; |
| | | this.active_id=''; |
| | | this.activelist=[]; |
| | | this.ListHtml_Panel=""; |
| | | this.ListPageHtml_Show= { |
| | | name: "", |
| | | event: { |
| | | id: "", |
| | | name: "" |
| | | } |
| | | }; |
| | | |
| | | this.isFilter=true; |
| | | if(this.param.ShowFilter) |
| | | this.isFilter=false; |
| | | //获取数据类的自定义表单参数 |
| | | if(this.param.Query_Panel){ |
| | | this.Head_UIStyleGetInfo(this.param.DataCls.id,this.param.Query_Panel.id); |
| | | } |
| | | if(this.param.ListPage.ListItem_UIDef?.ui_type=="HTML页面"){ |
| | | // HTML页面 |
| | | //获取数据类的HTML页面 |
| | | await this.Html_UIstyleGetInfo(this.param.DataCls.id,this.param.ListPage.ListItem_UIDef.id); |
| | | }else{ |
| | | await this.Detail1_UIstyleGetInfo(this.param.DataCls.id,this.param.ListPage.ListItem_UIDef.id); |
| | | } |
| | | this.orderby = this.param.Order?this.param.Order:'T_CREATE Desc'; |
| | | if(this.param.Query_Event){ |
| | | await this.onSearChange(this.param.DataCls.id,this.param.Query_Event.id); |
| | | } else{ |
| | | this.wheres = this.param.Condition; |
| | | this.pageindex = 1; |
| | | this.page_size = 3; |
| | | this.query_id = ""; |
| | | await this.loadDataGetList(); |
| | | } |
| | | }, |
| | | //滚动到底部后懒加载数据 |
| | | async scrolltolower(e) { |
| | | // console.log(e) |
| | |
| | | //刷新 |
| | | Refresh(value){ |
| | | //刷新当前页面 |
| | | // location.reload(); |
| | | uni.redirectTo({ |
| | | url:'../modal/3200?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title |
| | | }); |
| | | this.initial(); |
| | | // uni.redirectTo({ |
| | | // url:'../modal/3200?param='+JSON.stringify(this.$data.param)+"&titlename="+this.$data.title, |
| | | // }); |
| | | }, |
| | | //点击显示浏览对象显示页面 |
| | | async onViewPageClick(style){ |
| | |
| | | start_transaction: true, |
| | | class_id: $this.param.DataCls.id, |
| | | event_id: eventid, |
| | | data_obj_id:$this.styledef.form.objId, |
| | | obj_attr, |
| | | input_param, |
| | | }); |
| | |
| | | // $this.focusMateria=true; //第二个输入框获取焦点 |
| | | setTimeout(function(){ |
| | | uni.hideKeyboard(); |
| | | },100); |
| | | },1000); |
| | | // },500); |
| | | } |
| | | // if(onSuffixClickCallbackEvent.id){ //后图标点击事件 |
| | |
| | | }, |
| | | |
| | | cancel(e){ //取消 |
| | | var eventChannel = this.$scope.eventChannel; |
| | | // const eventChannel = this.getOpenerEventChannel(); |
| | | eventChannel.emit('view_3201',""); |
| | | // var eventChannel = this.$scope.eventChannel; |
| | | // // const eventChannel = this.getOpenerEventChannel(); |
| | | // eventChannel.emit('view_3201',""); |
| | | uni.navigateBack({ |
| | | delta:1 ,//返回层数,2则上上页 |
| | | }); |
| | |
| | | * ] |
| | | * } |
| | | */ |
| | | |
| | | toWhereBase64String(list) { |
| | | if (typeof list == 'string') list = [list] |
| | | var sql = [] |
| | | var seps = [' not in', ' in', '<>', '!=', '<=', '>=', '<', '=', '>', ' like'] |
| | | list.forEach(ls => { |
| | | var where = ls.trim().toLowerCase() |
| | | if (where.startsWith('(') && where.endsWith(')')) where = where.replace(/^\(/, '').replace(/\)$/, '') |
| | | if (where.includes(' and ')) { |
| | | // 二级and放在第一级数组中 |
| | | where.split(' and ').forEach(li => { |
| | | var l = li.trim() |
| | | if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '') |
| | | var sep = '' |
| | | for (var i = 0; i < seps.length; i++) { |
| | | if (l.includes(seps[i])) { |
| | | sep = seps[i] |
| | | break |
| | | } |
| | | } |
| | | if (sep) { |
| | | var values = l.split(sep) |
| | | var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '') |
| | | var value = '' |
| | | var op = sep.trim() |
| | | if (typeof list == 'string') list = [list] |
| | | var sql = [] |
| | | var seps = [' not in', ' in', '<>', '!=', '<=', '>=', '<', '=', '>', ' like'] |
| | | list.forEach(ls => { |
| | | var where = ls.trim() |
| | | if (where.startsWith('(') && where.endsWith(')')) where = where.replace(/^\(/, '').replace(/\)$/, '') |
| | | if (where.toLowerCase().includes(' and ')) { |
| | | // 二级and放在第一级数组中 |
| | | where.split(/ and /i).forEach(li => { |
| | | var l = li.trim() |
| | | if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '') |
| | | var sep = '' |
| | | for (var i = 0; i < seps.length; i++) { |
| | | if (l.toLowerCase().includes(seps[i])) { |
| | | sep = seps[i] |
| | | break |
| | | } |
| | | } |
| | | if (sep) { |
| | | var values = l.split(new RegExp(sep, 'i')) |
| | | var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '') |
| | | var value = '' |
| | | var op = sep.trim() |
| | | |
| | | if ([' in', ' not in'].includes(sep) && values[1].includes('select ') && values[1].includes(' from ')) { |
| | | value = l.replace(field, '').replace(/^\s*(in|not in)\s*/, '').trim() |
| | | if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim() |
| | | } |
| | | else { |
| | | value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '') |
| | | if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') && values[1]?.toLowerCase().includes(' from ')) { |
| | | value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim() |
| | | if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim() |
| | | } |
| | | else { |
| | | value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '') |
| | | |
| | | if (['in', 'not in'].includes(op)) { |
| | | value = value.replace(/^\(/, '').replace(/\)$/, '') |
| | | value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/, '')) |
| | | } |
| | | } |
| | | sql.push([{ field, value, op }]) |
| | | } |
| | | }) |
| | | } |
| | | else if (where.includes(' or ')) { |
| | | // 二级or放在第二级同一组数组中 |
| | | var s = [] |
| | | where.split(' or ').forEach(li => { |
| | | var l = li.trim() |
| | | if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '') |
| | | var sep = '' |
| | | for (var i = 0; i < seps.length; i++) { |
| | | if (l.includes(seps[i])) { |
| | | sep = seps[i] |
| | | break |
| | | } |
| | | } |
| | | if (sep) { |
| | | var values = l.split(sep) |
| | | var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '') |
| | | var value = '' |
| | | var op = sep.trim() |
| | | if (['in', 'not in'].includes(op)) { |
| | | value = value.replace(/^\(/, '').replace(/\)$/, '') |
| | | value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/, '')) |
| | | } |
| | | } |
| | | sql.push([{ field, value, op }]) |
| | | } |
| | | }) |
| | | } |
| | | else if (where.toLowerCase().includes(' or ')) { |
| | | // 二级or放在第二级同一组数组中 |
| | | var s = [] |
| | | where.split(/ or /i).forEach(li => { |
| | | var l = li.trim() |
| | | if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '') |
| | | var sep = '' |
| | | for (var i = 0; i < seps.length; i++) { |
| | | if (l.toLowerCase().includes(seps[i])) { |
| | | sep = seps[i] |
| | | break |
| | | } |
| | | } |
| | | if (sep) { |
| | | var values = l.split(new RegExp(sep, 'i')) |
| | | var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '') |
| | | var value = '' |
| | | var op = sep.trim() |
| | | |
| | | if ([' in', ' not in'].includes(sep) && values[1].includes('select ') && values[1].includes(' from ')) { |
| | | value = l.replace(field, '').replace(/^\s*(in|not in)\s*/, '').trim() |
| | | if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim() |
| | | } |
| | | else { |
| | | value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '') |
| | | if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') && values[1]?.toLowerCase().includes(' from ')) { |
| | | value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim() |
| | | if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim() |
| | | } |
| | | else { |
| | | value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '') |
| | | |
| | | if (['in', 'not in'].includes(op)) { |
| | | value = value.replace(/^\(/, '').replace(/\)$/, '') |
| | | value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/, '')) |
| | | } |
| | | } |
| | | sql.push([{ field, value, op }]) |
| | | } |
| | | }) |
| | | sql.push(s) |
| | | } |
| | | else { |
| | | var li = where |
| | | // 单一查询条件直接放在第一级数组中 |
| | | var l = li.trim() |
| | | if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '') |
| | | var sep = '' |
| | | for (var i = 0; i < seps.length; i++) { |
| | | if (l.includes(seps[i])) { |
| | | sep = seps[i] |
| | | break |
| | | } |
| | | } |
| | | if (sep) { |
| | | var values = l.split(sep) |
| | | var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '') |
| | | var value = '' |
| | | var op = sep.trim() |
| | | if (['in', 'not in'].includes(op)) { |
| | | value = value.replace(/^\(/, '').replace(/\)$/, '') |
| | | value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/, '')) |
| | | } |
| | | } |
| | | sql.push([{ field, value, op }]) |
| | | } |
| | | }) |
| | | sql.push(s) |
| | | } |
| | | else { |
| | | var li = where |
| | | // 单一查询条件直接放在第一级数组中 |
| | | var l = li.trim() |
| | | if (l.startsWith('(') && l.endsWith(')')) l = l.replace(/^\(/, '').replace(/\)$/, '') |
| | | var sep = '' |
| | | for (var i = 0; i < seps.length; i++) { |
| | | if (l.toLowerCase().includes(seps[i])) { |
| | | sep = seps[i] |
| | | break |
| | | } |
| | | } |
| | | if (sep) { |
| | | var values = l.split(new RegExp(sep,'i')) |
| | | var field = values[0]?.trim().replace(/^\[/, '').replace(/\]$/, '') |
| | | var value = '' |
| | | var op = sep.trim() |
| | | |
| | | if ([' in', ' not in'].includes(sep) && values[1].includes('select ') && values[1].includes(' from ')) { |
| | | value = l.replace(field, '').replace(/^\s*(in|not in)\s*/, '').trim() |
| | | if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim() |
| | | } |
| | | else { |
| | | value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '') |
| | | if ([' in', ' not in'].includes(sep) && values[1]?.toLowerCase().includes('select ') && values[1]?.toLowerCase().includes(' from ')) { |
| | | value = l.replace(field, '').replace(/^\s*(in|not in)\s*/i, '').trim() |
| | | if (value.startsWith('(') && value.endsWith(')')) value = value.replace(/^\(/, '').replace(/\)$/, '').trim() |
| | | } |
| | | else { |
| | | value = values[1]?.trim().replace(/^\'/, '').replace(/\'$/, '') |
| | | |
| | | if (['in', 'not in'].includes(op)) { |
| | | value = value.replace(/^\(/, '').replace(/\)$/, '') |
| | | value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/, '')) |
| | | } |
| | | } |
| | | sql.push([{ field, value, op }]) |
| | | } |
| | | } |
| | | }) |
| | | if (['in', 'not in'].includes(op)) { |
| | | value = value.replace(/^\(/, '').replace(/\)$/, '') |
| | | value = value.split(',').map(v => v.trim().replace(/^\'/, '').replace(/\'$/, '')) |
| | | } |
| | | } |
| | | sql.push([{ field, value, op }]) |
| | | } |
| | | } |
| | | }) |
| | | |
| | | if (sql.length > 0) |
| | | return Base64.encode(JSON.stringify({ |
| | | model: 1, |
| | | condition: sql |
| | | })) |
| | | else |
| | | return '' |
| | | } |
| | | |
| | | if (sql.length > 0) |
| | | return Base64.encode(JSON.stringify({ |
| | | model: 1, |
| | | condition: sql |
| | | })) |
| | | else |
| | | return '' |
| | | }, |
| | | |
| | | }, |
| | | }; |
| | | </script> |
| | | <style> |
| | | .v-headStyle:first-child{ |
| | | margin-top: 15rpx; |
| | | } |
| | | .v-headStyle .txt_title{ |
| | | font-size: 34rpx; |
| | | text-align: right; |
| | | display: inline-block; |
| | | vertical-align: 24rpx; |
| | | } |
| | | .v-headStyle input{ |
| | | display: inline-block; |
| | | /* border: 1px solid #d5d5d5; */ |
| | | /* width: 65%; */ |
| | | width: 85%; |
| | | height: 52rpx; |
| | | line-height: 34rpx; |
| | | background: #FFF; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | padding: 10rpx 8rpx 12rpx; |
| | | font-size: 34rpx; |
| | | font-family: inherit; |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | margin-top: 4rpx; |
| | | } |
| | | .v-headStyle input::-webkit-input-placeholder { |
| | | font-size: 12rpx; |
| | | } |
| | | .input-wrapper{ |
| | | border: 1px solid #d5d5d5; |
| | | display: inline-block; |
| | | width: 65%; |
| | | line-height: 22rpx; |
| | | } |
| | | [nvue] uni-view { |
| | | position: relative; |
| | | border: 0 solid #000; |
| | | box-sizing: border-box; |
| | | } |
| | | .uni-input { |
| | | /* border: none; */ |
| | | } |
| | | .uni-icon{ |
| | | /* border: 1px solid red; */ |
| | | width: 8%; |
| | | font-family: uniicons; |
| | | font-size: 40rpx; |
| | | font-weight: 400; |
| | | font-style: normal; |
| | | /* width: 48rpx; */ |
| | | height: 48rpx; |
| | | line-height: 48rpx; |
| | | color: #2d8cf0; |
| | | cursor: pointer; |
| | | display: inline-block; |
| | | vertical-align: 18rpx; |
| | | } |
| | | .v-content{ |
| | | height: 945rpx; |
| | | overflow: hide; |
| | | /* border:0.1px solid red; */ |
| | | } |
| | | .view-content{ |
| | | margin-top: 10rpx; |
| | | } |
| | | .dv-panel-bkcolor{ |
| | | background-color:#efefef; |
| | | } |
| | | .dv-panel{ |
| | | background-color:#efefef; |
| | | padding: 20rpx 20rpx 20rpx 0px; |
| | | border-radius: 12rpx; |
| | | margin-bottom: 20rpx; |
| | | text-align: right; |
| | | } |
| | | .dv-listHtml-Panel, |
| | | .dv-panel-input{ |
| | | vertical-align: middle; |
| | | width: 91%; |
| | | display: inline-block; |
| | | text-align: left; |
| | | } |
| | | .dv-panel-buticon{ |
| | | line-height: 0rpx; |
| | | text-align: left; |
| | | /* font-size: 17px; */ |
| | | padding: 0 30rpx; |
| | | } |
| | | .dv-panel-buticon .btn-padding{ |
| | | padding: 0rpx 20rpx; |
| | | display: inline-block; |
| | | vertical-align: middle; |
| | | } |
| | | .dv-panel-buticon a i { |
| | | font-size: 38rpx; |
| | | } |
| | | .dv-panel-buticon button{ |
| | | min-width: 120rpx; |
| | | font-size: 32rpx; |
| | | padding: 20rpx 20rpx 0rpx 20rpx; |
| | | line-height: 1; |
| | | background: #4D6AF4; |
| | | border: none; |
| | | color: #fff; |
| | | font-weight: bold; |
| | | border-radius: 8rpx; |
| | | } |
| | | .dv-panel .txt_title{ |
| | | font-size: 34rpx; |
| | | text-align: right; |
| | | display: inline-block; |
| | | } |
| | | .dv-panel input{ |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | | border: 2rpx solid #d5d5d5; |
| | | width: 68%; |
| | | height: 52rpx; |
| | | line-height: 34rpx; |
| | | background: #FFF; |
| | | border-radius: 14rpx !important; |
| | | color: #2d8cf0; |
| | | padding: 6rpx 8rpx 8rpx; |
| | | font-size: 32rpx; |
| | | font-family: inherit; |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | margin-top: 0rpx; |
| | | } |
| | | .dv-panel input::-webkit-input-placeholder { |
| | | font-size: 10rpx; |
| | | } |
| | | .dv-panel .form-item-span{ |
| | | vertical-align: text-top; |
| | | color: #2d8cf0; |
| | | white-space: normal; |
| | | word-break: break-all; |
| | | display: inline-block; |
| | | width: calc(100% - 100px); |
| | | } |
| | | .dv-panel-button{ |
| | | display: inline-block; |
| | | } |
| | | .dv-panel-button checkbox-group { |
| | | display: inline-block; |
| | | } |
| | | .dv-panel-button uni-checkbox .uni-checkbox-input{ |
| | | width: 34rpx; |
| | | height: 34rpx; |
| | | } |
| | | .dv-panel-button a i { |
| | | font-size: 36rpx; |
| | | } |
| | | .dv-panel-button button { |
| | | height: 50rpx; |
| | | font-size: 26rpx; |
| | | padding: 0 24rpx; |
| | | } |
| | | .view-floor{ |
| | | padding: 0 20rpx; |
| | | /* border:1px solid red; */ |
| | | } |
| | | button.btn_refresh { |
| | | width:49.5%; |
| | | margin-top: 25rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #4D6AF4; |
| | | border: none; |
| | | color: #fff; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | | display: inline-block; |
| | | } |
| | | button.btn_cancel { |
| | | width:49.5%; |
| | | margin-top: 25rpx; |
| | | padding: 20rpx; |
| | | line-height: 1.5; |
| | | background: #fff; |
| | | border: none; |
| | | color: #000; |
| | | font-size: 38rpx; |
| | | font-weight: bold; |
| | | float: left; |
| | | display: inline-block; |
| | | margin-right: 20rpx; |
| | | } |
| | | |
| | | .bk-active{ |
| | | background-color: #D6FCB2; |
| | | } |
| | | .uni-padding-wrap{ |
| | | margin-top: 20rpx; |
| | | background-color: #98DAEA; |
| | | width: 104rpx; |
| | | height: 80rpx; |
| | | text-align: center; |
| | | border-radius: 54rpx; |
| | | padding: 24rpx 0 0 0; |
| | | float: right; |
| | | display: inline-block; |
| | | } |
| | | .uni-padding-wrap a{ |
| | | font-size: 40rpx; |
| | | } |
| | | #dv_select{ |
| | | display: inline-block; |
| | | width: 66%; |
| | | background: #FFF; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | /* padding: 10rpx 8rpx 12rpx; */ |
| | | font-size: 34rpx; |
| | | font-family: inherit; |
| | | box-shadow: none !important; |
| | | transition-duration: 0.1s; |
| | | margin-top: 0rpx; |
| | | vertical-align: 20rpx; |
| | | } |
| | | #dv_select .uni-select{ |
| | | border: 2rpx solid #ccc; |
| | | border-radius: 0 !important; |
| | | color: #2d8cf0; |
| | | } |
| | | #dv_select .uni-select__input-text{ |
| | | color: #2d8cf0; |
| | | } |
| | | .input-disabled{ |
| | | background-color: #f3f3f3 !important; |
| | | } |
| | | |
| | | .dv_panel_condent{ |
| | | background-color:#D6FCB2; |
| | | padding: 20rpx; |
| | | border-radius: 12rpx; |
| | | } |
| | | .dv_panel_attr{ |
| | | margin-bottom: 10rpx; |
| | | } |
| | | .dv_panel_attr .dv_inline{ |
| | | display: inline-block; |
| | | text-align: center; |
| | | } |
| | | .dv_panel_attr i{ |
| | | vertical-align: 25px; |
| | | margin: 0 10px; |
| | | } |
| | | .dv_panel_attr .dv_inline p{ |
| | | background: #4D6AF4; |
| | | color: #fff; |
| | | padding: 10rpx 15rpx; |
| | | line-height: 1.5; |
| | | border-radius: 10rpx; |
| | | } |
| | | .scroll-Y { |
| | | height: 100%; |
| | | } |
| | | .scroll-view_H { |
| | | white-space: nowrap; |
| | | width: 100%; |
| | | } |
| | | |
| | | .dv_panel_content{ |
| | | margin: 0 10px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr{ |
| | | margin-bottom: 5px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr i{ |
| | | vertical-align: super; |
| | | margin: 0 10px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr .circel_node{} |
| | | /* 是菱形的 */ |
| | | .dv_panel_content .dv_panel_attr .dv_diamond_node p{ |
| | | width: 50px; |
| | | height: 50px; |
| | | background-color: #4D6AF4; |
| | | transform: rotate(45deg); |
| | | -ms-transform: rotate(45deg); |
| | | -moz-transform: rotate(45deg); |
| | | -webkit-transform: rotate(45deg); |
| | | -o-transform: rotate(45deg); |
| | | margin: 15px auto; |
| | | padding: 9px; |
| | | // line-height: 28px; |
| | | text-align: center; |
| | | } |
| | | .dv_panel_content .dv_panel_attr .dv_diamond_node p span{ |
| | | color: #fff; |
| | | transform: rotate(-45deg); |
| | | display: inline-block; |
| | | text-align: center; |
| | | overflow: hidden; |
| | | text-overflow: ellipsis; |
| | | // white-space: nowrap; |
| | | } |
| | | /* 默认形 */ |
| | | .dv_panel_content .dv_panel_attr .dv_box_node, |
| | | .dv_panel_content .dv_panel_attr .dv_diamond_node{ |
| | | vertical-align: middle; |
| | | display: inline-block; |
| | | text-align: center; |
| | | width: 100px; |
| | | } |
| | | .dv_panel_content .dv_panel_attr .dv_box_node p{ |
| | | background: #4D6AF4; |
| | | color: #fff; |
| | | padding: 3px 7px; |
| | | line-height: 1.5; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
| | | <style lang="scss"> |
| | | .demo-uni-row { |
| | | margin-bottom: 0px; |
| | | display: block; |
| | | } |
| | | ::v-deep .uni-row { |
| | | margin-bottom: 0px; |
| | | } |
| | | .view-tabpage ::v-deep .uni-row { |
| | | margin-bottom: 5px; |
| | | } |
| | | .demo-uni-col { |
| | | height: 36px; |
| | | border-radius: 5px; |
| | | } |
| | | .demo-uni-row .uni-input{ |
| | | width: calc(100% - 120px); |
| | | } |
| | | </style> |