@byteluck-fe/model-driven-controls 2.6.0-alpha.11 → 2.6.0-alpha.13

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.
@@ -111,6 +111,12 @@ var ListViewControlPropertyRules = /**
111
111
  _this.datasourceBind = {
112
112
  type: 'any'
113
113
  };
114
+ _this.joinRelation = [
115
+ {
116
+ type: 'any'
117
+ }
118
+ ];
119
+ console.log('--ListViewControlPropertyRules--');
114
120
  if (props.triggerType === TriggerType.CLICK_CELL && props.isShowSubList) {
115
121
  _this.triggerFieldCode = {
116
122
  type: 'string',
@@ -118,6 +124,69 @@ var ListViewControlPropertyRules = /**
118
124
  message: RulesMessage.getMessage('pleaseEnterFieldCode')
119
125
  };
120
126
  }
127
+ if (props.isShowJoinRelation) {
128
+ _this.joinRelation = [
129
+ {
130
+ type: 'object',
131
+ message: RulesMessage.getMessage('isNotObject')
132
+ },
133
+ {
134
+ type: 'object',
135
+ fields: {
136
+ aliasCode: {
137
+ type: 'string',
138
+ required: true,
139
+ message: RulesMessage.getMessage('pleaseEnterAliasCode')
140
+ },
141
+ datasourceBind: [
142
+ {
143
+ type: 'object',
144
+ message: RulesMessage.getMessage('isNotObject')
145
+ },
146
+ {
147
+ type: 'object',
148
+ fields: {
149
+ dataCode: {
150
+ type: 'string',
151
+ required: true,
152
+ message: RulesMessage.getMessage('pleaseSelectDataCode')
153
+ },
154
+ svcCode: {
155
+ type: 'string',
156
+ required: true,
157
+ message: RulesMessage.getMessage('pleaseSelectSvcCode')
158
+ }
159
+ }
160
+ },
161
+ ],
162
+ relationFields: [
163
+ {
164
+ type: 'array',
165
+ message: RulesMessage.getMessage('isNotArray')
166
+ },
167
+ {
168
+ type: 'array',
169
+ defaultField: {
170
+ type: 'object',
171
+ fields: {
172
+ joinFieldCode: {
173
+ type: 'string',
174
+ required: true,
175
+ message: RulesMessage.getMessage('pleaseSelectJoinFieldCode')
176
+ },
177
+ mainFieldCode: {
178
+ type: 'string',
179
+ required: true,
180
+ message: RulesMessage.getMessage('pleaseSelectMainFieldCode')
181
+ }
182
+ }
183
+ }
184
+ },
185
+ ]
186
+ }
187
+ },
188
+ ];
189
+ }
121
190
  initOptionAndDataSourceRules.call(_assertThisInitialized(_this), {
122
191
  optionConfig: 'datasource',
123
192
  datasourceBind: props.datasourceBind,