case-progress-xyzx-form.vue 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <sd-webflow
  3. ref="webflow"
  4. @afterDispatch="afterDispatch"
  5. @saveproject="save"
  6. @sdFormReady="initData"
  7. @actionBtnClick="actionBtnClick"
  8. >
  9. <template v-slot:form="{ model, FlowData }">
  10. <!-- 申请人监听 -->
  11. <action-name-watcher :model="model" @actionNameChange="actionNameChange" />
  12. <sd-form-by-builder ref="builderform" :form-data="FlowData.processFormData" />
  13. </template>
  14. </sd-webflow>
  15. </template>
  16. <script>
  17. import CaseMixins from '../case-mixins.js'
  18. import components from './_import-components/case-progress-xyzx-form-import'
  19. export default {
  20. name: 'CaseProgressXyzxForm',
  21. metaInfo: {
  22. title: '案件进展-先予执行详情',
  23. },
  24. components: {
  25. actionNameWatcher: {
  26. props: ['model'],
  27. created() {
  28. this.$watch(
  29. () => {
  30. return this.model.APPLY_USER
  31. },
  32. (nVal, oVal) => {
  33. this.$emit('actionNameChange', nVal, oVal)
  34. },
  35. { immediate: false }
  36. )
  37. },
  38. render: () => {},
  39. },
  40. ...components,
  41. },
  42. mixins: [CaseMixins],
  43. data() {
  44. return {}
  45. },
  46. created() {
  47. this.type = 'progress'
  48. },
  49. mounted() {
  50. this.type = 'progress'
  51. },
  52. methods: {
  53. actionNameChange(nval, lval) {
  54. if (!nval) return
  55. // 自定义组件不会直接校验,加校验
  56. this.$refs.webflow.validateField('APPLY_USER')
  57. },
  58. },
  59. }
  60. </script>
  61. <style module lang="scss">
  62. @use '@/common/design' as *;
  63. </style>