dealTask.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <web-view v-if="url" :src="url"></web-view>
  3. </template>
  4. <script>
  5. import webview from './webview'
  6. function isNull(data) {
  7. let str = `${data}`
  8. return str == 'null' || str == 'undefined' || str == '';
  9. }
  10. export default {
  11. mixins: [webview],
  12. data() {
  13. return {
  14. definitionId: '',
  15. processInstanceId: '',
  16. taskId: '',
  17. category: '',
  18. withDealTask: '',
  19. withManager: '',
  20. url: '',
  21. };
  22. },
  23. onLoad(options) {
  24. this.processInstanceId = options.instId
  25. this.definitionId = options.definitionId
  26. this.taskId = options.id
  27. this.category = options.category
  28. this.withDealTask = options.allowDeal
  29. this.withManager = options.withManager
  30. let url = `${this.webviewServer}/mobile/dealTask?definitionId=${this.definitionId}&category=${this.category}&taskId=${this.taskId}&withDealTask=${this.withDealTask}&processInstanceId=${this.processInstanceId}&fromMobile=true&authtoken=${this.authtoken}`
  31. if(!isNull(this.withManager)) {
  32. url+=`&withManager=${this.withManager}`
  33. }
  34. this.url = url
  35. }
  36. }
  37. </script>
  38. <style lang="scss">
  39. </style>