sc
This commit is contained in:
@@ -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'
|
||||
|
||||
83
src/api/okr/wait.js
Normal file
83
src/api/okr/wait.js
Normal file
@@ -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 }
|
||||
})
|
||||
}
|
||||
@@ -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
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
:disabled="formType == 'do'"
|
||||
:rules="rules"
|
||||
label-width="80px"
|
||||
class="flex-1 wait-form"
|
||||
class="flex-1"
|
||||
>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="24" :offset="0">
|
||||
@@ -39,8 +39,8 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="完成状态" prop="status">
|
||||
<el-select v-model="form.status" placeholder="选择完成状态" filterable>
|
||||
<el-form-item label="完成状态" prop="completeStatus">
|
||||
<el-select v-model="form.completeStatus" placeholder="选择完成状态" filterable>
|
||||
<el-option
|
||||
v-for="item in props.statusOptions"
|
||||
:key="item.value"
|
||||
@@ -53,9 +53,9 @@
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="截止日期" prop="dueDate">
|
||||
<el-form-item label="截止日期" prop="endDate">
|
||||
<el-date-picker
|
||||
v-model="form.dueDate"
|
||||
v-model="form.endDate"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
@@ -64,9 +64,9 @@
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12" :offset="0">
|
||||
<el-form-item label="执行人" prop="executorIds">
|
||||
<el-form-item label="执行人" prop="userList">
|
||||
<el-select
|
||||
v-model="form.executorIds"
|
||||
v-model="form.userList"
|
||||
placeholder="选择执行人,可多选"
|
||||
multiple
|
||||
clearable
|
||||
@@ -76,6 +76,7 @@
|
||||
<el-option
|
||||
v-for="item in employeeOptions"
|
||||
:key="item.id"
|
||||
:disabled="item.status == 1"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
/>
|
||||
@@ -85,7 +86,7 @@
|
||||
</el-row>
|
||||
<el-row :gutter="0">
|
||||
<el-col :span="8" :offset="0">
|
||||
<el-form-item prop="remindFrequency">
|
||||
<el-form-item prop="notifyType">
|
||||
<template #label>
|
||||
<el-tooltip
|
||||
content="新增待办时会立刻发送消息通知执行人,若后续无需再次提醒,频率可选择“不提醒”"
|
||||
@@ -96,34 +97,49 @@
|
||||
</el-tooltip>
|
||||
<span>提醒频率</span>
|
||||
</template>
|
||||
<el-select v-model="form.remindFrequency" placeholder="选择提醒频率">
|
||||
<el-option label="不提醒" :value="0" />
|
||||
<el-option label="单次提醒" :value="1" />
|
||||
<el-option label="循环提醒" :value="2" />
|
||||
<el-select v-model="form.notifyType" placeholder="选择提醒频率">
|
||||
<el-option label="不提醒" value="1" />
|
||||
<el-option label="单次提醒" value="2" />
|
||||
<el-option label="循环提醒" value="3" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0" v-if="form.remindFrequency != 0">
|
||||
<el-form-item label="提醒时间" prop="remindTime">
|
||||
<el-input v-model="form.remindTime" placeholder="输入小时数" min="0" type="number">
|
||||
<el-col :span="8" :offset="0" v-if="form.notifyType != 1">
|
||||
<el-form-item label="提醒时间" prop="remindTime" class="wait-form">
|
||||
<el-input
|
||||
v-if="form.notifyType == 2"
|
||||
v-model="form.notifyBeforeTime"
|
||||
placeholder="输入小时数"
|
||||
min="0"
|
||||
type="number"
|
||||
>
|
||||
<template #prepend>
|
||||
<span v-if="form.remindFrequency == 1">提前</span>
|
||||
<span v-else-if="form.remindFrequency == 2">每</span>
|
||||
<span>提前</span>
|
||||
</template>
|
||||
<template #append> 小时 </template>
|
||||
</el-input>
|
||||
<el-input
|
||||
v-else-if="form.notifyType == 3"
|
||||
v-model="form.intervalTime"
|
||||
placeholder="输入小时数"
|
||||
min="0"
|
||||
type="number"
|
||||
>
|
||||
<template #prepend>
|
||||
<span>每</span>
|
||||
</template>
|
||||
<template #append> 小时 </template>
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="8" :offset="0" v-if="form.remindFrequency == 2">
|
||||
<el-form-item label="首次提醒" prop="firstTime">
|
||||
<el-col :span="8" :offset="0" v-if="form.notifyType == 3">
|
||||
<el-form-item label="首次提醒" prop="firstNotifyTime">
|
||||
<el-time-picker
|
||||
v-model="form.firstTime"
|
||||
v-model="form.firstNotifyTime"
|
||||
format="HH:mm"
|
||||
value-format="HH:mm"
|
||||
style="width: 100%"
|
||||
:picker-options="{
|
||||
selectableRange: '07:00 - 22:00'
|
||||
}"
|
||||
:picker-options="enableTimeRange"
|
||||
placeholder="选择时间点"
|
||||
/>
|
||||
</el-form-item>
|
||||
@@ -143,23 +159,15 @@
|
||||
</div>
|
||||
<div class="overflow-y-auto pl-15px" style="height: calc(100% - 50px)">
|
||||
<el-timeline class="ml-10px">
|
||||
<el-timeline-item placement="bottom" timestamp="2025-01-20" color="#30d1fc">
|
||||
<div>张三</div>
|
||||
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
||||
今天成交了15个
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="bottom" timestamp="2025-01-15" color="#30d1fc">
|
||||
<div>张三</div>
|
||||
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
||||
下午跟进了100条线索
|
||||
</div>
|
||||
</el-timeline-item>
|
||||
<el-timeline-item placement="bottom" timestamp="2025-01-01" color="#30d1fc">
|
||||
<div>张三</div>
|
||||
<div class="mt-10px text-14px" style="line-height: 24px; color: #666">
|
||||
上午跟进了100条线索
|
||||
</div>
|
||||
<el-timeline-item
|
||||
v-for="item in followList"
|
||||
:key="item.followId"
|
||||
placement="bottom"
|
||||
:timestamp="formatDate(item.createTime, 'YYYY-MM-DD HH:mm:ss')"
|
||||
color="#30d1fc"
|
||||
>
|
||||
<div class="font-bold" style="font-size: 16px">{{ item.followUserName }}</div>
|
||||
<div v-dompurify-html="item.content"></div>
|
||||
</el-timeline-item>
|
||||
</el-timeline>
|
||||
</div>
|
||||
@@ -176,20 +184,30 @@
|
||||
</template>
|
||||
|
||||
<script setup name="DialogWait">
|
||||
import {
|
||||
createWait,
|
||||
updateWait,
|
||||
getWaitDetail,
|
||||
getFollowWaitPage,
|
||||
followWait
|
||||
} from '@/api/okr/wait'
|
||||
import { getEmployeeSimpleList } from '@/api/pers/employee'
|
||||
import { formatDate } from '@/utils/formatTime'
|
||||
|
||||
const props = defineProps({
|
||||
priorityOptions: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
{ label: '高', value: 1 },
|
||||
{ label: '中', value: 2 },
|
||||
{ label: '低', value: 3 }
|
||||
{ label: '高', value: '1' },
|
||||
{ label: '中', value: '2' },
|
||||
{ label: '低', value: '3' }
|
||||
]
|
||||
},
|
||||
statusOptions: {
|
||||
type: Array,
|
||||
default: () => [
|
||||
{ label: '未完成', value: 1, tagType: 'warning' },
|
||||
{ label: '已关闭', value: 2, tagType: 'success' }
|
||||
{ label: '未完成', value: '1', tagType: 'warning' },
|
||||
{ label: '已关闭', value: '2', tagType: 'success' }
|
||||
]
|
||||
}
|
||||
})
|
||||
@@ -201,6 +219,10 @@ const toolbarConfig = {
|
||||
toolbarKeys: []
|
||||
}
|
||||
|
||||
const enableTimeRange = {
|
||||
selectableRange: '07:00 - 22:00'
|
||||
}
|
||||
|
||||
const show = ref(false)
|
||||
const title = ref('')
|
||||
const formType = ref('create')
|
||||
@@ -209,10 +231,12 @@ const form = ref({})
|
||||
const formLoading = ref(false)
|
||||
const rules = ref({
|
||||
title: [{ required: true, message: '请输入标题', trigger: 'blur' }],
|
||||
dueDate: [{ required: true, message: '请选择截止日期', trigger: 'change' }],
|
||||
executorIds: [{ required: true, message: '请选择执行人', trigger: 'change' }]
|
||||
endDate: [{ required: true, message: '请选择截止日期', trigger: 'change' }],
|
||||
userList: [{ required: true, message: '请选择执行人', trigger: 'change' }]
|
||||
})
|
||||
|
||||
const followList = ref([])
|
||||
|
||||
async function open(type, id) {
|
||||
show.value = true
|
||||
title.value = { create: '新增待办', update: '修改待办', do: '更新待办进度' }[type]
|
||||
@@ -221,19 +245,15 @@ async function open(type, id) {
|
||||
if (id) {
|
||||
formLoading.value = true
|
||||
try {
|
||||
// 模拟表单数据
|
||||
// 表单数据
|
||||
getWaitDetail(id).then((info) => {
|
||||
form.value = {
|
||||
title: '2025年1月20日,张三成交了15个',
|
||||
content: '今天成交了15个',
|
||||
priority: 1,
|
||||
status: 1,
|
||||
dueDate: '2025-01-20',
|
||||
executorIds: [1, 2],
|
||||
remindFrequency: 2,
|
||||
remindTime: 12,
|
||||
firstTime: '09:00'
|
||||
...info,
|
||||
endDate: formatDate(info.endDate, 'YYYY-MM-DD'),
|
||||
userList: info.userIdList
|
||||
}
|
||||
// form.value = await KpiApi.getKpiDetail(id)
|
||||
})
|
||||
getFollowList(id)
|
||||
} finally {
|
||||
formLoading.value = false
|
||||
}
|
||||
@@ -241,25 +261,32 @@ async function open(type, id) {
|
||||
getOptions()
|
||||
}
|
||||
|
||||
function getFollowList(id) {
|
||||
// 跟进数据
|
||||
getFollowWaitPage({
|
||||
waitId: id
|
||||
}).then((data) => {
|
||||
followList.value = data
|
||||
})
|
||||
}
|
||||
|
||||
function getOptions() {
|
||||
employeeOptions.value = [
|
||||
{ id: 1, name: '张三' },
|
||||
{ id: 2, name: '李四' },
|
||||
{ id: 3, name: '王五' }
|
||||
]
|
||||
getEmployeeSimpleList().then((data) => {
|
||||
employeeOptions.value = data
|
||||
})
|
||||
}
|
||||
|
||||
function resetForm() {
|
||||
form.value = {
|
||||
title: undefined,
|
||||
content: undefined,
|
||||
priority: 1,
|
||||
status: 1,
|
||||
dueDate: undefined,
|
||||
executorIds: [],
|
||||
remindFrequency: 2,
|
||||
priority: '1',
|
||||
completeStatus: '1',
|
||||
endDate: undefined,
|
||||
userList: [],
|
||||
notifyType: '3',
|
||||
remindTime: 12,
|
||||
firstTime: '09:00'
|
||||
firstNotifyTime: '09:00'
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,10 +305,10 @@ async function handleSave() {
|
||||
formLoading.value = true
|
||||
try {
|
||||
if (formType.value === 'create') {
|
||||
await KpiApi.createKpi(form.value)
|
||||
await createWait(form.value)
|
||||
message.success(t('common.createSuccess'))
|
||||
} else {
|
||||
await KpiApi.updateKpi(form.value)
|
||||
await updateWait(form.value)
|
||||
message.success(t('common.updateSuccess'))
|
||||
}
|
||||
show.value = false
|
||||
@@ -293,6 +320,16 @@ async function handleSave() {
|
||||
}
|
||||
|
||||
const employeeOptions = ref([])
|
||||
|
||||
function addDo() {
|
||||
followWait({
|
||||
workId: form.value.workId,
|
||||
content: form.value.followUpContent
|
||||
}).then(() => {
|
||||
message.success('跟进成功')
|
||||
getFollowList(form.value.workId)
|
||||
})
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
|
||||
@@ -14,8 +14,13 @@
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-select v-model="searchForm.status" placeholder="选择完成状态" clearable filterable>
|
||||
<!-- <el-form-item>
|
||||
<el-select
|
||||
v-model="searchForm.completeStatus"
|
||||
placeholder="选择完成状态"
|
||||
clearable
|
||||
filterable
|
||||
>
|
||||
<el-option
|
||||
v-for="item in statusOptions"
|
||||
:key="item.value"
|
||||
@@ -23,24 +28,16 @@
|
||||
:value="item.value"
|
||||
/>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button @click="searchList"> 搜索</el-button>
|
||||
<el-button type="primary" @click="handleAdd"> 新增</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<div>
|
||||
<Icon icon="ep:info-filled" />
|
||||
<span>开发注意:</span>
|
||||
<div>列表排序 1 状态按照未完成在前、已关闭在后, 2优先级根据高中低排序 3截止日期正序</div>
|
||||
<div>
|
||||
表格全部操作按钮:创建人(修改、删除、催办->微信通知)、执行人(跟进);且与完成状态相关
|
||||
</div>
|
||||
</div>
|
||||
<el-tabs v-model="tabIndex" @tab-click="searchList">
|
||||
<el-tabs v-model="tabIndex" @tab-change="searchList">
|
||||
<el-tab-pane :name="1">
|
||||
<template #label>
|
||||
<el-badge :value="9" :max="99">
|
||||
<el-badge :value="tabCount.dayEndAgentWorkNum" :max="99" :show-zero="false">
|
||||
<el-tooltip content="截止日在今日及之前的未关闭事项" placement="top" effect="dark">
|
||||
<Icon icon="ep:question-filled" />
|
||||
</el-tooltip>
|
||||
@@ -58,7 +55,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :name="3">
|
||||
<template #label>
|
||||
<el-badge :value="3" :max="99">
|
||||
<el-badge :value="tabCount.urgeAgentWorkNum" :max="99" :show-zero="false">
|
||||
<el-tooltip content="指派他人去办的事项" placement="top" effect="dark">
|
||||
<Icon icon="ep:question-filled" />
|
||||
</el-tooltip>
|
||||
@@ -68,7 +65,7 @@
|
||||
</el-tab-pane>
|
||||
<el-tab-pane :name="4">
|
||||
<template #label>
|
||||
<el-badge :value="999" :max="99">
|
||||
<el-badge :value="tabCount.notifyNum" :max="99" :show-zero="false">
|
||||
<el-tooltip content="特指OKR中@我的消息" placement="top" effect="dark">
|
||||
<Icon icon="ep:question-filled" />
|
||||
</el-tooltip>
|
||||
@@ -101,20 +98,22 @@
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="createUserName" label="创建人" />
|
||||
<el-table-column prop="createDate" label="创建日期" />
|
||||
<el-table-column prop="executorNames" label="执行人" />
|
||||
<el-table-column prop="dueDate" label="截止日期" />
|
||||
<el-table-column prop="creatorName" label="创建人" />
|
||||
<el-table-column prop="createTime" label="创建日期" :formatter="dateFormatter" />
|
||||
<el-table-column prop="userNameStr" label="执行人" />
|
||||
<el-table-column prop="endDate" label="截止日期" :formatter="dateFormatter" />
|
||||
<el-table-column label="状态">
|
||||
<template #default="{ row }">
|
||||
<el-tag :type="statusFilter(row.status)">{{ statusNameFilter(row.status) }}</el-tag>
|
||||
<el-tag :type="statusFilter(row.completeStatus)">{{
|
||||
statusNameFilter(row.completeStatus)
|
||||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="completeDate" label="关闭日期" />
|
||||
<el-table-column prop="completedDate" label="关闭日期" :formatter="dateFormatter" />
|
||||
<el-table-column fixed="right" label="操作" width="140">
|
||||
<template #default="{ row }">
|
||||
<el-button
|
||||
v-if="row.executorIds.includes(currentUserId) && row.status == 1"
|
||||
v-if="row.userIdList.includes(currentUserId) && row.completeStatus == 1"
|
||||
style="padding: 0; margin-right: 10px"
|
||||
type="primary"
|
||||
text
|
||||
@@ -123,16 +122,7 @@
|
||||
跟进
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.createUserId == currentUserId && row.status == 1"
|
||||
style="padding: 0; margin-right: 10px; margin-left: 0"
|
||||
type="primary"
|
||||
text
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="!row.executorIds.includes(currentUserId) && row.status == 1"
|
||||
v-if="!row.userIdList.includes(currentUserId) && row.completeStatus == 1"
|
||||
style="padding: 0; margin-right: 10px; margin-left: 0"
|
||||
type="primary"
|
||||
text
|
||||
@@ -141,7 +131,16 @@
|
||||
催办
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.createUserId == currentUserId && row.status == 1"
|
||||
v-if="row.creator == currentUserId && row.completeStatus == 1"
|
||||
style="padding: 0; margin-right: 10px; margin-left: 0"
|
||||
type="primary"
|
||||
text
|
||||
@click="handleEdit(row)"
|
||||
>
|
||||
修改
|
||||
</el-button>
|
||||
<el-button
|
||||
v-if="row.creator == currentUserId && row.completeStatus == 1"
|
||||
style="padding: 0; margin-right: 10px; margin-left: 0"
|
||||
type="danger"
|
||||
text
|
||||
@@ -165,8 +164,11 @@
|
||||
|
||||
<script setup name="WaitTarget">
|
||||
import { useUserStore } from '@/store/modules/user'
|
||||
import { dateFormatter } from '@/utils/formatTime'
|
||||
import DialogWait from './DialogWait.vue'
|
||||
|
||||
import { getWaitPage, deleteWait, getWaitCount } from '@/api/okr/wait'
|
||||
|
||||
const userStore = useUserStore()
|
||||
const currentUserId = userStore.getUser.id
|
||||
|
||||
@@ -174,7 +176,7 @@ const message = useMessage()
|
||||
|
||||
const searchForm = ref({
|
||||
title: undefined,
|
||||
status: undefined,
|
||||
completeStatus: undefined,
|
||||
priority: undefined,
|
||||
pageNo: 1,
|
||||
pageSize: 50
|
||||
@@ -186,25 +188,25 @@ const statusOptions = [
|
||||
]
|
||||
|
||||
const statusFilter = (status) => {
|
||||
return statusOptions.find((item) => item.value === status)?.tagType
|
||||
return statusOptions.find((item) => item.value == status)?.tagType
|
||||
}
|
||||
|
||||
const statusNameFilter = (status) => {
|
||||
return statusOptions.find((item) => item.value === status)?.label
|
||||
return statusOptions.find((item) => item.value == status)?.label
|
||||
}
|
||||
|
||||
const priorityOptions = [
|
||||
{ label: '高', value: 1, tagType: 'danger' },
|
||||
{ label: '中', value: 2, tagType: 'warning' },
|
||||
{ label: '低', value: 3, tagType: 'info' }
|
||||
{ label: '高', value: '1', tagType: 'danger' },
|
||||
{ label: '中', value: '2', tagType: 'warning' },
|
||||
{ label: '低', value: '3', tagType: 'info' }
|
||||
]
|
||||
|
||||
const priorityFilter = (priority) => {
|
||||
return priorityOptions.find((item) => item.value === priority)?.tagType
|
||||
return priorityOptions.find((item) => item.value == priority)?.tagType
|
||||
}
|
||||
|
||||
const priorityNameFilter = (priority) => {
|
||||
return priorityOptions.find((item) => item.value === priority)?.label
|
||||
return priorityOptions.find((item) => item.value == priority)?.label
|
||||
}
|
||||
|
||||
const tabIndex = ref(1)
|
||||
@@ -218,6 +220,21 @@ function searchList() {
|
||||
getList()
|
||||
}
|
||||
|
||||
const tabCount = ref({
|
||||
dayEndAgentWorkNum: 0,
|
||||
myAgentWorkNum: 0,
|
||||
urgeAgentWorkNum: 0,
|
||||
notifyNum: 0
|
||||
})
|
||||
function getTabCount() {
|
||||
getWaitCount({
|
||||
title: searchForm.value.title,
|
||||
priority: searchForm.value.priority
|
||||
}).then((res) => {
|
||||
tabCount.value = res
|
||||
})
|
||||
}
|
||||
|
||||
const loading = ref(false)
|
||||
const tableList = ref([])
|
||||
const mentionedList = ref([])
|
||||
@@ -225,97 +242,18 @@ const total = ref(0)
|
||||
function getList() {
|
||||
loading.value = true
|
||||
try {
|
||||
// 用settimeout模拟网络请求
|
||||
setTimeout(() => {
|
||||
searchForm.value.queryType = tabIndex.value
|
||||
getWaitPage(searchForm.value).then((res) => {
|
||||
tableList.value = res.list
|
||||
total.value = res.total
|
||||
loading.value = false
|
||||
if (tabIndex.value == 4) {
|
||||
mentionedList.value = [
|
||||
{
|
||||
id: 1,
|
||||
content: '我是老六@张三',
|
||||
createUserName: '王二',
|
||||
createDate: '2025-03-07'
|
||||
}
|
||||
]
|
||||
} else {
|
||||
const list = [
|
||||
{
|
||||
id: 1,
|
||||
title: '今日跟进数量达到100',
|
||||
description: '今日成交数量达到10',
|
||||
priority: 1,
|
||||
createUserId: 1,
|
||||
createUserName: '系统',
|
||||
createDate: '2025-03-07',
|
||||
executorIds: ['1818599239840960512'],
|
||||
executorNames: '张三',
|
||||
dueDate: '2025-03-07',
|
||||
status: 1,
|
||||
completeDate: ''
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '今日跟进数量达到100',
|
||||
description: '今日成交数量达到10',
|
||||
priority: 1,
|
||||
createUserId: '1818599239840960512',
|
||||
createUserName: '张三',
|
||||
createDate: '2025-03-07',
|
||||
executorIds: ['1818599239840960512', '123'],
|
||||
executorNames: '张三,李四',
|
||||
dueDate: '2025-02-07',
|
||||
status: 1,
|
||||
completeDate: ''
|
||||
},
|
||||
{
|
||||
id: 3,
|
||||
title: '今日跟进数量达到100',
|
||||
description: '今日成交数量达到10',
|
||||
priority: 1,
|
||||
createUserId: '1818599239840960512',
|
||||
createUserName: '张三',
|
||||
createDate: '2025-03-07',
|
||||
executorIds: ['1818599239840960512'],
|
||||
executorNames: '张三',
|
||||
dueDate: '2025-03-17',
|
||||
status: 2,
|
||||
completeDate: '2025-03-07'
|
||||
},
|
||||
{
|
||||
id: 2,
|
||||
title: '今日跟进数量达到100',
|
||||
description: '今日成交数量达到10',
|
||||
priority: 1,
|
||||
createUserId: '1818599239840960512',
|
||||
createUserName: '张三',
|
||||
createDate: '2025-03-07',
|
||||
executorIds: ['123'],
|
||||
executorNames: '李四',
|
||||
dueDate: '2025-02-07',
|
||||
status: 1,
|
||||
completeDate: ''
|
||||
}
|
||||
]
|
||||
tableList.value = list.filter((item) => {
|
||||
if (tabIndex.value == 1) {
|
||||
return item.status == 1
|
||||
} else {
|
||||
return item
|
||||
}
|
||||
})
|
||||
}
|
||||
total.value = 1
|
||||
}, 1000)
|
||||
// getWaitTargetList(searchForm.value).then((res) => {
|
||||
// tableList.value = res.data
|
||||
// total.value = res.total
|
||||
// loading.value = false
|
||||
// })
|
||||
getTabCount()
|
||||
} catch (error) {}
|
||||
}
|
||||
|
||||
function handleDo(row) {
|
||||
waitDialogRef.value.open('do', row.id)
|
||||
waitDialogRef.value.open('do', row.workId)
|
||||
}
|
||||
|
||||
const waitDialogRef = ref()
|
||||
@@ -324,11 +262,16 @@ function handleAdd() {
|
||||
}
|
||||
|
||||
function handleEdit(row) {
|
||||
waitDialogRef.value.open('update', row.id)
|
||||
waitDialogRef.value.open('update', row.workId)
|
||||
}
|
||||
|
||||
function handleDelete(row) {
|
||||
console.log(row)
|
||||
message.confirm('确定删除待办事项吗?').then(() => {
|
||||
deleteWait(row.workId).then(() => {
|
||||
message.success('删除成功')
|
||||
getList()
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
function handleNotice(row) {
|
||||
|
||||
48
yarn.lock
48
yarn.lock
@@ -1374,25 +1374,25 @@
|
||||
resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.57.0.tgz#a5417ae8427873f1dd08b70b3574b453e67b5f7f"
|
||||
integrity sha512-Ys+3g2TaW7gADOJzPt83SJtCDhMjndcDMFVQ/Tj9iA1BfJzFKD9mAUXT3OenpuPHbI6P/myECxRJrofUsDx/5g==
|
||||
|
||||
"@floating-ui/core@^1.0.0":
|
||||
version "1.6.0"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.0.tgz#fa41b87812a16bf123122bf945946bae3fdf7fc1"
|
||||
integrity sha512-PcF++MykgmTj3CIyOQbKA/hDzOAiqI3mhuoN44WRCopIs1sgoDoU4oty4Jtqaj/y3oDU6fnVSm4QG0a3t5i0+g==
|
||||
"@floating-ui/core@^1.6.0":
|
||||
version "1.6.9"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/core/-/core-1.6.9.tgz#64d1da251433019dafa091de9b2886ff35ec14e6"
|
||||
integrity sha512-uMXCuQ3BItDUbAMhIXw7UPXRfAlOAvZzdK9BWpE60MCn+Svt3aLn9jsPTi/WNGlRUu2uI0v5S7JiIUsbsvh3fw==
|
||||
dependencies:
|
||||
"@floating-ui/utils" "^0.2.1"
|
||||
"@floating-ui/utils" "^0.2.9"
|
||||
|
||||
"@floating-ui/dom@^1.0.1":
|
||||
version "1.6.3"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.3.tgz#954e46c1dd3ad48e49db9ada7218b0985cee75ef"
|
||||
integrity sha512-RnDthu3mzPlQ31Ss/BTwQ1zjzIhr3lk1gZB1OC56h/1vEtaXkESrOqL5fQVMfXpwGtRwX+YsZBdyHtJMQnkArw==
|
||||
version "1.6.13"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/dom/-/dom-1.6.13.tgz#a8a938532aea27a95121ec16e667a7cbe8c59e34"
|
||||
integrity sha512-umqzocjDgNRGTuO7Q8CU32dkHkECqI8ZdMZ5Swb6QAM0t5rnlrN3lGo1hdpscRd3WS8T6DKYK4ephgIH9iRh3w==
|
||||
dependencies:
|
||||
"@floating-ui/core" "^1.0.0"
|
||||
"@floating-ui/utils" "^0.2.0"
|
||||
"@floating-ui/core" "^1.6.0"
|
||||
"@floating-ui/utils" "^0.2.9"
|
||||
|
||||
"@floating-ui/utils@^0.2.0", "@floating-ui/utils@^0.2.1":
|
||||
version "0.2.1"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.1.tgz#16308cea045f0fc777b6ff20a9f25474dd8293d2"
|
||||
integrity sha512-9TANp6GPoMtYzQdt54kfAyMmz1+osLlXdg2ENroU7zzrtflTLrrC/lgrIfaSe+Wu0b89GKccT7vxXA0MoAIO+Q==
|
||||
"@floating-ui/utils@^0.2.9":
|
||||
version "0.2.9"
|
||||
resolved "https://registry.yarnpkg.com/@floating-ui/utils/-/utils-0.2.9.tgz#50dea3616bc8191fb8e112283b49eaff03e78429"
|
||||
integrity sha512-MDWhGtE+eHw5JW7lq4qhc5yRLS11ERl1c7Z6Xd0a58DozHES6EnNNwUWbMiG4J9Cgj053Bhk8zvlhFYKVhULwg==
|
||||
|
||||
"@form-create/component-elm-checkbox@^3.1.29":
|
||||
version "3.1.29"
|
||||
@@ -1901,9 +1901,9 @@
|
||||
"@types/lodash" "*"
|
||||
|
||||
"@types/lodash@*", "@types/lodash@^4.14.182":
|
||||
version "4.17.0"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.0.tgz#d774355e41f372d5350a4d0714abb48194a489c3"
|
||||
integrity sha512-t7dhREVv6dbNj0q17X12j7yDG4bD/DHYX7o5/DbDxobP0HnGPgpRz2Ej77aL7TZT3DSw13fqUTj8J4mMnqa7WA==
|
||||
version "4.17.16"
|
||||
resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.17.16.tgz#94ae78fab4a38d73086e962d0b65c30d816bfb0a"
|
||||
integrity sha512-HX7Em5NYQAXKW+1T+FiuG27NGwzJfCX3s1GjOa7ujxZa52kjJLOr4FUxT+giF6Tgxv1e+/czV/iTtBw27WTU9g==
|
||||
|
||||
"@types/minimist@^1.2.0", "@types/minimist@^1.2.2":
|
||||
version "1.2.5"
|
||||
@@ -3520,7 +3520,12 @@ data-view-byte-offset@^1.0.0:
|
||||
es-errors "^1.3.0"
|
||||
is-data-view "^1.0.1"
|
||||
|
||||
dayjs@^1.11.3, dayjs@^1.11.7:
|
||||
dayjs@^1.11.3:
|
||||
version "1.11.13"
|
||||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.13.tgz#92430b0139055c3ebb60150aa13e860a4b5a366c"
|
||||
integrity sha512-oaMBel6gjolK862uaPQOVTA7q3TZhuSvuMQAAglQDOWYO9A91IrAOUJEyKVlqJlHE0vq5p5UXxzdPfMH/x6xNg==
|
||||
|
||||
dayjs@^1.11.7:
|
||||
version "1.11.10"
|
||||
resolved "https://registry.yarnpkg.com/dayjs/-/dayjs-1.11.10.tgz#68acea85317a6e164457d6d6947564029a6a16a0"
|
||||
integrity sha512-vjAczensTgRcqDERK0SR2XMwsF/tSvnvlv6VcF2GIhg6Sx4yOIt/irsr1RDJsKiIyBzJDpCoXiWWq28MqH2cnQ==
|
||||
@@ -8154,7 +8159,12 @@ vue-amap@^0.5.10:
|
||||
dependencies:
|
||||
uppercamelcase "^1.1.0"
|
||||
|
||||
vue-demi@*, vue-demi@>=0.14.5, vue-demi@>=0.14.7:
|
||||
vue-demi@*:
|
||||
version "0.14.10"
|
||||
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.10.tgz#afc78de3d6f9e11bf78c55e8510ee12814522f04"
|
||||
integrity sha512-nMZBOwuzabUO0nLgIcc6rycZEebF6eeUfaiQx9+WSk8e29IbLvPU9feI6tqW4kTo3hvoYAJkMh8n8D0fuISphg==
|
||||
|
||||
vue-demi@>=0.14.5, vue-demi@>=0.14.7:
|
||||
version "0.14.7"
|
||||
resolved "https://registry.yarnpkg.com/vue-demi/-/vue-demi-0.14.7.tgz#8317536b3ef74c5b09f268f7782e70194567d8f2"
|
||||
integrity sha512-EOG8KXDQNwkJILkx/gPcoL/7vH+hORoBaKgGe+6W7VFMvCYJfmF2dGbvgDroVnI8LU7/kTu8mbjRZGBU1z9NTA==
|
||||
|
||||
Reference in New Issue
Block a user