ic-remind-config.vue 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195
  1. <template>
  2. <span :class="$style.remindconfig">
  3. <audit-form-top-banner :handel-save-form="saveForm" @handelSaveForm="saveForm">
  4. <sd-detail-form
  5. ref="docform"
  6. :key="key"
  7. page-id="ic/defect/remindConfig/icRemindConfig"
  8. :record-id="recordId"
  9. :class="[$style.form]"
  10. @saved="saved"
  11. >
  12. <template v-slot="{ model, fields }">
  13. <table :class="$style.remindTable">
  14. <tr
  15. ><td style="border:none" colspan="4">
  16. <audit-advanced-group
  17. :expand="basicExpand"
  18. :expand-str="'basicExpand'"
  19. :group-label="'《整改计划》提醒规则设置'"
  20. tablestyle="''"
  21. @changedClick="changedClick"
  22. ></audit-advanced-group> </td
  23. ></tr>
  24. <tr v-show="basicExpand">
  25. <!-- 计划到期前天数 -->
  26. <sd-form-item-td name="planTimeLimit" :colspan="3" />
  27. </tr>
  28. <tr v-show="basicExpand">
  29. <!-- 计划提醒对象 -->
  30. <sd-form-item-td name="planRemindObject" :colspan="3" />
  31. </tr>
  32. <tr v-show="basicExpand">
  33. <!-- 计划提醒方式 -->
  34. <sd-form-item-td name="planRemindType" :colspan="3" />
  35. </tr>
  36. <tr
  37. ><td style="border:none" colspan="4">
  38. <audit-advanced-group
  39. :expand="TxExpand"
  40. :expand-str="'TxExpand'"
  41. :group-label="'《整改反馈》提醒规则设置'"
  42. tablestyle="''"
  43. @changedClick="changedClick"
  44. ></audit-advanced-group> </td
  45. ></tr>
  46. <tr v-show="TxExpand">
  47. <!-- 反馈频率 -->
  48. <sd-form-item-td
  49. name="feedbackFrequency"
  50. :colspan="3"
  51. @change="changeFeedbackFrequency"
  52. />
  53. </tr>
  54. <tr v-show="TxExpand">
  55. <!-- 提醒设置 -->
  56. <sd-form-item-td name="remindSetting" :colspan="3">
  57. <template>
  58. <ic-remind-setting
  59. v-model="model.remindSetting"
  60. :feedback-cycle="model.feedbackFrequency"
  61. />
  62. </template>
  63. </sd-form-item-td>
  64. </tr>
  65. <tr v-show="TxExpand">
  66. <!-- 反馈提醒对象 -->
  67. <sd-form-item-td name="feedbackRemindObject" :colspan="3" />
  68. </tr>
  69. <tr v-show="TxExpand">
  70. <!-- 反馈提醒方式 -->
  71. <sd-form-item-td name="feedbackRemindType" :colspan="3" />
  72. </tr>
  73. <tr
  74. ><td style="border:none" colspan="4">
  75. <audit-advanced-group
  76. :expand="CqtxExpand"
  77. :expand-str="'CqtxExpand'"
  78. :group-label="'《整改超期》提醒规则设置'"
  79. tablestyle="''"
  80. @changedClick="changedClick"
  81. ></audit-advanced-group> </td
  82. ></tr>
  83. <tr v-show="CqtxExpand">
  84. <!-- 整改提醒对象 -->
  85. <sd-form-item-td name="rectificationRemindObject" :colspan="3" />
  86. </tr>
  87. <tr v-show="CqtxExpand">
  88. <!-- 整改提醒方式 -->
  89. <sd-form-item-td name="rectificationRemindType" :colspan="3" />
  90. <sd-form-item-td :hidden="true" name="orgId" />
  91. </tr>
  92. </table>
  93. </template>
  94. </sd-detail-form>
  95. </audit-form-top-banner>
  96. </span>
  97. <!-- </div> -->
  98. </template>
  99. <script>
  100. import { Message } from 'ant-design-vue'
  101. import axios from '@/common/services/axios-instance'
  102. import auditFormTopBanner from '../../../components/audit-form-top-banner'
  103. import auditAdvancedGroupMixins from '../../../components/audit-advanced-group-mixins'
  104. import auditAdvancedGroup from '../../../components/audit-advanced-group.vue'
  105. import icRemindConfigService from './ic-remind-config-service'
  106. import icRemindSetting from './ic-remind-setting'
  107. import components from './_import-components/ic-remind-config-import'
  108. export default {
  109. name: 'IcRemindConfig',
  110. metaInfo: {
  111. title: '整改提醒',
  112. },
  113. components: {
  114. ...components,
  115. auditFormTopBanner,
  116. icRemindSetting,
  117. auditAdvancedGroup,
  118. },
  119. mixins: [auditAdvancedGroupMixins],
  120. data() {
  121. return {
  122. recordId: null,
  123. key: 0,
  124. basicExpand: true,
  125. TxExpand: true,
  126. CqtxExpand: true,
  127. }
  128. },
  129. created() {
  130. this.init()
  131. },
  132. methods: {
  133. saved() {
  134. Message.success({ content: '保存成功!' }, 1).then(() => {})
  135. },
  136. // 保存
  137. saveForm() {
  138. this.$refs.docform.saveBtnClick()
  139. },
  140. init() {
  141. axios({
  142. url: `api/xcoa-mobile/v1/iam-audit-frame-item/getAuditOrgId`,
  143. }).then((resMm) => {
  144. if (resMm.data) {
  145. const params = { auditOrgId: resMm.data }
  146. icRemindConfigService.findIamIcRemindConfigEntity(params).then((res) => {
  147. if (res.data) {
  148. this.recordId = res.data.id
  149. this.key++
  150. }
  151. })
  152. }
  153. })
  154. },
  155. // 频率
  156. changeFeedbackFrequency(value) {
  157. if (value === 1) {
  158. // 月
  159. } else if (value === 2) {
  160. // 季
  161. } else if (value === 3) {
  162. // 半年
  163. } else if (value === 4) {
  164. // 年
  165. }
  166. },
  167. },
  168. }
  169. </script>
  170. <style module lang="scss">
  171. @use '@/common/design' as *;
  172. @import '@/webflow/sd-flow-form.scss';
  173. .remind-table {
  174. table-layout: auto !important;
  175. :global(.ant-form-item-label) {
  176. width: 15% !important;
  177. }
  178. }
  179. .remindconfig {
  180. :global(.ant-layout) {
  181. background: #fff;
  182. }
  183. :global(.ant-layout-header) {
  184. background: #fff;
  185. }
  186. :global(.close-btn_audit-form-top-banner_product) {
  187. display: none;
  188. }
  189. }
  190. </style>