index.vue 5.2KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  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' :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. 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. 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. deleteCase(objValue){
  131. caseDelete(objValue).then(res =>{
  132. uni.showToast({
  133. title: '删除成功',
  134. icon: 'none',
  135. duration: 1000
  136. })
  137. })
  138. this.$router.go(0)
  139. },
  140. // 新增案件
  141. newlyAddedCases() {
  142. uni.navigateTo({
  143. url: `/pages/handlecase/component/newlyAddedCase?title=新增案件`
  144. })
  145. },
  146. // 触底
  147. onReachBottom() {
  148. if (this.caseList.length < 1) {
  149. return
  150. } else if (this.total == this.caseList.length) {
  151. uni.showToast({
  152. title: '没有数据啦',
  153. icon: 'none',
  154. duration: 1000
  155. })
  156. return
  157. } else if (this.caseList.length < 10) {
  158. uni.showToast({
  159. title: '没有数据啦',
  160. icon: 'none',
  161. duration: 1000
  162. })
  163. return
  164. }
  165. this.pageNum++;
  166. let obj = {};
  167. if (this.sysType == 1) {
  168. obj = {
  169. pageNum: this.pageNum,
  170. pageSize: this.pageSize,
  171. caseStatus: 4
  172. }
  173. } else if (this.sysType == 2) {
  174. obj = {
  175. pageNum: this.pageNum,
  176. pageSize: this.pageSize,
  177. }
  178. }
  179. this.getList(obj)
  180. }
  181. },
  182. onShow() {
  183. this.buttonList = []
  184. this.sysType = uni.getStorageSync('sysType');
  185. let obj = {}
  186. if (this.sysType == 1) {
  187. obj = {
  188. pageNum: this.pageNum,
  189. pageSize: this.pageSize,
  190. caseStatus: 4
  191. }
  192. } else if (this.sysType == 2) {
  193. obj = {
  194. pageNum: this.pageNum,
  195. pageSize: this.pageSize,
  196. }
  197. }
  198. this.getList(obj)
  199. this.getButtonList()
  200. },
  201. // onLoad() {
  202. // let obj = {
  203. // pageNum: this.pageNum,
  204. // pageSize: this.pageSize,
  205. // caseStatus:4
  206. // }
  207. // this.getList(obj)
  208. // }
  209. }
  210. </script>
  211. <style lang="scss">
  212. .handlecase {
  213. .caseList {
  214. // height: 360rpx;
  215. // background-color: #ffffff;
  216. // border-radius: 30rpx;
  217. // margin-top: 20rpx;
  218. }
  219. }
  220. </style>