Compare commits

...

3 Commits

Author SHA1 Message Date
wwl 37675c31ad update 2023-12-20 09:24:52 +08:00
wwl f846dde569 update 2023-12-17 21:28:00 +08:00
wwl 9052d6e41b update 2023-12-17 21:25:34 +08:00
5 changed files with 2113 additions and 1492 deletions

BIN
dist.zip

Binary file not shown.

View File

@ -1366,3 +1366,11 @@ export async function fetchReviewAuthCateList(params?: any) {
export async function fetchmoduleStatExternalPage(params?: any) { export async function fetchmoduleStatExternalPage(params?: any) {
return http.get(`/moduleStat/externalPage`, { params }) return http.get(`/moduleStat/externalPage`, { params })
} }
// 内部统计列表
export async function fetchmoduleStatInternalPage(params?: any) {
return http.get(`/moduleStat/internalPage`, { params })
}
// 获取岗位
export async function fetchPostList(params?: any) {
return http.get(`/common/getPostList`, { params })
}

File diff suppressed because it is too large Load Diff

View File

@ -22,6 +22,7 @@ const store = noticeld()
const store2 = useUserStore() const store2 = useUserStore()
const user: any = store2.user const user: any = store2.user
const header = { token: user.token } const header = { token: user.token }
console.log('🚀 ~ file: Process.vue:25 ~ user:', user)
const { push } = useRouter() const { push } = useRouter()
const database = databaseld() const database = databaseld()
const route = useRoute() const route = useRoute()

View File

@ -1,14 +1,18 @@
<script setup lang="ts"> <script setup lang="ts">
import HomeHead from '@/views/home/components/HomeHead.vue' import HomeHead from '@/views/home/components/HomeHead.vue'
import UserList from '@/views/home/intelligence/process/UserPages.vue'
import { import {
timeStat, timeStat,
externalTimeStat, externalTimeStat,
fetchmoduleStatExternalPage fetchmoduleStatExternalPage,
fetchPostList,
fetchmoduleStatInternalPage
} from '@/api/daikin/base' } from '@/api/daikin/base'
import { formatDate } from '@/utils/format' import { formatDate } from '@/utils/format'
import { Chart1 } from './indexData' import { Chart1 } from './indexData'
import zhCn from 'element-plus/lib/locale/lang/zh-cn' import zhCn from 'element-plus/lib/locale/lang/zh-cn'
import { Search } from '@element-plus/icons-vue' import { Search } from '@element-plus/icons-vue'
import { NModal } from 'naive-ui'
const currentDate = new Date() const currentDate = new Date()
const currentDates = new Date() const currentDates = new Date()
const value1 = ref<[Date, Date]>([ const value1 = ref<[Date, Date]>([
@ -33,17 +37,27 @@ const pageInfo = reactive({
total: 10 total: 10
}) })
const moduleCode = ref() const moduleCode = ref()
const imoduleCode = ref()
const visitDay = ref() const visitDay = ref()
const waibuKd = ref() const waibuKd = ref()
const inseideDetail = ref([]) const inseideDetail = ref([])
const outDetail = ref([]) const outDetail = ref([])
const postId = ref<any>([])
const nickName = ref()
const postList = ref<any>([])
const getPostList = async () => {
const res: any = await fetchPostList()
postList.value = res.data || []
}
const getInsideListPage = async () => { const getInsideListPage = async () => {
const res: any = await fetchmoduleStatExternalPage({ const res: any = await fetchmoduleStatInternalPage({
waibuKd: waibuKd.value, postId: postId.value,
visitDay: visitDay.value, nickName: nickName.value,
moduleCode: moduleCode.value, moduleCode: imoduleCode.value,
pageNum: pageInfo.currentPage, pageNum: pageInfo.currentPage,
pageSize: pageInfo.pageSize pageSize: pageInfo.pageSize,
...states
}) })
inseideDetail.value = res?.rows || [] inseideDetail.value = res?.rows || []
pageInfo.total = res?.total || 0 pageInfo.total = res?.total || 0
@ -60,8 +74,9 @@ const getListPage = async () => {
pageInfo.total = res?.total || 0 pageInfo.total = res?.total || 0
} }
getPostList()
getListPage() getListPage()
// getInsideListPage() getInsideListPage()
const clickButton = (id) => { const clickButton = (id) => {
primary.value = id primary.value = id
@ -115,6 +130,10 @@ const getExternalTimeStat = async () => {
} }
) )
chartOption2.value = Chart1(xAxisData, siomesData) chartOption2.value = Chart1(xAxisData, siomesData)
console.log(
'🚀 ~ file: index.vue:131 ~ Chart1(xAxisData, siomesData):',
Chart1(xAxisData, siomesData)
)
// chartOption2.value.height=3000 // chartOption2.value.height=3000
// chartOption2.value.width=1000 // chartOption2.value.width=1000
} }
@ -217,6 +236,105 @@ const handleClick = ({ paneName }: any) => {
} }
const selValue = ref('') const selValue = ref('')
const echartsItemColor = [
'#2ec7c9',
'#b6a2de',
'#5ab1ef',
'#ffb980',
'#d87a80',
'#8d98b3',
'#e5cf0d',
'#97b552',
'#95706d',
'#dc69aa',
'#07a2a4',
'#9a7fd1',
'#588dd5',
'#f5994e',
'#c05050',
'#59678c',
'#c9ab00',
'#7eb00a',
'#6f5553',
'#c14089'
]
const barOption = {
width: '100%',
height: '100%',
grid: {
top: 0,
left: 10,
right: 5,
bottom: 10,
containLabel: true
},
yAxis: {
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun','hour','month','year'],
axisLabel: {
show: false, // x
interval: 0,
}
},
xAxis: {
type: 'value'
},
label: {
show: true,
position: 'inside',
align: 'center',
color: '#333', //
fontSize: 14, //
formatter: function (value: any) {
// console.log(value);
return value.name + ' ' + value.value
},
rotate: 0
},
tooltip: {
trigger: 'axis',
axisPointer: {
type: 'shadow'
},
formatter: function ([params]: any) {
const title = `<p>${params.name}</p>`
const colorDot =
'<span style="display:inline-block;margin-right:5px;border-radius:50%;width:10px;height:10px;background-color:' +
params.color +
'"></span>'
return title + colorDot + params.value
}
},
series: [
{
data: [120, 200, 150, 80, 70, 110, 130,123,50,80],
type: 'bar',
itemStyle: {
color: function (params: any) {
return echartsItemColor[params.dataIndex]
}
}
}
]
}
const showModal = ref(false)
const setUserList = ref<any>([])
const handleChild = async (data: any) => {
const { showModal: show, multipleSelection } = data
showModal.value = unref(show) || false
let userIdList: any[] = []
multipleSelection.value.forEach((i: { userId: any }) => {
userIdList.push(i.userId)
})
console.log("🚀 ~ file: index.vue:328 ~ userIdList:", userIdList)
}
const CloseThiss = (data?: boolean) => {
showModal.value = data || false
// setUserList.value = []
}
const isDev = false
</script> </script>
<template> <template>
@ -226,7 +344,7 @@ const selValue = ref('')
<span class="text-#000 mr-10px">日期: </span> <span class="text-#000 mr-10px">日期: </span>
<div class="max-w-350px flex items-center"> <div class="max-w-350px flex items-center">
<el-date-picker <el-date-picker
v-if="['inside', 'out'].includes(activeName)" v-if="['inside', 'out', 'inside-detail'].includes(activeName)"
v-model="value1" v-model="value1"
type="daterange" type="daterange"
range-separator="到" range-separator="到"
@ -234,6 +352,7 @@ const selValue = ref('')
end-placeholder="结束时间" end-placeholder="结束时间"
@change="timenFirst" @change="timenFirst"
:shortcuts="shortcuts" :shortcuts="shortcuts"
clearable
/> />
<el-date-picker <el-date-picker
v-else v-else
@ -241,14 +360,19 @@ const selValue = ref('')
type="date" type="date"
value-format="YYYY-MM-DD" value-format="YYYY-MM-DD"
placeholder="选择日期" placeholder="选择日期"
clearable
/> />
</div> </div>
<div class="mx-4 flex items-center"> <div
class="mx-4 flex items-center"
v-if="['inside-detail', 'out-detail'].includes(activeName)"
>
<span class="text-#000 mr-10px">模块: </span> <span class="text-#000 mr-10px">模块: </span>
<el-select <el-select
v-if="'out-detail' === activeName" v-if="'out-detail' === activeName"
v-model="moduleCode" v-model="moduleCode"
placeholder="选择模块" placeholder="选择模块"
clearable
> >
<el-option <el-option
v-for="item in externalList" v-for="item in externalList"
@ -257,14 +381,39 @@ const selValue = ref('')
:value="item.moduleCode" :value="item.moduleCode"
/> />
</el-select> </el-select>
<template v-if="'inside-detail' === activeName">
<el-select v-model="imoduleCode" placeholder="选择模块" clearable>
<el-option
v-for="item in dataList"
:key="item.id"
:label="item.moduleName"
:value="item.moduleCode"
/>
</el-select>
<span class="text-#000 mr-10px ml-4">职位: </span>
<el-select v-model="postId" placeholder="选择职位" clearable>
<el-option
v-for="item in postList"
:key="item.id"
:label="item.name"
:value="item.id"
/>
</el-select>
</template>
</div> </div>
<div class="flex items-center"> <div class="flex items-center" v-if="activeName === 'out-detail'">
>
<span class="text-#000 mr-10px w-50px">供方: </span> <span class="text-#000 mr-10px w-50px">供方: </span>
<el-input <el-input
v-model="waibuKd" v-model="waibuKd"
placeholder="请输入供方昵称或代码" placeholder="请输入供方昵称或代码"
></el-input> ></el-input>
</div> </div>
<div class="flex items-center" v-if="activeName === 'inside-detail'">
>
<span class="text-#000 mr-10px w-50px">昵称: </span>
<el-input v-model="nickName" placeholder="请输入用户昵称"></el-input>
</div>
<el-button <el-button
type="primary" type="primary"
:icon="Search" :icon="Search"
@ -297,6 +446,7 @@ const selValue = ref('')
</div> </div>
<el-tabs class="mt-20px" v-model="activeName" @tab-click="handleClick"> <el-tabs class="mt-20px" v-model="activeName" @tab-click="handleClick">
<el-tab-pane label="本部足迹" name="inside"> <el-tab-pane label="本部足迹" name="inside">
<div class="overflow-auto h-720px">
<div class="mt20px w-full"> <div class="mt20px w-full">
<span <span
class="cardfoot text-#000 p30px mx10px my10px text-center text-18px font-bold" class="cardfoot text-#000 p30px mx10px my10px text-center text-18px font-bold"
@ -310,7 +460,7 @@ const selValue = ref('')
</span> </span>
</div> </div>
<div class="mt10px w-full"> <!-- <div class="mt10px w-full"> -->
<!-- <div class="relative w-full h-50px flex"> <!-- <div class="relative w-full h-50px flex">
<el-button :type="primarys == 2 ? 'primary' : ''" :icon="Search" class="!ml30px mt--5px" <el-button :type="primarys == 2 ? 'primary' : ''" :icon="Search" class="!ml30px mt--5px"
@click="clickButtons(2)">本周</el-button> @click="clickButtons(2)">本周</el-button>
@ -323,13 +473,75 @@ const selValue = ref('')
</el-config-provider> </el-config-provider>
</div> </div>
</div> --> </div> -->
<div class="w-full h-400px"> <div class="w-full h-400px mt-10px">
<VChart key="yyy" ref="chartRef1" :option="chartOption1" /> <VChart key="yyy" ref="chartRef1" :option="chartOption1" />
</div> </div>
<div class="mt-30px">
<div class="flex items-center" v-if="isDev">
<span class="text-#000 mr-10px">模块: </span>
<el-select
v-model="moduleCode"
placeholder="选择模块"
clearable
>
<el-option
v-for="item in externalList"
:key="item.id"
:label="item.moduleName"
:value="item.moduleCode"
/>
</el-select>
<el-button
type="primary"
:icon="Search"
size="small"
class="ml20px"
@click="handleClick({ paneName: activeName })"
>搜索</el-button
>
<el-button
type="primary"
:icon="Search"
size="small"
class="ml20px"
@click="showModal = true"
>部长以上人员足迹</el-button
>
</div>
<div class="pb-14px" v-if="isDev">
<div class=" flex flex-wrap mb-30px" >
<div
class=" m-4 flex items-center justify-between w-45% h-full"
v-for="i in 10"
:key="i"
>
<div class="flex items-center text-#000 text-22px">
<p class="text-bold text-40px">{{ i }}TH</p>
<div class="mx-10px flex-col items-center">
<img src="@/views/extermal/images/zanwly2.png" alt="" />
<p class="text-center mt-10">测试 {{ i }}</p>
</div>
</div>
<VChart class="h-300px w-65% pb-10px ml-auto" key="yyy1" :option="barOption" />
</div>
</div>
<div class="absolute bottom-2px right-30px z-20 bg-#fff">
<el-pagination
v-model:current-page="pageInfo.currentPage"
v-model:page-size="pageInfo.pageSize"
layout="prev, pager, next, jumper"
:total="pageInfo.total"
@size-change="getInsideListPage"
@current-change="getInsideListPage"
/>
</div>
</div>
</div>
<!-- </div> -->
</div> </div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane v-if="false" label="本部足迹-明细" name="inside-detail"> <el-tab-pane label="本部足迹-明细" name="inside-detail">
<div v-if="activeName === 'inside-detail'" class="h-720px"> <div v-show="activeName === 'inside-detail'" class="h-720px">
<div class="w100% h-full overflow-auto"> <div class="w100% h-full overflow-auto">
<el-table <el-table
:data="inseideDetail" :data="inseideDetail"
@ -347,34 +559,28 @@ const selValue = ref('')
}" }"
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }" :cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
> >
<el-table-column prop="deptName" label="排序" /> <el-table-column prop="moduleName" label="模块名称" />
<el-table-column <el-table-column
prop="cateName" prop="postName"
label="所属分类" label="职位名称"
show-overflow-tooltip show-overflow-tooltip
> >
<template #default="scope">
<span v-if="scope"></span>
</template>
</el-table-column> </el-table-column>
<el-table-column <el-table-column
prop="title" prop="nickName"
label="标题名称" label="用户昵称"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="文件列表" label="访问次数"
prop="filePath" prop="visitCount"
show-overflow-tooltip
/>
<el-table-column
label="访问日期"
prop="visitTime"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column label="排序" prop="sort" show-overflow-tooltip />
<el-table-column label="查看范围" prop="userIdList">
<template #default="scope">
<el-button type="primary" class="button" @click=""
>查看范围</el-button
>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<div class="absolute bottom-2px right-30px z-20 bg-#fff"> <div class="absolute bottom-2px right-30px z-20 bg-#fff">
@ -409,13 +615,6 @@ const selValue = ref('')
}" }"
:cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }" :cell-style="{ 'text-align': 'center', 'overflow-y': 'auto' }"
> >
<el-table-column prop="userId" label="供方ID" />
<el-table-column
prop="nickName"
label="供方昵称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column <el-table-column
prop="title" prop="title"
label="访问模块" label="访问模块"
@ -425,13 +624,20 @@ const selValue = ref('')
<span>{{ externalObj[row.moduleCode] || '' }}</span> <span>{{ externalObj[row.moduleCode] || '' }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userId" label="供方ID" />
<el-table-column
prop="nickName"
label="供方昵称"
show-overflow-tooltip
>
</el-table-column>
<el-table-column <el-table-column
label="访问计数" label="访问计数"
prop="visitCount" prop="visitCount"
show-overflow-tooltip show-overflow-tooltip
/> />
<el-table-column <el-table-column
label="访问时间" label="访问日期"
prop="visitDay" prop="visitDay"
show-overflow-tooltip show-overflow-tooltip
/> />
@ -471,6 +677,13 @@ const selValue = ref('')
</div> </div>
</div> </div>
</div> </div>
<n-modal v-model:show="showModal">
<UserList
:userDataList="setUserList"
@clickChild="handleChild"
@CloseThis="CloseThiss"
/>
</n-modal>
</template> </template>
<style lang="less" scoped> <style lang="less" scoped>