|
@ -2,29 +2,24 @@ |
|
|
<view class="se-m-10"> |
|
|
<view class="se-m-10"> |
|
|
<u-sticky> |
|
|
<u-sticky> |
|
|
<view class="se-px-20 se-pt-10 se-zi-s se-bgc-white"> |
|
|
<view class="se-px-20 se-pt-10 se-zi-s se-bgc-white"> |
|
|
<u-search height="40" placeholder="搜索" :showAction="true" v-model="keyword" @search="onSearch()" @clickIcon="onSearch()" @custom="onSearch()"></u-search> |
|
|
|
|
|
|
|
|
<u-search height="40" placeholder="搜索" :showAction="true" v-model="keyword" @search="onSearch()" |
|
|
|
|
|
@clickIcon="onSearch()" |
|
|
|
|
|
@clear="onSearch" |
|
|
|
|
|
@custom="onSearch()"></u-search> |
|
|
</view> |
|
|
</view> |
|
|
<u-tabs |
|
|
|
|
|
class="se-bgc-white se-pb-20" |
|
|
|
|
|
:current="current" |
|
|
|
|
|
lineWidth="30" |
|
|
|
|
|
lineColor="#FF7A31" |
|
|
|
|
|
:activeStyle="{ |
|
|
|
|
|
|
|
|
<u-tabs class="se-bgc-white se-pb-20" :current="current" lineWidth="30" lineColor="#FF7A31" :activeStyle="{ |
|
|
color: '#303133', |
|
|
color: '#303133', |
|
|
fontWeight: 'bold', |
|
|
fontWeight: 'bold', |
|
|
transform: 'scale(1.05)' |
|
|
transform: 'scale(1.05)' |
|
|
}" |
|
|
|
|
|
:inactiveStyle="{ |
|
|
|
|
|
|
|
|
}" :inactiveStyle="{ |
|
|
color: '#606266', |
|
|
color: '#606266', |
|
|
transform: 'scale(1)' |
|
|
transform: 'scale(1)' |
|
|
}" |
|
|
|
|
|
itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" |
|
|
|
|
|
:list="navList" |
|
|
|
|
|
@click="navClick($event)"> |
|
|
|
|
|
|
|
|
}" itemStyle="padding-left: 15px; padding-right: 15px; height: 34px;" :list="navList" @click="navClick($event)"> |
|
|
</u-tabs> |
|
|
</u-tabs> |
|
|
</u-sticky> |
|
|
</u-sticky> |
|
|
<template v-if="current==1"> |
|
|
<template v-if="current==1"> |
|
|
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in tList" :key="indexs" @click="onTaskDetail(items)"> |
|
|
|
|
|
|
|
|
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in tList" |
|
|
|
|
|
:key="indexs" @click="onTaskDetail(items)"> |
|
|
<view class="se-flex se-flex-h-sb"> |
|
|
<view class="se-flex se-flex-h-sb"> |
|
|
<view class="se-flex se-fw-6"> |
|
|
<view class="se-flex se-fw-6"> |
|
|
<text class="se-c-black se-fs-30">{{items.title}}</text> |
|
|
<text class="se-c-black se-fs-30">{{items.title}}</text> |
|
@ -36,20 +31,26 @@ |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<view class="se-py-10"> |
|
|
<view class="se-py-10"> |
|
|
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.categoryOne_dictText">{{items.categoryOne_dictText}}</text> |
|
|
|
|
|
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.categoryTwo_dictText">{{items.categoryTwo_dictText}}</text> |
|
|
|
|
|
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" v-if="items.payType_dictText">{{items.payType_dictText}}</text> |
|
|
|
|
|
|
|
|
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" |
|
|
|
|
|
v-if="items.categoryOne_dictText">{{items.categoryOne_dictText}}</text> |
|
|
|
|
|
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" |
|
|
|
|
|
v-if="items.categoryTwo_dictText">{{items.categoryTwo_dictText}}</text> |
|
|
|
|
|
<text class="se-c-text-sub se-fs-22 se-mr-10 se-py-5 se-px-20 se-br-5 se-bgc-f5" |
|
|
|
|
|
v-if="items.payType_dictText">{{items.payType_dictText}}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="se-flex se-flex-h-sb"> |
|
|
<view class="se-flex se-flex-h-sb"> |
|
|
<view class="se-flex se-flex-h-c"> |
|
|
<view class="se-flex se-flex-h-c"> |
|
|
<u-icon name="map"></u-icon> |
|
|
<u-icon name="map"></u-icon> |
|
|
<text class="se-c-text-sub se-fs-24 se-pr-10">{{items.latitude,items.longitude | getDistance}}km</text> |
|
|
|
|
|
<text class="se-c-text-sub se-fs-24 se-pl-10 se-b-l se-toe-3" style="max-width: 220rpx;">{{items.address}}</text> |
|
|
|
|
|
|
|
|
<text |
|
|
|
|
|
class="se-c-text-sub se-fs-24 se-pr-10">{{items.latitude,items.longitude | getDistance}}km</text> |
|
|
|
|
|
<text class="se-c-text-sub se-fs-24 se-pl-10 se-b-l se-toe-3" |
|
|
|
|
|
style="max-width: 220rpx;">{{items.address}}</text> |
|
|
</view> |
|
|
</view> |
|
|
<view class="se-c-text se-c-text-sub se-fs-24"> |
|
|
<view class="se-c-text se-c-text-sub se-fs-24"> |
|
|
{{items.createTime | formatTime}} |
|
|
{{items.createTime | formatTime}} |
|
|
</view> |
|
|
</view> |
|
|
<view class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6"> |
|
|
|
|
|
|
|
|
<view |
|
|
|
|
|
class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6"> |
|
|
<text class="se-ml-5">立即接单</text> |
|
|
<text class="se-ml-5">立即接单</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -57,16 +58,23 @@ |
|
|
<u-empty v-if="tList && tList.length==0" mode="list"></u-empty> |
|
|
<u-empty v-if="tList && tList.length==0" mode="list"></u-empty> |
|
|
</template> |
|
|
</template> |
|
|
<template v-if="current==0"> |
|
|
<template v-if="current==0"> |
|
|
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in rlist" :key="indexs"> |
|
|
|
|
|
<view class="se-flex se-flex-h-sb" @click.capture="onRoleDetail(items)"> |
|
|
|
|
|
|
|
|
<view class="se-m-20 se-br-20 se-bs-b se-bgc-white se-py-20 se-px-30" v-for="(items,indexs) in rlist" |
|
|
|
|
|
:key="indexs"> |
|
|
|
|
|
<view class="se-flex se-flex-h-sb" @click.capture="onRoleDetail(items)"> |
|
|
<view class="se-flex"> |
|
|
<view class="se-flex"> |
|
|
<view class="se-a-100"> |
|
|
<view class="se-a-100"> |
|
|
<image class="se-a-100 se-br-p-50 se-bgc-f5" :src="items.employResume.headImage" mode=""></image> |
|
|
|
|
|
|
|
|
<image class="se-a-100 se-br-p-50 se-bgc-f5" :src="items.employResume.headImage" mode=""> |
|
|
|
|
|
</image> |
|
|
</view> |
|
|
</view> |
|
|
<view class="se-ml-20 se-flex se-flex-v-c se-flex-ai-fs"> |
|
|
<view class="se-ml-20 se-flex se-flex-v-c se-flex-ai-fs"> |
|
|
<text class="se-fw-6 se-c-black se-fs-30">{{items.employResume.name?items.employResume.name:items.hanHaiMember.nickName}}<text class="se-mx-10 se-b-l"></text><text class="se-fs-28 se-c-orange">日薪:{{items.dayMoney}}</text> </text> |
|
|
|
|
|
<text class="se-fs-24 se-c-text-third">{{items.employResume.sex==1?"男":"女"}}-{{items.employResume.nation?items.employResume.nation:"未知"}}族-{{items.employResume.age}}岁</text> |
|
|
|
|
|
<view class="se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6 se-toe-1" style="max-width: 100rpx;"> |
|
|
|
|
|
|
|
|
<text |
|
|
|
|
|
class="se-fw-6 se-c-black se-fs-30">{{items.employResume.name?items.employResume.name:items.hanHaiMember.nickName}}<text |
|
|
|
|
|
class="se-mx-10 se-b-l"></text><text |
|
|
|
|
|
class="se-fs-28 se-c-orange">日薪:{{items.dayMoney}}</text> </text> |
|
|
|
|
|
<text |
|
|
|
|
|
class="se-fs-24 se-c-text-third">{{items.employResume.sex==1?"男":"女"}}-{{items.employResume.nation?items.employResume.nation:"未知"}}族-{{items.employResume.age}}岁</text> |
|
|
|
|
|
<view class="se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6 se-toe-1" |
|
|
|
|
|
style="max-width: 100rpx;"> |
|
|
{{items.categoryOne_dictText}} |
|
|
{{items.categoryOne_dictText}} |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
@ -88,19 +96,20 @@ |
|
|
{{items.categoryTwo_dictText}} |
|
|
{{items.categoryTwo_dictText}} |
|
|
<!-- <u-parse v-if="items.brief" :content="items.brief"></u-parse> --> |
|
|
<!-- <u-parse v-if="items.brief" :content="items.brief"></u-parse> --> |
|
|
</text> |
|
|
</text> |
|
|
<text class="se-c-text-sub se-fs-24 se-toe-5" style="max-width: 350rpx;width:350rpx;"> |
|
|
|
|
|
|
|
|
<text class="se-c-text-sub se-fs-24 se-toe-5" style="max-width: 350rpx;width:350rpx;"> |
|
|
{{items.address}} |
|
|
{{items.address}} |
|
|
<!-- <u-parse v-if="items.brief" :content="items.brief"></u-parse> --> |
|
|
<!-- <u-parse v-if="items.brief" :content="items.brief"></u-parse> --> |
|
|
</text> |
|
|
</text> |
|
|
<view @click.capture="onCustomerService(items.employAuthenticationPerson.phone)" class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6"> |
|
|
|
|
|
<u-icon color="#FF7A31" name="phone-fill"></u-icon> |
|
|
|
|
|
|
|
|
<view @click.capture="onCustomerService(items.employAuthenticationPerson.phone)" |
|
|
|
|
|
class="se-flex se-flex-h-c se-py-10 se-px-20 se-br-12 se-fs-22 se-c-orange se-bgc-ffd se-fw-6"> |
|
|
|
|
|
<u-icon color="#FF7A31" name="phone-fill"></u-icon> |
|
|
<text class="se-ml-5">联系他</text> |
|
|
<text class="se-ml-5">联系他</text> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
</view> |
|
|
<u-empty v-if="rlist && rlist.length==0" mode="list"></u-empty> |
|
|
<u-empty v-if="rlist && rlist.length==0" mode="list"></u-empty> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
</view> |
|
|
</view> |
|
|
</template> |
|
|
</template> |
|
|
|
|
|
|
|
@ -113,23 +122,22 @@ |
|
|
querySeekList, |
|
|
querySeekList, |
|
|
getSysText |
|
|
getSysText |
|
|
} from "@/common/api.js" |
|
|
} from "@/common/api.js" |
|
|
export default{ |
|
|
|
|
|
data(){ |
|
|
|
|
|
return{ |
|
|
|
|
|
tpageNo:1, |
|
|
|
|
|
tpageSize:20, |
|
|
|
|
|
tList:[], |
|
|
|
|
|
|
|
|
|
|
|
rpageNo:1, |
|
|
|
|
|
rpageSize:20, |
|
|
|
|
|
rlist:[], |
|
|
|
|
|
id:null, |
|
|
|
|
|
keyword:"", |
|
|
|
|
|
current:0, |
|
|
|
|
|
navList:[ |
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
export default { |
|
|
|
|
|
data() { |
|
|
|
|
|
return { |
|
|
|
|
|
tpageNo: 1, |
|
|
|
|
|
tpageSize: 20, |
|
|
|
|
|
tList: [], |
|
|
|
|
|
|
|
|
|
|
|
rpageNo: 1, |
|
|
|
|
|
rpageSize: 20, |
|
|
|
|
|
rlist: [], |
|
|
|
|
|
id: null, |
|
|
|
|
|
keyword: "", |
|
|
|
|
|
current: 0, |
|
|
|
|
|
navList: [{ |
|
|
name: '求职大厅', |
|
|
name: '求职大厅', |
|
|
}, |
|
|
|
|
|
|
|
|
}, |
|
|
{ |
|
|
{ |
|
|
name: '招聘大厅', |
|
|
name: '招聘大厅', |
|
|
} |
|
|
} |
|
@ -137,10 +145,10 @@ |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onLoad(options) { |
|
|
onLoad(options) { |
|
|
this.id=options.id |
|
|
|
|
|
if(options.title){ |
|
|
|
|
|
|
|
|
this.id = options.id |
|
|
|
|
|
if (options.title) { |
|
|
uni.setNavigationBarTitle({ |
|
|
uni.setNavigationBarTitle({ |
|
|
title:options.title |
|
|
|
|
|
|
|
|
title: options.title |
|
|
}) |
|
|
}) |
|
|
} |
|
|
} |
|
|
// this.onTaskList() |
|
|
// this.onTaskList() |
|
@ -148,171 +156,171 @@ |
|
|
}, |
|
|
}, |
|
|
onReachBottom() { |
|
|
onReachBottom() { |
|
|
let that = this |
|
|
let that = this |
|
|
if(that.current==0){ |
|
|
|
|
|
|
|
|
if (that.current == 0) { |
|
|
that.rpageNo = that.rpageNo + 1 |
|
|
that.rpageNo = that.rpageNo + 1 |
|
|
that.onRolelist() |
|
|
that.onRolelist() |
|
|
}else if(that.current==1){ |
|
|
|
|
|
|
|
|
} else if (that.current == 1) { |
|
|
that.tpageNo = that.tpageNo + 1 |
|
|
that.tpageNo = that.tpageNo + 1 |
|
|
this.onTaskList() |
|
|
this.onTaskList() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onPullDownRefresh() { |
|
|
onPullDownRefresh() { |
|
|
let that = this |
|
|
let that = this |
|
|
if(that.current==0){ |
|
|
|
|
|
that.rpageNo = 1 |
|
|
|
|
|
that.rlist=[] |
|
|
|
|
|
|
|
|
if (that.current == 0) { |
|
|
|
|
|
that.rpageNo = 1 |
|
|
|
|
|
that.rlist = [] |
|
|
that.onRolelist() |
|
|
that.onRolelist() |
|
|
}else if(that.current==1){ |
|
|
|
|
|
that.tpageNo = 1 |
|
|
|
|
|
|
|
|
} else if (that.current == 1) { |
|
|
|
|
|
that.tpageNo = 1 |
|
|
that.tList = [] |
|
|
that.tList = [] |
|
|
this.onTaskList() |
|
|
this.onTaskList() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
filters:{ |
|
|
|
|
|
|
|
|
filters: { |
|
|
formatTime(time) { |
|
|
formatTime(time) { |
|
|
const timestamp = new Date(time).getTime(); |
|
|
const timestamp = new Date(time).getTime(); |
|
|
const currentTime = new Date().getTime(); |
|
|
|
|
|
console.info("currentTime",currentTime) |
|
|
|
|
|
const diff = (currentTime - timestamp) / 1000; // 时间差,单位:秒 |
|
|
|
|
|
|
|
|
|
|
|
// 计算月差,判断是否超过一个月 |
|
|
|
|
|
const oneMonthInSeconds = 30 * 24 * 60 * 60; |
|
|
|
|
|
if (diff > oneMonthInSeconds) { |
|
|
|
|
|
let date = new Date(timestamp); |
|
|
|
|
|
let year = date.getFullYear(); |
|
|
|
|
|
let month = date.getMonth() + 1; |
|
|
|
|
|
let day = date.getDate(); |
|
|
|
|
|
|
|
|
|
|
|
if (month < 10) month = "0" + month; |
|
|
|
|
|
if (day < 10) day = "0" + day; |
|
|
|
|
|
|
|
|
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 计算秒、分钟、小时的差值 |
|
|
|
|
|
if (diff < 60) { |
|
|
|
|
|
return `${Math.floor(diff)}秒钟前`; |
|
|
|
|
|
} else if (diff < 60 * 60) { |
|
|
|
|
|
return `${Math.floor(diff / 60)}分钟前`; |
|
|
|
|
|
} else if (diff < 60 * 60 * 24) { |
|
|
|
|
|
return `${Math.floor(diff / 60 / 60)}小时前`; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 显示天数 |
|
|
|
|
|
return `${Math.floor(diff / 60 / 60 / 24)}天前`; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
const currentTime = new Date().getTime(); |
|
|
|
|
|
console.info("currentTime", currentTime) |
|
|
|
|
|
const diff = (currentTime - timestamp) / 1000; // 时间差,单位:秒 |
|
|
|
|
|
|
|
|
|
|
|
// 计算月差,判断是否超过一个月 |
|
|
|
|
|
const oneMonthInSeconds = 30 * 24 * 60 * 60; |
|
|
|
|
|
if (diff > oneMonthInSeconds) { |
|
|
|
|
|
let date = new Date(timestamp); |
|
|
|
|
|
let year = date.getFullYear(); |
|
|
|
|
|
let month = date.getMonth() + 1; |
|
|
|
|
|
let day = date.getDate(); |
|
|
|
|
|
|
|
|
|
|
|
if (month < 10) month = "0" + month; |
|
|
|
|
|
if (day < 10) day = "0" + day; |
|
|
|
|
|
|
|
|
|
|
|
return `${year}-${month}-${day}`; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 计算秒、分钟、小时的差值 |
|
|
|
|
|
if (diff < 60) { |
|
|
|
|
|
return `${Math.floor(diff)}秒钟前`; |
|
|
|
|
|
} else if (diff < 60 * 60) { |
|
|
|
|
|
return `${Math.floor(diff / 60)}分钟前`; |
|
|
|
|
|
} else if (diff < 60 * 60 * 24) { |
|
|
|
|
|
return `${Math.floor(diff / 60 / 60)}小时前`; |
|
|
|
|
|
} else { |
|
|
|
|
|
// 显示天数 |
|
|
|
|
|
return `${Math.floor(diff / 60 / 60 / 24)}天前`; |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
}, |
|
|
}, |
|
|
formDate(date){ |
|
|
|
|
|
|
|
|
formDate(date) { |
|
|
return dayjs(date).format("YYYY-MM-DD").fromNow(); |
|
|
return dayjs(date).format("YYYY-MM-DD").fromNow(); |
|
|
}, |
|
|
}, |
|
|
getDistance(lat1, lng1) { |
|
|
getDistance(lat1, lng1) { |
|
|
let lng2 = uni.getStorageSync("longitude") |
|
|
let lng2 = uni.getStorageSync("longitude") |
|
|
let lat2 = uni.getStorageSync("latitude") |
|
|
let lat2 = uni.getStorageSync("latitude") |
|
|
if(!lng2 && !lat2){ |
|
|
|
|
|
|
|
|
if (!lng2 && !lat2) { |
|
|
return "请授权" |
|
|
return "请授权" |
|
|
} |
|
|
} |
|
|
const R = 6371; // 地球半径,单位:km |
|
|
|
|
|
const radLat1 = (lat1 * Math.PI) / 180; |
|
|
|
|
|
const radLat2 = (lat2 * Math.PI) / 180; |
|
|
|
|
|
const deltaLat = radLat2 - radLat1; |
|
|
|
|
|
const deltaLng = ((lng2 - lng1) * Math.PI) / 180; |
|
|
|
|
|
|
|
|
|
|
|
const a = |
|
|
|
|
|
Math.sin(deltaLat / 2) * Math.sin(deltaLat / 2) + |
|
|
|
|
|
Math.cos(radLat1) * |
|
|
|
|
|
Math.cos(radLat2) * |
|
|
|
|
|
Math.sin(deltaLng / 2) * |
|
|
|
|
|
Math.sin(deltaLng / 2); |
|
|
|
|
|
|
|
|
|
|
|
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); |
|
|
|
|
|
return (R * c).toFixed(2); // 返回保留两位小数的公里数 |
|
|
|
|
|
|
|
|
const R = 6371; // 地球半径,单位:km |
|
|
|
|
|
const radLat1 = (lat1 * Math.PI) / 180; |
|
|
|
|
|
const radLat2 = (lat2 * Math.PI) / 180; |
|
|
|
|
|
const deltaLat = radLat2 - radLat1; |
|
|
|
|
|
const deltaLng = ((lng2 - lng1) * Math.PI) / 180; |
|
|
|
|
|
|
|
|
|
|
|
const a = |
|
|
|
|
|
Math.sin(deltaLat / 2) * Math.sin(deltaLat / 2) + |
|
|
|
|
|
Math.cos(radLat1) * |
|
|
|
|
|
Math.cos(radLat2) * |
|
|
|
|
|
Math.sin(deltaLng / 2) * |
|
|
|
|
|
Math.sin(deltaLng / 2); |
|
|
|
|
|
|
|
|
|
|
|
const c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a)); |
|
|
|
|
|
return (R * c).toFixed(2); // 返回保留两位小数的公里数 |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
methods:{ |
|
|
|
|
|
navClick(event){ |
|
|
|
|
|
this.current=event.index |
|
|
|
|
|
|
|
|
methods: { |
|
|
|
|
|
navClick(event) { |
|
|
|
|
|
this.current = event.index |
|
|
this.keyword = "" |
|
|
this.keyword = "" |
|
|
if(event.index==0){ |
|
|
|
|
|
this.rpageNo=1 |
|
|
|
|
|
|
|
|
if (event.index == 0) { |
|
|
|
|
|
this.rpageNo = 1 |
|
|
this.onRolelist() |
|
|
this.onRolelist() |
|
|
}else if(event.index==1){ |
|
|
|
|
|
this.tpageNo=1 |
|
|
|
|
|
|
|
|
} else if (event.index == 1) { |
|
|
|
|
|
this.tpageNo = 1 |
|
|
this.onTaskList() |
|
|
this.onTaskList() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onSearch(){ |
|
|
|
|
|
|
|
|
onSearch() { |
|
|
let that = this |
|
|
let that = this |
|
|
if(that.current==0){ |
|
|
|
|
|
that.rpageNo = 1 |
|
|
|
|
|
|
|
|
if (that.current == 0) { |
|
|
|
|
|
that.rpageNo = 1 |
|
|
that.onRolelist() |
|
|
that.onRolelist() |
|
|
}else if(that.current==1){ |
|
|
|
|
|
that.tpageNo = 1 |
|
|
|
|
|
|
|
|
} else if (that.current == 1) { |
|
|
|
|
|
that.tpageNo = 1 |
|
|
this.onTaskList() |
|
|
this.onTaskList() |
|
|
} |
|
|
} |
|
|
}, |
|
|
}, |
|
|
onRolelist(){ |
|
|
|
|
|
|
|
|
onRolelist() { |
|
|
querySeekList({ |
|
|
querySeekList({ |
|
|
pageNo:this.rpageNo, |
|
|
|
|
|
pageSize:this.rpageSize, |
|
|
|
|
|
title:this.keyword, |
|
|
|
|
|
categoryOne:this.id, |
|
|
|
|
|
}).then(response=>{ |
|
|
|
|
|
console.info("response",response) |
|
|
|
|
|
if(this.rpageNo==1){ |
|
|
|
|
|
|
|
|
pageNo: this.rpageNo, |
|
|
|
|
|
pageSize: this.rpageSize, |
|
|
|
|
|
address: this.keyword, |
|
|
|
|
|
categoryOne: this.id, |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
console.info("response", response) |
|
|
|
|
|
if (this.rpageNo == 1) { |
|
|
this.rlist = response.result.records |
|
|
this.rlist = response.result.records |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.rlist = this.rlist.concat(response.result.records) |
|
|
this.rlist = this.rlist.concat(response.result.records) |
|
|
} |
|
|
} |
|
|
}).catch(error=>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onTaskList(){ |
|
|
|
|
|
|
|
|
onTaskList() { |
|
|
taskList({ |
|
|
taskList({ |
|
|
latitude:uni.getStorageSync("latitude"), |
|
|
|
|
|
longitude:uni.getStorageSync("longitude"), |
|
|
|
|
|
pageNo:this.tpageNo, |
|
|
|
|
|
title:this.keyword, |
|
|
|
|
|
categoryOne:this.id, |
|
|
|
|
|
pageSize:this.tpageSize |
|
|
|
|
|
}).then(response=>{ |
|
|
|
|
|
if(this.tpageNo==1){ |
|
|
|
|
|
|
|
|
latitude: uni.getStorageSync("latitude"), |
|
|
|
|
|
longitude: uni.getStorageSync("longitude"), |
|
|
|
|
|
pageNo: this.tpageNo, |
|
|
|
|
|
title: this.keyword, |
|
|
|
|
|
categoryOne: this.id, |
|
|
|
|
|
pageSize: this.tpageSize |
|
|
|
|
|
}).then(response => { |
|
|
|
|
|
if (this.tpageNo == 1) { |
|
|
this.tList = response.result.records |
|
|
this.tList = response.result.records |
|
|
}else{ |
|
|
|
|
|
|
|
|
} else { |
|
|
this.tList = this.tList.concat(response.result.records) |
|
|
this.tList = this.tList.concat(response.result.records) |
|
|
} |
|
|
} |
|
|
}).catch(error=>{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}).catch(error => { |
|
|
|
|
|
|
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onTaskDetail(event){ |
|
|
|
|
|
|
|
|
onTaskDetail(event) { |
|
|
console.info(event) |
|
|
console.info(event) |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:"/pages_subpack/work-detail/index?id="+event.id |
|
|
|
|
|
|
|
|
url: "/pages_subpack/work-detail/index?id=" + event.id |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onRoleDetail(event){ |
|
|
|
|
|
console.info("event",event) |
|
|
|
|
|
|
|
|
onRoleDetail(event) { |
|
|
|
|
|
console.info("event", event) |
|
|
uni.navigateTo({ |
|
|
uni.navigateTo({ |
|
|
url:"/pages_subpack/master-detail/index?id="+event.id |
|
|
|
|
|
|
|
|
url: "/pages_subpack/master-detail/index?id=" + event.id |
|
|
}) |
|
|
}) |
|
|
}, |
|
|
}, |
|
|
onCustomerService(phome){ |
|
|
|
|
|
|
|
|
onCustomerService(phome) { |
|
|
let that = this |
|
|
let that = this |
|
|
// let obj = that.$utils.getkeyContent('phone') |
|
|
// let obj = that.$utils.getkeyContent('phone') |
|
|
if (uni.canIUse('makePhoneCall')) { |
|
|
if (uni.canIUse('makePhoneCall')) { |
|
|
uni.makePhoneCall({ |
|
|
uni.makePhoneCall({ |
|
|
phoneNumber: String(phome), |
|
|
|
|
|
success: function () { |
|
|
|
|
|
console.log('拨打电话成功'); |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function () { |
|
|
|
|
|
console.log('拨打电话失败'); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
phoneNumber: String(phome), |
|
|
|
|
|
success: function() { |
|
|
|
|
|
console.log('拨打电话成功'); |
|
|
|
|
|
}, |
|
|
|
|
|
fail: function() { |
|
|
|
|
|
console.log('拨打电话失败'); |
|
|
|
|
|
} |
|
|
}); |
|
|
}); |
|
|
} else { |
|
|
} else { |
|
|
console.log('你的设备不支持拨打电话功能'); |
|
|
console.log('你的设备不支持拨打电话功能'); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}, |
|
|
}, |
|
|
} |
|
|
} |
|
|
} |
|
|
} |
|
|