index.vue 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403
  1. <template>
  2. <view class="sbox" >
  3. <!-- :style="'padding-top:'+nvaHeight+'px;'" -->
  4. <view class="navbox" :style="'padding-top:'+nvaHeight+'px;'">
  5. <!-- fixed="true" -->
  6. <uni-nav-bar color="#ffffff" leftWidth='400rpx' :background-color="backgroundColor" :border="false" statusBar='true' >
  7. <block slot="left">
  8. <view class="topl flexc">
  9. <image :src="hlogo" ></image>
  10. <view class="over">智慧家政 员工端</view>
  11. </view>
  12. </block>
  13. </uni-nav-bar>
  14. <view class="flexc htop">
  15. <view class="pr moreimg mr12" @click="showDrawer('showLeft')">
  16. <image :src="moreimg" class=""></image>
  17. <view class="cir"></view>
  18. </view>
  19. <line-picker @getChange="getChange" :localdata="range" v-model="value"></line-picker>
  20. <view class="flex1"></view>
  21. <view class="pr moreimg ">
  22. <image :src="newsimg"></image>
  23. <view class="cir"></view>
  24. </view>
  25. </view>
  26. <view class="flexc tablists">
  27. <view class="tablist" :class="tabval==ite.val?'act':''" v-for="(ite,idx) in tablist" :key="idx" @click="getTabList(ite.val)">
  28. <view class="tabtit">{{ite.tit}}66636</view>
  29. <view class="tips" v-if="ite.val==0">
  30. <image :src="tips" class="tips"></image>
  31. <view class="cir"></view>
  32. </view>
  33. </view>
  34. </view>
  35. <!-- 提示 -->
  36. <view class="sxtps">有新订单,请点击“刷新列表”</view>
  37. <!-- -->
  38. <view class="mjnpx flexc" v-if="tabval==3||tabval==4">
  39. <image :src="reset" class="resetimg" @click="getReset"></image>
  40. <picker mode="date" @change='bindDateChangea'>
  41. <view class="chekt flexc">
  42. <view>{{cxrq|| "选择日期"}}</view>
  43. <image :src="up"></image>
  44. </view>
  45. </picker>
  46. <view class="flex1 mjlist">
  47. <view v-for="(ite,idx) in mjlist" :class="mjval==ite.val?'act':''" :key="idx" @click="getMjFn(ite.val)">{{ite.tit}}</view>
  48. </view>
  49. </view>
  50. </view>
  51. <scroll-view class="swipe" scroll-y="true" @scrolltolower="getMoreFn" >
  52. <box-list :datainfo="list" :wtdt="wtdt" type='order' @getDetail="getDetail" @getBtnFn="getBtnFn"></box-list>
  53. </scroll-view>
  54. <view class="flex0 hbtns">
  55. <view class="btnl">
  56. <view class="tit"><text>¥</text> 135</view>
  57. <view class="txt">今日收入</view>
  58. </view>
  59. <view class="btnr">
  60. <image :src="refresh"></image>
  61. 刷新列表
  62. </view>
  63. </view>
  64. <!-- 左侧展示 -->
  65. <uni-drawer ref="showLeft" mode="left" :width="280" @change="change($event,'showLeft')">
  66. <view class="mine" :style="'padding-top:'+stuHeight+'px;'">
  67. <view class="mtop flexc" @click="handleToInfo">
  68. <image :src="headimg" class="head flex0"></image>袁明朗
  69. <image :src="rzico" class="rzimg flex0"></image>
  70. </view>
  71. <view class="counbox">
  72. <view class="couns bga">
  73. <view class="tit">本月接单数</view>
  74. <view class="txt">67 </view>
  75. <image :src="mbga" class="imga"></image>
  76. </view>
  77. <view class="couns bgb">
  78. <view class="tit">本月收入/元</view>
  79. <view class="txt">67 </view>
  80. <image :src="mbgb" class="imgb"></image>
  81. </view>
  82. <view class="couns bgc">
  83. <view class="tit">本月好评数</view>
  84. <view class="txt">67 </view>
  85. <image :src="mbgc" class="imgc"></image>
  86. </view>
  87. <view class="couns bgd">
  88. <view class="tit">本月差评数</view>
  89. <view class="txt">67 </view>
  90. <image :src="mbgd" class="imgd"></image>
  91. </view>
  92. </view>
  93. <view class="flex1 mtlists">
  94. <view class="mtlist flexc">
  95. <view class="imgs"><image :src="mtaba" class="imga"></image></view>
  96. <view class="mltit">实名认证</view>
  97. <view class="mltxt">已实名</view>
  98. </view>
  99. <view class="mtlist flexc" @click="getMajorFn">
  100. <view class="imgs"><image :src="mtabb" class="imga"></image></view>
  101. <view class="mltit">专业认证</view>
  102. <view class="mltxt">已实名</view>
  103. </view>
  104. <view class="mtlist flexc">
  105. <view class="imgs"><image :src="mtabc" class="imgb"></image></view>
  106. <view class="mltit">我的二维码</view>
  107. </view>
  108. <view class="mtlist flexc">
  109. <view class="imgs"><image :src="mtabd" class="imgc"></image></view>
  110. <view class="mltit">个人信息</view>
  111. </view>
  112. <view class="mtlist flexc">
  113. <view class="imgs"><image :src="mtabe" class="imgc"></image></view>
  114. <view class="mltit">修改密码</view>
  115. </view>
  116. <view class="mtlist flexc">
  117. <view class="imgs"><image :src="mtabf" class="imgd"></image></view>
  118. <view class="mltit">版本号</view>
  119. <view class="mltxt">当前已是最新版</view>
  120. </view>
  121. </view>
  122. <view class="loginbtns">退出登录</view>
  123. </view>
  124. </uni-drawer>
  125. <pop-up :type="type" @getClose="getClose" :finshtype="finshtype" :canres="canres" @getSure="getSure"></pop-up>
  126. <loading></loading>
  127. </view>
  128. </template>
  129. <script>
  130. import config from '@/config'
  131. const baseUrl = config.baseUrl
  132. import linePicker from "@/components/home/picker.vue"
  133. import boxList from "@/components/home/list.vue"
  134. import popUp from "@/components/home/popup.vue"
  135. import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
  136. export default{
  137. components:{linePicker,boxList,popUp},
  138. data(){
  139. return{
  140. hlogo:require("@/static/images/home/hlogo.png"),
  141. moreimg:require("@/static/images/home/more.png"),
  142. newsimg:require("@/static/images/home/news.png"),
  143. tips:require("@/static/images/home/tips.png"),
  144. refresh:require("@/static/images/home/refresh.png"),
  145. reset:require("@/static/images/reset.png"),
  146. up:require("@/static/images/up.png"),
  147. headimg:require("@/static/images/mine/profile.png"),
  148. rzico:require("@/static/images/mine/rzico.png"),
  149. mbga:require("@/static/images/mine/mbga.png"),
  150. mbgb:require("@/static/images/mine/mbgb.png"),
  151. mbgc:require("@/static/images/mine/mbgc.png"),
  152. mbgd:require("@/static/images/mine/mbgd.png"),
  153. mtaba:require("@/static/images/mine/mtaba.png"),
  154. mtabb:require("@/static/images/mine/mtabb.png"),
  155. mtabc:require("@/static/images/mine/mtabc.png"),
  156. mtabd:require("@/static/images/mine/mtabd.png"),
  157. mtabe:require("@/static/images/mine/mtabe.png"),
  158. mtabf:require("@/static/images/mine/mtabd.png"),
  159. nvaHeight:0,
  160. stuHeight:44,
  161. backgroundColor: "#0156FE",
  162. // hrimg:require('@/statics/logo.png'),
  163. list:[{tit:'123',zhanflag:true}],
  164. pageSize: 10,
  165. pageNum: 1,
  166. reachflag: true,
  167. wtdt:'',
  168. value: 1,
  169. range: [{tit:"在线",val:0},{tit:"离线",val:1}],
  170. tabval:0,
  171. tablist:[{tit:'新任务',val:0},{tit:'待上门',val:1},{tit:'服务中 ',val:2},{tit:'已完成',val:3},{tit:'已取消',val:4},] ,
  172. type:'',//tips,addpho,cancel,minecode
  173. scrollTop:'',
  174. finshtype:2,
  175. canres:[{tit:"与已接订单时间重叠",val:'0'},{tit:"突发事件请假",val:'1'},],
  176. mjlist:[{tit:"80m²以内",val:"0"},{tit:"80-90m²",val:"1"},{tit:"90-119m²",val:"2"}],
  177. mjval:0,
  178. }
  179. },
  180. onLoad: function() {
  181. uni.getSystemInfo({
  182. success: (e) => {
  183. this.stuHeight = Number(e.statusBarHeight)+44;
  184. this.nvaHeight = Number(e.statusBarHeight);
  185. }
  186. })
  187. },
  188. // 上拉触底加载更多触发事件
  189. onReachBottom() {
  190. // if (this.reachflag) {
  191. // this.pageNum++
  192. // this.getDataFn()
  193. // }
  194. },
  195. mounted() {
  196. // var that=this;
  197. // setTimeout(function(){
  198. // that.getHeightFn()
  199. // },200)
  200. },
  201. methods:{
  202. checkPermi, checkRole,
  203. showDrawer(e) {
  204. this.$refs[e].open()
  205. },
  206. // 关闭窗口
  207. closeDrawer(e) {
  208. this.$refs[e].close()
  209. },
  210. handleToInfo() {
  211. this.$tab.navigateTo('/pages/mine/info')
  212. },
  213. getMajorFn(){
  214. this.$tab.navigateTo("/work/pages/prove/major")
  215. },
  216. getDetail(){
  217. // this.$tab.navigateTo("/work/pages/business/add")
  218. },
  219. getBtnFn(e){
  220. this.type=e
  221. },
  222. getMjFn(val){
  223. this.mjval=val;
  224. },
  225. getClose(){
  226. this.type=''
  227. },
  228. getReset(){
  229. this.cxrq='';
  230. this.text='';
  231. this.getrefreshData()
  232. },
  233. getrefreshData(){
  234. this.pageNum=1;
  235. this.list=[];
  236. this.reachflag=true;
  237. this.getDataFn()
  238. },
  239. getSure(){
  240. this.$tab.navigateTo("/work/pages/prove/index")
  241. },
  242. getMoreFn(){
  243. console.log(1)
  244. if (this.reachflag) {
  245. this.pageNum++
  246. this.getDataFn()
  247. }
  248. },
  249. getChange(e){
  250. },
  251. getHeightFn(){
  252. let query = uni.createSelectorQuery().in(this);
  253. var that=this;
  254. //需要给黄色区域设置一个id标识,在这里是demo
  255. query.select('.navbox').boundingClientRect(data => {
  256. var height=Number(data.height);
  257. that.topHeight=Number(height)*2
  258. console.log(that.tabscheight)
  259. }).exec();
  260. },
  261. getTabList(val){
  262. this.tabval=val;
  263. },
  264. getDataFn(){
  265. return
  266. var params={
  267. pageSize:this.pageSize,
  268. pageNum: this.pageNum,
  269. }
  270. params.noticeType=this.tabidx
  271. getNoticeList(params).then(res=>{
  272. if(res.code==200){
  273. if (res.rows.length < this.pageSize) {
  274. this.reachflag = false
  275. this.wtdt = '到底了~';
  276. } else {
  277. var num = parseInt(res.rows.length) + parseInt(this.pageSize) * parseInt(this.pageNum - 1)
  278. if (num < res.total) {
  279. this.reachflag = true
  280. this.wtdt = ''
  281. } else {
  282. this.reachflag = false
  283. this.wtdt = '到底了~';
  284. }
  285. }
  286. if (this.pageNum == 1) {
  287. this.list = res.rows;
  288. } else {
  289. this.list = this.list.concat(res.rows)
  290. }
  291. }else{
  292. this.$toast(res.msg)
  293. }
  294. })
  295. },
  296. }
  297. }
  298. </script>
  299. <style>
  300. page{background: #F3F3F0;}
  301. </style>
  302. <style lang="scss" scoped>
  303. .sbox{
  304. display: flex;flex-direction: column;height: 100vh;overflow: hidden;
  305. .swipe{flex: 1;padding: 24rpx 12rpx;box-sizing: border-box;overflow: auto;}
  306. .hbtns{height: 124rpx;background: #FFFFFF;box-shadow: 0px 2rpx 6rpx 0px #BEBEBE;display: flex;align-items: center;padding:24rpx;box-sizing: border-box;
  307. .btnl{flex:0 0 auto;text-align: center;padding: 0 12rpx;margin-right: 24rpx;
  308. .tit{font-weight: bold;font-size: 32rpx;color: #0156FE;margin-bottom: 4rpx;
  309. text{font-size: 22rpx;}
  310. }
  311. .txt{font-weight: bold;font-size: 22rpx;color: #666666;}
  312. }
  313. .btnr{flex:1;height: 78rpx;background: #E2ECFF;border-radius: 20rpx;border: 2rpx solid #AEC9FF;display: flex;align-items: center;justify-content: center;font-weight: bold;
  314. font-size: 26rpx;color: #699BFF;
  315. image{width: 26rpx;height: 24rpx;margin-right: 14rpx;flex: 0 0 auto;}
  316. }
  317. }
  318. }
  319. // .navbox{position: fixed;left: 0;right: 0;top: 0;z-index: 4;background: #0156FE;
  320. .navbox{background: #0156FE;flex:0 0 auto;position: relative;
  321. .topl{padding-left: 6rpx;
  322. image{width: 32rpx;height: 32rpx;margin-right: 18rpx;}
  323. view{font-weight: 400;font-size: 32rpx;color: #FFFFFF;}
  324. }
  325. .htop{padding: 22rpx 26rpx;border-bottom: 2rpx solid #3478FF;
  326. .moreimg{
  327. image{width: 52rpx;height: 52rpx;}
  328. .cir{width: 10rpx;height: 10rpx;background: #D32C26;border-radius: 50%;position: absolute;right: 4rpx;top: 4rpx;}
  329. }
  330. }
  331. .tablists{padding: 0 18rpx;
  332. .tablist{font-size: 30rpx;color: #9BBDFF;display: flex;align-items: center;padding-left:18rpx;
  333. .tabtit{position: relative;height: 98rpx;display: flex;align-items: center;}
  334. &.act{font-weight: bold;color: #FFFFFF;
  335. .tabtit{
  336. &::after{content: '';position: absolute;left: 0;right: 0;bottom: 0;height: 10rpx;background: #FFFFFF;}
  337. }
  338. }
  339. .tips{position: relative;margin-left: 10rpx;
  340. image{width: 14rpx;height: 14rpx;}
  341. .cir{width: 10rpx;height: 10rpx;background: #D32C26;border-radius: 50%;position: absolute;right: -10rpx;top: 2rpx;}
  342. }
  343. }
  344. }
  345. .mjnpx{background-color: #FFFFFF;padding:0 26rpx;height: 84rpx;overflow: hidden;
  346. .resetimg{width: 26rpx;height: 26rpx;margin-right: 20rpx;flex: 0 0 auto;}
  347. .chekt{
  348. view{font-weight: 500;font-size: 24rpx;color: #272727;flex: 1;}
  349. image{width: 14rpx;height: 10rpx;margin-left: 18rpx;flex: 0 0 auto;}
  350. }
  351. .mjlist{overflow: auto;display: flex;align-items: center;padding-left: 14rpx;
  352. view{height: 46rpx;border-radius: 22rpx;border: 2rpx solid #DADADA;flex: 0 0 auto;
  353. display: flex;align-items: center;justify-content: center;font-weight: bold;font-size: 24rpx;color: #666666;margin-left: 24rpx;box-sizing: border-box;padding: 0 26rpx;
  354. &.act{border: 2rpx solid #0156FE;background: #E2ECFF;color: #0156FE;}
  355. }
  356. }
  357. }
  358. .sxtps{background:rgba(187, 255, 187, 0.8);font-weight: bold;font-size: 24rpx;color: #28C529;min-height: 80rpx;display: flex;align-items: center;justify-content: center;padding: 8rpx;box-sizing: border-box;position: absolute;bottom: 0;line-height: 40rpx;left: 0;right: 0;transform: translateY(100%);z-index: 1;}
  359. }
  360. .sbox /deep/ .uni-drawer__content{width: 560rpx !important;}
  361. // 左侧
  362. .mine{height: 100vh;display: flex;flex-direction: column;overflow: auto;padding: 0 24rpx 120rpx;
  363. .mtop{font-weight: bold;font-size: 30rpx;color: #272727;margin-bottom: 42rpx;
  364. .head{width: 56rpx;height: 56rpx;margin-right: 32rpx;border-radius: 50%;}
  365. .rzimg{width: 64rpx;height: 22rpx;margin-left: 18rpx;}
  366. }
  367. .counbox{display: flex;align-items: center;flex-wrap: wrap;justify-content: space-between;
  368. .couns{width: 244rpx;height: 130rpx;position: relative;padding: 24rpx 20rpx;box-sizing: border-box;border-radius: 10rpx;flex:0 0 auto;margin-bottom: 24rpx;
  369. &.bga{background: #EBF2FD;}
  370. &.bgb{background: #E1F9EE;}
  371. &.bgc{background:#FFEDBD;}
  372. &.bgd{background:#FFEDEC;}
  373. .tit{font-weight: 500;font-size: 26rpx;color: #272727;z-index: 1;margin-bottom: 6rpx;}
  374. .txt{font-size:40rpx;color: #272727;z-index: 1;}
  375. image{position: absolute;}
  376. .imga{width: 104rpx;height: 88rpx;right:8rpx;bottom: -4rpx;}
  377. .imgb{width: 106rpx;height: 68rpx;right:10rpx;bottom: 6rpx;}
  378. .imgc{width: 56rpx;height: 56rpx;right:22rpx;bottom: 24rpx;}
  379. .imgd{width: 58rpx;height: 56rpx;right:20rpx;bottom: 24rpx;}
  380. }
  381. }
  382. .mtlists{display: flex;flex-direction: column;margin-bottom: 40rpx;}
  383. .mtlist{padding: 10rpx 0;flex: 1;max-height:112rpx;box-sizing: border-box;min-height: 68rpx;
  384. .imgs{width: 26rpx;height: 26rpx;display: flex;align-items: center;justify-content: center;margin-right: 24rpx;flex: 0 0 auto;
  385. .imga{width: 26rpx;height: 22rpx;}
  386. .imgb{width: 26rpx;height: 26rpx;}
  387. .imgc{width: 24rpx;height: 26rpx;}
  388. .imgd{width: 24rpx;height: 24rpx;}
  389. }
  390. .mltit{font-weight: bold;font-size: 26rpx;color: #272727;flex: 1;}
  391. .mltxt{font-weight: 500;font-size: 26rpx;color: #AAAAAA;flex: 0 0 auto;}
  392. }
  393. .loginbtns{margin:0 12rpx;height: 68rpx;font-weight: 500;flex: 0 0 auto;
  394. font-size: 26rpx;display: flex;align-items: center;justify-content: center;
  395. color: #666666;
  396. border-radius: 34rpx;border: 2rpx solid #CDCDCD;}
  397. }
  398. </style>