centaline-data-driven 1.1.28 → 1.1.29

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "centaline-data-driven",
3
- "version": "1.1.28",
3
+ "version": "1.1.29",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -101,9 +101,9 @@ html {
101
101
 
102
102
  .ct-tags .showLabel .ct-input_inner, .ct-so .showLabel .ct-input_inner, .ct-iti-editor input,
103
103
  .ct-date-editor input, .ct-mt .el-input-group--prepend textarea, .ct-text .showLabel input, .ct-Dtd .ct-datepicker.showLabel .el-range-input,
104
- .ct-Seg .showLabel.ct-radios, .ct-so .showLabel .ct-input_inner,.ct-iti .ct-input_inner {
105
- border-top-left-radius: 6px !important;
106
- border-bottom-left-radius: 6px !important;
104
+ .ct-Seg .showLabel.ct-radios, .ct-so .showLabel .ct-input_inner,.ct-Dtd .el-input__inner {
105
+ border-top-left-radius: 4px !important;
106
+ border-bottom-left-radius: 4px !important;
107
107
  text-align: left !important;
108
108
  }
109
109
  .ct-Seg .showLabel.ct-radios {
@@ -149,8 +149,38 @@
149
149
  .el-card{
150
150
  border: none;
151
151
  }
152
+ .ct-tags .showLabel .ct-input_inner, .ct-so .showLabel .ct-input_inner, .ct-iti-editor input,
153
+ .ct-date-editor input, .ct-mt .el-input-group--prepend textarea, .ct-text .showLabel input, .ct-Dtd .ct-datepicker.showLabel .el-range-input,
154
+ .ct-Seg .showLabel.ct-radios, .ct-so .showLabel .ct-input_inner,.ct-Dtd .el-input__inner {
155
+ border-top-left-radius: 6px !important;
156
+ border-bottom-left-radius: 6px !important;
157
+ text-align: left !important;
158
+ }
152
159
  .ct-iti .el-input-group--prepend .el-input__inner{
153
160
  border-top-left-radius: 6px !important;
154
161
  border-bottom-left-radius: 6px !important;
155
162
  text-align: left !important;
163
+ }
164
+ /* 重置input默认颜色 选中文字颜色 */
165
+ .ct-search-list input::-webkit-input-placeholder{
166
+ color: #666666!important;
167
+ }
168
+ .ct-search-list .el-date-editor .el-range-input,.ct-search-list .el-input__inner{
169
+ color: #409eff;
170
+ }
171
+ .ct-so .ct-input_inner {
172
+ color: #409eff!important;
173
+ }
174
+ .cover-list-item .el-checkbox__input.is-checked + .el-checkbox__label,.cover-list-item .el-checkbox__input.is-checked .el-checkbox__inner{
175
+ color: #409eff;
176
+ }
177
+ .cover-list-item .el-checkbox__input.is-checked .el-checkbox__inner{
178
+ background-color:#409eff;
179
+ border-color: #409eff;
180
+ }
181
+ .ct-search-list .el-input-group__append, .el-input-group__prepend{
182
+ color: #666666!important;
183
+ }
184
+ .ct-so .ct-input_inner,.el-input__inner{
185
+ border-radius: 6px!important;
156
186
  }
@@ -12,7 +12,7 @@
12
12
  <div style="width:39%" class="ct-position-relative" @mouseout="mouseOutHandle('input2')">
13
13
  <input style="text-align:left;width:100%" class="el-range-input" :placeholder="model.attrs.placeholder1"
14
14
  v-model="model.value" @change="changeHandler($event)" @input="onInputHandler($event);isShowClear('input2')" @focus="focusHandler" @blur="blurHandler('value','decimals')"
15
- :class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />
15
+ :class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" @keyup.enter="search()"/>
16
16
 
17
17
  <!-- <span class="el-input__suffix el-input--mini" v-if="showClear.input1">
18
18
  <span class="el-input__suffix-inner ct-close">
@@ -24,7 +24,7 @@
24
24
  <div style="width:39%" class="ct-position-relative" @mouseout="mouseOutHandle('input2')">
25
25
  <input style="text-align:left;width:100%;" class="el-range-input" :placeholder="model.attrs.placeholder2"
26
26
  v-model="model.value1" @change="changeHandler($event);" @input="onInputHandler($event);isShowClear('input2')" @focus="focusHandler" @blur="blurHandler('value1','decimals1')"
27
- :class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" />
27
+ :class="model.lock ? 'ct-is-disabled' : ''" :disabled="model.lock" @keyup.enter="search()"/>
28
28
  </div>
29
29
  <span class="el-input__suffix el-input--mini" v-if="showClear.input2">
30
30
  <span class="el-input__suffix-inner ct-close" style="display: flex;">
@@ -140,6 +140,9 @@
140
140
  this.showClear[id]=false;
141
141
  }
142
142
  },
143
+ search() {
144
+ if(this.model.autoSearch) this.$emit('click');
145
+ },
143
146
  }
