vue2-client 1.8.237 → 1.8.239

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.
@@ -25,23 +25,37 @@
25
25
  <a-row :gutter="2">
26
26
  <!-- 左侧 -->
27
27
  <a-col :span="4">
28
- <!-- UI库 -->
29
- <a-card style="margin-bottom: 5%">
30
- <a-page-header
31
- title="UI库"
32
- sub-title="在此选择基础组件"
33
- :backIcon="false"
34
- @back="() => null"
35
- />
36
- <!-- 所有组件 -->
37
- <a-card-grid class="ui-item" @click="addContainer">
38
- 组件容器
39
- </a-card-grid>
40
- <template v-for="(item, index) in getRegisteredComponents()">
41
- <a-card-grid :key="index" class="ui-item" @click="addComponentToContainer(item)">
42
- {{ item }}
43
- </a-card-grid>
44
- </template>
28
+ <a-card>
29
+ <a-tabs>
30
+ <a-tab-pane key="1" tab="UI库">
31
+ <!-- UI库 -->
32
+ <a-card style="margin-bottom: 5%">
33
+ <!-- 所有组件 -->
34
+ <a-card-grid class="ui-item" @click="addContainer">
35
+ 组件容器
36
+ </a-card-grid>
37
+ <template v-for="(item, index) in getRegisteredComponents()">
38
+ <a-card-grid :key="index" class="ui-item" @click="addComponentToContainer(item)">
39
+ {{ item }}
40
+ </a-card-grid>
41
+ </template>
42
+ </a-card>
43
+ </a-tab-pane>
44
+ <a-tab-pane key="2" tab="架构">
45
+ <!-- 页面架构 -->
46
+ <a-card style="margin-bottom: 3%">
47
+ <LowCodePageOrganization
48
+ :config="config"
49
+ v-if="showPageOrganization"
50
+ @renamePage="renamePage"
51
+ @pasteItem="handlePasteItem"
52
+ @componentMove="handleTreeDrag"
53
+ @deleteComponent="deleteComponentInTree"
54
+ @treeOrganizationClick="treeOrganizationClick"
55
+ @addComponent="handleAddComponent"/>
56
+ </a-card>
57
+ </a-tab-pane>
58
+ </a-tabs>
45
59
  </a-card>
46
60
  </a-col>
47
61
  <!-- 中间主体编辑器 -->
@@ -87,23 +101,6 @@
87
101
  </a-col>
88
102
  <!-- 右侧 -->
89
103
  <a-col :span="5">
90
- <!-- 页面架构 -->
91
- <a-card style="margin-bottom: 3%">
92
- <a-page-header
93
- title="架构"
94
- sub-title="页面的组织架构"
95
- :backIcon="false"
96
- @back="() => null"
97
- />
98
- <LowCodePageOrganization
99
- :config="config"
100
- v-if="showPageOrganization"
101
- @pasteItem="handlePasteItem"
102
- @componentMove="handleTreeDrag"
103
- @deleteComponent="deleteComponentInTree"
104
- @treeOrganizationClick="treeOrganizationClick"
105
- @addComponent="handleAddComponent"/>
106
- </a-card>
107
104
  <!-- 属性编辑 -->
108
105
  <a-card>
109
106
  <template v-if="editorPropertiesConfig === 'unregistered'">
@@ -502,6 +499,12 @@ export default {
502
499
  }
503
500
  },
