spic-suggestfeedback-form.vue 8.1 KB

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