audit-problem-rect-item.vue 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869
  1. <template>
  2. <div :class="$style.personalStatistics">
  3. <a-card :class="$style.conditions">
  4. <a-form-model
  5. ref="problemSearchForm"
  6. class="ant-advanced-search-form"
  7. :model="problemForm"
  8. :rules="problemRules"
  9. v-bind="formItemLayout"
  10. >
  11. <div>
  12. <a-card>
  13. <a-row :gutter="24" :class="$style.antformitem">
  14. <a-col :span="8">
  15. <span>查询维度: </span>
  16. <a-radio-group
  17. v-model="radioValue"
  18. :class="$style.radioGroup"
  19. @change="radioOnChange"
  20. >
  21. <a-radio :value="'01'"> 审计情况 </a-radio>
  22. <a-radio :value="'02'"> 被审计情况 </a-radio>
  23. </a-radio-group>
  24. </a-col>
  25. </a-row>
  26. </a-card>
  27. </div>
  28. <a-row :gutter="24" :class="$style.antformitem">
  29. <a-col :span="8">
  30. <a-form-model-item label="年度" prop="timeRange">
  31. <AuditRangePicker :time-range.sync="problemForm.timeRange" />
  32. </a-form-model-item>
  33. </a-col>
  34. <a-col :span="8">
  35. <a-form-model-item label="审计机构" prop="unitNames">
  36. <AuditGroupPicker
  37. ref="unitNames"
  38. v-model="problemForm.unitNames"
  39. :single="false"
  40. :read-only="false"
  41. :root-node="rootNode"
  42. />
  43. </a-form-model-item>
  44. </a-col>
  45. <a-col :span="8">
  46. <a-form-model-item label="被审计单位" prop="auditUnitedName">
  47. <sd-group-picker
  48. ref="auditUnitedName"
  49. v-model="problemForm.auditUnitedName"
  50. :single="false"
  51. :read-only="false"
  52. :root-node="rootNode"
  53. @change="changeunit"
  54. />
  55. </a-form-model-item>
  56. </a-col>
  57. </a-row>
  58. <a-row :gutter="24" :class="$style.antformitem">
  59. <a-col :span="8">
  60. <a-form-model-item label="项目分类" prop="auditType">
  61. <sd-select
  62. v-model="problemForm.auditType"
  63. :allow-clear="true"
  64. :options="auditTypeOptions"
  65. mode="multiple"
  66. />
  67. </a-form-model-item>
  68. </a-col>
  69. <!-- <a-col :span="8">
  70. <a-form-model-item label="被审计单位" prop="auditUnitedName">
  71. <AuditGroupPicker
  72. ref="auditUnitedName"
  73. v-model="problemForm.auditUnitedName"
  74. :single="false"
  75. :read-only="false"
  76. :root-node="rootNode"
  77. />
  78. </a-form-model-item>
  79. </a-col> -->
  80. <a-col :span="8">
  81. <a-form-model-item label="问题名称" prop="findTitle">
  82. <a-input v-model="problemForm.findTitle" />
  83. </a-form-model-item>
  84. </a-col>
  85. <a-col :span="8">
  86. <div :class="$style.buttonContent">
  87. <a-button @click="handleReset">重置</a-button>
  88. <a-button type="primary" @click="problemHandleAction('serach')">查询</a-button>
  89. <a-button
  90. :loading="exportLoading"
  91. type="primary"
  92. @click="problemHandleAction('export')"
  93. >导出</a-button
  94. >
  95. </div>
  96. </a-col>
  97. </a-row>
  98. </a-form-model>
  99. </a-card>
  100. <p :class="$style.tableTitle"> 审计问题整改明细台账 </p>
  101. <a-card class="reporttablecardxm">
  102. <sd-data-table
  103. ref="dataTable"
  104. :key="dataKey"
  105. :columns="columns"
  106. :process-req="processReq"
  107. :defultpagination-pagesize="10"
  108. data-url="api/xcoa-mobile/v1/spicAuditReportList/problemRectItemList"
  109. @dataLoaded="dataLoaded"
  110. >
  111. <div slot="projectLink" slot-scope="text, record">
  112. <a :title="text" @click="linkProject(record)">{{ text }}</a>
  113. </div>
  114. </sd-data-table>
  115. </a-card>
  116. </div>
  117. </template>
  118. <script>
  119. import moment from 'moment'
  120. import crossWindowWatcher from '@/common/services/cross-window-watcher'
  121. import components from './_import-components/audit-problem-rect-item-import'
  122. import AuditRangePicker from '@product/iam/components/picker/audit-range-picker.vue'
  123. import AuditGroupPicker from '@product/iam/components/picker/audit-group-picker.vue'
  124. import auditAdvancedQueryMixins from '../../components/audit-advanced-query-mixins'
  125. import auditAdvancedGroupMixins from '../../components/audit-advanced-group-mixins'
  126. import { message } from '@/common/one-ui'
  127. import download from '@/common/services/download'
  128. import axios from '@/common/services/axios-instance'
  129. import { getUserInfo } from '@/common/store-mixin'
  130. export default {
  131. name: 'AuditProblemRectItem',
  132. metaInfo: {
  133. title: '审计问题整改明细台账',
  134. },
  135. components: {
  136. ...components,
  137. AuditRangePicker,
  138. AuditGroupPicker,
  139. },
  140. mixins: [auditAdvancedQueryMixins, auditAdvancedGroupMixins],
  141. data() {
  142. return {
  143. radioValue: '01',
  144. radioType: true,
  145. auditTypeOptions: [],
  146. exportLoading: false,
  147. dataKey: 0,
  148. data: [],
  149. columns: [
  150. {
  151. title: '序号',
  152. dataIndex: 'id',
  153. width: '100px',
  154. },
  155. {
  156. title: '项目单位',
  157. dataIndex: 'unitName',
  158. width: '300px',
  159. },
  160. {
  161. title: '被审单位',
  162. dataIndex: 'auditedUnitNames',
  163. width: '280px',
  164. },
  165. {
  166. title: '项目名称',
  167. dataIndex: 'projectTitle',
  168. width: '200px',
  169. scopedSlots: { customRender: 'projectLink' },
  170. },
  171. {
  172. title: '项目分类',
  173. dataIndex: 'auditType',
  174. width: '250px',
  175. },
  176. {
  177. title: '问题名称',
  178. dataIndex: 'findTitle',
  179. width: '250px',
  180. },
  181. {
  182. title: '问题分类',
  183. dataIndex: 'problemType',
  184. width: '300px',
  185. },
  186. {
  187. title: '问题类型',
  188. dataIndex: 'rectType',
  189. width: '200px',
  190. },
  191. {
  192. title: '问题整改状态',
  193. dataIndex: 'rectState',
  194. width: '200px',
  195. },
  196. {
  197. title: '销号状态',
  198. dataIndex: 'cancellStatus',
  199. width: '150px',
  200. },
  201. {
  202. title: '是否完成当年整改阶段目标',
  203. dataIndex: 'whetherFinsh',
  204. width: '300px',
  205. },
  206. {
  207. title: '措施执行情况',
  208. dataIndex: 'draftRectMeasure',
  209. width: '200px',
  210. },
  211. {
  212. title: '计划完成时间',
  213. dataIndex: 'draftFinishDate',
  214. width: '200px',
  215. },
  216. {
  217. title: '审计发现问题整改(金额类)(万元)',
  218. children: [
  219. {
  220. title: '调整会计账目',
  221. dataIndex: 'adjustAccounts',
  222. width: '200px',
  223. },
  224. {
  225. title: '收回资金:增加收入数额',
  226. dataIndex: 'recoveryFunds',
  227. width: '250px',
  228. },
  229. {
  230. title: '收回资金:督促清理往来款项收回资金',
  231. dataIndex: 'avoidingWasteAmount',
  232. width: '350px',
  233. },
  234. {
  235. title: '收回资金:其他',
  236. dataIndex: 'reduceInvestmentAmount',
  237. width: '220px',
  238. },
  239. {
  240. title: '挽回损失:节约成本费用(开支)数额',
  241. dataIndex: 'costSavingAmount',
  242. width: '350px',
  243. },
  244. {
  245. title: '挽回损失:工程审减金额',
  246. dataIndex: 'engineeringReduction',
  247. width: '220px',
  248. },
  249. {
  250. title: '挽回损失:清退不当得利',
  251. dataIndex: 'improperClearanceAmount',
  252. width: '220px',
  253. },
  254. {
  255. title: '挽回损失:其他',
  256. dataIndex: 'recoveryLossAmount',
  257. width: '220px',
  258. },
  259. {
  260. title: '归还原资金渠道',
  261. dataIndex: 'repaymentChannels',
  262. width: '220px',
  263. },
  264. {
  265. title: '补缴税费',
  266. dataIndex: 'paymentTaxesFees',
  267. width: '220px',
  268. },
  269. {
  270. title: '其他',
  271. dataIndex: 'otherAmount',
  272. width: '220px',
  273. },
  274. ],
  275. },
  276. {
  277. title: '审计发现问题整改(非金额类)(个)',
  278. children: [
  279. {
  280. title: '新建制度、流程、标准(项)',
  281. dataIndex: 'newItems',
  282. width: '300px',
  283. },
  284. {
  285. title: '修订制度、流程、标准(项)',
  286. dataIndex: 'reviseItems',
  287. width: '300px',
  288. },
  289. ],
  290. },
  291. {
  292. title: '追责问责处理情况',
  293. children: [
  294. {
  295. title: '移送纪检监察部门案件线索(件)',
  296. dataIndex: 'transferMonitorClue',
  297. width: '300px',
  298. },
  299. {
  300. title: '追责问责人次',
  301. dataIndex: 'personNum',
  302. width: '220px',
  303. },
  304. {
  305. title: '党纪处分:警告',
  306. dataIndex: 'dealWay01',
  307. width: '220px',
  308. },
  309. {
  310. title: '党纪处分:严重警告',
  311. dataIndex: 'dealWay02',
  312. width: '220px',
  313. },
  314. {
  315. title: '党纪处分:撤销党内职务',
  316. dataIndex: 'dealWay03',
  317. width: '220px',
  318. },
  319. {
  320. title: '党纪处分:留党察看',
  321. dataIndex: 'dealWay04',
  322. width: '220px',
  323. },
  324. {
  325. title: '党纪处分:开除党籍',
  326. dataIndex: 'dealWay05',
  327. width: '220px',
  328. },
  329. {
  330. title: '政务处分:警告',
  331. dataIndex: 'dealWay06',
  332. width: '220px',
  333. },
  334. {
  335. title: '政务处分:记过',
  336. dataIndex: 'dealWay07',
  337. width: '220px',
  338. },
  339. {
  340. title: '政务处分:记大过',
  341. dataIndex: 'dealWay08',
  342. width: '220px',
  343. },
  344. {
  345. title: '政务处分:降级',
  346. dataIndex: 'dealWay09',
  347. width: '220px',
  348. },
  349. {
  350. title: '政务处分:撤职',
  351. dataIndex: 'dealWay10',
  352. width: '220px',
  353. },
  354. {
  355. title: '政务处分:开除',
  356. dataIndex: 'dealWay11',
  357. width: '220px',
  358. },
  359. {
  360. title: '内部纪律处分',
  361. dataIndex: 'dealWay12',
  362. width: '220px',
  363. },
  364. {
  365. title: '经济处罚金额(万元)',
  366. dataIndex: 'amountSum',
  367. width: '220px',
  368. },
  369. ],
  370. },
  371. {
  372. title: '根据审计建议给予党纪、政务和内部纪律处分',
  373. children: [
  374. {
  375. title: '合计',
  376. dataIndex: 'mentNum',
  377. width: '220px',
  378. },
  379. {
  380. title: '党纪处分:警告',
  381. dataIndex: 'dealManner01',
  382. width: '220px',
  383. },
  384. {
  385. title: '党纪处分:严重警告',
  386. dataIndex: 'dealManner02',
  387. width: '220px',
  388. },
  389. {
  390. title: '党纪处分:撤销党内职务',
  391. dataIndex: 'dealManner03',
  392. width: '220px',
  393. },
  394. {
  395. title: '党纪处分:留党察看',
  396. dataIndex: 'dealManner04',
  397. width: '220px',
  398. },
  399. {
  400. title: '党纪处分:开除党籍',
  401. dataIndex: 'dealManner05',
  402. width: '220px',
  403. },
  404. {
  405. title: '政务处分:警告',
  406. dataIndex: 'dealManner06',
  407. width: '220px',
  408. },
  409. {
  410. title: '政务处分:记过',
  411. dataIndex: 'dealManner07',
  412. width: '220px',
  413. },
  414. {
  415. title: '政务处分:记大过',
  416. dataIndex: 'dealManner08',
  417. width: '220px',
  418. },
  419. {
  420. title: '政务处分:降级',
  421. dataIndex: 'dealManner09',
  422. width: '220px',
  423. },
  424. {
  425. title: '政务处分:撤职',
  426. dataIndex: 'dealManner10',
  427. width: '220px',
  428. },
  429. {
  430. title: '政务处分:开除',
  431. dataIndex: 'dealManner11',
  432. width: '220px',
  433. },
  434. {
  435. title: '内部纪律处分',
  436. dataIndex: 'dealManner12',
  437. width: '220px',
  438. },
  439. ],
  440. },
  441. {
  442. title: '向司法机关移送或报告案件线索',
  443. dataIndex: 'accountability',
  444. width: '300px',
  445. },
  446. {
  447. title: '其中:涉案人员',
  448. dataIndex: 'otherItems',
  449. width: '300px',
  450. },
  451. ],
  452. problemForm: {
  453. unitNames: [],
  454. timeRange: [],
  455. auditType: [],
  456. auditUnitedName: [],
  457. findTitle: '',
  458. },
  459. problemRules: {
  460. timeRange: [{ required: true, message: '请选择统计时间', trigger: 'change' }],
  461. unitNames: [{ required: true, message: '请选择审计机构', trigger: 'change' }],
  462. auditUnitedName: [{ required: false, message: '请选择被审计单位', trigger: 'change' }],
  463. },
  464. formItemLayout: {
  465. labelCol: { span: 6 },
  466. wrapperCol: { span: 14 },
  467. },
  468. rootNode: {},
  469. reqData: {
  470. dateStart: '',
  471. dateEnd: '',
  472. unitNames: '',
  473. auditType: '',
  474. auditUnitedName: '',
  475. findTitle: '',
  476. },
  477. auditUnitedName: [],
  478. }
  479. },
  480. created() {
  481. let userInfo = getUserInfo()
  482. const params = {
  483. orgId: userInfo.deptId,
  484. }
  485. axios({
  486. url: 'api/xcoa-mobile/v1/iamorg/getCurrentUserGroup',
  487. method: 'get',
  488. }).then((res) => {
  489. userInfo = res.data
  490. params.orgId = res.data.id
  491. axios({
  492. url: 'api/xcoa-mobile/v1/iamorg/findIamOrg',
  493. method: 'post',
  494. params,
  495. }).then((res) => {
  496. this.id = res.data.id
  497. const deptCode = res.data.orgId + ''
  498. const deptName = res.data.orgName
  499. this.rootNode = { code: deptCode, name: deptName, id: this.id }
  500. })
  501. })
  502. },
  503. mounted() {
  504. this.tableResize()
  505. // 初始化审计类型数据字典信息
  506. this.initDictionaryInfo()
  507. this.initDatePicker()
  508. this.initGroupPicker()
  509. // this.problemHandleAction('serach')
  510. },
  511. methods: {
  512. hsaReadAuthorityPermission(record) {
  513. if (
  514. record.readAuthorityCodes != null &&
  515. record.readAuthorityCodes.indexOf(getUserInfo().account) > -1
  516. ) {
  517. return true
  518. }
  519. return false
  520. },
  521. linkProject(record) {
  522. if (
  523. (record.operatePermission || this.hsaReadAuthorityPermission(record)) &&
  524. (record.itemStatus === '02' ||
  525. record.itemStatus === '03' ||
  526. record.itemStatus === '04' ||
  527. record.itemStatus === '05' ||
  528. record.itemStatus === '07')
  529. ) {
  530. window.open('#/audit-work/?projectId=' + record.projectId)
  531. } else {
  532. var url = '/audit-project-detail?record=' + record.projectId
  533. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  534. if (refreshFlag) {
  535. }
  536. })
  537. }
  538. },
  539. initDatePicker() {
  540. const datePick = []
  541. const time = moment(new Date())
  542. datePick.push(time)
  543. datePick.push(time)
  544. this.problemForm.timeRange = datePick
  545. },
  546. initGroupPicker() {
  547. let userInfo = getUserInfo()
  548. const params = {
  549. orgId: userInfo.deptId,
  550. }
  551. axios({
  552. url: 'api/xcoa-mobile/v1/iamorg/getCurrentUserGroup',
  553. method: 'get',
  554. }).then((res) => {
  555. userInfo = res.data
  556. params.orgId = res.data.id
  557. axios({
  558. url: 'api/xcoa-mobile/v1/iamorg/findIamOrg',
  559. method: 'post',
  560. params,
  561. }).then((res) => {
  562. const userDeptValue = []
  563. const userDept = {
  564. code: res.data.orgId + '',
  565. name: res.data.orgName,
  566. text: res.data.orgName,
  567. id: res.data.orgId,
  568. type: 'Group',
  569. }
  570. userDeptValue.push(userDept)
  571. this.problemForm.unitNames = userDeptValue
  572. this.$refs.problemSearchForm.validate()
  573. this.problemHandleAction('serach')
  574. })
  575. })
  576. },
  577. initUnitedGroupPicker() {
  578. let userInfo = getUserInfo()
  579. const params = {
  580. orgId: userInfo.deptId,
  581. }
  582. axios({
  583. url: 'api/xcoa-mobile/v1/iamorg/getCurrentUserGroup',
  584. method: 'get',
  585. }).then((res) => {
  586. userInfo = res.data
  587. params.orgId = res.data.id
  588. axios({
  589. url: 'api/xcoa-mobile/v1/iamorg/findIamOrg',
  590. method: 'post',
  591. params,
  592. }).then((res) => {
  593. const userDeptValue = []
  594. const userDept = {
  595. code: res.data.orgId + '',
  596. name: res.data.orgName,
  597. text: res.data.orgName,
  598. id: res.data.orgId,
  599. type: 'Group',
  600. }
  601. userDeptValue.push(userDept)
  602. this.problemForm.auditUnitedName = userDeptValue
  603. this.$refs.problemSearchForm.validate()
  604. this.problemHandleAction('serach')
  605. })
  606. })
  607. },
  608. changeunit(values) {
  609. debugger
  610. this.problemForm.auditUnitedName = []
  611. values.forEach((element) => {
  612. const auditedUnit = {
  613. code: element.code + '',
  614. name: element.name,
  615. id: element.code,
  616. type: element.type,
  617. }
  618. this.problemForm.auditUnitedName.push(auditedUnit)
  619. })
  620. },
  621. initDictionaryInfo() {
  622. axios({
  623. url: 'api/xcoa-mobile/v1/iam-law/dictionary?key=PRODUCT_IAM_AUDIT_TYPE',
  624. method: 'get',
  625. }).then((res) => {
  626. if (res.status === 200) {
  627. this.auditTypeOptions = res.data
  628. }
  629. })
  630. },
  631. radioOnChange(e, info) {
  632. debugger
  633. if (this.radioValue === '01') {
  634. this.problemRules.unitNames[0].required = true
  635. this.problemRules.auditUnitedName[0].required = false
  636. this.problemForm.auditUnitedName = []
  637. this.initGroupPicker()
  638. } else {
  639. this.problemRules.unitNames[0].required = false
  640. this.problemRules.auditUnitedName[0].required = true
  641. this.problemForm.unitNames = []
  642. this.initUnitedGroupPicker()
  643. }
  644. },
  645. tableResize() {
  646. document
  647. .getElementsByClassName('ant-table-empty')[0]
  648. .getElementsByClassName('ant-table-tbody')[0]
  649. .appendChild(document.getElementsByClassName('ant-table-placeholder')[0])
  650. var width = document.getElementsByClassName('ant-table-tbody')[0].offsetWidth
  651. document.getElementsByClassName('ant-table-placeholder')[0].style.width = `${width}%`
  652. },
  653. dataLoaded(res) {
  654. if (res.data.length) {
  655. res.data.forEach((item, index) => {
  656. item.id = index + 1
  657. })
  658. } else {
  659. this.tableResize()
  660. }
  661. return res
  662. },
  663. handleReset() {
  664. this.$refs.problemSearchForm.resetFields()
  665. },
  666. processReq(req) {
  667. req.data = {
  668. maxResults: req.data.maxResults,
  669. startPosition: req.data.startPosition,
  670. dateStart: this.reqData.dateStart,
  671. dateEnd: this.reqData.dateEnd,
  672. unitIds: this.reqData.unitNames,
  673. auditType: this.reqData.auditType,
  674. auditUnitedId: this.reqData.auditUnitedName,
  675. findTitle: this.reqData.findTitle,
  676. }
  677. return req
  678. },
  679. handleSearch() {
  680. this.reqData.startPosition = 0
  681. this.dataKey++
  682. },
  683. // 审计问题整改明细台账
  684. problemHandleAction(type) {
  685. debugger
  686. this.$refs.problemSearchForm.validate((valid, values) => {
  687. if (valid) {
  688. if (type === 'serach') {
  689. if (
  690. this.problemForm.timeRange.length === 0 &&
  691. this.problemForm.unitNames.length === 0 &&
  692. this.problemForm.auditType.length === 0 &&
  693. this.problemForm.auditUnitedName.length === 0 &&
  694. this.problemForm.findTitle === ''
  695. ) {
  696. this.handleSearch()
  697. } else {
  698. // 处理时间
  699. this.reqData.dateStart = this.problemForm.timeRange[0].year() + ''
  700. this.reqData.dateEnd = this.problemForm.timeRange[1].year() + ''
  701. // 处理部门
  702. const arr = []
  703. this.problemForm.unitNames.forEach((item) => {
  704. arr.push(`'${item.id}'`)
  705. })
  706. this.reqData.unitNames = arr.join(',')
  707. this.reqData.unitIds = arr.join(',')
  708. if (this.problemForm.auditUnitedName.length !== 0) {
  709. const arrs = []
  710. this.problemForm.auditUnitedName.forEach((item) => {
  711. arrs.push(`'${item.id}'`)
  712. })
  713. this.reqData.auditUnitedName = arrs.join(',')
  714. this.reqData.auditUnitedId = arrs.join(',')
  715. } else {
  716. this.reqData.auditUnitedName = ''
  717. this.reqData.auditUnitedId = ''
  718. }
  719. if (this.problemForm.auditType.length !== 0) {
  720. const auditTypes = []
  721. this.problemForm.auditType.forEach((item) => {
  722. auditTypes.push(`'${item.id}'`)
  723. })
  724. this.reqData.auditType = auditTypes.join(',')
  725. } else {
  726. this.reqData.auditType = ''
  727. }
  728. if (this.problemForm.findTitle !== '') {
  729. this.reqData.findTitle = this.problemForm.findTitle + ''
  730. } else {
  731. this.reqData.findTitle = ''
  732. }
  733. this.handleSearch()
  734. this.auditUnitedName = []
  735. }
  736. } else {
  737. debugger
  738. if (
  739. this.problemForm.timeRange.length === 0 &&
  740. this.problemForm.unitNames.length === 0 &&
  741. this.problemForm.auditType.length === 0 &&
  742. this.problemForm.auditUnitedName.length === 0 &&
  743. this.problemForm.findTitle === ''
  744. ) {
  745. this.problemHandleExport()
  746. } else {
  747. // 处理时间
  748. this.reqData.dateStart = this.problemForm.timeRange[0].year() + ''
  749. this.reqData.dateEnd = this.problemForm.timeRange[1].year() + ''
  750. // 处理部门
  751. const arr = []
  752. this.problemForm.unitNames.forEach((item) => {
  753. arr.push(`'${item.id}'`)
  754. })
  755. this.reqData.unitNames = arr.join(',')
  756. this.reqData.unitIds = arr.join(',')
  757. if (this.problemForm.auditUnitedName.length !== 0) {
  758. const arrs = []
  759. this.problemForm.auditUnitedName.forEach((item) => {
  760. arrs.push(`'${item.id}'`)
  761. })
  762. this.reqData.auditUnitedName = arrs.join(',')
  763. this.reqData.auditUnitedId = arrs.join(',')
  764. } else {
  765. this.reqData.auditUnitedName = ''
  766. this.reqData.auditUnitedId = ''
  767. }
  768. if (this.problemForm.auditType.length !== 0) {
  769. const auditTypes = []
  770. this.problemForm.auditType.forEach((item) => {
  771. auditTypes.push(`'${item.id}'`)
  772. })
  773. this.reqData.auditType = auditTypes.join(',')
  774. } else {
  775. this.reqData.auditType = ''
  776. }
  777. if (this.problemForm.findTitle !== '') {
  778. this.reqData.findTitle = this.problemForm.findTitle + ''
  779. } else {
  780. this.reqData.findTitle = ''
  781. }
  782. this.problemHandleExport()
  783. }
  784. }
  785. }
  786. })
  787. },
  788. problemHandleExport() {
  789. axios({
  790. method: 'post',
  791. url: 'api/xcoa-mobile/v1/spicAuditReportExport/exportProblemRectItem',
  792. responseType: 'blob',
  793. data: {
  794. unitIds: this.reqData.unitIds,
  795. dateStart: this.reqData.dateStart,
  796. dateEnd: this.reqData.dateEnd,
  797. auditType: this.reqData.auditType,
  798. auditUnitedId: this.reqData.auditUnitedId,
  799. findTitle: this.reqData.findTitle,
  800. },
  801. }).then((res) => {
  802. const url = URL.createObjectURL(res.data)
  803. download(url, '审计问题整改明细台账-内审.xlsx')
  804. })
  805. },
  806. },
  807. }
  808. </script>
  809. <style module lang="scss">
  810. @use '@/common/design' as *;
  811. .personalStatistics {
  812. :global(.ant-table-body) {
  813. overflow-x: scroll !important;
  814. }
  815. :global(.ant-form-item) {
  816. margin: 0;
  817. }
  818. :global(.ant-table-empty) {
  819. :global(.ant-table-body) {
  820. overflow-x: scroll !important;
  821. }
  822. }
  823. .conditions {
  824. margin-bottom: 20px;
  825. }
  826. .buttonContent {
  827. padding-top: 6px;
  828. text-align: right;
  829. button {
  830. margin: 0 4px;
  831. }
  832. }
  833. :global(.anticon-setting) {
  834. display: none;
  835. }
  836. .tableTitle {
  837. padding-top: 16px;
  838. margin: 0;
  839. font-size: 22px;
  840. font-weight: bold;
  841. color: #404040;
  842. text-align: center;
  843. background: white;
  844. }
  845. :global(.reporttablecardxm) {
  846. :global(.ant-table-body) {
  847. height: auto !important;
  848. min-height: auto !important;
  849. overflow: auto;
  850. }
  851. }
  852. :global(.ant-table-placeholder) {
  853. height: auto !important;
  854. }
  855. }
  856. </style>