sjy-two #114

Closed
free wants to merge 8 commits from sjy-two into master
10 changed files with 353 additions and 33 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.7 KiB

View File

@ -24,7 +24,7 @@
:content="appLink.path" placement="bottom" :show-after="300"> :content="appLink.path" placement="bottom" :show-after="300">
<el-button class="m-b-8px m-r-8px m-l-0px!" <el-button class="m-b-8px m-r-8px m-l-0px!"
:type="isSameLink(appLink.path, activeAppLink.path) ? 'primary' : 'default'" :type="appLink.path == activeAppLink.path ? 'primary' : 'default'"
@click="handleAppLinkSelected(appLink)"> @click="handleAppLinkSelected(appLink)">
{{ appLink.name }} {{ appLink.name }}
</el-button> </el-button>
@ -109,9 +109,14 @@
// APP // APP
const handleAppLinkSelected = (appLink : AppLink) => { const handleAppLinkSelected = (appLink : AppLink) => {
if (!isSameLink(appLink.path, activeAppLink.value.path)) { if(!appLink.path.includes('/pages/index/page')){
activeAppLink.value = appLink if (!isSameLink(appLink.path, activeAppLink.value.path)) {
console.log(activeAppLink.value,activeAppLink.value.path,"activeAppLink.value") activeAppLink.value = appLink
// console.log(activeAppLink.value,activeAppLink.value.path,"activeAppLink.value")
}
}else{
activeAppLink.value.path = appLink.path
console.log(activeAppLink.value.path,"activeAppLink.value.path")
} }
switch (appLink.type) { switch (appLink.type) {
case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST: case APP_LINK_TYPE_ENUM.PRODUCT_CATEGORY_LIST:

View File

@ -112,7 +112,7 @@ defineProps<{ property: MenuGridProperty }>()
border-radius: 5px; border-radius: 5px;
margin: 0 auto; margin: 0 auto;
padding: 5px 0; padding: 5px 0;
margin-top: 10px; // margin-top: 10px;
padding-bottom: 10px; padding-bottom: 10px;
padding-top: 10px; padding-top: 10px;
&>.t { &>.t {

View File

@ -34,14 +34,6 @@
<div class="content-wrap"> <div class="content-wrap">
<ContentWrap> <ContentWrap>
<el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px"> <el-form class="-mb-15px" :model="queryParams" ref="queryFormRef" :inline="true" label-width="68px">
<!-- <el-form-item label="文件路径" prop="path">
<el-input
v-model="queryParams.path"
placeholder="请输入文件路径"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item> -->
<el-form-item label="文件类型" prop="type" width="80"> <el-form-item label="文件类型" prop="type" width="80">
<el-input v-model="queryParams.type" placeholder="请输入文件类型" clearable <el-input v-model="queryParams.type" placeholder="请输入文件类型" clearable
@keyup.enter="handleQuery" /> @keyup.enter="handleQuery" />
@ -63,12 +55,15 @@
<Icon icon="ep:upload" class="mr-5px" /> 上传文件 <Icon icon="ep:upload" class="mr-5px" /> 上传文件
</el-button> </el-button>
</el-form-item> </el-form-item>
<span><img @click="liebiao" style="cursor: pointer;" class="mr-10px h-30px w-30px" src="@/assets/imgs/liebiao.png" /></span>
<span><img @click="tubiao" style="cursor: pointer;" class="mr-10px h-30px w-30px" src="@/assets/imgs/tubiao.png" /></span>
</el-form> </el-form>
</ContentWrap> </ContentWrap>
<ContentWrap>
<el-table v-loading="loading" :data="list"> <el-table v-loading="loading" :data="list" v-show="panduan == '1'">
<el-table-column label="文件内容" align="center" prop="url" width="110px"> <el-table-column label="文件内容" align="center" prop="url" width="110px">
<template #default="{ row }"> <template #default="{ row }">
<el-image v-if="row.type.includes('image')" class="h-80px w-80px" lazy :src="row.url" <el-image v-if="row.type.includes('image')" class="h-80px w-80px" lazy :src="row.url"
@ -82,15 +77,7 @@
<el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" /> <el-table-column label="文件名" align="center" prop="name" :show-overflow-tooltip="true" />
<!-- <el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" /> --> <!-- <el-table-column label="文件路径" align="center" prop="path" :show-overflow-tooltip="true" /> -->
<el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" /> <el-table-column label="URL" align="center" prop="url" :show-overflow-tooltip="true" />
<!-- <el-table-column label="文件大小" align="center" prop="size" width="120"
:formatter="fileSizeFormatter" /> -->
<!-- <el-table-column label="文件类型" align="center" prop="type" width="180px" />
<el-table-column label="图片分类" align="center" prop="picType">
<template #default="scope">
<dict-tag :type="DICT_TYPE.INFRA_FILE_TYPE" :value="scope.row.picType" />
</template>
</el-table-column> -->
<el-table-column label="上传时间" align="center" prop="createTime" width="180" <el-table-column label="上传时间" align="center" prop="createTime" width="180"
:formatter="dateFormatter" /> :formatter="dateFormatter" />
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
@ -106,7 +93,18 @@
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
</ContentWrap>
<div v-show="panduan == '2'">
<!-- 图片展示区域 -->
<div class="image-container">
<div v-for="item in tubiaoData" :key="item.id" class="image-item">
<img :src="item.url" alt="图表" />
</div>
</div>
</div>
<!-- 分页 --> <!-- 分页 -->
<Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize" <Pagination :total="total" v-model:page="queryParams.pageNo" v-model:limit="queryParams.pageSize"
@pagination="getList" /> @pagination="getList" />
@ -169,6 +167,8 @@
const dialogVisibles = ref(false) // const dialogVisibles = ref(false) //
const dialogTitles = ref('') // const dialogTitles = ref('') //
const formLoading = ref(false) // 12 const formLoading = ref(false) // 12
const panduan = ref('1')
const tubiaoData = ref<FileDataVO[]>([]);
const formData = ref({ const formData = ref({
id: undefined, id: undefined,
sort: undefined, sort: undefined,
@ -210,17 +210,37 @@
try { try {
const data = await FileApi.getFilePage(queryParams) const data = await FileApi.getFilePage(queryParams)
list.value = data.list list.value = data.list
tubiaoData.value = data.list
console.log('111111',tubiaoData)
total.value = data.total total.value = data.total
} finally { } finally {
loading.value = false loading.value = false
} }
} }
interface FileDataVO {
id: string
configId: string
path: string
name: string
url: string
type: string
picType: string
size: string
createTime: Date
}
const tubiao = () => {
panduan.value = '2'
}
const liebiao = () => {
panduan.value = '1'
}
// //
const createType = () => { const createType = () => {
dialogVisibles.value = true dialogVisibles.value = true
dialogTitles.value = '新增分类' dialogTitles.value = '新增分类'
} }
/** 添加分类菜单 */ /** 添加分类菜单 */
@ -291,7 +311,6 @@
const getTypeList = async () => { const getTypeList = async () => {
const data = await DictDataApi.getTypeList() const data = await DictDataApi.getTypeList()
typeMenu.value = data typeMenu.value = data
console.log('1111111111', typeMenu)
} }
@ -373,4 +392,29 @@
overflow-y: auto; overflow-y: auto;
/* 允许内容区域滚动 */ /* 允许内容区域滚动 */
} }
</style>
/* 图片容器样式 */
.image-container {
display: flex;
flex-wrap: wrap;
gap: 10px; /* 设置图片之间的间距 */
justify-content: flex-start; /* 如果图片少于5张会平均分布 */
max-width: 1000px; /* 设置外部容器的最大宽度 */
margin: 0 auto; /* 居中显示 */
}
/* 每张图片占用的宽度使每行显示5张 */
.image-item {
width: calc(20% - 8px); /* 宽度设为容器的20%,减去间距 */
}
/* 设置图片的最大宽度 */
.image-item img {
width: 100%;
height: auto;
border-radius: 8px; /* 图片边缘圆角(可选) */
}
</style>

View File

@ -92,8 +92,6 @@ const open = async (type: string, ids: number, picTypes: number) => {
formLoading.value = true formLoading.value = true
id.value = ids id.value = ids
picType.value = picTypes picType.value = picTypes
console.log('11111',ids)
console.log('2222',picType.value)
formLoading.value = false formLoading.value = false
} }
} }

View File

@ -0,0 +1,109 @@
<template>
<div class="main">
<div class="mainTop">
<div>商品分类</div>
<div class="right">
<div class="save" @click="save">保存</div>
<div class="cz" @click="cz">重置</div>
</div>
</div>
<div class="mainBottom">
<div class='item' :class="currItem== 1 ? 'on': ''" @click="clickItem(1)">
<img class="img" src="https://zysc.fjptzykj.com:3000/shangcheng/a7d0409cbf5335a2780409756914c530fc7c88bec85fc81302b53760d9be4a03.jpg" />
<div class="text">样式1</div>
</div>
<div class='item' :class="currItem== 2 ? 'on': ''" @click="clickItem(2)">
<img class="img" src="https://zysc.fjptzykj.com:3000/shangcheng/9096b2c04a6e46ea562999a93a1b975100c6b4557e680dcb31de6d3555407841.png" />
<div class="text">样式2</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
// TODO @ decorate index.vue
import * as DiyTemplateApi from '@/api/mall/promotion/diy/template'
import * as DiyPageApi from '@/api/mall/promotion/diy/page'
import { useTagsdivStore } from '@/store/modules/tagsdiv'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // DIY DiyEditor
import { toNumber } from 'lodash-es'
const currItem = ref(1);
function clickItem (val){
currItem.value = val;
}
function cz (val){
currItem.value = 1;
}
function save (){
// currItem.value = val;
console.log("请求接口还没有写啊!!!!快让后端提供啊")
}
</script>
<style lang="scss" scoped>
.main{
display:flex;
flex-wrap:wrap;
.mainTop{
width:100%;
margin:10px 10px;
background:white;
padding:10px 20px;
font-weight:700;
display:flex;
justify-content:space-between;
align-items: center;
.right{
display:flex;
div{
padding:5px 15px;
font-weight:400;
font-size: 14px;
}
.save{
background:#0256FF;
margin-right:10px;
color:white;
cursor: pointer;
}
.cz{
border:1px solid #cccccc;
cursor: pointer;
}
}
}
.mainBottom{
width:100%;
margin:10px 10px;
background:white;
padding:30px 30px;
display:flex;
.item{
margin-right:20px;
text-align: center;
border-radius: 12px;
cursor: pointer;
&.on{
.text{
color:#0256ff;
}
.img{
border:2px solid #0256ff;
}
}
.img{
width:260px;
border-radius: 12px;
border:2px solid white;
}
.text{
margin-top:10px;
}
}
}
}
</style>

View File

@ -0,0 +1,162 @@
<template>
<div class="main">
<div class="mainTop">
<div>主题风格</div>
<div class="right">
<div class="save" @click="save">保存</div>
<!-- <div class="cz" @click="cz">重置</div> -->
</div>
</div>
<div class="ztfg">
<div class='top'>
<div class="item" :class="currItem== 1 ? 'on': ''" @click="clickItem(1)">
<div class="le"></div>
<div class="ri">天空蓝</div>
</div>
<div class="item" :class="currItem== 2 ? 'on': ''" @click="clickItem(2)">
<div class="le" style="background:rgb(66, 202, 77);"></div>
<div class="ri">生鲜绿</div>
</div>
</div>
<div class="mainBottom">
<div class='item' v-show="currItem== 1">
<img class="img"
src="https://zysc.fjptzykj.com:3000/shangcheng/4bffe9f0cee9605262a579ee45156c9e37a16e2a24035a0e49b8a4433075f793.jpg" />
</div>
<div class='item' v-show="currItem== 2">
<img class="img"
src="https://zysc.fjptzykj.com:3000/shangcheng/0d0a7ab210afb5cee674e402ca3ec197a30523687acbec2e8e5f16fb52075e9b.jpg" />
</div>
</div>
</div>
</div>
</template>
<script setup lang="ts">
// TODO @ decorate index.vue
import * as DiyTemplateApi from '@/api/mall/promotion/diy/template'
import * as DiyPageApi from '@/api/mall/promotion/diy/page'
import { useTagsdivStore } from '@/store/modules/tagsdiv'
import { DiyComponentLibrary, PAGE_LIBS } from '@/components/DiyEditor/util' // DIY DiyEditor
import { toNumber } from 'lodash-es'
const currItem = ref(1);
function clickItem(val) {
currItem.value = val;
}
function cz(val) {
currItem.value = 1;
}
function save() {
// currItem.value = val;
console.log("请求接口还没有写啊!!!!快让后端提供啊")
}
</script>
<style lang="scss" scoped>
.main {
display: flex;
flex-wrap: wrap;
.mainTop {
width: 100%;
margin: 10px 10px;
background: white;
padding: 10px 20px;
font-weight: 700;
display: flex;
justify-content: space-between;
align-items: center;
.right {
display: flex;
div {
padding: 5px 15px;
font-weight: 400;
font-size: 14px;
}
.save {
background: #0256FF;
margin-right: 10px;
color: white;
cursor: pointer;
}
.cz {
border: 1px solid #cccccc;
cursor: pointer;
}
}
}
.ztfg {
width: 100%;
margin: 10px 10px;
background: white;
padding: 30px 30px;
.top{
display: flex;
margin-bottom: 10px;
.item{
padding:10px 15px;
border:1px solid #cccccc;
border-radius:6px;
margin-right:10px;
display:flex;
align-items:center;
cursor: pointer;
&.on{
border:1px solid #0256ff;
}
.le{
margin-right:10px;
border-radius:6px;
width:25px;
height:25px;
background:rgb(28, 165, 233);
}
.ti{
}
}
}
.mainBottom {
display: flex;
.item {
margin-right: 20px;
text-align: center;
border-radius: 12px;
// &.on {
// .text {
// color: #0256ff;
// }
// .img {
// border: 2px solid #0256ff;
// }
// }
.img {
width: 800px;
border-radius: 12px;
border: 2px solid white;
}
.text {
margin-top: 10px;
}
}
}
}
}
</style>

View File

@ -18,6 +18,8 @@ public class RedisWebSocketMessageConsumer extends AbstractRedisChannelMessageLi
redisWebSocketMessageSender.send(message.getSessionId(), redisWebSocketMessageSender.send(message.getSessionId(),
message.getUserType(), message.getUserId(), message.getUserType(), message.getUserId(),
message.getMessageType(), message.getMessageContent()); message.getMessageType(), message.getMessageContent());
System.out.println("11111111111111111111 : " + message.toString());
} }
} }

View File

@ -165,7 +165,7 @@ public class KeFuMessageServiceImpl implements KeFuMessageService {
@Async @Async
public void sendAsyncMessageToMembers(Long userId, String messageType, Object content) { public void sendAsyncMessageToMembers(Long userId, String messageType, Object content) {
webSocketSenderApi.sendObject(UserTypeEnum.MEMBER.getValue(), userId, messageType, content); webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), userId, messageType, content);
} }
@Async @Async
@ -175,7 +175,7 @@ public class KeFuMessageServiceImpl implements KeFuMessageService {
@Async @Async
public void sendAsyncMessageToAdmins(String messageType, Object content) { public void sendAsyncMessageToAdmins(String messageType, Object content) {
webSocketSenderApi.sendObject(UserTypeEnum.MEMBER.getValue(), messageType, content); webSocketSenderApi.sendObject(UserTypeEnum.ADMIN.getValue(), messageType, content);
} }
@Override @Override