移动端
Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
 
 

230 rindas
6.3 KiB

  1. <template>
  2. <div class="home_wrapper">
  3. <div class="header_main">
  4. 案件分配
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. </div>
  7. <div style="height: 58px;"></div>
  8. <div class="search_box">
  9. <img src="../../../../static/images/lawEnforcement/new/list_icon_02.png" @click="$router.push({name:'lawEnforcementCaseHistory'})"/>
  10. <div class="search">
  11. <input type="text" v-model="searchInput" placeholder="请输入案件名称" />
  12. <img src="../../../../static/images/lawEnforcement/new/index_icon_04.png" @click="goSearch">
  13. </div>
  14. <!-- <img src="../../../../static/images/lawEnforcement/new/list_icon_03.png"/>-->
  15. </div>
  16. <van-list
  17. v-model="loading"
  18. :finished="finished"
  19. finished-text="没有更多了"
  20. @load="getList"
  21. >
  22. <van-swipe-cell v-for="(item,index) in list" :key="index">
  23. <van-cell :title="item.caseName" center :to="{name:'lawEnforcementCaseDetailNew', query: {id:item.caseId}}">
  24. <template #icon>
  25. <van-icon name="../../../../static/images/lawEnforcement/new/list_icon_01.png" size="20" color="#FF4646" style="margin-right: 10px;" />
  26. </template>
  27. <template #label>
  28. <p>{{item.caseSource}}</p>
  29. <p>第{{item.belongTeam}}</p>
  30. <p>{{item.shouanDate}}</p>
  31. </template>
  32. </van-cell>
  33. <template #right>
  34. <van-row>
  35. <van-col>
  36. <van-button square text="退回" type="danger" :to="{name:'lawEnforcementCaseReturn', query: {id:item.caseId}}" class="delete-button" />
  37. </van-col>
  38. <van-col>
  39. <van-button square text="分配" type="info" :to="{name:'lawEnforcementCaseDistribution', query: {id:item.caseId}}" class="delete-button" />
  40. </van-col>
  41. </van-row>
  42. </template>
  43. </van-swipe-cell>
  44. </van-list>
  45. </div>
  46. </template>
  47. <script>
  48. import { listSurvey } from "@/api/lawEnforcement/index";
  49. export default {
  50. name: "caseAllocation",
  51. data() {
  52. return {
  53. loading: false,
  54. finished: false,
  55. searchInput:'',
  56. queryParams:{
  57. // 分页
  58. pageNum: 1,
  59. pageSize: 10,
  60. // 查询排序
  61. orderByColumn: "id",
  62. isAsc: "desc",
  63. caseName: null,
  64. caseProgress: "2",
  65. title:"",
  66. },
  67. list:[],
  68. belongTeamOptions:[],
  69. caseSourceOptions:[],
  70. };
  71. },
  72. created() {
  73. this.getDicts("case_source").then(response => {
  74. this.caseSourceOptions = response.data;
  75. });
  76. this.getDicts("team_category").then(response => {
  77. this.belongTeamOptions = response.data;
  78. });
  79. },
  80. methods: {
  81. getList(){
  82. var _this = this;
  83. listSurvey(_this.queryParams).then(response => {
  84. response.rows.map(res=>{
  85. res.caseSource = res.caseSource == '' ? '' : this.selectDictLabel(this.caseSourceOptions, res.caseSource);
  86. res.belongTeam = res.belongTeam == '' ? '' : this.selectDictLabel(this.belongTeamOptions, res.belongTeam);
  87. this.list.push(res);
  88. })
  89. console.log(this.list.length)
  90. if(this.list.length >= response.total){
  91. this.finished = true;
  92. return;
  93. }else{
  94. this.loading = false;
  95. this.queryParams.pageNum += 1 ;
  96. }
  97. });
  98. },
  99. goSearch(){
  100. // if (this.searchInput == ''){
  101. // location.reload()
  102. // }
  103. this.list = [];
  104. this.loading = false;
  105. this.finished = false;
  106. this.queryParams.caseName = this.searchInput;
  107. this.queryParams.pageNum = 1 ;
  108. // this.getList();
  109. },
  110. },
  111. }
  112. </script>
  113. <style scoped lang="scss">
  114. .home_wrapper{
  115. background: #e9e9e9;
  116. min-height: 100vh;
  117. width: 100vw;
  118. padding: 0 3% 0.2rem;
  119. .search_box{
  120. display: flex;
  121. justify-content: space-between;
  122. align-items: center;
  123. width: 92%;
  124. margin: 0PX auto;
  125. .search{
  126. background: #ffffff;
  127. display: flex;
  128. justify-content: space-between;
  129. align-items: center;
  130. width: 100%;
  131. margin: 10PX auto;
  132. border: 1px solid #1D6FE9;
  133. padding: 1PX 1PX 1PX 12PX ;
  134. border-radius: 50PX;
  135. margin-left: 10PX;
  136. input{
  137. flex: 1;
  138. background: transparent;
  139. }
  140. }
  141. }
  142. .header_main{
  143. height: 116px;
  144. background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
  145. background-size: 100% 100%;
  146. position: fixed;
  147. top: 0;
  148. left: 0;
  149. width: 100%;
  150. font-size: 36px;
  151. line-height: 116px;
  152. text-align: center;
  153. color: #fff;
  154. z-index: 999;
  155. .return_btn{
  156. width: 24px;
  157. height: 43.2px;
  158. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  159. background-size: 20px 36px;
  160. position: absolute;
  161. left: 38px;
  162. top: 36px;
  163. }
  164. .add_btn{
  165. width: 56.4px;
  166. height: 40.8px;
  167. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  168. background-size: 47px 34px;
  169. position: absolute;
  170. right: 38px;
  171. top: 36px;
  172. }
  173. }
  174. }
  175. /deep/.van-cell__title span{
  176. font-family: Arial;
  177. font-size: 0.4rem;
  178. font-weight: normal;
  179. color: #666666;
  180. display: -webkit-box;
  181. -webkit-box-orient: vertical;
  182. -webkit-line-clamp: 1;
  183. word-break: break-all;
  184. overflow: hidden;
  185. }
  186. /deep/.van-cell__label {
  187. display: flex;
  188. justify-content: space-between;
  189. p{
  190. display: inline-block;
  191. &:first-child{
  192. background: rgba(28,184,177,0.2);
  193. padding: 0 5PX;
  194. border-radius: 3PX;
  195. color: #1CB8B1;
  196. }
  197. }
  198. }
  199. /deep/.van-cell__value{
  200. flex: 0.3;
  201. color: #1D6FE9;
  202. font-weight: bold;
  203. }
  204. /deep/.van-swipe-cell{
  205. margin-bottom: 0.2rem;
  206. border-radius: 0.2rem;
  207. overflow: hidden;
  208. box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);
  209. .van-swipe-cell__right{
  210. right: -2PX;
  211. }
  212. }
  213. /deep/van-ellipsis{
  214. font-weight: bold;
  215. }
  216. .van-row{
  217. height: 100%;
  218. }
  219. .van-col{
  220. height: 100%;
  221. }
  222. .delete-button {
  223. height: 100%;
  224. }
  225. </style>