workbench.vue 7.0 KB

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