移动端
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

234 righe
8.8 KiB

  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="1">
  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="10" :offset="1">
  46. <p style="color: #878787">{{item.formData.activityBusinessType}}</p>
  47. </van-col>
  48. <van-col span="5" :offset="1">
  49. <p style="font-size: 14px;font-weight:bold;text-align: right;color: #1D6FE9">{{activeName=='1'?'待审批':'已审批'}}</p>
  50. </van-col>
  51. </van-row>
  52. </template>
  53. </van-cell>
  54. </van-cell-group>
  55. </van-list>
  56. </van-pull-refresh>
  57. </div>
  58. </template>
  59. <script>
  60. import onlineHomeIndex from "../onlineHomeIndex";
  61. import {ListDone, ListTodo} from "../../api/onlineHome/done";
  62. export default {
  63. components: {
  64. onlineHomeIndex
  65. },
  66. name: "done",
  67. data(){
  68. return{
  69. taskList:[],
  70. activeName:this.$route.query.activeName?this.$route.query.activeName:'1',
  71. total:0,
  72. queryParams: {
  73. pageNum: 1,
  74. pageSize: 100,
  75. },
  76. activityBusinessTypeOptions:[],
  77. refreshing: false,
  78. loading: false,
  79. finished: false,
  80. }
  81. },
  82. created() {
  83. this.getDicts("activity_business_type").then((response) => {
  84. this.activityBusinessTypeOptions = response.data;
  85. if(this.$route.query.activeName){
  86. this.activeName = this.$route.query.activeName
  87. }
  88. this.getList();
  89. });
  90. this.$nextTick(() => this.activeName = (location.hash || '#1').substr(1));
  91. /*let self = this;
  92. window.onpopstate = function (event) {
  93. console.log(event, location);
  94. let state = event.state;
  95. if(state)
  96. {
  97. let activeName = state.type || '1';
  98. self.$nextTick(() => self.activeName = activeName);
  99. }
  100. };*/
  101. },
  102. methods: {
  103. goOnlineHomeIndex(){
  104. this.$router.push({name:'onlineHomeWorkbench'})
  105. },
  106. getList(target) {
  107. if(!target)
  108. {
  109. this.refreshing = true;
  110. this.finished = false;
  111. this.queryParams.pageNum = 1;
  112. this.taskList = []
  113. }
  114. else if(typeof(target) === 'number')
  115. this.queryParams.pageNum = target;
  116. else {
  117. this.queryParams.pageNum = eval(this.queryParams.pageNum + target.toString())
  118. }
  119. this.$set(this.queryParams, "systemType", '11'); // 4
  120. if(this.activeName=='1'){
  121. ListTodo(this.queryParams).then((response) => {
  122. console.log(response)
  123. if(response.rows.length === 0)
  124. {
  125. this.finished = true;
  126. return;
  127. }
  128. response.rows.map(res => {
  129. if(res.tableName?res.tableName.indexOf('house')>0:""){
  130. res.tableName = '来自农村宅基地管理系统'
  131. }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){
  132. res.tableName = '来自银农直联审批管理系统'
  133. }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){
  134. res.tableName = '来自银农直联审批管理系统'
  135. }
  136. if(this.activityBusinessTypeOptions){
  137. this.activityBusinessTypeOptions.map(t => {
  138. if(t.dictValue == res.formData.activityBusinessType){
  139. res.formData.activityBusinessType = t.dictLabel
  140. this.taskList.push(res)
  141. }
  142. });
  143. }
  144. })
  145. }).finally(() => {
  146. this.loading = false;
  147. this.refreshing = false;
  148. });
  149. }else{
  150. ListDone(this.queryParams).then((response) => {
  151. console.log(response)
  152. if(response.rows.length === 0)
  153. {
  154. this.finished = true;
  155. return;
  156. }
  157. response.rows.map(res => {
  158. if(res.tableName?res.tableName.indexOf('house')>0:""){
  159. res.tableName = '来自农村宅基地管理系统'
  160. }else if(res.tableName?res.tableName.indexOf('sys_seal')>0:""){
  161. res.tableName = '来自银农直联审批管理系统'
  162. }else if(res.tableName?res.tableName.indexOf('yinnong')>0:""){
  163. res.tableName = '来自银农直联审批管理系统'
  164. }
  165. if(this.activityBusinessTypeOptions){
  166. this.activityBusinessTypeOptions.map(t => {
  167. if(t.dictValue == res.formData.activityBusinessType){
  168. res.formData.activityBusinessType = t.dictLabel
  169. this.taskList.push(res)
  170. }
  171. });
  172. }
  173. })
  174. }).finally(() => {
  175. this.loading = false;
  176. this.refreshing = false;
  177. });
  178. }
  179. },
  180. goDetail(item){
  181. console.log(item)
  182. let type = item.formData.processKey;
  183. //history.pushState({ type: this.activeName}, null);
  184. switch (type) {
  185. case 'baseApply':
  186. case 'landscope':
  187. case 'accepting':
  188. this.$router.push({name:'approvalForm',query: {id:item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  189. break;
  190. case 'baseApplyWLHT':
  191. case 'landscopeWLHT':
  192. case 'acceptingWLHT':
  193. 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}})
  194. break;
  195. case 'house_mortgage':
  196. this.$router.push({name:'mortgageDetail',query: {id: item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  197. break;
  198. case 'house_circulation':
  199. this.$router.push({name:'circulationDetail',query: {id: item.formData.id,taskId:item.taskId,instanceId:item.formData.instanceId,type:item.type}})
  200. break;
  201. case 'yinnong_transfer':
  202. this.$router.push({name:'approvalApproval',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  203. break;
  204. case 'yinnong_cash':
  205. if(item.formData.cashType == '10'){
  206. this.$router.push({name:'approvalApproval10',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  207. break;
  208. }
  209. if(item.formData.cashType == '11'){
  210. this.$router.push({name:'approvalApproval11',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  211. break;
  212. }
  213. if(item.formData.cashType == '12'){
  214. this.$router.push({name:'approvalApproval12',query: {id:item.formData.id,taskId:item.taskId,type:item.type}})
  215. break;
  216. }
  217. default:
  218. console.log("Unknown processKey: " + type);
  219. break;
  220. }
  221. }
  222. },
  223. }
  224. </script>
  225. <style scoped>
  226. </style>