Compare commits

...

2 Commits

@ -46,6 +46,7 @@ export type CustomerListRecord = {
extraData?: Array<detailFormItem> extraData?: Array<detailFormItem>
channelType?: number channelType?: number
channelIdentifying?: Array<string> channelIdentifying?: Array<string>
customInformation: string
} }
/** /**
* *
@ -55,6 +56,7 @@ export interface SysEdit {
clueStageName: string clueStageName: string
clueStageId: number | undefined clueStageId: number | undefined
clueLabelList: Array<any> clueLabelList: Array<any>
customInformation: string
} }
//详情表单 //详情表单
interface detailFormItem { interface detailFormItem {

@ -18,8 +18,14 @@ const useAdminWebSocket = () => {
// ws地址 // ws地址
const baseUri = import.meta.env.VITE_API_URL const baseUri = import.meta.env.VITE_API_URL
const host = window.location.host const host = window.location.host
<<<<<<< HEAD
console.log(host, 'host')
const wsUri = `wss://${host}${baseUri}/ws?access_token=${accessToken}`
console.log(baseUri, 'baseUri')
=======
const wsUri = `wss://${host}${baseUri}/ws?access_token=${accessToken}` const wsUri = `wss://${host}${baseUri}/ws?access_token=${accessToken}`
console.log(wsUri, 'wsUri') console.log(wsUri, 'wsUri')
>>>>>>> 51148e12890616d99b5cb637a2b4197ca26fbcf1
//使用useWebSocket函数创建WebSocket连接并配置自动重连和心跳机制 //使用useWebSocket函数创建WebSocket连接并配置自动重连和心跳机制
useWebSocketReturn = useWebSocket(wsUri, { useWebSocketReturn = useWebSocket(wsUri, {

@ -55,6 +55,16 @@
</a-checkbox-group> </a-checkbox-group>
<a-empty v-else /> <a-empty v-else />
</a-form-item> </a-form-item>
<a-form-item
ref="customInformation"
label="客户资料"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 19 }"
name="customInformation"
v-bind="validateInfos.customInformation"
>
<a-textarea v-model:value="formModel.customInformation" class="customInformationInput" />
</a-form-item>
</a-form> </a-form>
</a-modal> </a-modal>
</template> </template>
@ -184,7 +194,12 @@ const formModel = reactive<SysEdit>({
clueId: undefined, clueId: undefined,
clueStageName: '', clueStageName: '',
clueStageId: undefined, clueStageId: undefined,
clueLabelList: [] clueLabelList: [],
customInformation: ''
})
//
const formRule = reactive({
customInformation: [{ required: true, message: '请输入客户资料', trigger: ['blur', 'change'] }]
}) })
// //
@ -193,10 +208,11 @@ const formRequestMapping: FormRequestMapping<SysEdit> = {
[FormAction.UPDATE]: updateResource [FormAction.UPDATE]: updateResource
} }
const { submitLoading, validateAndSubmit, resetFields } = useAdminForm( const { submitLoading, validateAndSubmit, resetFields, validateInfos } = useAdminForm(
formAction, formAction,
formRequestMapping, formRequestMapping,
formModel formModel,
formRule
) )
// //
@ -268,6 +284,7 @@ defineExpose({
title.value = '编辑' title.value = '编辑'
resourcesId.value = record.clueId resourcesId.value = record.clueId
formModel.clueId = record.clueId formModel.clueId = record.clueId
formModel.customInformation = record.customInformation
// formModel.clueLabelList // formModel.clueLabelList
label.length = 0 label.length = 0
clueStage.length = 0 clueStage.length = 0
@ -388,4 +405,17 @@ defineExpose({
max-width: 100%; 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;
}
</style> </style>

Loading…
Cancel
Save