centaline-data-driven 1.1.47 → 1.1.48

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.47",
3
+ "version": "1.1.48",
4
4
  "description": "ccai",
5
5
  "author": "hjc <3226136347@qq.com>",
6
6
  "private": false,
@@ -17,7 +17,7 @@
17
17
  </span>
18
18
  </div>
19
19
  <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']"
20
- :trigger="(model.popupSearchListType > 0 || model.lock) ? 'manual' : 'click'" :disabled="model.lock">
20
+ :trigger="(!model.paramName || model.lock) ? 'manual' : 'click'" :disabled="model.lock">
21
21
  <div>
22
22
  <ct-select-option :model="model" :optionRowCount="optionRowCount" @click="selectOption($event)"></ct-select-option>
23
23
  </div>
@@ -180,20 +180,18 @@
180
180
  if (this.model.lock) {
181
181
  return false;
182
182
  }
183
- if (this.model.popupSearchListType === 1) {
183
+ if (this.model.paramName) {
184
+ this.$set(this, 'showDrop', !this.showDrop);
185
+ if (this.showDrop) {
186
+ this.getOptions();
187
+ }
188
+ this.focusHandle();
189
+ }
190
+ else if (this.model.popupSearchListType === 1) {
184
191
  this.popupSearchListHandle();
185
192
  }
186
- else {
187
- if (this.model.paramName) {
188
- this.$set(this, 'showDrop', !this.showDrop);
189
- if (this.showDrop) {
190
- this.getOptions();
191
- }
192
- this.focusHandle();
193
- }
194
- else if ((this.model.popupSearchListType === 0)) {
195
- this.$message.warning("请配置参数paramName1");
196
- }
193
+ else if ((this.model.popupSearchListType === 0)) {
194
+ this.$message.warning("请配置参数paramName1");
197
195
  }
198
196
  },
199
197
  popupSearchListHandle: function () {
@@ -10,7 +10,7 @@
10
10
  <div class="ct-radios" :class="[model.showLabel?'showLabel':'',model.value !== ''?'hasValue':'']">
11
11
  <el-radio-group v-model="model.value" @change="changeHandler1($event)">
12
12
  <el-radio-button v-bind="model.attrs" v-for="(value, index) in model.segmentValue" :key="index" v-model="model.value"
13
- :label="value[model.optionAttrs.value]" :disabled="model.lock">
13
+ :label="value[model.optionAttrs.value]" :displayLabel="value[model.optionAttrs.displayLabel]" :disabled="model.lock">
14
14
  {{value[model.optionAttrs.label]}}
15
15
  </el-radio-button >
16
16
  </el-radio-group>
@@ -61,6 +61,12 @@
61
61
  this.changeHandler(this.model.value);
62
62
  },
63
63
  changeHandler1: function (event) {
64
+ var self=this;
65
+ this.model.segmentValue.forEach((v, i) => {
66
+ if(v[self.model.optionAttrs.value]==event && v[self.model.optionAttrs.displayLabel]){
67
+ self.model.label=v[self.model.optionAttrs.displayLabel];
68
+ }
69
+ });
64
70
  this.inputHandler(this.model.value);
65
71
  this.changeHandler(this.model.value);
66
72
  let parm={};
@@ -192,7 +192,7 @@
192
192
  self.colHasWidth[vi] = 'nowidth';
193
193
  }
194
194
  });
195
- debugger;
195
+
196
196
  self.isLoading = false;
197
197
  self.$forceUpdate();
198
198
  this.model.scripts.formData = this.model.formData;
@@ -7,7 +7,7 @@
7
7
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
8
8
  {{model.label}}
9
9
  </div>
10
- <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']" :trigger="(model.popupSearchListType > 0 || model.lock) ? 'manual' : 'click'">
10
+ <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']" :trigger="(!model.paramName || model.lock) ? 'manual' : 'click'">
11
11
  <div>
12
12
  <ctSelectOptionVertical :model="model" @click="selectOption($event)"></ctSelectOptionVertical>
13
13
  </div>
@@ -165,20 +165,18 @@
165
165
  if (this.model.lock) {
166
166
  return false;
167
167
  }
168
- if (this.model.popupSearchListType === 1) {
168
+ if (this.model.paramName) {
169
+ this.$set(this, 'showDrop', !this.showDrop);
170
+ if (this.showDrop) {
171
+ this.getOptions();
172
+ }
173
+ this.focusHandle();
174
+ }
175
+ else if (this.model.popupSearchListType === 1) {
169
176
  this.popupSearchListHandle();
170
177
  }
171
- else {
172
- if (this.model.paramName) {
173
- this.$set(this, 'showDrop', !this.showDrop);
174
- if (this.showDrop) {
175
- this.getOptions();
176
- }
177
- this.focusHandle();
178
- }
179
- else if ((this.model.popupSearchListType === 0)){
180
- this.$message.warning("请配置参数paramName1");
181
- }
178
+ else if ((this.model.popupSearchListType === 0)){
179
+ this.$message.warning("请配置参数paramName1");
182
180
  }
183
181
  },
184
182
  popupSearchListHandle: function () {
@@ -7,7 +7,7 @@
7
7
  <div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
8
8
  {{model.label}}
9
9
  </div>
10
- <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']" :trigger="(model.popupSearchListType > 0 || model.lock) ? 'manual' : 'click'">
10
+ <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel?'showLabel':'']" :trigger="(!model.paramName || model.lock)? 'manual' : 'click'">
11
11
  <div>
12
12
  <div>
13
13
  <el-input ref="searchInput" :size="model.attrs.size" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
@@ -170,23 +170,18 @@
170
170
  if (this.model.lock) {
171
171
  return false;
172
172
  }
173
- if (this.model.popupSearchListType === 1) {
173
+ if (this.model.paramName) {
174
+ this.$set(this, 'showDrop', !this.showDrop);
175
+ if (this.showDrop) {
176
+ this.getOptions();
177
+ }
178
+ this.focusHandle();
179
+ }
180
+ else if (this.model.popupSearchListType === 1) {
174
181
  this.popupSearchListHandle();
175
182
  }
176
- //else if (this.model.popupSearchListType === 1) {
177
- // //todo 以后可加上即可选单搜索 又可高级搜索
178
- //}
179
- else {
180
- if (this.model.paramName) {
181
- this.$set(this, 'showDrop', !this.showDrop);
182
- if (this.showDrop) {
183
- this.getOptions();
184
- }
185
- this.focusHandle();
186
- }
187
- else if ((this.model.popupSearchListType === 0)) {
188
- this.$message.warning("请配置参数paramName1");
189
- }
183
+ else if ((this.model.popupSearchListType === 0)) {
184
+ this.$message.warning("请配置参数paramName1");
190
185
  }
191
186
  },
192
187
  popupSearchListHandle: function () {
@@ -17,7 +17,7 @@
17
17
  </span>
18
18
  </span>
19
19
  </div>
20
- <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel1?'showLabel':'']" :trigger="(model.popupSearchListType > 0 || model.lock) ? 'manual' : 'click'">
20
+ <el-popover ref="pop" placement="bottom-start" v-model="showDrop" :class="[model.showLabel1?'showLabel':'']" :trigger="(!model.paramName || model.lock) ? 'manual' : 'click'">
21
21
  <div>
22
22
  <div>
23
23
  <el-input ref="searchInput" :size="model.attrs.size" suffix-icon="el-icon-search" v-model="searchText" @input="searchInputHandle"></el-input>
@@ -186,21 +186,19 @@
186
186
  clickHandle: function () {
187
187
  if (this.model.lock) {
188
188
  return false;
189
+ }
190
+ if (this.model.paramName) {
191
+ this.$set(this, 'showDrop', !this.showDrop);
192
+ if (this.showDrop) {
193
+ this.getOptions();
194
+ }
195
+ this.focusHandle();
189
196
  }
190
- if (this.model.popupSearchListType === 1) {
197
+ else if(this.model.popupSearchListType === 1) {
191
198
  this.popupSearchListHandle();
192
199
  }
193
- else {
194
- if (this.model.paramName) {
195
- this.$set(this, 'showDrop', !this.showDrop);
196
- if (this.showDrop) {
197
- this.getOptions();
198
- }
199
- this.focusHandle();
200
- }
201
- else if ((this.model.popupSearchListType === 0)) {
202
- this.$message.warning("请配置参数paramName1");
203
- }
200
+ else if ((this.model.popupSearchListType === 0)) {
201
+ this.$message.warning("请配置参数paramName1");
204
202
  }
205
203
  },
206
204
  popupSearchListHandle: function () {
@@ -281,7 +279,12 @@
281
279
  var self = this;
282
280
  optionArr.forEach((s) => {
283
281
  if (!self.model.value.find((v) => { return v === s[self.model.optionAttrs.value] })) {
284
- self.model.options.push(s);
282
+ let op={};
283
+ op[self.model.optionAttrs.value]=s[self.model.optionAttrs.value];
284
+ op[self.model.optionAttrs.label]=s[self.model.optionAttrs.label];
285
+ op[self.model.optionAttrs.rowid]='';
286
+ op[self.model.optionAttrs.flagDeleted]=false;
287
+ self.model.options.push(op);
285
288
  self.model.value.push(s[self.model.optionAttrs.value]);
286
289
  }
287
290
  });
@@ -10,7 +10,10 @@ const SearchCategory = function (source, callBack) {
10
10
  showLabel:true,
11
11
  get value() {
12
12
  if(!data.code1){
13
- return rtn.segmentValue[0].code;
13
+ if(rtn.segmentValue[0][rtn.optionAttrs.displayLabel]){
14
+ rtn.label=rtn.segmentValue[0][rtn.optionAttrs.displayLabel];
15
+ }
16
+ return rtn.segmentValue[0][rtn.optionAttrs.value];
14
17
  }
15
18
  return data.code1;
16
19
  },
@@ -24,7 +27,8 @@ const SearchCategory = function (source, callBack) {
24
27
  value: 'code',
25
28
  label: 'name',
26
29
  actionType: 'actionType',
27
- flagDeleted: 'flagDeleted'
30
+ flagDeleted: 'flagDeleted',
31
+ displayLabel: 'displayName',
28
32
  }
29
33
  };
30
34
  rtn = base.copy(Base(data), rtn);
@@ -9,6 +9,7 @@ const Tags = function (source, moreActionRouter) {
9
9
  var rtn = {
10
10
  options: source.code1 === '' ? [] : [].concat(JSON.parse(source.code1)),
11
11
  optionAttrs: {
12
+ rowid: 'rowID',
12
13
  value: 'code',
13
14
  label: 'name',
14
15
  displayLabel:'displayName',