salary
qsh 6 months ago
parent 2468a0c8a5
commit 1ec084debe
  1. 20
      src/components/Editor/src/Editor.vue
  2. 68
      src/components/Editor/src/README.md
  3. 11
      src/router/modules/remaining.ts
  4. 5
      src/styles/index.scss
  5. 45
      src/views/Basic/GeneralSet/Comp/BSClue.vue
  6. 69
      src/views/Basic/GeneralSet/Comp/BSSalerComission.vue
  7. 21
      src/views/Basic/GeneralSet/index.vue
  8. 2
      src/views/Clue/Pool/Comp/DialogClue.vue
  9. 2
      src/views/Clue/Pool/Comp/DialogSuccess.vue
  10. 25
      src/views/Clue/Pool/cluePool.data.js
  11. 105
      src/views/Clue/Set/Comp/ClueSource.vue
  12. 111
      src/views/Clue/Set/Comp/DialogSource.vue
  13. 12
      src/views/Clue/Set/index.vue
  14. 2
      src/views/Clue/Skill/Comp/DialogSkill.vue
  15. 2
      src/views/SchoolManagement/Class/Comp/DialogClass.vue
  16. 128
      src/views/SchoolManagement/Place/index.vue
  17. 2
      src/views/SchoolManagement/School/Comp/DialogSchool.vue