144
147
  }
145
148
  </script>
@@ -168,6 +168,7 @@
168
168
  }
169
169
  this.inputHandler(self.model.value);
170
170
  this.changeHandler(self.model.value);
171
+ if(this.model.autoSearch) this.$emit('click');
171
172
  },
172
173
  focusHandle: function () {
173
174
  this.$set(this, 'focus', true);
@@ -152,6 +152,7 @@
152
152
  }
153
153
  this.inputHandler(self.model.value);
154
154
  this.changeHandler(self.model.value);
155
+ if(this.model.autoSearch) this.$emit('click');
155
156
  },
156
157
  focusHandle: function () {
157
158
  this.$refs['ct-input'].focus();
@@ -212,7 +213,6 @@
212
213
  },
213
214
  selectOption(value) {
214
215
  if (this.model.value === value) {
215
- //this.model.value = '';
216
216
  this.$set(this, 'showDrop', false);
217
217
  return;
218
218
  }
@@ -158,6 +158,7 @@
158
158
  }
159
159
  this.inputHandler(self.model.value);
160
160
  this.changeHandler(self.model.value);
161
+ if(this.model.autoSearch) this.$emit('click');
161
162
  },
162
163
  focusHandle: function () {
163
164
  this.$set(this, 'focus', true);
@@ -223,7 +224,6 @@
223
224
  },
224
225
  selectOption(value) {
225
226
  if (this.model.value === value) {
226
- //this.model.value = '';
227
227
  this.$set(this, 'showDrop', false);
228
228
  return;
229
229
  }
@@ -7,7 +7,8 @@
7
7
  </div>
8
8
  <el-input :title="model.lock?model.value:''" :type="model.inputType" v-model="model.value" v-bind="model.attrs" @input="inputHandler($event);isShowClear()" @change="changeHandler($event)"
9
9
  class="ct-flex-div-input max-input" :class="[model.showLabel?'showLabel':'',!valid?'inputError':'']" :disabled="model.lock" :rows="model.rows"
10
- :readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit">
10
+ :readonly="model.readonly" :show-password="model.isPassword" autocomplete="on" :maxlength="model.max" :show-word-limit="model.showWordLimit"
11
+ @keyup.enter.native="search()">
11
12
  <span slot="suffix" v-if="model.unitName" class="ct-unitname">{{model.unitName}}</span>
12
13
 
13
14
  <span slot="suffix" class="el-input__suffix el-input--mini" v-if="showClear" :class="model.unitName?'ct-right-10':'ct-right-0'">
@@ -69,6 +70,9 @@
69
70
  this.$set(this, 'showClear', false);
70
71
  }
71
72
  },
73
+ search() {
74
+ if(this.model.autoSearch) this.$emit('click');
75
+ },
72
76
  },
73
77
  }</script>
74
78
  <style>
@@ -173,9 +173,9 @@
173
173
  else {
174
174
  this.model.text = [];
175
175
  }
176
- //this.$emit('change', this.model.value);
177
176
  this.inputHandler(self.model.value);
178
177
  this.changeHandler(self.model.value);
178
+ if(this.model.autoSearch) this.$emit('click');
179
179
  },
