audit-summarry-rectification-list.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845
  1. <template>
  2. <audit-form-top-banner :form-data="'readonly'">
  3. <a-spin :spinning="isshowLoading" tip="正在导出请稍等……" size="large">
  4. <a-card :class="$style.conditions">
  5. <a-form-model
  6. ref="advancedSearchForm"
  7. class="ant-advanced-search-form"
  8. :model="form"
  9. v-bind="formItemLayout"
  10. :layout="'inline'"
  11. >
  12. <div :class="$style.buttonContent">
  13. <a-button type="primary" :loading="exportLoading" @click="DecideClick"
  14. >判定问题</a-button
  15. >
  16. <a-button @click="exportExcel">导出</a-button>
  17. </div>
  18. </a-form-model>
  19. </a-card>
  20. <div>
  21. <a-card>
  22. <sd-data-table
  23. ref="SJMXDataTable"
  24. :key="dataKey"
  25. :row-key="(record, index) => index"
  26. :columns="columns"
  27. :process-req="processReq"
  28. form-id="iamModelMaintain"
  29. :scroll="{ x: '100%' }"
  30. :data-url="dataUrl"
  31. :hide-pagination="true"
  32. >
  33. <div slot="questionFlag" slot-scope="text, record">
  34. <span v-if="record.questionFlag === 0">否</span>
  35. <span v-if="record.questionFlag === 1">是</span>
  36. <span v-else></span>
  37. </div>
  38. <div slot="reformStatus" slot-scope="text, record">
  39. <span v-if="record.reformStatus === 0" title="期限内已整改">期限内已整改</span>
  40. <span v-if="record.reformStatus === 1" title="逾期已整改">逾期已整改</span>
  41. <span v-if="record.reformStatus === 2" title="期限内未整改完成"
  42. >期限内未整改完成</span
  43. >
  44. <span v-if="record.reformStatus === 3" title="逾期未整改完成">逾期未整改完成</span>
  45. </div>
  46. <div slot="action" slot-scope="text, record">
  47. <!-- 如果 -->
  48. <a-button type="link" @click="showModal(record)">详情</a-button>
  49. <a-button
  50. type="link"
  51. @click="
  52. () => {
  53. modelLogicContent = record.configIdea
  54. modelLogicVisible = true
  55. }
  56. "
  57. >模型逻辑</a-button
  58. >
  59. <!-- :disabled="record.questionFlag === 0" -->
  60. <a-button type="link" @click="exportClick(record)">下载</a-button>
  61. <a-button
  62. v-if="ifSaveShow(record)"
  63. type="link"
  64. :disabled="record.endType === 1 || record.endType === 5"
  65. @click="openTJSH(record)"
  66. >提交</a-button
  67. >
  68. <a-button type="link" @click="askClick(record)">整改要求</a-button>
  69. </div>
  70. </sd-data-table>
  71. </a-card>
  72. <a-modal
  73. v-model="visibleDecide"
  74. class="ant-advanced-search-form"
  75. title="问题判定"
  76. width="700px"
  77. @ok="DecideFormhandleOk"
  78. @cancel="DecideFormhandleCancel"
  79. >
  80. <a-form-model
  81. ref="DecideForm"
  82. :model="DecideForm"
  83. v-bind="formItemLayout"
  84. :rules="{
  85. nonQuestionDesc: [{ required: true, message: '请填写问题说明', trigger: 'blur' }],
  86. }"
  87. >
  88. <a-form-model-item label="问题判定" prop="questionFlag">
  89. <a-select
  90. v-model="DecideForm.questionFlag"
  91. placeholder="请选择问题判定"
  92. @change="decFormChange"
  93. >
  94. <a-select-option :value="1">是</a-select-option>
  95. <a-select-option :value="0">否</a-select-option>
  96. </a-select>
  97. </a-form-model-item>
  98. <a-form-model-item
  99. v-if="DecideForm.questionFlag !== 1"
  100. prop="nonQuestionTag"
  101. label="问题标签"
  102. >
  103. <a-select
  104. v-model="DecideForm.problemStatementId"
  105. placeholder="请选择问题标签"
  106. @change="questionChange"
  107. >
  108. <a-select-option
  109. v-for="(item, index) in nonQuestionList"
  110. :key="item.id"
  111. :value="item.id"
  112. >{{ item.name }}</a-select-option
  113. >
  114. </a-select>
  115. </a-form-model-item>
  116. <a-form-model-item
  117. v-if="DecideForm.questionFlag !== 1"
  118. prop="nonQuestionDesc"
  119. label="问题说明"
  120. >
  121. <a-input
  122. v-model="DecideForm.nonQuestionDesc"
  123. placeholder="请填写问题说明"
  124. :auto-size="{ minRows: 5, maxRows: 5 }"
  125. type="textarea"
  126. :disabled="isDescStatus"
  127. />
  128. </a-form-model-item>
  129. </a-form-model>
  130. </a-modal>
  131. <a-modal
  132. v-model="askvisible"
  133. class="ant-advanced-search-form"
  134. title="整改要求"
  135. :footer="null"
  136. width="700px"
  137. @ok="askFormhandleOk"
  138. @cancel="askFormCancel"
  139. >
  140. <a-form-model ref="askForm" :model="askForm" v-bind="formItemLayout">
  141. <a-form-model-item prop="reformAsk" label="整改要求说明">
  142. <a-input
  143. v-model="askForm.reformAsk"
  144. placeholder="暂无整改要求说明"
  145. read-only
  146. :auto-size="{ minRows: 5, maxRows: 5 }"
  147. type="textarea"
  148. />
  149. </a-form-model-item>
  150. </a-form-model>
  151. </a-modal>
  152. </div>
  153. <audit-model-logic v-model="modelLogicVisible" :content="modelLogicContent" />
  154. </a-spin>
  155. </audit-form-top-banner>
  156. </template>
  157. <script>
  158. import components from './_import-components/audit-summarry-list-import'
  159. import axios from '@/common/services/axios-instance'
  160. import { message, Modal } from 'ant-design-vue'
  161. import AuditRiskbraryService from './riskLibrary'
  162. import moment from 'moment/moment'
  163. import storeMixin, { getUserInfo } from '@/common/store-mixin'
  164. import download from '@/common/services/download'
  165. import sdDataTable from '@/common/components/sd-data-table.vue'
  166. import auditFormTopBanner from './audit-top-banner'
  167. import auditModelLogic from './audit-model-logic'
  168. import { sdSessionStorage } from '@/common/services/storage-service'
  169. export default {
  170. name: 'AuditSummarryRectificationList',
  171. metaInfo: {
  172. title: '审计问题明细-整改类',
  173. },
  174. components: {
  175. ...components,
  176. auditModelLogic,
  177. sdDataTable,
  178. auditFormTopBanner,
  179. },
  180. mixins: [storeMixin],
  181. data() {
  182. return {
  183. dataUrl: 'api/xcoa-mobile/v1/iamquestionreform/iamQuestionReformSummary',
  184. modelLogicVisible: false,
  185. modelLogicContent: '',
  186. exportExpressions: [],
  187. modelDetail: {},
  188. // 问题标签
  189. isDescStatus: false,
  190. mainSendPersonal: [],
  191. visible: false,
  192. visibleDecide: false,
  193. visibleRectification: false,
  194. askvisible: false,
  195. exportLoading: false,
  196. dataKey: 0,
  197. ModalquestionDetail: '',
  198. form: {
  199. reformStatus: null,
  200. endType: null,
  201. },
  202. reformDeadline: [],
  203. pushDate: [],
  204. DecideForm: {
  205. questionFlag: null,
  206. nonQuestionTag: null,
  207. nonQuestionDesc: null,
  208. nonQuestionTagId: null,
  209. problemStatementId: null,
  210. // ids: [],
  211. },
  212. lockId: '',
  213. attachments: [],
  214. fileList: [],
  215. infoProperties: {},
  216. RectificationForm: {
  217. reformDesc: undefined,
  218. attachment: undefined,
  219. id: '',
  220. fileName: '',
  221. },
  222. askForm: {
  223. reformAsk: undefined,
  224. id: '',
  225. },
  226. nonQuestionList: [],
  227. reqData: {
  228. reformDeadlineSt: '',
  229. reformDeadlineEd: '',
  230. pushDateSt: '',
  231. pushDateEd: '',
  232. },
  233. queryData: {},
  234. formItemLayout: {
  235. labelCol: { span: 6 },
  236. wrapperCol: { span: 14 },
  237. },
  238. // 详情信息
  239. columnsDetail: [],
  240. dataDetail: [],
  241. columns: [
  242. {
  243. title: '序号',
  244. dataIndex: 'sortNumber',
  245. width: '70px',
  246. customRender: (text, record, index) => `${index + 1}`,
  247. },
  248. {
  249. title: '风险描述',
  250. width: '100px',
  251. dataIndex: 'risk',
  252. },
  253. {
  254. title: '判定问题',
  255. width: '100px',
  256. dataIndex: 'questionFlag',
  257. scopedSlots: { customRender: 'questionFlag' },
  258. },
  259. {
  260. title: '非问题标签',
  261. width: '100px',
  262. dataIndex: 'nonQuestionTag',
  263. },
  264. {
  265. title: '非问题说明',
  266. width: '100px',
  267. dataIndex: 'nonQuestionDesc',
  268. },
  269. {
  270. title: '提交说明',
  271. width: '100px',
  272. dataIndex: 'reformDesc',
  273. },
  274. {
  275. dataIndex: 'fileName',
  276. sdHidden: true,
  277. },
  278. {
  279. width: '100px',
  280. title: '提交人',
  281. dataIndex: 'reformUserAccount',
  282. },
  283. {
  284. title: '初审人',
  285. width: '100px',
  286. dataIndex: 'checker',
  287. },
  288. {
  289. width: '100px',
  290. title: '初审时间',
  291. dataIndex: 'checkDate',
  292. },
  293. {
  294. title: '复审人',
  295. width: '100px',
  296. dataIndex: 'reviewer',
  297. },
  298. {
  299. title: '复审时间',
  300. width: '100px',
  301. dataIndex: 'reviewDate',
  302. },
  303. {
  304. title: '问题性质',
  305. width: '240px',
  306. dataIndex: 'questionNature',
  307. },
  308. ],
  309. expressions: [
  310. {
  311. dataType: 'str',
  312. name: 'modelType',
  313. op: 'eq',
  314. stringValue: '1',
  315. },
  316. ],
  317. startFlowList: {},
  318. detailList: [],
  319. isshowLoading: false,
  320. }
  321. },
  322. created() {
  323. this.initColumns()
  324. this.initQueryData()
  325. },
  326. methods: {
  327. //
  328. // 初始化initQueryData
  329. initQueryData() {
  330. this.queryData = this.$route.query
  331. this.queryData.modelType = '1'
  332. },
  333. // 导出
  334. exportExcel() {
  335. this.isshowLoading = true
  336. const data = this.$refs.SJMXDataTable.data[0]
  337. const params = [
  338. {
  339. modelId: data.modelId,
  340. detailGroupId: data.detailGroupId,
  341. unitCode: data.unitCode,
  342. bussKey: data.bussKey || null,
  343. businessCode: data.businessCode,
  344. jmEventType: data.jmEventType,
  345. pushDate: data.pushDate,
  346. },
  347. ]
  348. AuditRiskbraryService.exportQuestionDetail(params)
  349. .then((res) => {
  350. if (res.status === 200) {
  351. const url = URL.createObjectURL(res.data)
  352. const filename = res.headers['content-disposition']
  353. const fname = filename.substring(filename.indexOf('filename=') + 9, filename.length)
  354. download(url, decodeURI(fname))
  355. message.success('导出成功')
  356. } else {
  357. Modal.warning({
  358. title: '提示',
  359. content: '导出报错,请联系管理员!',
  360. })
  361. return false
  362. }
  363. })
  364. .finally(() => {
  365. this.isshowLoading = false
  366. })
  367. },
  368. ifSaveShow(record) {
  369. return record.reformAuth === 1 || record.reformAuth === '1'
  370. },
  371. initColumns() {
  372. // resp_person
  373. const userInfo = getUserInfo()
  374. // account
  375. const roles = this.$store.state.sd.common.userInfo.default.roles
  376. const isExport = roles.map((val) => val.code).includes('G-1_RESPONSIBLE_PERSON')
  377. if (isExport) {
  378. this.columns.push({
  379. title: '责任人',
  380. dataIndex: 'respPerson',
  381. })
  382. }
  383. this.columns.push({
  384. title: '操作',
  385. dataIndex: 'sharedSetting',
  386. fixed: 'right',
  387. width: '300px',
  388. scopedSlots: { customRender: 'action' },
  389. })
  390. },
  391. decFormChange(val) {
  392. // 如果是是 则清空 问题标签和问题说明
  393. if (val === 1) {
  394. this.DecideForm.nonQuestionTag = null
  395. this.DecideForm.nonQuestionDesc = null
  396. this.DecideForm.nonQuestionTagId = null
  397. }
  398. },
  399. // 问题标签数据变化
  400. questionChange(val) {
  401. // 如果问题标签说明为空,则清空问题说明比需要填写
  402. // 如果不为空,则填入问题说明详情,并且不允许修改
  403. const onDesc = this.nonQuestionList.find((item) => item.id === val)
  404. const { description, name } = onDesc
  405. this.DecideForm.nonQuestionDesc = description
  406. this.DecideForm.nonQuestionTag = name
  407. // 如果详情为空或者null则 isDescStatus ==false
  408. if (description === '' || description === null) {
  409. this.isDescStatus = false
  410. } else {
  411. this.isDescStatus = true
  412. }
  413. },
  414. processReq(req) {
  415. // 获取缓存数据
  416. const cacheData = sdSessionStorage.getItem('riskDetail')
  417. req.data.maxResults = this.$route.query.maxResults * 1 || 10
  418. req.data.startPosition = this.$route.query.startPosition * 1 || 0
  419. req.data.expressions = [
  420. { dataType: 'str', name: 'id', op: 'eq', stringValue: this.$route.query.recordId },
  421. ...JSON.parse(cacheData),
  422. ]
  423. return req
  424. },
  425. handleReset() {
  426. this.$refs.advancedSearchForm.resetFields()
  427. this.reqData = {
  428. reformDeadlineSt: '',
  429. reformDeadlineEd: '',
  430. pushDateSt: '',
  431. pushDateEd: '',
  432. }
  433. this.reformDeadline = []
  434. this.pushDate = []
  435. this.handleSearch()
  436. },
  437. // 查询
  438. handleAction(type) {
  439. switch (type) {
  440. case 'serach':
  441. this.handleSearch()
  442. break
  443. }
  444. },
  445. handleSearch() {
  446. this.dataKey++
  447. },
  448. // 判断点击
  449. DecideClick() {
  450. const selectedRows = this.$refs.SJMXDataTable.data
  451. if (selectedRows[0].endType === 1 || selectedRows[0].endType === 5) {
  452. message.warning('该模型跑批数据已提交整改')
  453. return
  454. }
  455. this.visibleDecide = true
  456. axios({ url: 'api/xcoa-mobile/v1/problem-statement/all', method: 'get' }).then((res) => {
  457. res.data.length ? (this.nonQuestionList = res.data) : (this.nonQuestionList = [])
  458. })
  459. },
  460. // 判断提交
  461. DecideFormhandleOk() {
  462. // 获取选中列 modelId detailGroupId
  463. this.$refs.DecideForm.validate((valid) => {
  464. if (valid) {
  465. const data = this.$refs.SJMXDataTable.data[0]
  466. const params = {
  467. detailGroupId: data.detailGroupId,
  468. modelId: data.modelId,
  469. unitCode: data.unitCode,
  470. bussKey: data.bussKey || null,
  471. pushDate: data.pushDate,
  472. businessCode: data.businessCode,
  473. questionFlag: this.DecideForm.questionFlag,
  474. nonQuestionTag: this.DecideForm.nonQuestionTag,
  475. nonQuestionDesc: this.DecideForm.nonQuestionDesc,
  476. nonQuestionTagId: this.DecideForm.problemStatementId,
  477. }
  478. AuditRiskbraryService.batchDecide(params).then((res) => {
  479. if (res) {
  480. message.success('提交成功')
  481. this.DecideFormhandleCancel()
  482. this.handleSearch()
  483. this.$refs.SJMXDataTable.refresh()
  484. // this.$refs.DecideForm.resetFields()
  485. }
  486. })
  487. }
  488. })
  489. },
  490. // 判断取消
  491. DecideFormhandleCancel() {
  492. this.$refs.DecideForm.resetFields()
  493. this.visibleDecide = false
  494. this.DecideForm = {
  495. questionFlag: null,
  496. nonQuestionTag: null,
  497. nonQuestionDesc: null,
  498. nonQuestionTagId: null,
  499. problemStatementId: null,
  500. // ids: [],
  501. }
  502. },
  503. // 附件自定义上传
  504. customRequest(data, catnum = 0, item) {
  505. if (data.file.size === 0) {
  506. message.warn(`不能上传大小为0的文件`)
  507. return
  508. }
  509. const file = {
  510. FileName: data.file.name,
  511. Completed: 0,
  512. CatNum: catnum,
  513. }
  514. this.RectificationForm.fileName = data.file.name
  515. if (catnum === -1) {
  516. this.attachments.unshift(file)
  517. } else {
  518. this.attachments.push(file)
  519. }
  520. this.attachments = [...this.attachments]
  521. const strTime = moment().format('YYYY-MM-DD HH:mm:ss')
  522. const formData = new FormData()
  523. formData.append('file', data.file)
  524. formData.append('FileName', data.file.name)
  525. formData.append('lockId', this.lockId)
  526. formData.append('groupId', this.groupId)
  527. Object.keys(this.infoProperties).forEach((key) => {
  528. formData.append(key, this.infoProperties[key])
  529. })
  530. formData.append(
  531. 'querystring',
  532. `<file_unid></file_unid><file_name>${data.file.name}</file_name><file_size>${data.file.size}</file_size><completed>1</completed><file_create>${strTime}</file_create><file_update>${strTime}</file_update><file_editmodel>0</file_editmodel><file_lockuser>0</file_lockuser><CreateInfo>${this.userInfo.account} ${strTime}</CreateInfo><filetype></filetype><user_name>${this.userInfo.account}</user_name><UpdateInfo>${this.userInfo.account}于${strTime}创建.</UpdateInfo><TaodaInfo></TaodaInfo><CatNum>${catnum}</CatNum><Ext></Ext>`
  533. )
  534. const url = 'api/xcoa-mobile/v1/iam-attachment-extend/attachments-upload/indi'
  535. axios
  536. .post(url, formData, {
  537. headers: {
  538. 'Content-Type': 'multipart/form-data',
  539. },
  540. })
  541. .then((_) => {
  542. if (_.data.startsWith('false')) {
  543. message.error(`${data.file.name} 上传失败`)
  544. } else {
  545. data.onSuccess(_, data.file)
  546. }
  547. })
  548. .catch((e) => {
  549. throw e
  550. })
  551. },
  552. // 跳转提交流程
  553. openTJSH(data) {
  554. // 判断问题是否有值
  555. if (data.questionFlag === null) {
  556. message.warning('请对此风险数据判定是否是问题')
  557. return
  558. }
  559. const query = {
  560. // batchCode: data.batchCode,
  561. // batchName: data.batchName,
  562. risk: data.risk,
  563. businessCode: data.businessCode,
  564. eventTagName: data.eventTagName,
  565. modelTypeName: data.modelTypeName,
  566. batchName: data.modelName,
  567. batchCode: data.modelCode,
  568. detailGroupId: data.detailGroupId,
  569. modelId: data.modelId,
  570. unitCode: data.unitCode,
  571. pushDate: data.pushDate,
  572. jmEventType: data.jmEventType,
  573. bussKey: data.bussKey || null,
  574. // 非问题
  575. nonQuestionTag: data.nonQuestionTag,
  576. nonQuestionDesc: data.nonQuestionDesc,
  577. }
  578. const queryUrl = Object.keys(query)
  579. .map((key) => {
  580. return key + '=' + query[key]
  581. })
  582. .join('&')
  583. const url = '#/sd-flow-guide?code=PRODUCT_IAM_FXSJ&' + queryUrl
  584. window.open(url)
  585. },
  586. // 附件上传
  587. handleChange(info) {
  588. const status = info.file.status
  589. let fileList = [...info.fileList]
  590. fileList = fileList.slice(-1)
  591. fileList = fileList.map((file) => {
  592. if (file.response) {
  593. file.url = file.response.data
  594. }
  595. return file
  596. })
  597. this.fileList = fileList
  598. if (status === 'done') {
  599. message.success(`${info.file.name} 上传成功.`)
  600. } else if (status === 'error') {
  601. message.error(`${info.file.name} 上传失败.`)
  602. }
  603. },
  604. // 下载
  605. exportClick(row) {
  606. if (!row.attachment) {
  607. message.warning('未上传附件无法下载')
  608. return
  609. }
  610. const attachmentList = row.attachment.split(',')
  611. const fileNameList = row.fileName.split(',')
  612. for (let i = 0; i < attachmentList.length; i++) {
  613. const spliceIndex = attachmentList[i].lastIndexOf('|')
  614. const destStep = attachmentList[i].substring(spliceIndex + 1, attachmentList[i].length)
  615. download(
  616. 'api/framework/v1/task-form-process/download-attachments/' + destStep,
  617. fileNameList[i]
  618. )
  619. }
  620. },
  621. // 提交点击
  622. rectificationClick(row) {
  623. this.visibleRectification = true
  624. this.RectificationForm.id = row.id
  625. AuditRiskbraryService.startProcessPages({
  626. extParams: [{ name: 'code', value: 'PRODUCT_IAM_FXSJ' }],
  627. businessTypeId: 200362,
  628. }).then((res) => {
  629. this.startFlowList = {
  630. actionId: this.findActionId(res.data.pushButtons), // start已有获取
  631. activeStepId: res.data.activeStepId, // start已有获取
  632. auditElement: [],
  633. flowCallbackBeanName: 'subflowDataBinderCallback',
  634. flowFormModelRelationId: res.data.flowFormModelRelationId, // start已有获取
  635. flowId: res.data.processId, // start已有获取
  636. formId: res.data.processFormData.formId, // start已有获取
  637. inputs: this.mapProcessFormData(row),
  638. instId: res.data.instId, // start已有获取
  639. lockId: res.data.lockId, // start已有获取
  640. participantInfos: [], // 下一步提交获取
  641. props: { sendNotify: '', source: 'WE.OFFICE' },
  642. timer: null,
  643. }
  644. })
  645. },
  646. findActionId(list) {
  647. const arr = list.find((item) => item.buttonName === '提交')
  648. return arr.buttonId
  649. },
  650. mapProcessFormData(row) {
  651. return [
  652. { name: 'id' },
  653. { name: 'questionId', value: row.id },
  654. { name: 'title', value: '风险审核' },
  655. { name: 'businessTypeId', value: '200362' },
  656. { name: 'businessTypeName', value: '风险问题审计' },
  657. { name: 'batchCode', value: row.batchCode },
  658. { name: 'batchName', value: row.batchName },
  659. { name: 'businessCode', value: row.businessCode },
  660. { name: 'eventTagName', value: row.eventTagName },
  661. { name: 'modelTypeName', value: row.modelTypeName },
  662. { name: 'viewAccount', value: row.viewAccount },
  663. { name: 'risk', value: row.risk },
  664. { name: 'questionNature' },
  665. { name: 'personResponsible', value: row.personResponsible },
  666. { name: 'belongedOrgId', value: '-1' },
  667. ]
  668. },
  669. // 提交确认
  670. RectificationhandleOk() {
  671. const attachment = this.fileList.length ? this.fileList[0].url : ''
  672. const fileName = this.fileList.length
  673. ? this.fileList[0].url
  674. ? this.RectificationForm.fileName
  675. : ''
  676. : ''
  677. const param = {
  678. reformStatus: 1,
  679. reformDesc: this.RectificationForm.reformDesc,
  680. id: this.RectificationForm.id,
  681. attachment: attachment,
  682. fileName: fileName,
  683. }
  684. AuditRiskbraryService.saveIamQuestionReform(param).then((res) => {
  685. if (res) {
  686. message.success('提交成功')
  687. this.startFlowList.inputs.push(
  688. { name: 'attachment', value: attachment },
  689. { name: 'fileName', value: fileName },
  690. { name: 'reformDesc', value: this.RectificationForm.reformDesc }
  691. )
  692. // this.visibleRectification = false
  693. // this.handleSearch()
  694. setTimeout(() => {
  695. this.$refs.pRelSelect.openPicker()
  696. }, 0)
  697. }
  698. })
  699. },
  700. // 提交关闭
  701. RectificationCancel() {
  702. this.visibleRectification = false
  703. },
  704. // 整改说明点击弹框
  705. askClick(row) {
  706. this.askvisible = true
  707. this.askForm.id = row.id
  708. this.askForm.reformAsk = row.reformAsk
  709. },
  710. // 整改说明提交
  711. askFormhandleOk() {
  712. const param = {
  713. reformDesc: this.askForm.reformAsk,
  714. id: this.askForm.id,
  715. }
  716. AuditRiskbraryService.saveIamQuestionReform(param).then((res) => {
  717. if (res) {
  718. message.success('提交成功')
  719. this.$refs.askForm.resetFields()
  720. this.askvisible = false
  721. this.handleSearch()
  722. }
  723. })
  724. },
  725. // 整改说明关闭
  726. askFormCancel() {
  727. this.$refs.askForm.resetFields()
  728. this.askvisible = false
  729. },
  730. changep(values) {
  731. const arr = values.map((item) => {
  732. return {
  733. attrs: { we_expanded: 'false', we_selected: 'false' },
  734. checkable: true,
  735. code: item.code,
  736. key: item.code,
  737. name: item.name,
  738. title: item.name,
  739. type: item.type,
  740. }
  741. })
  742. const spliceIndex = this.startFlowList.actionId.indexOf('.')
  743. const destStep = this.startFlowList.actionId.substring(0, spliceIndex) + '.2'
  744. this.startFlowList.participantInfos.push({ destStepId: destStep, participants: arr })
  745. AuditRiskbraryService.startDispatch(this.startFlowList).then((res) => {
  746. if (res.data.flowInstanceResult.length) {
  747. message.success('提交成功')
  748. this.RectificationForm.reformDesc = undefined
  749. this.RectificationForm.attachment = undefined
  750. this.RectificationForm.id = ''
  751. this.RectificationForm.fileName = ''
  752. this.fileList = []
  753. this.visibleRectification = false
  754. this.handleSearch()
  755. }
  756. })
  757. },
  758. showModal(row) {
  759. // 审核状态
  760. this.detailStatus = row.status !== 1
  761. const params = {
  762. modelId: row.modelId,
  763. detailGroupId: row.detailGroupId,
  764. jmEventType: row.jmEventType,
  765. businessCode: row.businessCode,
  766. bussKey: row.bussKey || null,
  767. pushDate: row.pushDate,
  768. unitCode: row.unitCode,
  769. }
  770. const formData = new FormData()
  771. Object.keys(params).forEach((key) => {
  772. formData.append(key, params[key])
  773. })
  774. this.modelDetail = {
  775. modelDomainName: row.modelDomainName,
  776. batchName: row.modelName,
  777. batchCode: row.modelCode,
  778. riskData: row.risk,
  779. }
  780. // 地址audit-risk-detail 参数params
  781. const detailJson = JSON.stringify(this.modelDetail)
  782. const queryJson = JSON.stringify(params)
  783. window.open(
  784. `#/audit-risk-detail?queryJson=${queryJson}&modelDetail=${detailJson}&detailStatus=${this.detailStatus}`
  785. )
  786. },
  787. cancel() {
  788. this.visible = false
  789. this.dataDetail = []
  790. this.columnsDetail = []
  791. this.modelDetail = {}
  792. },
  793. },
  794. }
  795. </script>
  796. <style module lang="scss">
  797. @use '@/common/design' as *;
  798. .wrap-height {
  799. height: 100%;
  800. .row-height {
  801. display: flex;
  802. flex: auto;
  803. height: 100%;
  804. .rightcard {
  805. flex: 1;
  806. width: calc(100% - 20%);
  807. height: 100%;
  808. }
  809. }
  810. }
  811. .button-content {
  812. button {
  813. margin: 0 4px;
  814. }
  815. }
  816. .no-action {
  817. padding: 0 15px;
  818. color: $text-color-secondary;
  819. }
  820. .detail {
  821. width: 100%;
  822. overflow-x: auto;
  823. }
  824. .model-detail {
  825. display: flex;
  826. margin-bottom: 10px;
  827. span {
  828. margin-right: 20px;
  829. }
  830. }
  831. </style>