staging.vue 5.7 KB

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