提交 8fe1a3aa 编写于 作者: U unknown

ftsearch

上级 5a470c87
<div class="index-wrap" data-o2-element="contentNode">
<div class="index-search-wrap">
<!-- <div class="index-top">-->
<!-- <div class="index-top-inner">-->
<!-- <div style="float:right;">-->
<!-- <div class="index-topLink mainColor_color mainColor_border" style="margin-left:10px;" data-o2-events="click:selectTab">{{$.lp.selectModule}}</div>-->
<!-- <div class="index-topLink mainColor_color mainColor_border" data-o2-events="click:gotoMainPage">{{$.lp.mainPage}}</div>-->
<!-- </div>-->
<!-- <div class="breadcrumb-index">-->
<!-- <span>{{$.lp.location}}</span>-->
<!-- <a data-o2-events="click:gotoMainPage">{{$.lp.mainPage}}</a>-->
<!-- <span>></span>-->
<!-- <a data-o2-events="click:selectTab">{{$.lp.index}}</a>-->
<!-- <span>></span>-->
<!-- <span class="mainColor_color">{{$.tabData.name}}</span>-->
<!-- </div>-->
<!-- </div>-->
<!-- </div>-->
<div class="index-top">
<div class="index-top-inner">
<div style="float:right;">
<div class="index-topLink mainColor_color mainColor_border" style="margin-left:10px;" data-o2-events="click:selectTab">{{$.lp.selectModule}}</div>
<div class="index-topLink mainColor_color mainColor_border" data-o2-events="click:gotoMainPage">{{$.lp.mainPage}}</div>
</div>
<div class="breadcrumb-index">
<span>{{$.lp.location}}</span>
<a data-o2-events="click:gotoMainPage">{{$.lp.mainPage}}</a>
<span>></span>
<a data-o2-events="click:selectTab">{{$.lp.index}}</a>
<span>></span>
<span class="mainColor_color">{{$.tabData.name}}</span>
</div>
<!-- <div class="index-topLink">{{$.lp.searching}}:{{$.tabData.name}}</div>-->
</div>
</div>
<div data-o2-element="docContent" class="docContent-index">
<div class="contentWrap-index">
<div data-o2-element="conditionSelectedArea"></div>
......
<div class="appNode" data-o2-element="appNode">
<!-- <div class="menuArea" data-o2-element="menuArea">-->
<!-- </div>-->
<!-- <div class="contentArea">-->
<!-- <div class="content" data-o2-element="contentArea"></div>-->
<!-- </div>-->
<div class="contentArea">
<div class="content" data-o2-element="contentArea">
<div class="before_search_blank"></div>
<div class="main_inputWrap_main">
<div class="main_inputArea mainColor_border">
<input class="main_input" data-o2-element="searchInput" placeholder="{{$.lp.searchPlacholder}}" data-o2-events="keydown:searchKeydown"/>
<i class="main_inputButton o2icon-search1" data-o2-events="click:search;mouseover:iconOver;mouseout:iconOut"></i>
</div>
<div class="main_buttonArea">
<div class="main_searchButton mainColor_bg" data-o2-events="click:searchClick">{{$.lp.search}}</div>
<div class="main_indexButton" data-o2-events="click:selectTab">{{$.lp.index}}</div>
<!-- <div class="main_indexButton" data-o2-events="click:openIndexView">{{$.lp.index}}</div>-->
</div>
</div>
</div>
</div>
</div>
\ No newline at end of file
......@@ -5,9 +5,9 @@
@font-face {
font-family: 'ftsearch';
src:
url('../x_component_process_Application/$IndexView/default/fonts/ftsearch.ttf?j6lkqm') format('truetype'),
url('../x_component_process_Application/$IndexView/default/fonts/ftsearch.woff?j6lkqm') format('woff'),
url('../x_component_process_Application/$IndexView/default/fonts/ftsearch.svg?j6lkqm#ftsearch') format('svg');
url('../x_component_ftsearch/$Main/default/fonts/ftsearch.ttf?j6lkqm') format('truetype'),
url('../x_component_ftsearch/$Main/default/fonts/ftsearch.woff?j6lkqm') format('woff'),
url('../x_component_ftsearch/$Main/default/fonts/ftsearch.svg?j6lkqm#ftsearch') format('svg');
font-weight: normal;
font-style: normal;
font-display: block;
......@@ -164,7 +164,13 @@ ul {
text-align: left;
position: relative;
}
/*button{*/
/* border-radius: 100px;*/
/* border: 0;*/
/* padding: 6px 20px;*/
/* cursor: pointer;*/
/* margin-left: 10px;*/
/*}*/
*::-webkit-scrollbar {
width:8px;
height: 8px;
......@@ -187,9 +193,227 @@ ul {
scrollbar-color: #bbbbbb #dddddd;
scrollbar-width: thin;
}
/*.item_descriptions_label{*/
/* font-weight: normal!important;*/
/*}*/
/*.item_descriptions_content{*/
/* font-weight: 300!important;*/
/*}*/
/*.item_div_button{*/
/* margin: 0;*/
/* height: var(--el-input-height, 40px);*/
/* border-radius: 100px;*/
/* font-size: 16px;*/
/* display: flex;*/
/* align-items: center;*/
/* justify-content: space-evenly;*/
/* cursor: pointer;*/
/*}*/
/*.item_validate_info{*/
/* color: red;*/
/* height: 10px;*/
/* padding: 5px 15px;*/
/* display: none;*/
/*}*/
/*.item_log{*/
/* color: #999999;*/
/* word-break: keep-all;*/
/* word-wrap: normal;*/
/*}*/
/*.item_log_completed{*/
/* color: #00b516;*/
/* word-break: keep-all;*/
/* word-wrap: normal;*/
/*}*/
/*.item_storage_module .el-collapse-item__header {*/
/* padding: 0 20px!important;*/
/* border-radius: 30px!important;*/
/* background-color: #f3f3f3!important;*/
/*}*/
/*.item_message_module .el-collapse-item__header {*/
/* width: 98%!important;*/
/* height: 32px!important;*/
/* font-size: 12px!important;*/
/* padding: 0 20px!important;*/
/* border-radius: 30px!important;*/
/* background-color: #f3f3f3!important;*/
/* font-weight: bold;*/
/*}*/
/*.item_message_module .el-collapse-item__content{*/
/* padding-bottom: 0!important;*/
/*}*/
/*.menuItemSubArea{*/
/* !*display: none;*!*/
/*}*/
/*.menu{*/
/* margin: 0;*/
/* user-select: none;*/
/* height: 100%;*/
/* display: flex;*/
/* flex-direction: column;*/
/*}*/
/*.menuTitle{*/
/* margin: 0 20px;*/
/* height: 60px;*/
/* font-size: 18px;*/
/* color: #333333;*/
/* line-height: 60px;*/
/* border-bottom: 1px solid #cccccc;*/
/*}*/
/*.menuTitleLogo{*/
/* background-repeat: no-repeat;*/
/* background-size: 18px;*/
/* background-position: center;*/
/* background-color: #758790;*/
/* width: 32px;*/
/* height: 32px;*/
/* float: left;*/
/* border-radius: 20px;*/
/* margin-top: 14px;*/
/* margin-right: 10px;*/
/*}*/
/*.menuTitleText{*/
/* float: left;*/
/*}*/
/*.menuContent{*/
/* height: inherit;*/
/* overflow: auto;*/
/*}*/
/*.menuItem{*/
/* height: 50px;*/
/* cursor: pointer;*/
/* line-height: 50px;*/
/* font-size: 16px;*/
/* color: #999999;*/
/*}*/
/*.menuItem_current{*/
/* background-color: #EBF1F7!important;*/
/*}*/
/*.menuItem_over{*/
/* background-color: #F7F7F7;*/
/*}*/
/*.menuItemIcon {*/
/* margin-left: 20px;*/
/* !*height: 16px;*!*/
/* !*width: 16px;*!*/
/* !*padding: 12px 5px 12px 0;*!*/
/* float: left;*/
/*}*/
/*.menuItemText{*/
/* margin: 0 30px 0 46px;*/
/* text-align: left;*/
/*}*/
/*.menuItemCount{*/
/* margin-right: 20px;*/
/* float: right;*/
/* width: 20px;*/
/* font-size: 1px;*/
/* color: #999999;*/
/* line-height: 40px!important;*/
/* text-align: right;*/
/*}*/
/*.subItem {*/
/* height: 40px;*/
/* line-height: 40px;*/
/* padding-left: 20px;*/
/* font-size: 14px;*/
/* color: #666666;*/
/*}*/
/*.subItemIcon {*/
/* margin-left: 20px;*/
/*}*/
/*.subItemText{*/
/* margin: 0 30px 0 40px;*/
/* text-align: left;*/
/*}*/
/*.menuBottom{*/
/* margin: 0 20px;*/
/* height: 60px;*/
/* font-size: 18px;*/
/* color: #333333;*/
/* line-height: 60px;*/
/* border-top: 1px solid #cccccc;*/
/* display: flex;*/
/* justify-content: center;*/
/* align-items: center;*/
/* cursor: pointer;*/
/*}*/
.before_search_blank{
max-height: 290px;
min-height: 150px;
height: calc(100% - 360px);
}
.main_inputWrap{
background-color: #ffffff;
padding: 20px;
margin-bottom: 10px;
}
.main_inputWrap_main{
width: 600px;
background-color: #ffffff;
margin: 0 auto;
}
.main_inputArea{
max-width: 600px;
/*margin-bottom: 10px;*/
/*border: 1px solid #ccc;*/
border: 1px solid #4A90E2;
border-radius: 20px;
padding: 0 0 0 15px;
/*box-shadow: 0 2px 5px 1px rgb(64 60 67 / 16%);*/
}
.main_input {
width: calc( 100% - 40px );
height: 38px;
font-size: 16px;
color: #666;
border: 0;
}
.main_inputButton{
cursor: pointer;
line-height: 40px;
font-size: 18px;
color: #ccc;
}
.main_buttonArea{
margin-top:30px;
text-align:center;
}
.main_searchButton{
height: 40px;
line-height: 40px;
cursor: pointer;
background: #4A90E2;
border-radius: 20px;
color: #ffffff;
font-size:16px;
width: 120px;
display: inline-block;
}
.main_indexButton{
margin-left: 30px;
line-height: 40px;
cursor: pointer;
height: 40px;
color: #666666;
background: #F0F0F0;
border-radius: 20px;
font-size:16px;
width: 120px;
display: inline-block;
}
.ftsearch-wrap{
width: 100%;
height: 100%;
margin: 0px auto;
background-color: #F0F0F0;
}
.index-wrap{
margin: 10px;
margin: 0px auto;
height: 100%;
}
.index-top{
......@@ -210,18 +434,119 @@ ul {
background-color: #F0F0F0;
}
.ftsearch-top{
background-color: #ffffff;
padding: 20px;
margin-bottom: 10px;
overflow: hidden;
}
.ftsearch-top-inner{
overflow: hidden;
min-width: 1010px;
max-width: 1400px;
}
.view_inputArea{
float: left;
width: 500px;
/*margin-bottom: 10px;*/
/*border: 1px solid #ccc;*/
border: 1px solid #4A90E2;
border-radius: 20px;
padding: 0 0 0 15px;
/*box-shadow: 0 2px 5px 1px rgb(64 60 67 / 16%);*/
}
.view_input {
width: calc( 100% - 40px );
height: 30px;
font-size: 14px;
color: #666;
border: 0;
}
.view_inputButton{
cursor: pointer;
line-height: 30px;
font-size: 14px;
color: #ccc;
}
.breadcrumb-index{
float: left;
font-size: 14px;
color: #999;
padding-left:20px;
margin-top:8px;
background: url("../x_component_ftsearch/$Main/default/icons/location.png") no-repeat;
}
.breadcrumb-index a{
cursor: pointer;
padding-left:5px;
}
.breadcrumb-index span{
padding-left:5px;
}
.breadcrumb-tab{
margin-left: 10px;
float: left;
font-size: 14px;
color: #999;
padding-left:20px;
background: url("../x_component_ftsearch/$Main/default/icons/location.png") left center no-repeat;
}
.breadcrumb-tab a{
cursor: pointer;
padding-left:5px;
}
.breadcrumb-tab span{
padding-left:5px;
}
.docContent-index{
/*height: calc( 100% - 134px );*/
height: calc( 100% - 40px );
height: calc( 100% - 134px );
background:#ffffff;
padding:20px;
overflow:auto;
/*display: flex;*/
/*flex-direction: column;*/
display: flex;
flex-direction: column;
}
.docContent-ftsearch{
height: calc( 100% - 140px );
background:#ffffff;
padding:20px;
overflow:auto;
display: flex;
flex-direction: column;
}
.contentWrap-ftsearch{
min-width: 1010px;
max-width: 1400px;
}
.contentWrap-index{
min-width: 810px;
/*max-width: 1400px;*/
max-width: 1400px;
}
.ftsearch-topLink{
cursor: pointer;
display: inline-block;
width: 100px;
height: 30px;
line-height: 30px;
text-align: center;
margin-left: 10px;
background: #FFFFFF;
border-radius: 15px;
color: #4A90E2;
border: 1px solid #4A90E2;
}
.ftsearch-topButton{
cursor: pointer;
display: inline-block;
width: 100px;
height: 32px;
line-height: 32px;
margin-left:10px;
color: #fff;
background: #4A90E2;
border-radius: 15px;
text-align: center;
}
.index-topLink{
cursor: pointer;
......@@ -272,7 +597,7 @@ ul {
width: 60px;
height: 60px;
margin: 0 auto;
background: url("../x_component_process_Application/$IndexView/default/icons/nodata.png") no-repeat;
background: url("../x_component_ftsearch/$Main/default/icons/nodata.png") no-repeat;
}
.listNoDataText{
line-height: 50px;
......@@ -312,6 +637,29 @@ ul {
text-decoration: underline;
}
.listItem{
padding: 15px 5px; overflow: hidden;
}
.listItem-title{
font-size: 16px; color: #333; overflow: hidden; cursor: pointer; margin: 5px 0; text-decoration: none;
}
.listItem-title:hover{
text-decoration: underline;
}
.listItem-body{
font-size: 14px; color: #666; line-height: 24px; overflow: hidden; margin: 5px 0;
}
.listItem-summary{
font-size: 14px; color: #666; line-height: 24px; overflow: hidden; margin: 5px 0; display:inline;
}
.listItem-infor-title{
color:#4A90E2
}
.listItem-infor-content{
padding-right: 20px;
}
.conditionSelected{
overflow: hidden;
margin-bottom: 10px;
......@@ -349,7 +697,7 @@ ul {
}
.separator{
border-top: 2px solid #4A90E2;
border-top: 3px solid #4A90E2;
}
.condition{
width: 100%;
......@@ -534,7 +882,21 @@ ul {
.actionbar .switch-filter-text{
padding-right:10px;
}
/*.actionbar .search-action{*/
/* border: 1px solid #ddd; border-radius: 50px; display: inline-block; color:#666;*/
/* text-align: center; padding: 8px 20px; cursor: pointer; background-color: #F0F0F0;*/
/*}*/
/*.actionbar .export-action{*/
/* border: 1px solid #ddd; border-radius: 50px; display: inline-block; color:#666; margin-left: 20px;*/
/* text-align: center; padding: 8px 20px; cursor: pointer; background-color: #F0F0F0;*/
/*}*/
/*.actionbar .switch-filter-action{*/
/* border: 1px solid #ddd; border-radius: 50px; display: inline-block; color:#666; margin-left: 20px;*/
/* text-align: center; padding: 8px 20px; cursor: pointer; background-color: #F0F0F0;*/
/*}*/
/*.actionbar .switch-filter-text{*/
/* padding-right:10px;*/
/*}*/
.fieldSelect{
overflow: hidden;
......@@ -583,3 +945,181 @@ ul {
cursor: pointer;
}
.tl_area{
display: flex;
height: calc( 100% - 20px );
margin:10px;
flex-direction: column;
}
.tl_contentWrap{
height: calc( 100% - 90px );
background:#ffffff;
padding:20px 20px 0 20px;
}
.tl_title{
background: #FFFFFF;
height: 40px;
line-height: 40px;
color: #666666;
padding: 10px;
overflow: hidden;
margin-bottom: 10px;
}
.tl_listNode{
height: calc( 100% - 40px );
overflow: auto;
}
.tl_titleAction{
float: right;
height: 40px;
width: 50px;
cursor: pointer;
text-align: center;
font-size: 18px;
}
.tl_titleText{
height: 40px;
margin-right: 50px;
padding-left: 10px;
font-size: 18px;
display:inline-block;
float: left;
}
.tl_tabTitles{
border-bottom: 3px solid #4A90E2;
overflow:hidden;
height: 35px;
}
.tl_tabTitle{
width: 100px;
height: 36px;
font-size: 16px;
line-height: 36px;
float: left;
margin-right: 20px;
cursor: pointer;
color: #666;
}
.tl_tabTitleCurrent{
color: #fff;
background: #4A90E2;
border-radius: 20px 20px 0 0;
}
.tl_core_searchArea{
float: right;
margin-right:20px;
margin-top:5px;
width: 300px;
height:30px;
line-height:30px;
/*margin-bottom: 10px;*/
/*border: 1px solid #ccc;*/
border: 1px solid #c4c7ce;
border-radius: 20px;
padding: 0 0 0 0px;
/*box-shadow: 0 2px 5px 1px rgb(64 60 67 / 16%);*/
}
.tl_core_search {
width: calc( 100% - 40px );
height: 20px;
font-size: 14px;
color: #666;
border: 0;
}
.tl_core_coreButton{
cursor: pointer;
line-height: 22px;
font-size: 14px;
color: #ccc;
}
.tl_coreListApp{
overflow:hidden;
}
.tl_left{
width: 30px;
height: 30px;
margin-right: 10px;
float:left;;
}
.tl_right{
margin-left:40px;
border-bottom: 1px solid #E6E6E6;
}
.tl_coreListAppIcon{
margin-top:10px;
width: 30px;
height: 30px;
/*margin-right: 10px;*/
background-size: 30px 30px;
background-position: center;
background-repeat: no-repeat;
background-image: url("../x_component_process_ApplicationExplorer/$Main/default/icon/application.png");
}
.tl_coreListAppTitle{
height: 40px;
line-height: 40px;
/*border-bottom: 1px solid #E6E6E6;*/
display: flex;
background-color: #fff;
padding: 0 20px;
}
.tl_coreListAppContent{
padding: 10px 20px;
overflow: hidden;
}
.tl_coreListAppText{
margin-top: 10px;
font-size: 16px;
color: #666666;
cursor: pointer;
height: 30px;
line-height: 30px;
overflow: hidden;
padding: 0 10px;
border-radius: 20px;
user-select: none;
}
.tl_coreItemArea{
height: 30px;
color: #666666;
line-height: 30px;
overflow: hidden;
float: left;
margin-right: 20px;
margin-bottom: 5px;
}
.tl_coreItem{
background: #F0F0F0;
cursor: pointer;
height: 30px;
line-height: 30px;
overflow: hidden;
float: left;
padding: 0 10px;
border-radius: 20px;
user-select: none;
}
.tl_processCommonIcon{
background-image: url("../o2_core/o2/xDesktop/$Default/appicons/process.png");
background-color: rgb(79, 178, 227);
background-size: 18px;
background-position: center;
background-repeat: no-repeat;
width: 30px;
height: 30px;
border-radius: 15px;
margin-top: 10px;
}
.tl_processSearchIcon{
background-image: url("../o2_core/o2/xDesktop/$Default/appicons/search.png");
background-color: rgb(117, 135, 144);
background-size: 18px;
background-position: center;
background-repeat: no-repeat;
width: 30px;
height: 30px;
border-radius: 15px;
margin-top: 10px;
}
<div class="tl_coreListBox">
{{each $.data}}
<div class="tl_coreListApp">
<div class="tl_left">
{{if ($.key)}}
<div class="tl_coreListAppIcon" data-o2-events="o2load:loadItemIcon:{{$.id}}"></div>
{{end if}}
</div>
<div class="tl_right">
<div class="tl_coreListAppTitle">
<div class="tl_coreListAppText" title="{{$.name}}"
data-o2-events="mouseover:coreListItemOver;mouseout:coreListItemOut; mousedown:coreListItemDown;mouseup:coreListItemUp;click:coreListItemClick;"
>{{$.name}}</div>
</div>
<div class="tl_coreListAppContent">
{{each $.categoryInfoList}}
<div class="tl_coreItemArea">
<div class="tl_coreItem"
data-o2-events="mouseover:coreItemOver;mouseout:coreItemOut; mousedown:coreItemDown;mouseup:coreItemUp;click:coreItemClick;">
{{$.name}}
</div>
</div>
{{end each}}
</div>
</div>
</div>
{{end each}}
</div>
\ No newline at end of file
<div class="tl_coreListBox">
{{each $.data}}
<div class="tl_coreListApp">
<div class="tl_left">
{{if ($.key)}}
<div class="tl_coreListAppIcon" data-o2-events="o2load:loadItemIcon:{{$.id}}"></div>
{{end if}}
</div>
<div class="tl_right">
<div class="tl_coreListAppTitle">
<div class="tl_coreListAppText" title="{{$.name}}"
data-o2-events="mouseover:coreListItemOver;mouseout:coreListItemOut; mousedown:coreListItemDown;mouseup:coreListItemUp;click:coreListItemClick;"
>{{$.name}}</div>
</div>
<div class="tl_coreListAppContent">
{{each $.processList}}
<div class="tl_coreItemArea">
<div class="tl_coreItem"
data-o2-events="mouseover:coreItemOver;mouseout:coreItemOut; mousedown:coreItemDown;mouseup:coreItemUp;click:coreItemClick;">
{{$.name}}
</div>
</div>
{{end each}}
</div>
</div>
</div>
{{end each}}
</div>
\ No newline at end of file
<div class="tl_title">
<div style="float:right;">
<!-- mouseover:iconOver;mouseout:iconOut;-->
<div class="tl_titleAction mainColor_color" data-o2-events="click:closeSelectModule;"><icon class="o2icon-close"/></div>
<!-- data-o2-events="mouseover:inputOver_searchArea;mouseout:inputOut_searchArea"-->
<div class="tl_core_searchArea mainColor_border" style="margin-bottom: 0!important;">
<input class="tl_core_search" data-o2-element="searchCoreInput" placeholder="{{$.lp.searchCorePlacholder}}" data-o2-events="keydown:searchCoreKeydown"/>
<i class="tl_core_coreButton o2icon-search1" data-o2-events="click:search;mouseover:iconOver_searchButton;mouseout:iconOut_searchButton"></i>
</div>
</div>
<div class="breadcrumb-tab">
<span>{{$.lp.location}}</span>
<a data-o2-events="click:gotoMainPage">{{$.lp.mainPage}}</a>
<span>></span>
<span>{{$.lp.index}}</span>
<span>></span>
<span class="mainColor_color">{{$.lp.selectModule}}</span>
</div>
<!-- <div class="tl_titleText">{{$.lp.selectModule}}</div>-->
</div>
<div class="tl_contentWrap" data-o2-element="tl_contentWrap">
<div class="tl_tabTitles mainColor_border" data-o2-element="tl_tabTitles">
<div class="tl_tabTitle" data-o2-tab-content="tl_workTabListNode">{{$.lp.processManager}}</div>
<div class="tl_tabTitle" data-o2-tab-content="tl_docTabListNode">{{$.lp.cmsManager}}</div>
</div>
<div class="tl_listNode" data-o2-element="tl_workTabListNode"></div>
<div class="tl_listNode" style="display: none;" data-o2-element="tl_docTabListNode"></div>
</div>
\ No newline at end of file
MWF.xApplication.ftsearch.ElModule = new Class({
Implements: [Events, Options],
options:{
id: ""
},
initialize: function(node, options, app, data){
this.setOptions(options);
this.container = $(node);
this.data = data;
this.app = app;
this.load();
},
load: function(){
this.container.appendHTML(this._createElementHtml());
this.node = this.container.getFirst();
this.node.addClass("o2_vue");
if (!this.vm) this._loadVue(
this._mountVueApp.bind(this)
);
},
_loadVue: function(callback){
if (!window.Vue){
var vue = (o2.session.isDebugger) ? "vue_develop" : "vue";
o2.loadAll({"css": "../o2_lib/vue/element/index.css", "js": [vue, "elementui"]}, { "sequence": true }, callback);
}else{
if (callback) callback();
}
},
_mountVueApp: function(){
if (!this.vueApp) this.vueApp = this._createVueExtend();
this.vm = new Vue(this.vueApp);
this.vm.$mount(this.node);
},
_createVueExtend: function(){
var _self = this;
var app = {
data: this._createVueData(),
mounted: function(){
_self._afterMounted(this.$el);
}
};
return app;
},
_createElementHtml: function(){
},
_createVueData: function(){
},
_afterMounted: function(el){
this.node = el;
// this.node.set({
// "id": this.json.id
// });
// this._loadVueCss();
this.fireEvent("postLoad");
this.fireEvent("load");
},
// _loadVueCss: function(){
// if (this.styleNode){
// this.node.removeClass(this.styleNode.get("id"));
// }
// if (this.json.vueCss && this.json.vueCss.code){
// this.styleNode = this.node.getParent().loadCssText(this.json.vueCss.code, {"notInject": true});
// this.styleNode.inject(this.node.getParent(), "before");
// }
// },
});
MWF.xApplication.ftsearch.Input = new Class({
Extends: MWF.xApplication.ftsearch.ElModule,
options: {
value: "",
id: ""
},
_createVueData: function(){
this.json = {
data: this.data || this.options.value,
readonly: false,
disabled: false,
clearable: true,
editable: true,
maxlength: "",
minlength: "",
showWordLimit: false,
showPassword: false,
size: "small",
prefixIcon: "",
suffixIcon: "",
rows: 2,
autosize: false,
resize: "none",
inputType: "text",
description: "",
click: function(){
this.fireEvent("change", [this.json.data]);
}.bind(this),
change: function () {
// debugger;
this.fireEvent("change", [this.json.data]);
}.bind(this),
focus: function () {
},
blur: function () {
},
input: function () {
},
clear: function () {
// debugger;
this.fireEvent("change", [this.json.data]);
}.bind(this)
};
// this.json[this.options.id] = this.data;
return this.json;
},
_createElementHtml: function() {
var html = "<div>";
html += "<el-input";
html += " v-model=\"data\"";
html += " :maxlength=\"maxlength\"";
html += " :minlength=\"minlength\"";
html += " :show-word-limit=\"showWordLimit\"";
html += " :show-password=\"showPassword\"";
html += " :disabled=\"disabled\"";
html += " :size=\"size\"";
html += " :prefix-icon=\"prefixIcon\"";
html += " :suffix-icon=\"suffixIcon\"";
html += " :rows=\"rows\"";
html += " :autosize=\"autosize\"";
html += " :readonly=\"readonly\"";
html += " :resize=\"resize\"";
html += " :clearable=\"clearable\"";
html += " :type=\"inputType\"";
html += " :placeholder=\"description\"";
html += " @change=\"change\"";
html += " @focus=\"focus\"";
html += " @blur=\"blur\"";
html += " @input=\"input\"";
html += " @clear=\"clear\"";
// this.options.elEvents.forEach(function(k){
// html += " @"+k+"=\"$loadElEvent_"+k.camelCase()+"\"";
// });
// if (this.json.elProperties){
// Object.keys(this.json.elProperties).forEach(function(k){
// if (this.json.elProperties[k]) html += " "+k+"=\""+this.json.elProperties[k]+"\"";
// }, this);
// }
//
// if (this.json.elStyles) html += " :style=\"elStyles\"";
html += ">";
// html += "<el-button slot=\"append\">"+this.app.lp.ok+"</el-button>"
// if (this.json.vueSlot) html += this.json.vueSlot;
html += "</el-input>";
html += "</div>";
return html;
}
});
MWF.xApplication.ftsearch.DatePicker = new Class({
Extends: MWF.xApplication.ftsearch.ElModule,
options: {
start: "",
end: "",
id: ""
},
_createVueData: function(){
if(this.options.start)this.startDate = new Date(this.options.start);
if(this.options.end)this.endDate = new Date(this.options.end);
this.json = {
data: this.data || [this.options.start, this.options.end],
isReadonly: false,
selectType: "datetimerange",
disabled: false,
clearable: true,
editable: true,
size: "small",
prefixIcon: "",
rangeSeparator: this.app.lp.rangeSeparator,
startPlaceholder: this.app.lp.startPlaceholder,
endPlaceholder: this.app.lp.endPlaceholder,
description: "",
arrowControl: true,
format: "yyyy-MM-dd HH:mm:ss",
pickerOptions: {
firstDayOfWeek: 1,
disabledDate: function(date){
if( this.startDate && date < this.startDate )return true;
if( this.endDate && date > this.endDate )return true;
return false;
}.bind(this)
},
change: function () {
this.fireEvent("change", [this.json.data]);
}.bind(this),
focus: function () {
},
blur: function () {
}
};
// this.json[this.options.id] = this.data;
return this.json;
},
_createElementHtml: function() {
var html = "<el-date-picker";
html += " v-model=\"data\"";
html += " :type=\"selectType\"";
html += " :readonly=\"isReadonly\"";
html += " :disabled=\"disabled\"";
html += " :editable=\"editable\"";
html += " :clearable=\"clearable\"";
html += " :size=\"size\"";
html += " :prefix-icon=\"prefixIcon\"";
html += " :range-separator=\"rangeSeparator\"";
html += " :start-placeholder=\"startPlaceholder\"";
html += " :end-placeholder=\"endPlaceholder\"";
html += " :value-format=\"format\"";
html += " :format=\"format\"";
html += " :picker-options=\"pickerOptions\"";
html += " :arrow-control=\"arrowControl\"";
html += " @change=\"change\"";
html += " @focus=\"focus\"";
html += " @blur=\"blur\"";
html += ">";
html += "</el-date-picker>";
return html;
}
});
MWF.xApplication.ftsearch.NumberRange = new Class({
Extends: MWF.xApplication.ftsearch.ElModule,
options: {
max: "100",
min: "1",
id: ""
},
checkNumber: function(num, type){
debugger;
var str = num;
var len1 = str.substr(0, 1);
var len2 = str.substr(1, 1);
//如果第一位是0,第二位不是点,就用数字把点替换掉
if (str.length > 1 && len1 === 0 && len2 !== ".") str = str.substr(1, 1);
//第一位不能是.
if (len1 === ".") str = "";
//限制只能输入一个小数点
if (str.indexOf(".") !== -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") !== -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//正则替换
str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
return str
},
_createVueData: function(){
this.data = {};
this.json = {
minData: this.options.min,
maxData: this.options.max,
min: {
clearable: false,
// click: function(){
// this.fireEvent("change", [this.json.data]);
// }.bind(this),
change: function () {
if( this.json.minData ){
var minData = (this.json.minData || 0).toFloat();
if( this.json.maxData ){
var maxData = (this.json.maxData || 0).toFloat();
if( minData > maxData ){
this.app.notice( this.app.lp.minGreatThanMaxError, "info", this.container);
this.json.maxData = this.json.minData;
}
}
if( minData < this.options.min.toFloat() ){
this.app.notice( this.app.lp.tooMinError, "info", this.container);
this.json.minData = this.options.min.toString();
return;
}
if( minData > this.options.max.toFloat() ){
this.app.notice( this.app.lp.tooMaxError, "info", this.container);
this.json.minData = this.options.max.toString();
return;
}
}
this.change();
}.bind(this),
focus: function () {},
blur: function () {},
oninput: function ( num ) {
return this.checkNumber(num, "min")
}.bind(this),
clear: function () {
this.change();
}.bind(this)
},
max: {
clearable: false,
// click: function(){
// this.fireEvent("change", [this.json.data]);
// }.bind(this),
change: function () {
if( this.json.maxData ){
var maxData = (this.json.maxData || 0).toFloat();
if( this.json.minData ){
var minData = (this.json.minData || 0).toFloat();
if( minData > maxData ){
this.app.notice( this.app.lp.minGreatThanMaxError, "info", this.container);
this.json.minData = this.json.maxData;
}
}
if( maxData < this.options.min.toFloat() ){
this.app.notice(this.app.lp.tooMinError, "info", this.container);
this.json.maxData = this.options.min.toString();
return;
}
if( maxData > this.options.max.toFloat() ){
this.app.notice(this.app.lp.tooMaxError, "info", this.container);
this.json.maxData = this.options.max.toString();
return;
}
}
this.change();
}.bind(this),
focus: function () {},
blur: function () {},
oninput: function ( num ) {
return this.checkNumber(num, "max")
}.bind(this),
clear: function () {
this.change();
}.bind(this)
}
};
// this.json[this.options.id] = this.data;
return this.json;
},
change: function(){
debugger;
var minData = this.json.minData;
if( !minData )minData = this.options.min;
var maxData = this.json.maxData;
if( !maxData )maxData = this.options.max;
this.fireEvent("change", [[minData.toFloat(), maxData.toFloat()]]);
},
_createElementHtml: function() {
var html = "<div>";
html += "<span style='color:#999;padding-right: 5px;'>"+this.app.lp.min+":"+this.options.min+"</span>";
html += "<el-input style=\"width:200px;\"";
html += " v-model=\"minData\"";
html += " size=small";
html += " :clearable=\"min.clearable\"";
html += " type=text";
html += " placeholder="+this.app.lp.fromValue;
html += " @change=\"min.change\"";
html += " @focus=\"min.focus\"";
html += " @blur=\"min.blur\"";
html += " @input=\"min.input\"";
html += " @clear=\"min.clear\"";
html += "@keyup.native=\"minData = min.oninput(minData)\"";
html += ">";
html += "</el-input>";
html += "<span style='padding: 0px 5px;'>"+this.app.lp.to+"</span>";
html += "<el-input style=\"width:200px;\"";
html += " v-model=\"maxData\"";
html += " size=small";
html += " :clearable=\"max.clearable\"";
html += " type=text";
html += " placeholder="+this.app.lp.toValue;
html += " @change=\"max.change\"";
html += " @focus=\"max.focus\"";
html += " @blur=\"max.blur\"";
html += " @input=\"max.input\"";
html += " @clear=\"max.clear\"";
html += "@keyup.native=\"maxData = max.oninput(maxData)\"";
html += ">";
html += "</el-input>";
html += "<span style='color:#999;padding-left: 5px;'>"+this.app.lp.max+":"+this.options.max+"</span>";
html += "</div>";
return html;
}
})
// MWF.xApplication.ftsearch.Slider = new Class({
// Extends: MWF.xApplication.ftsearch.ElModule,
// options: {
// max: "100",
// min: "1",
// id: ""
// },
// _createVueData: function(){
// this.json = {
// data: this.data || [this.options.min, this.options.max],
// isReadonly: false,
// clearable: true,
// editable: true,
// max: this.options.max.toFloat(),
// min: this.options.min.toFloat(),
// step: 1,
// showStops: false,
// range: true,
// vertical: false,
// height: "100px",
// showInput: false,
// showInputControls: false,
// inputSize: "small",
// showTooltip: true,
// tooltipClass: "",
// disabled: false,
// marks: {
// },
// click: function(){
// this.fireEvent("change", [this.json.data]);
// }.bind(this),
// change: function () {
// this.fireEvent("change", [this.json.data]);
// }.bind(this),
// input: function () {
// }
// };
// var half = (this.options.max.toFloat() - this.options.min.toFloat()) / 2;
// this.json.marks[this.options.min] = this.options.min.toString();
// this.json.marks[half] = half.toString();
// this.json.marks[this.options.max] = this.options.max.toString();
// return this.json;
// },
// _createElementHtml: function() {
// var html = "<div style='height: 50px; width:calc( 100% - 20px )'>";
// html += "<el-slider";
// html += " v-model=\"data\"";
// html += " :max=\"max\"";
// html += " :min=\"min\"";
// html += " :step=\"step\"";
// html += " :show-stops=\"showStops\"";
// html += " :range=\"range\"";
// html += " :vertical=\"vertical\"";
// html += " :height=\"height\"";
// html += " :show-input=\"showInput\"";
// html += " :show-input-controls=\"showInputControls\"";
// html += " :input-size=\"inputSize\"";
// html += " :show-tooltip=\"showTooltip\"";
// html += " :tooltip-class=\"tooltipClass\"";
// html += " :disabled=\"disabled\"";
// html += " :marks=\"marks\"";
// html += " @change=\"change\"";
// html += " @focus=\"input\"";
// html += ">";
// html += "</el-slider>";
// html += "</div>";
// return html;
// }
// })
\ No newline at end of file
o2.require("o2.widget.Paging", null, false);
MWF.xApplication.process.Application.IndexView = new Class({
o2.requireApp("ftsearch", "Common", null, false);
MWF.xApplication.ftsearch.IndexView = new Class({
Extends: MWF.widget.Common,
Implements: [Options, Events],
......@@ -10,13 +11,11 @@ MWF.xApplication.process.Application.IndexView = new Class({
initialize: function(node, app, options, tabData){
this.setOptions(options);
this.path = "../x_component_process_Application/$IndexView/";
this.path = "../x_component_ftsearch/$IndexView/";
this.app = app;
this.container = $(node);
this.tabData = tabData;
if( !this.tabData.type )this.tabData.type = "application";
if( !this.tabData.category )this.tabData.category = "workCompleted";
this.facetOrderList = ["category","applicationName", "processName","appName","categoryName"];
this.load();
},
......@@ -32,10 +31,6 @@ MWF.xApplication.process.Application.IndexView = new Class({
}
},
load: function(){
this.stylePath = this.path + this.options.style + "/style.css";
this.container.loadCss(this.stylePath, this._load.bind(this));
},
_load: function(){
this.pageSize = 10;
this.currentKey = "";
......@@ -48,7 +43,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
this.execludedFaceList = ["creatorUnitLevelName"];
var url = this.path+this.options.style+"/view/view.html";
var url = this.path+this.options.style+"/view.html";
this.container.loadHtml(url, {"bind": {
"lp": this.app.lp,
"tabData": this.tabData
......@@ -297,7 +292,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
return field;
}.bind(this));
this.docListNode.loadHtml(this.path+this.options.style+"/view/docList.html",
this.docListNode.loadHtml(this.path+this.options.style+"/docList.html",
{
"bind": {"lp": this.app.lp, "data": json.data.documentList, "fieldList":fieldList},
"module": this,
......@@ -339,7 +334,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
this.selectedFieldList = json.data.fixedFieldList;
this.fieldSelectedArea.empty();
this.fieldSelectedArea.loadHtml(this.path+this.options.style+"/view/fieldSelect.html",
this.fieldSelectedArea.loadHtml(this.path+this.options.style+"/fieldSelect.html",
{
"bind": {
"lp": this.app.lp,
......@@ -441,7 +436,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
}
}.bind(this));
this.conditionArea.empty();
this.conditionArea.loadHtml(this.path+this.options.style+"/view/condition.html",
this.conditionArea.loadHtml(this.path+this.options.style+"/condition.html",
{
"bind": {
"lp": this.app.lp,
......@@ -481,7 +476,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
}
});
this.defaultConditionArea.empty();
this.defaultConditionArea.loadHtml(this.path+this.options.style+"/view/conditionItem_default.html",
this.defaultConditionArea.loadHtml(this.path+this.options.style+"/conditionItem_default.html",
{
"bind": {
"lp": this.app.lp,
......@@ -508,7 +503,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
}.bind(this);
switch (row.fieldType) {
case "string":
new MWF.xApplication.process.Application.Input(e.target, {
new MWF.xApplication.ftsearch.Input(e.target, {
id: row.name,
onChange: function (data) {
// this.changeCustomConditionItemString(row, data);
......@@ -517,7 +512,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
}, this.app);
break;
case "date":
new MWF.xApplication.process.Application.DatePicker(e.target, {
new MWF.xApplication.ftsearch.DatePicker(e.target, {
start: row.min,
end: row.max,
id: row.name,
......@@ -528,7 +523,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
}, this.app);
break;
case "number":
new MWF.xApplication.process.Application.NumberRange(e.target, {
new MWF.xApplication.ftsearch.NumberRange(e.target, {
min: row.min,
max: row.max,
id: row.name,
......@@ -611,7 +606,7 @@ MWF.xApplication.process.Application.IndexView = new Class({
loadSelectedCondition: function(){
this.conditionSelectedArea.empty();
this.conditionSelectedArea.loadHtml(this.path+this.options.style+"/view/conditionSelected.html",
this.conditionSelectedArea.loadHtml(this.path+this.options.style+"/conditionSelected.html",
{
"bind": {"lp": this.app.lp, "data": this.selectedConditionList},
"module": this,
......@@ -792,403 +787,4 @@ MWF.xApplication.process.Application.IndexView = new Class({
if(target)target.removeClass('mainColor_color');
}
});
MWF.xApplication.process.Application.ElModule = new Class({
Implements: [Events, Options],
options:{
id: ""
},
initialize: function(node, options, app, data){
this.setOptions(options);
this.container = $(node);
this.data = data;
this.app = app;
this.load();
},
load: function(){
this.container.appendHTML(this._createElementHtml());
this.node = this.container.getFirst();
this.node.addClass("o2_vue");
if (!this.vm) this._loadVue(
this._mountVueApp.bind(this)
);
},
_loadVue: function(callback){
if (!window.Vue){
var vue = (o2.session.isDebugger) ? "vue_develop" : "vue";
o2.loadAll({"css": "../o2_lib/vue/element/index.css", "js": [vue, "elementui"]}, { "sequence": true }, callback);
}else{
if (callback) callback();
}
},
_mountVueApp: function(){
if (!this.vueApp) this.vueApp = this._createVueExtend();
this.vm = new Vue(this.vueApp);
this.vm.$mount(this.node);
},
_createVueExtend: function(){
var _self = this;
var app = {
data: this._createVueData(),
mounted: function(){
_self._afterMounted(this.$el);
}
};
return app;
},
_createElementHtml: function(){
},
_createVueData: function(){
},
_afterMounted: function(el){
this.node = el;
// this.node.set({
// "id": this.json.id
// });
// this._loadVueCss();
this.fireEvent("postLoad");
this.fireEvent("load");
},
// _loadVueCss: function(){
// if (this.styleNode){
// this.node.removeClass(this.styleNode.get("id"));
// }
// if (this.json.vueCss && this.json.vueCss.code){
// this.styleNode = this.node.getParent().loadCssText(this.json.vueCss.code, {"notInject": true});
// this.styleNode.inject(this.node.getParent(), "before");
// }
// },
});
MWF.xApplication.process.Application.Input = new Class({
Extends: MWF.xApplication.process.Application.ElModule,
options: {
value: "",
id: ""
},
_createVueData: function(){
this.json = {
data: this.data || this.options.value,
readonly: false,
disabled: false,
clearable: true,
editable: true,
maxlength: "",
minlength: "",
showWordLimit: false,
showPassword: false,
size: "small",
prefixIcon: "",
suffixIcon: "",
rows: 2,
autosize: false,
resize: "none",
inputType: "text",
description: "",
click: function(){
this.fireEvent("change", [this.json.data]);
}.bind(this),
change: function () {
// debugger;
this.fireEvent("change", [this.json.data]);
}.bind(this),
focus: function () {
},
blur: function () {
},
input: function () {
},
clear: function () {
// debugger;
this.fireEvent("change", [this.json.data]);
}.bind(this)
};
// this.json[this.options.id] = this.data;
return this.json;
},
_createElementHtml: function() {
var html = "<div>";
html += "<el-input";
html += " v-model=\"data\"";
html += " :maxlength=\"maxlength\"";
html += " :minlength=\"minlength\"";
html += " :show-word-limit=\"showWordLimit\"";
html += " :show-password=\"showPassword\"";
html += " :disabled=\"disabled\"";
html += " :size=\"size\"";
html += " :prefix-icon=\"prefixIcon\"";
html += " :suffix-icon=\"suffixIcon\"";
html += " :rows=\"rows\"";
html += " :autosize=\"autosize\"";
html += " :readonly=\"readonly\"";
html += " :resize=\"resize\"";
html += " :clearable=\"clearable\"";
html += " :type=\"inputType\"";
html += " :placeholder=\"description\"";
html += " @change=\"change\"";
html += " @focus=\"focus\"";
html += " @blur=\"blur\"";
html += " @input=\"input\"";
html += " @clear=\"clear\"";
// this.options.elEvents.forEach(function(k){
// html += " @"+k+"=\"$loadElEvent_"+k.camelCase()+"\"";
// });
// if (this.json.elProperties){
// Object.keys(this.json.elProperties).forEach(function(k){
// if (this.json.elProperties[k]) html += " "+k+"=\""+this.json.elProperties[k]+"\"";
// }, this);
// }
//
// if (this.json.elStyles) html += " :style=\"elStyles\"";
html += ">";
// html += "<el-button slot=\"append\">"+this.app.lp.ok+"</el-button>"
// if (this.json.vueSlot) html += this.json.vueSlot;
html += "</el-input>";
html += "</div>";
return html;
}
});
MWF.xApplication.process.Application.DatePicker = new Class({
Extends: MWF.xApplication.process.Application.ElModule,
options: {
start: "",
end: "",
id: ""
},
_createVueData: function(){
if(this.options.start)this.startDate = new Date(this.options.start);
if(this.options.end)this.endDate = new Date(this.options.end);
this.json = {
data: this.data || [this.options.start, this.options.end],
isReadonly: false,
selectType: "datetimerange",
disabled: false,
clearable: true,
editable: true,
size: "small",
prefixIcon: "",
rangeSeparator: this.app.lp.rangeSeparator,
startPlaceholder: this.app.lp.startPlaceholder,
endPlaceholder: this.app.lp.endPlaceholder,
description: "",
arrowControl: true,
format: "yyyy-MM-dd HH:mm:ss",
pickerOptions: {
firstDayOfWeek: 1,
disabledDate: function(date){
if( this.startDate && date < this.startDate )return true;
if( this.endDate && date > this.endDate )return true;
return false;
}.bind(this)
},
change: function () {
this.fireEvent("change", [this.json.data]);
}.bind(this),
focus: function () {
},
blur: function () {
}
};
// this.json[this.options.id] = this.data;
return this.json;
},
_createElementHtml: function() {
var html = "<el-date-picker";
html += " v-model=\"data\"";
html += " :type=\"selectType\"";
html += " :readonly=\"isReadonly\"";
html += " :disabled=\"disabled\"";
html += " :editable=\"editable\"";
html += " :clearable=\"clearable\"";
html += " :size=\"size\"";
html += " :prefix-icon=\"prefixIcon\"";
html += " :range-separator=\"rangeSeparator\"";
html += " :start-placeholder=\"startPlaceholder\"";
html += " :end-placeholder=\"endPlaceholder\"";
html += " :value-format=\"format\"";
html += " :format=\"format\"";
html += " :picker-options=\"pickerOptions\"";
html += " :arrow-control=\"arrowControl\"";
html += " @change=\"change\"";
html += " @focus=\"focus\"";
html += " @blur=\"blur\"";
html += ">";
html += "</el-date-picker>";
return html;
}
});
MWF.xApplication.process.Application.NumberRange = new Class({
Extends: MWF.xApplication.process.Application.ElModule,
options: {
max: "100",
min: "1",
id: ""
},
checkNumber: function(num, type){
debugger;
var str = num;
var len1 = str.substr(0, 1);
var len2 = str.substr(1, 1);
//如果第一位是0,第二位不是点,就用数字把点替换掉
if (str.length > 1 && len1 === 0 && len2 !== ".") str = str.substr(1, 1);
//第一位不能是.
if (len1 === ".") str = "";
//限制只能输入一个小数点
if (str.indexOf(".") !== -1) {
var str_ = str.substr(str.indexOf(".") + 1);
if (str_.indexOf(".") !== -1) {
str = str.substr(0, str.indexOf(".") + str_.indexOf(".") + 1);
}
}
//正则替换
str = str.replace(/[^\d^\.]+/g, '') // 保留数字和小数点
return str
},
_createVueData: function(){
this.data = {};
this.json = {
minData: this.options.min,
maxData: this.options.max,
min: {
clearable: false,
// click: function(){
// this.fireEvent("change", [this.json.data]);
// }.bind(this),
change: function () {
if( this.json.minData ){
var minData = (this.json.minData || 0).toFloat();
if( this.json.maxData ){
var maxData = (this.json.maxData || 0).toFloat();
if( minData > maxData ){
this.app.notice( this.app.lp.minGreatThanMaxError, "info", this.container);
this.json.maxData = this.json.minData;
}
}
if( minData < this.options.min.toFloat() ){
this.app.notice( this.app.lp.tooMinError, "info", this.container);
this.json.minData = this.options.min.toString();
return;
}
if( minData > this.options.max.toFloat() ){
this.app.notice( this.app.lp.tooMaxError, "info", this.container);
this.json.minData = this.options.max.toString();
return;
}
}
this.change();
}.bind(this),
focus: function () {},
blur: function () {},
oninput: function ( num ) {
return this.checkNumber(num, "min")
}.bind(this),
clear: function () {
this.change();
}.bind(this)
},
max: {
clearable: false,
// click: function(){
// this.fireEvent("change", [this.json.data]);
// }.bind(this),
change: function () {
if( this.json.maxData ){
var maxData = (this.json.maxData || 0).toFloat();
if( this.json.minData ){
var minData = (this.json.minData || 0).toFloat();
if( minData > maxData ){
this.app.notice( this.app.lp.minGreatThanMaxError, "info", this.container);
this.json.minData = this.json.maxData;
}
}
if( maxData < this.options.min.toFloat() ){
this.app.notice(this.app.lp.tooMinError, "info", this.container);
this.json.maxData = this.options.min.toString();
return;
}
if( maxData > this.options.max.toFloat() ){
this.app.notice(this.app.lp.tooMaxError, "info", this.container);
this.json.maxData = this.options.max.toString();
return;
}
}
this.change();
}.bind(this),
focus: function () {},
blur: function () {},
oninput: function ( num ) {
return this.checkNumber(num, "max")
}.bind(this),
clear: function () {
this.change();
}.bind(this)
}
};
// this.json[this.options.id] = this.data;
return this.json;
},
change: function(){
debugger;
var minData = this.json.minData;
if( !minData )minData = this.options.min;
var maxData = this.json.maxData;
if( !maxData )maxData = this.options.max;
this.fireEvent("change", [[minData.toFloat(), maxData.toFloat()]]);
},
_createElementHtml: function() {
var html = "<div>";
html += "<span style='color:#999;padding-right: 5px;'>"+this.app.lp.min+":"+this.options.min+"</span>";
html += "<el-input style=\"width:200px;\"";
html += " v-model=\"minData\"";
html += " size=small";
html += " :clearable=\"min.clearable\"";
html += " type=text";
html += " placeholder="+this.app.lp.fromValue;
html += " @change=\"min.change\"";
html += " @focus=\"min.focus\"";
html += " @blur=\"min.blur\"";
html += " @input=\"min.input\"";
html += " @clear=\"min.clear\"";
html += "@keyup.native=\"minData = min.oninput(minData)\"";
html += ">";
html += "</el-input>";
html += "<span style='padding: 0px 5px;'>"+this.app.lp.to+"</span>";
html += "<el-input style=\"width:200px;\"";
html += " v-model=\"maxData\"";
html += " size=small";
html += " :clearable=\"max.clearable\"";
html += " type=text";
html += " placeholder="+this.app.lp.toValue;
html += " @change=\"max.change\"";
html += " @focus=\"max.focus\"";
html += " @blur=\"max.blur\"";
html += " @input=\"max.input\"";
html += " @clear=\"max.clear\"";
html += "@keyup.native=\"maxData = max.oninput(maxData)\"";
html += ">";
html += "</el-input>";
html += "<span style='color:#999;padding-left: 5px;'>"+this.app.lp.max+":"+this.options.max+"</span>";
html += "</div>";
return html;
}
})
\ No newline at end of file
});
\ No newline at end of file
MWF.xApplication.ftsearch.options.multitask = false;
MWF.xApplication.ftsearch.Main = new Class({
Extends: MWF.xApplication.Common.Main,
Implements: [Options, Events],
options: {
"style1": "default",
"style": "default",
"name": "ftsearch",
"mvcStyle": "style.css",
"icon": "icon.png",
"title": MWF.xApplication.ftsearch.LP.title,
"query":""
},
onQueryLoad: function(){
this.lp = MWF.xApplication.ftsearch.LP;
},
loadApplication: function(callback, noLoadView){
var url = this.path+this.options.style+"/main.html";
this.content.loadHtml(url, {"bind": {"lp": this.lp}, "module": this}, function(){
// this.loadMenu();
if( !noLoadView ){
var view, query, tab;
if( this.status && this.status.view ){
view = this.status.view;
query = this.status.query;
tab = this.status.tab;
}else{
view = this.options.view || "";
tab = this.options.tab;
query = this.options.query || "";
if( query && !view )view = "ftsearch";
}
switch (view) {
case "ftsearch":
this.openFTSearchView( query );
break;
case "index":
this.openIndexView( tab );
break
}
this.status = null;
}
}.bind(this));
},
// loadMenu: function(){
// this.getMenuJson( function (json) {
// this.menuArea.loadHtml(this.path+this.options.style+"/menu.html", {"bind": {"lp": this.lp, "data": json}, "module": this}, function(){
// this.menuArea.getElement(".menuItem").click();
// // this[json[0].action]();
// }.bind(this));
// }.bind(this));
// },
getEventTarget: function(e, className) {
var parentItem = e.target;
if( parentItem.hasClass(className) )return parentItem;
while ( parentItem && !parentItem.hasClass(className) ){
parentItem = parentItem.getParent();
if( parentItem.hasClass(className) )return parentItem;
}
},
switchMenuItem: function(e){
var childNode = this.getEventTarget(e, "menuItem").getNext();
if( childNode.getStyle("display") === "none" ){
childNode.show();
}else{
childNode.hide();
}
},
// menuItemOver: function(e){
// this.getEventTarget(e, "menuItem").addClass('menuItem_over');
// },
// menuItemOut: function(e){
// this.getEventTarget(e, "menuItem").removeClass('menuItem_over');
// },
// selectMenuItem: function(action, e){
// if( this.currentMenuItem ){
// this.currentMenuItem.removeClass('menuItem_current');
// this.currentMenuItem.removeClass('mainColor_color');
// }
// var menuItem = this.getEventTarget(e, "menuItem")
// menuItem.addClass('menuItem_current');
// menuItem.addClass('mainColor_color');
// this.currentMenuItem = menuItem;
// if( this[action] )this[action]();
// },
// openSearchView: function(){
// if(this.view)this.view.destroy();
// o2.requireApp("ftsearch", "SearchView", function () {
// this.view = new MWF.xApplication.ftsearch.SearchView(this.contentArea, this, {});
// }.bind(this), false);
//
// },
searchKeydown: function(e){
if( e.keyCode === 13 ){
var query = this.searchInput.get("value");
if(query)this.openFTSearchView( query );
}
},
searchClick: function(e){
var query = this.searchInput.get("value");
if(query)this.openFTSearchView( query );
},
doSearch: function(query){
this.closeSelectModule();
this.openFTSearchView(query);
},
gotoMainPage: function(){
if( this.view && this.view.destroy )this.view.destroy();
this.content.empty();
this.loadApplication( null,true );
},
openFTSearchView: function( query ){
if( this.view && this.view.destroy )this.view.destroy();
this.contentArea.empty();
o2.requireApp("ftsearch", "FTSearchView", function () {
this.view = new MWF.xApplication.ftsearch.FTSearchView(this.contentArea, this, {
query: query
});
}.bind(this), false);
},
openIndexView: function( data ){
if( this.view && this.view.destroy )this.view.destroy();
this.contentArea.empty();
o2.requireApp("ftsearch", "IndexView", function () {
this.view = new MWF.xApplication.ftsearch.IndexView(this.contentArea, this, {}, data);
}.bind(this), false);
},
iconOver: function(e){
e.target.addClass('mainColor_color');
},
iconOut: function(e){
e.target.removeClass('mainColor_color');
},
inputOver: function(e){
this.getEventTarget(e, "main_inputArea").addClass('mainColor_border');
},
inputOut: function(e){
this.getEventTarget(e, "main_inputArea").removeClass('mainColor_border');
},
iconOver_searchButton: function(e){
e.target.addClass('mainColor_color');
},
iconOut_searchButton: function(e){
e.target.removeClass('mainColor_color');
},
inputOver_searchArea: function(e){
this.getEventTarget(e, "tl_core_searchArea").addClass('mainColor_border');
},
inputOut_searchArea: function(e){
this.getEventTarget(e, "tl_core_searchArea").removeClass('mainColor_border');
},
closeSelectModule: function(e){
// var area = (e && e.target) ? e.target.getParent(".tl_area") : this.content.getParent(".tl_area");
// if(area)area.destroy();
if( this.tabContent ){
this.tabContent.destroy();
}
this.appNode.show();
},
selectTab: function( ev, callback){
var tabContent = new Element("div.tl_area");
this.tabContent = tabContent;
tabContent.loadHtml(this.path+this.options.style+"/tabPage.html",
{
"bind": {"lp": this.lp },
"module": this,
"reload": true
},
function(){
this.loadTabTitles();
this.loadTabList(function () {
if(callback)callback();
});
}.bind(this)
);
this.appNode.hide();
tabContent.inject(this.content);
},
loadTabTitles: function(){
this.tl_tabTitles.getElements(".tl_tabTitle").each(function (tab, i) {
tab.addEvent("click", function (e) {
if( this.currentTab === tab )return;
if( this.currentTab ){
this.currentTab.removeClass("mainColor_bg");
// this.currentTab.removeClass("mainColor_color");
this.currentTab.removeClass("tl_tabTitleCurrent");
}
tab.addClass("mainColor_bg");
// tab.addClass("mainColor_color");
tab.addClass("tl_tabTitleCurrent");
this.currentTab = tab;
if( this.currentTabContent ){
this.currentTabContent.hide();
}
var tabContentName = tab.get("data-o2-tab-content");
this.currentTabContent = this[tabContentName];
if( this.currentTabContent )this.currentTabContent.show();
}.bind(this))
if( i === 0 )tab.click();
}.bind(this));
},
loadTabList: function( callback ){
o2.Actions.load("x_custom_index_assemble_control").IndexAction.get().then(function(json){
this.tabData = json;
this._loadTabList( callback );
}.bind(this));
},
_loadTabList: function(callback){
this.tl_workTabListNode.empty();
this.tl_workTabListNode.loadHtml(this.path+this.options.style+"/tabList_work.html",
{
"bind": {"lp": this.lp, "data": this.tabData.data.applicationList || []},
"module": this,
"reload": true
},
function(){
if(callback)callback();
}.bind(this)
);
this.tl_docTabListNode.empty();
this.tl_docTabListNode.loadHtml(this.path+this.options.style+"/tabList_doc.html",
{
"bind": {"lp": this.lp, "data": this.tabData.data.appInfoList || []},
"module": this,
"reload": true
},
function(){
if(callback)callback();
}.bind(this)
);
},
loadItemIcon: function(application, e){
var node = e.currentTarget;
// Promise.resolve(this.getApplicationIcon(application)).then(function(icon){
// if (icon.icon){
// node.setStyle("background-image", "url(data:image/png;base64,"+icon.icon+")");
// }else{
node.setStyle("background-image", "url("+"../x_component_process_ApplicationExplorer/$Main/default/icon/application.png)");
// }
// });
},
coreListItemOver: function(e){
e.target.addClass("mainColor_bg");
},
coreListItemOut: function(e){
e.target.removeClass("mainColor_bg");
},
coreListItemDown: function(e){
e.target.addClass("mainColor_bg");
},
coreListItemUp: function(e){
e.target.removeClass("mainColor_bg");
},
coreListItemClick: function(e, data){
// var tList = (data.tabList || []).filter(function (tab) {
// return tab.core === data.core;
// });
// if( tList.length ){
this.closeSelectModule(e);
this.openIndexView(data);
// }
},
coreItemOver: function(e){
var node = e.target;
while (node && !node.hasClass("tl_coreItem")){ node = node.getParent();}
if (node){
node.addClass("menuItem_over");
node.addClass("mainColor_bg");
}
},
coreItemOut: function(e){
var node = e.target;
while (node && !node.hasClass("tl_coreItem")){ node = node.getParent();}
if (node){
node.removeClass("menuItem_over");
node.removeClass("mainColor_bg");
}
},
coreItemDown: function(e){
var node = e.target;
while (node && !node.hasClass("tl_coreItem")){ node = node.getParent();}
if (node){
node.removeClass("menuItem_over");
node.addClass("mainColor_bg");
}
},
coreItemUp: function(e){
var node = e.target;
while (node && !node.hasClass("tl_coreItem")){ node = node.getParent();}
if (node){
node.addClass("menuItem_over");
node.removeClass("mainColor_bg");
}
},
coreItemClick: function(e, data){
// var tList = (data.tabList || []).filter(function (tab) {
// return tab.core === data.core;
// });
debugger;
// if( tList.length ){
// this.currentTabObj = tList[0];
this.closeSelectModule(e);
this.openIndexView(data);
// }
},
searchCoreKeydown: function(e){
if( e.keyCode === 13 ){
this.searchCore();
}
},
searchCore: function(){
var value = this.searchCoreInput.get("value");
if( !value ){
this._loadTabList();
}else{
this._loadTabList( function () {
this.tl_contentWrap.getElements(".tl_coreListApp").each(function (el) {
var coreListNode = el.getElement(".tl_coreListAppTitle");
var isCoreListMatch = coreListNode.get("text").contains( value );
var coreItems = el.getElements(".tl_coreItemArea");
var coreItemMatchCount = 0;
coreItems.each(function (ele) {
if( ele.get("text").contains( value ) ){
coreItemMatchCount++;
}
});
if( !isCoreListMatch && coreItemMatchCount === 0 ){
el.hide()
}
})
}.bind(this));
}
},
recordStatus: function () {
return this.view ? this.view.recordStatus() : "";
}
});
MWF.xApplication.ftsearch.LP = {
"title": "Search",
"searchCondition": "Search Condition",
"searchInfor": "Find about {count} of relevant results for you, which takes {time} seconds",
"location": "Your location:",
"processManager": "Process Management",
"cmsManager": "Content Management",
"noData": "No data was found according to the condition",
"noSearchkey": "Please enter a keyword to search",
"noSearchkeyAndCondition": "Please enter a keyword or click filter to search",
"searchPlacholder": "Please enter a keyword and press \"Enter\" to search",
"docTotalInfor": "Find <span class='mainColor_color'>{count}</span> related results for you, it took {time} seconds",
"mainPage": "Home",
"search": "Search",
"index": "Advanced Search",
"ftsearch": "Full Text Search",
"summary": "Summary",
"docTitle": "Title",
// "processName": "Process",
"createTime": "Create Time",
"completedTime": "End Time",
"activityName": "Node",
"creatorUnit": "Department",
"creatorIdentity": "Creator",
// "categoryName": "Category",
"publishTime": "Publish Time",
"processList": "Process",
"creatorUnitList": "Create Organization",
"startTimeMonthList": "Creation month",
"completedTimeMonthList": "Completed Month",
"activityNameList": "Activity",
"workStatusList": "Process Status",
"updateTime": "Update Time",
"application": "Process Application",
"process": "Process",
"appInfo": "Content Management",
"categoryInfo": "Category",
"general": "General",
"column":"Column",
"category": "Category",
"unit": "Organization",
"app": "App",
"createTimeMonth": "Create month",
"updateTimeMonth": "Update Month",
"creatorPerson": "Creator",
"workCompleted": "Work Completed",
"work": "Working in Circulation",
"document": "Content Management Document",
"applicationName": "Process Application",
"processName": "Process Application",
"appName": "Content Management Section",
"categoryName": "Content Management Category",
"selectConditionNote": "Please select",
"fieldSelect": "Column Select",
"more": "more",
"collapse": "Collapse",
"multiSelect": "Multiple Select",
"ok": "OK",
"cancel": "Cancel",
"reset": "Reset",
"export": "Export",
"moreFilter": "More filter criteria",
"collapseFilter": "Collapse filter criteria",
"rangeSeparator": "to",
"startPlaceholder": "Start time",
"endPlaceholder": "End time",
"to": "to",
"min": "minimum value",
"max": "Maximum value",
"fromValue": "Start Value",
"toValue": "End Value",
"minGreatThanMaxError": "Start value cannot be greater than end value",
"tooMinError": "Cannot be less than the minimum value",
"tooMaxError": "Cannot be greater than the maximum value",
"moreFieldSelect": "More column selection",
"collapseFieldSelect": "Collapse column selection",
"firstPage": "First Page",
"lastPage": "Last Page",
"selectModule": "Select Application",
"searching": "You are searching",
"switch": "Switch",
"searchCorePlacholder": "Please enter a keyword and press \"Enter\" to search for an application or process"
};
\ No newline at end of file
MWF.xApplication.ftsearch.LP = {
"title": "搜索",
"searchCondition": "查询条件",
"searchInfor": "为您找到相关结果约{count}个,耗时{time}秒",
"location": "您的位置:",
"processManager": "流程管理",
"cmsManager": "内容管理",
"noData": "根据条件未查询到数据",
"noSearchkey": "请输入关键字搜索",
"noSearchkeyAndCondition": "请输入关键字或点击过滤条件搜索",
"searchPlacholder": "请输入关键字,按“回车”搜索",
"docTotalInfor": "为您找到相关结果<span class='mainColor_color'>{count}</span>个,耗时{time}秒",
"mainPage": "首页",
"search": "搜索",
"index": "高级搜索",
"ftsearch": "全文搜索",
"summary": "摘要",
"docTitle": "标题",
"createTime": "创建时间",
"completedTime": "结束时间",
"activityName": "节点",
"creatorUnit": "部门",
"creatorIdentity": "创建者",
"publishTime": "发布时间",
"processList": "流程",
"creatorUnitList": "创建组织",
"startTimeMonthList": "创建月份",
"completedTimeMonthList": "完成月份",
"activityNameList": "活动",
"workStatusList": "流程状态",
"updateTime": "更新时间",
"application": "流程应用",
"process": "流程",
"appInfo": "内容管理",
"categoryInfo": "分类",
"general": "通用",
"column":"栏目",
"category": "分类",
"unit": "组织",
"app": "应用",
"createTimeMonth": "创建月份",
"updateTimeMonth": "更新月份",
"creatorPerson": "创建者",
"workCompleted": "已完成工作",
"work": "流转中工作",
"document": "内容管理文档",
"applicationName": "流程应用",
"processName": "流程应用",
"appName": "内容管理栏目",
"categoryName": "内容管理分类",
"selectConditionNote": "请选择",
"fieldSelect": "列选择",
"more": "更多",
"collapse": "收起",
"multiSelect": "多选",
"ok": "确定",
"cancel": "取消",
"reset": "重置",
"export": "导出",
"moreFilter": "更多筛选条件",
"collapseFilter": "收起筛选条件",
"rangeSeparator": "",
"startPlaceholder": "开始时间",
"endPlaceholder": "结束时间",
"to": "",
"min": "最小值",
"max": "最大值",
"fromValue": "起始值",
"toValue": "结束值",
"minGreatThanMaxError": "起始值不能大于结束值",
"tooMinError": "不能小于最小值",
"tooMaxError": "不能大于最大值",
"moreFieldSelect": "更多列选择",
"collapseFieldSelect": "收起列选择",
"firstPage": "第一页",
"lastPage": "最后一页",
"selectModule": "选择应用",
"searching": "您正在查询",
"switch": "切换",
"searchCorePlacholder": "请输入关键字,按“回车”搜索应用或流程"
};
......@@ -15,9 +15,6 @@
-moz-osx-font-smoothing: grayscale;
}
.icon-icon__chakan:before {
content: "\e609";
}
.icon-xuanzhong:before {
content: "\e605";
}
......
......@@ -37,10 +37,6 @@
<div class="menuItemCount" data-o2-element="draftCountNode"></div>
<div class="menuItemText">{{$.lp.draft}}</div>
</div>
<div style="padding-left:20px" class="menuItem" data-o2-element="indexMenuNode" data-o2-events="click:openIndexView:index">
<div class="menuItemIcon"><icon class="o2WorkApplication icon-icon__chakan"></icon></div>
<div class="menuItemText">{{$.lp.index}}</div>
</div>
{{if $.acl.isProcessManager}}
<div class="menuDivider"></div>
<div class="menuItem" data-o2-events="">
......
......@@ -104,21 +104,6 @@ MWF.xApplication.process.Application.Main = new Class({
this.countData.draft = json.size;
}.bind(this));
},
openIndexView: function(type,ev,data){
if (this.currentMenu) this.setMenuItemStyleDefault(this.currentMenu);
this.setMenuItemStyleCurrent(this[type+"MenuNode"]);
this.currentMenu = this[type+"MenuNode"];
this._loadIndexViewContent(type);
},
_loadIndexViewContent: function(){
this.mainNode.empty();
o2.requireApp("process.Application", "IndexView", function () {
this.view = new MWF.xApplication.process.Application.IndexView(this.mainNode, this, {}, {
key: "3cdc9048-7a25-4bd2-8d9f-af3d89d1973b"
});
}.bind(this), false);
this.currentList = null;
},
loadList: function(type,ev,data){
if (this.currentMenu) this.setMenuItemStyleDefault(this.currentMenu);
this.setMenuItemStyleCurrent(this[type+"MenuNode"]);
......@@ -274,14 +259,6 @@ MWF.xApplication.process.Application.Main = new Class({
},
recordStatus: function(){
return { "id": this.options.id};
},
getEventTarget: function(e, className) {
var parentItem = e.target;
if( parentItem.hasClass(className) )return parentItem;
while ( parentItem && !parentItem.hasClass(className) ){
parentItem = parentItem.getParent();
if( parentItem.hasClass(className) )return parentItem;
}
}
});
MWF.xApplication.process.Application.List = new Class({
......
......@@ -15,10 +15,10 @@ MWF.xApplication.process.Application.LP = {
"work" : "Working in Circulation",
"workcompleted" : "Work Completed",
"workdelete" : "Work deleted",
"draft" : "Draft",
"dict" : "Data configuration",
"serial" : "Numbering configuration",
"startProcess" : "Start Process",
"index": "Index",
"query": "Search",
"reset": "Reset",
......@@ -99,35 +99,9 @@ MWF.xApplication.process.Application.LP = {
"editAction" : "Maintenance",
"more": "more",
"collapse": "Collapse",
"multiSelect": "Multiple Select",
"export": "Export",
"moreFilter": "More filter criteria",
"collapseFilter": "Collapse filter criteria",
"rangeSeparator": "to",
"startPlaceholder": "Start time",
"endPlaceholder": "End Time",
"to": "to",
"min": "minimum value",
"max": "Maximum value",
"fromValue": "FromValue",
"toValue": "End Value",
"minGreatThanMaxError": "Start value cannot be greater than end value",
"tooMinError": "Cannot be less than the minimum value",
"tooMaxError": "Cannot be greater than the maximum value",
"moreFieldSelect": "More column selection",
"collapseFieldSelect": "Collapse column selection",
"category": "Category",
"createTimeMonth": "Create month",
"updateTimeMonth": "Update Month",
"creatorPerson": "Creator",
"creatorUnit": "Department",
"fieldSelect": "Column Select",
"docTotalInfor": "Find <span class='mainColor_color'>{count}</span> related results for you, which takes {time} seconds"
"firstPage": "First Page",
"lastPage": "Last Page",
};
......@@ -15,10 +15,10 @@ MWF.xApplication.process.Application.LP = {
"work" : "流转中工作",
"workcompleted" : "已完成工作",
"workdelete" : "已删除工作",
"draft" : "草稿",
"dict" : "数据配置",
"serial" : "编号配置",
"startProcess" : "发起流程",
"index": "检索",
"query": "搜索",
"reset": "重置",
......@@ -64,6 +64,7 @@ MWF.xApplication.process.Application.LP = {
"allFile" : "全部文件",
"firstPage": "第一页",
"lastPage": "最后一页",
......@@ -98,35 +99,9 @@ MWF.xApplication.process.Application.LP = {
"editAction" : "维护",
"more": "更多",
"collapse": "收起",
"multiSelect": "多选",
"export": "导出",
"moreFilter": "更多筛选条件",
"collapseFilter": "收起筛选条件",
"rangeSeparator": "",
"startPlaceholder": "开始时间",
"endPlaceholder": "结束时间",
"to": "",
"min": "最小值",
"max": "最大值",
"fromValue": "起始值",
"toValue": "结束值",
"minGreatThanMaxError": "起始值不能大于结束值",
"tooMinError": "不能小于最小值",
"tooMaxError": "不能大于最大值",
"moreFieldSelect": "更多列选择",
"collapseFieldSelect": "收起列选择",
"category": "分类",
"createTimeMonth": "创建月份",
"updateTimeMonth": "更新月份",
"creatorPerson": "创建者",
"creatorUnit": "部门",
"fieldSelect": "列选择",
"docTotalInfor": "为您找到相关结果<span class='mainColor_color'>{count}</span>个,耗时{time}秒"
"firstPage": "第一页",
"lastPage": "最后一页",
};
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册