index.vue 5.3KB

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