移动端
您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符
 
 

173 行
6.6 KiB

  1. <template>
  2. <div>
  3. <van-nav-bar
  4. title="我的事项"
  5. left-arrow
  6. @click-left="goOnlineHomeIndex"
  7. />
  8. <van-tabs v-model="activeName" title-active-color="#1D6FE9" color="#1D6FE9" line-width="20px" swipeable @click="getList">
  9. <van-tab title="待办" name="1" >
  10. </van-tab>
  11. <van-tab title="已办" name="2">
  12. </van-tab>
  13. </van-tabs>
  14. <van-cell-group @click="goDetail(item)" v-for="(item,index) in taskList" :key="index" style="width: 96%;margin:2%;border-radius: 6px;overflow: hidden;padding-top: 10px;padding-bottom: 10px;box-shadow: 0px 3px 6px 0px rgba(0,0,0,0.16);">
  15. <van-cell>
  16. <template #title>
  17. <van-row style="">
  18. <van-col span="23" :offset="1">
  19. <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;">
  20. <van-image
  21. height="20"
  22. width="20"
  23. style="vertical-align: middle;margin-right: 10px"
  24. src="../../../static/images/onlineHome/done.png"></van-image>{{item.projectName}}</h3>
  25. </van-col>
  26. </van-row>
  27. </template>
  28. </van-cell>
  29. <van-cell>
  30. <template #title>
  31. <van-row>
  32. <van-col span="6" :offset="1">
  33. <p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p>
  34. </van-col>
  35. <van-col span="10" :offset="1">
  36. <p style="color: #878787">{{item.formData.activityBusinessType}}</p>
  37. </van-col>
  38. <van-col span="5" :offset="1">
  39. <p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p>
  40. </van-col>
  41. </van-row>
  42. </template>
  43. </van-cell>
  44. </van-cell-group>
  45. </div>
  46. </template>
  47. <script>
  48. import onlineHomeIndex from "../onlineHomeIndex";
  49. import {ListDone, ListTodo} from "../../api/onlineHome/done";
  50. export default {
  51. components: {
  52. onlineHomeIndex
  53. },
  54. name: "done",
  55. data(){
  56. return{
  57. taskList:[],
  58. activeName:this.$route.query.activeName?this.$route.query.activeName:'1',
  59. total:0,
  60. queryParams: {
  61. pageNum: 1,
  62. pageSize: 100,
  63. },
  64. activityBusinessTypeOptions:[],
  65. }
  66. },
  67. created() {
  68. this.getDicts("activity_business_type").then((response) => {
  69. this.activityBusinessTypeOptions = response.data;
  70. if(this.$route.query.activeName){
  71. this.activeName = this.$route.query.activeName
  72. }
  73. this.getList();
  74. });
  75. console.log(this.$route.query.fr)
  76. if(this.$route.query.fr){
  77. this.$cookies.set("from",this.$route.query.fr,"0")
  78. }
  79. },
  80. methods: {
  81. goOnlineHomeIndex(){
  82. if(this.$cookies.get("from")=="my"){
  83. this.$router.push({name:"yinnongMy"})
  84. }else{
  85. this.$router.push({name:"yinnongWorkbench"})
  86. }
  87. },
  88. getList() {
  89. this.taskList = []
  90. this.$set(this.queryParams, "systemType", '4');
  91. if(this.activeName=='1'){
  92. ListTodo(this.queryParams).then((response) => {
  93. response.rows.map(res => {
  94. if(res.tableName?res.tableName.indexOf('house')>0:""){
  95. res.tableName = '来自农村宅基地管理系统'
  96. }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){
  97. res.tableName = '来自银农直联审批管理系统'
  98. }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){
  99. res.tableName = '来自银农直联审批管理系统'
  100. }
  101. if(this.activityBusinessTypeOptions){
  102. this.activityBusinessTypeOptions.map(t => {
  103. if(t.dictValue == res.formData.activityBusinessType){
  104. res.formData.activityBusinessType = t.dictLabel
  105. this.taskList.push(res)
  106. }
  107. });
  108. }
  109. })
  110. })
  111. }else{
  112. ListDone(this.queryParams).then((response) => {
  113. response.rows.map(res => {
  114. if(res.tableName?res.tableName.indexOf('house')>0:""){
  115. res.tableName = '来自农村宅基地管理系统'
  116. }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){
  117. res.tableName = '来自银农直联审批管理系统'
  118. }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){
  119. res.tableName = '来自银农直联审批管理系统'
  120. }
  121. if(this.activityBusinessTypeOptions){
  122. this.activityBusinessTypeOptions.map(t => {
  123. if(t.dictValue == res.formData.activityBusinessType){
  124. res.formData.activityBusinessType = t.dictLabel
  125. this.taskList.push(res)
  126. }
  127. });
  128. }
  129. })
  130. })
  131. }
  132. },
  133. goDetail(item){
  134. console.log(item)
  135. let type = item.formData.processKey;
  136. switch (type) {
  137. case 'baseApply':
  138. case 'landscope':
  139. case 'accepting':
  140. this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  141. break;
  142. case 'toReviewTransferProcess':
  143. case 'yinnong_transfer':
  144. if(item.formData.transferType == '10'){
  145. this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  146. break;
  147. }
  148. if(item.formData.transferType == '11'){
  149. this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  150. break;
  151. }
  152. if(item.formData.transferType == '12'){
  153. this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  154. break;
  155. }
  156. if(item.formData.transferType != '10'&&item.formData.transferType != '11'&&item.formData.transferType != '12'){
  157. this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  158. break;
  159. }
  160. }
  161. }
  162. },
  163. }
  164. </script>
  165. <style scoped>
  166. </style>