504
501
  methods: {
502
+ // 页面容器重命名
503
+ renamePage (pageId, newName) {
504
+ const page = lowcodeUtils.getConfig(pageId, this.config)
505
+ page.title = newName
506
+ this.refreshOrganization()
507
+ },
505
508
  // 复制粘贴组件
506
509
  handlePasteItem (id, copyCache, type) {
507
510
  const target = lowcodeUtils.getConfig(id, this.config)
@@ -1138,124 +1141,124 @@ export default {
1138
1141
  this.supportedEventType = [...lowcodeComponentMixin.supportedEventType]
1139
1142
  // 深拷贝外侧传来的配置
1140
1143
  this.config = JSON.parse(JSON.stringify(this.originalConfig))
1141
- // this.config = {
1142
- // page: [
1143
- // {
1144
- // id: 'KB',
1145
- // type: 'page',
1146
- // title: '111',
1147
- // body: [
1148
- // [
1149
- // {
1150
- // type: 'XFormTable',
1151
- // span: 12,
1152
- // id: 'XFormTable_BV6Nwk',
1153
- // selected: false,
1154
- // props: {
1155
- // queryParamsName: '',
1156
- // serviceName: ''
1157
- // },
1158
- // selfEvent: [
1159
- // 'action'
1160
- // ]
1161
- // },
1162
- // {
1163
- // type: 'XAddNativeForm',
1164
- // span: 12,
1165
- // id: 'XAddNativeForm_ekihTp',
1166
- // selected: false,
1167
- // props: {
1168
- // configNameForLowCode: '',
1169
- // systemNameForLowCode: ''
1170
- // },
1171
- // selfEvent: [
1172
- // 'onSubmit'
1173
- // ]
1174
- // }
1175
- // ],
1176
- // [
1177
- // {
1178
- // type: 'XTreeOne',
1179
- // span: 12,
1180
- // id: 'XTreeOne_szu7Al',
1181
- // selected: false
1182
- // },
1183
- // {
1184
- // type: 'XDescriptions',
1185
- // span: 12,
1186
- // id: 'XDescriptions_DTkbEg',
1187
- // selected: false,
1188
- // props: {
1189
- // title: '111',
1190
- // content: {
1191
- // c_f_user_phone: '2323',
1192
- // c_f_total_fee: 33356,
1193
- // c_f_address: '22',
1194
- // c_f_meterlen: 2,
1195
- // c_f_bank_card_number: '23',
1196
- // c_f_create_user: '超级管理员',
1197
- // c_f_customer: '23',
1198
- // c_f_balance: 33356,
1199
- // c_f_create_date: '2024-06-23 21:31:24',
1200
- // c_f_operator_date: '2024-06-23 21:31:24',
1201
- // c_f_total_times: 2,
1202
- // c_f_user_name: '23',
1203
- // c_f_comments: '323',
1204
- // c_id: 39,
1205
- // c_f_operatorid: '15',
1206
- // c_f_operator: '超级管理员',
1207
- // c_f_orgid: '9'
1208
- // },
1209
- // configName: 'Unit_Desc_Config',
1210
- // serviceName: 'af-revenue',
1211
- // getRealData: true
1212
- // },
1213
- // selfEvent: []
1214
- // }
1215
- // ]
1216
- // ]
1217
- // },
1218
- // {
1219
- // id: 'Fg',
1220
- // type: 'page',
1221
- // title: '22',
1222
- // body: [
1223
- // [
1224
- // {
1225
- // type: 'container',
1226
- // span: 4,
1227
- // id: 'container_ir2gR2',
1228
- // selected: false
1229
- // },
1230
- // {
1231
- // type: 'container',
1232
- // span: 10,
1233
- // id: 'container_xIRHGg'
1234
- // },
1235
- // {
1236
- // type: 'container',
1237
- // span: 10,
1238
- // id: 'container_PT9n3Q'
1239
- // }
1240
- // ],
1241
- // [
1242
- // {
1243
- // type: 'container',
1244
- // span: 18,
1245
- // id: 'container_q04vQr',
1246
- // selected: false
1247
- // },
1248
- // {
1249
- // type: 'container',
1250
- // span: 6,
1251
- // id: 'container_MKwNvz',
1252
- // selected: false
1253
- // }
1254
- // ]
1255
- // ]
1256
- // }
1257
- // ]
1258
- // }
1144
+ this.config = {
1145
+ page: [
1146
+ {
1147
+ id: 'KB',
1148
+ type: 'page',
1149
+ title: '111',
1150
+ body: [
1151
+ [
1152
+ {
1153
+ type: 'XFormTable',
1154
+ span: 12,
1155
+ id: 'XFormTable_BV6Nwk',
1156
+ selected: false,
1157
+ props: {
1158
+ queryParamsName: '',
1159
+ serviceName: ''
1160
+ },
1161
+ selfEvent: [
1162
+ 'action'
1163
+ ]
1164
+ },
1165
+ {
1166
+ type: 'XAddNativeForm',
1167
+ span: 12,
1168
+ id: 'XAddNativeForm_ekihTp',
1169
+ selected: false,
1170
+ props: {
1171
+ configNameForLowCode: '',
1172
+ systemNameForLowCode: ''
1173
+ },
1174
+ selfEvent: [
1175
+ 'onSubmit'
1176
+ ]
1177
+ }
1178
+ ],
1179
+ [
1180
+ {
1181
+ type: 'XTreeOne',
1182
+ span: 12,
1183
+ id: 'XTreeOne_szu7Al',
1184
+ selected: false
1185
+ },
1186
+ {
1187
+ type: 'XDescriptions',
1188
+ span: 12,
1189
+ id: 'XDescriptions_DTkbEg',
1190
+ selected: false,
1191
+ props: {
1192
+ title: '111',
1193
+ content: {
1194
+ c_f_user_phone: '2323',
1195
+ c_f_total_fee: 33356,
1196
+ c_f_address: '22',
1197
+ c_f_meterlen: 2,
1198
+ c_f_bank_card_number: '23',
1199
+ c_f_create_user: '超级管理员',
1200
+ c_f_customer: '23',
1201
+ c_f_balance: 33356,
1202
+ c_f_create_date: '2024-06-23 21:31:24',
1203
+ c_f_operator_date: '2024-06-23 21:31:24',
1204
+ c_f_total_times: 2,
1205
+ c_f_user_name: '23',
1206
+ c_f_comments: '323',
1207
+ c_id: 39,
1208
+ c_f_operatorid: '15',
1209
+ c_f_operator: '超级管理员',
1210
+ c_f_orgid: '9'
1211
+ },
1212
+ configName: 'Unit_Desc_Config',
1213
+ serviceName: 'af-revenue',
1214
+ getRealData: true
1215
+ },
1216
+ selfEvent: []
1217
+ }
1218
+ ]
1219
+ ]
1220
+ },
1221
+ {
1222
+ id: 'Fg',
1223
+ type: 'page',
1224
+ title: '22',
1225
+ body: [
1226
+ [
1227
+ {
1228
+ type: 'container',
1229
+ span: 4,
1230
+ id: 'container_ir2gR2',
1231
+ selected: false
1232
+ },
1233
+ {
1234
+ type: 'container',
1235
+ span: 10,
1236
+ id: 'container_xIRHGg'
1237
+ },
1238
+ {
1239
+ type: 'container',
1240
+ span: 10,
1241
+ id: 'container_PT9n3Q'
1242
+ }
1243
+ ],
1244
+ [
1245
+ {
1246
+ type: 'container',
1247
+ span: 18,
1248
+ id: 'container_q04vQr',
1249
+ selected: false
1250
+ },
1251
+ {
1252
+ type: 'container',
1253
+ span: 6,
1254
+ id: 'container_MKwNvz',
1255
+ selected: false
1256
+ }
1257
+ ]
1258
+ ]
1259
+ }
1260
+ ]
1261
+ }
1259
1262
  this.refreshOrganization()
1260
1263
  }
1261
1264
  }
package/src/utils/reg.js CHANGED
@@ -1,19 +1,19 @@
1
- /** 手机号 */
2
- export const REG_PHONE =
3
- /^[1](([3][0-9])|([4][01456789])|([5][012356789])|([6][2567])|([7][0-8])|([8][0-9])|([9][012356789]))[0-9]{8}$/
4
-
5
- /** 邮箱 */
6
- export const REG_EMAIL = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
7
-
8
- /** url */
9
- export const REG_URL =
10
- /(((^https?:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)$/
11
-
12
- /** 身份证号 */
13
- export const _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
14
- export const _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
15
- /** 座机号 */
16
- export const REG_LANDLINE = /\d{3}-\d{8}|\d{4}-\d{7}/
17
-
18
- /** 营业执照 */
19
- export const REG_BUSINESS_LICENSE = /^[0-9a-zA-Z]{15}$/
1
+ /** 手机号 */
2
+ export const REG_PHONE =
3
+ /^[1](([3][0-9])|([4][01456789])|([5][012356789])|([6][2567])|([7][0-8])|([8][0-9])|([9][012356789]))[0-9]{8}$/
4
+
5
+ /** 邮箱 */
6
+ export const REG_EMAIL = /^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/
7
+
8
+ /** url */
9
+ export const REG_URL =
10
+ /(((^https?:(?:\/\/)?)(?:[-;:&=+$,\w]+@)?[A-Za-z0-9.-]+(?::\d+)?|(?:www.|[-;:&=+$,\w]+@)[A-Za-z0-9.-]+)((?:\/[+~%/.\w-_]*)?\??(?:[-+=&;%@.\w_]*)#?(?:[\w]*))?)$/
11
+
12
+ /** 身份证号 */
13
+ export const _IDRe18 = /^([1-6][1-9]|50)\d{4}(18|19|20)\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}[0-9Xx]$/
14
+ export const _IDre15 = /^([1-6][1-9]|50)\d{4}\d{2}((0[1-9])|10|11|12)(([0-2][1-9])|10|20|30|31)\d{3}$/
15
+ /** 座机号 */
16
+ export const REG_LANDLINE = /\d{3}-\d{8}|\d{4}-\d{7}/
17
+
18
+ /** 营业执照 */
19
+ export const REG_BUSINESS_LICENSE = /^[0-9a-zA-Z]{15}$/
package/vue.config.js CHANGED
@@ -99,6 +99,7 @@ module.exports = {
99
99
  extensions: ['.js', '.vue', '.json'],
100
100
  alias: {
101
101
  '@vue2-client': path.resolve('src'),
102
+ '@': path.resolve('src'),
102
103
  }
103
104
  }
104
105
  config.entry.app = ['core-js/stable', 'regenerator-runtime/runtime', 'whatwg-fetch', './src/main.js']