the_oaOffice.vue 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635
  1. <template>
  2. <view>
  3. <view class="wrap">
  4. <view class="cu-list grid" :class="['col-' + gridCol,gridBorder?'':'no-border']">
  5. <view class="cu-item" v-for="(item,index) in gridList" :key="index" @click="gridClick(item, index)"
  6. v-if="index<gridCol*2 && item.show">
  7. <view :class="['cuIcon-' + item.cuIcon,'text-' + item.color]">
  8. <image :src="item.src" class="sign"></image>
  9. </view>
  10. <text>{{item.name}}</text>
  11. </view>
  12. </view>
  13. </view>
  14. <u-modal v-model="isShowAlert" :title-style="{fontSize: '18px',fontWeight:'500'}"
  15. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='温馨提示'
  16. :showCancelButton='false' :content="content" @confirm="goOpenService" @cancel="cancelClick"></u-modal>
  17. <u-modal v-model="isShowAlert1" :title-style="{fontSize: '18px',fontWeight:'500'}"
  18. :content-style="{fontSize: '14px',fontWeight:'400'}" confirm-color='#22C572' confirm-text='确定' title='提示'
  19. :showCancelButton='false' :content="content1" @confirm="alertBtn1" @cancel="cancelClick1"></u-modal>
  20. </view>
  21. </template>
  22. <script>
  23. export default {
  24. data() {
  25. return {
  26. isShowAlert1: false,
  27. content1: '当前登入信息验证失败,是否重新登录?',
  28. isShowAlert: false,
  29. content: '您确定要退出吗?',
  30. a: false,
  31. inputShow: false,
  32. modalName: '',
  33. mycarStyle: '',
  34. feild: undefined,
  35. inputContent: '',
  36. coverTransform: 'translateY(0px)',
  37. coverTransition: '0s',
  38. moving: false,
  39. footprintList: [],
  40. isVip: false,
  41. userInfoTmp: [],
  42. inputStatus: 'none',
  43. carInfo: [],
  44. gridCol: 4,
  45. gridBorder: false,
  46. headUrl: "../../static/img/myimg/YongHu@3x.png",
  47. userphone: "",
  48. username: "请更改昵称",
  49. gridList: [{
  50. num: 0,
  51. name: '打卡',
  52. // icon: 'cuIcon-edit',
  53. src: '../../static/img/oa_office/clock.png',
  54. tips: 0,
  55. url: `/pages/clock/the_clock`,
  56. show: true
  57. },
  58. {
  59. num: 1,
  60. name: '请假',
  61. // icon: 'cuIcon-edit',
  62. src: '../../static/img/oa_office/leave.png',
  63. tips: 0,
  64. url: `/pages/leave/the_leave`,
  65. show: true
  66. },
  67. {
  68. num: 2,
  69. name: '加油申请',
  70. // icon: 'cuIcon-edit',
  71. src: '../../static/img/oa_office/fulling.png',
  72. tips: 0,
  73. url: `/pages/fuelfilling/the_fuel_filling`,
  74. show: true
  75. },
  76. // {
  77. // num: 3,
  78. // name: '短途记录',
  79. // // icon: 'cuIcon-edit',
  80. // src: '../../static/img/oa_office/shortfull.png',
  81. // tips: 0,
  82. // url: `/pages/shortDistance/short_distance_record`,
  83. // show: true
  84. // },
  85. {
  86. num: 3,
  87. name: '报销',
  88. // icon: 'cuIcon-edit',
  89. src: '../../static/img/oa_office/reimbursement.png',
  90. tips: 0,
  91. url: `/pages/reimbursement/the_reimbursement`,
  92. show: true
  93. },
  94. {
  95. num: 4,
  96. name: '申请审批',
  97. // icon: 'cuIcon-edit',
  98. src: '../../static/img/oa_office/shneqingshenpi.png',
  99. tips: 0,
  100. url: `/pages/universalityAudit/list`,
  101. show: true
  102. }
  103. ],
  104. }
  105. },
  106. onShow() {
  107. uni.hideKeyboard()
  108. // uni.showTabBar()
  109. // this.$api.doRequest('get', '/commonUser/api/checkSession').then(res => {
  110. // console.log("checkSession", res)
  111. // if (res.data.data == "INVALID") {
  112. // this.isShowAlert1 = true;
  113. // }
  114. // })
  115. console.log("hasLogin", this.hasLogin)
  116. if (this.userInfo) {
  117. if (!this.userInfo.avatarUrl) {
  118. this.headUrl = "../../static/img/myimg/YongHu@3x.png"
  119. } else {
  120. this.headUrl = this.userInfo.avatarUrl
  121. }
  122. this.username = this.userInfo.userName
  123. this.userphone = this.userInfo.phone
  124. var that = this
  125. this.$api.doRequest('get', '/newNoticeTask/query/noticeTasks').then(res => {
  126. console.log("noticeNumber", res)
  127. if (res.data.data) {
  128. let name = 'myTip';
  129. let value = res.data.data.total;
  130. that.$store.commit('$uStore', {
  131. name,
  132. value
  133. });
  134. if (value != 0 && value) {
  135. uni.setTabBarBadge({
  136. index: 4,
  137. text: value + ""
  138. })
  139. }
  140. name = 'taskTip';
  141. value = res.data.data.total;
  142. that.$store.commit('$uStore', {
  143. name,
  144. value
  145. });
  146. }
  147. })
  148. } else {
  149. this.headUrl = "../../static/img/myimg/YongHu@3x.png"
  150. this.username = "立即登录"
  151. }
  152. console.log("this.userInfo", this.userInfo)
  153. },
  154. methods: {
  155. alertBtn1() {
  156. uni.navigateTo({
  157. url: '/pages/public/login'
  158. })
  159. },
  160. cancelClick() {
  161. this.isShowAlert = false
  162. },
  163. cancelClick1() {
  164. this.isShowAlert = false
  165. },
  166. goOpenService() {
  167. uni.hideTabBarRedDot({
  168. index: 3
  169. })
  170. this.$store.commit('logout')
  171. this.$api.logout()
  172. uni.navigateTo({
  173. url: `/pages/public/login`
  174. })
  175. },
  176. gridClick(item, index) {
  177. var that = this
  178. if (!this.hasLogin) {
  179. uni.showModal({
  180. title: '提示',
  181. content: '您尚未登录,是否立即登录?',
  182. showCancel: true,
  183. confirmText: '登录',
  184. success: (e) => {
  185. if (e.confirm) {
  186. uni.navigateTo({
  187. url: '/pages/public/login'
  188. })
  189. }
  190. },
  191. fail: () => {},
  192. complete: () => {}
  193. })
  194. } else {
  195. if (item.url) {
  196. uni.navigateTo({
  197. url: item.url
  198. })
  199. }
  200. }
  201. },
  202. }
  203. }
  204. </script>
  205. <style lang='scss' scoped>
  206. page {
  207. background: #F5F6FA;
  208. }
  209. .container {
  210. padding-top: 85px;
  211. padding-top: 35px;
  212. background-color: #F5F6FA;
  213. position: relative;
  214. width: 100vw;
  215. height: 100vh;
  216. overflow: hidden;
  217. background: url('~@/static/img/login/bg_slices/bg@3x.png');
  218. background-size: 100% 100%;
  219. margin: 0 auto;
  220. }
  221. .cu-tag.badge {
  222. right: 26rpx;
  223. }
  224. .path {
  225. color: #007aff;
  226. display: inline-block;
  227. text-align: center;
  228. }
  229. .icon {
  230. margin-right: 10rpx;
  231. }
  232. .portrait-box {
  233. margin-top: 20rpx;
  234. }
  235. .qr-wrap {
  236. margin-top: 20upx;
  237. color: #fff;
  238. font-size: 32rpx;
  239. }
  240. .cu-list {
  241. /* height: 483rpx;
  242. overflow-y: scroll; */
  243. background: transparent;
  244. }
  245. .cu-list.grid.no-border {
  246. padding: 0;
  247. }
  248. .badge_user {
  249. color: #fff;
  250. background-color: #dc3545;
  251. display: inline-block;
  252. padding: .25em .4em;
  253. font-size: 75%;
  254. font-weight: 700;
  255. line-height: 1;
  256. text-align: center;
  257. white-space: nowrap;
  258. vertical-align: top;
  259. border-radius: 50%;
  260. transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out;
  261. }
  262. @keyframes move_wave {
  263. 0% {
  264. transform: translateX(0) translateZ(0) scaleY(1)
  265. }
  266. 50% {
  267. transform: translateX(-25%) translateZ(0) scaleY(0.55)
  268. }
  269. 100% {
  270. transform: translateX(-50%) translateZ(0) scaleY(1)
  271. }
  272. }
  273. .bg {
  274. position: relative;
  275. height: 300rpx;
  276. /* background: linear-gradient(to bottom, #56ccf2, #2f80ed); */
  277. /*background: linear-gradient(to bottom, #0be9fe, #4bb0fe); */
  278. background: linear-gradient(to bottom, #d5f8ff, #56ccf2);
  279. }
  280. .bg_ware {
  281. position: absolute;
  282. left: 0;
  283. bottom: -2rpx;
  284. width: 100%;
  285. mix-blend-mode: screen;
  286. height: 224rpx;
  287. }
  288. %flex-center {
  289. display: flex;
  290. flex-direction: column;
  291. justify-content: center;
  292. align-items: center;
  293. }
  294. %section {
  295. display: flex;
  296. justify-content: space-around;
  297. align-content: center;
  298. background: #fff;
  299. border-radius: 10upx;
  300. }
  301. .grid-item-box {
  302. flex: 1;
  303. /* position: relative;
  304. */
  305. /* #ifndef APP-NVUE */
  306. display: flex;
  307. /* #endif */
  308. flex-direction: column;
  309. align-items: center;
  310. justify-content: center;
  311. padding: 15px 0;
  312. }
  313. .image {
  314. width: 80rpx;
  315. height: 80rpx;
  316. }
  317. .text {
  318. font-size: 26rpx;
  319. margin-top: 10rpx;
  320. }
  321. .user-section {
  322. height: 520upx;
  323. padding: 100upx 30upx 0;
  324. position: relative;
  325. .bg {
  326. position: absolute;
  327. left: 0;
  328. top: 0;
  329. width: 100%;
  330. height: 100%;
  331. filter: blur(1px);
  332. box-shadow: 0px 1px 8px #ccc;
  333. /* background:linear-gradient(#0eb0c9,#126bae); */
  334. /* opacity: .7; */
  335. }
  336. }
  337. .user-info-box {
  338. height: 180upx;
  339. /* display:flex; */
  340. /* align-items:center; */
  341. text-align: center;
  342. position: relative;
  343. z-index: 1;
  344. .portrait {
  345. width: 130upx;
  346. height: 130upx;
  347. border: 5upx solid #fff;
  348. border-radius: 50%;
  349. }
  350. .username {
  351. font-size: $font-lg + 3upx;
  352. color: #fff;
  353. margin-top: 20upx;
  354. }
  355. }
  356. .vip-card-box {
  357. display: flex;
  358. flex-direction: column;
  359. color: #f7d680;
  360. height: 240upx;
  361. background: linear-gradient(left, rgba(0, 0, 0, .7), rgba(0, 0, 0, .8));
  362. border-radius: 16upx 16upx 0 0;
  363. overflow: hidden;
  364. position: relative;
  365. padding: 20upx 24upx;
  366. .card-bg {
  367. position: absolute;
  368. top: 20upx;
  369. right: 0;
  370. width: 380upx;
  371. height: 260upx;
  372. }
  373. .b-btn {
  374. position: absolute;
  375. right: 20upx;
  376. top: 16upx;
  377. width: 132upx;
  378. height: 40upx;
  379. text-align: center;
  380. line-height: 40upx;
  381. font-size: 22upx;
  382. color: #36343c;
  383. border-radius: 20px;
  384. background: linear-gradient(left, #f9e6af, #ffd465);
  385. z-index: 1;
  386. }
  387. .tit {
  388. font-size: $font-base+2upx;
  389. color: #f7d680;
  390. margin-bottom: 28upx;
  391. .yticon {
  392. color: #f6e5a3;
  393. margin-right: 16upx;
  394. }
  395. }
  396. .e-b {
  397. font-size: $font-sm;
  398. color: #d8cba9;
  399. margin-top: 10upx;
  400. }
  401. }
  402. .cover-container {
  403. padding: 1px 10px;
  404. padding-bottom: 200upx;
  405. /* background-color: #F5F6FA; */
  406. /* border-radius: 20px; */
  407. margin-top: 60upx;
  408. .arc {
  409. position: absolute;
  410. left: 0;
  411. top: -34upx;
  412. width: 100%;
  413. height: 36upx;
  414. }
  415. }
  416. .tj-sction {
  417. @extend %section;
  418. .tj-item {
  419. @extend %flex-center;
  420. flex-direction: column;
  421. height: 140upx;
  422. font-size: $font-sm;
  423. color: #75787d;
  424. }
  425. .num {
  426. font-size: $font-lg;
  427. color: $font-color-dark;
  428. margin-bottom: 8upx;
  429. }
  430. }
  431. .order-section {
  432. @extend %section;
  433. padding: 28upx 0;
  434. margin-top: 20upx;
  435. .order-item {
  436. @extend %flex-center;
  437. width: 120upx;
  438. height: 120upx;
  439. border-radius: 10upx;
  440. font-size: $font-sm;
  441. color: $font-color-dark;
  442. }
  443. .yticon {
  444. font-size: 48upx;
  445. margin-bottom: 18upx;
  446. color: #fa436a;
  447. }
  448. .icon-shouhoutuikuan {
  449. font-size: 44upx;
  450. }
  451. }
  452. .history-section {
  453. padding: 30upx 0 0;
  454. margin-top: 20upx;
  455. background: #fff;
  456. border-radius: 10upx;
  457. .sec-header {
  458. display: flex;
  459. align-items: center;
  460. font-size: $font-base;
  461. color: $font-color-dark;
  462. line-height: 40upx;
  463. margin-left: 30upx;
  464. .yticon {
  465. font-size: 44upx;
  466. color: #5eba8f;
  467. margin-right: 16upx;
  468. line-height: 40upx;
  469. }
  470. }
  471. .h-list {
  472. white-space: nowrap;
  473. padding: 30upx 30upx 0;
  474. image {
  475. display: inline-block;
  476. width: 160upx;
  477. height: 160upx;
  478. margin-right: 20upx;
  479. border-radius: 10upx;
  480. }
  481. }
  482. }
  483. .grid {
  484. display: flex;
  485. align-items: center;
  486. flex-wrap: wrap;
  487. /* border-top: 2upx solid rgba(172,172,172,.2); */
  488. .grid-item-3 {
  489. box-sizing: border-box;
  490. width: calc(100% / 3);
  491. border-bottom: 2upx solid rgba(172, 172, 172, .2);
  492. border-right: 2upx solid rgba(172, 172, 172, .2);
  493. text-align: center;
  494. padding: 40upx 0;
  495. position: relative;
  496. /* view{
  497. font-size: $font-sm;
  498. margin-top: 16upx;
  499. color: $font-color-dark;
  500. } */
  501. .grid_icon {
  502. font-size: 48upx;
  503. margin-bottom: 18upx;
  504. color: #fa436a;
  505. }
  506. .tip_text {
  507. display: block;
  508. padding: 4upx 8upx;
  509. text-align: center;
  510. border-radius: 36upx;
  511. font-size: 24upx;
  512. background-color: #fa436a;
  513. color: rgba(255, 255, 255, 1);
  514. position: absolute;
  515. right: 6upx;
  516. top: 6upx;
  517. }
  518. }
  519. .grid-item-3:nth-child(3n + 3),
  520. .grid-item-4:nth-child(4n + 4) {
  521. border-right: none;
  522. }
  523. }
  524. .headPortrait {
  525. width: 75px;
  526. height: 75px;
  527. border-radius: 40px;
  528. border: 2px solid #ffffff;
  529. }
  530. .personal {
  531. margin-top: 10px;
  532. margin-left: 20px;
  533. }
  534. .information {
  535. font-size: 15px;
  536. font-weight: 600;
  537. height: 36px;
  538. }
  539. .indexlow {
  540. /* margin-top: 30px; */
  541. border-radius: 10px;
  542. }
  543. .cu-list>.cu-item:after {
  544. border: none;
  545. }
  546. .cu-list>.cu-item{
  547. text-align:center;
  548. }
  549. .sign {
  550. width: 40px;
  551. height: 40px;
  552. top: 4px;
  553. margin: 3px auto;
  554. }
  555. .indexUp {
  556. padding: 0 20px;
  557. align-items: center;
  558. }
  559. .wrap {
  560. background: #fff;
  561. margin: 10px;
  562. border-radius: 10px;
  563. padding: 10px;
  564. .title {
  565. font-size: 16px;
  566. }
  567. }
  568. .content2 {
  569. display: flex;
  570. justify-content: space-between;
  571. }
  572. </style>