导出删除数据
This commit is contained in:
@@ -71,7 +71,18 @@
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
|
||||
<!-- <el-card shadow="never" class="mt-8px">
|
||||
<el-card shadow="never" class="mt-8px">
|
||||
|
||||
<div style="display: flex; width: 50%;"
|
||||
v-if="wsCache.get('roleRouters').find(item => item.id === 1)?.children.find(item => item.id === 100)">
|
||||
|
||||
<el-select v-model="allocationUser" :placeholder="t('newHosts.placeAllocationUser')" clearable
|
||||
@change="getUserAccessSource(allocationUser)">
|
||||
<el-option v-for="(user, index) in allocationUserList" :key="index" :label="user.label"
|
||||
:value="user.value" />
|
||||
</el-select>
|
||||
</div>
|
||||
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<el-row :gutter="20" justify="space-between">
|
||||
<el-col :xl="10" :lg="10" :md="24" :sm="24" :xs="24">
|
||||
@@ -81,16 +92,16 @@
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
|
||||
<!-- <el-col :xl="14" :lg="14" :md="24" :sm="24" :xs="24">
|
||||
<el-card shadow="hover" class="mb-8px">
|
||||
<el-skeleton :loading="loading" animated>
|
||||
<Echart :options="barOptionsData" :height="280" />
|
||||
</el-skeleton>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-skeleton>
|
||||
</el-card> -->
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :xl="8" :lg="8" :md="24" :sm="24" :xs="24" class="mb-8px">
|
||||
<!-- 快捷入口 -->
|
||||
@@ -155,10 +166,20 @@ import { useUserStore } from '@/store/modules/user'
|
||||
import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
|
||||
import { pieOptions, barOptions } from './echarts-data'
|
||||
import { useRouter } from 'vue-router'
|
||||
import { getComplete, getEmployeeComplete } from '@/api/system/user'
|
||||
import { useCache } from '@/hooks/web/useCache'
|
||||
import { getSimpleUserListPage, getSimpleUserList } from '@/api/system/user'
|
||||
// import { useGlobalWebSocket } from '@/components/useGlobalWebSocket'
|
||||
// let messageList = useGlobalWebSocket().messageList
|
||||
// console.log(messageList.value)
|
||||
|
||||
const { wsCache } = useCache()
|
||||
let allocationUser = ref('') //选中的分配用户
|
||||
let allocationUserList = ref([
|
||||
{
|
||||
label: '分配用户1',
|
||||
value: 1
|
||||
}
|
||||
]) //选中的分配用户
|
||||
|
||||
// function test() {
|
||||
// console.log(messageList.value)
|
||||
@@ -324,13 +345,16 @@ const getShortcut = async () => {
|
||||
}
|
||||
|
||||
// 用户来源
|
||||
const getUserAccessSource = async () => {
|
||||
const getUserAccessSource = async (id) => {
|
||||
const res = id ? await getEmployeeComplete(id) : await getComplete()
|
||||
const completeData = res ?? { unfinishedNum: 0, finishedNum: 0 }
|
||||
console.log('completeData', completeData)
|
||||
const data = [
|
||||
{ value: 335, name: 'analysis.directAccess' },
|
||||
{ value: 310, name: 'analysis.mailMarketing' },
|
||||
{ value: 234, name: 'analysis.allianceAdvertising' },
|
||||
{ value: 135, name: 'analysis.videoAdvertising' },
|
||||
{ value: 1548, name: 'analysis.searchEngines' }
|
||||
{ value: completeData.unfinishedNum, name: 'analysis.noAlliance' },
|
||||
{ value: completeData.finishedNum, name: 'analysis.alreadyJianlian' },
|
||||
// { value: 234, name: 'analysis.allianceAdvertising' },
|
||||
// { value: 135, name: 'analysis.videoAdvertising' },
|
||||
// { value: 1548, name: 'analysis.searchEngines' }
|
||||
]
|
||||
set(
|
||||
pieOptionsData,
|
||||
@@ -377,7 +401,7 @@ const getAllApi = async () => {
|
||||
getProject(),
|
||||
getNotice(),
|
||||
getShortcut(),
|
||||
getUserAccessSource(),
|
||||
getUserAccessSource(null),
|
||||
getWeeklyUserActivity()
|
||||
])
|
||||
loading.value = false
|
||||
@@ -391,5 +415,30 @@ const handleShortcutClick = (url: string) => {
|
||||
router.push(url)
|
||||
}
|
||||
|
||||
/** 查询员工 */
|
||||
const getAllocationList = async () => {
|
||||
loading.value = true
|
||||
allocationUserList.value = []
|
||||
try {
|
||||
const data = await getSimpleUserList()
|
||||
console.log('data', data)
|
||||
data.forEach((item) => {
|
||||
if (wsCache.get('user').user.id == item.id) {
|
||||
|
||||
} else {
|
||||
allocationUserList.value.push({
|
||||
label: item.nickname,
|
||||
value: item.id
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
console.log(allocationUserList.value)
|
||||
} finally {
|
||||
loading.value = false
|
||||
}
|
||||
}
|
||||
getAllApi()
|
||||
getAllocationList()
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user