centaline-data-driven 1.2.12 → 1.2.15
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/centaline/css/common.css +3 -0
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailOFI.vue +0 -1
- package/src/centaline/dynamicDetail/src/dynamicPropertyDetailRET.vue +4 -5
- package/src/centaline/dynamicL/src/dynamicL.vue +6 -1
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +1 -17
- package/src/centaline/dynamicT/src/dynamicT.vue +5 -1
- package/src/centaline/dynamicTree/src/dynamicTreeList.vue +7 -1
- package/src/centaline/loader/src/ctl/Detail.js +19 -12
- package/src/centaline/loader/src/ctl/L.js +17 -2
- package/src/centaline/loader/src/ctl/QuickInputSos.js +127 -0
- package/src/centaline/loader/src/ctl/SearchTable.js +20 -6
- package/src/centaline/loader/src/ctl.js +1 -0
- package/src/centaline/quickInput/src/quickInput.vue +2 -2
- package/src/centaline/quickInputSos/src/quickInput.vue +96 -0
- package/wwwroot/static/centaline/centaline-data-driven.js +3 -3
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
package/package.json
CHANGED
|
@@ -544,17 +544,17 @@
|
|
|
544
544
|
var router = this.model.actionRouters.find((v) => {
|
|
545
545
|
return v.id === field.id;
|
|
546
546
|
});
|
|
547
|
-
if(router==undefined){
|
|
548
|
-
|
|
547
|
+
if(router==undefined && this.model.actionRoutersMoreList){
|
|
548
|
+
router = this.model.actionRoutersMoreList.find((v) => {
|
|
549
549
|
return v.id === field.id;
|
|
550
550
|
});
|
|
551
551
|
}
|
|
552
|
-
if(router==undefined){
|
|
552
|
+
if(router==undefined && this.model.otherTradeActionRouter){
|
|
553
553
|
if(field.id===this.model.otherTradeActionRouter.id){
|
|
554
554
|
router = this.model.otherTradeActionRouter
|
|
555
555
|
}
|
|
556
556
|
}
|
|
557
|
-
if(router==undefined){
|
|
557
|
+
if(router==undefined && this.model.operationRouters){
|
|
558
558
|
router = this.model.operationRouters.find((v) => {
|
|
559
559
|
return v.id === field.id;
|
|
560
560
|
});
|
|
@@ -1114,7 +1114,6 @@
|
|
|
1114
1114
|
margin-right: 10px;
|
|
1115
1115
|
}
|
|
1116
1116
|
.user-name {
|
|
1117
|
-
margin-top: 5px;
|
|
1118
1117
|
display: flex;
|
|
1119
1118
|
}
|
|
1120
1119
|
.text {
|
|
@@ -17,7 +17,12 @@
|
|
|
17
17
|
{{model.label}}
|
|
18
18
|
</div>
|
|
19
19
|
</div>
|
|
20
|
-
<
|
|
20
|
+
<span v-if="model.flagJson">
|
|
21
|
+
<span class="el-tag el-tag--info el-tag--mini" v-for="item in model.labelValue" :key="item" style="box-sizing: border-box;border-color: transparent;margin: 2px 0 2px 6px;">
|
|
22
|
+
<span class="el-select__tags-text">{{item}}</span>
|
|
23
|
+
</span>
|
|
24
|
+
</span>
|
|
25
|
+
<label v-else class="ct-lable">
|
|
21
26
|
{{model.labelValue}}
|
|
22
27
|
</label>
|
|
23
28
|
<span slot="suffix" v-if="model.unitName" class="ct-unitnameLable">{{model.unitName}}</span>
|
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
<thead ref="tableHead">
|
|
29
29
|
<tr class="ct-tr" ref="headTr" v-for="(columns,columnsIndex) in model.columnsArr">
|
|
30
30
|
<th v-if="model.isMulti && columnsIndex === 0" ref="headLeftThs" class="ct-td left-fixation-th checkbox-td" :class="[model.tdClass]">
|
|
31
|
-
<label class="el-checkbox"><span class="el-checkbox__input" :class="
|
|
31
|
+
<label class="el-checkbox"><span class="el-checkbox__input" :class="model.selectAllType">
|
|
32
32
|
<span class="el-checkbox__inner"></span>
|
|
33
33
|
<!-- <input type="checkbox" aria-hidden="false" class="el-checkbox__original" value=""> -->
|
|
34
34
|
<input type="checkbox" @click="selectAll($event)" v-model="model.selectAll" class="el-checkbox__original checkbox-td-1" aria-hidden="false" />
|
|
@@ -164,23 +164,7 @@
|
|
|
164
164
|
}
|
|
165
165
|
},
|
|
166
166
|
computed: {
|
|
167
|
-
headAllCheckClass() {
|
|
168
167
|
|
|
169
|
-
if(this.selectAllType==1)
|
|
170
|
-
{
|
|
171
|
-
return '';
|
|
172
|
-
}
|
|
173
|
-
else if(this.selectAllType==2)
|
|
174
|
-
{
|
|
175
|
-
return 'is-indeterminate';
|
|
176
|
-
}
|
|
177
|
-
else if(this.selectAllType==3)
|
|
178
|
-
{
|
|
179
|
-
return 'is-checked';
|
|
180
|
-
}
|
|
181
|
-
return '';
|
|
182
|
-
},
|
|
183
|
-
|
|
184
168
|
},
|
|
185
169
|
data() {
|
|
186
170
|
return {
|
|
@@ -24,15 +24,19 @@
|
|
|
24
24
|
{{validMessage}}
|
|
25
25
|
</span>
|
|
26
26
|
</transition>
|
|
27
|
-
<
|
|
27
|
+
<ctQuickInputSos v-if="!model.lock && model.paramName" class="ct-flex-div-span" :pn="model.paramName" :action="api" @click="model.value=$event"></ctQuickInputSos>
|
|
28
28
|
</div>
|
|
29
29
|
</div>
|
|
30
30
|
</template>
|
|
31
31
|
<script>
|
|
32
32
|
import dynamicElement from '../../mixins/dynamicElement';
|
|
33
|
+
import ctQuickInputSos from '../../quickInputSos/src/quickInput'
|
|
33
34
|
export default {
|
|
34
35
|
name: 'ct-text',
|
|
35
36
|
mixins: [dynamicElement],
|
|
37
|
+
components: {
|
|
38
|
+
'ctQuickInputSos': ctQuickInputSos,
|
|
39
|
+
},
|
|
36
40
|
props: {
|
|
37
41
|
vmodel: Object
|
|
38
42
|
},
|
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
|
|
9
9
|
<template v-if="pageType=='form'">
|
|
10
10
|
<div style="height: calc(100vh - 120px);">
|
|
11
|
-
<div
|
|
11
|
+
<div class="ct-form" :style="{'width':(width?width+'px':'auto'),'height':(height?height+'px':'auto')}">
|
|
12
12
|
<ct-form :api="formApi" :api-param="apiParam" :width="width" :height="height"></ct-form>
|
|
13
13
|
</div>
|
|
14
14
|
</div>
|
|
@@ -99,4 +99,10 @@
|
|
|
99
99
|
#app-Tree .el-main .ct-table-content {
|
|
100
100
|
padding: 0;
|
|
101
101
|
}
|
|
102
|
+
|
|
103
|
+
#app-Tree .el-main ct-form{border: 1px solid #cfcece;
|
|
104
|
+
-webkit-box-shadow: #cfcece 0px 7px 9px 0px!important;
|
|
105
|
+
border-radius: 6px !important;
|
|
106
|
+
margin-top: 14px;}
|
|
107
|
+
|
|
102
108
|
</style>
|
|
@@ -270,15 +270,17 @@ const Detail = function (source,para ,callBack) {
|
|
|
270
270
|
rtn._operationList=response.content;
|
|
271
271
|
if(rtn._operationList && rtn._operationList.length>0){
|
|
272
272
|
rtn._operationList.forEach((v,i) => {
|
|
273
|
-
if (v.
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
router.
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
273
|
+
if (v.modelRouters) {
|
|
274
|
+
v.modelRouters.forEach((f,i2) => {
|
|
275
|
+
var router = Router(f);
|
|
276
|
+
router.is = "ct-btn";
|
|
277
|
+
router.attrs = { size: "mini" }
|
|
278
|
+
if(router.rightField){
|
|
279
|
+
router.show=v[router.rightField];
|
|
280
|
+
}
|
|
281
|
+
if(router.show)rtn._operationList[i].router=router;
|
|
282
|
+
rtn._operationRouters.push(router);
|
|
283
|
+
});
|
|
282
284
|
}
|
|
283
285
|
});
|
|
284
286
|
}
|
|
@@ -292,20 +294,25 @@ const Detail = function (source,para ,callBack) {
|
|
|
292
294
|
response = response.responseData;
|
|
293
295
|
}
|
|
294
296
|
if(field.id=='Follow'
|
|
295
|
-
|| field.id=='Trust'
|
|
297
|
+
|| field.id=='Trust' || field.id=='TrustZJJ' || field.id=='TrustDJ' || field.id=='TrustPT'
|
|
296
298
|
|| field.id=='RealLook'
|
|
297
299
|
|| field.id=='StatusAdjust'
|
|
298
|
-
|| field.id=='OperationKey'
|
|
300
|
+
|| field.id=='OperationKey' || field.id=='OperationKeyCommon' || field.id=='OperationKeyPassword'
|
|
299
301
|
|| field.id=='Key'){
|
|
300
302
|
let id=field.id;
|
|
301
|
-
if(field.id=='OperationKey'){
|
|
303
|
+
if(field.id=='OperationKey' || field.id=='OperationKeyCommon' || field.id=='OperationKeyPassword'){
|
|
302
304
|
id='Key';
|
|
303
305
|
}
|
|
306
|
+
else if(field.id=='TrustZJJ' || field.id=='TrustDJ' || field.id=='TrustPT'){
|
|
307
|
+
id='Trust';
|
|
308
|
+
}
|
|
304
309
|
var advIndex = rtn.tags1.findIndex((v) => {
|
|
305
310
|
return v.appID === id;
|
|
306
311
|
});
|
|
307
312
|
rtn.$vue.handleSelect({index:advIndex.toString()});
|
|
308
313
|
}
|
|
314
|
+
else{
|
|
315
|
+
}
|
|
309
316
|
},
|
|
310
317
|
//检查是否关闭tab后触发来源页面操作
|
|
311
318
|
checkCloseTabThen(notification) {
|
|
@@ -2,7 +2,24 @@ import base from '../../index';
|
|
|
2
2
|
import Base from './Base';
|
|
3
3
|
const T = function (source) {
|
|
4
4
|
var rtn = {
|
|
5
|
+
flagJson:false,
|
|
5
6
|
get labelValue() {
|
|
7
|
+
let value = [];
|
|
8
|
+
if(source.code1){
|
|
9
|
+
try{
|
|
10
|
+
let obj=JSON.parse(source.code1);
|
|
11
|
+
if (typeof obj == 'object' && obj) {
|
|
12
|
+
obj.forEach((v) => {
|
|
13
|
+
value.push(v.name);
|
|
14
|
+
});
|
|
15
|
+
rtn.flagJson=true;
|
|
16
|
+
return value;
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
catch(e){
|
|
20
|
+
}
|
|
21
|
+
}
|
|
22
|
+
|
|
6
23
|
var val = "";
|
|
7
24
|
var lst = [];
|
|
8
25
|
var joinChar = source.joinChar == undefined ? '' : source.joinChar;
|
|
@@ -27,8 +44,6 @@ const T = function (source) {
|
|
|
27
44
|
lst.push(fieldVal);
|
|
28
45
|
}
|
|
29
46
|
}
|
|
30
|
-
|
|
31
|
-
|
|
32
47
|
}
|
|
33
48
|
};
|
|
34
49
|
rtn = base.copy(Base(source), rtn);
|
|
@@ -0,0 +1,127 @@
|
|
|
1
|
+
import base from '../../index';
|
|
2
|
+
import Base from './Base';
|
|
3
|
+
import valid from '../../../validate/index';
|
|
4
|
+
import Axios from 'axios';
|
|
5
|
+
import common from '../../../common';
|
|
6
|
+
import Vue from 'vue';
|
|
7
|
+
const QuickInput = function (source, moreActionRouter) {
|
|
8
|
+
var rtn = {
|
|
9
|
+
options: [{ code: source.code1, name: source.name1 }],
|
|
10
|
+
get text() {
|
|
11
|
+
if (source.isList && source.name1 && rtn.attrs.placeholder && rtn.displayLabelAfterSelected) {
|
|
12
|
+
return rtn.attrs.placeholder + ":" + source.name1;
|
|
13
|
+
}
|
|
14
|
+
return source.name1;
|
|
15
|
+
},
|
|
16
|
+
set text(v) {
|
|
17
|
+
if(source.displayName1)
|
|
18
|
+
{
|
|
19
|
+
source.displayName1 = v;
|
|
20
|
+
}else
|
|
21
|
+
{
|
|
22
|
+
source.name1 = v;
|
|
23
|
+
}
|
|
24
|
+
},
|
|
25
|
+
get optionColCount() {
|
|
26
|
+
return parseInt(source.optCount) || 5;
|
|
27
|
+
},
|
|
28
|
+
set optionColCount(v) {
|
|
29
|
+
source.optCount = v;
|
|
30
|
+
},
|
|
31
|
+
get parentName() {
|
|
32
|
+
return source.parentField;
|
|
33
|
+
},
|
|
34
|
+
reset() {
|
|
35
|
+
this.value = this.defaultValue;
|
|
36
|
+
this.text = this.defaultText;
|
|
37
|
+
},
|
|
38
|
+
defaultText: source.defaultName1,
|
|
39
|
+
get labelValue() {
|
|
40
|
+
if (source.name1) {
|
|
41
|
+
return source.name1;
|
|
42
|
+
}
|
|
43
|
+
else {
|
|
44
|
+
return '';
|
|
45
|
+
}
|
|
46
|
+
},
|
|
47
|
+
optionAttrs: {
|
|
48
|
+
value: 'code',
|
|
49
|
+
label: 'name',
|
|
50
|
+
displayLabel:'displayName',
|
|
51
|
+
actionType: 'actionType',
|
|
52
|
+
flagDeleted: 'flagDeleted'
|
|
53
|
+
},
|
|
54
|
+
attrs: {
|
|
55
|
+
style: {
|
|
56
|
+
width: '100%'
|
|
57
|
+
},
|
|
58
|
+
clearable: true,
|
|
59
|
+
filterable: true,
|
|
60
|
+
remote: true
|
|
61
|
+
},
|
|
62
|
+
apiParams: {
|
|
63
|
+
paramName: 'k',
|
|
64
|
+
parentName: 'pk',
|
|
65
|
+
parentValue: 'pv',
|
|
66
|
+
search: 't'
|
|
67
|
+
},
|
|
68
|
+
get clearable() {
|
|
69
|
+
if (typeof source.clear === 'undefined') {
|
|
70
|
+
return true;
|
|
71
|
+
}
|
|
72
|
+
if (source.clear) {
|
|
73
|
+
return true;
|
|
74
|
+
}
|
|
75
|
+
else {
|
|
76
|
+
return false;
|
|
77
|
+
}
|
|
78
|
+
},
|
|
79
|
+
set clearable(v) {
|
|
80
|
+
source.clear = v;
|
|
81
|
+
},
|
|
82
|
+
get searchTick() {
|
|
83
|
+
return parseInt(source.searchTick) || 250;
|
|
84
|
+
},
|
|
85
|
+
set searchTick(v) {
|
|
86
|
+
source.searchTick = v;
|
|
87
|
+
},
|
|
88
|
+
getOptions(paramsAction,key) {
|
|
89
|
+
var self = this;
|
|
90
|
+
var apiAddrs = paramsAction || this.api;
|
|
91
|
+
var params = {
|
|
92
|
+
action: apiAddrs,
|
|
93
|
+
para: {
|
|
94
|
+
paramName: self.paramName,
|
|
95
|
+
parentValue: rtn.getFormParentFieldPara(),
|
|
96
|
+
key: key,
|
|
97
|
+
}
|
|
98
|
+
};
|
|
99
|
+
Vue.prototype.$api.postHandler(common.globalUri(), params).then((response) => {
|
|
100
|
+
if (response.rtnCode === 200) {
|
|
101
|
+
self.options = response.content;
|
|
102
|
+
}
|
|
103
|
+
});
|
|
104
|
+
},
|
|
105
|
+
moreActionRouter: moreActionRouter,//更多高级查询
|
|
106
|
+
//弹出SearchList类型,0不弹框,1点按钮弹框,2直接点搜索框弹框
|
|
107
|
+
get popupSearchListType() {
|
|
108
|
+
if (moreActionRouter) {
|
|
109
|
+
return 1;
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
return 0;
|
|
113
|
+
},
|
|
114
|
+
get moreActionBtnName() {
|
|
115
|
+
if (moreActionRouter) {
|
|
116
|
+
return moreActionRouter.label;
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
return null;
|
|
120
|
+
},
|
|
121
|
+
};
|
|
122
|
+
rtn = base.copy(Base(source), rtn);
|
|
123
|
+
rtn = base.copy(rtn, valid.Init(rtn));
|
|
124
|
+
return rtn;
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
export default QuickInput;
|
|
@@ -247,6 +247,13 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
247
247
|
set flagMoreData(v1) {
|
|
248
248
|
source.page.flagMoreData = v1;
|
|
249
249
|
},
|
|
250
|
+
get selectAllType() {
|
|
251
|
+
return source.selectAllType||'';
|
|
252
|
+
},
|
|
253
|
+
set selectAllType(v1) {
|
|
254
|
+
source.selectAllType = v1;
|
|
255
|
+
},
|
|
256
|
+
|
|
250
257
|
getSelectRowData(router) {
|
|
251
258
|
if (rtn.listData.length === 0) {
|
|
252
259
|
return null;
|
|
@@ -268,7 +275,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
268
275
|
}
|
|
269
276
|
},
|
|
270
277
|
setSelectAll() {
|
|
271
|
-
|
|
278
|
+
|
|
272
279
|
if (rtn.listData.length === 0) {
|
|
273
280
|
return;
|
|
274
281
|
}
|
|
@@ -280,6 +287,9 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
280
287
|
if(!rtnData||rtnData.length>0)
|
|
281
288
|
{
|
|
282
289
|
this.selectAll = 0;
|
|
290
|
+
}else
|
|
291
|
+
{
|
|
292
|
+
this.selectAll = 1;
|
|
283
293
|
}
|
|
284
294
|
}
|
|
285
295
|
},
|
|
@@ -287,7 +297,8 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
287
297
|
getSelectAll()
|
|
288
298
|
{
|
|
289
299
|
if (rtn.listData.length === 0) {
|
|
290
|
-
|
|
300
|
+
rtn.selectAllType='is-disabled';
|
|
301
|
+
return;
|
|
291
302
|
}
|
|
292
303
|
if (rtn.isMulti) {
|
|
293
304
|
//找出没有被选中的框
|
|
@@ -296,18 +307,20 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
296
307
|
});
|
|
297
308
|
if(rtnData.length<=0)//没有找到未选中的复选框
|
|
298
309
|
{
|
|
299
|
-
|
|
310
|
+
rtn.selectAllType='is-checked';
|
|
311
|
+
return;
|
|
300
312
|
}
|
|
301
313
|
if(rtnData.length>0&&rtnData.length<rtn.listData.length)//部分选中
|
|
302
314
|
{
|
|
303
|
-
|
|
315
|
+
rtn.selectAllType='is-indeterminate';
|
|
316
|
+
return;
|
|
304
317
|
}
|
|
305
318
|
if(rtnData.length>0&&rtnData.length==rtn.listData.length)//没选中
|
|
306
319
|
{
|
|
307
|
-
|
|
320
|
+
rtn.selectAllType='';
|
|
321
|
+
return;
|
|
308
322
|
}
|
|
309
323
|
}
|
|
310
|
-
return 1;
|
|
311
324
|
},
|
|
312
325
|
_buttons: null,
|
|
313
326
|
get buttons() {
|
|
@@ -492,6 +505,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
492
505
|
rtn.dataDictionary = response.content.rows;
|
|
493
506
|
//self.listData = self.listData.concat(response.content.Rows);
|
|
494
507
|
}
|
|
508
|
+
rtn.getSelectAll();
|
|
495
509
|
source.page.rows = response.page.rows;
|
|
496
510
|
source.page.rowCount = response.page.rowCount;
|
|
497
511
|
if (typeof response.content.foot !== 'undefined') {
|
|
@@ -35,6 +35,7 @@ const loader = {
|
|
|
35
35
|
Detail: require("./ctl/Detail.js").default,
|
|
36
36
|
PhotoSelect: require("./ctl/PhotoSelect.js").default,
|
|
37
37
|
PhotoSelectList: require("./ctl/PhotoSelectList.js").default,
|
|
38
|
+
QuickInputSos: require("./ctl/QuickInputSos.js").default,
|
|
38
39
|
};
|
|
39
40
|
|
|
40
41
|
export default loader;
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
<el-dropdown @command="handleCommand" @visible-change="getOptions">
|
|
4
4
|
<i class="el-icon-more"></i>
|
|
5
5
|
<el-dropdown-menu ref="dropdown" slot="dropdown">
|
|
6
|
-
<el-dropdown-item v-for="(op, index) in options" :key="index" :command="op.
|
|
6
|
+
<el-dropdown-item v-for="(op, index) in options" :key="index" :command="op.code">{{op.name}}</el-dropdown-item>
|
|
7
7
|
</el-dropdown-menu>
|
|
8
8
|
</el-dropdown>
|
|
9
9
|
</div>
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
var params = {
|
|
31
31
|
action: this.action,
|
|
32
32
|
para: {
|
|
33
|
-
paramName: this.
|
|
33
|
+
paramName: this.pn
|
|
34
34
|
}
|
|
35
35
|
};
|
|
36
36
|
this.$api.postHandler(this.$common.globalUri(), params).then((response) => {
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="ct-quickInput">
|
|
3
|
+
|
|
4
|
+
<el-popover ref="pop" placement="bottom-start" v-model="showDrop" trigger="click">
|
|
5
|
+
<div>
|
|
6
|
+
<div>
|
|
7
|
+
<el-input ref="searchInput" size="mini" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
|
|
8
|
+
</div>
|
|
9
|
+
<ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
|
|
10
|
+
</div>
|
|
11
|
+
<i slot="reference" class="el-icon-more"></i>
|
|
12
|
+
</el-popover>
|
|
13
|
+
</div>
|
|
14
|
+
</template>
|
|
15
|
+
<script>
|
|
16
|
+
|
|
17
|
+
import selectOption from '../../selectOption/src/selectOption'
|
|
18
|
+
import dynamicElement from '../../mixins/dynamicElement'
|
|
19
|
+
import ctSelectOptionVertical from '../../selectOption/src/selectOptionVertical'
|
|
20
|
+
export default {
|
|
21
|
+
name: 'ctQuickInput',
|
|
22
|
+
mixins: [dynamicElement],
|
|
23
|
+
props: {
|
|
24
|
+
pn: String,
|
|
25
|
+
action: String
|
|
26
|
+
},
|
|
27
|
+
components: {
|
|
28
|
+
'ctSelectOption': selectOption,
|
|
29
|
+
'ctSelectOptionVertical': ctSelectOptionVertical
|
|
30
|
+
},
|
|
31
|
+
created() {
|
|
32
|
+
let that=this;
|
|
33
|
+
if (typeof this.vmodel === 'undefined') {
|
|
34
|
+
this.model = this.loaderObj.QuickInputSos(
|
|
35
|
+
{
|
|
36
|
+
code1:'',
|
|
37
|
+
name1:'',
|
|
38
|
+
paramName1:that.pn,
|
|
39
|
+
}
|
|
40
|
+
);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
this.model = this.vmodel;
|
|
44
|
+
}
|
|
45
|
+
this.searchInputHandle();
|
|
46
|
+
},
|
|
47
|
+
data() {
|
|
48
|
+
return {
|
|
49
|
+
options:[],
|
|
50
|
+
searchText: "",
|
|
51
|
+
showDrop: false,
|
|
52
|
+
|
|
53
|
+
};
|
|
54
|
+
},
|
|
55
|
+
methods: {
|
|
56
|
+
|
|
57
|
+
getOptions: function () {
|
|
58
|
+
var self = this;
|
|
59
|
+
this.model.getOptions(this.action, self.searchText);
|
|
60
|
+
|
|
61
|
+
},
|
|
62
|
+
searchInputHandle: function () {
|
|
63
|
+
var currentSeatch = this.searchText;
|
|
64
|
+
this.searchTickControl(currentSeatch);
|
|
65
|
+
},
|
|
66
|
+
searchTickControl: function (search) {
|
|
67
|
+
var self = this;
|
|
68
|
+
setTimeout(function () {
|
|
69
|
+
if (search === self.searchText) {
|
|
70
|
+
self.getOptions(self.searchText);
|
|
71
|
+
}
|
|
72
|
+
}, self.model.searchTick);
|
|
73
|
+
},
|
|
74
|
+
selectOption(value) {
|
|
75
|
+
if (this.model.value === value) {
|
|
76
|
+
this.$set(this, 'showDrop', false);
|
|
77
|
+
return;
|
|
78
|
+
}
|
|
79
|
+
else {
|
|
80
|
+
this.model.value = value;
|
|
81
|
+
}
|
|
82
|
+
this.$set(this, 'showDrop', false);
|
|
83
|
+
this.$emit('click', value);
|
|
84
|
+
},
|
|
85
|
+
},
|
|
86
|
+
mounted() {
|
|
87
|
+
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
</script>
|
|
91
|
+
<style>
|
|
92
|
+
.ct-quickInput .el-icon-more:hover {
|
|
93
|
+
cursor: pointer;
|
|
94
|
+
color: #409EFF;
|
|
95
|
+
}
|
|
96
|
+
</style>
|