123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214
  1. <template>
  2. <view class="handlecase">
  3. <view class="" v-if="sysType == 2">
  4. <button type="primary" @tap="newlyAddedCases" v-if="checkPermi(['caseManagement:list:add'])">新增案件</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. console.log(111)
  53. if (this.sysType == 1) {
  54. respondentList(parms).then(res => {
  55. // this.caseList = res.rows;
  56. if (res.data) {
  57. this.caseList = [...this.caseList, ...res.data];
  58. } else {
  59. this.caseList = []
  60. }
  61. this.caseList.forEach(item => {
  62. switch (item.caseStatus) {
  63. case 0:
  64. item.caseStatusName = '立案申请'
  65. break;
  66. case 1:
  67. item.caseStatusName = '待缴费'
  68. break;
  69. case 2:
  70. item.caseStatusName = '待缴费确认'
  71. break;
  72. case 3:
  73. item.caseStatusName = '待确认是否应诉'
  74. break;
  75. case 4:
  76. item.caseStatusName = '待确认证据'
  77. break;
  78. case 5:
  79. item.caseStatusName = '待确定是否指派仲裁员'
  80. break;
  81. case 6:
  82. item.caseStatusName = '待组庭'
  83. break;
  84. case 7:
  85. item.caseStatusName = '待组庭确定'
  86. break;
  87. case 8:
  88. item.caseStatusName = '待组庭审核'
  89. break;
  90. case 9:
  91. item.caseStatusName = '待选择仲裁方式'
  92. break;
  93. case 10:
  94. item.caseStatusName = '待开庭'
  95. break;
  96. case 11:
  97. item.caseStatusName = '待生成仲裁文书'
  98. break;
  99. case 12:
  100. item.caseStatusName = '待确认仲裁文书'
  101. break;
  102. case 13:
  103. item.caseStatusName = '待仲裁文书用印'
  104. break;
  105. case 14:
  106. item.caseStatusName = '待仲裁文书用印审核'
  107. break;
  108. case 15:
  109. item.caseStatusName = '待仲裁文书送达'
  110. break;
  111. case 16:
  112. item.caseStatusName = '待案件归档'
  113. break;
  114. }
  115. })
  116. })
  117. } else if (this.sysType == 2) {
  118. parms.miniProgressFlag = 1;
  119. caseApplicationTj(parms).then(res => {
  120. this.total = res.total;
  121. if (res.rows) {
  122. this.caseList = [...this.caseList, ...res.rows];
  123. } else {
  124. this.caseList = []
  125. }
  126. })
  127. }
  128. },
  129. // 新增案件
  130. newlyAddedCases() {
  131. uni.navigateTo({
  132. url: `/pages/handlecase/component/newlyAddedCase?title=新增案件`
  133. })
  134. },
  135. // 触底
  136. onReachBottom() {
  137. if (this.caseList.length < 1) {
  138. return
  139. } else if (this.total == this.caseList.length) {
  140. uni.showToast({
  141. title: '没有数据啦',
  142. icon: 'none',
  143. duration: 1000
  144. })
  145. return
  146. } else if (this.caseList.length < 10) {
  147. uni.showToast({
  148. title: '没有数据啦',
  149. icon: 'none',
  150. duration: 1000
  151. })
  152. return
  153. }
  154. this.pageNum++;
  155. let obj = {};
  156. if (this.sysType == 1) {
  157. obj = {
  158. pageNum: this.pageNum,
  159. pageSize: this.pageSize,
  160. caseStatus: 4
  161. }
  162. } else if (this.sysType == 2) {
  163. obj = {
  164. pageNum: this.pageNum,
  165. pageSize: this.pageSize,
  166. }
  167. }
  168. this.getList(obj)
  169. }
  170. },
  171. onShow() {
  172. this.buttonList = []
  173. this.sysType = uni.getStorageSync('sysType');
  174. let obj = {}
  175. if (this.sysType == 1) {
  176. obj = {
  177. pageNum: this.pageNum,
  178. pageSize: this.pageSize,
  179. caseStatus: 4
  180. }
  181. } else if (this.sysType == 2) {
  182. obj = {
  183. pageNum: this.pageNum,
  184. pageSize: this.pageSize,
  185. }
  186. }
  187. this.getList(obj)
  188. this.getButtonList()
  189. },
  190. // onLoad() {
  191. // let obj = {
  192. // pageNum: this.pageNum,
  193. // pageSize: this.pageSize,
  194. // caseStatus:4
  195. // }
  196. // this.getList(obj)
  197. // }
  198. }
  199. </script>
  200. <style lang="scss">
  201. .handlecase {
  202. .caseList {
  203. // height: 360rpx;
  204. // background-color: #ffffff;
  205. // border-radius: 30rpx;
  206. // margin-top: 20rpx;
  207. }
  208. }
  209. </style>