You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

380 lines
9.4 KiB
Vue

<template>
<div class="g_pt_10">
<!-- 今日数据 -->
<div class="g_bg_f g_radius_8 g_ml_10 g_mr_10" v-if="true">
<div class="content g_flex_row_start g_h_92">
<div v-for="(i, index) in userNum" :key="i.type" :class="index > 0 ? 'g_border_f5_l' : ''" class="g_flex_1 g_text_c g_flex_column_center" @click="goDetail('/root/merchantManagement/todayData')">
<div class="g_fs_20 g_fw_600 g_c_3 g_mb_4">
{{ i.num || 0 }}
</div>
<div>
{{ i.label || "-" }}
</div>
</div>
</div>
</div>
<!-- 今日数据 -->
<div class="g_bg_f g_radius_8 g_mt_10 g_ml_10 g_mr_10">
<!-- <div class="title g_flex_row_between g_h_46 flex_center g_pl_12 g_pr_10 g_border_f5_b">
<div class="g_fw_600 g_fs_16">今日数据</div>
<div class="iconfont icon-gengduo11 g_c_9 g_fs_12 g_w_120 g_text_r" @click="goDetail('/root/merchantManagement/todayData')"></div>
</div> -->
<div class="content g_flex_row_start g_h_74">
<div v-for="(i, index) in todayData" :key="i.type" :class="index > 0 ? 'g_border_f5_l' : ''" class="g_flex_1 g_text_c g_flex_column_center" @click="goDetail('/root/merchantManagement/todayData')">
<div class="g_fs_20 g_fw_600 g_c_3 g_mb_4">
{{ map.agencyData[i.type] || 0 }}
</div>
<div>
{{ i.label || "-" }}
</div>
</div>
</div>
</div>
<div class="g_bg_f g_radius_8 g_mt_10 g_ml_10 g_mr_10">
<div class="title g_flex_row_between g_h_46 flex_center g_pl_12 g_pr_10 g_border_f5_b">
<div class="g_fw_600 g_fs_16">当前工单</div>
<div class="g_fs_14 g_flex_row_between flex_center g_position_rela" @click="goDetail('/root/person/enrollList?from=tob')">全部<i class="iconfont icon-gengduo11 g_c_9 g_fs_12 g_ml_4"></i><u-badge v-if="hasNewResume > 0" :offset="[-10, -10]" :count="hasNewResume"></u-badge></div>
</div>
<div class="content g_flex_row_start">
<div v-for="(i, index) in applyData" :key="i.classify" :class="index > 0 ? 'g_border_f5_l' : ''" class="g_text_c g_flex_column_center g_border_f5_b g_h_74" style="width: 25%">
<div class="g_fs_20 g_fw_600 g_c_3 g_mb_4">
{{ i.num || 0 }}
</div>
<div>
{{ i.name || "" }}
</div>
</div>
</div>
</div>
<!-- <div class="g_bg_f g_radius_8 g_mt_10 g_ml_10 g_mr_10">
<div class="title g_flex_row_between g_h_46 flex_center g_pl_12 g_pr_10 g_border_f5_b">
<div class="g_fw_600 g_fs_16">我的老乡</div>
<div class="g_fs_14 g_flex_row_between flex_center" @click="goDetail('/root/other/empty?type=我的老乡')">全部<i class="iconfont icon-gengduo11 g_c_9 g_fs_12 g_ml_4"></i></div>
</div>
<div class="content g_flex_row_start g_h_74">
<div v-for="(i, index) in townsManData" :key="i.type" :class="index > 0 && index < 4 ? 'g_border_f5_l' : ''" class="g_flex_1 g_text_c g_flex_column_center">
<div class="g_fs_20 g_fw_600 g_c_3 g_mb_4">
{{ i.type == "total" ? map.userBinded0 + map.userBinded1 : map[i.type] || map[i.type] === 0 ? map[i.type] : "" }}
</div>
<div>
{{ i.label || "" }}
</div>
</div>
</div>
</div> -->
<div class="g_mt_10 g_pb_40" v-if="true">
<g-panel-card-num :list="serverList" class="" :marginBottom="20" :height="32" :speed="1" :num="4" cusType="image" cusTitle="商家服务" @clickItem="handleClickNum" />
</div>
</div>
</template>
<script>
export default {
onLoad() {
this.getData();
},
data() {
return {
userNum: [
{
type: "total",
label: "总用户",
num: 320,
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "todayAdd",
label: "今日新增",
num: 23,
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "dua",
label: "今日活跃",
num: 42,
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "apply",
label: "今日报名",
num: 12,
path: "/root/merchantManagement/todayData?type=数据报表",
},
],
todayData: [
{
type: "signUps",
label: "约面",
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "arrived",
label: "到面",
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "passed",
label: "通过",
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "entry",
label: "入职",
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
type: "obJob",
label: "在职",
path: "/root/merchantManagement/todayData?type=数据报表",
},
],
applyData: [
{
name: "新简历",
classify: "50",
},
{
name: "推工作",
classify: "60",
},
{
name: "审核中",
classify: "40",
},
{
name: "跟面试",
classify: "70",
},
{
name: "跟入职",
classify: "80",
},
{
name: "跟在职",
classify: "90",
},
{
name: "已完成",
classify: "110",
},
],
// townsManData: [
// {
// type: "total",
// label: "全部",
// },
// {
// type: "userBinded1",
// label: "属于我",
// },
// {
// type: "userBinded0",
// label: "服务过",
// },
// {},
// {},
// ],
map: {
agencyData: {},
userBinded0: 0,
userBinded1: 0,
},
serverList: [],
};
},
props: {
hasNewResume: {
default: 0,
},
},
created() {
let appId = getApp().globalData.appId;
console.log("appId", appId);
if (appId == "wx57e965905e6b4530") {
this.serverList = [
{
name: "平台职位",
icon: "cloud",
iconType: 1,
path: "/root/merchantManagement/platformJobList?type=平台职位",
},
{
name: "联系我们",
icon: "comment",
iconType: 1,
path: "/root/merchantManagement/relationUs?type=联系我们",
},
{
name: "动态公告",
icon: "sound",
iconType: 1,
path: "/root/merchantManagement/dynamicNotice?type=动态公告",
},
{
name: "团队管理",
icon: "team",
iconType: 1,
path: "/root/other/empty?type=团队管理",
},
{
name: "门店管理",
icon: "apartment",
iconType: 1,
path: "/root/other/empty?type=门店管理",
},
{
name: "站内消息",
icon: "bell",
iconType: 1,
path: "/root/merchantManagement/message?type=站内消息",
},
{
name: "频道管理",
icon: "earth",
iconType: 1,
path: "/root/other/empty?type=频道管理",
},
{
name: "数据报表",
icon: "barchart",
iconType: 1,
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
name: "海报管理",
icon: "file-image",
iconType: 1,
path: "/root/merchantManagement/posterShare?type=海报管理",
},
{
name: "配置",
icon: "setting",
iconType: 1,
path: "/root/merchantManagement/setting?type=配置",
},
{
name: "未命名",
icon: "sketch",
iconType: 1,
path: "/root/other/empty?type=未命名",
},
{
name: "未命名",
icon: "sketch",
iconType: 1,
path: "/root/other/empty?type=未命名",
},
];
} else {
this.serverList = [
{
name: "平台职位",
icon: "cloud",
iconType: 1,
path: "/root/merchantManagement/platformJobList?type=平台职位",
},
{
name: "海报分享",
icon: "file-image",
iconType: 1,
path: "/root/merchantManagement/posterShare?type=海报分享",
},
{
name: "动态公告",
icon: "sound",
iconType: 1,
path: "/root/merchantManagement/dynamicNotice?type=动态公告",
},
{
name: "联系我们",
icon: "comment",
iconType: 1,
path: "/root/merchantManagement/relationUs?type=联系我们",
},
{
name: "数据报表",
icon: "barchart",
iconType: 1,
path: "/root/merchantManagement/todayData?type=数据报表",
},
{
name: "配置",
icon: "setting",
iconType: 1,
path: "/root/merchantManagement/setting?type=配置",
},
];
}
this.getUserData();
this.getApplyNum();
},
methods: {
getApplyNum() {
console.log("getApplyNum");
let that = this;
that.G.Post(
that.api.status_num_list,
{
keys: "",
},
(res) => {
console.log("res.statusMap", res.statusMap);
that.applyData.forEach((item) => {
for (const key in item) {
if (key == "classify") {
item.num = res.statusMap[key + item[key]];
}
}
});
that.$forceUpdate();
console.log("that.applyData", that.applyData);
}
);
},
getData() {
this.G.Get(this.api.person_dataValue, {}, (res) => {
console.log(res);
// 空值测试
// for (var k in res) {
// if (typeof res[k] != "object") {
// res[k] = 0;
// } else {
// for (var j in res[k]) {
// res[k][j] = 0;
// }
// }
// }
this.map = res;
});
},
goDetail(e) {
uni.navigateTo({
url: e,
});
},
handleClickNum(e) {
console.log("我的服务:", e);
this.G.isLogin();
if (this.G.isLogin()) {
uni.navigateTo({
url: e.item.path,
});
}
},
getUserData() {
let that = this;
this.G.Get(this.api.merchantManagement_userData, {}, (res) => {
console.log(res);
that.userNum.forEach((i) => {
i.num = res[i.type];
});
console.log("that.userNum", that.userNum);
});
},
},
};
</script>
<style></style>