index.vue 5.2KB

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