提交 574ad7af authored 作者: 陈志磊's avatar 陈志磊

update

上级 b9e66f68
...@@ -115,7 +115,6 @@ ...@@ -115,7 +115,6 @@
"useArrayFilter": true, "useArrayFilter": true,
"useArrayFind": true, "useArrayFind": true,
"useArrayFindIndex": true, "useArrayFindIndex": true,
"useArrayFindLast": true,
"useArrayJoin": true, "useArrayJoin": true,
"useArrayMap": true, "useArrayMap": true,
"useArrayReduce": true, "useArrayReduce": true,
......
/* eslint-disable */ // Generated by 'unplugin-auto-import'
/* prettier-ignore */
// @ts-nocheck
// Generated by unplugin-auto-import
export {} export {}
declare global { declare global {
const $$: typeof import('vue/macros')['$$'] const $$: typeof import('vue/macros')['$$']
...@@ -112,7 +109,6 @@ declare global { ...@@ -112,7 +109,6 @@ declare global {
const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter'] const useArrayFilter: typeof import('@vueuse/core')['useArrayFilter']
const useArrayFind: typeof import('@vueuse/core')['useArrayFind'] const useArrayFind: typeof import('@vueuse/core')['useArrayFind']
const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex'] const useArrayFindIndex: typeof import('@vueuse/core')['useArrayFindIndex']
const useArrayFindLast: typeof import('@vueuse/core')['useArrayFindLast']
const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin'] const useArrayJoin: typeof import('@vueuse/core')['useArrayJoin']
const useArrayMap: typeof import('@vueuse/core')['useArrayMap'] const useArrayMap: typeof import('@vueuse/core')['useArrayMap']
const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce'] const useArrayReduce: typeof import('@vueuse/core')['useArrayReduce']
...@@ -280,5 +276,5 @@ declare global { ...@@ -280,5 +276,5 @@ declare global {
// for type re-export // for type re-export
declare global { declare global {
// @ts-ignore // @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, InjectionKey, PropType, Ref, VNode } from 'vue' export type { Component,ComponentPublicInstance,ComputedRef,InjectionKey,PropType,Ref,VNode } from 'vue'
} }
...@@ -79,7 +79,7 @@ const handleStepTwoNext = function () { ...@@ -79,7 +79,7 @@ const handleStepTwoNext = function () {
class="connect-form" class="connect-form"
:title="props.data?.id ? '编辑链接' : '新建链接'" :title="props.data?.id ? '编辑链接' : '新建链接'"
:close-on-click-modal="false" :close-on-click-modal="false"
width="800px" width="1050px"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="$emit('update:modelValue')"
> >
<el-tabs v-model="activeName" class="demo-tabs"> <el-tabs v-model="activeName" class="demo-tabs">
......
<script setup lang="ts"> <script setup lang="ts">
import { getExperimentData, getMembersList, getEventList } from '../api' import { getExperimentData, getMembersList, getEventList } from '../api'
import Icon from '@/components/ConnectionIcon.vue'
// import { useMapStore } from '@/stores/map'
// 左边展示数据 // 左边展示数据
let leftData = $ref<{ let leftData = $ref<{
...@@ -15,7 +17,7 @@ getExperimentData().then(res => { ...@@ -15,7 +17,7 @@ getExperimentData().then(res => {
}) })
// 最近活跃客户 // 最近活跃客户
let userList = $ref<{ name: string; id: string; isActive: boolean }[]>() let userList = $ref<{ name: string; id: string; isActive: boolean; gender: string }[]>()
getMembersList().then(res => { getMembersList().then(res => {
userList = res.data.map((element: any, index: number) => { userList = res.data.map((element: any, index: number) => {
element.isActive = index === 0 element.isActive = index === 0
...@@ -43,6 +45,11 @@ const handleUser = (item: any) => { ...@@ -43,6 +45,11 @@ const handleUser = (item: any) => {
const getDate = function (date: string) { const getDate = function (date: string) {
return parseInt(date.slice(date.indexOf(' '), date.indexOf(' ') + 3)) > 12 ? '下午' : '上午' return parseInt(date.slice(date.indexOf(' '), date.indexOf(' ') + 3)) > 12 ? '下午' : '上午'
} }
// const experimentTypeList = useMapStore().getMapValuesByKey('experiment_connection_type')
// const getIcon = function (id: any) {
// return experimentTypeList.find((item: any) => item.id === id)?.value as string
// }
</script> </script>
<template> <template>
...@@ -81,7 +88,14 @@ const getDate = function (date: string) { ...@@ -81,7 +88,14 @@ const getDate = function (date: string) {
v-for="item in userList" v-for="item in userList"
@click="handleUser(item)" @click="handleUser(item)"
> >
<img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_boy.png" /> <img
:src="
item?.gender === '1'
? 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_boy.png'
: 'https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_girl.png'
"
alt=""
/>
<div class="name">{{ item.name }}</div> <div class="name">{{ item.name }}</div>
</div> </div>
</div> </div>
...@@ -93,9 +107,11 @@ const getDate = function (date: string) { ...@@ -93,9 +107,11 @@ const getDate = function (date: string) {
{{ item.updated_time?.slice(item.updated_time.indexOf(' '), item.updated_time.length - 3) }} {{ item.updated_time?.slice(item.updated_time.indexOf(' '), item.updated_time.length - 3) }}
{{ getDate(item.updated_time) }} {{ getDate(item.updated_time) }}
</div> </div>
<Icon class="icon" :name="item.connection_type" w="30" h="30"></Icon> <Icon :name="item.connection_type" w="30" h="30"></Icon>
<div class="event"> <div class="event">
<span>"{{ item.connection_name }}"</span><span>"{{ item.event_name }}"</span> <Icon class="icon" :name="item.type" :multicolour="true" w="24" h="24"></Icon>
<span>"{{ item.connection_name }}"</span><span>"{{ item.event_name }}"</span>
</div> </div>
</div> </div>
</div> </div>
...@@ -174,6 +190,10 @@ const getDate = function (date: string) { ...@@ -174,6 +190,10 @@ const getDate = function (date: string) {
align-items: center; align-items: center;
// margin-bottom: 20px; // margin-bottom: 20px;
flex-wrap: wrap; flex-wrap: wrap;
.event {
display: flex;
align-items: center;
}
.time { .time {
color: #ccc; color: #ccc;
} }
......
...@@ -54,10 +54,28 @@ function handleSave() { ...@@ -54,10 +54,28 @@ function handleSave() {
v-for="item in connectionList" v-for="item in connectionList"
:key="item.id" :key="item.id"
:class="{ 'is-active': isActive(item) }" :class="{ 'is-active': isActive(item) }"
@click="toggleSelection(item)"> @click="toggleSelection(item)"
>
<el-checkbox @change="toggleSelection(item)" :model-value="isActive(item)" /> <el-checkbox @change="toggleSelection(item)" :model-value="isActive(item)" />
<div class="connection-item__icon"><ConnectionIcon :name="item.type + ''" /></div> <div :class="isActive(item) ? 'connection-item__icon active' : 'connection-item__icon'">
<p>{{ item.name }}</p> <ConnectionIcon
style="transform: translateY(3px)"
v-if="isActive(item)"
color="#fff"
:name="item.type + ''"
w="20"
h="20"
/>
<ConnectionIcon
style="transform: translateY(3px)"
v-else
:multicolour="true"
:name="item.type + ''"
w="20"
h="20"
/>
</div>
<p :style="`color: ${isActive(item) && '#ba143e'}`">{{ item.name }}</p>
</div> </div>
</div> </div>
<template #footer> <template #footer>
...@@ -70,6 +88,22 @@ function handleSave() { ...@@ -70,6 +88,22 @@ function handleSave() {
</template> </template>
<style lang="scss"> <style lang="scss">
.connection-item__icon {
display: flex;
width: 50px;
height: 50px;
border-radius: 50%;
display: flex;
align-items: center;
justify-content: center;
cursor: pointer;
box-shadow: 2px 2px 10px 0px rgba(0, 0, 0, 0.2);
margin-bottom: 5px;
&.active {
background: #ba143e;
color: #ba143e;
}
}
.connection-list { .connection-list {
display: grid; display: grid;
grid-template-columns: repeat(4, 1fr); grid-template-columns: repeat(4, 1fr);
...@@ -85,9 +119,9 @@ function handleSave() { ...@@ -85,9 +119,9 @@ function handleSave() {
background-color: #fff; background-color: #fff;
border: 1px dashed #bbb; border: 1px dashed #bbb;
cursor: pointer; cursor: pointer;
&.is-active { // &.is-active {
background-color: rgb(204 247 131 / 38%); // background-color: rgb(204 247 131 / 38%);
} // }
.el-checkbox { .el-checkbox {
position: absolute; position: absolute;
left: 10px; left: 10px;
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { UserFilled } from '@element-plus/icons-vue' import { UserFilled } from '@element-plus/icons-vue'
import { getMemberImage, getMemberFieldsList } from '../api' import { getMemberImage, getMemberFieldsList } from '../api'
import type { MemberFieldsProp, ImageProp } from '../types' import type { MemberFieldsProp, ImageProp } from '../types'
import Icon from '../components/Icon.vue' import Icon from '@/components/ConnectionIcon.vue'
const route = useRoute() const route = useRoute()
// 画像数据 // 画像数据
...@@ -89,7 +89,7 @@ const getDate = function (date: string) { ...@@ -89,7 +89,7 @@ const getDate = function (date: string) {
</div> </div>
</AppCard> </AppCard>
<div class="card-box"> <div class="card-box">
<AppCard class="card" title="用户属性"> <AppCard class="card" style="overflow-y: scroll" title="用户属性">
<div style="display: flex; justify-content: center; padding-right: 20px"> <div style="display: flex; justify-content: center; padding-right: 20px">
<el-form label-suffix=":" label-width="auto"> <el-form label-suffix=":" label-width="auto">
<el-form-item label="链接来源">{{ data?.connection_name }}</el-form-item> <el-form-item label="链接来源">{{ data?.connection_name }}</el-form-item>
...@@ -148,7 +148,7 @@ const getDate = function (date: string) { ...@@ -148,7 +148,7 @@ const getDate = function (date: string) {
{{ item.updated_time?.slice(item.updated_time.indexOf(' '), item.updated_time.length - 3) }} {{ item.updated_time?.slice(item.updated_time.indexOf(' '), item.updated_time.length - 3) }}
{{ getDate(item.updated_time) }} {{ getDate(item.updated_time) }}
</div> </div>
<Icon class="icon" :name="item.connection_type" w="30" h="30"></Icon> <Icon class="icon" :multicolour="true" :name="item.connection_type" w="20" h="20"></Icon>
<div class="event"> <div class="event">
<span>"{{ item.connection_name }}"</span><span>"{{ item.event_name }}"</span> <span>"{{ item.connection_name }}"</span><span>"{{ item.event_name }}"</span>
</div> </div>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论