staging.vue 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189
  1. <template>
  2. <view style="background-color: #fff;">
  3. <view style="padding: 20rpx;ba">
  4. <view style="font-size: 38rpx;font-weight: 600;">公文办理</view>
  5. <view style="margin-top: 40rpx;">
  6. <u-grid :border="false" col="4">
  7. <u-grid-item @click="shouwen('收文','003',1)">
  8. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['003']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  9. <image src="/static/swgl.png" mode="widthFix" style="width: 100rpx;"></image>
  10. <text class="grid-text">收文</text>
  11. </u-grid-item>
  12. <u-grid-item @click="shouwen('发文','002',2)">
  13. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['002']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  14. <image src="/static/fwgl.png" mode="widthFix" style="width: 100rpx;"></image>
  15. <text class="grid-text">发文</text>
  16. </u-grid-item>
  17. <u-grid-item @click="shouwen('其他处室收文','012',1)">
  18. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['012']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  19. <image src="/static/swgl.png" mode="widthFix" style="width: 100rpx;"></image>
  20. <text class="grid-text">其他处室收文</text>
  21. </u-grid-item>
  22. <u-grid-item @click="shouwen('其他处室发文','005',2)">
  23. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['005']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  24. <image src="/static/fwgl.png" mode="widthFix" style="width: 100rpx;"></image>
  25. <text class="grid-text">其他处室发文</text>
  26. </u-grid-item>
  27. </u-grid>
  28. </view>
  29. </view>
  30. <u-divider></u-divider>
  31. <view style="padding: 20rpx;">
  32. <view style="font-size: 38rpx;font-weight: bold;">日常办公</view>
  33. <view style="margin-top: 40rpx;">
  34. <u-grid :border="false" col="4">
  35. <u-grid-item @click="dailyWork('中层出差备案','006',1)">
  36. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['006']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  37. <image src="/static/ccba.png" mode="widthFix" style="width: 100rpx;"></image>
  38. <text class="grid-text">出差备案</text>
  39. </u-grid-item>
  40. <u-grid-item @click="dailyWork('外出授课备案','007',2)">
  41. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['007']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  42. <image src="/static/skba.png" mode="widthFix" style="width: 100rpx;"></image>
  43. <text class="grid-text">授课备案</text>
  44. </u-grid-item>
  45. <u-grid-item @click="dailyWork('职工请 ( 休 ) 假申请','009',3)">
  46. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['009']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  47. <image src="/static/qingjia.png" mode="widthFix" style="width: 100rpx;"></image>
  48. <text class="grid-text">请假申请</text>
  49. </u-grid-item>
  50. <u-grid-item @click="shouwen('信息发布审核','010',3)">
  51. <u-badge style="z-index: 999;" :type="type" max="99" :value="numList['010']" :offset="[-10,10]" :showZero="false" absolute ></u-badge>
  52. <image src="/static/xxfbsh.png" mode="widthFix" style="width: 100rpx;"></image>
  53. <text class="grid-text">信息发布审核</text>
  54. </u-grid-item>
  55. </u-grid>
  56. </view>
  57. </view>
  58. <u-divider></u-divider>
  59. <view style="padding: 20rpx;" v-if="kq != 0">
  60. <view style="font-size:38rpx;font-weight: bold;">考勤管理</view>
  61. <view style="margin-top: 40rpx;">
  62. <u-grid :border="false" col="4">
  63. <u-grid-item @click="kaoqin">
  64. <image src="/static/kqgl.png" mode="widthFix" style="width: 100rpx;"></image>
  65. <text class="grid-text">考勤管理</text>
  66. </u-grid-item>
  67. </u-grid>
  68. </view>
  69. </view>
  70. </view>
  71. </template>
  72. <script>
  73. export default {
  74. data() {
  75. return {
  76. numList:{},
  77. type:"error",
  78. value:100,
  79. num:0,
  80. kq:false
  81. }
  82. },
  83. onShow(){
  84. this.kq = uni.getStorageSync('type')
  85. this.getdbNum()
  86. this.getUnreadEmail()
  87. },
  88. watch:{
  89. 'num':{
  90. handler:function(v,o){
  91. if(this.num>0){
  92. this.$forceUpdate()
  93. }
  94. },
  95. deep:true
  96. },
  97. },
  98. methods: {
  99. //收发文
  100. shouwen(v,i,t){
  101. uni.navigateTo({
  102. url:`/pages/shouwen/shouwen?title=${v}&fkFlow=${i}&type=${t}`
  103. })
  104. },
  105. //考勤
  106. kaoqin(){
  107. uni.navigateTo({
  108. url:"/pages/kaoqin/kaoqin"
  109. })
  110. },
  111. //日常办公
  112. dailyWork(v,i,t){
  113. uni.navigateTo({
  114. url:`/pages/dailyWork/dailyWork?title=${v}&fkFlow=${i}&type=${t}`
  115. })
  116. },
  117. //查询待办数量
  118. getdbNum(){
  119. uni.$u.http.get('/jflow/restful/DB_Todolist_Num?token='+uni.getStorageSync('jtoken')).then(res=>{
  120. if(res.code==200){
  121. this.num = 0
  122. this.numList = {}
  123. if (res.list.length > 0) {
  124. let qwe = 0
  125. for(let i in res.list){
  126. if(res.list[i].FK_Flow != '008'){
  127. qwe = res.list[i].Total + qwe
  128. this.numList[res.list[i].FK_Flow]=res.list[i].Total
  129. this.num++
  130. }
  131. if(i == res.list.length-1){
  132. this.$forceUpdate()
  133. uni.setTabBarBadge({ //显示数字
  134. index: 1, //tabbar下标
  135. text: '' + qwe + '' //数字
  136. })
  137. }
  138. }
  139. } else {
  140. this.$forceUpdate()
  141. uni.removeTabBarBadge({ //显示数字
  142. index: 1, //tabbar下标
  143. })
  144. }
  145. }
  146. })
  147. },
  148. //获取未读邮件
  149. getUnreadEmail() {
  150. uni.$u.http.get('/oa/mail/count/unread').then(res => {
  151. if (res == 0) {
  152. uni.removeTabBarBadge({ //显示数字
  153. index: 2, //tabbar下标
  154. })
  155. } else {
  156. uni.setTabBarBadge({ //显示数字
  157. index: 2, //tabbar下标
  158. text: '' + res + '' //数字
  159. })
  160. }
  161. })
  162. },
  163. }
  164. }
  165. </script>
  166. <style lang="scss" scoped>
  167. .grid-text {
  168. font-size: 28rpx;
  169. color: #606266;
  170. padding: 10rpx 0 20rpx 0rpx;
  171. /* #ifndef APP-PLUS */
  172. box-sizing: border-box;
  173. /* #endif */
  174. }
  175. ::v-deep .u-badge{
  176. width: 36rpx;
  177. height: 36rpx;
  178. display: flex;
  179. font-size: 28rpx;
  180. align-items: center;
  181. justify-content: center;
  182. // font-weight: bold;
  183. }
  184. </style>