workbench.vue 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274
  1. <template>
  2. <view class="workbench_main">
  3. <!-- #ifdef APP-PLUS -->
  4. <cu-custom bgColor="bg-blue">
  5. <block slot="content">工作台</block>
  6. </cu-custom>
  7. <!-- #endif -->
  8. <swiper class="screen-swiper square-dot bg-blue" :indicator-dots="true" :circular="true" :autoplay="true"
  9. interval="2000" duration="500">
  10. <swiper-item v-for="(item,index) in swiperList" :key="index">
  11. <image :src="item.url" mode="aspectFit" v-if="item.type=='image'"></image>
  12. <video :src="item.url" autoplay loop muted :show-play-btn="false" :controls="false" objectFit="cover"
  13. v-if="item.type=='video'"></video>
  14. </swiper-item>
  15. </swiper>
  16. <view class="cu-list grid col-4 no-border fixed">
  17. <view class="circle-button-box">
  18. <view class="text-primary text_font_size">{{statistics.allcount?statistics.allcount:0}}</view>
  19. <text class="grid_text">总数</text>
  20. </view>
  21. <view class="circle-button-box">
  22. <view class="text-danger text_font_size">{{statistics.db?statistics.db:0}}</view>
  23. <text class="grid_text">待办</text>
  24. </view>
  25. <view class="circle-button-box">
  26. <view class="text-success text_font_size">{{statistics.yb?statistics.yb:0}}</view>
  27. <text class="grid_text">已办</text>
  28. </view>
  29. <view class="circle-button-box">
  30. <view class="text-warning text_font_size">{{statistics.gdcount?statistics.gdcount:0}}</view>
  31. <text class="grid_text">归档</text>
  32. </view>
  33. </view>
  34. <scroll-view scroll-y class="page">
  35. <view class="cu-bar bg-white solid-bottom margin-top">
  36. <view class="action">
  37. <text class="text-orange font-b" style="font-size: 24px;">快捷入口</text>
  38. </view>
  39. </view>
  40. <uni-section titleFontSize="20px" class="mb-10" title="文件传阅" type="line"></uni-section>
  41. <view class="cu-list grid col-4 no-border">
  42. <view @tap="add(1)" class="circle-button-box">
  43. <view><u--image src="/static/index/icon4.png" width="40px" height="40px"></u--image></view>
  44. <text class="grid_text">新增</text>
  45. </view>
  46. <view @tap="toList(1)" class="circle-button-box">
  47. <u-badge type="warning" max="99" :offset="[0,10]" absolute :value="statistics.gw_db?statistics.gw_db:0" showZero="true"></u-badge>
  48. <view><u--image src="/static/index/icon1.png" width="40px" height="40px"></u--image></view>
  49. <text class="grid_text">待办</text>
  50. </view>
  51. <view @tap="toList(4)" class="circle-button-box">
  52. <view><u--image src="/static/index/icon5.png" width="40px" height="40px"></u--image></view>
  53. <text class="grid_text">已办</text>
  54. </view>
  55. <view @tap="toList(3)" class="circle-button-box">
  56. <view><u--image src="/static/index/icon2.png" width="40px" height="40px"></u--image></view>
  57. <text class="grid_text">已归档</text>
  58. </view>
  59. </view>
  60. <uni-section titleFontSize="20px" class="mb-10" title="用章审批" type="line"></uni-section>
  61. <view class="cu-list grid col-4 no-border">
  62. <view @tap="add(2)" class="circle-button-box">
  63. <view><u--image src="/static/index/icon4.png" width="40px" height="40px"></u--image></view>
  64. <text class="grid_text">新增</text>
  65. </view>
  66. <view @tap="toCommonList(1)" class="circle-button-box">
  67. <u-badge type="warning" max="99" :offset="[0,10]" absolute :value="statistics.yz_db?statistics.yz_db:0" showZero="true"></u-badge>
  68. <view><u--image src="/static/index/icon1.png" width="40px" height="40px"></u--image></view>
  69. <text class="grid_text">待办</text>
  70. </view>
  71. <view @tap="toCommonList(4)" class="circle-button-box">
  72. <view><u--image src="/static/index/icon5.png" width="40px" height="40px"></u--image></view>
  73. <text class="grid_text">已办</text>
  74. </view>
  75. <view @tap="toCommonList(3)" class="circle-button-box">
  76. <view><u--image src="/static/index/icon2.png" width="40px" height="40px"></u--image></view>
  77. <text class="grid_text">已归档</text>
  78. </view>
  79. </view>
  80. <uni-section titleFontSize="20px" class="mb-10" title="公文统计" type="line"></uni-section>
  81. <view class="cu-list grid col-4 no-border">
  82. <view @tap="toApplyList" class="circle-button-box">
  83. <view><u--image src="/static/index/icon6.png" width="40px" height="40px"></u--image></view>
  84. <text class="grid_text">公文统计</text>
  85. </view>
  86. </view>
  87. <u-gap height="80" bgColor="#fff"></u-gap>
  88. </scroll-view>
  89. </view>
  90. </template>
  91. <script>
  92. import moment from 'moment'
  93. import {
  94. mapState,
  95. mapMutations,
  96. mapActions
  97. } from 'vuex'
  98. import actCategoryService from "@/api/flowable/actCategoryService"
  99. import processService from "@/api/flowable/processService"
  100. import taskService from "@/api/flowable/taskService"
  101. import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
  102. export default {
  103. data() {
  104. return {
  105. cardCur: 0,
  106. dataList: [],
  107. categoryList: [],
  108. processMap: new Map(),
  109. swiperList: [{
  110. id: 0,
  111. type: 'image',
  112. url: '/static/swiper/1.svg'
  113. }, {
  114. id: 1,
  115. type: 'image',
  116. url: '/static/swiper/2.svg'
  117. }, {
  118. id: 2,
  119. type: 'image',
  120. url: '/static/swiper/3.svg'
  121. }, {
  122. id: 3,
  123. type: 'image',
  124. url: '/static/swiper/4.svg'
  125. }, {
  126. id: 4,
  127. type: 'image',
  128. url: '/static/swiper/5.svg'
  129. }, {
  130. id: 5,
  131. type: 'image',
  132. url: '/static/swiper/6.svg'
  133. }, {
  134. id: 6,
  135. type: 'image',
  136. url: '/static/swiper/7.svg'
  137. }],
  138. dotStyle: false,
  139. towerStart: 0,
  140. direction: '',
  141. statistics: {},
  142. };
  143. },
  144. computed: mapState({
  145. username: (state) => state.user.username
  146. }),
  147. async mounted() {
  148. gwCirculationCard2Service.getStatistics().then(data => {
  149. this.statistics = data
  150. })
  151. },
  152. created() {
  153. if (!this.username) {
  154. this.refreshUserInfo()
  155. }
  156. },
  157. methods: {
  158. ...mapActions(['refreshUserInfo']),
  159. toApplyList(mail) {
  160. uni.navigateTo({
  161. url: '/pages/fileTransmit/statistics'
  162. })
  163. },
  164. add(mail) {
  165. if (mail == 1) {
  166. uni.navigateTo({
  167. url: '/pages/fileTransmit/addFileTransmit'
  168. })
  169. } else {
  170. uni.navigateTo({
  171. url: '/pages/commonseal/addCommon'
  172. })
  173. }
  174. },
  175. toPerson(mail) {
  176. uni.navigateTo({
  177. url: "/pages/index/index?type='addressbook'"
  178. })
  179. },
  180. toList(type) {
  181. uni.navigateTo({
  182. url: '/pages/fileTransmit/fileTransmitList?type=' + type
  183. })
  184. },
  185. toCommonList(type) {
  186. uni.navigateTo({
  187. url: '/pages/commonseal/commonList?type=' + type
  188. })
  189. },
  190. }
  191. }
  192. </script>
  193. <style>
  194. .workbench_main .screen-swiper {
  195. min-height: 60px !important;
  196. height: 60px;
  197. }
  198. .page .uni-section {
  199. border-bottom: 1px solid #ededed;
  200. padding-left: 10px;
  201. }
  202. .cu-list.card-menu {
  203. overflow: hidden;
  204. margin-right: 5px;
  205. margin-left: 5px;
  206. border-radius: 7px;
  207. }
  208. .cu-list.card-menu.margin-top-20 {
  209. margin-top: -20px;
  210. }
  211. .cu-list.menu>.cu-item .content>uni-view:first-child {
  212. display: -webkit-box;
  213. display: -webkit-flex;
  214. display: flex;
  215. -webkit-box-align: center;
  216. /* -webkit-align-items: center; */
  217. /* align-items: center; */
  218. display: inline-block;
  219. margin-right: 5px;
  220. width: 1.6em;
  221. text-align: center;
  222. }
  223. .text_font_size {
  224. font-size: 28px !important;
  225. /* margin-bottom: 5px; */
  226. }
  227. .grid_text {
  228. font-size: 16px;
  229. margin-top: 5px;
  230. }
  231. .circle-button {
  232. width: 44px;
  233. height: 44px;
  234. border-radius: 18px;
  235. padding-top: 4px;
  236. }
  237. .circle-button-box {
  238. position: relative;
  239. width: 25%;
  240. margin-top: 10px;
  241. display: -webkit-box;
  242. display: -webkit-flex;
  243. display: flex;
  244. -webkit-box-orient: vertical;
  245. -webkit-box-direction: normal;
  246. -webkit-flex-direction: column;
  247. flex-direction: column;
  248. -webkit-box-align: center;
  249. -webkit-align-items: center;
  250. align-items: center;
  251. -webkit-box-pack: center;
  252. -webkit-justify-content: center;
  253. justify-content: center;
  254. box-sizing: border-box;
  255. }
  256. .font-b {
  257. vertical-align: middle;
  258. font-size: 18px;
  259. font-weight: 500;
  260. color: #3a3a3a;
  261. }
  262. </style>