audit-template-detail.vue 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. <template>
  2. <audit-form-top-banner>
  3. <template>
  4. <sd-detail-form
  5. ref="form"
  6. form-id="iamTemplate"
  7. page-id="audit/template/iamTemplate"
  8. :record-id="this.$route.query.record ? parseInt(this.$route.query.record) : null"
  9. :class="[$style.form, 'readonlyform']"
  10. >
  11. <template v-slot="{ model, fields }">
  12. <table>
  13. <tr>
  14. <sd-form-item-td name="templateName">
  15. <span>{{ model.templateName }}</span>
  16. </sd-form-item-td>
  17. <sd-form-item-td name="templateType">
  18. <span>{{ fields.templateType.attr.displayValue }}</span>
  19. </sd-form-item-td>
  20. </tr>
  21. <tr>
  22. <sd-form-item-td name="isDefault">
  23. <span>{{ fields.isDefault.attr.displayValue }}</span>
  24. </sd-form-item-td>
  25. <sd-form-item-td v-if="model.isDefault === '0'" name="orgNameScope">
  26. <span>{{ model.orgNameScope }}</span>
  27. </sd-form-item-td>
  28. </tr>
  29. <tr>
  30. <sd-form-item-td name="templateDesc" :colspan="3">
  31. <span>{{ model.templateDesc }}</span>
  32. </sd-form-item-td>
  33. </tr>
  34. <tr>
  35. <sd-form-item-td name="authName">
  36. <span>{{ model.authName }}</span>
  37. </sd-form-item-td>
  38. <sd-form-item-td name="authTime">
  39. <span>{{ model.authTime }}</span>
  40. </sd-form-item-td>
  41. </tr>
  42. <tr>
  43. <sd-form-item-td name="attachment" :colspan="3">
  44. <template>
  45. <sd-attachment
  46. v-model="model.attachment"
  47. :group-id="JSON.parse(fields.attachment.value).value"
  48. :read-only="true"
  49. />
  50. </template>
  51. </sd-form-item-td>
  52. </tr>
  53. </table>
  54. </template>
  55. </sd-detail-form>
  56. </template>
  57. </audit-form-top-banner>
  58. </template>
  59. <script>
  60. import crossWindowWatcher from '@/common/services/cross-window-watcher'
  61. import auditFormTopBanner from '../../components/audit-form-top-banner'
  62. import components from './_import-components/audit-template-detail-import'
  63. export default {
  64. name: 'AuditTemplateDetail',
  65. metaInfo: {
  66. title: '审计模板库',
  67. },
  68. components: {
  69. ...components,
  70. auditFormTopBanner,
  71. },
  72. data() {
  73. return {}
  74. },
  75. methods: {
  76. close(flag) {
  77. crossWindowWatcher.notifyChange(this.$route.fullPath, flag)
  78. window.close()
  79. },
  80. saveForm() {
  81. alert('save')
  82. },
  83. getFormFieldValue(name) {
  84. const objArry = this.$refs.form.getFieldValue(name)
  85. if (objArry !== undefined) {
  86. if (objArry.length > 0) {
  87. let result = ''
  88. objArry.forEach((e) => {
  89. result += e.name + ','
  90. })
  91. return result.substr(0, result.length - 1)
  92. }
  93. }
  94. return ''
  95. },
  96. },
  97. }
  98. </script>
  99. <style module lang="scss">
  100. @import '@/webflow/sd-flow-form.scss';
  101. .formDiv {
  102. padding: 22px;
  103. :global(.buttons_sd-detail-form_common) {
  104. :global(.ant-form-item-control-wrapper) {
  105. padding-left: 24%;
  106. padding-top: 4%;
  107. }
  108. }
  109. .tr_border {
  110. box-sizing: border-box;
  111. border-right: 1px solid #e8e8e8;
  112. border-left: 1px solid #e8e8e8;
  113. }
  114. :global(.title_sd-detail-form_common) {
  115. font-size: 1.5em;
  116. text-align: center;
  117. }
  118. :global(.buttons_sd-detail-form_common) {
  119. display: none;
  120. }
  121. }
  122. .close-btn,
  123. .save-btn {
  124. font-weight: 400;
  125. font-size: 16px;
  126. color: #fff;
  127. border: none;
  128. position: absolute;
  129. top: 18px;
  130. cursor: pointer;
  131. }
  132. .close-btn {
  133. right: 15px;
  134. }
  135. .save-btn {
  136. right: 80px;
  137. }
  138. .page {
  139. height: 100%;
  140. :global(.sd-frame-main) {
  141. height: 100%;
  142. padding: 10px;
  143. overflow: auto;
  144. }
  145. }
  146. .header {
  147. background: linear-gradient(to right, #3f9bff, #0e7df6);
  148. .header-title {
  149. color: #ffffff;
  150. font-size: 25px;
  151. font-weight: 400;
  152. display: inline;
  153. }
  154. }
  155. </style>