Commit c4b1fbda authored by zhengke's avatar zhengke

Merge branch 'master' into 1.4.0

parents 904a4bfc 5de5ef01
......@@ -64,6 +64,7 @@
"tippy.js": "^6.3.7",
"vue": "^3.4.21",
"vue-konva": "^3.0.2",
"vue-picture-cropper": "^0.7.0",
"vue-router": "^4.0.13",
"vue-waterfall-plugin-next": "^2.4.3",
"vue-waypoint": "^4.3.0",
......
......@@ -249,6 +249,13 @@ const routes: RouteRecordRaw[] = [
title:'云盘空间'
}
},
{
path: '/a/l',
component: () => import('@/views/TeamCenter/LogoDisposition.vue'),
meta:{
title:'LOGO设置'
}
},
{
path: '/a/order',
component: () => import('@/views/TeamCenter/Order.vue'),
......
import Api,{ HttpResponse, Result } from '../utils/request';
class LOGOService{
static async EnableGroupLogo(IsEnableLogo:number):Promise<HttpResponse>{
let params = {IsEnableLogo}
return Api.Post("ppt_EnableGroupLogo",params)
}
static async DelGroupLogo(TId:any):Promise<HttpResponse>{
return Api.Post("ppt_DelGroupLogo",{TId})
}
static async SetBatchGroupLogo(LogoList:any):Promise<HttpResponse>{
let params = {LogoList}
return Api.Post("ppt_SetBatchGroupLogo",params)
}
static async SetGroupLogo(params:any):Promise<HttpResponse>{
return Api.Post("ppt_SetGroupLogo",params)
}
static async GetPPTistGroupLogoList():Promise<HttpResponse>{
return Api.Post("ppt_GetPPTistGroupLogoList",{})
}
}
export default LOGOService;
\ No newline at end of file
......@@ -29,6 +29,7 @@ const menus:{menu:Menu,owner:MenuOwner}[] = [
// {menu:{name:'数据统计',icon:'IconDashBoard',url:'/a/d'},owner:'A'},
{menu:{name:'水印设置',icon:'IconTag',url:'/a/w'},owner:'A'},
{menu:{name:'云盘空间',icon:'IconCloudStorage',url:'/a/c'},owner:'A'},
// {menu:{name:'LOGO设置',icon:'IconPicture',url:'/a/l'},owner:'A'},
{menu:{name:'订单/发票',icon:'IconCurrency',url:'/a/order'},owner:'E'},
{
menu:{
......
......@@ -209,4 +209,16 @@ export const DominantColour = () =>{
export const getRgbLevel = (colorarr:any) => {
return colorarr[0] * 0.299 + colorarr[1] * 0.587 + colorarr[2] * 0.114
}
// base64 图
export const dataURLtoFile = (file:any) => {
const reader = new FileReader();
reader.readAsDataURL(file);
reader.onload = (e:any) => {
const base64 = e.target.result
// 添加 base64 文件,这里假设文件名为 'file'
let basestr = base64.split(',')
return base64
};
}
\ No newline at end of file
......@@ -611,13 +611,22 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let scale = parseInt(y.width/y.height)
let url = ''
console.log()
if(scale>=1&&scale<3&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>=5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&day) url = acquiesceLogo.value[2]
if(userInfo.value.IsEnableLogo&&userInfo.value.GroupLogoList&&userInfo.value.GroupLogoList.length>0){
let LOGOS = userInfo.value.GroupLogoList
if(scale>=1&&scale<3&&!day) url = dark==true?LOGOS[0].FilePath:LOGOS[3].FilePath
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?LOGOS[1].FilePath:LOGOS[4].FilePath
if(scale>=5) url = dark==true?LOGOS[2].FilePath:LOGOS[5].FilePath
if(scale>=3&&scale<5&&!day) url = dark==true?LOGOS[2].FilePath:LOGOS[5].FilePath
if(scale>=3&&scale<5&&day) url = LOGOS[2].FilePath
}else{
if(scale>=1&&scale<3&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>=5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&day) url = acquiesceLogo.value[2]
}
let newTempSize = await FileService.getImageSizeWithoutDownloading(url)
let width = 0
let height = 0
......
......@@ -174,12 +174,23 @@ const ResolveTripLogoHandler = async (items:any, slideIndex:number,dark:false,da
let tempSize = await FileService.getImageSizeWithoutDownloading(templateObj[i].src)
let scale = parseInt(y.width/y.height)
let url = ''
if(scale>=1&&scale<3&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>=5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&day) url = acquiesceLogo.value[2]
// if(userInfo.value.IsEnableLogo&&userInfo.value.GroupLogoList&&userInfo.value.GroupLogoList.length>0){
// let LOGOS = userInfo.value.GroupLogoList
// if(scale>=1&&scale<3&&!day) url = dark==true?LOGOS[0].FilePath:LOGOS[3].FilePath
// if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
// if(scale<1) url = dark==true?LOGOS[1].FilePath:LOGOS[4].FilePath
// if(scale>=5) url = dark==true?LOGOS[2].FilePath:LOGOS[5].FilePath
// if(scale>=3&&scale<5&&!day) url = dark==true?LOGOS[2].FilePath:LOGOS[5].FilePath
// if(scale>=3&&scale<5&&day) url = LOGOS[2].FilePath
// }else{
// }
if(scale>=1&&scale<3&&!day) url = dark==true?acquiesceLogo.value[0]:acquiesceLogo.value[3]
if(scale>=1&&scale<3&&day) url = acquiesceLogo.value[6]
if(scale<1) url = dark==true?acquiesceLogo.value[1]:acquiesceLogo.value[4]
if(scale>=5) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&!day) url = dark==true?acquiesceLogo.value[2]:acquiesceLogo.value[5]
if(scale>=3&&scale<5&&day) url = acquiesceLogo.value[2]
let newTempSize = await FileService.getImageSizeWithoutDownloading(url)
let width = 0
let height = 0
......
......@@ -15,7 +15,7 @@
<el-menu :default-active="activeIndex" class="no-border md-menu col" router>
<template v-for="(x,i) in menus" :key="i">
<el-sub-menu :index="i" v-if="x.children && x.children.length>0">
<el-sub-menu :index="`${i}`" v-if="x.children && x.children.length>0">
<template #title>
<component :is="x.icon" style="font-size: 20px;"></component>
<span class="q-ml-lg">{{ x.name }}</span>
......@@ -42,9 +42,10 @@
<script lang="ts" setup>
import UserCard from "@/components/User/UserCard.vue";
import { useMenuStore } from "@/store";
import { useMenuStore, useUserStore } from "@/store";
import { ref, watch } from "vue";
import { useRouter } from "vue-router";
import { storeToRefs } from 'pinia'
const router = useRouter()
const useMenu = useMenuStore();
......@@ -52,6 +53,7 @@ const menus = ref(useMenu.getTeamMenu);
const activeIndex = ref('0')
const path = ref('')
path.value = router.currentRoute.value.path
const { userInfo } =storeToRefs(useUserStore())
const forwardSpace = () => router.push('/space')
if(menus.value.length==0){
router.push({
......@@ -60,7 +62,9 @@ if(menus.value.length==0){
}
watch(() => router.currentRoute.value.path, (toPath) => {
menus.value = useMenu.getTeamMenu
if(userInfo.value.isp){
menus.value = useMenu.getTeamMenu.filter(x=> {return x.url!='/a/l'})
} else menus.value = useMenu.getTeamMenu
if(!menus.value) return
menus.value.forEach((x,i)=>{
if(x.url==router.currentRoute.value.path){
......
This diff is collapsed.
......@@ -129,7 +129,7 @@
<el-dialog v-model="removeVisible" title="移除成员" style="width:400px;">
<main>
<el-alert type="warning" show-icon :closable="false">
<template #title>
<template #header>
<span class="text-normal text-dark">你正在移除成员<span class="text-weight-bolder">{{ removeMemberModel.name }}</span>,移除后,该成员将无法访问本团队/企业,其在「我的空间」中的所有内容将被清空,且不可恢复,请谨慎操作</span>
</template>
</el-alert>
......@@ -145,7 +145,7 @@
<el-dialog v-model="exchangeVisible" title="转让管理员" style="width:400px;">
<main>
<el-alert type="warning" show-icon :closable="false">
<template #title>
<template #header>
<span class="text-normal text-dark">你正在转让超级管理员,转让后你将失去团队/企业管理的最高权限,请谨慎操作</span>
</template>
</el-alert>
......
......@@ -16,7 +16,7 @@
</div>
</div>
<el-dialog v-model="wmFormVisible" style="width:560px;" :show-close="false" :close-on-click-modal="false" :close-on-press-escape="false">
<template #title>
<template #header>
<div class="row items-center">
<div class="text-dark col" style="font-size: 18px;">水印信息设置</div>
<div>
......
......@@ -2,7 +2,7 @@
<el-dialog v-model="removeVisible" title="退出团队/企业" style="width:400px;" @close="closed">
<main>
<el-alert type="warning" show-icon :closable="false">
<template #title>
<template #header>
<span class="text-normal text-dark">你正在退出<span class="text-weight-bolder">{{ userInfo.company }}</span>,退出后,你将无法访问本团队/企业,其在「我的空间」中的所有内容将被清空,且不可恢复,请谨慎操作</span>
</template>
</el-alert>
......
......@@ -40,7 +40,7 @@
<div style="border-left: 1px dashed #000; margin-left: 8px;margin-right: 9px; height:98px;"></div>
<div class="col q-ml-md">
<el-alert type="info" :closable="false">
<template #title>
<template #header>
<div class="row items-center">
<div class="col">请按参考模板填写内容;字段不符合规则,则不予以导入</div>
<div class="text-primary row items-center cusor-pointer q-ml-md" @click="goDownload">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment