From 0a9151eb3c31d808509014d61f6385333000f33a Mon Sep 17 00:00:00 2001 From: wenlong Date: Thu, 22 Aug 2024 00:32:58 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B8=82=E5=86=B5=E6=B1=87=E7=8E=87=E6=9B=B4?= =?UTF-8?q?=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/daikin/base.ts | 48 +++ src/router/index.ts | 11 + src/types/auto-import.d.ts | 1 + src/views/company/index.vue | 26 +- src/views/company/manage.vue | 394 +++++++++++++++++++++++ src/views/home/Home.vue | 18 +- src/views/home/market/Market.vue | 1 + src/views/home/market/MarketData-new.ts | 313 +++++++++++++----- src/views/home/market/Market_new.vue | 8 +- src/views/home/phone/index.vue | 68 +++- src/views/home/phone/manage.vue | 406 ++++++++++++++++++++++++ 11 files changed, 1185 insertions(+), 109 deletions(-) create mode 100644 src/views/company/manage.vue create mode 100644 src/views/home/phone/manage.vue diff --git a/src/api/daikin/base.ts b/src/api/daikin/base.ts index 7898e98..d3197f0 100755 --- a/src/api/daikin/base.ts +++ b/src/api/daikin/base.ts @@ -1470,3 +1470,51 @@ export async function fetchTimeFuturecenterAl(params?: any) { export async function fetchMarketUpdateTime(params?: any) { return http.get(`/marketPre/getLastTime`, { params }) } + +// 查询HP-联络人列表 +export async function fetchContactList(params?: any) { + return http.get(`/liaison/list`, { params }) +} +// 获取HP-联络人详细信息 +export async function fetchContactDetail(id: any = '') { + return http.get(`/liaison/info/${id}`) +} + +// 新增HP-联络人 +export async function fetchContactAdd(data?: any) { + return http.post(`/liaison/post`, data) +} + +// 修改HP-联络人 +export async function fetchContactEdit(data?: any) { + return http.post(`/liaison/update`, data) +} + +// 删除HP-联络人 +export async function fetchContactDel(id: any = '') { + return http.get(`/liaison/${id}`) +} + +// 查询HP-年度方针列表 +export async function fetchYearPlanList(params?: any) { + return http.get(`/policy/list`, { params }) +} +// 获取HP-年度方针详细信息 +export async function fetchYearPlanDetail(id: any = '') { + return http.get(`/policy/info/${id}`) +} + +// 新增HP-年度方针 +export async function fetchYearPlanAdd(data?: any) { + return http.post(`/policy/add`, data) +} + +// 修改HP-年度方针 +export async function fetchYearPlanEdit(data?: any) { + return http.post(`/policy/update`, data) +} + +// 删除HP-年度方针 +export async function fetchYearPlanDel(id: any = '') { + return http.get(`/policy/${id}`) +} diff --git a/src/router/index.ts b/src/router/index.ts index a612c34..0f78a40 100755 --- a/src/router/index.ts +++ b/src/router/index.ts @@ -467,6 +467,12 @@ const router = createRouter({ name: 'Group', component: () => import('@/views/company/index.vue') }, + { + path: '', + meta: { title: '集团方针管理' }, + name: 'policyManage', + component: () => import('@/views/company/manage.vue') + }, { path: 'company', meta: { title: '公司方针' }, @@ -491,6 +497,11 @@ const router = createRouter({ name: 'phone', component: () => import('@/views/home/phone/index.vue') }, + { + path: 'manage', + name: 'phoneManage', + component: () => import('@/views/home/phone/manage.vue') + }, { path: 'visit', meta: { title: '拜访' }, diff --git a/src/types/auto-import.d.ts b/src/types/auto-import.d.ts index c313e4d..64ff13c 100755 --- a/src/types/auto-import.d.ts +++ b/src/types/auto-import.d.ts @@ -5,6 +5,7 @@ export {} declare global { const EffectScope: typeof import('vue')['EffectScope'] + const ElMessageBox: typeof import('element-plus/es')['ElMessageBox'] const asyncComputed: typeof import('@vueuse/core')['asyncComputed'] const autoResetRef: typeof import('@vueuse/core')['autoResetRef'] const computed: typeof import('vue')['computed'] diff --git a/src/views/company/index.vue b/src/views/company/index.vue index 19e8ea3..1881066 100755 --- a/src/views/company/index.vue +++ b/src/views/company/index.vue @@ -4,6 +4,9 @@ import HomeHead from '@/views/home/components/HomeHead.vue' // import HomeHeadSearch from '@/views/home/components/HomeHeadSearch.vue' import { useDate } from '@/views/home/hooks/useDate' import { useMessage } from 'naive-ui' +import { useUserStore } from '@/stores/modules/user' +// import { groupBy } from 'lodash-es' +const store = useUserStore() import { cateFileList } from '@/api/daikin/base' @@ -75,6 +78,13 @@ const goFile = (row: any) => { } getFile() + +const userCode = ref(false) +watchEffect(() => { + userCode.value = ['admin', 'cd_dandang', 'tech_service'].some((item) => + store.user.roleCode?.includes(item) + ) +})