audit-issued-form.vue 40 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174
  1. <template>
  2. <sd-webflow
  3. ref="docform"
  4. :key="key"
  5. :validate-form="validForm"
  6. :removed-tabs="['sdRelatedDoc']"
  7. @actionBtnClick="actionBtnClick"
  8. >
  9. <template v-slot:form="{ model, fields, FlowData }">
  10. <!-- 初始化模型基础信息 -->
  11. <table v-if="isInitData || initData(model, fields, FlowData)">
  12. <tr>
  13. <td colspan="4" style="border:none">
  14. <audit-advanced-group
  15. :expand="auditBaseGroup"
  16. :expand-str="'auditBaseGroup'"
  17. :group-label="'风险审计信息'"
  18. @changedClick="changedClick"
  19. />
  20. </td>
  21. </tr>
  22. <template v-if="auditBaseGroup">
  23. <tr v-for="(item, i) in baseFormData" :key="i">
  24. <template v-for="(child, j) in item">
  25. <!-- 是关注类并且是 -->
  26. <sd-form-item-td
  27. v-if="!(isFocus && child.name === '整改说明')"
  28. :key="j"
  29. :name="child.key"
  30. :label="child.name"
  31. :input-props="{ disabled: true }"
  32. :colspan="child?.col || 1"
  33. >
  34. <a-textarea
  35. v-if="child.name === '整改说明' || child.name === '关注风险'"
  36. v-model="model[child.key]"
  37. :auto-size="{ minRows: 3, maxRows: 5 }"
  38. :disabled="true"
  39. ></a-textarea>
  40. </sd-form-item-td>
  41. </template>
  42. </tr>
  43. </template>
  44. </table>
  45. <div v-if="auditBaseGroup" :class="$style.onlydiv">
  46. <!--todo 模型逻辑 -->
  47. <p :class="$style.modelIdea">模型逻辑:</p>
  48. <SdQuillEditor ref="quillEdit" v-model="model.configIdea" :options="editorOption" />
  49. <div :class="$style.noselect"></div>
  50. </div>
  51. <!-- 线索信息 -->
  52. <table>
  53. <tr>
  54. <td colspan="4" style="border:none">
  55. <audit-advanced-group
  56. :expand="auidtInfoGroup"
  57. :expand-str="'auidtInfoGroup'"
  58. :group-label="'审计线索信息'"
  59. @changedClick="changedClick"
  60. />
  61. </td>
  62. </tr>
  63. </table>
  64. <div v-if="auidtInfoGroup" :class="$style.onlydiv">
  65. <sd-table
  66. :columns="columnsDetail"
  67. :data-source="dataDetail"
  68. :row-key="(_, index) => index"
  69. :loading="loading"
  70. :scroll="{ x: 1150 }"
  71. >
  72. </sd-table>
  73. </div>
  74. <!-- 整改人能看到的模块 -->
  75. <template v-if="logInfo === 1 && !isFocus">
  76. <!-- 判定问题 -->
  77. <table>
  78. <tr>
  79. <td colspan="4" style="border:none">
  80. <audit-advanced-group
  81. :expand="auditJudgeGroup"
  82. :expand-str="'auditJudgeGroup'"
  83. :group-label="'判定问题'"
  84. @changedClick="changedClick"
  85. />
  86. </td>
  87. </tr>
  88. <template v-if="auditJudgeGroup">
  89. <tr>
  90. <sd-form-item-td :name="'questionFlag'" :label="'是否为问题'">
  91. <a-select v-model="questionFormData.questionFlag" placeholder="请选择问题判定">
  92. <a-select-option :value="1">是</a-select-option>
  93. <a-select-option :value="0">否</a-select-option>
  94. </a-select>
  95. </sd-form-item-td>
  96. <sd-form-item-td
  97. v-if="questionFormData.questionFlag === 0"
  98. :name="'nonQuestionTag'"
  99. :label="'非问题标签'"
  100. >
  101. <a-select
  102. v-model="questionFormData.questionId"
  103. placeholder="请选择非问题标签"
  104. @change="questionChange"
  105. >
  106. <a-select-option
  107. v-for="(item, index) in nonQuestionList"
  108. :key="item.id"
  109. :value="item.id"
  110. >{{ item.name }}</a-select-option
  111. >
  112. </a-select>
  113. </sd-form-item-td>
  114. </tr>
  115. <!-- <tr v-if="questionFormData.questionFlag === 0">-->
  116. <!-- <sd-form-item-td :colspan="3" name="nonQuestionDesc">-->
  117. <!-- <a-textarea-->
  118. <!-- v-model="questionFormData.nonQuestionDesc"-->
  119. <!-- placeholder="请填写非问题说明"-->
  120. <!-- :auto-size="{ minRows: 3, maxRows: 5 }"-->
  121. <!-- :disabled="isDescStatus"-->
  122. <!-- />-->
  123. <!-- </sd-form-item-td>-->
  124. <!-- </tr>-->
  125. </template>
  126. </table>
  127. <!-- 说明 -->
  128. <table v-if="!isFocus">
  129. <tr>
  130. <td colspan="4" style="border:none">
  131. <audit-advanced-group
  132. :expand="auditDescGroup"
  133. :expand-str="'auditDescGroup'"
  134. :group-label="'说明'"
  135. @changedClick="changedClick"
  136. />
  137. </td>
  138. </tr>
  139. <template v-if="auditDescGroup">
  140. <tr>
  141. <sd-form-item-td :colspan="3" name="reformDesc" :label="logInfo === 1 && questionFormData.questionFlag === 1 ? '整改说明' : '非问题说明'">
  142. <a-textarea
  143. v-model="model.reformDesc"
  144. :placeholder="logInfo === 1 && questionFormData.questionFlag === 1 ? '请填写整改说明' : '请填写非问题说明'"
  145. :auto-size="{ minRows: 3, maxRows: 5 }"
  146. :disabled="logInfo !== 1"
  147. />
  148. </sd-form-item-td>
  149. </tr>
  150. </template>
  151. </table>
  152. <!-- 附件 -->
  153. <table v-if="!isFocus">
  154. <tr>
  155. <td :colspan="3" style="border:none">
  156. <audit-advanced-group
  157. :expand="auditAttachmentGroup"
  158. :expand-str="'auditAttachmentGroup'"
  159. :group-label="'附件'"
  160. @changedClick="changedClick"
  161. />
  162. </td>
  163. </tr>
  164. </table>
  165. <template v-if="auditAttachmentGroup">
  166. <div :class="$style.onlydiv">
  167. <div :class="[$style.upload]">
  168. <a-upload-dragger
  169. :class="$style.uploadData"
  170. name="RectificationFile"
  171. :file-list="fileListTemp"
  172. :accept="actualAccept"
  173. :multiple="true"
  174. :custom-request="(file) => customRequest(file, 0)"
  175. @change="handleChange"
  176. >
  177. <p class="ant-upload-drag-icon"><a-icon type="inbox"/></p>
  178. <p class="ant-upload-text">请上传整改附件</p>
  179. </a-upload-dragger>
  180. <div :class="$style.uploadList">
  181. <li v-for="(item, i) in fileList" :key="i">
  182. <span>{{ item.name }}</span>
  183. <!-- 删除 -->
  184. <a-icon type="delete" style="cursor: pointer;" @click="deleteFile(i)" />
  185. </li>
  186. </div>
  187. </div>
  188. </div>
  189. </template>
  190. </template>
  191. <!--审计线索明细 -->
  192. <template v-if="logInfo > 1 && !isFocus">
  193. <table>
  194. <tr>
  195. <td :colspan="4" style="border:none">
  196. <audit-advanced-group
  197. :expand="auditXsGroup"
  198. :expand-str="'auditXsGroup'"
  199. :group-label="'审计线索明细'"
  200. @changedClick="changedClick"
  201. />
  202. </td>
  203. </tr>
  204. <template v-if="auditXsGroup">
  205. <tr>
  206. <sd-form-item-td
  207. v-if="logInfo > 1"
  208. :colspan="logInfo === 2 && 3"
  209. :name="'viewAccount'"
  210. :label="'整改人'"
  211. :input-props="{ disabled: true }"
  212. >
  213. </sd-form-item-td>
  214. <sd-form-item-td
  215. v-if="logInfo > 2"
  216. :input-props="{ disabled: true }"
  217. :name="'checker'"
  218. :label="'初审人'"
  219. >
  220. </sd-form-item-td>
  221. </tr>
  222. <!-- 非问题标签 非问题说明, 说明 附件 问题性质 -->
  223. <!-- 是否是问题 -->
  224. <tr>
  225. <sd-form-item-td :colspan="3" :name="'questionFlag'" :label="'是否为问题'">
  226. <a-select v-model="questionFormData.questionFlag" placeholder="请选择问题判定">
  227. <a-select-option :value="1">是</a-select-option>
  228. <a-select-option :value="0">否</a-select-option>
  229. </a-select>
  230. </sd-form-item-td>
  231. <!-- <sd-form-item-td :colspan="3" :name="'questionFlag'" :label="'是否为问题'">-->
  232. <!-- &lt;!&ndash; @slot read &ndash;&gt;-->
  233. <!-- <template slot="read-and-edit">-->
  234. <!--&lt;!&ndash; <a-select v-model="questionFormData.questionFlag" placeholder="请选择问题判定" :>&ndash;&gt;-->
  235. <!--&lt;!&ndash; <a-select-option :value="1">是</a-select-option>&ndash;&gt;-->
  236. <!--&lt;!&ndash; <a-select-option :value="0">否</a-select-option>&ndash;&gt;-->
  237. <!--&lt;!&ndash; </a-select>&ndash;&gt;-->
  238. <!-- <span>{{ questionFormData.questionFlag === 0 ? '否' : '是' }}</span>-->
  239. <!-- </template>-->
  240. <!-- </sd-form-item-td>-->
  241. </tr>
  242. <!-- 非问题标签 -->
  243. <tr v-if="questionFormData.questionFlag === 0">
  244. <sd-form-item-td
  245. :colspan="3"
  246. :name="'nonQuestionTag'"
  247. :input-props="{ disabled: false }"
  248. :label="'非问题标签'"
  249. >
  250. <a-select
  251. v-model="questionFormData.questionId"
  252. placeholder="请选择非问题标签"
  253. :disabled="false"
  254. @change="questionChange"
  255. >
  256. <a-select-option
  257. v-for="(item, index) in nonQuestionList"
  258. :key="item.id"
  259. :value="item.id"
  260. >{{ item.name }}
  261. </a-select-option>
  262. </a-select>
  263. </sd-form-item-td>
  264. </tr>
  265. <!-- <tr v-if="questionFormData.questionFlag === 0">-->
  266. <!-- <sd-form-item-td :name="'nonQuestionDesc'" :label="'非问题说明'" :colspan="3">-->
  267. <!-- <a-textarea-->
  268. <!-- v-model="model.nonQuestionDesc"-->
  269. <!-- :auto-size="{ minRows: 3, maxRows: 5 }"-->
  270. <!-- :disabled="true"-->
  271. <!-- />-->
  272. <!-- </sd-form-item-td>-->
  273. <!-- </tr>-->
  274. <tr>
  275. <sd-form-item-td :colspan="3" :name="'reformDesc'" :label="'说明'">
  276. <a-textarea
  277. v-model="model.reformDesc"
  278. :auto-size="{ minRows: 3, maxRows: 5 }"
  279. :disabled="false"
  280. @change="setQuestionFormData('nonQuestionDesc', model.reformDesc)"
  281. />
  282. </sd-form-item-td>
  283. </tr>
  284. <!-- 附件 -->
  285. <tr>
  286. <sd-form-item-td :colspan="3" name="attachment" :label="'附件'">
  287. <template slot="read-and-edit">
  288. <div :class="$style.onlydiv">
  289. <div :class="[$style.upload]">
  290. <a-upload-dragger
  291. :class="$style.uploadData"
  292. name="RectificationFile"
  293. :file-list="fileListTemp"
  294. :accept="actualAccept"
  295. :multiple="true"
  296. :custom-request="(file) => customRequest(file, 0)"
  297. @change="handleChange"
  298. >
  299. <p class="ant-upload-drag-icon"><a-icon type="inbox"/></p>
  300. <p class="ant-upload-text">请上传整改附件</p>
  301. </a-upload-dragger>
  302. <div :class="$style.uploadList">
  303. <li style="color: #0b75f3" v-for="(item, i) in fileList" :key="i" @click="exportClick(model, i)">
  304. <span>{{ item.name }}</span>
  305. <!-- 删除 -->
  306. <a-icon type="delete" style="cursor: pointer;" @click.stop="deleteFile(i)" />
  307. </li>
  308. </div>
  309. </div>
  310. </div>
  311. <!-- <template v-if="fileList.length > 0">-->
  312. <!-- <a-->
  313. <!-- v-for="(item, i) in fileList"-->
  314. <!-- :key="i"-->
  315. <!-- :class="$style.aclick"-->
  316. <!-- @click="exportClick(model, i)"-->
  317. <!-- >{{ item.name }}</a-->
  318. <!-- >-->
  319. <!-- </template>-->
  320. <!-- <template v-else>-->
  321. <!-- <span>暂未上传附件</span>-->
  322. <!-- </template>-->
  323. </template>
  324. </sd-form-item-td>
  325. </tr>
  326. <!-- 问题性质 -->
  327. <tr v-if="logInfo === 2 && questionFormData.questionFlag === 1">
  328. <sd-form-item-td :colspan="3" :name="'questionNature'" :label="'问题性质'">
  329. <a-cascader :options="questionNatureList" v-model="questionNature" change-on-select placeholder="请选择问题性质" />
  330. <!-- <a-select v-model="model.questionNature" placeholder="请选择问题性质">-->
  331. <!-- <a-select-option v-for="(item, i) in questionOption" :key="i" :value="item">{{-->
  332. <!-- item-->
  333. <!-- }}</a-select-option>-->
  334. <!-- </a-select>-->
  335. </sd-form-item-td>
  336. </tr>
  337. <tr v-else-if="questionFormData.questionFlag === 1">
  338. <!-- 只读问题性质 -->
  339. <sd-form-item-td
  340. :colspan="3"
  341. :name="'questionNature'"
  342. :label="'问题性质'"
  343. :input-props="{ disabled: true }"
  344. />
  345. </tr>
  346. </template>
  347. </table>
  348. </template>
  349. <template v-if="![1,2,3].includes(logInfo)">
  350. <table>
  351. <tr>
  352. <td :colspan="4" style="border:none">
  353. <audit-advanced-group
  354. :expand="auditXsGroup"
  355. :expand-str="'auditXsGroup'"
  356. :group-label="'审计线索明细'"
  357. @changedClick="changedClick"
  358. />
  359. </td>
  360. </tr>
  361. <template v-if="auditXsGroup">
  362. <tr>
  363. <sd-form-item-td
  364. :colspan="3"
  365. :name="'viewAccount'"
  366. :label="'整改人'"
  367. :input-props="{ disabled: true }"
  368. >
  369. </sd-form-item-td>
  370. <sd-form-item-td
  371. :input-props="{ disabled: true }"
  372. :name="'checker'"
  373. :label="'初审人'"
  374. >
  375. </sd-form-item-td>
  376. </tr>
  377. <!-- 非问题标签 非问题说明, 说明 附件 问题性质 -->
  378. <!-- 是否是问题 -->
  379. <tr>
  380. <!-- <sd-form-item-td :colspan="3" :name="'questionFlag'" :label="'是否为问题'">-->
  381. <!-- <a-select v-model="questionFormData.questionFlag" placeholder="请选择问题判定">-->
  382. <!-- <a-select-option :value="1">是</a-select-option>-->
  383. <!-- <a-select-option :value="0">否</a-select-option>-->
  384. <!-- </a-select>-->
  385. <!-- </sd-form-item-td>-->
  386. <sd-form-item-td :colspan="3" :name="'questionFlag'" :label="'是否为问题'">
  387. <!-- @slot read -->
  388. <template slot="read-and-edit">
  389. <!-- <a-select v-model="questionFormData.questionFlag" placeholder="请选择问题判定" :>-->
  390. <!-- <a-select-option :value="1">是</a-select-option>-->
  391. <!-- <a-select-option :value="0">否</a-select-option>-->
  392. <!-- </a-select>-->
  393. <span>{{ questionFormData.questionFlag === 0 ? '否' : '是' }}</span>
  394. </template>
  395. </sd-form-item-td>
  396. </tr>
  397. <!-- 非问题标签 -->
  398. <tr v-if="questionFormData.questionFlag === 0">
  399. <sd-form-item-td
  400. :colspan="3"
  401. :name="'nonQuestionTag'"
  402. :input-props="{ disabled: true }"
  403. :label="'非问题标签'"
  404. >
  405. <!-- <a-select-->
  406. <!-- v-model="questionFormData.questionId"-->
  407. <!-- placeholder="请选择非问题标签"-->
  408. <!-- :disabled="false"-->
  409. <!-- @change="questionChange"-->
  410. <!-- >-->
  411. <!-- <a-select-option-->
  412. <!-- v-for="(item, index) in nonQuestionList"-->
  413. <!-- :key="item.id"-->
  414. <!-- :value="item.id"-->
  415. <!-- >{{ item.name }}-->
  416. <!-- </a-select-option>-->
  417. <!-- </a-select>-->
  418. </sd-form-item-td>
  419. </tr>
  420. <!-- <tr v-if="questionFormData.questionFlag === 0">-->
  421. <!-- <sd-form-item-td :name="'nonQuestionDesc'" :label="'非问题说明'" :colspan="3">-->
  422. <!-- <a-textarea-->
  423. <!-- v-model="model.nonQuestionDesc"-->
  424. <!-- :auto-size="{ minRows: 3, maxRows: 5 }"-->
  425. <!-- :disabled="true"-->
  426. <!-- />-->
  427. <!-- </sd-form-item-td>-->
  428. <!-- </tr>-->
  429. <tr>
  430. <sd-form-item-td :colspan="3" :name="'reformDesc'" :label="'说明'">
  431. <a-textarea
  432. v-model="model.reformDesc"
  433. :auto-size="{ minRows: 3, maxRows: 5 }"
  434. :disabled="true"
  435. @change="setQuestionFormData('nonQuestionDesc', model.reformDesc)"
  436. />
  437. </sd-form-item-td>
  438. </tr>
  439. <!-- 附件 -->
  440. <tr>
  441. <sd-form-item-td :colspan="3" name="attachment" :label="'附件'">
  442. <template slot="read-and-edit">
  443. <!-- <div :class="$style.onlydiv">-->
  444. <!-- <div :class="[$style.upload]">-->
  445. <!-- <a-upload-dragger-->
  446. <!-- :class="$style.uploadData"-->
  447. <!-- name="RectificationFile"-->
  448. <!-- :file-list="fileListTemp"-->
  449. <!-- :accept="actualAccept"-->
  450. <!-- :multiple="true"-->
  451. <!-- :custom-request="(file) => customRequest(file, 0)"-->
  452. <!-- @change="handleChange"-->
  453. <!-- >-->
  454. <!-- <p class="ant-upload-drag-icon"><a-icon type="inbox"/></p>-->
  455. <!-- <p class="ant-upload-text">请上传整改附件</p>-->
  456. <!-- </a-upload-dragger>-->
  457. <!-- <div :class="$style.uploadList">-->
  458. <!-- <li v-for="(item, i) in fileList" :key="i">-->
  459. <!-- <span>{{ item.name }}</span>-->
  460. <!-- &lt;!&ndash; 删除 &ndash;&gt;-->
  461. <!-- <a-icon type="delete" style="cursor: pointer;" @click="deleteFile(i)" />-->
  462. <!-- </li>-->
  463. <!-- </div>-->
  464. <!-- </div>-->
  465. <!-- </div>-->
  466. <template v-if="fileList.length > 0">
  467. <a
  468. v-for="(item, i) in fileList"
  469. :key="i"
  470. :class="$style.aclick"
  471. @click="exportClick(model, i)"
  472. >{{ item.name }}</a
  473. >
  474. </template>
  475. <template v-else>
  476. <span>暂未上传附件</span>
  477. </template>
  478. </template>
  479. </sd-form-item-td>
  480. </tr>
  481. <!-- 问题性质 -->
  482. <!-- <tr v-if="logInfo === 2 && questionFormData.questionFlag === 1">-->
  483. <!-- <sd-form-item-td :colspan="3" :name="'questionNature'" :label="'问题性质'">-->
  484. <!-- <a-cascader :options="questionNatureList" v-model="questionNature" change-on-select placeholder="请选择问题性质" />-->
  485. <!-- <a-select v-model="model.questionNature" placeholder="请选择问题性质">-->
  486. <!-- <a-select-option v-for="(item, i) in questionOption" :key="i" :value="item">{{-->
  487. <!-- item-->
  488. <!-- }}</a-select-option>-->
  489. <!-- </a-select>-->
  490. <!-- </sd-form-item-td>-->
  491. <!-- </tr>-->
  492. <tr>
  493. <!-- 只读问题性质 -->
  494. <sd-form-item-td
  495. :colspan="3"
  496. :name="'questionNature'"
  497. :label="'问题性质'"
  498. :input-props="{ disabled: true }"
  499. />
  500. </tr>
  501. </template>
  502. </table>
  503. </template>
  504. </template>
  505. </sd-webflow>
  506. </template>
  507. <script>
  508. import components from './_import-components/audit-issued-form-import'
  509. import { message } from 'ant-design-vue'
  510. import auditAdvancedGroup from '../../components/audit-advanced-group.vue'
  511. import auditAdvancedGroupMixins from '../../components/audit-advanced-group-mixins'
  512. import download from '@/common/services/download'
  513. import { sdLocalStorage } from '@/common/services/storage-service'
  514. import axios from '@/common/services/axios-instance'
  515. import SdQuillEditor from '@/common/components/sd-quill-editor.vue'
  516. import moment from 'moment'
  517. import AuditRiskbraryService from './riskLibrary'
  518. import { getUserInfo } from '@/common/store-mixin'
  519. const xzList = [
  520. '有业务无制度',
  521. '有制度难执行',
  522. '制度太宽泛缺乏操作细则',
  523. '制度过时不具备可操作性',
  524. '制度脱离实际难落地实施',
  525. '有制度未遵循',
  526. '特殊事项已经线下审批',
  527. '事项紧急重目标轻合规',
  528. '制度理解存在人为偏差',
  529. '工作疏忽未按制度行事',
  530. '人为规避制度管控要求',
  531. ]
  532. const baseData = [
  533. [
  534. {
  535. name: '业务编码',
  536. key: 'businessCode',
  537. },
  538. {
  539. name: '模型编码',
  540. key: 'batchCode',
  541. },
  542. ],
  543. [
  544. {
  545. name: '模型类型',
  546. key: 'modelTypeName',
  547. },
  548. {
  549. name: '模型名称',
  550. key: 'batchName',
  551. },
  552. ],
  553. [
  554. // todo 字段需要确认
  555. {
  556. name: '业务领域',
  557. key: 'modelDomainName',
  558. },
  559. {
  560. name: '业务阶段',
  561. key: 'modelPhaseName',
  562. },
  563. ],
  564. [
  565. {
  566. name: '单位',
  567. key: 'unit',
  568. },
  569. {
  570. name: '二级单位',
  571. key: 'secondUnit',
  572. },
  573. ],
  574. [
  575. {
  576. name: '问题推送时间',
  577. key: 'pushDate',
  578. },
  579. {
  580. name: '整改截至日期',
  581. key: 'reformDeadline',
  582. },
  583. ],
  584. [
  585. {
  586. name: '关注风险',
  587. key: 'risk',
  588. col: 3,
  589. },
  590. ],
  591. [
  592. {
  593. name: '整改说明',
  594. key: 'modelReformDesc',
  595. col: 3,
  596. },
  597. ],
  598. ]
  599. export default {
  600. name: 'AuditIssuedForm',
  601. metaInfo: {
  602. title: 'AuditIssuedForm',
  603. },
  604. components: {
  605. auditAdvancedGroup,
  606. SdQuillEditor,
  607. ...components,
  608. },
  609. mixins: [auditAdvancedGroupMixins],
  610. data() {
  611. return {
  612. // 流程 key
  613. key: 0,
  614. // 控制流程模块展开
  615. auditBaseGroup: false,
  616. // 审计线索信息
  617. auidtInfoGroup: false,
  618. // 判定问题
  619. auditJudgeGroup: false,
  620. // 说明
  621. auditDescGroup: false,
  622. // 附件
  623. auditAttachmentGroup: false,
  624. // 审计线索明细
  625. auditXsGroup: false,
  626. baseFormData: baseData,
  627. // 问题性质
  628. questionOption: xzList,
  629. infoSearchData: {},
  630. // 是否是整改人 1:整改人 2:初审人 3:复审人
  631. logInfo: 0,
  632. // 问题判定
  633. questionFormData: {
  634. questionFlag: 0,
  635. nonQuestionDesc: null,
  636. questionId: null,
  637. nonQuestionTag: null,
  638. },
  639. questionNature:[],
  640. questionNatureList: [
  641. {
  642. label: '有业务无制度',
  643. value: '有业务无制度',
  644. children: [
  645. ]
  646. },
  647. {
  648. label: '有制度难执行',
  649. value: '有制度难执行',
  650. children: [
  651. {
  652. label: '制度太宽泛缺乏操作细则',
  653. value: '制度太宽泛缺乏操作细则'
  654. },
  655. {
  656. label: '制度过时不具备可操作性',
  657. value: '制度过时不具备可操作性'
  658. },
  659. {
  660. label: '制度脱离实际难落地实施',
  661. value: '制度脱离实际难落地实施'
  662. },
  663. ]
  664. },
  665. {
  666. label: '有制度未遵循',
  667. value: '有制度未遵循',
  668. children: [{
  669. label:'特殊事项已经线下审批',
  670. value: '特殊事项已经线下审批'
  671. },{
  672. label:'事项紧急重目标轻合规',
  673. value: '事项紧急重目标轻合规'
  674. },{
  675. label:'制度理解存在人为偏差',
  676. value: '制度理解存在人为偏差'
  677. },{
  678. label:'工作疏忽未按制度行事',
  679. value: '工作疏忽未按制度行事'
  680. },{
  681. label:'人为规避制度管控要求',
  682. value: '人为规避制度管控要求'
  683. }]
  684. }
  685. ],
  686. isDescStatus: false,
  687. nonQuestionList: [],
  688. // 初始化 上传附件部分
  689. flagIs: true,
  690. fileList: [],
  691. fileListTemp: [],
  692. attachments: [],
  693. editorOption: {
  694. // 只读
  695. readOnly: true,
  696. editable: false,
  697. modules: {
  698. toolbar: {
  699. container: [
  700. ['bold', 'italic', 'underline', 'strike'], // toggled buttons
  701. ['blockquote', 'code-block'],
  702. [{ header: 1 }, { header: 2 }], // custom button values
  703. [{ list: 'ordered' }, { list: 'bullet' }],
  704. [{ script: 'sub' }, { script: 'super' }], // superscript/subscript
  705. [{ indent: '-1' }, { indent: '+1' }], // outdent/indent
  706. [{ direction: 'rtl' }], // text direction
  707. [{ size: ['small', false, 'large', 'huge'] }], // custom dropdown
  708. [{ header: [1, 2, 3, 4, 5, 6, false] }],
  709. [{ color: [] }, { background: [] }], // dropdown with defaults from theme
  710. [{ font: [] }],
  711. [{ align: [] }],
  712. ['clean'], // remove formatting button
  713. ['link', 'image'], // link and image, video
  714. ],
  715. },
  716. },
  717. },
  718. columnsDetail: [],
  719. dataDetail: [],
  720. loading: false,
  721. // 表单数据
  722. isInitData: false,
  723. webFlowData: {},
  724. // 是否只查看
  725. isWebFlow: false,
  726. lockId: 0,
  727. // 是否是关注类
  728. isFocus: false,
  729. }
  730. },
  731. computed: {
  732. actualAccept() {
  733. // 优先使用前端配置的类型限制,如未配置,则使用后端支持的类型
  734. return (
  735. this.accept || JSON.parse(sdLocalStorage.getItem('commonConfig') || '{}').attachType || ''
  736. )
  737. },
  738. },
  739. watch: {
  740. questionNature(val) {
  741. this.questionNature = val
  742. },
  743. fileList: {
  744. handler(val) {
  745. this.fileListTemp = val.map((item) => {
  746. return {
  747. name: item.name,
  748. url: item.url,
  749. }
  750. })
  751. },
  752. immediate: true,
  753. },
  754. 'questionFormData.questionFlag': {
  755. handler(val) {
  756. if (val === 1) {
  757. this.questionFormData.questionId = null
  758. this.questionFormData.nonQuestionDesc = null
  759. this.questionFormData.nonQuestionTag = null
  760. }
  761. },
  762. },
  763. isInitData: {
  764. handler: function(val) {
  765. this.$nextTick(() => {
  766. this.setInitData()
  767. })
  768. },
  769. },
  770. },
  771. mounted() {
  772. axios({ url: 'api/xcoa-mobile/v1/problem-statement/all', method: 'get' }).then((res) => {
  773. res.data.length ? (this.nonQuestionList = res.data) : (this.nonQuestionList = [])
  774. })
  775. },
  776. methods: {
  777. // 表单验证
  778. validForm(e) {
  779. return Promise.resolve(true)
  780. },
  781. actionBtnClick(evt, { button, FlowData }) {
  782. const { model } = FlowData
  783. if (button.buttonId === 'G_1_FXWTSJ.4') {
  784. }
  785. // 根据
  786. if (button.fakeId === 'save' || button.fakeId === 'workflow-push') {
  787. // 保存前先校验计划是否已经存在
  788. evt.waitUntil(
  789. new Promise((resolve, reject) => {
  790. this.saveForm(button.buttonId).then((res) => {
  791. if (!res) {
  792. evt.preventDefault()
  793. }
  794. resolve()
  795. })
  796. })
  797. )
  798. }
  799. },
  800. saveForm() {
  801. return new Promise((resolve) => {
  802. // 如果没有则提示请选择问题类型
  803. const { questionFlag, questionId, nonQuestionDesc } = this.questionFormData
  804. if (questionFlag !== 0 && questionFlag !== 1 && this.logInfo === 1) {
  805. message.warning('请选择问题类型')
  806. resolve(false)
  807. return
  808. }
  809. // 校验非问题类型参数
  810. if ( questionFlag === 0 ) {
  811. if (!questionId) {
  812. message.warning('请选择非问题标签')
  813. resolve(false)
  814. return
  815. }
  816. // if (!nonQuestionDesc) {
  817. // message.warning('请填写非问题说明')
  818. // resolve(false)
  819. // return
  820. // }
  821. }
  822. // 如果是处于第一阶段则需要选择问题性质
  823. if (this.logInfo === 2 && questionFlag === 1) {
  824. console.log(this.questionFormData, this.questionNature)
  825. // 判断问题性质是否已经选择
  826. if (!this.questionNature) {
  827. message.warning('请选择问题性质')
  828. resolve(false)
  829. return
  830. }
  831. if (!this.questionNature.length) {
  832. message.warning('请选择问题性质')
  833. resolve(false)
  834. return
  835. }
  836. this.questionFormData.questionNature = this.questionNature.join('|')
  837. }
  838. Object.keys(this.questionFormData).map((val) => {
  839. this.$refs.docform.setFieldValue(val, this.questionFormData[val])
  840. })
  841. // 校验说明是否有值
  842. // 获取reformDesc
  843. const reformDesc = this.$refs.docform.getFieldValue('reformDesc')
  844. if (!reformDesc) {
  845. message.warning('请填写整改说明')
  846. resolve(false)
  847. return
  848. }
  849. resolve(true)
  850. })
  851. },
  852. // 初始化基础信息
  853. initData(model, fields, FlowData) {
  854. this.isInitData = true
  855. this.webFlowData = {
  856. model,
  857. fields,
  858. FlowData,
  859. }
  860. return true
  861. },
  862. setInitData() {
  863. const { model, fields, FlowData } = this.webFlowData
  864. this.lockId = FlowData.lockId
  865. // 如果整改人是自己则可以上传
  866. // 显示信息
  867. // todo修改流程后更改
  868. // 2整改 3初审 4复审
  869. // http://10.104.32.30/api/framework/v1/task-form-process/inst-logs-process/17733
  870. // 给整改人G_1_FXWTSJ.7 viewAccount reformDate
  871. // ,初审人G_1_FXWTSJ.2 checker checkDate,
  872. // 复审人G_1_FXWTSJ.4 reviewer reviewDate
  873. // 现在的阶段
  874. let filedName = ''
  875. let filedDate = ''
  876. const isFlag = FlowData.processActiveLogInfo[0]
  877. if (isFlag?.stepId === 'G_1_FXWTSJ.7') {
  878. this.logInfo = 1
  879. filedName = 'viewAccount'
  880. filedDate = 'reformDate'
  881. }
  882. if (isFlag?.stepId === 'G_1_FXWTSJ.2') {
  883. this.logInfo = 2
  884. filedName = 'checker'
  885. filedDate = 'checkDate'
  886. }
  887. if (isFlag?.stepId === 'G_1_FXWTSJ.4') {
  888. this.logInfo = 3
  889. filedName = 'reviewer'
  890. filedDate = 'reviewDate'
  891. }
  892. this.$refs.docform.setFieldValue(filedName, getUserInfo().name)
  893. const strTime = moment().format('YYYY-MM-DD')
  894. this.$refs.docform.setFieldValue(filedDate, strTime)
  895. // 是否只查看
  896. this.isWebFlow = FlowData.mode !== 'EDIT'
  897. this.questionFormData.nonQuestionDesc = model.nonQuestionDesc // 将值赋值给问题
  898. this.questionFormData.nonQuestionTag = model.nonQuestionTag
  899. this.questionFormData.questionFlag = model.questionFlag
  900. this.questionFormData.questionId = model.questionId
  901. const attachmentList = (model.attachment || '').split(',')
  902. const fileNameList = (model.fileName || '').split(',')
  903. this.fileList = []
  904. if (model.attachment) {
  905. for (let i = 0; i < attachmentList.length; i++) {
  906. this.fileList.push({
  907. name: fileNameList[i],
  908. url: attachmentList[i],
  909. })
  910. }
  911. }
  912. // 初始化线索信息
  913. // 获取模型信息
  914. const data = { id: model.modelId + '' }
  915. AuditRiskbraryService.getIamModelMaintain(data).then((val) => {
  916. // this.$refs.docform.setFieldValue('modelType', val.modelType)
  917. const datas = {}
  918. val.data.pageFormData.pageFieldInfos.map((val) => {
  919. datas[val.name] = val.value
  920. })
  921. // 模型类型
  922. // isFocus
  923. this.$nextTick(() => {
  924. this.$refs.docform.setFieldValue('modelTypeName', datas.modelTypeName)
  925. this.$refs.docform.setFieldValue('batchName', datas.modelName)
  926. // 模型编码
  927. this.$refs.docform.setFieldValue('batchCode', datas.modelCode)
  928. this.$refs.docform.setFieldValue('modelDomainName', datas.modelDomainName)
  929. this.$refs.docform.setFieldValue('modelPhaseName', datas.modelPhaseName)
  930. this.$refs.docform.setFieldValue('modelReformDesc', datas.reformDesc)
  931. // modelTypeName
  932. this.isFocus = datas.modelTypeName.includes('关注类')
  933. })
  934. })
  935. this.getRiskDetail()
  936. this.auditBaseGroup = true
  937. this.auidtInfoGroup = true
  938. this.auditJudgeGroup = true
  939. this.auditDescGroup = true
  940. this.auditAttachmentGroup = true
  941. this.auditXsGroup = true
  942. },
  943. // 非问题处理
  944. questionChange(val) {
  945. const onDesc = this.nonQuestionList.find((item) => item.id === val)
  946. const { description, name } = onDesc
  947. this.questionFormData.nonQuestionDesc = description
  948. this.questionFormData.nonQuestionTag = name
  949. // 如果详情为空或者null则 isDescStatus ==false
  950. if (description === '' || description === null) {
  951. this.isDescStatus = false
  952. } else {
  953. this.isDescStatus = true
  954. }
  955. },
  956. // 附件上传
  957. // 附件自定义上传
  958. customRequest(data, catnum = 0, item) {
  959. if (data.file.size === 0) {
  960. message.warn(`不能上传大小为0的文件`)
  961. return
  962. }
  963. const file = {
  964. FileName: data.file.name,
  965. Completed: 0,
  966. CatNum: catnum,
  967. }
  968. const userInfo = getUserInfo()
  969. this.attachments = [...this.attachments]
  970. const strTime = moment().format('YYYY-MM-DD HH:mm:ss')
  971. const formData = new FormData()
  972. formData.append('file', data.file)
  973. formData.append('FileName', data.file.name)
  974. formData.append('lockId', this.lockId)
  975. formData.append('groupId', this.groupId)
  976. formData.append(
  977. 'querystring',
  978. `<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>${userInfo?.account} ${strTime}</CreateInfo><filetype></filetype><user_name>${userInfo?.account}</user_name><UpdateInfo>${userInfo?.account}于${strTime}创建.</UpdateInfo><TaodaInfo></TaodaInfo><CatNum>${catnum}</CatNum><Ext></Ext>`
  979. )
  980. const url = 'api/xcoa-mobile/v1/iam-attachment-extend/attachments-upload/indi'
  981. axios
  982. .post(url, formData, {
  983. headers: {
  984. 'Content-Type': 'multipart/form-data',
  985. },
  986. })
  987. .then((_) => {
  988. if (_.data.startsWith('false')) {
  989. message.error(`${data.file.name} 上传失败`)
  990. } else {
  991. this.fileList.push({
  992. name: data.file.name,
  993. url: _.data,
  994. })
  995. const attachment = this.fileList.map((item) => item.url).join(',')
  996. const nameList = this.fileList.map((item) => item.name).join(',')
  997. this.$refs.docform.setFieldValue('attachment', attachment)
  998. this.$refs.docform.setFieldValue('fileName', nameList)
  999. data.onSuccess(_, data.file)
  1000. }
  1001. })
  1002. .catch((e) => {
  1003. message.error(`${data.file.name} 上传失败`)
  1004. throw e
  1005. })
  1006. },
  1007. // 附件上传
  1008. handleChange(info) {
  1009. const status = info.file.status
  1010. if (status === 'done') {
  1011. message.success(`${info.file.name} 上传成功.`)
  1012. } else if (status === 'error') {
  1013. message.error(`${info.file.name} 上传失败.`)
  1014. }
  1015. },
  1016. // <!-- 删除已上传附件 -->
  1017. deleteFile(index) {
  1018. this.fileList.splice(index, 1)
  1019. const attachment = this.fileList.map((item) => item.url).join(',')
  1020. const nameList = this.fileList.map((item) => item.name).join(',')
  1021. this.$refs.docform.setFieldValue('attachment', attachment)
  1022. this.$refs.docform.setFieldValue('fileName', nameList)
  1023. },
  1024. // 下载附件
  1025. exportClick(row, i) {
  1026. const attachmentList = row.attachment.split(',')
  1027. const fileNameList = row.fileName.split(',')
  1028. const spliceIndex = attachmentList[i].lastIndexOf('|')
  1029. const destStep = attachmentList[i].substring(spliceIndex + 1, attachmentList[i].length)
  1030. download(
  1031. 'api/framework/v1/task-form-process/download-attachments/' + destStep,
  1032. fileNameList[i]
  1033. )
  1034. },
  1035. // 获取table数据
  1036. getRiskDetail() {
  1037. const { model } = this.webFlowData
  1038. this.loading = true
  1039. this.infoSearchData = {
  1040. modelId: model.modelId,
  1041. detailGroupId: model.detailGroupId,
  1042. jmEventType: model.jmEventType,
  1043. unitCode: model.unitCode,
  1044. }
  1045. AuditRiskbraryService.getDetailInfo(this.infoSearchData)
  1046. .then((res) => {
  1047. const allField = []
  1048. this.columnsDetail = res.data[0].detailArr.map((item) => {
  1049. allField.push(item.commit)
  1050. return {
  1051. title: item.commit,
  1052. dataIndex: item.commit,
  1053. width: item.value === 'null' ? '100px' : '240px',
  1054. ellipsis: true,
  1055. }
  1056. })
  1057. // 过滤事件标签 业务主键 业务时间 buss_key event_type buss_time
  1058. this.columnsDetail = this.columnsDetail.filter((item) => {
  1059. return (
  1060. item.title !== 'buss_key' &&
  1061. item.title !== 'event_type' &&
  1062. item.title !== 'buss_time' &&
  1063. item.title !== '事件标签' &&
  1064. item.title !== '业务主键' &&
  1065. item.title !== '业务时间'
  1066. )
  1067. })
  1068. this.dataDetail = res.data.map((item) => {
  1069. const obj = {}
  1070. allField.forEach((field) => {
  1071. const onfield = item.detailArr.find((i) => i.commit === field).value
  1072. obj[field] = onfield !== 'null' ? onfield : ''
  1073. })
  1074. obj.id = item.questionId
  1075. return obj
  1076. })
  1077. })
  1078. .finally(() => {
  1079. this.loading = false
  1080. })
  1081. },
  1082. setQuestionFormData(name, value, isArray = false) {
  1083. if (isArray){
  1084. value = value.split('|')
  1085. }
  1086. this.questionFormData[name] = value
  1087. console.log(this.questionFormData)
  1088. },
  1089. questionNatureGet(val){
  1090. console.log(val)
  1091. this.questionNature = val
  1092. }
  1093. },
  1094. }
  1095. </script>
  1096. <style module lang="scss">
  1097. @use '@/common/design' as *;
  1098. .upload {
  1099. display: flex;
  1100. min-width: 800px;
  1101. min-height: 200px;
  1102. .upload-list {
  1103. width: calc(30% - 10px);
  1104. margin-left: 10px;
  1105. li {
  1106. display: flex;
  1107. align-items: center;
  1108. justify-content: space-between;
  1109. width: 100%;
  1110. height: 30px;
  1111. padding: 0 10px;
  1112. margin-bottom: 10px;
  1113. line-height: 30px;
  1114. border-radius: 4px;
  1115. span {
  1116. display: inline-block;
  1117. width: 80%;
  1118. overflow: hidden;
  1119. text-overflow: ellipsis;
  1120. white-space: nowrap;
  1121. }
  1122. }
  1123. }
  1124. .upload-data {
  1125. width: 70%;
  1126. }
  1127. }
  1128. .model-idea {
  1129. // 上下边距
  1130. margin: 10px 0;
  1131. }
  1132. .onlydiv {
  1133. position: relative;
  1134. width: 90%;
  1135. margin: 0 auto;
  1136. .noselect {
  1137. position: absolute;
  1138. top: 0;
  1139. z-index: 100;
  1140. width: 100%;
  1141. height: 100%;
  1142. }
  1143. }
  1144. .aclick {
  1145. display: block;
  1146. }
  1147. </style>