centaline-data-driven 1.6.44 → 1.6.46
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/.vscode/settings.json +5 -0
- package/build/centaline/centaline.path.js +2 -0
- package/package.json +1 -1
- package/release-log.md +16 -0
- package/src/Detail.vue +2 -2
- package/src/Form.vue +2 -2
- package/src/SearchList.vue +3 -2
- package/src/centaline/css/common.css +28 -2
- package/src/centaline/dialogList/src/dialog.vue +8 -2
- package/src/centaline/dynamicForm/src/dynamicForm.vue +3 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchScreen.vue +3 -0
- package/src/centaline/dynamicSearchList/src/dynamicSearchTable.vue +34 -3
- package/src/centaline/dynamicSosNew/index.js +14 -0
- package/src/centaline/dynamicSosNew/src/dynamicSosNew.vue +165 -0
- package/src/centaline/dynamicTagsNew/index.js +13 -0
- package/src/centaline/dynamicTagsNew/src/dynamicTagsNew.vue +336 -0
- package/src/centaline/loader/src/ctl/Button.js +1 -1
- package/src/centaline/loader/src/ctl/Cb.js +1 -2
- package/src/centaline/loader/src/ctl/CellLayout.js +1 -1
- package/src/centaline/loader/src/ctl/Checkbox.js +1 -2
- package/src/centaline/loader/src/ctl/Compound.js +1 -1
- package/src/centaline/loader/src/ctl/Form.js +17 -2
- package/src/centaline/loader/src/ctl/FormList.js +1 -1
- package/src/centaline/loader/src/ctl/SearchTable.js +4 -4
- package/src/centaline/loader/src/ctl/SosNew.js +113 -0
- package/src/centaline/loader/src/ctl/TagsNew.js +222 -0
- package/src/centaline/loader/src/ctl/lib/LibFunction.js +10 -4
- package/src/centaline/loader/src/ctl.js +2 -0
- package/src/main.js +4 -4
- package/wwwroot/static/centaline/centaline-data-driven.js +3514 -2480
- package/wwwroot/static/centaline/centaline-data-driven.js.map +1 -1
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<div class="field-top-noimportant">
|
|
3
|
+
<div class="ccai ct-tags" style="width:100%;display:flex">
|
|
4
|
+
<div style="flex:1;display:flex;margin-right: 5px;" :class="[(focus || showDrop)?'isfocus':'',model.attrs.size?'ct-tags-'+model.attrs.size:''
|
|
5
|
+
]" @mouseover="mouseOverHandle" @mouseout="mouseOutHandle">
|
|
6
|
+
<div style="flex:1;position: relative;" :class="[model.showLabel?'el-input-group el-input-group--prepend':'',!valid?'inputError':'']">
|
|
7
|
+
<div v-if="model.showLabel && model.label" class="el-input-group__prepend" :class="[model.labelClass]">
|
|
8
|
+
{{model.label}}
|
|
9
|
+
</div>
|
|
10
|
+
<el-select ref="refselect" :key="model.itemKey" v-model="model.value" :no-data-text="nodatatext"
|
|
11
|
+
:disabled="model.locked" :placeholder="soPlaceholder" :clearable="model.clearable" style="width:100%"
|
|
12
|
+
:filter-method="getOptions" :filterable="model.filterable" :multiple="model.multiple"
|
|
13
|
+
@change="tagsChange" @clear="clearClickHandle" @focus="clickHandle" @visible-change="visibleChange"
|
|
14
|
+
@compositionstart="handleCompositionStart" @compositionend="handleCompositionEnd">
|
|
15
|
+
<el-option v-for="item in model.options" :key="item.code" :label="item.name" :value="item.code">
|
|
16
|
+
<el-tooltip :disabled="!item.toolTip" :content="item.toolTip" placement="right">
|
|
17
|
+
<span v-html="item.displayName || item.name"></span>
|
|
18
|
+
</el-tooltip>
|
|
19
|
+
</el-option>
|
|
20
|
+
</el-select>
|
|
21
|
+
</div>
|
|
22
|
+
<span v-show="!valid" class="errorMessage">
|
|
23
|
+
{{validMessage}}
|
|
24
|
+
</span>
|
|
25
|
+
</div>
|
|
26
|
+
|
|
27
|
+
<div v-if="model.popupSearchListType === 1 && !model.lock">
|
|
28
|
+
<el-button v-if="!model.moreActionBtnName" class="h26" size="mini" type="primary" icon="el-icon-search" @click="popupSearchListHandle"></el-button>
|
|
29
|
+
<el-button v-else size="mini" type="primary" class="h26" @click="popupSearchListHandle">{{model.moreActionBtnName}}</el-button>
|
|
30
|
+
</div>
|
|
31
|
+
</div>
|
|
32
|
+
</div>
|
|
33
|
+
</template>
|
|
34
|
+
|
|
35
|
+
<script>
|
|
36
|
+
import dynamicElement from '../../mixins/dynamicElement'
|
|
37
|
+
export default {
|
|
38
|
+
name: 'ct-tagsNew',
|
|
39
|
+
mixins: [dynamicElement],
|
|
40
|
+
components: {
|
|
41
|
+
},
|
|
42
|
+
props: {
|
|
43
|
+
api: String,
|
|
44
|
+
vmodel: Object,
|
|
45
|
+
popShow: {
|
|
46
|
+
type: Boolean,
|
|
47
|
+
default: true
|
|
48
|
+
}
|
|
49
|
+
},
|
|
50
|
+
data() {
|
|
51
|
+
return {
|
|
52
|
+
focus: false,
|
|
53
|
+
showDrop: false,
|
|
54
|
+
showClear: false,
|
|
55
|
+
nodatatext:' ',
|
|
56
|
+
open:false,
|
|
57
|
+
isComposing: false,
|
|
58
|
+
}
|
|
59
|
+
},
|
|
60
|
+
created() {
|
|
61
|
+
if (typeof this.vmodel === 'undefined') {
|
|
62
|
+
this.model = this.loaderObj.TagsNew(this.source);
|
|
63
|
+
}
|
|
64
|
+
else {
|
|
65
|
+
this.model = this.vmodel;
|
|
66
|
+
}
|
|
67
|
+
this.model.$self=this;
|
|
68
|
+
this.showPrefix();
|
|
69
|
+
},
|
|
70
|
+
destroyed (){
|
|
71
|
+
this.model = null;
|
|
72
|
+
this.$el = null;
|
|
73
|
+
},
|
|
74
|
+
computed: {
|
|
75
|
+
soPlaceholder: {
|
|
76
|
+
get: function () {
|
|
77
|
+
if (this.model.value.length > 0) {
|
|
78
|
+
return '';
|
|
79
|
+
}
|
|
80
|
+
else {
|
|
81
|
+
return this.model.label;
|
|
82
|
+
}
|
|
83
|
+
},
|
|
84
|
+
set: function (v) {
|
|
85
|
+
|
|
86
|
+
}
|
|
87
|
+
},
|
|
88
|
+
},
|
|
89
|
+
mounted() {
|
|
90
|
+
},
|
|
91
|
+
methods: {
|
|
92
|
+
getOptions: function (query) {
|
|
93
|
+
if(!this.isComposing){
|
|
94
|
+
this.model.getOptions(this.api, query);
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
handleCompositionStart() {
|
|
98
|
+
this.isComposing = true;
|
|
99
|
+
},
|
|
100
|
+
handleCompositionEnd() {
|
|
101
|
+
this.isComposing = false;
|
|
102
|
+
},
|
|
103
|
+
visibleChange() {
|
|
104
|
+
if (this.model.popupSearchListType === 1){
|
|
105
|
+
this.$refs.refselect.popperElm.hidden = true
|
|
106
|
+
}
|
|
107
|
+
},
|
|
108
|
+
showPrefix(){
|
|
109
|
+
if(this.$refs.refselect && this.$refs.refselect.$refs.tags
|
|
110
|
+
&& this.model.isList
|
|
111
|
+
&& this.model.attrs.placeholder
|
|
112
|
+
&& this.model.displayLabelAfterSelected
|
|
113
|
+
){
|
|
114
|
+
if(this.model.value && this.model.value.length>0){
|
|
115
|
+
if(!this.model.isShowPrefix){
|
|
116
|
+
const newElement = document.createElement('span');
|
|
117
|
+
newElement.textContent = '楼盘名称:';
|
|
118
|
+
newElement.style.fontSize='small';
|
|
119
|
+
this.$refs.refselect.$refs.tags.prepend(newElement);
|
|
120
|
+
this.model.isShowPrefix=true;
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
else{
|
|
124
|
+
this.$refs.refselect.$refs.tags.firstChild.remove();
|
|
125
|
+
this.model.isShowPrefix=false;
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
tagsChange: function () {
|
|
130
|
+
this.model.setCode();
|
|
131
|
+
this.showPrefix();
|
|
132
|
+
|
|
133
|
+
this.inputHandler(this.model.value);
|
|
134
|
+
this.changeHandler(this.model.value);
|
|
135
|
+
if(this.model.autoSearch) this.$emit('click');
|
|
136
|
+
},
|
|
137
|
+
focusHandle: function () {
|
|
138
|
+
this.$set(this, 'focus', true);
|
|
139
|
+
},
|
|
140
|
+
blurHandle: function () {
|
|
141
|
+
this.$set(this, 'focus', false);
|
|
142
|
+
},
|
|
143
|
+
clickHandle: function () {
|
|
144
|
+
if (this.model.lock) {
|
|
145
|
+
return false;
|
|
146
|
+
}
|
|
147
|
+
if (this.model.paramName) {
|
|
148
|
+
this.$set(this, 'showDrop', !this.showDrop);
|
|
149
|
+
if (this.showDrop) {
|
|
150
|
+
this.getOptions();
|
|
151
|
+
}
|
|
152
|
+
this.focusHandle();
|
|
153
|
+
}
|
|
154
|
+
else if(this.model.popupSearchListType === 1) {
|
|
155
|
+
this.popupSearchListHandle();
|
|
156
|
+
}
|
|
157
|
+
else if ((this.model.popupSearchListType === 0)) {
|
|
158
|
+
this.$message({
|
|
159
|
+
message: "请配置参数paramName1",
|
|
160
|
+
type: 'warning',
|
|
161
|
+
showClose:true,
|
|
162
|
+
});
|
|
163
|
+
}
|
|
164
|
+
},
|
|
165
|
+
popupSearchListHandle: function () {
|
|
166
|
+
var self = this;
|
|
167
|
+
self.showDrop=false;
|
|
168
|
+
self.$emit('popupSearchList', false, self.model, self.model.moreActionRouter, (optionArr) => {
|
|
169
|
+
self.selectOptionArr(optionArr);
|
|
170
|
+
});
|
|
171
|
+
},
|
|
172
|
+
resize() {
|
|
173
|
+
},
|
|
174
|
+
deleteOption(value, event) {
|
|
175
|
+
var self = this;
|
|
176
|
+
this.model.value.splice(
|
|
177
|
+
this.model.value.findIndex(
|
|
178
|
+
(v) => {
|
|
179
|
+
return v === value;
|
|
180
|
+
}
|
|
181
|
+
)
|
|
182
|
+
, 1);
|
|
183
|
+
self.resize();
|
|
184
|
+
if (event) {
|
|
185
|
+
event.stopPropagation();
|
|
186
|
+
}
|
|
187
|
+
this.tagsChange();
|
|
188
|
+
this.$emit('input', this.model.value);
|
|
189
|
+
},
|
|
190
|
+
selectOption(value) {
|
|
191
|
+
if (this.model.value.find((v) => { return v === value })) {
|
|
192
|
+
if(this.model.lockedValue && this.model.lockedValue.length>0 && this.model.lockedValue.includes(value)){
|
|
193
|
+
}
|
|
194
|
+
else{
|
|
195
|
+
this.deleteOption(value);
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
else {
|
|
199
|
+
this.model.value.push(value);
|
|
200
|
+
}
|
|
201
|
+
this.resize();
|
|
202
|
+
this.tagsChange();
|
|
203
|
+
this.$emit('input', this.model.value);
|
|
204
|
+
},
|
|
205
|
+
selectOptionArr(optionArr) {
|
|
206
|
+
var self = this;
|
|
207
|
+
optionArr.forEach((s) => {
|
|
208
|
+
if (!self.model.value.find((v) => { return v === s.code })) {
|
|
209
|
+
let op={};
|
|
210
|
+
op.code=s.code;
|
|
211
|
+
op.name=s.name;
|
|
212
|
+
op.rowID='';
|
|
213
|
+
op.flagDeleted=false;
|
|
214
|
+
self.model.options.push(op);
|
|
215
|
+
self.model.value.push(s.code);
|
|
216
|
+
}
|
|
217
|
+
});
|
|
218
|
+
|
|
219
|
+
self.resize();
|
|
220
|
+
self.tagsChange();
|
|
221
|
+
self.$emit('input', self.model.value);
|
|
222
|
+
},
|
|
223
|
+
mouseOverHandle: function () {
|
|
224
|
+
if (this.model.value.length > 0 && this.model.clearable) {
|
|
225
|
+
this.$set(this, 'showClear', true);
|
|
226
|
+
}
|
|
227
|
+
},
|
|
228
|
+
mouseOutHandle: function () {
|
|
229
|
+
this.$set(this, 'showClear', false);
|
|
230
|
+
},
|
|
231
|
+
clearClickHandle: function (event) {
|
|
232
|
+
var self =this;
|
|
233
|
+
this.model.reset();
|
|
234
|
+
if(this.model.lockedValue.length>0){
|
|
235
|
+
this.model.lockedValue.forEach((v) => {
|
|
236
|
+
self.model.value.push(v);
|
|
237
|
+
});
|
|
238
|
+
}
|
|
239
|
+
this.resize();
|
|
240
|
+
this.tagsChange();
|
|
241
|
+
this.$emit('input', this.model.value);
|
|
242
|
+
},
|
|
243
|
+
},
|
|
244
|
+
watch: {
|
|
245
|
+
popShow: function (newV, oldV) {
|
|
246
|
+
this.resize();
|
|
247
|
+
}
|
|
248
|
+
}
|
|
249
|
+
}
|
|
250
|
+
</script>
|
|
251
|
+
<style>
|
|
252
|
+
.ct-tags .ct-input_inner::-webkit-input-placeholder {
|
|
253
|
+
color: var(--bagGray);
|
|
254
|
+
}
|
|
255
|
+
|
|
256
|
+
.ct-tags .ct-input_inner::-moz-placeholder {
|
|
257
|
+
color: var(--bagGray);
|
|
258
|
+
}
|
|
259
|
+
|
|
260
|
+
.ct-tags .ct-input_inner:-ms-input-placeholder {
|
|
261
|
+
color: var(--bagGray);
|
|
262
|
+
}
|
|
263
|
+
|
|
264
|
+
.ct-tags .ct-input_inner:hover {
|
|
265
|
+
border-color: var(--bagGray); /*border-color:var(--bagGray)*/
|
|
266
|
+
}
|
|
267
|
+
|
|
268
|
+
.ct-tags.isfocus .ct-input_inner:hover {
|
|
269
|
+
border-color: var(--centalineBlue); /*border-color:var(--bagGray)*/
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
.ct-tags.isfocus .ct-input_inner {
|
|
273
|
+
border-color: var(--centalineBlue);
|
|
274
|
+
}
|
|
275
|
+
|
|
276
|
+
.ct-tags .el-input__suffix {
|
|
277
|
+
right: 10px;
|
|
278
|
+
cursor: pointer;
|
|
279
|
+
display: flex;
|
|
280
|
+
align-items: center;
|
|
281
|
+
justify-content: center;
|
|
282
|
+
}
|
|
283
|
+
|
|
284
|
+
.ct-tags .el-select__caret {
|
|
285
|
+
color: #BBBBBB;
|
|
286
|
+
font-size: inherit;
|
|
287
|
+
-webkit-transition: -webkit-transform .3s;
|
|
288
|
+
transition: -webkit-transform .3s;
|
|
289
|
+
transition: transform .3s;
|
|
290
|
+
transition: transform .3s, -webkit-transform .3s;
|
|
291
|
+
transition: transform .3s,-webkit-transform .3s;
|
|
292
|
+
-webkit-transform: rotateZ(180deg);
|
|
293
|
+
transform: rotateZ(180deg);
|
|
294
|
+
cursor: pointer;
|
|
295
|
+
}
|
|
296
|
+
|
|
297
|
+
.ct-tags .is-reverse {
|
|
298
|
+
-webkit-transform: rotateZ(0deg);
|
|
299
|
+
transform: rotateZ(0deg);
|
|
300
|
+
}
|
|
301
|
+
|
|
302
|
+
.ct-tags .el-tag {
|
|
303
|
+
-webkit-box-sizing: border-box;
|
|
304
|
+
box-sizing: border-box;
|
|
305
|
+
border-color: transparent;
|
|
306
|
+
margin: 2px 0 2px 1px;
|
|
307
|
+
background-color: #f0f2f5;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
.ct-tags.ct-tags-mini {
|
|
311
|
+
font-size: 12px;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
.ct-tags.ct-tags-small {
|
|
315
|
+
font-size: 13px;
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
.ct-tags.ct-tags-medium {
|
|
319
|
+
font-size: 14px;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
.ct-option {
|
|
323
|
+
margin: 5px;
|
|
324
|
+
cursor:pointer;
|
|
325
|
+
}
|
|
326
|
+
.ct-tags .ct-close > .el-select__caret.is-show-close:hover {
|
|
327
|
+
color: var(--centalineMediumGray);
|
|
328
|
+
}
|
|
329
|
+
.ct-tags-value-label {
|
|
330
|
+
/* padding-left: 15px; */
|
|
331
|
+
font-size: small;
|
|
332
|
+
}
|
|
333
|
+
.h26{
|
|
334
|
+
height: 26px;
|
|
335
|
+
}
|
|
336
|
+
</style>
|
|
@@ -3,9 +3,8 @@ import Base from './Base';
|
|
|
3
3
|
import valid from '../../../validate/index';
|
|
4
4
|
import Axios from 'axios';
|
|
5
5
|
const Cb = function (source, callBack) {
|
|
6
|
-
var self = this;
|
|
7
6
|
var init = function (data) {
|
|
8
|
-
|
|
7
|
+
let rtn = {
|
|
9
8
|
get label() {
|
|
10
9
|
let l='';
|
|
11
10
|
if(source.controlLabel){
|
|
@@ -4,9 +4,8 @@ import valid from '../../../validate/index';
|
|
|
4
4
|
import Axios from 'axios';
|
|
5
5
|
import Vue from 'vue';
|
|
6
6
|
const box = function (source, callBack) {
|
|
7
|
-
var self = this;
|
|
8
7
|
var init = function (data) {
|
|
9
|
-
|
|
8
|
+
let rtn = {
|
|
10
9
|
checkedAllCode:'-99999',
|
|
11
10
|
_flagCheckedAll:null,
|
|
12
11
|
get flagCheckedAll() {
|
|
@@ -262,6 +262,21 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
262
262
|
}
|
|
263
263
|
|
|
264
264
|
rtn1.source[attrKey] = attrValue;
|
|
265
|
+
if (rtn1.source.controlType === 23) {
|
|
266
|
+
if (rtn1["options"].length == 0) {
|
|
267
|
+
rtn1["options"] = [{ code: '', name: '', value: '', label: '' }];
|
|
268
|
+
}
|
|
269
|
+
if (attrKey == 'code1') {
|
|
270
|
+
rtn1["value"] = attrValue;
|
|
271
|
+
rtn1["options"][0]["code"] = attrValue
|
|
272
|
+
rtn1["options"][0]["value"] = attrValue
|
|
273
|
+
}
|
|
274
|
+
if (attrKey == 'name1') {
|
|
275
|
+
rtn1["options"][0]["name"] = attrValue
|
|
276
|
+
rtn1["options"][0]["label"] = rtn1.prefix+attrValue
|
|
277
|
+
}
|
|
278
|
+
if (rtn1.itemKey) rtn1.itemKey = Math.random()
|
|
279
|
+
}
|
|
265
280
|
this.form.hatchHandle(id, attrKey, attrValue, rtn1);
|
|
266
281
|
|
|
267
282
|
//用于处理源数据改动,强制更新视图数据 todo
|
|
@@ -929,8 +944,8 @@ const Form = function (source, callBack, apiParam, failCallBack, isFormList) {
|
|
|
929
944
|
Vue.prototype.$api.postHandler(common.globalUri(), { "action": source, "para": apiParam }).then(
|
|
930
945
|
function (response) {
|
|
931
946
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
932
|
-
|
|
933
|
-
|
|
947
|
+
let data = response.content;
|
|
948
|
+
let rtn = init(data);
|
|
934
949
|
if (callBack) {
|
|
935
950
|
callBack(rtn);
|
|
936
951
|
}
|
|
@@ -6,7 +6,7 @@ import Axios from 'axios';
|
|
|
6
6
|
import Enum from './lib/Enum';
|
|
7
7
|
const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSearchData, postThenHandler,action) {
|
|
8
8
|
var init = function (source) {
|
|
9
|
-
|
|
9
|
+
let rtn = {
|
|
10
10
|
$vue: null,
|
|
11
11
|
isLoading: false,
|
|
12
12
|
searchModel: searchModel,
|
|
@@ -975,7 +975,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
975
975
|
},
|
|
976
976
|
//检查是否关闭tab后触发来源页面操作
|
|
977
977
|
checkCloseTabThen(notification) {
|
|
978
|
-
|
|
978
|
+
let rtn = false;
|
|
979
979
|
if (notification == Enum.ActionType.CloseTabThenDelete ||
|
|
980
980
|
notification == Enum.ActionType.CloseTabThenNew ||
|
|
981
981
|
notification == Enum.ActionType.CloseTabThenUpdate) {
|
|
@@ -1472,7 +1472,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
1472
1472
|
}).then(
|
|
1473
1473
|
function (response) {
|
|
1474
1474
|
if (response.rtnCode === Enum.ReturnCode.Successful) {
|
|
1475
|
-
|
|
1475
|
+
let rtn = init(response);
|
|
1476
1476
|
if (callBack) {
|
|
1477
1477
|
callBack(rtn);
|
|
1478
1478
|
}
|
|
@@ -1486,7 +1486,7 @@ const SearchTable = function (data, callBack, searchModel, flagSearch, defaultSe
|
|
|
1486
1486
|
);
|
|
1487
1487
|
}
|
|
1488
1488
|
else {
|
|
1489
|
-
|
|
1489
|
+
let rtn = init(data);
|
|
1490
1490
|
if (callBack) {
|
|
1491
1491
|
callBack(rtn);
|
|
1492
1492
|
}
|
|
@@ -0,0 +1,113 @@
|
|
|
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 SosNew = function (source, moreActionRouter) {
|
|
8
|
+
var rtn = {
|
|
9
|
+
itemKey : Math.random(),
|
|
10
|
+
options: [{ code: source.code1, name: source.name1, value: source.code1, label: (source.isList && source.placeholder1 && source.displayLabelAfterSelected && source.code1?source.placeholder1 + ":":'')+source.name1 }],
|
|
11
|
+
get filterable() {
|
|
12
|
+
return true;
|
|
13
|
+
},
|
|
14
|
+
get multiple() {
|
|
15
|
+
return false;
|
|
16
|
+
},
|
|
17
|
+
get prefix() {
|
|
18
|
+
if (source.isList && source.placeholder1 && source.displayLabelAfterSelected && rtn.value) {
|
|
19
|
+
return source.placeholder1 + ":";
|
|
20
|
+
}
|
|
21
|
+
return '';
|
|
22
|
+
},
|
|
23
|
+
//重新赋值
|
|
24
|
+
setCode() {
|
|
25
|
+
let currentOptions = this.options.find((v) => {
|
|
26
|
+
return v['code'] == rtn.value;
|
|
27
|
+
});
|
|
28
|
+
if (currentOptions) {
|
|
29
|
+
source.name1 = currentOptions['name']
|
|
30
|
+
}
|
|
31
|
+
else {
|
|
32
|
+
source.name1 = ''
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
|
|
36
|
+
get parentName() {
|
|
37
|
+
return source.parentField;
|
|
38
|
+
},
|
|
39
|
+
defaultText: source.defaultName1,
|
|
40
|
+
get labelValue() {
|
|
41
|
+
if (source.name1) {
|
|
42
|
+
return source.name1;
|
|
43
|
+
}
|
|
44
|
+
else {
|
|
45
|
+
return '';
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
optionAttrs: {
|
|
49
|
+
value: 'code',
|
|
50
|
+
label: 'name',
|
|
51
|
+
displayLabel:'displayName',
|
|
52
|
+
actionType: 'actionType',
|
|
53
|
+
flagDeleted: 'flagDeleted'
|
|
54
|
+
},
|
|
55
|
+
get clearable() {
|
|
56
|
+
if (typeof source.clear === 'undefined') {
|
|
57
|
+
return true;
|
|
58
|
+
}
|
|
59
|
+
if (source.clear) {
|
|
60
|
+
return true;
|
|
61
|
+
}
|
|
62
|
+
else {
|
|
63
|
+
return false;
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
set clearable(v) {
|
|
67
|
+
source.clear = v;
|
|
68
|
+
},
|
|
69
|
+
getOptions(paramsAction,key) {
|
|
70
|
+
var self = this;
|
|
71
|
+
var apiAddrs = paramsAction || this.api;
|
|
72
|
+
var params = {
|
|
73
|
+
action: apiAddrs,
|
|
74
|
+
para: {
|
|
75
|
+
paramName: self.paramName,
|
|
76
|
+
parentValue: rtn.getFormParentFieldPara(),
|
|
77
|
+
key: key,
|
|
78
|
+
extraData: rtn.getFormRefFieldPara()
|
|
79
|
+
}
|
|
80
|
+
};
|
|
81
|
+
Vue.prototype.$api.postHandler(common.globalUri(), params).then((response) => {
|
|
82
|
+
if (response.rtnCode === 200) {
|
|
83
|
+
self.options = response.content;
|
|
84
|
+
self.options.forEach(item => {
|
|
85
|
+
item.value=item.code;
|
|
86
|
+
item.label=self.prefix +item.name;
|
|
87
|
+
});
|
|
88
|
+
}
|
|
89
|
+
});
|
|
90
|
+
},
|
|
91
|
+
moreActionRouter: moreActionRouter,//更多高级查询
|
|
92
|
+
//弹出SearchList类型,0不弹框,1点按钮弹框,2直接点搜索框弹框
|
|
93
|
+
get popupSearchListType() {
|
|
94
|
+
if (moreActionRouter) {
|
|
95
|
+
return 1;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
return 0;
|
|
99
|
+
},
|
|
100
|
+
get moreActionBtnName() {
|
|
101
|
+
if (moreActionRouter) {
|
|
102
|
+
return moreActionRouter.label;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
return null;
|
|
106
|
+
},
|
|
107
|
+
};
|
|
108
|
+
rtn = base.copy(Base(source), rtn);
|
|
109
|
+
rtn = base.copy(rtn, valid.Init(rtn));
|
|
110
|
+
return rtn;
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
export default SosNew;
|