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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246
  1. <template>
  2. <div>
  3. <van-nav-bar
  4. title="我的事项"
  5. fixed
  6. placeholder
  7. left-arrow
  8. @click-left="goOnlineHomeIndex"
  9. />
  10. <van-tabs v-model="activeName" title-active-color="#1D6FE9" color="#1D6FE9" line-width="20px" swipeable @click="getList(0)">
  11. <van-tab title="待办" name="1" url="#1">
  12. </van-tab>
  13. <van-tab title="已办" name="2" url="#2">
  14. </van-tab>
  15. </van-tabs>
  16. <van-pull-refresh v-model="refreshing" @refresh="getList(0)">
  17. <van-list
  18. v-model="loading"
  19. :finished="finished"
  20. finished-text="没有更多了"
  21. :immediate-check="false"
  22. @load="getList('+1')"
  23. >
  24. <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);">
  25. <van-cell>
  26. <template #title>
  27. <van-row style="">
  28. <van-col span="23" :offset="1">
  29. <h3 style="display: inline-block;line-height: 30px;margin-left: 6px;width: 100%;overflow: hidden;">
  30. <van-image
  31. height="20"
  32. width="20"
  33. style="vertical-align: middle;margin-right: 10px"
  34. src="../../../static/images/onlineHome/done.png"></van-image>{{item.projectName}}</h3>
  35. </van-col>
  36. </van-row>
  37. </template>
  38. </van-cell>
  39. <van-cell>
  40. <template #title>
  41. <van-row>
  42. <van-col span="6" :offset="0">
  43. <p style="color: #878787">{{item.createTime?item.createTime.substring(0,10):item.startTime.substring(0,10)}}</p>
  44. </van-col>
  45. <van-col span="11" :offset="2">
  46. <!-- <p style="color: #878787">{{item.formData.activityBusinessType}}</p>-->
  47. <p style="color: #878787">{{item.taskName}}</p>
  48. </van-col>
  49. <van-col span="4" :offset="1">
  50. <p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p>
  51. </van-col>
  52. </van-row>
  53. </template>
  54. </van-cell>
  55. </van-cell-group>
  56. </van-list>
  57. </van-pull-refresh>
  58. </div>
  59. </template>
  60. <script>
  61. import onlineHomeIndex from "../onlineHomeIndex";
  62. import {ListDone, ListTodo} from "../../api/onlineHome/done";
  63. export default {
  64. components: {
  65. onlineHomeIndex
  66. },
  67. name: "done",
  68. data(){
  69. return{
  70. taskList:[],
  71. activeName:this.$route.query.activeName?this.$route.query.activeName:'1',
  72. total:0,
  73. queryParams: {
  74. pageNum: 1,
  75. pageSize: 100,
  76. isAsc: 'DESC',
  77. },
  78. orderByColumn_todo: 'CREATE_TIME_',
  79. orderByColumn_done: 'END_TIME_',
  80. activityBusinessTypeOptions:[],
  81. refreshing: false,
  82. loading: false,
  83. finished: false,
  84. }
  85. },
  86. created() {
  87. this.getDicts("activity_business_type").then((response) => {
  88. this.activityBusinessTypeOptions = response.data;
  89. if(this.$route.query.activeName){
  90. this.activeName = this.$route.query.activeName
  91. }
  92. this.getList();
  93. });
  94. this.$nextTick(() => this.activeName = (location.hash || '#1').substr(1));
  95. /*let self = this;
  96. window.onpopstate = function (event) {
  97. console.log(event, location);
  98. let state = event.state;
  99. if(state)
  100. {
  101. let activeName = state.type || '1';
  102. self.$nextTick(() => self.activeName = activeName);
  103. }
  104. };*/
  105. },
  106. methods: {
  107. goOnlineHomeIndex(){
  108. this.$router.push({name:'onlineHomeWorkbench'})
  109. },
  110. getList(target) {
  111. if(!target)
  112. {
  113. this.refreshing = true;
  114. this.finished = false;
  115. this.queryParams.pageNum = 1;
  116. this.taskList = []
  117. }
  118. else if(typeof(target) === 'number')
  119. this.queryParams.pageNum = target;
  120. else {
  121. this.queryParams.pageNum = eval(this.queryParams.pageNum + target.toString())
  122. }
  123. this.queryParams.orderByColumn = this.activeName == '1' ? this.orderByColumn_todo : this.orderByColumn_done;
  124. this.$set(this.queryParams, "systemType", '11'); // 4
  125. if(this.activeName=='1'){
  126. ListTodo(this.queryParams).then((response) => {
  127. console.log(response)
  128. if(response.rows.length === 0)
  129. {
  130. this.finished = true;
  131. return;
  132. }
  133. response.rows.map(res => {
  134. if(res.tableName?res.tableName.indexOf('house')>0:""){
  135. res.tableName = '来自农村宅基地管理系统'
  136. }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){
  137. res.tableName = '来自银农直联审批管理系统'
  138. }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){
  139. res.tableName = '来自银农直联审批管理系统'
  140. }
  141. if(this.activityBusinessTypeOptions){
  142. this.activityBusinessTypeOptions.map(t => {
  143. if(t.dictValue == res.formData.activityBusinessType){
  144. res.formData.activityBusinessType = t.dictLabel
  145. this.taskList.push(res)
  146. }
  147. });
  148. }
  149. })
  150. }).finally(() => {
  151. this.loading = false;
  152. this.refreshing = false;
  153. });
  154. }else{
  155. ListDone(this.queryParams).then((response) => {
  156. console.log(response)
  157. if(response.rows.length === 0)
  158. {
  159. this.finished = true;
  160. return;
  161. }
  162. response.rows.map(res => {
  163. if(res.tableName?res.tableName.indexOf('house')>0:""){
  164. res.tableName = '来自农村宅基地管理系统'
  165. }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){
  166. res.tableName = '来自银农直联审批管理系统'
  167. }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){
  168. res.tableName = '来自银农直联审批管理系统'
  169. }
  170. if(this.activityBusinessTypeOptions){
  171. this.activityBusinessTypeOptions.map(t => {
  172. if(t.dictValue == res.formData.activityBusinessType){
  173. res.formData.activityBusinessType = t.dictLabel
  174. this.taskList.push(res)
  175. }
  176. });
  177. }
  178. })
  179. }).finally(() => {
  180. this.loading = false;
  181. this.refreshing = false;
  182. });
  183. }
  184. },
  185. goDetail(item){
  186. console.log(item)
  187. let type = item.formData.processKey;
  188. //history.pushState({ type: this.activeName}, null);
  189. switch (type) {
  190. case 'baseApply':
  191. case 'landscope':
  192. case 'accepting':
  193. this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  194. break;
  195. case 'baseApplyWLHT':
  196. case 'landscopeWLHT':
  197. case 'acceptingWLHT':
  198. this.$router.push({name:'proposerLite',query: {id:item.formData.applyProposerId || item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type, processKey: item.formData.processKey}})
  199. break;
  200. case 'house_mortgage':
  201. this.$router.push({name:'mortgageDetail',query: {id: item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  202. break;
  203. case 'house_utilize_signout':
  204. this.$router.push({name:'paidExitDetail',query: {id: item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  205. break;
  206. case 'houseStandardZyyctcsq':
  207. this.$router.push({name:'paidExitDetail',query: {id: item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  208. break;
  209. case 'house_circulation':
  210. this.$router.push({name:'circulationDetail',query: {id: item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  211. break;
  212. case 'yinnong_majorevent':
  213. this.$router.push({name:'approvalApproval13',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  214. break;
  215. case 'yinnong_transfer':
  216. this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  217. break;
  218. case 'yinnong_cash':
  219. if(item.formData.cashType == '10'){
  220. this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  221. break;
  222. }
  223. if(item.formData.cashType == '11'){
  224. this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  225. break;
  226. }
  227. if(item.formData.cashType == '12'){
  228. this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  229. break;
  230. }
  231. default:
  232. console.log("Unknown processKey: " + type);
  233. break;
  234. }
  235. }
  236. },
  237. }
  238. </script>
  239. <style scoped>
  240. </style>