law-case-config.vue 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. <template>
  2. <div :class="$style.wrapHeight">
  3. <div :class="$style.rowHeight">
  4. <law-case-catalog-tree
  5. ref="lawcaseCatalogTree"
  6. show-line
  7. top-node-text="案由配置"
  8. :is-select-dep="true"
  9. :draggable="false"
  10. @treeSelect="treeSelect"
  11. ></law-case-catalog-tree>
  12. <div :class="$style.rightcard">
  13. <a-card>
  14. <sd-business-list
  15. v-if="ifRouterView"
  16. :module-id="moduleId"
  17. :form-list-id="formListId"
  18. :custom-values="customValues"
  19. :filter="Expressions"
  20. :parentId="parentId"
  21. ></sd-business-list>
  22. </a-card>
  23. </div>
  24. </div>
  25. </div>
  26. </template>
  27. <script>
  28. import { Modal, message } from 'ant-design-vue'
  29. import TableColumnTypes from '@/common/services/table-column-types'
  30. import systemManage from '@/system-manage/system-manage'
  31. import debounce from 'lodash.debounce'
  32. import axios from '@/common/services/axios-instance'
  33. import TableActionTypes from '@/common/services/table-action-types'
  34. import sdBusinessList from '../../../../src/application-manage/sd-business-list.vue'
  35. import LawService from '../law-service'
  36. import lawCaseCatalogTree from './law-case-catalog-tree'
  37. import components from './_import-components/law-case-config-import'
  38. export default {
  39. name: 'LawCaseConfig',
  40. metaInfo: {
  41. title: '法律案由配置',
  42. },
  43. components: {
  44. ...components,
  45. lawCaseCatalogTree,
  46. sdBusinessList,
  47. },
  48. data() {
  49. return {
  50. ifRouterView: false,
  51. // 模块Id
  52. moduleId: '',
  53. // 列表ID
  54. formListId: '',
  55. // 搜索条件
  56. customValues: {},
  57. Expressions: [
  58. {
  59. dataType: 'str',
  60. name: 'PARENT_CODE',
  61. op: 'eq',
  62. stringValue: '0',
  63. },
  64. ],
  65. key: 0,
  66. waterMark: systemManage.getFormWaterMark(),
  67. parentId: '0',
  68. parentName: '案由配置',
  69. newNumber: '',
  70. }
  71. },
  72. mounted() {
  73. this.versionId = this.$route.query.versionId
  74. this.moduleId = this.$route.query.moduleId
  75. this.formListId = this.$route.query.formListId
  76. LawService.findActionCode('0').then((res) => {
  77. this.newNumber = res.data.toString()
  78. this.customValues = { sdCustomField1: this.parentId, sdCustomField2: this.newNumber }
  79. setTimeout(() => {
  80. this.ifRouterView = true
  81. }, 100)
  82. })
  83. },
  84. methods: {
  85. reload() {
  86. this.ifRouterView = false
  87. this.$nextTick(() => {
  88. this.ifRouterView = true
  89. })
  90. },
  91. treeSelect(selectedKeys, info) {
  92. this.prcPath = null
  93. // 父级id
  94. if (info != null && info.selectedNodes[0]) {
  95. this.parentId = info.selectedNodes[0].data.props.id.toString()
  96. this.parentName = info.selectedNodes[0].data.props.text // 父级名称
  97. } else {
  98. if (selectedKeys.id) {
  99. this.parentId = selectedKeys.id.toString()
  100. this.parentName = selectedKeys.text // 父级名称
  101. } else {
  102. this.parentId = '0'
  103. }
  104. }
  105. this.customValues = { sdCustomField1: this.parentId, sdCustomField2: this.newNumber }
  106. LawService.findActionCode(this.parentId).then((res) => {
  107. this.newNumber = res.data.toString()
  108. })
  109. this.reload()
  110. },
  111. },
  112. }
  113. </script>
  114. <style module lang="scss">
  115. @use '@/common/design' as *;
  116. .wrap-height {
  117. height: 100%;
  118. .row-height {
  119. display: flex;
  120. flex: auto;
  121. height: 100%;
  122. .rightcard {
  123. flex: 1;
  124. width: calc(100% - 20%);
  125. height: 100%;
  126. :global .ant-card{
  127. min-height:100%;
  128. }
  129. :global .ant-table-default {
  130. // height: calc(50vh - 38px);
  131. overflow-x: hidden;
  132. overflow-y: auto;
  133. }
  134. }
  135. }
  136. }
  137. </style>