workbench.vue 7.1 KB

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