180
180
  focusHandle: function () {
181
181
  this.$set(this, 'focus', true);
@@ -155,7 +155,12 @@ const Base = function (source) {
155
155
  searchObj:{
156
156
  get dataType() { return source.dearchDataTyp; },
157
157
  get fieldName1() { return source.fieldName1; },
158
- get fieldName2() { return source.fieldName2; },
158
+ get fieldName2() {
159
+ if(source.controlType === Enum.ControlType.NumericRange){
160
+ if(!source.fieldName2) return source.fieldName1;
161
+ }
162
+ return source.fieldName2;
163
+ },
159
164
  get groupName() { return source.groupName || source.fieldName1; },
160
165
  get operation() { return source.searchOperation; },
161
166
  get searchDataType() { return source.searchDataType; } ,
@@ -239,8 +244,12 @@ const Base = function (source) {
239
244
  return null;
240
245
  },
241
246
  /*选择搜索条件后是否默认显示标签*/
242
- get dlfs() {
243
- return source.dlfs;
247
+ get displayLabelAfterSelected() {
248
+ return source.displayLabelAfterSelected==undefined? false:source.displayLabelAfterSelected;
249
+ },
250
+ /*选择搜索条件后是否触发搜索*/
251
+ get autoSearch() {
252
+ return source.autoSearch==undefined? false:source.autoSearch;
244
253
  },
245
254
  };
246
255
 
@@ -3,7 +3,6 @@ import Base from './Base';
3
3
  import valid from '../../../validate/index';
4
4
  const Iti = function (source) {
5
5
  var rtn = {
6
-
7
6
  get clearable() {
8
7
  if (typeof source.clear === 'undefined'&&!source.locked) {
9
8
  return true;
@@ -17,8 +16,7 @@ const Iti = function (source) {
17
16
  },
18
17
  set clearable(v) {
19
18
  source.clear = v;
20
- },
21
-
19
+ },
22
20
  get value1() {
23
21
  return source.code2||'';
24
22
  },
@@ -60,13 +58,6 @@ const Iti = function (source) {
60
58
  set min1(v) {
61
59
  source.minValue2 = v;
62
60
  },
63
- //searchObj: {
64
- // get searchValue() {
65
- // if (source.code1 || source.code2) {
66
- // return source.code1 + '^' + source.code2;
67
- // }
68
- // }
69
- //},
70
61
  getFormObj() {
71
62
  var rtnFormObj = {};
72
63
  Object.defineProperty(rtnFormObj, source.fieldName1, {
@@ -67,6 +67,9 @@ const SearchScreen = function (source, callBack, screenPara) {
67
67
  });
68
68
 
69
69
  rtnscreens = this.initScreen(screens);
70
+ rtnscreens.forEach((v)=>{
71
+ v.action='search';
72
+ });
70
73
  this._screen = rtnscreens;
71
74
  return rtnscreens;
72
75
  },
@@ -106,6 +109,9 @@ const SearchScreen = function (source, callBack, screenPara) {
106
109
  return advIndex !== -1 && i > advIndex;
107
110
  });
108
111
  rtnscreens = this.initScreen(screens);
112
+ rtnscreens.forEach((v)=>{
113
+ v.action='search';
114
+ });
109
115
  this._highScreen = rtnscreens;
110
116
  return rtnscreens;
111
117
  },
@@ -205,6 +211,10 @@ const SearchScreen = function (source, callBack, screenPara) {
205
211
  Vue.prototype.$api.postHandler(common.globalUri(), { action: source, para: screenPara }).then(
206
212
  function (response) {
207
213
  if (response.rtnCode === Enum.ReturnCode.Successful) {
214
+ response.content.fields[0].displayLabelAfterSelected=true;
215
+ response.content.fields[0].autoSearch=true;
216
+ response.content.fields[4].autoSearch=true;
217
+ response.content.fields[5].autoSearch=true;
208
218
  var rtn = init(response);
209
219
  if (callBack) {
210
220
  callBack(rtn);
@@ -8,7 +8,7 @@ const So = function (source, moreActionRouter) {
8
8
  var rtn = {
9
9
  options: [{ code: source.code1, name: source.name1 }],
10
10
  get text() {
11
- if (source.isList && source.name1 && rtn.attrs.placeholder && source.dlfs) {
11
+ if (source.isList && source.name1 && rtn.attrs.placeholder && rtn.displayLabelAfterSelected) {
12
12
  return rtn.attrs.placeholder + ":" + source.name1;
13
13
  }
14
14
  return source.name1;
@@ -8,7 +8,7 @@ const Sos = function (source, moreActionRouter) {
8
8
  var rtn = {
9
9
  options: [{ code: source.code1, name: source.name1 }],
10
10
  get text() {
11
- if (source.isList && source.name1 && rtn.attrs.placeholder && source.dlfs) {
11
+ if (source.isList && source.name1 && rtn.attrs.placeholder && rtn.displayLabelAfterSelected) {
12
12
  return rtn.attrs.placeholder + ":" + source.name1;
13
13
  }
14
14
  return source.name1;
@@ -31,7 +31,6 @@ const Sos = function (source, moreActionRouter) {
31
31
  get parentName() {
32
32
  return source.parentField;
33
33
  },
34
-
35
34
  reset() {
36
35
  this.value = this.defaultValue;
37
36
  this.text = this.defaultText;