@ -18,7 +18,7 @@ i18nChangeLanguage(unref(currentLocale).lang)
const props = defineProps({
editorId: propTypes.string.def('wangeEditor-1'),
height: propTypes.oneOfType([Number, String]).def('500px'),
height: propTypes.oneOfType([Number, String]).def('40vh'),
editorConfig: {
type: Object as PropType<Partial<IEditorConfig>>,
default: () => undefined
@ -154,6 +154,23 @@ const editorStyle = computed(() => {
}
})
const toolbarConfig = ref({
excludeKeys: [
'insertVideo', //
'insertImage', //
'insertLink', //
'codeBlock', //
'headerSelect', //
'blockquote', //
'fontFamily', //
'todo', //
'group-indent', //
'emotion', //
'undo', //
'redo' //
]
})
//
const handleChange = (editor: IDomEditor) => {
emit('change', editor)
@ -184,6 +201,7 @@ defineExpose({
<Toolbar
:editor="editorRef"
:editorId="editorId"
:defaultConfig="toolbarConfig"
class="border-bottom-1 border-solid border-[var(--tags-view-border-color)]"
/>
<!-- 编辑器 -->

@ -0,0 +1,68 @@
**「工具栏key」**
[
"headerSelect",// 标题
"blockquote", // 引用
"bold", // 加粗
"underline", // 下划线
"italic", // 斜体
// 删除线、清除格式等
"group-more-style",
{
key: "group-more-style",
title: "更多",
iconSvg:
'<svg viewBox="0 0 1024 1024"><path d="M204.8 505.6…0 153.6 0 76.8 76.8 0 1 0-153.6 0Z"></path></svg>',
menuKeys: Array(5)
},
"color", // 文字颜色
"bgColor", // 背景色
"fontSize", // 字号
"fontFamily", // 字体
"lineHeight", // 行高
"bulletedList", // 无序列表
"numberedList", // 有序列表
"todo", // 代办
// 对齐
"group-justify",
{
key: "group-justify",
title: "对齐",
iconSvg:
'<svg viewBox="0 0 1024 1024"><path d="M768 793.6v1…72.8 102.4v102.4H51.2V102.4h921.6z"></path></svg>',
menuKeys: Array(4)
},
// 缩进
"group-indent",
{
key: "group-indent",
title: "缩进",
iconSvg:
'<svg viewBox="0 0 1024 1024"><path d="M0 64h1024v1…32h1024v128H0z m0-128V320l256 192z"></path></svg>',
menuKeys: Array(2)
},
"emotion",// 表情
"insertLink",// 插入链接
"group-image",// 上传图片
{
key: "group-image",
title: "图片",
iconSvg:
'<svg viewBox="0 0 1024 1024"><path d="M959.877 128…l224.01-384 256 320h64l224.01-192z"></path></svg>',
menuKeys: Array(2)
},
"group-video",// 上传视频
{
key: "group-video",
title: "视频",
iconSvg:
'<svg viewBox="0 0 1024 1024"><path d="M981.184 160….904zM384 704V320l320 192-320 192z"></path></svg>',
menuKeys: Array(2)
},
"insertTable",// 插入表格
"codeBlock", // 代码块
"divider", // 分割线
"undo", // 撤销
"redo", // 重做
"fullScreen" // 全屏
]

@ -295,6 +295,17 @@ const remainingRouter: AppRouteRecordRaw[] = [
noCache: false,
affix: true
}
},
{
path: 'generalSet',
component: () => import('@/views/Basic/GeneralSet/index.vue'),
name: 'GeneralSet',
meta: {
title: '通用配置',
icon: 'ep:home-filled',
noCache: false,
affix: true
}
}
]
},

@ -19,7 +19,8 @@
.el-dialog__body {
overflow-y: auto;
padding-top: 0;
max-height: calc(100% - 118px);
padding-bottom: 0;
// max-height: calc(100% - 118px);
}
/* nprogress 适配 element-plus 的主题色 */
@ -53,7 +54,7 @@
.el-dialog {
margin-top: 5vh;
max-height: 90vh;
// max-height: 90vh;
}
.el-form--inline .el-form-item {

@ -0,0 +1,45 @@
<template>
<el-form :model="form" ref="formRef" label-width="auto">
<el-form-item>
<template #label>
<Tooltip message="请联系客服开通或关闭,客服电话:15955599959" />使用外呼
</template>
<el-radio-group v-model="form.callEnable" disabled>
<el-radio :label="1"> 使用 </el-radio>
<el-radio :label="0"> 不使用 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="跟进信息">
<el-radio-group v-model="form.followType">
<el-radio :label="1"> 展示所有 </el-radio>
<el-radio :label="2"> 仅展示本人 </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button @click="getData">刷新</el-button>
</el-form-item>
</el-form>
</template>
<script setup name="BasicSettingClue">
const message = useMessage()
const form = ref({
followType: 1,
callEnable: 1
})
function getData() {
form.value = {
followType: 1,
callEnable: 1
}
}
function onSubmit() {
message.success('保存成功')
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,69 @@
<template>
<el-form :model="form" ref="formRef" label-width="auto">
<el-form-item label="是否关联成交率">
<el-radio-group v-model="form.withSuccess">
<el-radio :label="1"> </el-radio>
<el-radio :label="0"> </el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="关联规则">
<div>
<el-button @click="form.rules.push({})">新增规则</el-button>
<div
v-for="(item, index) in form.rules"
:key="index"
class="mt-10px flex justify-center items-center"
>
<span>成交率达</span>
<el-input
class="ml-10px"
v-model="item.successRate"
placeholder="成交率"
style="width: 100px"
type="number"
:min="0"
>
<template #suffix>%</template>
</el-input>
<span>可结算</span>
<el-input
class="ml-10px"
v-model="item.comissionRate"
placeholder="提成率"
style="width: 100px"
type="number"
:min="0"
>
<template #suffix>%</template>
</el-input>
<span>提成</span>
</div>
</div>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button @click="getData">刷新</el-button>
</el-form-item>
</el-form>
</template>
<script setup name="BasicSettingClue">
const message = useMessage()
const form = ref({
withSuccess: 1,
rules: []
})
function getData() {
form.value = {
withSuccess: 1
}
}
function onSubmit() {
message.success('保存成功')
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,21 @@
<template>
<div>
<el-tabs v-model="tabIndex" type="border-card">
<el-tab-pane label="线索管理" :name="0">
<BSClue v-if="tabIndex == 0" />
</el-tab-pane>
<el-tab-pane label="销售提成" :name="10">
<BSSalerComission v-if="tabIndex == 10" />
</el-tab-pane>
</el-tabs>
</div>
</template>
<script setup name="GeneralSetting">
import BSClue from './Comp/BSClue.vue'
import BSSalerComission from './Comp/BSSalerComission.vue'
const tabIndex = ref(0)
</script>
<style lang="scss" scoped></style>

@ -1,5 +1,5 @@
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" style="height: 90vh">
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-tabs v-model="tabName">
<el-tab-pane label="线索信息" name="info">
<Form

@ -1,5 +1,5 @@
<template>
<el-dialog title="成交登记" v-model="show" width="800px" style="height: 90vh">
<el-dialog title="成交登记" v-model="show" width="800px">
<Descriptions :data="info" :schema="schema" :columns="2" />
<el-form :model="form" ref="formRef" :rules="rules" label-width="80px" class="mt-20px">
<el-row :gutter="20">

@ -32,7 +32,8 @@ const crudSchemas = reactive([
label: '线索位置',
field: 'address',
isSearch: true,
isTable: true
isTable: true,
isForm: false
},
{
label: '线索来源',
@ -147,17 +148,6 @@ const crudSchemas = reactive([
isTable: true,
isForm: false
},
{
label: '备注',
field: 'remark',
isTable: true,
form: {
component: 'Editor',
colProps: {
span: 24
}
}
},
{
label: '创建时间',
field: 'createTime',
@ -194,6 +184,17 @@ const crudSchemas = reactive([
label: '跟进记录',
field: 'followRecord',
isTable: true
},
{
label: '备注',
field: 'remark',
isTable: true,
form: {
component: 'Editor',
colProps: {
span: 24
}
}
}
])
export const { allSchemas } = useCrudSchemas(crudSchemas)

@ -0,0 +1,105 @@
<template>
<div>
<el-form ref="queryForm" :model="searchForm" label-width="0" inline>
<el-form-item>
<el-input
v-model="searchForm.name"
placeholder="请输入名称"
clearable
@keyup.enter="handleQuery"
/>
</el-form-item>
<el-form-item>
<el-button @click="handleQuery">搜索</el-button>
<el-button @click="resetQuery">重置</el-button>
<el-button type="primary" @click="openForm('create', null)">新增</el-button>
</el-form-item>
</el-form>
<el-table
v-loading="loading"
:data="tableList"
row-key="sourceId"
:tree-props="{ children: 'children' }"
>
<el-table-column prop="sourceName" label="来源名称" />
<el-table-column prop="orderNum" label="排序" width="100px" />
<el-table-column prop="remark" label="备注" />
<el-table-column label="创建时间" prop="createTime" width="180px" />
<el-table-column label="创建人" prop="createUser" width="150px" />
<el-table-column label="操作">
<template #default="scope">
<el-button type="primary" text @click="openForm('update', scope.row)">修改</el-button>
<el-button type="primary" text @click="openForm('createChildren', scope.row)"
>新增</el-button
>
<el-button type="danger" text @click="handleDelete(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<Pagination
v-model:limit="searchForm.pageSize"
v-model:page="searchForm.pageNum"
:total="total"
@pagination="handleQuery"
/>
<DialogSource ref="sourceDialog" @success="handleQuery" />
</div>
</template>
<script setup name="ClueSource">
import DialogSource from './DialogSource.vue'
const searchForm = ref({
pageNum: 1,
pageSize: 20
})
const total = ref(0)
const sourceDialog = ref()
const tableList = ref([])
const loading = ref(false)
function handleQuery() {
searchForm.value.pageNum = 1
getList()
}
function resetQuery() {
searchForm.value = {
question: '',
pageSize: 20,
pageNum: 1
}
getList()
}
function getList() {
tableList.value = [
{
sourceId: 1,
sourceName: '测试',
level: 1,
children: [{ sourceId: 1001, sourceName: '二级来源', level: 2, parentSource: '测试' }]
}
]
}
function openForm(type, info) {
sourceDialog.value.open(type, info)
}
async function handleDelete(row) {
try {
console.log(row)
//
await message.delConfirm()
//
// await UserApi.deleteUser(row.id)
message.success(t('common.delSuccess'))
//
await getList()
} catch {}
}
</script>
<style lang="scss" scoped></style>

@ -0,0 +1,111 @@
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-form
ref="formRef"
v-loading="formLoading"
:model="formData"
:rules="formRules"
label-width="80px"
>
<el-form-item v-if="formData.level > 1" label="上级来源">
<el-input v-model="formData.parentSource" disabled />
</el-form-item>
<el-form-item label="来源名称" prop="sourceName">
<el-input v-model="formData.sourceName" placeholder="请输入来源名称" />
</el-form-item>
<el-form-item label="排序" prop="orderNum">
<el-input v-model="formData.orderNum" placeholder="请输入排序" type="number" :min="0" />
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
type="textarea"
v-model="formData.remark"
placeholder="请输入备注"
:autosize="{ minRows: 4, maxRows: 8 }"
/>
</el-form-item>
</el-form>
<template #footer>
<el-button :disabled="formLoading" type="primary" @click="submitForm"> </el-button>
<el-button @click="dialogVisible = false"> </el-button>
</template>
</el-dialog>
</template>
<script name="DialogSource" setup>
const { t } = useI18n() //
const message = useMessage() //
const dialogVisible = ref(false) //
const dialogTitle = ref('') //
const formLoading = ref(false) // 12
const formType = ref('') // create - update -
const formData = ref({
sourceName: '',
orderNum: 1,
remark: ''
})
const formRules = reactive({
sourceName: [{ required: true, message: '名称不能为空', trigger: 'blur' }]
})
const formRef = ref() // Ref
/** 打开弹窗 */
const open = async (type, info) => {
dialogVisible.value = true
dialogTitle.value = type == 'update' ? '修改来源' : '新增来源'
formType.value = type
resetForm()
//
if (info.sourceId) {
formLoading.value = true
try {
if (type == 'update') {
formData.value = { ...info }
} else {
formData.value.level = info.level + 1
formData.value.parentSource = info.sourceName
}
// formData.value = await UserApi.getUser(id)
} finally {
formLoading.value = false
}
}
}
defineExpose({ open }) // open
/** 提交表单 */
const emit = defineEmits(['success']) // success
const submitForm = async () => {
//
if (!formRef.value) return
const valid = await formRef.value.validate()
if (!valid) return
//
formLoading.value = true
try {
// const data = formData.value as unknown as UserApi.UserVO
if (formType.value === 'create') {
// await UserApi.createUser(data)
message.success(t('common.createSuccess'))
} else {
// await UserApi.updateUser(data)
message.success(t('common.updateSuccess'))
}
dialogVisible.value = false
//
emit('success')
} finally {
formLoading.value = false
}
}
/** 重置表单 */
const resetForm = () => {
formData.value = {
sourceName: '',
orderNum: 1,
remark: ''
}
formRef.value?.resetFields()
}
</script>

@ -4,16 +4,19 @@
<el-tab-pane label="线索属性" :name="0">
<FieldClue />
</el-tab-pane>
<el-tab-pane label="成交属性" :name="1">
<el-tab-pane label="成交属性" :name="10">
<FieldOrder />
</el-tab-pane>
<el-tab-pane label="线索获取规则" :name="2">
<el-tab-pane label="线索来源" :name="15">
<ClueSource />
</el-tab-pane>
<el-tab-pane label="线索获取规则" :name="20">
<ClueGet />
</el-tab-pane>
<el-tab-pane label="线索分配规则" :name="3">
<el-tab-pane label="线索分配规则" :name="30">
<ClueSend />
</el-tab-pane>
<el-tab-pane label="消息通知" :name="4">
<el-tab-pane label="消息通知" :name="40">
<MsgSend />
</el-tab-pane>
</el-tabs>
@ -23,6 +26,7 @@
<script setup name="ClueSetting">
import FieldClue from './Comp/FieldClue.vue'
import FieldOrder from './Comp/FieldOrder.vue'
import ClueSource from './Comp/ClueSource.vue'
import ClueGet from './Comp/ClueGet.vue'
import ClueSend from './Comp/ClueSend.vue'
import MsgSend from './Comp/MsgSend.vue'

@ -1,5 +1,5 @@
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" style="height: 90vh">
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-form
ref="formRef"
v-loading="formLoading"

@ -1,5 +1,5 @@
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="1000px" style="height: 90vh">
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="1000px">
<el-tabs v-model="currentTab">
<el-tab-pane label="基础信息" name="base">
<el-form

@ -77,69 +77,68 @@
</el-tooltip>
</div>
</template>
<el-form ref="FormPlace" :model="placeForm" label-width="70px">
<el-form-item label="所属驾校" prop="schoolId">
<el-select v-model="placeForm.schoolId" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in schoolList"
:key="dict.schoolId"
:label="dict.schoolName"
:value="dict.schoolId"
/>
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="placeForm.name" placeholder="输入名称" />
</el-form-item>
<el-form-item label="旗子颜色" prop="flagColor">
<el-radio-group v-model="placeForm.flagColor">
<el-radio v-for="(item, index) in colorOptions" :key="index" :label="item">
<img :src="flagMap[item]" style="width: 20px" />
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="placeForm.address" placeholder="输入地址" />
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input v-model="placeForm.lng" placeholder="输入经度" />
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input v-model="placeForm.lat" placeholder="输入纬度" />
</el-form-item>
<el-form-item label="所属区域" prop="area">
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in areaOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="placeForm.phone" placeholder="输入电话" />
</el-form-item>
<el-form-item label="负责人" prop="contact">
<el-input v-model="placeForm.contact" placeholder="输入负责人" />
</el-form-item>
<el-form-item label="是否推荐" prop="contact">
<el-radio v-model="placeForm.recommend" :label="true"></el-radio>
<el-radio v-model="placeForm.recommend" :label="false"></el-radio>
</el-form-item>
<el-form-item label="备注" prop="remark">
<el-input
v-model="placeForm.remark"
placeholder="输入备注"
type="textarea"
:autosize="{ minRows: 2, maxRows: 4 }"
/>
</el-form-item>
<el-form-item style="text-align: right">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button @click="closePlaceDialog">取消</el-button>
</el-form-item>
</el-form>
<el-tabs v-model="placeTab">
<el-tab-pane label="场地信息" name="info">
<el-form ref="FormPlace" :model="placeForm" label-width="70px">
<el-form-item label="所属驾校" prop="schoolId">
<el-select v-model="placeForm.schoolId" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in schoolList"
:key="dict.schoolId"
:label="dict.schoolName"
:value="dict.schoolId"
/>
</el-select>
</el-form-item>
<el-form-item label="名称" prop="name">
<el-input v-model="placeForm.name" placeholder="输入名称" />
</el-form-item>
<el-form-item label="旗子颜色" prop="flagColor">
<el-radio-group v-model="placeForm.flagColor">
<el-radio v-for="(item, index) in colorOptions" :key="index" :label="item">
<img :src="flagMap[item]" style="width: 20px" />
</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="地址" prop="address">
<el-input v-model="placeForm.address" placeholder="输入地址" />
</el-form-item>
<el-form-item label="经度" prop="lng">
<el-input v-model="placeForm.lng" placeholder="输入经度" />
</el-form-item>
<el-form-item label="纬度" prop="lat">
<el-input v-model="placeForm.lat" placeholder="输入纬度" />
</el-form-item>
<el-form-item label="所属区域" prop="area">
<el-select v-model="placeForm.area" placeholder="请选择" clearable class="w-full">
<el-option
v-for="dict in areaOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item label="电话" prop="phone">
<el-input v-model="placeForm.phone" placeholder="输入电话" />
</el-form-item>
<el-form-item label="负责人" prop="contact">
<el-input v-model="placeForm.contact" placeholder="输入负责人" />
</el-form-item>
<el-form-item label="是否推荐" prop="contact">
<el-radio v-model="placeForm.recommend" :label="true"></el-radio>
<el-radio v-model="placeForm.recommend" :label="false"></el-radio>
</el-form-item>
</el-form>
</el-tab-pane>
<el-tab-pane label="描述" name="desc">
<Editor v-model:modelValue="placeForm.remark" />
</el-tab-pane>
</el-tabs>
<div class="flex items-center justify-center mt-10px">
<el-button type="primary" @click="onSubmit">保存</el-button>
<el-button @click="closePlaceDialog">取消</el-button>
</div>
</el-card>
<!-- 底部驾校场地列表 -->
@ -250,6 +249,7 @@ const colorOptions = ['red', 'yellow', 'blue', 'green', 'purple', 'black']
const areaOptions = ref([])
const mapHelpText = ref('')
const tipPostion = ref({})
const placeTab = ref('info')
function initMap() {
AMapLoader.load({
@ -651,7 +651,7 @@ onMounted(() => {
::v-deep(.place-dialog) {
position: absolute;
left: 20px;
top: 60px;
top: 20px;
width: 350px;
}

@ -1,5 +1,5 @@
<template>
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px" style="height: 90vh">
<el-dialog :title="dialogTitle" v-model="dialogVisible" width="800px">
<el-form
ref="formRef"
v-loading="formLoading"

Loading…
Cancel
Save