spic-riskfeedback-form.vue 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258
  1. <template>
  2. <div :class="[$style.odrForm, $style.rectprojectForm]">
  3. <sd-webflow
  4. ref="flow"
  5. :validate-form="validForm"
  6. :removed-tabs="['sdRelatedDoc']"
  7. @actionBtnClick="actionBtnClick"
  8. >
  9. <template v-slot:form="{ model, fields, FlowData }">
  10. <table>
  11. <tr>
  12. <td style="border:none">
  13. <audit-advanced-group
  14. :expand="infoExpand"
  15. :expand-str="'infoExpand'"
  16. :group-label="'基本信息'"
  17. tablestyle="''"
  18. @changedClick="changedClick"
  19. ></audit-advanced-group>
  20. </td>
  21. </tr>
  22. </table>
  23. <table v-show="infoExpand">
  24. <colgroup>
  25. <col style="width: 180px;"/>
  26. <col />
  27. <col style="width: 180px;"/>
  28. <col
  29. /></colgroup>
  30. <tr>
  31. <!-- 审计发现标题 -->
  32. <sd-form-item-td name="findingTitle" readonly :label="'问题名称(定性描述)'">
  33. {{ model.findingTitle }}
  34. </sd-form-item-td>
  35. <!-- 审计发现编号 -->
  36. <sd-form-item-td name="findingCode" readonly :label="'问题编号'">
  37. {{ model.findingCode }}
  38. </sd-form-item-td>
  39. </tr>
  40. <!-- <tr> -->
  41. <!-- 审计问题类别 -->
  42. <!-- <sd-form-item-td name="findType" readonly :label="'问题类别'">
  43. {{ model.findType }}
  44. </sd-form-item-td> -->
  45. <!-- 问题分类 -->
  46. <!-- <sd-form-item-td name="problemCategoryFunction" readonly :label="'问题分类'" /> -->
  47. <!-- </tr> -->
  48. <tr>
  49. <!-- 审计问题描述 -->
  50. <sd-form-item-td name="findDesc" :colspan="3" readonly :label="'描述'">
  51. {{ model.findDesc }}
  52. </sd-form-item-td>
  53. </tr>
  54. <tr>
  55. <!-- 问题下发时间-->
  56. <sd-form-item-td name="creationTime" :colspan="3" readonly :label="'问题下发时间'">
  57. {{ model.creationTime }}
  58. </sd-form-item-td>
  59. </tr>
  60. </table>
  61. <table>
  62. <tr>
  63. <td style="padding-left:5px;border:none">
  64. <audit-advanced-group
  65. :expand="findExpand"
  66. :expand-str="'findExpand'"
  67. :group-label="'风险落实情况'"
  68. tablestyle="''"
  69. @changedClick="changedClick"
  70. ></audit-advanced-group>
  71. </td>
  72. </tr>
  73. </table>
  74. <table v-show="findExpand">
  75. <colgroup>
  76. <col style="width: 180px;"/>
  77. <col />
  78. <col style="width: 180px;"/>
  79. <col
  80. /></colgroup>
  81. <tr>
  82. <!-- 整改责任部门 -->
  83. <sd-form-item-td name="responsibleDeptName" :label="'整改责任部门'" />
  84. <!-- 直接责任人 -->
  85. <sd-form-item-td name="directResponsible" :label="'直接责任人'" />
  86. </tr>
  87. <tr>
  88. <!-- 整改类别 -->
  89. <sd-form-item-td name="rectType" :label="'风险状态'">
  90. <a-select
  91. v-model="model.rectType"
  92. @change="handlerRectType(model, model.rectType, fields)"
  93. >
  94. <a-select-option
  95. v-for="item in fields.rectType.attr.selectListItem.filter((itc) =>
  96. ['04', '05'].includes(itc.value)
  97. )"
  98. :key="item.value"
  99. :value="item.value"
  100. >
  101. {{ item.label }}
  102. </a-select-option>
  103. </a-select>
  104. <!-- <template v-slot>
  105. {{ JSON.parse(model.rectType)[0].name }}
  106. {{ rtgetjson(model.rectType) }}
  107. >
  108. </template> -->
  109. </sd-form-item-td>
  110. </tr>
  111. <tr>
  112. <!-- 说明 -->
  113. <sd-form-item-td name="remark" :colspan="3" :label="'说明'"
  114. ><a-textarea v-model="model.remark" :rows="3" />
  115. </sd-form-item-td>
  116. </tr>
  117. <tr>
  118. <!-- 附件 -->
  119. <sd-form-item-td name="attachment" :colspan="3" />
  120. </tr>
  121. <tr>
  122. <!-- 问题性质 -->
  123. <sd-form-item-td name="problemNature" :colspan="3" :hidden="true" />
  124. </tr>
  125. </table>
  126. </template>
  127. </sd-webflow>
  128. </div>
  129. </template>
  130. <script>
  131. import axios from '@/common/services/axios-instance'
  132. import auditAdvancedGroup from '@product/iam/components/audit-advanced-group.vue'
  133. import auditAdvancedGroupMixins from '@product/iam/components/audit-advanced-group-mixins'
  134. import components from './_import-components/spic-riskfeedback-form-import'
  135. export default {
  136. name: 'SpicRiskfeedbackForm',
  137. metaInfo: {
  138. title: '审计风险反馈',
  139. },
  140. components: {
  141. ...components,
  142. auditAdvancedGroup,
  143. },
  144. mixins: [auditAdvancedGroupMixins],
  145. data() {
  146. return {
  147. projectId: '',
  148. infoExpand: true,
  149. findExpand: true,
  150. groupId: '',
  151. rectTypeOptions: [],
  152. }
  153. },
  154. mounted() {
  155. // 初始化数据字典信息
  156. this.initDictionaryInfo()
  157. let query = {}
  158. if (this.$route.query.extParams) {
  159. query = JSON.parse(this.$route.query.extParams)
  160. } else {
  161. query = {
  162. id: this.$refs.flow.getFieldValue('id'),
  163. }
  164. }
  165. axios({
  166. url: `api/xcoa-mobile/v1/spicrectfeedback/getInfoById?id=${query.id}`,
  167. method: 'get',
  168. }).then((res) => {
  169. this.$refs.flow.setFieldValue('findingTitle', res.data.findingTitle)
  170. this.$refs.flow.setFieldValue('findingCode', res.data.findingCode)
  171. // this.$refs.flow.setFieldValue('findType', res.data.findType)
  172. this.$refs.flow.setFieldValue('findDesc', res.data.findDesc)
  173. this.$refs.flow.setFieldValue('creationTime', res.data.creationTime)
  174. // this.$refs.flow.setFieldValue('problemCategoryFunction', res.data.problemCategoryFunction)
  175. })
  176. },
  177. methods: {
  178. initDictionaryInfo() {
  179. // 获取审计流程下拉框信息
  180. axios({
  181. url: 'api/xcoa-mobile/v1/iam-law/dictionary?key=RECT_TYPE',
  182. method: 'get',
  183. }).then((res) => {
  184. if (res.status === 200) {
  185. var newArr = []
  186. res.data.forEach((item) => {
  187. if (item.id === '04' || item.id === '05') {
  188. newArr.push(item)
  189. }
  190. })
  191. this.rectTypeOptions = newArr
  192. }
  193. })
  194. },
  195. fngetjson(data) {
  196. if (data !== undefined && data !== '') {
  197. if (typeof JSON.parse(data) === 'object') {
  198. return JSON.parse(data).text
  199. } else {
  200. return data
  201. }
  202. } else {
  203. return ''
  204. }
  205. },
  206. actionBtnClick(evt, { button, FlowData }) {
  207. // debugger
  208. evt.waitUntil(
  209. new Promise((resolve, reject) => {
  210. if (button.buttonId === 'G_1_RISK_FEED_BACK.7') {
  211. // 开始-> 转其他人反馈环节
  212. this.$refs.flow.FlowData.processFormData.processFormPropertyValues.find((item) => {
  213. return item.name === 'rectType'
  214. }).required = false
  215. this.$refs.flow.FlowData.processFormData.processFormPropertyValues.find((item) => {
  216. return item.name === 'remark'
  217. }).required = false
  218. }
  219. if (button.buttonId === 'G_1_RISK_FEED_BACK.1') {
  220. // 开始-> 转其他人反馈环节
  221. this.$refs.flow.FlowData.processFormData.processFormPropertyValues.find((item) => {
  222. return item.name === 'rectType'
  223. }).required = true
  224. this.$refs.flow.FlowData.processFormData.processFormPropertyValues.find((item) => {
  225. return item.name === 'remark'
  226. }).required = true
  227. }
  228. resolve()
  229. })
  230. )
  231. },
  232. },
  233. }
  234. </script>
  235. <style module lang="scss">
  236. @use '@/common/design' as *;
  237. .btnselect {
  238. position: relative;
  239. float: right;
  240. .batchselect {
  241. z-index: 100;
  242. margin-right: 190px;
  243. }
  244. }
  245. :global(.ant-modal-content) {
  246. :global(.ant-input-number) {
  247. width: 100%;
  248. }
  249. }
  250. </style>