index.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723
  1. <route lang="json">
  2. {
  3. "style": {
  4. "navigationBarTitleText": "个人信息",
  5. "navigationBarBackgroundColor": "#ffffff"
  6. }
  7. }
  8. </route>
  9. <script setup lang="ts">
  10. import {
  11. createAward,
  12. createFocus,
  13. deleteAward,
  14. deleteStylistFamily,
  15. getAwards,
  16. getDesignerActivities,
  17. getDesignerBasicInfo,
  18. getDesignerExtraEvents,
  19. getDesignerFamilyInfo,
  20. getSalesOrdersCounts,
  21. saveDesignerFamilyInfo,
  22. getUserInfoById,
  23. getEditRecords,
  24. updateDesignerFamilyInfo,
  25. } from '../../../../core/libs/agent-requests'
  26. import { addUnit } from 'wot-design-uni/components/common/util'
  27. import { messages } from '../../../../core/libs/messages'
  28. import { omit } from 'radash'
  29. import BottomAppBar from '@/components/bottom-app-bar.vue'
  30. import { renders } from '../../../../core/libs/renders'
  31. import DataRender from '@/components/data-render.vue'
  32. import PageHelperEvo from '@/components/page-helper-evo.vue'
  33. import { DataFormSchema } from '../../../../components/data-form'
  34. import { DesignerAward, DesignerFamilyInfo } from '@designer-hub/app/src/core/libs/models'
  35. import DataForm from '@/components/data-form.vue'
  36. import { requestToast } from '@designer-hub/app/src/core/utils/common'
  37. import { ComponentExposed } from 'vue-component-type-helpers'
  38. import ListHelperEvo from '@/components/list-helper-evo.vue'
  39. import SectionHeading from '@designer-hub/app/src/components/section-heading.vue'
  40. import dayjs from 'dayjs'
  41. const tab = ref('basic')
  42. // 基础信息 家庭信息 奖项信息 销售信息 游学/活动信息
  43. const tabs = [
  44. { label: '基础信息', value: 'basic' },
  45. { label: '家庭信息', value: 'family' },
  46. { label: '奖项信息', value: 'award' },
  47. { label: '销售信息', value: 'sale' },
  48. { label: '游学/活动信息', value: 'activity' },
  49. { label: '修改记录', value: 'record' },
  50. // { label: '其他活动信息', value: 'events' },
  51. ]
  52. const id = ref()
  53. const { data: basicData, run: setBasicData } = useRequest(() => getDesignerBasicInfo(id.value))
  54. const { data: familyData, run: setData } = useRequest(() => getUserInfoById(id.value))
  55. const { data: editData, run: setEditData } = useRequest(() => getEditRecords())
  56. const query = computed(() => ({ userId: id.value }))
  57. const eventsQuery = computed(() => ({ type: '3' }))
  58. const recordQuery = computed(() => ({ pageNo: 1, pageSize: 10 }))
  59. const actionSheetStatus = ref(false)
  60. const schema = ref<DataFormSchema>()
  61. const fileList = ref<any[]>([])
  62. const formData = ref({
  63. focus: '',
  64. awardsFileUrl: '',
  65. })
  66. const formDataFoucs = ref<{
  67. focus: string
  68. }>({
  69. focus: '',
  70. })
  71. const submitType = ref<'family' | 'award' | 'updateFamily'>()
  72. const familyPageRef = ref<ComponentExposed<typeof PageHelperEvo>>()
  73. const awardsListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
  74. const saleListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
  75. const activityListRef = ref<ComponentExposed<typeof ListHelperEvo>>()
  76. const getFormDataFoucs = computed(() => familyData.value?.focus)
  77. // const {} = useRequest()
  78. const handleEditBasicInfo = async () => {
  79. await uni.navigateTo({ url: `/pages/agent/designer/archives/basic-info/index?id=${id.value}` })
  80. }
  81. const handleAddFamilyInfo = async (item: DesignerFamilyInfo) => {
  82. submitType.value = 'family'
  83. const familySchema: DataFormSchema<Omit<DesignerFamilyInfo, 'userId' | 'createTime' | 'id'>> = {
  84. familyRelation: {
  85. type: 'TextField',
  86. label: messages.objects.designerFamilyInfo.familyRelation,
  87. props: {
  88. placeholder: `请输入${messages.objects.designerFamilyInfo.familyRelation}`,
  89. },
  90. },
  91. familyName: {
  92. type: 'TextField',
  93. label: messages.objects.designerFamilyInfo.familyName,
  94. props: {
  95. placeholder: `请输入${messages.objects.designerFamilyInfo.familyName}`,
  96. },
  97. },
  98. familySex: {
  99. type: 'Radio',
  100. label: messages.objects.designerFamilyInfo.familySex,
  101. props: {
  102. columns: [
  103. { label: '未知', value: 0 },
  104. { label: '男', value: 1 },
  105. { label: '女', value: 2 },
  106. ],
  107. },
  108. },
  109. familyBirthday: {
  110. type: 'TimePick',
  111. label: messages.objects.designerFamilyInfo.familyBirthday,
  112. props: {
  113. type: 'date',
  114. placeholder: `请选择${messages.objects.designerFamilyInfo.familyBirthday}`,
  115. minDate: new Date('1925-01-01').getTime(),
  116. // defaultVale: new Date('1990-01-01').getTime(),
  117. },
  118. },
  119. familyInterset: {
  120. type: 'TextField',
  121. label: messages.objects.designerFamilyInfo.familyInterset,
  122. props: {
  123. placeholder: `请输入${messages.objects.designerFamilyInfo.familyInterset}`,
  124. },
  125. },
  126. familyOccupation: {
  127. type: 'TextField',
  128. label: messages.objects.designerFamilyInfo.familyOccupation,
  129. props: {
  130. placeholder: `请输入${messages.objects.designerFamilyInfo.familyOccupation}`,
  131. },
  132. },
  133. }
  134. schema.value = familySchema
  135. actionSheetStatus.value = true
  136. }
  137. const action = ref(`${import.meta.env.VITE_SERVER_BASEURL}/app-api/infra/file/upload`)
  138. const handleUploadChange = ({ fileList }) => {
  139. formData.value.awardsFileUrl = fileList
  140. .map((item: any) => {
  141. if (item.response) {
  142. return JSON.parse(item.response).data
  143. } else {
  144. return item.url
  145. }
  146. })
  147. .join(',')
  148. }
  149. const handleAddAward = async () => {
  150. submitType.value = 'award'
  151. fileList.value = []
  152. schema.value = {
  153. awardsName: {
  154. type: 'TextField',
  155. label: messages.objects.designerAward.awardsName,
  156. props: {
  157. placeholder: messages.objects.designerAward.awardsNamePlaceHolder,
  158. },
  159. },
  160. awardsRank: {
  161. type: 'TextField',
  162. label: messages.objects.designerAward.awardsRank,
  163. props: {
  164. placeholder: messages.objects.designerAward.awardsRankPlaceHolder,
  165. },
  166. },
  167. awardsTime: {
  168. type: 'TimePick',
  169. label: messages.objects.designerAward.awardsTime,
  170. props: {
  171. defaultValue: dayjs().toDate(),
  172. placeholder: messages.objects.designerAward.awardsTimePlaceHolder,
  173. type: 'date',
  174. },
  175. },
  176. // awardsFileUrl: {
  177. // type: 'ImageUploader',
  178. // label: messages.objects.designerAward.awardsFileUrl,
  179. // callback: handleUploadChange,
  180. // },
  181. }
  182. actionSheetStatus.value = true
  183. }
  184. const handleSubmit = async () => {
  185. switch (submitType.value) {
  186. case 'family': {
  187. const { code } = await requestToast(
  188. () => saveDesignerFamilyInfo({ ...formData.value, userId: id.value }),
  189. {
  190. success: true,
  191. successTitle: '保存成功',
  192. },
  193. )
  194. if (code === 0) {
  195. actionSheetStatus.value = false
  196. familyPageRef.value?.reload()
  197. }
  198. break
  199. }
  200. case 'updateFamily': {
  201. const { code } = await requestToast(
  202. () => updateDesignerFamilyInfo({ ...formData.value, userId: id.value }),
  203. {
  204. success: true,
  205. successTitle: '修改成功',
  206. },
  207. )
  208. if (code === 0) {
  209. actionSheetStatus.value = false
  210. familyPageRef.value?.reload()
  211. }
  212. break
  213. }
  214. case 'award':
  215. {
  216. const { code } = await requestToast(
  217. () => createAward({ ...formData.value, userId: Number(id.value) }),
  218. {
  219. success: true,
  220. successTitle: '保存成功',
  221. },
  222. )
  223. if (code === 0) {
  224. actionSheetStatus.value = false
  225. formData.value = {}
  226. awardsListRef.value?.reload()
  227. }
  228. }
  229. break
  230. default:
  231. break
  232. }
  233. }
  234. const handleDeleteAward = async (item: DesignerAward) => {
  235. await requestToast(() => deleteAward(item.id), {
  236. success: true,
  237. successTitle: '删除成功',
  238. })
  239. awardsListRef.value?.reload()
  240. }
  241. const handleDeleteFamilyInfo = async (item: DesignerFamilyInfo) => {
  242. await requestToast(() => deleteStylistFamily(item.id), {
  243. success: true,
  244. successTitle: '删除成功',
  245. })
  246. familyPageRef.value?.reload()
  247. }
  248. const handleUpdateFamily = (item) => {
  249. submitType.value = 'updateFamily'
  250. const familySchema: DataFormSchema<Omit<DesignerFamilyInfo, 'userId' | 'createTime' | 'id'>> = {
  251. familyRelation: {
  252. type: 'TextField',
  253. label: messages.objects.designerFamilyInfo.familyRelation,
  254. props: {
  255. placeholder: `请输入${messages.objects.designerFamilyInfo.familyRelation}`,
  256. },
  257. },
  258. familyName: {
  259. type: 'TextField',
  260. label: messages.objects.designerFamilyInfo.familyName,
  261. props: {
  262. placeholder: `请输入${messages.objects.designerFamilyInfo.familyName}`,
  263. },
  264. },
  265. familySex: {
  266. type: 'Radio',
  267. label: messages.objects.designerFamilyInfo.familySex,
  268. props: {
  269. columns: [
  270. { label: '男', value: 1 },
  271. { label: '女', value: 2 },
  272. { label: '未知', value: 0 },
  273. ],
  274. },
  275. },
  276. familyBirthday: {
  277. type: 'TimePick',
  278. label: messages.objects.designerFamilyInfo.familyBirthday,
  279. props: {
  280. type: 'date',
  281. placeholder: `请选择${messages.objects.designerFamilyInfo.familyBirthday}`,
  282. minDate: new Date('1925-01-01').getTime(),
  283. // defaultVale: new Date('1990-01-01').getTime(),
  284. },
  285. },
  286. familyInterset: {
  287. type: 'TextField',
  288. label: messages.objects.designerFamilyInfo.familyInterset,
  289. props: {
  290. placeholder: `请输入${messages.objects.designerFamilyInfo.familyInterset}`,
  291. },
  292. },
  293. familyOccupation: {
  294. type: 'TextField',
  295. label: messages.objects.designerFamilyInfo.familyOccupation,
  296. props: {
  297. placeholder: `请输入${messages.objects.designerFamilyInfo.familyOccupation}`,
  298. },
  299. },
  300. }
  301. formData.value = item
  302. schema.value = familySchema
  303. actionSheetStatus.value = true
  304. }
  305. const handleSubmitFocus = async () => {
  306. await requestToast(() => createFocus({ ...formDataFoucs.value, userId: id.value }), {
  307. success: true,
  308. successTitle: '保存成功',
  309. })
  310. await setData()
  311. formDataFoucs.value.focus = familyData.value?.focus as any
  312. }
  313. onLoad(async (query?: Record<string | 'id', any>) => {
  314. id.value = query?.id
  315. await setData()
  316. formDataFoucs.value.focus = familyData.value?.focus as any
  317. })
  318. onShow(async () => {
  319. switch (tab.value) {
  320. case 'basic':
  321. await setBasicData()
  322. break
  323. case 'sale':
  324. await saleListRef.value?.reload()
  325. break
  326. case 'activity':
  327. await activityListRef.value?.reload()
  328. break
  329. case 'record':
  330. await setEditData()
  331. break
  332. default:
  333. break
  334. }
  335. await setBasicData()
  336. })
  337. </script>
  338. <template>
  339. <div class="flex-grow flex flex-col">
  340. <div class="mx--3.5 fixed left-4 w-full bg-white z-10">
  341. <wd-tabs v-model="tab" :swipeable="true" :slidable-num="4">
  342. <template v-for="(it, index) in tabs" :key="index">
  343. <wd-tab :title="it.label" :name="it.value"></wd-tab>
  344. </template>
  345. </wd-tabs>
  346. </div>
  347. <div class="flex flex-col flex-grow gap-5 mt-3">
  348. <template v-if="tab === 'basic'">
  349. <div class="bg-white mt-4 flex flex-col gap-5 p-4">
  350. <template
  351. v-for="([key, value], index) in Object.entries(
  352. omit(basicData, [
  353. 'id',
  354. 'userId',
  355. 'maritalStatus',
  356. 'imageNumber',
  357. 'createTime',
  358. 'referrerId',
  359. ]),
  360. )"
  361. :key="index"
  362. >
  363. <div class="flex items-center justify-between">
  364. <div class="text-black/40 text-base font-normal font-['PingFang_SC'] leading-none">
  365. {{ (messages.objects?.designerBasiceInfo as any)[key] }}
  366. </div>
  367. <template v-if="key === 'avatar'">
  368. <DataRender v-bind="{ type: 'Avatar', value: value }"></DataRender>
  369. </template>
  370. <template
  371. v-else-if="
  372. key === 'birthday' ||
  373. key === 'cooperationTime' ||
  374. key === 'createTime' ||
  375. key === 'joinTime'
  376. "
  377. >
  378. <DataRender v-bind="{ type: 'Date', value: value }"></DataRender>
  379. </template>
  380. <template v-else-if="key === 'sex'">
  381. <DataRender
  382. v-bind="{
  383. type: 'Select',
  384. value: value,
  385. options: [
  386. { label: '未知', value: 0 },
  387. { label: '男', value: 1 },
  388. { label: '女', value: 2 },
  389. ],
  390. }"
  391. ></DataRender>
  392. </template>
  393. <template v-else-if="key === 'retryStatus'">
  394. <DataRender
  395. v-bind="{
  396. type: 'Select',
  397. value: value,
  398. options: [
  399. { label: '弱绑定', value: 0 },
  400. { label: '强绑定', value: 1 },
  401. { label: '公开', value: 3 },
  402. ],
  403. }"
  404. ></DataRender>
  405. </template>
  406. <!-- <template v-else-if="key === 'imageUrl'">
  407. <DataRender
  408. v-bind="{
  409. type: 'img',
  410. value: value,
  411. }"
  412. ></DataRender>
  413. </template> -->
  414. <template v-else-if="key === 'retryStatus'">
  415. <DataRender
  416. v-bind="{
  417. type: 'Select',
  418. value: value,
  419. options: [
  420. { label: '弱绑定', value: 0 },
  421. { label: '强绑定', value: 1 },
  422. { label: '公开', value: 3 },
  423. ],
  424. }"
  425. ></DataRender>
  426. </template>
  427. <template v-else-if="key === 'sharingIntent'">
  428. <DataRender
  429. v-bind="{
  430. type: 'Select',
  431. value: value,
  432. options: [
  433. { label: '不愿意', value: 3 },
  434. { label: '一般', value: 1 },
  435. { label: '愿意', value: 2 },
  436. { label: '非常愿意', value: 4 },
  437. ],
  438. }"
  439. ></DataRender>
  440. </template>
  441. <template v-else-if="key === 'imageUrl'">
  442. <SectionHeading
  443. :end-text="`${basicData.imageNumber}张`"
  444. end-arrow
  445. :path="`/pages/agent/designer/archives/award/imgs?id=${id ?? ''}`"
  446. ></SectionHeading>
  447. </template>
  448. <template v-else>
  449. <DataRender v-bind="{ type: 'Original', value: value }"></DataRender>
  450. </template>
  451. </div>
  452. <!-- <SectionHeading size="base" :title="messages.objects.designerBasiceInfo[key]">
  453. <template #append>
  454. <DataRender v-bind="renders.designerBasiceInfo[key](value)"></DataRender>
  455. </template>
  456. </SectionHeading> -->
  457. <div class="w-full h-.25 bg-[#f4f4f4]"></div>
  458. </template>
  459. </div>
  460. </template>
  461. <template v-if="tab === 'family'">
  462. <div class="bg-white p-4 mt-4 flex-grow flex flex-col">
  463. <div class="flex items-center justify-between">
  464. <div>家庭信息</div>
  465. <div>
  466. <wd-button type="text" icon="add-circle1" @click="handleAddFamilyInfo">
  467. 添加家庭信息
  468. </wd-button>
  469. </div>
  470. </div>
  471. <ListHelperEvo ref="familyPageRef" :request="getDesignerFamilyInfo" :query="query">
  472. <template #list="{ list }">
  473. <template v-for="(item, index) in list" :key="index">
  474. <div class="flex flex-col gap-4 py-4">
  475. <SectionHeading
  476. title="关系"
  477. size="base"
  478. :end-text="item.familyRelation"
  479. ></SectionHeading>
  480. <SectionHeading
  481. title="姓名"
  482. size="base"
  483. :end-text="item.familyName"
  484. ></SectionHeading>
  485. <SectionHeading
  486. title="性别"
  487. size="base"
  488. :end-text="item.familySexStr"
  489. ></SectionHeading>
  490. <SectionHeading
  491. title="生日"
  492. size="base"
  493. :end-text="
  494. item.familyBirthday && dayjs(item.familyBirthday).format('YYYY-MM-DD')
  495. "
  496. ></SectionHeading>
  497. <SectionHeading
  498. title="爱好"
  499. size="base"
  500. :end-text="item.familyInterset"
  501. ></SectionHeading>
  502. <SectionHeading
  503. title="职业"
  504. size="base"
  505. :end-text="item.familyOccupation"
  506. ></SectionHeading>
  507. <div style="display: flex">
  508. <wd-button type="text" @click="handleUpdateFamily(item)">编辑</wd-button>
  509. <wd-button type="text" @click="handleDeleteFamilyInfo(item)">删除</wd-button>
  510. </div>
  511. <div v-if="!(index === list.length - 1)" class="w-full h-1 bg-[#dadada]"></div>
  512. </div>
  513. </template>
  514. </template>
  515. </ListHelperEvo>
  516. <!-- <PageHelperEvo ref="familyPageRef" :request="getDesignerFamilyInfo" :query="query">-->
  517. <!-- -->
  518. <!-- </PageHelperEvo>-->
  519. </div>
  520. </template>
  521. <template v-if="tab === 'award'">
  522. <div class="bg-white p-4 mt-4 flex-grow flex flex-col">
  523. <div class="flex items-center justify-between">
  524. <div>奖项信息</div>
  525. <div>
  526. <wd-button type="text" icon="add-circle1" @click="handleAddAward">
  527. 添加获奖信息
  528. </wd-button>
  529. </div>
  530. </div>
  531. <ListHelperEvo ref="awardsListRef" :request="getAwards" :query="{ userId: id }">
  532. <template #list="{ list }">
  533. <template v-for="(item, i) in list" :key="i">
  534. <div class="flex flex-col gap-4 py-4">
  535. <SectionHeading
  536. title="奖项名称"
  537. size="base"
  538. :end-text="item.awardsName"
  539. ></SectionHeading>
  540. <SectionHeading
  541. title="奖项日期"
  542. :end-text="item.awardsTime && dayjs(item.awardsTime).format('YYYY-MM-DD')"
  543. ></SectionHeading>
  544. <SectionHeading title="奖项名次" :end-text="item.awardsRank"></SectionHeading>
  545. <SectionHeading
  546. title="奖项照片"
  547. end-arrow
  548. :path="`/pages/agent/designer/archives/award/photos/index?urls=${item.awardsFileUrl ?? ''}`"
  549. ></SectionHeading>
  550. <wd-button type="text" @click="handleDeleteAward(item)">删除</wd-button>
  551. <div v-if="!isLast" class="w-full h-1 bg-[#dadada]"></div>
  552. </div>
  553. </template>
  554. </template>
  555. </ListHelperEvo>
  556. </div>
  557. </template>
  558. <template v-if="tab === 'sale'">
  559. <div class="bg-white p-4 mt-4 flex-grow flex flex-col">
  560. <div class="flex items-center justify-between">
  561. <div>销售信息</div>
  562. </div>
  563. <ListHelperEvo ref="saleListRef" :request="getSalesOrdersCounts" :query="{ userId: id }">
  564. <template #list="{ list }">
  565. <template v-for="(item, index) in list" :key="index">
  566. <div class="flex flex-col gap-4 py-4">
  567. <div v-if="index === list.length - 1" class="w-full h-1 bg-[#dadada]"></div>
  568. <SectionHeading
  569. :title="item.label"
  570. size="base"
  571. :end-text="index !== list.length - 2 ?String(item.value):''"
  572. end-arrow
  573. :path="
  574. !(index === list.length - 1)
  575. ? !(index === list.length - 2)
  576. ?`/pages/agent/designer/archives/sale-info/index?id=${id}&type=${item.type}`
  577. :`/pages/agent/designer/archives/sale-info/history?data=${item.value}`
  578. : `/pages/agent/designer/archives/sale-info/others/index?id=${id}`
  579. "
  580. ></SectionHeading>
  581. </div>
  582. </template>
  583. </template>
  584. </ListHelperEvo>
  585. </div>
  586. </template>
  587. <template v-if="tab === 'activity'">
  588. <div class="bg-white p-4 mt-4 flex-grow flex flex-col">
  589. <SectionHeading title="游学/活动信息"></SectionHeading>
  590. <ListHelperEvo
  591. ref="activityListRef"
  592. :request="getDesignerActivities"
  593. :query="{ userId: id }"
  594. >
  595. <template #list="{ list }">
  596. <template v-for="(item, index) in list" :key="index">
  597. <div class="">
  598. <template v-if="item.type === 'line'">
  599. <div class="w-full h-1 bg-[#dadada]"></div>
  600. </template>
  601. <template v-else>
  602. <div class="py-4">
  603. <SectionHeading
  604. :title="item.label"
  605. :end-text="index !== list.length - 2?`${item.value}次`:''"
  606. :path="
  607. index === list.length - 1
  608. ? `/pages/agent/designer/archives/activity/others/index?id=${id}`
  609. : index === list.length - 2
  610. ?`/pages/agent/designer/archives/activity/history?data=${item.value}`
  611. :item.value > 0
  612. ? `/pages/agent/designer/archives/activity/index?userId=${id}&type=${item.type}&subType=${item.subType}`
  613. : ''
  614. "
  615. ></SectionHeading>
  616. </div>
  617. </template>
  618. <div v-if="!(index === list.length - 1)" class="w-full h-.25 bg-[#f4f4f4]"></div>
  619. </div>
  620. </template>
  621. </template>
  622. </ListHelperEvo>
  623. <SectionHeading title="游学/活动关注点">
  624. <template #append>
  625. <wd-button type="text" @click="handleSubmitFocus">保存</wd-button>
  626. </template>
  627. </SectionHeading>
  628. <DataForm
  629. v-model="formDataFoucs"
  630. :schema="{ focus: { type: 'Textarea', hiddenLabel: true } }"
  631. ></DataForm>
  632. </div>
  633. </template>
  634. <template v-if="tab === 'events'">
  635. <PageHelperEvo :request="getDesignerExtraEvents" :query="eventsQuery">
  636. <template #default="{ source }">
  637. <template v-for="(it, index) in source?.list" :key="index">
  638. <div>{{ it }}</div>
  639. </template>
  640. </template>
  641. </PageHelperEvo>
  642. </template>
  643. <template v-if="tab === 'record'">
  644. <div class="bg-white p-4 mt-4 flex-grow flex flex-col">
  645. <SectionHeading title="修改记录"></SectionHeading>
  646. <PageHelperEvo :request="getEditRecords" :query="query">
  647. <template #default="{ source }">
  648. <template v-for="(it, index) in source?.list" :key="index">
  649. <div class="record">
  650. <div class="record-time">
  651. <div class="time">{{ dayjs(it.createTime).format('YYYY-MM-DD') }}</div>
  652. <div class="createBy">经纪人:{{ it.createName }}</div>
  653. </div>
  654. <div class="record-title">修改信息:</div>
  655. <div class="record-content">{{ it.content }}</div>
  656. </div>
  657. </template>
  658. </template>
  659. </PageHelperEvo>
  660. </div>
  661. </template>
  662. </div>
  663. <BottomAppBar fixed placeholder>
  664. <wd-button v-if="tab === 'basic'" block :round="false" @click="handleEditBasicInfo">
  665. 编辑
  666. </wd-button>
  667. <wd-button v-if="tab === 'family'" block :round="false" @click="handleAddFamilyInfo">
  668. 新增
  669. </wd-button>
  670. </BottomAppBar>
  671. <wd-action-sheet v-model="actionSheetStatus">
  672. <div class="p-4">
  673. <DataForm :schema="schema" :direction="'horizontal'" v-model="formData"></DataForm>
  674. <template v-if="submitType == 'award'">
  675. <div
  676. class="grid mb-4 items-start"
  677. :style="{ 'grid-template-columns': `${addUnit(64)} auto` }"
  678. >
  679. <label class="text-sm font-normal leading-relaxed text-black/60 h-10 flex items-center">
  680. 附件
  681. </label>
  682. <wd-upload
  683. :file-list="fileList"
  684. image-mode="aspectFill"
  685. :action="action"
  686. @change="handleUploadChange"
  687. ></wd-upload>
  688. </div>
  689. </template>
  690. <wd-button :round="false" block @click="handleSubmit">提交</wd-button>
  691. </div>
  692. </wd-action-sheet>
  693. </div>
  694. </template>
  695. <style lang="scss" scoped>
  696. .record {
  697. padding: 60rpx 0;
  698. border-bottom: 2rpx solid #f5f5f5;
  699. .record-time {
  700. display: flex;
  701. justify-content: space-between;
  702. margin-bottom: 30rpx;
  703. font-size: 28rpx;
  704. color: rgba(0, 0, 0, 0.45);
  705. }
  706. .record-title {
  707. margin-bottom: 14rpx;
  708. font-size: 32rpx;
  709. color: rgba(0, 0, 0, 0.45);
  710. }
  711. .record-content {
  712. font-size: 28rpx;
  713. color: rgba(0, 0, 0, 0.85);
  714. }
  715. }
  716. ::v-deep .wd-radio__label {
  717. line-height: 30px !important;
  718. }
  719. </style>