From 36437e56e14d7c6789fa8cbe15d4f4219f1e3dc0 Mon Sep 17 00:00:00 2001 From: doublekou <951513186@qq.com> Date: Wed, 20 Dec 2023 10:36:40 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=91=98-=E6=88=91?= =?UTF-8?q?=E7=9A=84=E7=BA=BF=E7=B4=A2-=E7=BC=96=E8=BE=91=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AE=A2=E6=88=B7=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../customermanagement/customerList/types.ts | 2 ++ src/hooks/websocket.ts | 2 +- .../customerList/customerListEditModal.vue | 36 +++++++++++++++++-- 3 files changed, 36 insertions(+), 4 deletions(-) diff --git a/src/api/customermanagement/customerList/types.ts b/src/api/customermanagement/customerList/types.ts index 7a5378c..67a5b1a 100644 --- a/src/api/customermanagement/customerList/types.ts +++ b/src/api/customermanagement/customerList/types.ts @@ -46,6 +46,7 @@ export type CustomerListRecord = { extraData?: Array channelType?: number channelIdentifying?: Array + customInformation: string } /** * 编辑表单 @@ -55,6 +56,7 @@ export interface SysEdit { clueStageName: string clueStageId: number | undefined clueLabelList: Array + customInformation: string } //详情表单 interface detailFormItem { diff --git a/src/hooks/websocket.ts b/src/hooks/websocket.ts index ff5e7a5..16e5198 100644 --- a/src/hooks/websocket.ts +++ b/src/hooks/websocket.ts @@ -19,7 +19,7 @@ const useAdminWebSocket = () => { const baseUri = import.meta.env.VITE_API_URL const host = window.location.host console.log(host, 'host') - const wsUri = `ws://${host}${baseUri}/ws?access_token=${accessToken}` + const wsUri = `wss://${host}${baseUri}/ws?access_token=${accessToken}` console.log(baseUri, 'baseUri') //使用useWebSocket函数创建WebSocket连接,并配置自动重连和心跳机制 diff --git a/src/views/customermanagement/customerList/customerListEditModal.vue b/src/views/customermanagement/customerList/customerListEditModal.vue index 0b3933d..4cc0ee5 100644 --- a/src/views/customermanagement/customerList/customerListEditModal.vue +++ b/src/views/customermanagement/customerList/customerListEditModal.vue @@ -55,6 +55,16 @@ + + + @@ -184,7 +194,12 @@ const formModel = reactive({ clueId: undefined, clueStageName: '', clueStageId: undefined, - clueLabelList: [] + clueLabelList: [], + customInformation: '' +}) +// 表单的校验规则 +const formRule = reactive({ + customInformation: [{ required: true, message: '请输入客户资料', trigger: ['blur', 'change'] }] }) // 表单的提交请求 @@ -193,10 +208,11 @@ const formRequestMapping: FormRequestMapping = { [FormAction.UPDATE]: updateResource } -const { submitLoading, validateAndSubmit, resetFields } = useAdminForm( +const { submitLoading, validateAndSubmit, resetFields, validateInfos } = useAdminForm( formAction, formRequestMapping, - formModel + formModel, + formRule ) //表单提交处理 @@ -268,6 +284,7 @@ defineExpose({ title.value = '编辑' resourcesId.value = record.clueId formModel.clueId = record.clueId + formModel.customInformation = record.customInformation // formModel.clueLabelList label.length = 0 clueStage.length = 0 @@ -388,4 +405,17 @@ defineExpose({ max-width: 100%; } } +//客户资料textarea +.customInformationInput { + // margin-left: 10px; +} +::v-deep textarea.ant-input { + min-height: 90px; +} +//客户资料label +::v-deep .ant-form-item-required { + color: rgba(0, 0, 0, 0.85); + font-weight: 500; + font-size: 16px; +} From 3c4dec73da34e926f57f54f69da8ecb2b9fffa84 Mon Sep 17 00:00:00 2001 From: doublekou <951513186@qq.com> Date: Wed, 20 Dec 2023 10:37:20 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E4=B8=9A=E5=8A=A1=E5=91=98-=E6=88=91?= =?UTF-8?q?=E7=9A=84=E7=BA=BF=E7=B4=A2-=E7=BC=96=E8=BE=91=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=AE=A2=E6=88=B7=E8=B5=84=E6=96=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- vite.config.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/vite.config.ts b/vite.config.ts index 53047d0..b74c85d 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -26,10 +26,10 @@ import { antdvStyleDeps } from './src/utils/resolvers' //ts // export const serverAddress = 'http://172.18.0.228:8000' //测试 -// export const serverAddress = 'http://39.100.77.21:8000' +export const serverAddress = 'http://39.100.77.21:8000' //线上域名,现在用这个 -export const serverAddress = 'https://byffp.top' +// export const serverAddress = 'https://byffp.top' export default defineConfig({ server: {