index.vue 5.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254
  1. <template>
  2. <view class="archive">
  3. <u-navbar ref="uNavbar" :border-bottom="false" :back-icon-color="setNav.backColor" :is-back="setNav.isdisPlayNavTitle" :title-size="setNav.size" :title-bold="setNav.bold" :title="setNav.navTitle" :title-color="setNav.color" :background="setNav"></u-navbar>
  4. <view class="topNav" :style="{top: topNav + 'px'}">
  5. <view class="item" @click="tabs(0)">
  6. <view :class="['text', active == 0 ? 'active' : '']">待我审核</view>
  7. </view>
  8. <view class="item" @click="tabs(1)">
  9. <view :class="['text', active == 1 ? 'active' : '']">已审核</view>
  10. </view>
  11. </view>
  12. <view class="contentMain" v-if="list.length">
  13. <view
  14. v-for="(item, index) in list"
  15. :key="item.id"
  16. @click="click(item)"
  17. class="u-swipe-action"
  18. >
  19. <view class="item">
  20. <view class="title">{{item.businessData.message_title}}</view>
  21. <view class="userInfo">
  22. <view class="user">
  23. <view class="name">拟稿人:{{item.businessData.send_user_name}}</view>
  24. <view class="name">发文日期:{{item.businessData.message_time}}</view>
  25. <view class="name" v-if="active == 1">流程结束日期:{{item.businessData.finish_time != null ? item.businessData.finish_time : '未结束'}}</view>
  26. </view>
  27. <view class="status" :class="{active: item.businessData.status != '已通过'}" v-if="active == 1">{{item.businessData.status}}</view>
  28. </view>
  29. </view>
  30. </view>
  31. </view>
  32. <view class="no-data" v-else>暂无数据</view>
  33. </view>
  34. </template>
  35. <script>
  36. export default {
  37. data() {
  38. return {
  39. setNav:{
  40. backgroundColor:'#fff', //背景色
  41. color:'#333', //字体颜色
  42. bold: true,
  43. size: '36',
  44. backColor: '#333',
  45. isdisPlayNavTitle: true, //是否显示返回按钮
  46. navTitle:'审核' //导航标题
  47. },
  48. searchVal: '',
  49. topNav: 0,
  50. active: 0,
  51. list: [],
  52. disabled: false,
  53. btnWidth: 180,
  54. show: false,
  55. options: [
  56. {
  57. text: '归档',
  58. style: {
  59. backgroundColor: '#00B034'
  60. }
  61. }
  62. ],
  63. userInfo: {}
  64. }
  65. },
  66. onLoad() {
  67. this.userInfo = JSON.parse(uni.getStorageSync('userInfo') || '{}');
  68. this.backlog()
  69. setTimeout(() => {
  70. this.topNav = (this.$refs.uNavbar.navbarHeight) + (this.$refs.uNavbar.statusBarHeight)
  71. }, 10)
  72. },
  73. onShow() {
  74. },
  75. methods:{
  76. async backlog () {
  77. let res = await this.$u.post(`jflow/p/cs/task/backlog/list`, {
  78. page: 1,
  79. pageSize: 10,
  80. searchType: '0,1',
  81. "userId": this.userInfo.id,
  82. excuStatus: 0
  83. })
  84. this.list = res.data.records
  85. },
  86. async history () {
  87. let res = await this.$u.post(`jflow/p/cs/task/history/list`, {
  88. page: 1,
  89. pageSize: 10,
  90. searchType: '0,1',
  91. "userId": this.userInfo.id,
  92. excuStatus: 2
  93. })
  94. console.log(res.data.records)
  95. res.data.records.forEach(item => {
  96. console.log(item.businessData.message_title)
  97. })
  98. this.list = res.data.records
  99. },
  100. tabs (active) {
  101. this.active = active
  102. this.list = []
  103. if (active == 0) {
  104. this.backlog()
  105. } else {
  106. this.history()
  107. }
  108. },
  109. click(item) {
  110. // 跳转到审核页面
  111. console.log(item)
  112. let url = '&instanceId=' + item.instanceId + '&nodeId=' + item.nodeId + '&id=' + item.id
  113. let active = this.active
  114. if (this.active == 1) {
  115. if (item.businessData.status != '已通过') {
  116. active = 2
  117. }
  118. }
  119. uni.navigateTo({
  120. url: '/pages/centerView/toExamine/auditDetails?active=' + active + '&businessCode=' + item.businessCode + url
  121. })
  122. // if (this.active === 0) {
  123. // } else {
  124. // // 跳转到审核页面
  125. // }
  126. },
  127. }
  128. }
  129. </script>
  130. <style>
  131. page{
  132. background: #FFFFFF;
  133. }
  134. </style>
  135. <style lang="scss" scoped>
  136. .topNav{
  137. display: flex;
  138. align-items: center;
  139. background: #FFFFFF;
  140. height: 90rpx;
  141. box-shadow: 0px 14rpx 10rpx 0px rgba(218, 218, 218, 0.35);
  142. position: sticky;
  143. width: 100%;
  144. left: 0;
  145. z-index: 9;
  146. .item{
  147. flex: 1;
  148. display: flex;
  149. align-items: center;
  150. justify-content: center;
  151. .text{
  152. font-size: 26rpx;
  153. color: #191919;
  154. font-weight: 600;
  155. }
  156. .active{
  157. position: relative;
  158. &::after{
  159. content: '';
  160. position: absolute;
  161. width: 28rpx;
  162. height: 6rpx;
  163. background: #009FE8;
  164. border-radius: 6rpx;
  165. bottom: -14rpx;
  166. left: 50%;
  167. transform: translate(-50%,0);
  168. }
  169. }
  170. }
  171. }
  172. .searchBox{
  173. padding: 30rpx;
  174. .inputBox{
  175. display: flex;
  176. align-items: center;
  177. .input{
  178. flex: 1;
  179. width: 100%;
  180. margin-right: 30rpx;
  181. background: #EDEDED;
  182. border-radius: 40rpx;
  183. padding: 0 30rpx !important;
  184. }
  185. .btn{
  186. background: #009FE8;
  187. color: #FFFFFF;
  188. font-size: 26rpx;
  189. height: 60rpx;
  190. line-height: 60rpx;
  191. padding: 0 30rpx;
  192. text-align: center;
  193. border-radius: 40rpx;
  194. }
  195. }
  196. }
  197. .timeBox{
  198. padding: 30rpx 0 20rpx 0;
  199. display: flex;
  200. align-items: center;
  201. .r{
  202. width: 30rpx;
  203. height: 33rpx;
  204. }
  205. .text{
  206. font-size: 26rpx;
  207. color: #343434;
  208. margin: 0 14rpx;
  209. }
  210. .d{
  211. width: 20rpx;
  212. height: 20rpx;
  213. }
  214. }
  215. .contentMain{
  216. background: #fff;
  217. .item{
  218. .title{
  219. font-size: 28rpx;
  220. font-weight: 700;
  221. color: #343434;
  222. padding: 30rpx 30rpx 0 30rpx;
  223. white-space: break-word;
  224. word-break:break-all;
  225. }
  226. .userInfo{
  227. display: flex;
  228. align-items: flex-end;
  229. border-bottom: solid 1rpx #DADADA;
  230. padding: 30rpx;
  231. .user{
  232. flex: 1;
  233. color: #666;
  234. font-size: 24rpx;
  235. .name{
  236. margin-bottom: 10rpx;
  237. }
  238. }
  239. .status{
  240. color: #54BA10;
  241. font-size: 26rpx;
  242. margin-bottom: 4rpx;
  243. &.active {
  244. color: #FF3131;
  245. }
  246. }
  247. }
  248. }
  249. }
  250. </style>