index.vue 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <view class="handlecase">
  3. <view class="" v-if="sysType == 2">
  4. <button type="primary" @tap="newlyAddedCases">新增案件</button>
  5. </view>
  6. <List class="caseList" v-for="(item,index) in caseList" :defalutVal='item' :key="index" :sysType='sysType'>
  7. </List>
  8. <view class="emptyBox" v-if="caseList.length == 0">
  9. <luanqing-empty :show="true" textColor="#000"></luanqing-empty>
  10. </view>
  11. </view>
  12. </template>
  13. <script>
  14. import List from './component/list.vue'
  15. import {
  16. respondentList,
  17. caseApplicationTj
  18. } from '../../api/handlecase/index.js'
  19. import LuanqingEmpty from "@/components/luanqing-empty.vue"
  20. export default {
  21. components: {
  22. List,
  23. 'luanqing-empty': LuanqingEmpty,
  24. },
  25. data() {
  26. return {
  27. caseList: [],
  28. pageNum: 1,
  29. pageSize: 10,
  30. sysType: null,
  31. total: null,
  32. }
  33. },
  34. methods: {
  35. getList(parms) {
  36. if (this.sysType == 1) {
  37. respondentList(parms).then(res => {
  38. // this.caseList = res.rows;
  39. if (res.data) {
  40. this.caseList = [...this.caseList, ...res.data];
  41. } else {
  42. this.caseList = []
  43. }
  44. this.caseList.forEach(item => {
  45. switch (item.caseStatus) {
  46. case 0:
  47. item.caseStatusName = '立案申请'
  48. break;
  49. case 1:
  50. item.caseStatusName = '待缴费'
  51. break;
  52. case 2:
  53. item.caseStatusName = '待缴费确认'
  54. break;
  55. case 3:
  56. item.caseStatusName = '待确认是否应诉'
  57. break;
  58. case 4:
  59. item.caseStatusName = '待确认证据'
  60. break;
  61. case 5:
  62. item.caseStatusName = '待确定是否指派仲裁员'
  63. break;
  64. case 6:
  65. item.caseStatusName = '待组庭'
  66. break;
  67. case 7:
  68. item.caseStatusName = '待组庭确定'
  69. break;
  70. case 8:
  71. item.caseStatusName = '待组庭审核'
  72. break;
  73. case 9:
  74. item.caseStatusName = '待选择仲裁方式'
  75. break;
  76. case 10:
  77. item.caseStatusName = '待开庭'
  78. break;
  79. case 11:
  80. item.caseStatusName = '待生成仲裁文书'
  81. break;
  82. case 12:
  83. item.caseStatusName = '待确认仲裁文书'
  84. break;
  85. case 13:
  86. item.caseStatusName = '待仲裁文书用印'
  87. break;
  88. case 14:
  89. item.caseStatusName = '待仲裁文书用印审核'
  90. break;
  91. case 15:
  92. item.caseStatusName = '待仲裁文书送达'
  93. break;
  94. case 16:
  95. item.caseStatusName = '待案件归档'
  96. break;
  97. }
  98. })
  99. })
  100. } else if (this.sysType == 2) {
  101. parms.miniProgressFlag = 1;
  102. caseApplicationTj(parms).then(res => {
  103. this.total = res.total;
  104. if (res.rows) {
  105. this.caseList = [...this.caseList, ...res.rows];
  106. } else {
  107. this.caseList = []
  108. }
  109. })
  110. }
  111. },
  112. // 新增案件
  113. newlyAddedCases() {
  114. uni.navigateTo({
  115. url: `/pages/handlecase/component/newlyAddedCase?title=新增案件`
  116. })
  117. },
  118. // 触底
  119. onReachBottom() {
  120. if (this.caseList.length < 1) {
  121. return
  122. } else if (this.total == this.caseList.length) {
  123. uni.showToast({
  124. title: '没有数据啦',
  125. icon: 'none',
  126. duration: 1000
  127. })
  128. return
  129. } else if (this.caseList.length < 10) {
  130. uni.showToast({
  131. title: '没有数据啦',
  132. icon: 'none',
  133. duration: 1000
  134. })
  135. return
  136. }
  137. this.pageNum++;
  138. let obj = {};
  139. if (this.sysType == 1) {
  140. obj = {
  141. pageNum: this.pageNum,
  142. pageSize: this.pageSize,
  143. caseStatus: 4
  144. }
  145. } else if (this.sysType == 2) {
  146. obj = {
  147. pageNum: this.pageNum,
  148. pageSize: this.pageSize,
  149. }
  150. }
  151. this.getList(obj)
  152. }
  153. },
  154. onShow() {
  155. this.sysType = uni.getStorageSync('sysType');
  156. let obj = {}
  157. if (this.sysType == 1) {
  158. obj = {
  159. pageNum: this.pageNum,
  160. pageSize: this.pageSize,
  161. caseStatus: 4
  162. }
  163. } else if (this.sysType == 2) {
  164. obj = {
  165. pageNum: this.pageNum,
  166. pageSize: this.pageSize,
  167. }
  168. }
  169. this.getList(obj)
  170. },
  171. // onLoad() {
  172. // let obj = {
  173. // pageNum: this.pageNum,
  174. // pageSize: this.pageSize,
  175. // caseStatus:4
  176. // }
  177. // this.getList(obj)
  178. // }
  179. }
  180. </script>
  181. <style lang="scss">
  182. .handlecase {
  183. .caseList {
  184. // height: 360rpx;
  185. // background-color: #ffffff;
  186. // border-radius: 30rpx;
  187. // margin-top: 20rpx;
  188. }
  189. }
  190. </style>