From b155d3ce9ead22e792621c538db9f88f9bfde21b Mon Sep 17 00:00:00 2001 From: qsh <> Date: Fri, 21 Mar 2025 11:37:25 +0800 Subject: [PATCH 1/3] sc --- .env.base | 4 +- src/api/okr/wait.js | 83 ++++++++ src/config/axios/index.ts | 5 +- src/config/axios/service.ts | 3 +- .../OKR/Management/Components/DialogWait.vue | 183 ++++++++++------- .../OKR/Management/Components/WaitTarget.vue | 193 ++++++------------ yarn.lock | 48 +++-- 7 files changed, 297 insertions(+), 222 deletions(-) create mode 100644 src/api/okr/wait.js diff --git a/.env.base b/.env.base index ef509f9..0aa0c82 100644 --- a/.env.base +++ b/.env.base @@ -4,8 +4,8 @@ VITE_NODE_ENV=development VITE_DEV=true # 请求路径 -# VITE_BASE_URL='http://47.98.161.246:48080' -VITE_BASE_URL='http://114.55.169.15:48080' +VITE_BASE_URL='http://47.98.161.246:48080' +# VITE_BASE_URL='http://114.55.169.15:48080' # 上传路径 VITE_UPLOAD_URL='http://47.98.161.246:48080/admin-api/system/file/upload' diff --git a/src/api/okr/wait.js b/src/api/okr/wait.js new file mode 100644 index 0000000..2431c03 --- /dev/null +++ b/src/api/okr/wait.js @@ -0,0 +1,83 @@ +import request from '@/config/axios' + +// 创建 +export const createWait = (data) => { + return request.post({ + url: '/admin-api/okr/agent-work/create', + data, + isSubmitForm: true, + headers: { 'instance-id': 1016 } + }) +} + +// 修改 +export const updateWait = (data) => { + return request.put({ + url: '/admin-api/okr/agent-work/update', + data, + headers: { 'instance-id': 1016 } + }) +} + +// 分页 +export const getWaitPage = (params) => { + return request.get({ + url: '/admin-api/okr/agent-work/page', + params, + headers: { 'instance-id': 1016 } + }) +} + +// 详情 +export const getWaitDetail = (id) => { + return request.get({ + url: '/admin-api/okr/agent-work/get', + params: { id }, + headers: { 'instance-id': 1016 } + }) +} + +// 删除 +export const deleteWait = (id) => { + return request.delete({ + url: '/admin-api/okr/agent-work/delete', + params: { id }, + headers: { 'instance-id': 1016 } + }) +} + +// 催办 +export const urgeWait = (workId) => { + return request.get({ + url: '/admin-api/okr/agent-work/urge', + params: { workId }, + headers: { 'instance-id': 1016 } + }) +} + +// 跟进待办 +export const followWait = (data) => { + return request.post({ + url: '/admin-api/okr/agent-work-follow/create', + data, + isSubmitForm: true, + headers: { 'instance-id': 1016 } + }) +} + +// 查询跟进记录 +export const getFollowWaitPage = (params) => { + return request.get({ + url: '/admin-api/okr/agent-work-follow/list', + params, + headers: { 'instance-id': 1016 } + }) +} + +export const getWaitCount = (params) => { + return request.get({ + url: '/admin-api/okr/agent-work/getAgentWorkNum', + params, + headers: { 'instance-id': 1016 } + }) +} diff --git a/src/config/axios/index.ts b/src/config/axios/index.ts index f857d5a..f0687f6 100644 --- a/src/config/axios/index.ts +++ b/src/config/axios/index.ts @@ -5,7 +5,7 @@ import { config } from './config' const { default_headers } = config const request = (option: any) => { - const { url, method, params, data, headersType, responseType, isSubmitForm } = option + const { url, method, params, data, headersType, responseType, isSubmitForm, headers } = option return service({ url: url, method, @@ -14,7 +14,8 @@ const request = (option: any) => { data, responseType: responseType, headers: { - 'Content-Type': headersType || default_headers + 'Content-Type': headersType || default_headers, + ...headers } }) } diff --git a/src/config/axios/service.ts b/src/config/axios/service.ts index 3009121..d49464d 100644 --- a/src/config/axios/service.ts +++ b/src/config/axios/service.ts @@ -66,7 +66,8 @@ service.interceptors.request.use( // 设置实例 const appId = getAppId() - if (appId) (config as Recordable).headers['instance-id'] = appId + if (appId && !(config as Recordable).headers['instance-id']) + (config as Recordable).headers['instance-id'] = appId const params = config.params || {} const data = config.data || false diff --git a/src/views/OKR/Management/Components/DialogWait.vue b/src/views/OKR/Management/Components/DialogWait.vue index fe83d5f..6fcc047 100644 --- a/src/views/OKR/Management/Components/DialogWait.vue +++ b/src/views/OKR/Management/Components/DialogWait.vue @@ -7,7 +7,7 @@ :disabled="formType == 'do'" :rules="rules" label-width="80px" - class="flex-1 wait-form" + class="flex-1" > @@ -39,8 +39,8 @@ - - + + - + - + @@ -85,7 +86,7 @@ - + - - - - + + + + - - - + + + + + + + - - + + @@ -143,23 +159,15 @@
- -
张三
-
- 今天成交了15个 -
-
- -
张三
-
- 下午跟进了100条线索 -
-
- -
张三
-
- 上午跟进了100条线索 -
+ +
{{ item.followUserName }}
+
@@ -176,20 +184,30 @@