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