Sanakey
3 天以前 b5c1614fe473330ceca8b7cff0f1802e19bd5039
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
<template>
  <div :class="prefixCls">
<!--    <BasicForm @register="registerForm"></BasicForm>-->
    <div class="mb-15px">
      <div class="mb-15px ">
        <div :class="`${prefixCls}__label`">系统标签</div>
        <div>{{'暂无数据'}}</div>
      </div>
      <div class="mb-15px">
        <div :class="`${prefixCls}__label`">首次跟进时间</div>
        <div>{{cluesData.enterDate||'暂无数据'}}</div>
      </div>
      <div class="">
        <div :class="`${prefixCls}__label`">未联系天数</div>
        <div>{{'暂无数据'}}</div>
      </div>
    </div>
    <Divider />
    <h3>公司信息</h3>
    <Description @register="register" class="mt-4" />
    <Divider />
    <h3>联系人</h3>
    <Description @register="register" class="mt-4" />
    <Divider />
    <h3>系统信息</h3>
    <Description @register="register" class="mt-4" />
  </div>
</template>
<script lang="ts" setup>
  import { List, Tag, Divider } from 'ant-design-vue';
  import Icon from '@/components/Icon/Icon.vue';
  import {BasicForm, FormSchema, useForm} from '@/components/Form';
  import dayjs from "dayjs";
  import {treeOptionsListApi} from "@/api/demo/tree";
  import {getAllRoleList} from "@/api/demo/system";
  import {DescItem, Description, useDescription} from "@/components/Description";
  import {useCluesRowStore} from "@/store/modules/cluesRowData";
  import {ref} from "vue";
 
  let cluesData = ref({});
  const cluesRowStore= useCluesRowStore();
  cluesData.value = cluesRowStore.getRowData;
 
  const formSchema: FormSchema[] = [
    {
      field: 'field33',
      component: 'ApiTreeSelect',
      label: '线索来源',
      // helpMessage: ['ApiTreeSelect组件', '使用接口提供的数据生成选项'],
      required: true,
      componentProps: {
        api: treeOptionsListApi,
        treeCheckable: true,
        resultField: 'list',
        onChange: (e, v) => {
          console.log('ApiTreeSelect====>:', e, v);
        },
      },
      colProps: {
        span: 24,
      },
    },
    {
      component: 'Select',
      label: '线索状态',
      field: 'date1',
      colProps: { span: 24 },
      componentProps: {
        options: [
          {
            label: '待处理',
            value: '1',
          },
          {
            label: '完善信息',
            value: '2',
          },
          {
            label: '初步触达',
            value: '3',
          },
          {
            label: '联系互动',
            value: '4',
          },
        ],
      },
      defaultValue:'1'
    },
    {
      label: '国家地区',
      field: 'country',
      component: 'ApiSelect',
      componentProps: {
        api: getAllRoleList,
        labelField: 'roleName',
        valueField: 'roleValue',
      },
    },
    {
      label: '线索备注',
      field: 'field0',
      component: 'InputTextArea',
      componentProps:{
        placeholder: '请输入备注内容',
      },
      colProps: {
        span: 24,
      },
    },
  ];
 
  // const mockData: Recordable = {
  //   cluesName: 'test',
  //   nickName: 'VB',
  //   age: '123',
  //   phone: '15695909xxx',
  //   email: '190848757@qq.com',
  //   companyname: '公司名称111',
  //   sex: '男',
  //   certy: '3504256199xxxxxxxxx',
  //   tag: 'orange',
  // };
 
  const schema: DescItem[] = [
    {
      field: 'cluesName',
      label: '线索名称',
    },
 
    {
      field: 'companyname',
      label: '公司名称',
    },
    {
      field: 'tel',
      label: '联系电话',
    },
    {
      field: 'email',
      label: '邮箱',
    },
    {
      field: 'tel',
      label: '座机',
      render: (curVal, data) => {
        return `${data.telAreaCode}-${curVal}`;
      },
    },
  ];
 
  const [registerForm] = useForm({
    layout: 'vertical',
    baseColProps: { span: 24 },
    schemas: formSchema,
    showActionButtonGroup: false,
  });
 
  const [register] = useDescription({
    // title: '无边框',
    layout: 'vertical',
    bordered: false,
    column: 1,
    labelStyle:{
      color: '#909090',
      // fontSize: '12px',
    },
    data: cluesData,
    schema: schema,
  });
 
  const prefixCls = 'clues-tab-detail';
</script>
<style lang="less" scoped>
  .clues-tab-detail {
    background-color: @component-background;
    &__title {
      margin-bottom: 12px;
      font-size: 18px;
    }
 
    &__content {
      color: @text-color-secondary;
    }
 
    &__label {
      color: @text-color-secondary;
    }
 
    &__action {
      display: inline-block;
      padding: 0 16px;
      color: @text-color-secondary;
 
      &:nth-child(1),
      &:nth-child(2) {
        border-right: 1px solid rgb(206 206 206 / 40%);
      }
 
      &-icon {
        margin-right: 3px;
      }
    }
 
    &__time {
      position: absolute;
      right: 20px;
      color: rgb(0 0 0 / 45%);
    }
  }
</style>