|
@@ -6,8 +6,11 @@ style:
|
|
|
|
|
|
<script setup lang="ts">
|
|
|
import Card from '@/components/card.vue'
|
|
|
-import { vipIcon, rightArrowIcon } from '@designer-hub/assets/src/svgs'
|
|
|
+import DataForm from '@/components/data-form.vue'
|
|
|
+import { vipIcon, rightArrowIcon, filterIcon } from '@designer-hub/assets/src/svgs'
|
|
|
const searchText = ref('')
|
|
|
+const publishState = ref(false)
|
|
|
+
|
|
|
const msgs = ref([
|
|
|
{
|
|
|
title: '王磊回复了你',
|
|
@@ -20,6 +23,33 @@ const msgs = ref([
|
|
|
content: '设计师李家豪刚刚点赞了你的设计圈点击前往查看',
|
|
|
},
|
|
|
])
|
|
|
+const schema = ref({
|
|
|
+ user: {
|
|
|
+ type: 'TextField',
|
|
|
+ label: '设计师',
|
|
|
+ },
|
|
|
+ dateTime: {
|
|
|
+ type: 'TextField',
|
|
|
+ label: '时间',
|
|
|
+ },
|
|
|
+ type: {
|
|
|
+ type: 'TextField',
|
|
|
+ label: '类型',
|
|
|
+ },
|
|
|
+ remark: {
|
|
|
+ type: 'TextField',
|
|
|
+ label: '备注',
|
|
|
+ },
|
|
|
+ location: {
|
|
|
+ type: 'TextField',
|
|
|
+ label: '地址',
|
|
|
+ },
|
|
|
+ images: {
|
|
|
+ type: 'ImageUploader',
|
|
|
+ label: '图片',
|
|
|
+ max: 9,
|
|
|
+ },
|
|
|
+})
|
|
|
const searchFocus = () => {
|
|
|
console.log('focus')
|
|
|
}
|
|
@@ -38,19 +68,31 @@ const searchChange = (e: any) => {
|
|
|
const toDetail = async () => {
|
|
|
await uni.navigateTo({ url: '/pages/designer/detail' })
|
|
|
}
|
|
|
+const callPhone = (phoneNumber) => {
|
|
|
+ const link = document.createElement('a')
|
|
|
+ link.href = 'tel:' + phoneNumber
|
|
|
+ link.click()
|
|
|
+}
|
|
|
+const filterData = () => {
|
|
|
+ console.log('filter')
|
|
|
+}
|
|
|
</script>
|
|
|
|
|
|
<template>
|
|
|
<view class="flex-grow">
|
|
|
- <div>
|
|
|
- <wd-search
|
|
|
- v-model="searchText"
|
|
|
- @focus="searchFocus"
|
|
|
- @blur="searchBlur"
|
|
|
- @search="search"
|
|
|
- @cancel="cancelSearch"
|
|
|
- @change="searchChange"
|
|
|
- />
|
|
|
+ <div class="flex items-center justify-between bg-white pr-3.5">
|
|
|
+ <div class="flex-1">
|
|
|
+ <wd-search
|
|
|
+ v-model="searchText"
|
|
|
+ @focus="searchFocus"
|
|
|
+ @blur="searchBlur"
|
|
|
+ @search="search"
|
|
|
+ @cancel="cancelSearch"
|
|
|
+ @change="searchChange"
|
|
|
+ hide-cancel
|
|
|
+ />
|
|
|
+ </div>
|
|
|
+ <wd-img :src="filterIcon" width="22px" height="22px" @click="filterData"></wd-img>
|
|
|
</div>
|
|
|
<div class="p-3.5 gap-3.5 flex flex-col">
|
|
|
<template v-for="({ title, createdAt, content }, i) in msgs" :key="i">
|
|
@@ -138,13 +180,14 @@ const toDetail = async () => {
|
|
|
class="px-3 py-1.5 rounded-[30px] border border-[#ff2d2d] justify-center items-center gap-1 flex"
|
|
|
style="border: 1px solid #ff2d2d"
|
|
|
>
|
|
|
- <div style="color: #ff2d2d" class="flex items-center">+</div>
|
|
|
+ <span style="color: #ff2d2d" class="flex items-center">+</span>
|
|
|
<div class="text-[#ff2d2d] text-xs font-normal font-['PingFang SC'] leading-none">
|
|
|
重点跟进
|
|
|
</div>
|
|
|
</div>
|
|
|
<div
|
|
|
class="px-5 py-1 bg-[#e1ecff] rounded-[30px] border border-[#2357e9] justify-center items-center gap-1 inline-flex"
|
|
|
+ @click="callPhone('13700000000')"
|
|
|
>
|
|
|
<div
|
|
|
class="text-center text-[#2357e9] text-sm font-normal font-['PingFang SC'] leading-normal"
|
|
@@ -157,6 +200,7 @@ const toDetail = async () => {
|
|
|
>
|
|
|
<div
|
|
|
class="text-center text-white text-sm font-normal font-['PingFang SC'] leading-normal"
|
|
|
+ @click="publishState = true"
|
|
|
>
|
|
|
写跟进
|
|
|
</div>
|
|
@@ -167,6 +211,12 @@ const toDetail = async () => {
|
|
|
</template>
|
|
|
</div>
|
|
|
</view>
|
|
|
+ <wd-action-sheet v-model="publishState" title="创建跟进" @close="publishState = false">
|
|
|
+ <view class="flex flex-col p-4">
|
|
|
+ <div><DataForm :schema="schema" direction="horizontal"></DataForm></div>
|
|
|
+ <div><wd-button block :round="false">提交</wd-button></div>
|
|
|
+ </view>
|
|
|
+ </wd-action-sheet>
|
|
|
</template>
|
|
|
|
|
|
<style scoped lang="scss"></style>
|