|
@@ -1,36 +1,54 @@
|
|
|
<template>
|
|
<template>
|
|
|
<div class="main_container">
|
|
<div class="main_container">
|
|
|
- <div class="page_item end_item">
|
|
|
|
|
|
|
+ <div class="page_item public_seas_top">
|
|
|
<!-- 顶部公海设置 -->
|
|
<!-- 顶部公海设置 -->
|
|
|
- <div class="page_search">
|
|
|
|
|
|
|
+ <div class="page_search public_seas">
|
|
|
<div class="search_content">
|
|
<div class="search_content">
|
|
|
<div class="content_left">
|
|
<div class="content_left">
|
|
|
<div class="grade_title">公海设置</div>
|
|
<div class="grade_title">公海设置</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ <div class="content_right">
|
|
|
|
|
+ <el-button v-if="!isCurrentEdit" class="button_border" @click="HandleEditOrSave('edit')">
|
|
|
|
|
+ <img :src="editIcon" alt="">编辑
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <template v-else>
|
|
|
|
|
+ <el-button class="button_refresh" @click="HandleEditOrSave('cancel')">
|
|
|
|
|
+ <img :src="closeIcon" alt=""> 取消
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ <el-button class="button_background" @click="HandleEditOrSave('save')">
|
|
|
|
|
+ <img :src="saveIcon" alt=""> 保存
|
|
|
|
|
+ </el-button>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
+ <div class="page_item public_seas_bottom">
|
|
|
<!-- 公海设置的具体表单内容 -->
|
|
<!-- 公海设置的具体表单内容 -->
|
|
|
<div class="high_seas_config">
|
|
<div class="high_seas_config">
|
|
|
<div class="config_item">
|
|
<div class="config_item">
|
|
|
<span class="label_text">客户持有上限:</span>
|
|
<span class="label_text">客户持有上限:</span>
|
|
|
- <el-input type="number" value="100" />
|
|
|
|
|
|
|
+ <el-input :disabled="!isCurrentEdit" type="number" v-model="publicSeasConfig.holdLimit" />
|
|
|
<span>个</span>
|
|
<span>个</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="config_item">
|
|
<div class="config_item">
|
|
|
<span class="label_text">每日手动退回公海上限:</span>
|
|
<span class="label_text">每日手动退回公海上限:</span>
|
|
|
- <el-input type="number" value="15" />
|
|
|
|
|
|
|
+ <el-input :disabled="!isCurrentEdit" type="number" v-model="publicSeasConfig.dayBackLimit" />
|
|
|
<span>个</span>
|
|
<span>个</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="config_item">
|
|
<div class="config_item">
|
|
|
<span class="label_text">无跟进自动退回公海天数:</span>
|
|
<span class="label_text">无跟进自动退回公海天数:</span>
|
|
|
- <el-input type="number" value="15" />
|
|
|
|
|
|
|
+ <el-input :disabled="!isCurrentEdit" type="number" v-model="publicSeasConfig.autoBackLimitDay" />
|
|
|
<span>天</span>
|
|
<span>天</span>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
|
|
|
|
|
+ <div class="page_jg_20" style="flex-shrink: 0 !important;"></div>
|
|
|
|
|
|
|
|
- <div class="page_search">
|
|
|
|
|
|
|
+ <div class="page_item end_item">
|
|
|
|
|
+ <div class="page_search field_setting" >
|
|
|
<div class="search_content">
|
|
<div class="search_content">
|
|
|
<div class="content_left">
|
|
<div class="content_left">
|
|
|
<div class="grade_title">字段设置</div>
|
|
<div class="grade_title">字段设置</div>
|
|
@@ -40,21 +58,25 @@
|
|
|
|
|
|
|
|
<!-- 字段设置区域 -->
|
|
<!-- 字段设置区域 -->
|
|
|
<div class="field_settings_area">
|
|
<div class="field_settings_area">
|
|
|
- <SettingCard cardTitle="地区管理" :cardItems="region_list"
|
|
|
|
|
- :middleColumnItm="{name:'province',label:'省份'}"
|
|
|
|
|
- :defaultTableData="region_list"/>
|
|
|
|
|
- <SettingCard cardTitle="学段管理" :cardItems="stage_list"
|
|
|
|
|
- :middleColumnItm="{name:'phaseOfStudyingName',label:'学段名称'}"
|
|
|
|
|
- :defaultTableData="stage_list"/>
|
|
|
|
|
- <SettingCard cardTitle="产品管理" :cardItems="product_list"
|
|
|
|
|
- :middleColumnItm="{name:'productName',label:'产品名称'}"
|
|
|
|
|
- :defaultTableData="product_list"/>
|
|
|
|
|
- <SettingCard cardTitle="跟进状态" :cardItems="status_list"
|
|
|
|
|
- :middleColumnItm="{name:'followUpStatus',label:'跟进状态'}"
|
|
|
|
|
- :defaultTableData="status_list"/>
|
|
|
|
|
- <SettingCard cardTitle="职务管理" :cardItems="job_list"
|
|
|
|
|
- :middleColumnItm="{name:'positionName',label:'职务名称'}"
|
|
|
|
|
- :defaultTableData="job_list"/>
|
|
|
|
|
|
|
+ <SettingCard cardTitle="地区管理" :cardItems="regionList"
|
|
|
|
|
+ :middleColumnItm="{name:'name',label:'省份'}"
|
|
|
|
|
+ :customSelectList="regionSelectList"
|
|
|
|
|
+ :defaultTableData="regionList"
|
|
|
|
|
+ @openDialog="HandleRegionDialogOpen"
|
|
|
|
|
+ @deleteSuccess="GetPublicSeasConfig"
|
|
|
|
|
+ @addOrUpdateSuccess="GetPublicSeasConfig"/>
|
|
|
|
|
+ <SettingCard cardTitle="学段管理" :cardItems="stageList"
|
|
|
|
|
+ :middleColumnItm="{name:'title',label:'学段名称'}"
|
|
|
|
|
+ :defaultTableData="stageList"/>
|
|
|
|
|
+ <SettingCard cardTitle="产品管理" :cardItems="productList"
|
|
|
|
|
+ :middleColumnItm="{name:'title',label:'产品名称'}"
|
|
|
|
|
+ :defaultTableData="productList"/>
|
|
|
|
|
+ <SettingCard cardTitle="跟进状态" :cardItems="statusList"
|
|
|
|
|
+ :middleColumnItm="{name:'title',label:'跟进状态'}"
|
|
|
|
|
+ :defaultTableData="statusList"/>
|
|
|
|
|
+ <SettingCard cardTitle="职务管理" :cardItems="jobList"
|
|
|
|
|
+ :middleColumnItm="{name:'title',label:'职务名称'}"
|
|
|
|
|
+ :defaultTableData="jobList"/>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
@@ -62,88 +84,185 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
-import { ref } from 'vue';
|
|
|
|
|
|
|
+import { ElMessage } from 'element-plus';
|
|
|
|
|
+import { onMounted, reactive, ref } from 'vue';
|
|
|
import SettingCard from '@/components/settingCard/SettingCard.vue';
|
|
import SettingCard from '@/components/settingCard/SettingCard.vue';
|
|
|
|
|
|
|
|
-// 模拟图片中的数据
|
|
|
|
|
-const region_list = ref([
|
|
|
|
|
- { province: '北京市',id:1 },
|
|
|
|
|
- { province: '上海市',id:2 },
|
|
|
|
|
- { province: '天津市',id:3 },
|
|
|
|
|
- { province: '广东', id:4 },
|
|
|
|
|
- { province: '辽宁', id:5 },
|
|
|
|
|
- { province: '河南', id:6 },
|
|
|
|
|
- { province: '河北', id:7 },
|
|
|
|
|
- { province: '湖南', id:8 },
|
|
|
|
|
- { province: '湖北', id:9 },
|
|
|
|
|
- { province: '云南', id:10 },
|
|
|
|
|
- { province: '福建', id:11 },
|
|
|
|
|
- { province: '海南', id:12 },
|
|
|
|
|
- { province: '四川', id:13 },
|
|
|
|
|
- { province: '初中', id:14 },
|
|
|
|
|
- { province: '初中', id:15 },
|
|
|
|
|
- { province: '初中', id:16 },
|
|
|
|
|
- { province: '初中', id:17 }
|
|
|
|
|
-]);
|
|
|
|
|
-const stage_list = ref([
|
|
|
|
|
- { phaseOfStudyingName: '幼儿园', id:1 },
|
|
|
|
|
- { phaseOfStudyingName: '小学', id:2 },
|
|
|
|
|
- { phaseOfStudyingName: '初中', id:3 },
|
|
|
|
|
- { phaseOfStudyingName: '高中', id:4 },
|
|
|
|
|
- { phaseOfStudyingName: '完中', id:5 },
|
|
|
|
|
- { phaseOfStudyingName: '九年一贯', id:6 },
|
|
|
|
|
- { phaseOfStudyingName: '十二年一贯', id:7 },
|
|
|
|
|
- { phaseOfStudyingName: '职高', id:8 },
|
|
|
|
|
- { phaseOfStudyingName: '大学', id:9 },
|
|
|
|
|
- { phaseOfStudyingName: '初中', id:10 }
|
|
|
|
|
-]);
|
|
|
|
|
-const product_list = ref([
|
|
|
|
|
- { productName: '大数据精准教学诊断平台', id:1 },
|
|
|
|
|
- { productName: '选择题智能判分', id:2 },
|
|
|
|
|
- { productName: '教学材料采集', id:3 },
|
|
|
|
|
- { productName: '教师校本研修', id:4},
|
|
|
|
|
- { productName: '学生校本课程学习', id:5 },
|
|
|
|
|
- { productName: '智能校本选课', id:6 },
|
|
|
|
|
- { productName: '教师专业发展', id:7 },
|
|
|
|
|
- { productName: '协同教研备课', id:8 },
|
|
|
|
|
- { productName: '校园信息发布', id:9 },
|
|
|
|
|
- { productName: '智能评教评学', id:10 },
|
|
|
|
|
- { productName: '智能考场编排', id:11 },
|
|
|
|
|
- { productName: '智能听课评课', id:12 },
|
|
|
|
|
- { productName: '基础数据管理', id:13 }
|
|
|
|
|
-]);
|
|
|
|
|
-const status_list = ref([
|
|
|
|
|
- { followUpStatus: '线索建立', id:1 },
|
|
|
|
|
- { followUpStatus: '需求调研', id:2 },
|
|
|
|
|
- { followUpStatus: '方案演示', id:3 },
|
|
|
|
|
- { followUpStatus: '试用测试', id:4 },
|
|
|
|
|
- { followUpStatus: '项目搁置', id:5 },
|
|
|
|
|
- { followUpStatus: '输单', id:6 },
|
|
|
|
|
- { followUpStatus: '赢单', id: 7}
|
|
|
|
|
-]);
|
|
|
|
|
-
|
|
|
|
|
-const job_list = ref([
|
|
|
|
|
- { positionName: '校长', id:1 },
|
|
|
|
|
- { positionName: '副校长', id:2 },
|
|
|
|
|
- { positionName: '执行校长', id:3 },
|
|
|
|
|
- { positionName: '教学主任', id:4 },
|
|
|
|
|
- { positionName: '教务主任', id:5 },
|
|
|
|
|
- { positionName: '信息主任', id:6 }
|
|
|
|
|
-]);
|
|
|
|
|
|
|
+import {
|
|
|
|
|
+ getParameterConfigApi,
|
|
|
|
|
+ updatePublicSeasConfigApi,
|
|
|
|
|
+ getFieldListExcludeAreaApi,
|
|
|
|
|
+ addFieldListExcludeAreaApi,
|
|
|
|
|
+ updateFieldListExcludeAreaApi,
|
|
|
|
|
+ deleteFieldListExcludeAreaApi,
|
|
|
|
|
+ getProvinceConfigListApi,
|
|
|
|
|
+ getUnusedProvinceListApi,
|
|
|
|
|
+ addOrUpdateProvinceConfigApi,
|
|
|
|
|
+ deleteProvinceConfigApi
|
|
|
|
|
+} from '@/api/parameterConfig'
|
|
|
|
|
+
|
|
|
|
|
+import editIcon from '@/assets/icon/edit_light.png'
|
|
|
|
|
+import closeIcon from '@/assets/icon/delete.svg'
|
|
|
|
|
+import saveIcon from '@/assets/icon/save_icon.png'
|
|
|
|
|
+
|
|
|
|
|
+/** 1. 参数配置列表整体数据 */
|
|
|
|
|
+// 获取公海设置
|
|
|
|
|
+const GetPublicSeasConfig = async ()=>{
|
|
|
|
|
+ let res = await getParameterConfigApi()
|
|
|
|
|
+ if(res?.code == 200){
|
|
|
|
|
+ const {
|
|
|
|
|
+ stageData, productData,
|
|
|
|
|
+ positionData, followStatusData, regionData,
|
|
|
|
|
+ holdTopCount, dayBackTopCount, backPublicDayCount, id
|
|
|
|
|
+ } = res.data
|
|
|
|
|
+
|
|
|
|
|
+ // 公海配置
|
|
|
|
|
+ publicSeasConfig.holdLimit = holdTopCount
|
|
|
|
|
+ publicSeasConfig.dayBackLimit = dayBackTopCount
|
|
|
|
|
+ publicSeasConfig.autoBackLimitDay = backPublicDayCount
|
|
|
|
|
+ publicSeasConfig.id = id
|
|
|
|
|
+
|
|
|
|
|
+ stageList.value = stageData
|
|
|
|
|
+ productList.value = productData
|
|
|
|
|
+ statusList.value = followStatusData
|
|
|
|
|
+ jobList.value = positionData
|
|
|
|
|
+ regionList.value = regionData
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/** 2. 公海设置 */
|
|
|
|
|
+const publicSeasConfig = reactive({
|
|
|
|
|
+ holdLimit:0, //客户持有上限
|
|
|
|
|
+ dayBackLimit:0, //每日退回上限
|
|
|
|
|
+ autoBackLimitDay:0, //无跟进自动退回天数
|
|
|
|
|
+ id:'', //唯一id
|
|
|
|
|
+})
|
|
|
|
|
+const isCurrentEdit = ref(false) //公海设置当前的编辑状态
|
|
|
|
|
+// 公海设置 编辑/保存 状态切换
|
|
|
|
|
+const HandleEditOrSave = async (type)=>{
|
|
|
|
|
+ switch(type){
|
|
|
|
|
+ case 'edit':
|
|
|
|
|
+ isCurrentEdit.value = true
|
|
|
|
|
+ break
|
|
|
|
|
+ case 'save':{
|
|
|
|
|
+ let params = {
|
|
|
|
|
+ holdTopCount: publicSeasConfig.holdLimit,
|
|
|
|
|
+ dayBackTopCount: publicSeasConfig.dayBackLimit,
|
|
|
|
|
+ backPublicDayCount: publicSeasConfig.autoBackLimitDay,
|
|
|
|
|
+ id:publicSeasConfig.id
|
|
|
|
|
+ }
|
|
|
|
|
+ let res = await updatePublicSeasConfigApi(params)
|
|
|
|
|
+ if(res?.code == 200){
|
|
|
|
|
+ ElMessage.success(res?.msg)
|
|
|
|
|
+ isCurrentEdit.value = false
|
|
|
|
|
+ await GetPublicSeasConfig()
|
|
|
|
|
+ }
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ case 'cancel':
|
|
|
|
|
+ isCurrentEdit.value = false
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+/** 3. 地区管理 */
|
|
|
|
|
+const regionList = ref([]);
|
|
|
|
|
+// 省份下拉配置
|
|
|
|
|
+const regionSelectList = ref([])
|
|
|
|
|
+// 获取省份下拉列表
|
|
|
|
|
+const GetProvinceSelectList = async ()=>{
|
|
|
|
|
+ let res = await getUnusedProvinceListApi()
|
|
|
|
|
+ if(res.code == 200){
|
|
|
|
|
+ regionSelectList.value = res.data.map(item=>{
|
|
|
|
|
+ return {
|
|
|
|
|
+ label:item.name,
|
|
|
|
|
+ value:item.id
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+// 执行地区弹窗打开后的操作
|
|
|
|
|
+const HandleRegionDialogOpen = async ()=>{
|
|
|
|
|
+ await GetProvinceSelectList()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// 字段设置
|
|
|
|
|
+
|
|
|
|
|
+const stageList = ref([]);
|
|
|
|
|
+const productList = ref([]);
|
|
|
|
|
+const statusList = ref([]);
|
|
|
|
|
+const jobList = ref([]);
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+// 获取地区管理列表配置
|
|
|
|
|
+const GetProvinceConfigList = async ()=>{
|
|
|
|
|
+ let res = await getProvinceConfigListApi()
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 获取 学段管理 配置列表
|
|
|
|
|
+const GetPhaseOfStudyingList = async ()=>{
|
|
|
|
|
+ let res = await getFieldListExcludeAreaApi(0)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 获取 产品管理 配置列表
|
|
|
|
|
+const GetProductManageConfigList = async ()=>{
|
|
|
|
|
+ let res = await getFieldListExcludeAreaApi(1)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 获取 跟进状态 配置列表
|
|
|
|
|
+const GetFollowStatusList = async ()=>{
|
|
|
|
|
+ let res = await getFieldListExcludeAreaApi(3)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+// 获取 职务管理 配置列表
|
|
|
|
|
+const GetPositionManageList = async ()=>{
|
|
|
|
|
+ let res = await getFieldListExcludeAreaApi(2)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+onMounted( async()=>{
|
|
|
|
|
+ GetPublicSeasConfig()
|
|
|
|
|
+
|
|
|
|
|
+})
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-.grade_title{
|
|
|
|
|
- margin-bottom: 16px;
|
|
|
|
|
|
|
+.public_seas_top{
|
|
|
|
|
+ padding:12px 20px;
|
|
|
|
|
+ border-bottom: solid #E9E9E9 1px;
|
|
|
|
|
+ border-radius: 10px 10px 0 0;
|
|
|
|
|
+ .content_right{
|
|
|
|
|
+ .el-button{
|
|
|
|
|
+ min-width: 72px !important ;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+}
|
|
|
|
|
+.public_seas_bottom{
|
|
|
|
|
+ border-radius: 0 0 10px 10px;
|
|
|
|
|
+}
|
|
|
|
|
+.page_search{
|
|
|
|
|
+ &.field_setting{
|
|
|
|
|
+ margin-bottom: 16px;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
/* 公海配置行 */
|
|
/* 公海配置行 */
|
|
|
.high_seas_config {
|
|
.high_seas_config {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
flex-wrap: wrap;
|
|
flex-wrap: wrap;
|
|
|
gap:20px 100px;
|
|
gap:20px 100px;
|
|
|
|
|
|
|
|
- margin-bottom: 48px;
|
|
|
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
|
color: #333;
|
|
color: #333;
|
|
|
|
|
|