【招生用户端】 新增# 对接总结记录列表、子账号管理设置组长
parent
8b92a8407f
commit
1f314a43f1
|
@ -20,3 +20,7 @@ export function templateDetail(params: any) {
|
|||
export function templateDelete(params: any) {
|
||||
return request.post({ url: '/template/del', params })
|
||||
}
|
||||
// 总结列表
|
||||
export function summaryRecordLists(params: any) {
|
||||
return request.get({ url: '/summary/template/list', params })
|
||||
}
|
||||
|
|
|
@ -1,7 +1,17 @@
|
|||
<template>
|
||||
<el-date-picker v-model="content" :type="type" range-separator="-" :format="format" :valueFormat="format"
|
||||
start-placeholder="开始时间" end-placeholder="结束时间" clearable :disabled-date="setDisabledDate"
|
||||
:disabled-hours="setDisabledHours"></el-date-picker>
|
||||
<el-date-picker
|
||||
v-model="content"
|
||||
:type="type"
|
||||
range-separator="-"
|
||||
:format="format"
|
||||
:valueFormat="format"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
clearable
|
||||
:disabled-date="setDisabledDate"
|
||||
:disabled-hours="setDisabledHours"
|
||||
:default-time="[new Date(2000, 1, 1, 0, 0, 0), new Date(2000, 2, 1, 23, 59, 59)]"
|
||||
></el-date-picker>
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
|
@ -12,10 +22,10 @@ import type { DatePickType } from 'element-plus'
|
|||
const props = withDefaults(
|
||||
defineProps<{
|
||||
startTime?: string | number
|
||||
endTime?: string | number,
|
||||
type?: DatePickType,
|
||||
format?: string,
|
||||
isDisabledDate?: boolean,
|
||||
endTime?: string | number
|
||||
type?: DatePickType
|
||||
format?: string
|
||||
isDisabledDate?: boolean
|
||||
isDisabledHours?: boolean
|
||||
}>(),
|
||||
{
|
||||
|
|
|
@ -92,6 +92,10 @@ export const clueStepMap: Record<clueStepEnum, string> = {
|
|||
[clueStepEnum.CLUE_COMPLETED]: '转化完成',
|
||||
[clueStepEnum.UPDATE_CLUSE_PROGRESS]: '修改跟进'
|
||||
}
|
||||
export enum groupLeaderEnum {
|
||||
YES = 1,
|
||||
NO = 0
|
||||
}
|
||||
|
||||
const keys: Record<string, any> = {
|
||||
conversionMap: conversionMap,
|
||||
|
|
|
@ -28,6 +28,7 @@ export interface GroupProp {
|
|||
id: number
|
||||
groupName: string
|
||||
}
|
||||
|
||||
export function useCommon() {
|
||||
const categoryLists = ref<CategoryProp[]>([])
|
||||
const groupLists = ref<GroupProp[]>([])
|
||||
|
@ -133,7 +134,7 @@ export function useAuthStaffOperation(component: Component, isGoBack = false, ev
|
|||
const filedKey = msg === '意见反馈' ? 'reply' : msg === '提现' ? 'failReason' : 'refuseReason'
|
||||
const identity = msg == '提现' ? '分销商' : '师傅'
|
||||
const { id } = row
|
||||
let data = { id, status: OperationEnumMap[type] }
|
||||
const data = { id, status: OperationEnumMap[type] }
|
||||
type === OperationTextEnum.SUCCESS
|
||||
? feedback
|
||||
.confirm(`您确定通过【${row[field]}】${identity}的${msg}申请吗?`)
|
||||
|
@ -204,7 +205,7 @@ export function useUploadMoreAction() {
|
|||
return new Promise((resolve, reject) => {
|
||||
const text = type === 'pdf' ? '文件' : '图片'
|
||||
if (!isImage(file, type)) {
|
||||
let msg = type === 'pdf' ? 'pdf' : 'jpg,png,jpeg'
|
||||
const msg = type === 'pdf' ? 'pdf' : 'jpg,png,jpeg'
|
||||
toast(`请上传${msg}格式的${text}`, 'error')
|
||||
fileList.splice(-1, 1)
|
||||
uploadRef.value?.abort(file)
|
||||
|
@ -242,7 +243,7 @@ export function useUploadMoreAction() {
|
|||
type: 'warning'
|
||||
})
|
||||
.then(() => {
|
||||
let index = fileList.indexOf(file)
|
||||
const index = fileList.indexOf(file)
|
||||
fileList.splice(index, 1)
|
||||
fileUploadList.value[type] = fileList
|
||||
})
|
||||
|
@ -256,7 +257,7 @@ export function useUploadMoreAction() {
|
|||
const handlePreview = (file: UploadFile, type: string) => {
|
||||
if (!unref(fileUploadList)[type].length) return
|
||||
imgViewerVisible.value = true
|
||||
let index = unref(fileUploadList)[type].indexOf(file)
|
||||
const index = unref(fileUploadList)[type].indexOf(file)
|
||||
viewerIndex.value = index
|
||||
previewSrcList.value = unref(fileUploadList)[type].map(file => file.url!)
|
||||
}
|
||||
|
|
|
@ -47,9 +47,8 @@
|
|||
<el-radio v-for="option in channelOptions" :key="option.value" :label="option.value">{{ option.label }}</el-radio>
|
||||
</el-radio-group>
|
||||
<template v-if="form.dataFlow == 1">
|
||||
<el-select class="mt-[10px]" v-model="form.teacher" placeholder="请选择指定招生老师">
|
||||
<el-option label="Zone one" value="shanghai" />
|
||||
<el-option label="Zone two" value="beijing" />
|
||||
<el-select class="mt-[10px]" v-model="form.designatedTeacherId" placeholder="请选择指定招生老师">
|
||||
<el-option v-for="item in recrutList" :key="item.id" :label="item.username" :value="item.id" />
|
||||
</el-select>
|
||||
</template>
|
||||
</el-form-item>
|
||||
|
@ -66,7 +65,7 @@
|
|||
<script setup lang="ts">
|
||||
import { organzationLists } from '@/api/account_center/organization'
|
||||
import { postLists } from '@/api/account_center/postion'
|
||||
import { subAccountAdd, subAccountDetail, subAccountEdit } from '@/api/account_center/sub_account'
|
||||
import { subAccountAdd, subAccountDetail, subAccountEdit, subAccountList } from '@/api/account_center/sub_account'
|
||||
import ProDialog, { type IParams } from '@/components/ProDialog/index.vue'
|
||||
import { DataFlowEnum, isDisabledEnum } from '@/enums'
|
||||
import { validateContact } from '@/utils/validate'
|
||||
|
@ -109,7 +108,7 @@ const form = ref({
|
|||
postIds: [],
|
||||
dataFlow: 0,
|
||||
isDisable: 0,
|
||||
teacher: ''
|
||||
designatedTeacherId: ''
|
||||
})
|
||||
const fetchPostionData = async (callback?: (params: []) => void) => {
|
||||
try {
|
||||
|
@ -173,10 +172,23 @@ const findNodeById = (nodes: any[], id: number): any | undefined => {
|
|||
}
|
||||
return undefined
|
||||
}
|
||||
const recrutList = ref<any[]>([])
|
||||
const fetchRecrutList = async (organizationId: number) => {
|
||||
try {
|
||||
const params = {
|
||||
organizationId,
|
||||
postId: 5
|
||||
}
|
||||
const result = await subAccountList(params)
|
||||
recrutList.value = result ?? []
|
||||
} catch (error) {}
|
||||
}
|
||||
const openDialog = async (params: IParams) => {
|
||||
const { organizationId, id } = params.data
|
||||
fetchPostionData()
|
||||
fetchOrganizationData(params.data.organizationId)
|
||||
if (params.data.id) fetchDetail(params.data)
|
||||
fetchOrganizationData(organizationId)
|
||||
fetchRecrutList(organizationId)
|
||||
if (id) fetchDetail(params.data)
|
||||
proDialogRef.value?.openDialog(params)
|
||||
}
|
||||
const handleCancel = (callback: () => void) => {
|
||||
|
|
|
@ -25,10 +25,10 @@
|
|||
</el-space>
|
||||
</div>
|
||||
<ProTable ref="proTableRef" :columns="columns" :tableData="tableData" :loading="loading" :maxHeight="530">
|
||||
<template #accountName="{ row }">
|
||||
<template #username="{ row }">
|
||||
<el-space>
|
||||
<div class="w-[50px] h-[50px] bg-primary rounded-[6px] text-white flex-row-center-center">{{ row.accountName }}</div>
|
||||
<span>{{ row.accountName }}</span>
|
||||
<div class="w-[50px] h-[50px] bg-primary rounded-[6px] text-white flex-row-center-center">{{ row.username }}</div>
|
||||
<span>{{ row.username }}</span>
|
||||
<span
|
||||
v-if="isGroupLeader(row.groupLeader)"
|
||||
class="px-[6px] text-green border border-solid border-green rounded-[4px] text-center text-xs"
|
||||
|
@ -61,8 +61,8 @@ import feedback from '@/utils/feedback'
|
|||
import { Plus, Delete } from '@element-plus/icons-vue'
|
||||
import accountDialog from '../components/account-list/account-dialog.vue'
|
||||
import { useDebounceFn } from '@vueuse/core'
|
||||
import { subAccountDelete, subAccountList } from '@/api/account_center/sub_account'
|
||||
import { StatusEnum, isDisabledEnum } from '@/enums'
|
||||
import { subAccountDelete, subAccountEdit, subAccountList } from '@/api/account_center/sub_account'
|
||||
import { StatusEnum, groupLeaderEnum, isDisabledEnum } from '@/enums'
|
||||
import { omit } from 'lodash-es'
|
||||
|
||||
const props = defineProps({
|
||||
|
@ -96,7 +96,7 @@ const columns = reactive([
|
|||
{ prop: 'operation', label: '操作', fixed: 'right', width: 250 }
|
||||
])
|
||||
|
||||
const isGroupLeader = computed(() => (groupLeader: number) => groupLeader == 1)
|
||||
const isGroupLeader = computed(() => (groupLeader: number) => groupLeader === groupLeaderEnum.YES)
|
||||
const btnText = computed(() => (groupLeader: number) => isGroupLeader.value(groupLeader) ? '取消设为组长' : '设置组长')
|
||||
const isDisabledAdd = computed(() => props.curOrganization.status == StatusEnum.Stop)
|
||||
const fetchTableList = async (nodeId?: number) => {
|
||||
|
@ -118,12 +118,21 @@ const handleStatusChange = row => {
|
|||
resolve(true)
|
||||
})
|
||||
}
|
||||
// 设置组长
|
||||
const setGroupLeader = async row => {
|
||||
const { accountName, id, groupLeader } = row
|
||||
const message = isGroupLeader.value(groupLeader) ? `确定要取消【${accountName}】的组长身份吗?` : `确定将【${accountName}】设置为组长?`
|
||||
const { username, id, groupLeader } = row
|
||||
const message = isGroupLeader.value(groupLeader) ? `确定要取消【${username}】的组长身份吗?` : `确定将【${username}】设置为组长?`
|
||||
const flag = await useHandleData(message)
|
||||
if (!flag) return
|
||||
try {
|
||||
const params = {
|
||||
id,
|
||||
groupLeader: isGroupLeader.value(groupLeader) ? groupLeaderEnum.YES : groupLeaderEnum.NO
|
||||
}
|
||||
await subAccountEdit(params)
|
||||
feedback.msgSuccess('设置成功')
|
||||
fetchTableList()
|
||||
} catch (error) {}
|
||||
}
|
||||
const isDisabled = computed(() => proTableRef?.value?.selectedListIds?.length == 0)
|
||||
const handleBatchDelete = () => {
|
||||
|
|
|
@ -24,8 +24,9 @@ const queryParams = ref<Record<string, any>>({
|
|||
postId: ''
|
||||
},
|
||||
record: {
|
||||
submitName: '',
|
||||
submitDate: ''
|
||||
userName: '',
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
}
|
||||
})
|
||||
const componentName = computed(() => (activeTab.value == 'template' ? templateSearchForm : recordSearchForm))
|
||||
|
@ -39,6 +40,8 @@ const resetPage = () => {
|
|||
summaryTemplateRef.value?.resetPage()
|
||||
break
|
||||
case 'record':
|
||||
console.log(queryParams.value[activeTab.value])
|
||||
|
||||
summaryRecordRef.value?.resetPage()
|
||||
break
|
||||
}
|
||||
|
|
|
@ -2,15 +2,14 @@
|
|||
<el-card shadow="never" class="!border-none">
|
||||
<el-form ref="formRef" class="mb-[-16px]" :model="modelValue" :inline="true">
|
||||
<el-form-item label="提交人">
|
||||
<el-input class="w-[280px]" placeholder="请输入" v-model="modelValue.submitName" clearable @keyup.enter="$emit('resetPage')" />
|
||||
<el-input class="w-[280px]" placeholder="请输入" v-model="modelValue.userName" clearable @keyup.enter="$emit('resetPage')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="提交时间">
|
||||
<el-date-picker
|
||||
v-model="modelValue.submitDate"
|
||||
<daterange-picker
|
||||
type="datetimerange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始时间"
|
||||
end-placeholder="结束时间"
|
||||
format="YYYY-MM-DD HH:mm:ss"
|
||||
v-model:startTime="modelValue.startTime"
|
||||
v-model:endTime="modelValue.endTime"
|
||||
/>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
|
@ -27,7 +26,8 @@ defineProps({
|
|||
type: Object,
|
||||
default: () => ({
|
||||
submitName: '',
|
||||
submitDate: ''
|
||||
startTime: '',
|
||||
endTime: ''
|
||||
})
|
||||
}
|
||||
})
|
||||
|
|
|
@ -1,34 +1,54 @@
|
|||
<template>
|
||||
<ProTable ref="proTableRef" :columns="columns" :tableData="pager.lists" :loading="pager.loading" :maxHeight="530" />
|
||||
<ProTable ref="proTableRef" :columns="columns" :tableData="pager.lists" :loading="pager.loading" :maxHeight="530">
|
||||
<template #postId="{ row }">
|
||||
<span>{{ parsePositionText(row.postId) }}</span>
|
||||
</template>
|
||||
<template #templateFormList="{ row }">
|
||||
<div v-for="(item, index) in row.templateFormList" :key="index">
|
||||
<span>{{ item.formTitle }}:</span>
|
||||
<span>{{ item.value }}</span>
|
||||
</div>
|
||||
</template>
|
||||
</ProTable>
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { postLists } from '@/api/org/post'
|
||||
import { postLists } from '@/api/account_center/postion'
|
||||
import { summaryRecordLists } from '@/api/summary'
|
||||
import { usePaging } from '@/hooks/usePaging'
|
||||
|
||||
const props = defineProps({
|
||||
queryParams: {
|
||||
type: Object,
|
||||
default: () => ({
|
||||
submitName: '',
|
||||
submitDate: ''
|
||||
userName: '',
|
||||
submitDate: []
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
const { pager, getLists, resetPage, resetParams } = usePaging({
|
||||
fetchFun: postLists,
|
||||
fetchFun: summaryRecordLists,
|
||||
params: props.queryParams
|
||||
})
|
||||
getLists()
|
||||
|
||||
const proTableRef = ref()
|
||||
const columns = reactive([
|
||||
{ prop: 'name', label: '提交人', width: 180 },
|
||||
{ prop: 'type', label: '岗位', width: 180 },
|
||||
{ prop: 'type', label: '提交时间', width: 180 },
|
||||
{ prop: 'type', label: '总结情况', width: 180 }
|
||||
{ prop: 'userName', label: '提交人', width: 180 },
|
||||
{ prop: 'postId', label: '岗位', width: 180 },
|
||||
{ prop: 'addTime', label: '提交时间', width: 180 },
|
||||
{ prop: 'templateFormList', label: '总结情况', width: 180 }
|
||||
])
|
||||
const positionOptions = ref<any[]>([])
|
||||
const parsePositionText = computed(() => (postId: number) => positionOptions.value.find(item => item.id == postId).name ?? '--')
|
||||
const fetchPostionData = async () => {
|
||||
try {
|
||||
const result = await postLists()
|
||||
positionOptions.value = result.lists
|
||||
} catch (error) {}
|
||||
}
|
||||
fetchPostionData()
|
||||
defineExpose({
|
||||
resetPage,
|
||||
resetParams,
|
||||
|
|
Loading…
Reference in New Issue