提交 2efcacf0 authored 作者: lihuihui's avatar lihuihui

update

上级 9e029fcd
...@@ -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,
......
...@@ -62,12 +62,26 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -62,12 +62,26 @@ const submitForm = (formEl: FormInstance | undefined) => {
const handleViewH5 = function () { const handleViewH5 = function () {
window.open(`https://${form.content}`) window.open(`https://${form.content}`)
} }
const typeName = computed(() => {
const json: any = {
'1': '文本',
'2': '图片',
'3': '语音',
'4': '视频',
'5': 'H5',
'6': '二维码',
'7': '小程序',
'8': '卡券'
}
return json[props.type]
})
</script> </script>
<template> <template>
<el-dialog <el-dialog
class="connect-form" class="connect-form"
:title="props.data ? (props.data?.isView ? '查看资料' : '编辑资料') : '新建资料'" :title="props.data ? (props.data?.isView ? `查看${typeName}资料` : `编辑${typeName}资料`) : `新建${typeName}资料`"
:close-on-click-modal="false" :close-on-click-modal="false"
width="800px" width="800px"
@update:modelValue="$emit('update:modelValue')" @update:modelValue="$emit('update:modelValue')"
...@@ -117,11 +131,11 @@ const handleViewH5 = function () { ...@@ -117,11 +131,11 @@ const handleViewH5 = function () {
<el-form-item label="状态" prop="status"> <el-form-item label="状态" prop="status">
<el-switch v-model="form.status" active-text="生效" active-value="1" inactive-text="失效" inactive-value="0" /> <el-switch v-model="form.status" active-text="生效" active-value="1" inactive-text="失效" inactive-value="0" />
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(ruleFormRef)">提交</el-button>
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
</el-form-item>
</el-form> </el-form>
<div style="display: flex; justify-content: center">
<el-button v-if="!props.data?.isView" type="primary" @click="submitForm(ruleFormRef)">提交</el-button>
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
</div>
</el-dialog> </el-dialog>
</template> </template>
<style lang="scss"> <style lang="scss">
......
...@@ -31,20 +31,20 @@ const component = computed(() => { ...@@ -31,20 +31,20 @@ const component = computed(() => {
TriggeringConditions10: markRaw( TriggeringConditions10: markRaw(
defineAsyncComponent(() => import('./components/triggeringConditions/TriggeringConditions10.vue')) defineAsyncComponent(() => import('./components/triggeringConditions/TriggeringConditions10.vue'))
), ),
MarketingAction1: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction1.vue'))), MarketingAction1: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction1.vue'))),
MarketingAction2: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction2.vue'))), MarketingAction2: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction2.vue'))),
MarketingAction3: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction3.vue'))), MarketingAction3: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction3.vue'))),
MarketingAction4: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction4.vue'))), MarketingAction4: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction4.vue'))),
MarketingAction5: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction5.vue'))), MarketingAction5: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction5.vue'))),
MarketingAction6: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction6.vue'))), MarketingAction6: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction6.vue'))),
MarketingAction7: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction7.vue'))), MarketingAction7: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction7.vue'))),
MarketingAction8: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction8.vue'))), MarketingAction8: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction8.vue'))),
MarketingAction9: markRaw(defineAsyncComponent(() => import('./components/marketingAction/marketingAction9.vue'))), MarketingAction9: markRaw(defineAsyncComponent(() => import('./components/marketingAction/MarketingAction9.vue'))),
MarketingAction10: markRaw( MarketingAction10: markRaw(
defineAsyncComponent(() => import('./components/marketingAction/marketingAction10.vue')) defineAsyncComponent(() => import('./components/marketingAction/MarketingAction10.vue'))
), ),
MarketingAction11: markRaw( MarketingAction11: markRaw(
defineAsyncComponent(() => import('./components/marketingAction/marketingAction11.vue')) defineAsyncComponent(() => import('./components/marketingAction/MarketingAction11.vue'))
), ),
ConditionalBranch1: markRaw( ConditionalBranch1: markRaw(
defineAsyncComponent(() => import('./components/conditionalBranch/ConditionalBranch1.vue')) defineAsyncComponent(() => import('./components/conditionalBranch/ConditionalBranch1.vue'))
......
<template> <template>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16"> <!-- <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="16" height="16">
<g> <g>
<path <path
d="M6.667 9.333h2.667v13.333h-2.667v-13.333zM1.333 13.333h2.667v5.333h-2.667v-5.333zM12 2.667h2.667v24h-2.667v-24zM17.333 5.333h2.667v24h-2.667v-24zM22.667 9.333h2.667v13.333h-2.667v-13.333zM28 13.333h2.667v5.333h-2.667v-5.333z"></path> d="M6.667 9.333h2.667v13.333h-2.667v-13.333zM1.333 13.333h2.667v5.333h-2.667v-5.333zM12 2.667h2.667v24h-2.667v-24zM17.333 5.333h2.667v24h-2.667v-24zM22.667 9.333h2.667v13.333h-2.667v-13.333zM28 13.333h2.667v5.333h-2.667v-5.333z"></path>
</g> </g>
</svg> -->
<svg
t="1678158507387"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="13789"
width="16"
height="16"
>
<path
d="M512 64c247.424 0 448 200.576 448 448S759.424 960 512 960 64 759.424 64 512 264.576 64 512 64z m28 128h-56a8 8 0 0 0-8 8v624a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8V200a8 8 0 0 0-8-8z m144 140h-56a8 8 0 0 0-8 8v344a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8V340a8 8 0 0 0-8-8z m-288 0h-56a8 8 0 0 0-8 8v344a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8V340a8 8 0 0 0-8-8z m432 92h-56a8 8 0 0 0-8 8v160a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8V432a8 8 0 0 0-8-8z m-576 0h-56a8 8 0 0 0-8 8v160a8 8 0 0 0 8 8h56a8 8 0 0 0 8-8V432a8 8 0 0 0-8-8z"
p-id="13790"
></path>
</svg> </svg>
</template> </template>
<template>
<svg
xmlns="http://www.w3.org/2000/svg"
xmlns:xlink="http://www.w3.org/1999/xlink"
fill="none"
version="1.1"
width="18"
height="18"
viewBox="0 0 18 18"
>
<g style="mix-blend-mode: passthrough">
<g><rect x="0" y="0" width="18" height="18" rx="0" fill-opacity="0.009999999776482582" /></g>
<g>
<path
d="M6.583251953125,1.6666679382324219L6.583251953125,4.166667938232422C6.583251953125,4.442807938232422,6.807109953125,4.666667938232422,7.083251953125,4.666667938232422L12.916581953125,4.666667938232422C13.192731953125,4.666667938232422,13.416581953125,4.442807938232422,13.416581953125,4.166667938232422L13.416581953125,1.6666679382324219C13.416581953125,1.3905259382324218,13.192731953125,1.1666679382324219,12.916581953125,1.1666679382324219L7.083251953125,1.1666679382324219C6.807109953125,1.1666679382324219,6.583251953125,1.3905259382324218,6.583251953125,1.6666679382324219ZM7.583251953125,3.666667938232422L7.583251953125,2.166667938232422L12.416581953125,2.166667938232422L12.416581953125,3.666667938232422L7.583251953125,3.666667938232422Z"
fill-rule="evenodd"
fill-opacity="1"
/>
</g>
<g>
<path
d="M15.833251953125,2.416667938232422L12.916551953125,2.416667938232422C12.640441953125,2.416667938232422,12.416581953125,2.6405259382324218,12.416581953125,2.916667938232422L12.416581953125,3.666667938232422L7.583251953125,3.666667938232422L7.583251953125,2.916667938232422C7.583251953125,2.6405259382324218,7.359391953125,2.416667938232422,7.083251953125,2.416667938232422L4.166581953125,2.416667938232422Q3.614299953125,2.416667938232422,3.223775953125,2.807191938232422Q2.833251953125,3.197715938232422,2.833251953125,3.749997938232422L2.833251953125,17.499967938232423Q2.833251953125,18.052267938232422,3.223777953125,18.44276793823242Q3.614298953125,18.83336793823242,4.166581953125,18.83336793823242L15.833251953125,18.83336793823242Q16.385551953125002,18.83336793823242,16.776051953125,18.44276793823242Q17.166551953125,18.052267938232422,17.166551953125,17.499967938232423L17.166551953125,3.749997938232422Q17.166551953125,3.197715938232422,16.776051953125,2.807193938232422Q16.385551953125002,2.416667938232422,15.833251953125,2.416667938232422ZM8.396721953124999,14.230467938232422L10.877641953125,11.750497938232423L7.916751953125,11.750497938232423C7.640601953125,11.750497938232423,7.416751953125,11.526647938232422,7.416751953125,11.250497938232423C7.416751953125,11.117907938232422,7.469411953125,10.990747938232422,7.563161953125,10.896987938232423L10.896321953125,7.563147938232422C10.990081953125,7.469367938232422,11.117251953125,7.4166779382324215,11.249911953125,7.416667938232422L11.603431953125,7.563077938232422C11.697211953125,7.656837938232422,11.749901953125,7.784007938232422,11.749911953125,7.916667938232422C11.749911953125,8.049257938232422,11.697251953125,8.176417938232422,11.603501953125,8.270187938232421L9.123681953125,10.750497938232423L12.085081953125,10.750497938232423C12.217721953125,10.750497938232423,12.344931953125,10.803207938232422,12.438701953125,10.897017938232421C12.633931953125,11.092317938232421,12.633861953125,11.408897938232421,12.438561953125,11.604127938232422L9.103691953125,14.937667938232423C9.015781953125,15.025567938232422,8.898281953125,15.077567938232422,8.774131953125,15.083467938232422C8.774131953125,15.083467938232422,8.750201953125,15.084067938232423,8.750111953125,15.084067938232423C8.617501953125,15.084067938232423,8.490331953125,15.031367938232421,8.396581953125,14.937567938232421C8.309161953124999,14.850067938232423,8.257241953125,14.733367938232423,8.250871953125,14.609867938232421L8.250201953125,14.584067938232423C8.250201953125,14.451467938232422,8.302911953125001,14.324267938232422,8.396721953124999,14.230467938232422Z"
fill-rule="evenodd"
fill-opacity="1"
/>
</g>
</g>
</svg>
</template>
<template> <template>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> <svg
<g> t="1678158272117"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="4903"
width="16"
height="16"
>
<path <path
d="M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2zM8.5 13.5l2.5 3.01L14.5 12l4.5 6H5l3.5-4.5z"></path> d="M935.563636 97.745455H88.436364C39.563636 97.745455 0 137.309091 0 188.509091V837.818182c0 48.872727 39.563636 88.436364 88.436364 88.436363h844.8c48.872727 0 88.436364-39.563636 88.436363-88.436363V188.509091c2.327273-51.2-37.236364-90.763636-86.109091-90.763636zM88.436364 174.545455h844.8c6.981818 0 11.636364 4.654545 11.636363 11.636363v456.145455L721.454545 381.672727 477.090909 693.527273s-188.509091-153.6-195.490909-153.6c-6.981818 0-139.636364 186.181818-204.8 276.945454v-628.363636c0-6.981818 4.654545-13.963636 11.636364-13.963636z"
</g> p-id="4904"
></path>
<path
d="M249.018182 342.109091m-62.836364 0a62.836364 62.836364 0 1 0 125.672727 0 62.836364 62.836364 0 1 0-125.672727 0Z"
p-id="4905"
></path>
</svg> </svg>
</template> </template>
<template> <template>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="16" height="16"> <svg
<g> t="1678158812871"
<rect width="48" height="48" fill="white" fill-opacity="0.01"></rect> class="icon"
<circle viewBox="0 0 1024 1024"
cx="24" version="1.1"
cy="24" xmlns="http://www.w3.org/2000/svg"
r="20" p-id="42329"
fill="none" width="16"
stroke="#333" height="16"
stroke-width="4" >
stroke-linecap="round"
stroke-linejoin="round"></circle>
<path <path
d="M29 24C29.9889 24 30.9556 23.7068 31.7779 23.1574C32.6001 22.6079 33.241 21.827 33.6194 20.9134C33.9978 19.9998 34.0969 18.9945 33.9039 18.0246C33.711 17.0546 33.2348 16.1637 32.5355 15.4645C31.8363 14.7652 30.9454 14.289 29.9755 14.0961C29.0055 13.9031 28.0002 14.0022 27.0866 14.3806C26.173 14.759 25.3921 15.3999 24.8427 16.2222C24.2932 17.0444 24 18.0111 24 19V29C24 29.9889 23.7068 30.9556 23.1574 31.7779C22.6079 32.6001 21.8271 33.241 20.9134 33.6194C19.9998 33.9978 18.9945 34.0969 18.0246 33.9039C17.0546 33.711 16.1637 33.2348 15.4645 32.5355C14.7652 31.8363 14.289 30.9454 14.0961 29.9755C13.9031 29.0055 14.0022 28.0002 14.3806 27.0866C14.759 26.173 15.3999 25.3921 16.2222 24.8427C17.0444 24.2932 18.0111 24 19 24" d="M512 0a512 512 0 1 0 512 512A512 512 0 0 0 512 0z m256.717 460.186a151.962 151.962 0 0 1-87.347 65.74 83.251 83.251 0 0 1-24.474 4.096 29.082 29.082 0 0 1 0-58.163 15.667 15.667 0 0 0 6.451-1.229 91.443 91.443 0 0 0 55.91-40.96 75.264 75.264 0 0 0 11.06-39.628c0-45.978-42.496-83.866-94.31-83.866a105.267 105.267 0 0 0-51.2 13.414 81.92 81.92 0 0 0-43.725 70.452v244.224a138.445 138.445 0 0 1-72.704 120.422 159.642 159.642 0 0 1-79.77 20.48c-84.378 0-153.6-63.488-153.6-142.029a136.192 136.192 0 0 1 19.763-69.837 151.962 151.962 0 0 1 87.347-65.74 85.914 85.914 0 0 1 24.474-4.096 29.082 29.082 0 1 1 0 58.163 15.667 15.667 0 0 0-6.451 1.229 95.949 95.949 0 0 0-55.91 40.96 75.264 75.264 0 0 0-11.06 39.628c0 45.978 42.496 83.866 94.925 83.866a105.267 105.267 0 0 0 51.2-13.414 81.92 81.92 0 0 0 43.622-70.452V390.35a138.752 138.752 0 0 1 72.807-120.525 151.245 151.245 0 0 1 79.155-21.504c84.378 0 153.6 63.488 153.6 142.029a136.192 136.192 0 0 1-19.763 69.837z"
stroke="#333" p-id="42330"
stroke-width="4" ></path>
stroke-linecap="round"
stroke-linejoin="round"></path>
</g>
</svg> </svg>
</template> </template>
<template> <template>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16"> <svg
<g> t="1678158097598"
class="icon"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="3001"
width="18"
height="18"
>
<path <path
d="M9.93 13.5h4.14L12 7.98zM20 2H4c-1.1 0-2 .9-2 2v16c0 1.1.9 2 2 2h16c1.1 0 2-.9 2-2V4c0-1.1-.9-2-2-2zm-4.05 16.5l-1.14-3H9.17l-1.12 3H5.96l5.11-13h1.86l5.11 13h-2.09z"></path> d="M790.754133 93.866667C867.733333 93.866667 930.133333 156.266667 930.133333 233.245867v557.508266C930.133333 867.733333 867.733333 930.133333 790.754133 930.133333H233.245867C156.266667 930.133333 93.866667 867.733333 93.866667 790.754133V233.245867C93.866667 156.266667 156.266667 93.866667 233.245867 93.866667h557.508266zM389.768533 775.8336a12.8 12.8 0 0 0-12.8 12.8v11.246933a12.8 12.8 0 0 0 13.4272 12.7872c31.786667-1.565867 54.3232-2.594133 67.613867-3.0848 22.638933-0.832 41.1776-1.250133 55.624533-1.250133 19.997867 0 57.220267 1.250133 111.6672 3.7504a54795.541333 54795.541333 0 0 0 18.030934 0.725333 12.8 12.8 0 0 0 12.8-12.8v-11.374933a12.8 12.8 0 0 0-12.8-12.8h-1.783467c-16.110933 0-28.608-1.527467-37.499733-4.5824-8.887467-3.054933-15.415467-8.055467-19.584-15.0016-3.6096-7.223467-6.2464-18.193067-7.914667-32.917333-1.664-14.72-2.500267-40.413867-2.500267-77.0816v-77.917867c0-38.144 0.1408-88.285867 1.92-269.0304a12.8 12.8 0 0 1 12.8-12.637867h60.6976c42.496 0 70.971733 5.905067 85.418667 17.706667 8.6528 7.0784 17.2672 26.244267 25.847467 57.5104a12.8 12.8 0 0 0 14.3104 9.258667l13.824-2.1504a12.8 12.8 0 0 0 10.7392-14.203734c-3.349333-27.323733-5.546667-47.735467-6.600534-61.243733a867.592533 867.592533 0 0 1-2.705066-67.293867 10.082133 10.082133 0 0 0-12.322134-9.8304c-11.434667 2.606933-22.1184 4.288-32.055466 5.038934-20.138667 1.527467-55.765333 2.2912-106.875734 2.2912H389.051733c-45.559467 0-77.917867-0.763733-97.083733-2.2912-9.028267-0.7168-19.0976-2.210133-30.208-4.48a12.8 12.8 0 0 0-15.330133 11.682133c-1.719467 25.5232-3.554133 45.346133-5.504 59.464533-2.039467 14.7584-6.1056 36.928-12.202667 66.5088a12.8 12.8 0 0 0 9.877333 15.104l15.240534 3.242667a12.8 12.8 0 0 0 14.856533-8.631467c10.282667-32.221867 20.258133-52.0064 29.934933-59.349333 16.110933-12.219733 45.973333-18.3296 89.582934-18.3296h58.8672a12.8 12.8 0 0 1 12.8 12.8v225.531733c0 81.109333-0.554667 136.6656-1.664 166.664534-1.109333 30.0032-3.0592 48.891733-5.8368 56.669866-4.164267 10.274133-10.555733 17.429333-19.165867 21.457067s-22.2208 6.0416-40.832 6.0416h-2.615467z"
</g> p-id="3002"
></path>
</svg> </svg>
</template> </template>
<template>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512" width="18" height="18">
<g>
<path
d="M224 256c70.7 0 128-57.3 128-128S294.7 0 224 0 96 57.3 96 128s57.3 128 128 128zm89.6 32h-16.7c-22.2 10.2-46.9 16-72.9 16s-50.6-5.8-72.9-16h-16.7C60.2 288 0 348.2 0 422.4V464c0 26.5 21.5 48 48 48h352c26.5 0 48-21.5 48-48v-41.6c0-74.2-60.2-134.4-134.4-134.4z"
></path>
</g>
</svg>
</template>
...@@ -32,16 +32,18 @@ const edit = function () { ...@@ -32,16 +32,18 @@ const edit = function () {
<template> <template>
<div class="connect-item"> <div class="connect-item">
<div class="connect-item__edit"> <div class="connect-item__edit">
<el-icon @click="edit"><Edit /></el-icon> <img @click="edit" src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_edit.png" alt="" />
<!-- <el-icon @click="edit"><Edit /></el-icon> -->
</div> </div>
<div class="connect-item__remove" @click="handleRemove"> <div class="connect-item__remove" @click="handleRemove">
<el-icon><Delete /></el-icon> <img src="https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_delete.png" alt="" />
<!-- <el-icon><Delete /></el-icon> -->
</div> </div>
<div @click="routerView" style="display: flex; width: 100%; flex-direction: column; align-items: center"> <div @click="routerView" style="display: flex; width: 100%; flex-direction: column; align-items: center">
<div class="connect-item__icon"> <div class="connect-item__icon">
<Icon w="40" h="40" :multicolour="true" class="svg" :name="data?.type"></Icon> <Icon w="40" h="40" :multicolour="true" class="svg" :name="data?.type"></Icon>
</div> </div>
<p style="font-size: 18px;margin-top: 8px;">{{ data?.type_name }}</p> <p style="font-size: 18px; margin-top: 8px">{{ data?.type_name }}</p>
</div> </div>
</div> </div>
</template> </template>
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
...@@ -44,8 +44,8 @@ const listOptions = computed(() => { ...@@ -44,8 +44,8 @@ const listOptions = computed(() => {
prop: 'status_name', prop: 'status_name',
computed: (row: any) => { computed: (row: any) => {
return row.row.status === '0' return row.row.status === '0'
? `<span style="color: #00ac27">${row.row.status_name}</span>` ? `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>`
: `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>` : `<span style="color: #00ac27">${row.row.status_name}</span>`
} }
}, },
{ label: '更新人', prop: 'updated_operator_name' }, { label: '更新人', prop: 'updated_operator_name' },
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
...@@ -44,8 +44,8 @@ const listOptions = computed(() => { ...@@ -44,8 +44,8 @@ const listOptions = computed(() => {
prop: 'status_name', prop: 'status_name',
computed: (row: any) => { computed: (row: any) => {
return row.row.status === '0' return row.row.status === '0'
? `<span style="color: #00ac27">${row.row.status_name}</span>` ? `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>`
: `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>` : `<span style="color: #00ac27">${row.row.status_name}</span>`
} }
}, },
{ label: '更新人', prop: 'updated_operator_name' }, { label: '更新人', prop: 'updated_operator_name' },
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
......
...@@ -21,7 +21,7 @@ const listOptions = computed(() => { ...@@ -21,7 +21,7 @@ const listOptions = computed(() => {
}, },
filters: [ filters: [
{ type: 'input', prop: 'name', placeholder: '请输入资料名称' }, { type: 'input', prop: 'name', placeholder: '请输入资料名称' },
{ type: 'input', prop: 'name', placeholder: '请输入资料ID' }, { type: 'input', prop: 'id', placeholder: '请输入资料ID' },
{ {
type: 'select', type: 'select',
prop: 'status', prop: 'status',
...@@ -44,8 +44,8 @@ const listOptions = computed(() => { ...@@ -44,8 +44,8 @@ const listOptions = computed(() => {
prop: 'status_name', prop: 'status_name',
computed: (row: any) => { computed: (row: any) => {
return row.row.status === '0' return row.row.status === '0'
? `<span style="color: #00ac27">${row.row.status_name}</span>` ? `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>`
: `<span style="color: rgb(170, 2, 49)">${row.row.status_name}</span>` : `<span style="color: #00ac27">${row.row.status_name}</span>`
} }
}, },
{ label: '更新人', prop: 'updated_operator_name' }, { label: '更新人', prop: 'updated_operator_name' },
......
...@@ -26,7 +26,6 @@ const getConnectionsList = function () { ...@@ -26,7 +26,6 @@ const getConnectionsList = function () {
let fieldsList = $ref<MemberFieldsProp[]>([]) let fieldsList = $ref<MemberFieldsProp[]>([])
const getFieldsList = function () { const getFieldsList = function () {
getMemberFieldsList().then((res: { data: MemberFieldsProp[] }) => { getMemberFieldsList().then((res: { data: MemberFieldsProp[] }) => {
console.log(res, 'res', props.data?.fields)
fieldsList = res.data.map((item: any) => { fieldsList = res.data.map((item: any) => {
item.value = '' item.value = ''
if (props.data) { if (props.data) {
...@@ -81,11 +80,16 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -81,11 +80,16 @@ const submitForm = (formEl: FormInstance | undefined) => {
ElMessage({ message: '更新成功', type: 'success' }) ElMessage({ message: '更新成功', type: 'success' })
}) })
} else { } else {
createMember(params).then(res => { createMember(params)
.then(res => {
emit('update') emit('update')
emit('update:modelValue', false) emit('update:modelValue', false)
ElMessage({ message: '添加成功', type: 'success' }) ElMessage({ message: '添加成功', type: 'success' })
}) })
.catch((res: any) => {
ElMessage.closeAll()
ElMessage.error(fieldsList.find((item: any) => item.id === res.data.error_field)?.name + res.message)
})
} }
} else { } else {
console.log('error submit!') console.log('error submit!')
...@@ -156,11 +160,11 @@ const submitForm = (formEl: FormInstance | undefined) => { ...@@ -156,11 +160,11 @@ const submitForm = (formEl: FormInstance | undefined) => {
</template> </template>
<el-input v-else v-model="item.value" style="width: 100%" placeholder="请输入"></el-input> <el-input v-else v-model="item.value" style="width: 100%" placeholder="请输入"></el-input>
</el-form-item> </el-form-item>
<el-form-item>
<el-button type="primary" @click="submitForm(ruleFormRef)">提交</el-button>
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
</el-form-item>
</el-form> </el-form>
<div style="display: flex; justify-content: center">
<el-button v-if="!props.data?.isView" type="primary" @click="submitForm(ruleFormRef)">提交</el-button>
<el-button @click="$emit('update:modelValue', false)">关闭</el-button>
</div>
</el-dialog> </el-dialog>
</template> </template>
<style lang="scss"> <style lang="scss">
......
...@@ -48,6 +48,9 @@ export interface AttributesProp { ...@@ -48,6 +48,9 @@ export interface AttributesProp {
} }
export interface ImageProp { export interface ImageProp {
mobile: string
gender_name: string
gender: string
name: string name: string
connection_name: string connection_name: string
id: string id: string
...@@ -55,7 +58,7 @@ export interface ImageProp { ...@@ -55,7 +58,7 @@ export interface ImageProp {
status_name: string status_name: string
status: string status: string
updated_time: string updated_time: string
tag: string[] tags: string[]
static_groups: string[] static_groups: string[]
dynamic_groups: string[] dynamic_groups: string[]
events: { events: {
......
...@@ -41,7 +41,16 @@ const getDate = function (date: string) { ...@@ -41,7 +41,16 @@ const getDate = function (date: string) {
<div class="info-box"> <div class="info-box">
<div class="info-name" style="min-width: 300px"> <div class="info-name" style="min-width: 300px">
<div class="tx"> <div class="tx">
<el-icon :size="50" color="#fff"><UserFilled /></el-icon> <img
:src="
data?.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=""
/>
<!-- https://webapp-pub.oss-cn-beijing.aliyuncs.com/pages/assa/dml_boy.png -->
<!-- <el-icon :size="50" color="#fff"><UserFilled /></el-icon> -->
</div> </div>
<h1>{{ data?.name }}</h1> <h1>{{ data?.name }}</h1>
<div class="line"></div> <div class="line"></div>
...@@ -83,6 +92,11 @@ const getDate = function (date: string) { ...@@ -83,6 +92,11 @@ const getDate = function (date: string) {
<AppCard class="card" title="用户属性"> <AppCard class="card" 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="110px"> <el-form label-suffix=":" label-width="110px">
<el-form-item label="链接来源">{{ data?.connection_name }}</el-form-item>
<el-form-item label="姓名">{{ data?.name }}</el-form-item>
<el-form-item label="状态">{{ data?.status_name }}</el-form-item>
<el-form-item label="性别">{{ data?.gender_name }}</el-form-item>
<el-form-item label="电话">{{ data?.mobile }}</el-form-item>
<template v-for="item in fieldsList"> <template v-for="item in fieldsList">
<el-form-item v-if="item?.isShow" :label="item?.name" <el-form-item v-if="item?.isShow" :label="item?.name"
><span>{{ item?.value }}</span></el-form-item ><span>{{ item?.value }}</span></el-form-item
...@@ -94,9 +108,9 @@ const getDate = function (date: string) { ...@@ -94,9 +108,9 @@ const getDate = function (date: string) {
<AppCard class="card" title="标签与群组"> <AppCard class="card" title="标签与群组">
<el-tabs class="demo-tabs"> <el-tabs class="demo-tabs">
<el-tab-pane label="用户标签"> <el-tab-pane label="用户标签">
<el-empty v-if="!data?.tag" description="暂无数据" :image-size="80" /> <el-empty v-if="!data?.tags || !data?.tags.length" description="暂无数据" :image-size="80" />
<div class="scroll" v-else> <div class="scroll" v-else>
<el-tag class="ml-2" type="success" v-for="item in data?.tag">{{ item }}</el-tag> <el-tag class="ml-2" type="success" v-for="item in data?.tags">{{ item }}</el-tag>
</div> </div>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
...@@ -140,19 +154,6 @@ const getDate = function (date: string) { ...@@ -140,19 +154,6 @@ const getDate = function (date: string) {
</div> </div>
</div> </div>
</div> </div>
<div class="event-box" v-for="item in data?.events?.list">
<div class="date">{{ item.updated_time?.slice(0, item.updated_time.indexOf(' ')) }}</div>
<div class="event-content">
<div class="time">
{{ item.updated_time?.slice(item.updated_time.indexOf(' '), item.updated_time.length - 3) }}
{{ getDate(item.updated_time) }}
</div>
<Icon class="icon" :name="item.connection_type" w="30" h="30"></Icon>
<div class="event">
<span>"{{ item.connection_name }}"</span><span>"{{ item.event_name }}"</span>
</div>
</div>
</div>
</AppCard> </AppCard>
</div> </div>
</template> </template>
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
import { Plus, Download, Upload, Delete } from '@element-plus/icons-vue' import { Plus, Download, Upload, Delete } from '@element-plus/icons-vue'
import AppList from '@/components/base/AppList.vue' import AppList from '@/components/base/AppList.vue'
import { getMemberList, deleteMember } from '../api' import { getMemberList, deleteMember } from '../api'
import { ElMessage } from 'element-plus' import { ElMessage, ElMessageBox } from 'element-plus'
import type { MemberProp } from '../types' import type { MemberProp } from '../types'
const UpdateDialog = defineAsyncComponent(() => import('../components/UpdateDialog.vue')) const UpdateDialog = defineAsyncComponent(() => import('../components/UpdateDialog.vue'))
...@@ -79,8 +79,20 @@ function handleSelectionChange(selection: MemberProp[]) { ...@@ -79,8 +79,20 @@ function handleSelectionChange(selection: MemberProp[]) {
} }
// 删除 // 删除
const handleRemove = function (row: { id: string }) { const handleRemove = function (row: { id: string; have_event: boolean }) {
if (row.have_event) {
ElMessageBox.confirm('此操作将会删除用户及所有关联事件数据', '提示', {
confirmButtonText: '确认',
cancelButtonText: '取消',
type: 'warning'
})
.then(() => {
deleteMembers(row.id) deleteMembers(row.id)
})
.catch(() => {})
} else {
deleteMembers(row.id)
}
} }
const handleRemoves = function () { const handleRemoves = function () {
const ids = multipleSelection const ids = multipleSelection
......
...@@ -5,6 +5,7 @@ import { useUserStore } from '@/stores/user' ...@@ -5,6 +5,7 @@ import { useUserStore } from '@/stores/user'
import IconMetadata from '@/components/icon/IconMetadata.vue' import IconMetadata from '@/components/icon/IconMetadata.vue'
import IconConnect from '@/components/icon/IconConnect.vue' import IconConnect from '@/components/icon/IconConnect.vue'
import IconUser from '@/components/icon/IconUser.vue' import IconUser from '@/components/icon/IconUser.vue'
import IconUser2 from '@/components/icon/IconUser2.vue'
import IconLabel from '@/components/icon/IconLabel.vue' import IconLabel from '@/components/icon/IconLabel.vue'
import IconGroup from '@/components/icon/IconGroup.vue' import IconGroup from '@/components/icon/IconGroup.vue'
import IconMaterial from '@/components/icon/IconMaterial.vue' import IconMaterial from '@/components/icon/IconMaterial.vue'
...@@ -18,6 +19,7 @@ import IconH5 from '@/components/icon/IconH5.vue' ...@@ -18,6 +19,7 @@ import IconH5 from '@/components/icon/IconH5.vue'
import IconQrcode from '@/components/icon/IconQrcode.vue' import IconQrcode from '@/components/icon/IconQrcode.vue'
import IconMiniProgram from '@/components/icon/IconMiniProgram.vue' import IconMiniProgram from '@/components/icon/IconMiniProgram.vue'
import IconCard from '@/components/icon/IconCard.vue' import IconCard from '@/components/icon/IconCard.vue'
import IconEvent from '@/components/icon/IconEvent.vue'
interface State { interface State {
studentMenus: IMenuItem[] studentMenus: IMenuItem[]
...@@ -98,8 +100,8 @@ const adminMenus: IMenuItem[] = [ ...@@ -98,8 +100,8 @@ const adminMenus: IMenuItem[] = [
icon: markRaw(IconMetadata), icon: markRaw(IconMetadata),
tag: 'v1-experiment-meta', tag: 'v1-experiment-meta',
children: [ children: [
{ name: '用户属性管理', path: '/metadata/user', tag: 'v1-experiment-meta-member' }, { name: '用户属性管理', path: '/metadata/user', icon: markRaw(IconUser2), tag: 'v1-experiment-meta-member' },
{ name: '事件属性管理', path: '/metadata/event', tag: 'v1-experiment-meta-event' } { name: '事件属性管理', path: '/metadata/event', icon: markRaw(IconEvent), tag: 'v1-experiment-meta-event' }
] ]
}, },
{ {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论