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.
apply-assistant-v3/pages/workBench/index.vue

522 lines
11 KiB
Vue

9 months ago
<template>
2 months ago
<gListApply :status="menuActive" :hasRequested.sync="hasRequested"></gListApply>
9 months ago
</template>
<script>
3 months ago
import gListApply from "../../components/list/applyPage";
9 months ago
export default {
3 months ago
components: {
gListApply,
},
9 months ago
onReady() {
this.G.setNavStyle();
},
9 months ago
onShareAppMessage() {
return {
title: " ",
3 months ago
imageUrl: "https://bocai-cms.oss-cn-beijing.aliyuncs.com/web-resource/dailibaoming/APP/shareCard0609.png",
9 months ago
};
// return this.G.shareFun();
9 months ago
},
6 months ago
props: {
3 months ago
// from: {
// type: String,
// default: "home",
// },
// upAgencyId: {
// type: Number,
// default: null,
// },
6 months ago
},
9 months ago
data() {
return {
9 months ago
isHaveOrder: -1,
loading: true,
speed: -1,
query: {
page: 1,
size: 50,
list: [],
isFinish: -1,
},
GZHInfo: 0,
cdnBaseImg: this.G.store().cdnBaseImg,
keyword: "",
6 months ago
tabbarHeight: uni.getStorageSync("TABBAR_HEIGHT"),
9 months ago
tabActive: 0,
tabTip: "",
tabInfo: [
{
9 months ago
name: "我报的",
childList: [
{
name: "全部",
tip: "",
},
{
name: "审核中",
tip: "10",
},
{
name: "待接待",
tip: "20",
},
{
name: "待面试",
tip: "25",
},
{
name: "待入职",
tip: "30",
},
{
name: "在职中",
tip: "40,48",
},
{
name: "已完成",
tip: "21,26,35,45,50",
},
],
},
{
9 months ago
name: "报给我的",
childList: [
{
name: "全部",
tip: "",
},
{
9 months ago
name: "审核中",
9 months ago
tip: "10",
},
{
name: "待接待",
tip: "20",
},
{
name: "待面试",
tip: "25",
},
{
name: "待入职",
tip: "30",
},
{
name: "在职中",
tip: "40,48",
},
{
name: "已完成",
tip: "21,26,35,45,50",
},
],
},
],
9 months ago
menuList: [],
3 months ago
menuActive: -1,
9 months ago
isLogin: false,
loginInfo: {},
navInfo: {},
2 months ago
hasRequested: false,
9 months ago
};
},
9 months ago
onHide() {
let that = this;
if (uni.getStorageSync("apply-supplierAccount") == 1) {
// 有
that.tabActive = 1;
} else {
// 无
that.tabActive = 0;
}
uni.removeStorageSync("apply-tab-active");
},
onLoad(options) {
let that = this;
if (options.status) {
that.menuActive = Number(options.status);
// setTimeout(() => {
// that.menuActive = Number(options.status);
// }, 200);
}
6 months ago
3 months ago
// console.log(123123123);
9 months ago
},
created() {
let that = this;
3 months ago
// // console.log(4567456456);
3 months ago
// // 导航栏高度信息
// that.navInfo = that.G.getNavInfo();
// if (uni.getStorageSync("apply-supplierAccount") == 1) {
// // 有
// that.isHaveOrder = 1;
// if (uni.getStorageSync("apply-tab-active") == 1) {
// that.tabActive = 0;
// } else {
// that.tabActive = 1;
// }
// } else {
// // 无
// that.isHaveOrder = 0;
// that.tabActive = 0;
// }
3 months ago
// // console.log("that.isLogin", that.isLogin);
3 months ago
// that.loginInfo = uni.getStorageSync("apply-userinfo");
4 months ago
3 months ago
// this.getList();
// if (!that.isLogin) {
// that.loading = false;
// that.speed = 0;
// this.menuList = this.tabInfo[this.tabActive].childList;
// } else {
// this.query.page = 1;
// that.loading = true;
// this.menuList = this.tabInfo[this.tabActive].childList;
// this.getList();
// }
6 months ago
},
onShow() {
let that = this;
2 months ago
this.isLogin = uni.getStorageSync("apply-token") ? true : false;
6 months ago
if (that.isLogin) {
4 months ago
if (uni.getStorageSync("applyType") || uni.getStorageSync("applyType") === 0) {
that.menuActive = uni.getStorageSync("applyType");
uni.removeStorageSync("applyType");
}
2 months ago
this.hasRequested = false;
3 months ago
// this.getList();
6 months ago
}
9 months ago
this.getGZHInfo();
7 months ago
that.G.watchUserPage("pages/workBench/index");
9 months ago
},
onReachBottom() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getList("concat");
}
}
9 months ago
},
methods: {
6 months ago
reachBottom() {
let that = this;
this.G.isLogin();
if (this.G.isLogin()) {
if (that.query.isFinish == -1 || that.query.isFinish == that.query.size) {
that.query.page++;
that.getList("concat");
}
}
},
9 months ago
getList($type = "init") {
9 months ago
let that = this;
3 months ago
// console.log("是否登录", that.isLogin);
9 months ago
if (!that.isLogin) {
return false;
}
that.G.Post(
that.api.order_list_new,
9 months ago
{
9 months ago
pageNum: that.query.page,
pageSize: that.query.size,
6 months ago
keys: that.keyword,
9 months ago
classify: 1,
6 months ago
upAgencyId: that.upAgencyId,
9 months ago
// classify: that.tabActive + 1,
statusStr: that.tabInfo[that.tabActive].childList[that.menuActive].tip,
9 months ago
},
(res) => {
3 months ago
// console.log("res", res);
9 months ago
// return
if (res.recordCount == 0) {
that.loading = false;
} else {
that.loading = true;
}
that.$forceUpdate();
that.speed = res.recordCount;
that.query.isFinish = res.recordList.length;
if (that.speed > 0) {
// uni.setBackgroundColor({
// backgroundColorBottom: "#ffffff",
// });
res.recordList.forEach((item, index) => {
if (item.status == 10) {
// 待审核 报名时间
item.time = that.G.getPointTime(item.createTime, "MM--DD HH:MM");
} else if (item.status == 20) {
// 待接待 预约接待时间
item.time = that.G.getPointTime(item.receptionTime, "MM--DD HH:MM");
} else if (item.status == 21 || item.status == 26 || item.status == 35 || item.status == 48 || item.status == 45) {
// 已完成 完成时间
item.time = that.G.getPointTime(item.finishTime, "MM--DD HH:MM");
} else if (item.status == 25) {
// 待面试 面试时间
item.time = that.G.getPointTime(item.interviewTime, "MM--DD HH:MM");
} else if (item.status == 30) {
// 待入职 预约入职时间
item.time = that.G.getPointTime(item.willEntryTime, "MM--DD HH:MM");
} else if (item.status == 40) {
// 已入职 入职时间
item.time = that.G.getPointTime(item.entryTime, "MM--DD HH:MM");
} else if (item.status == 50) {
// 已离职 离职时间
item.time = that.G.getPointTime(item.leaveTime, "MM--DD HH:MM");
} else {
item.time = that.G.getPointTime(item.updateTime, "MM--DD HH:MM");
}
item.status_text = that.G.getOrderStatus().filter((itm, inx) => {
return itm.id == item.status;
})[0].name;
item.setTitle = that.G.titleToStr(item);
});
} else {
// uni.setBackgroundColor({
// backgroundColorBottom: "#ededed",
// });
}
if ($type == "init") {
that.query.list = res.recordList;
// that.query.list = [...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList, ...res.recordList];
} else {
that.query.list = that.query.list.concat(res.recordList);
}
9 months ago
}
);
},
9 months ago
goTel($item) {
3 months ago
// console.log($item);
9 months ago
if ($item) {
uni.makePhoneCall({
phoneNumber: $item,
});
9 months ago
}
},
9 months ago
getGZHInfo() {
let that = this;
if (that.isLogin) {
that.G.Get(that.api.user_getGZHstatus, { type: "BMZS" }, (res) => {
3 months ago
// console.log(res);
9 months ago
that.GZHInfo = res;
});
}
},
/**
* 跳转搜索页
*/
goSearch() {
this.G.isLogin();
if (this.G.isLogin()) {
uni.navigateTo({
url: `/root/other/search?from=apply&active=${this.tabActive}`,
});
}
},
// 一级tab切换
handleUpdateTab(e) {
let that = this;
3 months ago
// console.log("e", e);
9 months ago
this.tabActive = e;
this.menuActive = 0;
this.menuList = this.tabInfo[this.tabActive].childList;
this.speed = -1;
this.query.page = 1;
that.G.isLogin();
if (that.G.isLogin()) {
this.getList();
}
},
// 二级tab切换
handleUpdateMenu($item, $index) {
let that = this;
3 months ago
// console.log("$item", $item);
9 months ago
this.menuActive = $item;
8 months ago
this.loading = true;
9 months ago
this.speed = -1;
this.query.page = 1;
that.G.isLogin();
if (that.G.isLogin()) {
this.getList();
}
},
6 months ago
getSearch(type) {
let that = this;
3 months ago
// console.log("typetypetype", type);
// console.log("getSearch", that.keyword);
6 months ago
if (type == "clear" && !that.keyword) {
that.getList();
} else if (type == "search") {
that.getList();
}
},
9 months ago
goDetail($item, $index) {
let that = this;
3 months ago
// console.log("$item", $item);
9 months ago
// return
uni.navigateTo({
// url: "/root/detail/apply?id=" + $item.id + "&type=" + (that.tabActive + 1),
url: `/root/detail/apply?id=${$item.id}&type=${that.tabActive + 1}&relationId=${$item.relationId}`,
9 months ago
});
},
9 months ago
goLogin() {
uni.reLaunch({
9 months ago
url: "/root/person/loginIndex",
9 months ago
});
},
9 months ago
toMessage() {
uni.navigateTo({
url: "/root/person/message",
});
9 months ago
},
},
};
</script>
9 months ago
<style lang="scss">
.apply-header {
position: fixed;
left: 50%;
transform: translateX(-50%);
.box {
padding: 0 2px;
width: 148px;
height: 32px;
background-color: #eeeeee;
border-radius: 4px;
.item {
width: 72px;
height: 28px;
margin-top: 2px;
border-radius: 4px;
.btn {
font-size: 14px;
color: #333;
}
}
.item-active {
background-color: #fff;
}
}
}
.p-apply-inedx {
width: 100vw;
background-color: #ededed;
overflow-x: hidden;
min-height: 100%;
.bg_shawdoc {
background: linear-gradient(180deg, #caf1e0 1%, rgba(249, 249, 249, 0));
}
.suffix {
position: absolute;
right: 20rpx;
top: 10px;
z-index: 1;
border-top-right-radius: 110rpx;
border-bottom-right-radius: 110rpx;
}
.tab-fixed {
position: fixed;
left: 0;
top: 0;
width: 100%;
height: calc(112rpx + 36px);
background-color: #fff;
z-index: 1;
}
.m-search {
.u-icon-wrap {
}
}
.m-search-active {
.u-icon-wrap {
position: inherit;
left: 0rpx;
}
}
.m-select {
.u-tab-bar {
bottom: 5px !important;
}
.link {
.item {
.doc {
bottom: 0;
left: 50%;
transform: translateX(-50%);
}
}
}
.showdoc {
// box-shadow: 0 2px 4px rgba(0, 0, 0, .04), 0 0 6px rgba(0, 0, 0, .02);
border-bottom: 1rpx solid #eee;
overflow-x: "auto";
width: 100vw;
.menu-obj {
min-width: 422px;
.menu-btn {
margin-right: 8px;
.btn {
background: rgba(204, 204, 204, 0.2);
color: #666666;
}
&:first-child {
margin-left: 12px;
}
}
.menu-active {
.btn {
background: rgba(0, 182, 102, 0.1);
color: #00b666;
}
}
}
}
}
.m-login-false {
height: calc(100% - 92px);
.m-panel,
.link {
height: 100%;
.m-log {
height: 100%;
}
}
}
.m-panel {
min-height: 100%;
}
.m-box-fixed {
position: fixed;
left: 0;
// top: 92px;
width: 100vw;
background-color: #fff;
z-index: 999;
}
9 months ago
}
6 months ago
.sticky {
position: sticky;
top: 0px;
left: 0;
z-index: 100;
}
9 months ago
</style>