diff --git a/kicc-ui/package.json b/kicc-ui/package.json index 6db4a11b..1d80afea 100644 --- a/kicc-ui/package.json +++ b/kicc-ui/package.json @@ -24,6 +24,7 @@ "type:check": "vue-tsc --noEmit --skipLibCheck" }, "dependencies": { + "@amap/amap-jsapi-loader": "1.0.1", "@iconify/iconify": "2.2.1", "@vueuse/core": "6.4.1", "@zxcvbn-ts/core": "2.0.1", diff --git a/kicc-ui/src/views/system/tenant/TenantModal.vue b/kicc-ui/src/views/system/tenant/TenantModal.vue index fd71d0ef..5d264d78 100644 --- a/kicc-ui/src/views/system/tenant/TenantModal.vue +++ b/kicc-ui/src/views/system/tenant/TenantModal.vue @@ -41,11 +41,22 @@ const props: Partial = { confirmLoading: false }; await updateSchema({ field: 'code', + componentProps: { + disabled: tag.value == 'edit' + }, rules: [ { required: true, whitespace: true, - message: '请输入多租户编码' + message: '请输入多租户编码!' + }, + { + len: 19, + message: '编码长度必须为19位!' + }, + { + pattern: new RegExp('^[0-9a-zA-Z_]{1,}$', 'g'), + message: '只允许包含数字,字母,下划线!' }, { validator: async (rule, value) => { diff --git a/kicc-ui/yarn.lock b/kicc-ui/yarn.lock index 6ec846ed..f7ff7c03 100644 --- a/kicc-ui/yarn.lock +++ b/kicc-ui/yarn.lock @@ -2,6 +2,11 @@ # yarn lockfile v1 +"@amap/amap-jsapi-loader@^1.0.1": + version "1.0.1" + resolved "https://registry.npmmirror.com/@amap/amap-jsapi-loader/-/amap-jsapi-loader-1.0.1.tgz#9ec4b4d5d2467eac451f6c852e35db69e9f9f0c0" + integrity sha512-nPyLKt7Ow/ThHLkSvn2etQlUzqxmTVgK7bIgwdBRTg2HK5668oN7xVxkaiRe3YZEzGzfV2XgH5Jmu2T73ljejw== + "@ampproject/remapping@^2.1.0": version "2.2.0" resolved "https://registry.npmmirror.com/@ampproject/remapping/-/remapping-2.2.0.tgz#56c133824780de3174aed5ab6834f3026790154d"