workbench.vue 7.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271
  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. <view><u--image src="/static/index/icon1.png" width="40px" height="40px"></u--image></view>
  48. <text class="grid_text">待办</text>
  49. </view>
  50. <view @tap="toList(4)" class="circle-button-box">
  51. <view><u--image src="/static/index/icon5.png" width="40px" height="40px"></u--image></view>
  52. <text class="grid_text">已办</text>
  53. </view>
  54. <view @tap="toList(3)" class="circle-button-box">
  55. <view><u--image src="/static/index/icon2.png" width="40px" height="40px"></u--image></view>
  56. <text class="grid_text">已归档</text>
  57. </view>
  58. </view>
  59. <uni-section titleFontSize="20px" class="mb-10" title="用章审批" type="line"></uni-section>
  60. <view class="cu-list grid col-4 no-border">
  61. <view @tap="add(2)" class="circle-button-box">
  62. <view><u--image src="/static/index/icon4.png" width="40px" height="40px"></u--image></view>
  63. <text class="grid_text">新增</text>
  64. </view>
  65. <view @tap="toCommonList(1)" class="circle-button-box">
  66. <view><u--image src="/static/index/icon1.png" width="40px" height="40px"></u--image></view>
  67. <text class="grid_text">待办</text>
  68. </view>
  69. <view @tap="toCommonList(4)" class="circle-button-box">
  70. <view><u--image src="/static/index/icon5.png" width="40px" height="40px"></u--image></view>
  71. <text class="grid_text">已办</text>
  72. </view>
  73. <view @tap="toCommonList(3)" class="circle-button-box">
  74. <view><u--image src="/static/index/icon2.png" width="40px" height="40px"></u--image></view>
  75. <text class="grid_text">已归档</text>
  76. </view>
  77. </view>
  78. <uni-section titleFontSize="20px" class="mb-10" title="公文统计" type="line"></uni-section>
  79. <view class="cu-list grid col-4 no-border">
  80. <view @tap="toApplyList" class="circle-button-box">
  81. <view><u--image src="/static/index/icon6.png" width="40px" height="40px"></u--image></view>
  82. <text class="grid_text">公文统计</text>
  83. </view>
  84. </view>
  85. <u-gap height="80" bgColor="#fff"></u-gap>
  86. </scroll-view>
  87. </view>
  88. </template>
  89. <script>
  90. import moment from 'moment'
  91. import {
  92. mapState,
  93. mapMutations,
  94. mapActions
  95. } from 'vuex'
  96. import actCategoryService from "@/api/flowable/actCategoryService"
  97. import processService from "@/api/flowable/processService"
  98. import taskService from "@/api/flowable/taskService"
  99. import gwCirculationCard2Service from '@/api/circulation/gwCirculationCard2.js'
  100. export default {
  101. data() {
  102. return {
  103. cardCur: 0,
  104. dataList: [],
  105. categoryList: [],
  106. processMap: new Map(),
  107. swiperList: [{
  108. id: 0,
  109. type: 'image',
  110. url: '/static/swiper/1.svg'
  111. }, {
  112. id: 1,
  113. type: 'image',
  114. url: '/static/swiper/2.svg'
  115. }, {
  116. id: 2,
  117. type: 'image',
  118. url: '/static/swiper/3.svg'
  119. }, {
  120. id: 3,
  121. type: 'image',
  122. url: '/static/swiper/4.svg'
  123. }, {
  124. id: 4,
  125. type: 'image',
  126. url: '/static/swiper/5.svg'
  127. }, {
  128. id: 5,
  129. type: 'image',
  130. url: '/static/swiper/6.svg'
  131. }, {
  132. id: 6,
  133. type: 'image',
  134. url: '/static/swiper/7.svg'
  135. }],
  136. dotStyle: false,
  137. towerStart: 0,
  138. direction: '',
  139. statistics: {},
  140. };
  141. },
  142. computed: mapState({
  143. username: (state) => state.user.username
  144. }),
  145. async mounted() {
  146. gwCirculationCard2Service.getStatistics().then(data => {
  147. this.statistics = data
  148. })
  149. },
  150. created() {
  151. if (!this.username) {
  152. this.refreshUserInfo()
  153. }
  154. },
  155. methods: {
  156. ...mapActions(['refreshUserInfo']),
  157. toApplyList(mail) {
  158. uni.navigateTo({
  159. url: '/pages/fileTransmit/statistics'
  160. })
  161. },
  162. add(mail) {
  163. if (mail == 1) {
  164. uni.navigateTo({
  165. url: '/pages/fileTransmit/addFileTransmit'
  166. })
  167. } else {
  168. uni.navigateTo({
  169. url: '/pages/commonseal/addCommon'
  170. })
  171. }
  172. },
  173. toPerson(mail) {
  174. uni.navigateTo({
  175. url: "/pages/index/index?type='addressbook'"
  176. })
  177. },
  178. toList(type) {
  179. uni.navigateTo({
  180. url: '/pages/fileTransmit/fileTransmitList?type=' + type
  181. })
  182. },
  183. toCommonList(type) {
  184. uni.navigateTo({
  185. url: '/pages/commonseal/commonList?type=' + type
  186. })
  187. },
  188. }
  189. }
  190. </script>
  191. <style>
  192. .workbench_main .screen-swiper {
  193. min-height: 60px !important;
  194. height: 60px;
  195. }
  196. .page .uni-section {
  197. border-bottom: 1px solid #ededed;
  198. padding-left: 10px;
  199. }
  200. .cu-list.card-menu {
  201. overflow: hidden;
  202. margin-right: 5px;
  203. margin-left: 5px;
  204. border-radius: 7px;
  205. }
  206. .cu-list.card-menu.margin-top-20 {
  207. margin-top: -20px;
  208. }
  209. .cu-list.menu>.cu-item .content>uni-view:first-child {
  210. display: -webkit-box;
  211. display: -webkit-flex;
  212. display: flex;
  213. -webkit-box-align: center;
  214. /* -webkit-align-items: center; */
  215. /* align-items: center; */
  216. display: inline-block;
  217. margin-right: 5px;
  218. width: 1.6em;
  219. text-align: center;
  220. }
  221. .text_font_size {
  222. font-size: 28px !important;
  223. /* margin-bottom: 5px; */
  224. }
  225. .grid_text {
  226. font-size: 16px;
  227. margin-top: 5px;
  228. }
  229. .circle-button {
  230. width: 44px;
  231. height: 44px;
  232. border-radius: 18px;
  233. padding-top: 4px;
  234. }
  235. .circle-button-box {
  236. width: 25%;
  237. margin-top: 10px;
  238. display: -webkit-box;
  239. display: -webkit-flex;
  240. display: flex;
  241. -webkit-box-orient: vertical;
  242. -webkit-box-direction: normal;
  243. -webkit-flex-direction: column;
  244. flex-direction: column;
  245. -webkit-box-align: center;
  246. -webkit-align-items: center;
  247. align-items: center;
  248. -webkit-box-pack: center;
  249. -webkit-justify-content: center;
  250. justify-content: center;
  251. box-sizing: border-box;
  252. }
  253. .font-b {
  254. vertical-align: middle;
  255. font-size: 18px;
  256. font-weight: 500;
  257. color: #3a3a3a;
  258. }
  259. </style>