Commit 10aec2f3 authored by xinzhedeai's avatar xinzhedeai

fix: maxlength tel格式

parent 5c08fbe2
......@@ -74,10 +74,10 @@ VITE_STORAGE_PREFIX=SOY_
# ============================================ old
# 开发环境 - 视频流地址
VITE_VIDEO_URL=ws://192.168.2.16:9999
VITE_VIDEO_URL=ws://192.168.2.14:9999
# 开发环境 - 所有服务接口地址
VITE_SERVICE_URL=http://192.168.2.16:9998
VITE_SERVICE_URL=http://192.168.2.14:9998
# 开发环境 - WebSocket 全局地址
VITE_WEBSOCKET_URL=ws://192.168.2.16:9998
VITE_WEBSOCKET_URL=ws://192.168.2.14:9998
......@@ -515,11 +515,11 @@ onMounted(() => {
<NForm label-placement="left" label-width="auto">
<NFormItem required label="角色名称">
<NInput v-model:value="form.roleName" placeholder="请输入任务名称" />
<NInput v-model:value="form.roleName" placeholder="请输入角色名称" maxlength=90 />
</NFormItem>
<NFormItem required label="角色描述">
<n-input v-model:value="form.roleRemark" placeholder="请输入任务地址" type="textarea" :autosize="{
<n-input v-model:value="form.roleRemark" placeholder="请输入角色描述" maxlength=90 type="textarea" :autosize="{
minRows: 3,
maxRows: 5,
}" />
......
......@@ -13,6 +13,8 @@ import { api_algorithms, api_delPushItem, api_findPushItem, api_modifyAlgorithms
import type { ItablePagination } from '@/views/AlgorithmConfiguration/index';
// api_userList api_addUserInfo api_modifyUserInfo api_delUserInfo api_modifyUserPass
import { REG_PHONE } from '@/constants/reg';
import {
api_getKeyOfAnaly,
......@@ -113,6 +115,9 @@ const addUserItem = async () => {
if (form.name && form.phone && form.roleId && form.userName) {
if (isAddUserModalType.value) {
if(!REG_PHONE.test(form.phone)) {
return message.error('手机号格式不正确!');
}
if (!form.password) {
return message.error('选项皆为必选项!');
}
......@@ -642,7 +647,7 @@ onMounted(() => {
</NFormItem>
<NFormItem required label="手机号">
<NInput v-model:value="form.phone" placeholder="请输入" />
<NInput v-model:value="form.phone" placeholder="请输入" maxlength=11 />
</NFormItem>
<NFormItem required label="真实姓名">
......
......@@ -5,21 +5,21 @@ import { setupVitePlugins } from './build/plugins';
import { createViteProxy, getBuildTime } from './build/config';
// export const proxyTarget = 'http://192.168.3.248:9996';
// export const proxyTarget = 'http://192.168.2.16:9998';
export const proxyTarget = 'http://192.168.2.16:9998';
// export const proxyTarget = 'http://192.168.2.14:9998';
export const proxyTarget = 'http://192.168.2.14:9998';
// export const proxyTarget = 'http://192.168.1.119:9996';
// export const proxyTarget = 'http://192.168.1.119:9996';
// 视频地址
export const videdUrl = 'ws://192.168.2.16:9999';
export const videdUrl = 'ws://192.168.2.14:9999';
// 固定接口地址
export const apiUrl = 'http://192.168.2.16:9998';
export const apiUrl = 'http://192.168.2.14:9998';
// WS 地址
export const wsUrl = 'ws://192.168.2.16:9999';
export const wsUrl = 'ws://192.168.2.14:9999';
export default defineConfig(configEnv => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment