-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request !326 from 芋道源码/dev
- Loading branch information
Showing
46 changed files
with
2,926 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import request from '@/config/axios' | ||
|
||
export interface CustomerLimitConfigVO { | ||
id?: number | ||
type?: number | ||
userIds?: string | ||
deptIds?: string | ||
maxCount?: number | ||
dealCountEnabled?: boolean | ||
} | ||
|
||
// 查询客户限制配置列表 | ||
export const getCustomerLimitConfigPage = async (params) => { | ||
return await request.get({ url: `/crm/customer-limit-config/page`, params }) | ||
} | ||
|
||
// 查询客户限制配置详情 | ||
export const getCustomerLimitConfig = async (id: number) => { | ||
return await request.get({ url: `/crm/customer-limit-config/get?id=` + id }) | ||
} | ||
|
||
// 新增客户限制配置 | ||
export const createCustomerLimitConfig = async (data: CustomerLimitConfigVO) => { | ||
return await request.post({ url: `/crm/customer-limit-config/create`, data }) | ||
} | ||
|
||
// 修改客户限制配置 | ||
export const updateCustomerLimitConfig = async (data: CustomerLimitConfigVO) => { | ||
return await request.put({ url: `/crm/customer-limit-config/update`, data }) | ||
} | ||
|
||
// 删除客户限制配置 | ||
export const deleteCustomerLimitConfig = async (id: number) => { | ||
return await request.delete({ url: `/crm/customer-limit-config/delete?id=` + id }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
import request from '@/config/axios' | ||
|
||
export interface CustomerPoolConfigVO { | ||
enabled?: boolean | ||
contactExpireDays?: number | ||
dealExpireDays?: number | ||
notifyEnabled?: boolean | ||
notifyDays: number | ||
} | ||
|
||
// 获取客户公海规则设置 | ||
export const getCustomerPoolConfig = async () => { | ||
return await request.get({ url: `/crm/customer-pool-config/get` }) | ||
} | ||
|
||
// 更新客户公海规则设置 | ||
export const updateCustomerPoolConfig = async (data: ConfigVO) => { | ||
return await request.put({ url: `/crm/customer-pool-config/update`, data }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import request from '@/config/axios' | ||
|
||
export interface PermissionVO { | ||
id?: number // 数据权限编号 | ||
userId: number | undefined // 用户编号 | ||
bizType: number | undefined // Crm 类型 | ||
bizId: number | undefined // Crm 类型数据编号 | ||
level: number | undefined // 权限级别 | ||
deptName?: string // 部门名称 // 岗位名称数组 TODO @puhui999:数组? | ||
nickname?: string // 用户昵称 | ||
postNames?: string // 岗位名称数组 TODO @puhui999:数组? | ||
createTime?: Date | ||
} | ||
|
||
// 查询团队成员列表 | ||
export const getPermissionList = async (params) => { | ||
return await request.get({ url: `/crm/permission/list`, params }) | ||
} | ||
|
||
// 新增团队成员 | ||
export const createPermission = async (data: PermissionVO) => { | ||
return await request.post({ url: `/crm/permission/add`, data }) | ||
} | ||
|
||
// 修改团队成员权限级别 | ||
export const updatePermission = async (data) => { | ||
return await request.put({ url: `/crm/permission/update`, data }) | ||
} | ||
|
||
// 删除团队成员 | ||
export const deletePermission = async (params) => { | ||
return await request.delete({ url: '/crm/permission/delete', params }) | ||
} | ||
|
||
// 退出团队 | ||
export const quitTeam = async (id) => { | ||
return await request.delete({ url: '/crm/permission/quit-team?id=' + id }) | ||
} | ||
|
||
// 领取公海数据 | ||
export const receive = async (data: { bizType: number; bizId: number }) => { | ||
return await request.put({ url: `/crm/permission/receive`, data }) | ||
} | ||
|
||
// 数据放入公海 | ||
export const putPool = async (data: { bizType: number; bizId: number }) => { | ||
return await request.put({ url: `/crm/permission/put-pool`, data }) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
src/components/DiyEditor/components/mobile/MagicCube/config.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import { ComponentStyle, DiyComponent } from '@/components/DiyEditor/util' | ||
|
||
/** 广告魔方属性 */ | ||
export interface MagicCubeProperty { | ||
// 上圆角 | ||
borderRadiusTop: number | ||
// 下圆角 | ||
borderRadiusBottom: number | ||
// 间隔 | ||
space: number | ||
// 导航菜单列表 | ||
list: MagicCubeItemProperty[] | ||
// 组件样式 | ||
style: ComponentStyle | ||
} | ||
/** 广告魔方项目属性 */ | ||
export interface MagicCubeItemProperty { | ||
// 图标链接 | ||
imgUrl: string | ||
// 链接 | ||
url: string | ||
// 宽 | ||
width: number | ||
// 高 | ||
height: number | ||
// 上 | ||
top: number | ||
// 左 | ||
left: number | ||
} | ||
|
||
// 定义组件 | ||
export const component = { | ||
id: 'MagicCube', | ||
name: '广告魔方', | ||
icon: 'bi:columns', | ||
property: { | ||
borderRadiusTop: 0, | ||
borderRadiusBottom: 0, | ||
space: 0, | ||
list: [], | ||
style: { | ||
bgType: 'color', | ||
bgColor: '#fff', | ||
marginBottom: 8 | ||
} as ComponentStyle | ||
} | ||
} as DiyComponent<MagicCubeProperty> |
73 changes: 73 additions & 0 deletions
73
src/components/DiyEditor/components/mobile/MagicCube/index.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
<template> | ||
<div | ||
class="relative" | ||
:style="{ height: `${rowCount * CUBE_SIZE}px`, width: `${4 * CUBE_SIZE}px` }" | ||
> | ||
<div | ||
v-for="(item, index) in property.list" | ||
:key="index" | ||
class="absolute" | ||
:style="{ | ||
width: `${item.width * CUBE_SIZE - property.space * 2}px`, | ||
height: `${item.height * CUBE_SIZE - property.space * 2}px`, | ||
margin: `${property.space}px`, | ||
top: `${item.top * CUBE_SIZE}px`, | ||
left: `${item.left * CUBE_SIZE}px` | ||
}" | ||
> | ||
<el-image | ||
class="h-full w-full" | ||
fit="cover" | ||
:src="item.imgUrl" | ||
:style="{ | ||
borderTopLeftRadius: `${property.borderRadiusTop}px`, | ||
borderTopRightRadius: `${property.borderRadiusTop}px`, | ||
borderBottomLeftRadius: `${property.borderRadiusBottom}px`, | ||
borderBottomRightRadius: `${property.borderRadiusBottom}px` | ||
}" | ||
> | ||
<template #error> | ||
<div class="image-slot"> | ||
<div | ||
class="flex items-center justify-center" | ||
:style="{ | ||
width: `${item.width * CUBE_SIZE}px`, | ||
height: `${item.height * CUBE_SIZE}px` | ||
}" | ||
> | ||
<Icon icon="ep-picture" color="gray" :size="CUBE_SIZE" /> | ||
</div> | ||
</div> | ||
</template> | ||
</el-image> | ||
</div> | ||
</div> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { MagicCubeProperty } from './config' | ||
/** 广告魔方 */ | ||
defineOptions({ name: 'MagicCube' }) | ||
const props = defineProps<{ property: MagicCubeProperty }>() | ||
// 一个方块的大小 | ||
const CUBE_SIZE = 93.75 | ||
/** | ||
* 计算方块的行数 | ||
* 行数用于计算魔方的总体高度,存在以下情况: | ||
* 1. 没有数据时,默认就只显示一行的高度 | ||
* 2. 底部的空白不算高度,例如只有第一行有数据,那么就只显示一行的高度 | ||
* 3. 顶部及中间的空白算高度,例如一共有四行,只有最后一行有数据,那么也显示四行的高度 | ||
*/ | ||
const rowCount = computed(() => { | ||
let count = 0 | ||
if (props.property.list.length > 0) { | ||
// 最大行号 | ||
count = Math.max(...props.property.list.map((item) => item.bottom)) | ||
} | ||
// 行号从 0 开始,所以加 1 | ||
return count + 1 | ||
}) | ||
</script> | ||
|
||
<style scoped lang="scss"></style> |
76 changes: 76 additions & 0 deletions
76
src/components/DiyEditor/components/mobile/MagicCube/property.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<template> | ||
<ComponentContainerProperty v-model="formData.style"> | ||
<!-- 表单 --> | ||
<el-form label-width="80px" :model="formData" class="m-t-8px"> | ||
<el-text tag="p"> 魔方设置 </el-text> | ||
<el-text type="info" size="small"> 每格尺寸187 * 187 </el-text> | ||
<MagicCubeEditor | ||
class="m-y-16px" | ||
v-model="formData.list" | ||
:rows="4" | ||
:cols="4" | ||
@hot-area-selected="handleHotAreaSelected" | ||
/> | ||
<template v-for="(hotArea, index) in formData.list" :key="index"> | ||
<template v-if="selectedHotAreaIndex === index"> | ||
<el-form-item label="上传图片" :prop="`list[${index}].imgUrl`"> | ||
<UploadImg v-model="hotArea.imgUrl" height="80px" width="80px" /> | ||
</el-form-item> | ||
<el-form-item label="链接" :prop="`list[${index}].url`"> | ||
<el-input v-model="hotArea.url" placeholder="请输入链接" /> | ||
</el-form-item> | ||
</template> | ||
</template> | ||
<el-form-item label="上圆角" prop="borderRadiusTop"> | ||
<el-slider | ||
v-model="formData.borderRadiusTop" | ||
:max="100" | ||
:min="0" | ||
show-input | ||
input-size="small" | ||
:show-input-controls="false" | ||
/> | ||
</el-form-item> | ||
<el-form-item label="下圆角" prop="borderRadiusBottom"> | ||
<el-slider | ||
v-model="formData.borderRadiusBottom" | ||
:max="100" | ||
:min="0" | ||
show-input | ||
input-size="small" | ||
:show-input-controls="false" | ||
/> | ||
</el-form-item> | ||
<el-form-item label="间隔" prop="space"> | ||
<el-slider | ||
v-model="formData.space" | ||
:max="100" | ||
:min="0" | ||
show-input | ||
input-size="small" | ||
:show-input-controls="false" | ||
/> | ||
</el-form-item> | ||
</el-form> | ||
</ComponentContainerProperty> | ||
</template> | ||
|
||
<script setup lang="ts"> | ||
import { usePropertyForm } from '@/components/DiyEditor/util' | ||
import { MagicCubeProperty } from '@/components/DiyEditor/components/mobile/MagicCube/config' | ||
/** 广告魔方属性面板 */ | ||
defineOptions({ name: 'MagicCubeProperty' }) | ||
const props = defineProps<{ modelValue: MagicCubeProperty }>() | ||
const emit = defineEmits(['update:modelValue']) | ||
const { formData } = usePropertyForm(props.modelValue, emit) | ||
// 选中的热区 | ||
const selectedHotAreaIndex = ref(-1) | ||
const handleHotAreaSelected = (_: any, index: number) => { | ||
selectedHotAreaIndex.value = index | ||
} | ||
</script> | ||
|
||
<style scoped lang="scss"></style> |
Oops, something went wrong.