移动端
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

409 lines
11 KiB

  1. <template>
  2. <div class="app-container">
  3. <div class="header_main">
  4. 待办事项
  5. <div class="return_btn" @click="onClickLeft"></div>
  6. </div>
  7. <van-tabs>
  8. <van-tab title="待办事项">
  9. <van-dropdown-menu style="margin-top: 10px;">
  10. <van-dropdown-item v-model="queryParamsTask.activityBusinessType" :options="typeOptions" @change="getListchange('db')" />
  11. <van-dropdown-item v-model="queryParamsTask.isAsc" :options="option" @change="getListchange('db')" />
  12. </van-dropdown-menu>
  13. <van-list
  14. v-model="loading"
  15. :finished="finished"
  16. finished-text="没有更多了"
  17. @load="getTaskList"
  18. >
  19. <van-cell-group class="listBox db">
  20. <van-cell
  21. v-for="(item,index) in taskList"
  22. :key="index"
  23. :value="item.formData.createTime == null ? '' : item.createTime.substr(0,10)"
  24. :to="{
  25. name:item.formData.activityBusinessType == '21' ? 'schemeDetail':'lawEnforcementTaskHandleProcessing',
  26. query:{
  27. id:item.formData.activityBusinessType == '21' ? item.formData.id:item.formData.caseId,
  28. caseProgress:item.formData.activityBusinessType == '21' ? '': item.formData.activityBusinessType == '22' ? 2:item.formData.activityBusinessType == '25' ? 3:item.formData.activityBusinessType == '24' ? 4:'',
  29. type:'waiting'
  30. }
  31. }"
  32. >
  33. <template #title>
  34. <span class="tap">{{selectDictLabel(activityBusinessTypeOptions,item.formData.activityBusinessType).substr(2,2)}}</span>
  35. <span>{{item.projectName}}</span>
  36. </template>
  37. </van-cell>
  38. </van-cell-group>
  39. </van-list>
  40. </van-tab>
  41. <van-tab title="已办事项">
  42. <van-dropdown-menu style="margin-top: 10px;">
  43. <van-dropdown-item v-model="queryParams.activityBusinessType" :options="typeDoneOptions" @change="getListchange" />
  44. <van-dropdown-item v-model="queryParams.isAsc" :options="option" @change="getListchange" />
  45. </van-dropdown-menu>
  46. <van-list
  47. v-model="doneLoading"
  48. :finished="doneFinished"
  49. finished-text="没有更多了"
  50. @load="getTaskDoneList"
  51. >
  52. <van-cell-group class="listBox db">
  53. <van-cell
  54. v-for="(item,index) in taskDoneList"
  55. :key="index"
  56. :value="item.formData.createTime == null ? '' : item.endTime.substr(0,10)"
  57. :to="{
  58. name:item.formData.activityBusinessType == '21' ? 'schemeDetail':'caseDetail',
  59. query:{
  60. id:item.formData.activityBusinessType == '21' ? item.formData.id:item.formData.caseId,
  61. caseProgress:item.formData.activityBusinessType == '21' ? '': item.formData.activityBusinessType == '22' ? 2:item.formData.activityBusinessType == '25' ? 3:item.formData.activityBusinessType == '24' ? 4:'',
  62. }
  63. }"
  64. >
  65. <template #title>
  66. <span class="tap">{{selectDictLabel(activityBusinessTypeOptions,item.formData.activityBusinessType).substr(2,2)}}</span>
  67. <span>{{item.projectName}}</span>
  68. </template>
  69. </van-cell>
  70. </van-cell-group>
  71. </van-list>
  72. </van-tab>
  73. </van-tabs>
  74. </div>
  75. </template>
  76. <script>
  77. import { listModelCustom } from "@/api/lawEnforcement/index";
  78. import request from "@/utils/request";
  79. import law from "@/components/common/law_footer";
  80. export default {
  81. name: "index",
  82. components: {
  83. law
  84. },
  85. data() {
  86. return {
  87. value1: '',
  88. value2: 'a',
  89. typeOptions: [
  90. { text: '全部待办', value: '' },
  91. ],
  92. typeDoneOptions: [
  93. { text: '全部已办', value: '' },
  94. ],
  95. option: [
  96. { text: '默认排序', value: '' },
  97. { text: '时间倒序', value: 'desc' },
  98. { text: '时间正序', value: 'asc' },
  99. ],
  100. //是否显示加载
  101. loading: false,
  102. //是否滚动到底部
  103. finished: false,
  104. //是否显示加载
  105. doneLoading: false,
  106. //是否滚动到底部
  107. doneFinished: false,
  108. // 查询参数
  109. queryParamsTask: {
  110. pageNum: 1,
  111. pageSize: 10,
  112. taskId: null,
  113. taskName: null,
  114. systemType: 26,
  115. activityBusinessType:'',
  116. orderByColumn: "A.CREATE_TIME_",
  117. isAsc: "desc",
  118. },
  119. // 查询参数
  120. queryParams: {
  121. pageNum: 1,
  122. pageSize: 10,
  123. taskId: null,
  124. taskName: null,
  125. systemType: 26,
  126. activityBusinessType:'',
  127. orderByColumn: "A.END_TIME_",
  128. isAsc: "desc",
  129. },
  130. //新闻集合
  131. workList:[],
  132. //轮播图集合
  133. bannerList:'',
  134. taskList:[],
  135. taskDoneList:[],
  136. activityBusinessTypeOptions:[],
  137. pageType:''
  138. };
  139. },
  140. created() {
  141. var that = this ;
  142. this.getDicts("activity_business_type").then((response) => {
  143. listModelCustom({"systemType": 26}).then(response1 => {
  144. let res = [];
  145. let activityBusinessTypeArray = response1.rows.map(function (current) {
  146. return current.activityBusinessType
  147. });
  148. response.data.forEach(function (value) {
  149. if (activityBusinessTypeArray.indexOf(value.dictValue) !== -1) {
  150. res.push(value);
  151. that.typeOptions.push({
  152. text:value.dictLabel,
  153. value:value.dictValue
  154. })
  155. that.typeDoneOptions.push({
  156. text:value.dictLabel,
  157. value:value.dictValue
  158. })
  159. }
  160. });
  161. this.activityBusinessTypeOptions = res;
  162. console.log(that.typeOptions)
  163. });
  164. });
  165. },
  166. methods: {
  167. /*getTaskList() {
  168. this.loading = true;
  169. return request({
  170. url: "/activiti/process/taskList",
  171. method: "get",
  172. params: this.queryParamsTask,
  173. }).then((response) => {
  174. console.log(response)
  175. for (var i = 0; i < response.rows.length; i++) {
  176. this.taskList.push(response.rows[i]);
  177. }
  178. if(this.taskList.length >= response.total ){
  179. this.finished = true;
  180. return;
  181. }
  182. this.queryParamsTask.pageNum += 1 ;
  183. this.loading = false;
  184. }).then(() => {
  185. });
  186. },*/
  187. /*getTaskDoneList(){
  188. this.doneLoading = true;
  189. return request({
  190. url: "/activiti/process/taskDoneList",
  191. method: "get",
  192. params: this.queryParams,
  193. })
  194. .then((response) => {
  195. for (var i = 0; i < response.rows.length; i++) {
  196. this.taskDoneList.push(response.rows[i]);
  197. }
  198. console.log(this.taskDoneList.length >= response.total)
  199. if(this.taskDoneList.length >= response.total ){
  200. this.doneFinished = true;
  201. return;
  202. }
  203. this.queryParams.pageNum += 1 ;
  204. this.doneLoading = false;
  205. })
  206. .then(() => {
  207. });
  208. },*/
  209. getListchange(type){
  210. if(type == 'db'){
  211. this.taskList = [];
  212. this.queryParamsTask.pageNum = 1;
  213. this.finished = false;
  214. //this.getTaskList()
  215. } else {
  216. this.taskDoneList = [];
  217. this.queryParams.pageNum = 1 ;
  218. this.doneFinished = false;
  219. //this.getTaskDoneList()
  220. }
  221. }
  222. },
  223. };
  224. </script>
  225. <style scoped lang="scss">
  226. @font-face {
  227. font-family: SourceHanSansCNBold;
  228. src: url("../../../assets/fonts/SourceHanSansCN-Bold.otf");
  229. }
  230. .jg{
  231. height: 180PX;
  232. }
  233. .header_main{
  234. /*height: 116px;*/
  235. background: url('../../../../static/images/lawEnforcement/new/list_head.png') no-repeat;
  236. background-size: 100% 100%;
  237. /*position: fixed;*/
  238. top: 0;
  239. left: 0;
  240. width: 100%;
  241. font-size: 36px;
  242. line-height: 116px;
  243. text-align: center;
  244. color: #fff;
  245. z-index: 999;
  246. .return_btn{
  247. width: 24px;
  248. height: 43.2px;
  249. background: url('../../../assets/images/sunVillage_info/list_icon_5.png') center center no-repeat;
  250. background-size: 20px 36px;
  251. position: absolute;
  252. left: 38px;
  253. top: 36px;
  254. }
  255. .add_btn{
  256. width: 56.4px;
  257. height: 40.8px;
  258. background: url('../../../assets/images/sunVillage_info/list_icon_9.png') center center no-repeat;
  259. background-size: 47px 34px;
  260. position: absolute;
  261. right: 38px;
  262. top: 36px;
  263. }
  264. }
  265. .van-list{
  266. width: 96%;
  267. margin: 0 auto;
  268. margin-top: 10PX;
  269. }
  270. /deep/ .van-search__content{
  271. background-color: #ffffff;
  272. }
  273. /deep/ .van-search__action{
  274. background-color: #1D6FE9;
  275. text-align: center;
  276. color: #ffffff;
  277. padding: 0 0.5rem;
  278. }
  279. /deep/ .van-search{
  280. background-color: transparent;
  281. border-radius: 20PX;
  282. border: 1px solid #cccccc;
  283. padding: 0;
  284. overflow: hidden;
  285. }
  286. .van-cell__title{
  287. color: #666666;
  288. flex: 0.7;
  289. display: -webkit-box;
  290. -webkit-box-orient: vertical;
  291. -webkit-line-clamp: 1;
  292. word-break: break-all;
  293. overflow: hidden;
  294. }
  295. .van-cell__value{
  296. flex: 0.3;
  297. }
  298. .app-container {
  299. }
  300. /deep/ .van-nav-bar--fixed{
  301. background: url("../../../../static/images/lawEnforcement/head_bg.png") 100%;
  302. }
  303. /deep/ .van-nav-bar .van-icon{
  304. color: #ffffff;
  305. }
  306. /deep/ .van-nav-bar__title{
  307. color: #ffffff;
  308. }
  309. .van-cell__title{
  310. color: #666666;
  311. }
  312. .listBox{
  313. border-radius: 8Px;
  314. overflow: hidden;
  315. box-shadow: 0PX 5PX 5PX #cccccc;
  316. .van-icon{
  317. vertical-align: middle;
  318. }
  319. .custom-title{
  320. font-size: 17PX;
  321. color: #333333;
  322. vertical-align: middle;
  323. line-height: 1;
  324. position: relative;
  325. }
  326. .tap{
  327. color: #1D6FE9;
  328. }
  329. .bgBlue{
  330. display: block;
  331. position: absolute;
  332. width: 17PX;
  333. height: 17PX;
  334. border-radius: 50%;
  335. background-color: rgba(29,111,233,0.26);
  336. top: -2PX;
  337. right: -8PX;
  338. }
  339. }
  340. /deep/ .van-nav-bar__title{
  341. display: flex;
  342. max-width: initial;
  343. p{
  344. line-height: 30Px;
  345. margin-left: 6Px;
  346. font-size: 21Px;
  347. color: #D60303;
  348. font-family: SourceHanSansCNBold;
  349. }
  350. }
  351. .bannerTit{
  352. position: absolute;
  353. bottom: 10px;
  354. background: rgba(255,255,255,0.3);
  355. width: 100%;
  356. height: 0.8rem;
  357. line-height: 0.8rem;
  358. color: #fff;
  359. overflow: hidden;
  360. padding: 0 3%;
  361. font-size: 16Px;
  362. }
  363. .link{
  364. color: #000;
  365. }
  366. .my-swipe {
  367. border-radius: 8Px;
  368. }
  369. .my-swipe .van-swipe-item .van-image{
  370. width: 100%;
  371. }
  372. .van-grid-item p{
  373. margin-top: 10px;
  374. }
  375. .newTit{
  376. font-size: 0.45rem;
  377. margin: 0.4rem 0;
  378. font-family: Source Han Sans SC, Source Han Sans SC-Medium;
  379. font-weight: 500;
  380. text-align: left;
  381. color: #333333;
  382. }
  383. .newContent{
  384. display: -webkit-box;
  385. -webkit-box-orient: vertical;
  386. -webkit-line-clamp: 2;
  387. word-break: break-all;
  388. overflow: hidden;
  389. }
  390. .search-icon {
  391. line-height: inherit;
  392. margin-left: 10px;
  393. }
  394. /deep/ .van-tab{
  395. font-size: 16PX;
  396. }
  397. /deep/ .van-dropdown-menu__title{
  398. font-size: 14PX;
  399. }
  400. </style>