audit-summarry-list.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. <template>
  2. <a-spin :spinning="isshowLoading" tip="正在导出请稍等……" size="large">
  3. <div :class="$style.wrapHeight">
  4. <div>
  5. <a-card :class="$style.conditions">
  6. <a-form-model
  7. ref="advancedSearchForm"
  8. class="ant-advanced-search-form"
  9. :model="form"
  10. v-bind="formItemLayout"
  11. >
  12. <a-form-model-item v-if="!rolesType" label="模型编码" prop="modelCode">
  13. <a-input v-model="form.modelCode" placeholder="请输入模型编码" />
  14. </a-form-model-item>
  15. <a-form-model-item v-if="!rolesType" label="模型名称" prop="modelName">
  16. <a-input v-model="form.modelName" placeholder="请输入模型名称" />
  17. </a-form-model-item>
  18. <!-- 业务编码 -->
  19. <a-form-model-item :label="'业务编码'" prop="businessCode">
  20. <a-input v-model="form.businessCode" placeholder="请输入业务编码" allow-clear />
  21. </a-form-model-item>
  22. <a-form-model-item v-if="rolesType" :label="'事件标签分类'" prop="eventTagName">
  23. <a-input v-model="form.eventTagName" placeholder="事件标签分类" allow-clear />
  24. </a-form-model-item>
  25. <a-form-model-item v-if="rolesType" label="事件标签">
  26. <a-input v-model="form.jmEventType"></a-input>
  27. </a-form-model-item>
  28. <a-form-model-item :label="'模型类型'" prop="modelType">
  29. <div style="width: 200px">
  30. <a-select v-model="form.modelType" placeholder="请选择模型类型" allow-clear>
  31. <!-- <a-select-option value="0">分析型</a-select-option> -->
  32. <a-select-option value="1">定位型-整改类</a-select-option>
  33. <a-select-option value="2">定位型-关注类</a-select-option>
  34. </a-select>
  35. </div>
  36. </a-form-model-item>
  37. <!-- endType null 全部 0未整改 1已整改 -->
  38. <a-form-model-item v-if="rolesType" :label="'审核状态'" prop="endType">
  39. <div style="width: 200px">
  40. <a-select v-model="form.endType" placeholder="请选择审核状态" allow-clear>
  41. <!-- <a-select-option value="0">分析型</a-select-option> -->
  42. <a-select-option value="0">未整改</a-select-option>
  43. <a-select-option value="1">已整改</a-select-option>
  44. </a-select>
  45. </div>
  46. </a-form-model-item>
  47. <a-form-model-item :label="'单位'" prop="unit">
  48. <a-input v-model="form.unit" placeholder="请输入单位" />
  49. </a-form-model-item>
  50. <!-- <a-form-model-item :label="'二级单位'" prop="secondUnit">
  51. <a-input v-model="form.secondUnit" placeholder="请输入二级单位" />
  52. </a-form-model-item> -->
  53. <!-- 审核状态 -->
  54. <a-form-model-item v-if="!rolesType" label="审核状态" placeholder="请选择审核状态">
  55. <div style="width: 200px">
  56. <a-select v-model="form.endType" placeholder="请选择审核状态" allow-clear>
  57. <a-select-option value="2">未提交审核</a-select-option>
  58. <a-select-option value="1">已提交待审核</a-select-option>
  59. <a-select-option value="5">审核通过</a-select-option>
  60. <a-select-option value="0">审核驳回</a-select-option>
  61. </a-select>
  62. </div>
  63. </a-form-model-item>
  64. <!-- 整改状态 -->
  65. <a-form-model-item v-if="!rolesType" label="整改状态" placeholder="请选择整改状态">
  66. <div style="width: 200px">
  67. <a-select v-model="form.reformStatus" placeholder="请选择整改状态" allow-clear>
  68. <a-select-option value="0">期限内已整改</a-select-option>
  69. <!-- 逾期已整改 -->
  70. <a-select-option value="1">逾期已整改</a-select-option>
  71. <!-- 期限内未整改 -->
  72. <a-select-option value="2">期限内未整改完成</a-select-option>
  73. <!-- 逾期未整改 -->
  74. <a-select-option value="3">逾期未整改完成</a-select-option>
  75. </a-select>
  76. </div>
  77. </a-form-model-item>
  78. <!-- 查看状态 -->
  79. <a-form-model-item v-if="!rolesType" label="查看状态" placeholder="请选择查看状态">
  80. <div style="width: 200px">
  81. <a-select v-model="form.viewFlag" placeholder="请选择查看状态" allow-clear>
  82. <a-select-option value="0">未查看</a-select-option>
  83. <a-select-option value="1">已查看</a-select-option>
  84. </a-select>
  85. </div>
  86. </a-form-model-item>
  87. <a-form-model-item :label="'二级单位简称'">
  88. <a-input v-model="form.secondUnit" placeholder="请输入二级单位简称" allow-clear />
  89. </a-form-model-item>
  90. <a-form-model-item v-if="!rolesType" label="业务领域">
  91. <audit-select-area v-model="form.modelDomain" />
  92. </a-form-model-item>
  93. <a-form-model-item label="业务时间" style="margin-left: 10px">
  94. <div style="width: 230px">
  95. <a-range-picker v-model="time3" :format="'YYYY-MM-DD'" @change="changeTimeRange" />
  96. </div>
  97. </a-form-model-item>
  98. <a-form-model-item label="问题推送时间" prop="pushDate" style="margin-left: 10px">
  99. <div style="width: 230px">
  100. <a-range-picker
  101. v-model="time1"
  102. :format="'YYYY-MM-DD'"
  103. @change="changeStartTimeChange"
  104. />
  105. </div>
  106. </a-form-model-item>
  107. <!-- 整改截至时间 -->
  108. <a-form-model-item
  109. v-if="!rolesType"
  110. label="整改截至时间"
  111. prop="reformTime"
  112. style="margin-left: 10px"
  113. >
  114. <div style="width: 230px">
  115. <a-range-picker
  116. v-model="time4"
  117. :format="'YYYY-MM-DD'"
  118. @change="changeStartTimeChange2"
  119. />
  120. </div>
  121. <!-- reformDeadlineSt reformDeadlineEd -->
  122. </a-form-model-item>
  123. <!-- 业务领域 -->
  124. <a-form-model-item>
  125. <div :class="$style.buttonContent">
  126. <a-button type="primary" @click="handleSearch">搜索</a-button>
  127. <a-button type="primary" @click="handleReset">重置</a-button>
  128. <a-button type="primary" @click="fnexport">导出</a-button>
  129. </div>
  130. </a-form-model-item>
  131. </a-form-model>
  132. </a-card>
  133. <div>
  134. <a-card>
  135. <sd-data-table
  136. ref="SJMXDataTable"
  137. :key="dataKey"
  138. :row-key="(record, index) => index"
  139. :columns="columns"
  140. :process-req="processReq"
  141. form-id="iamModelMaintain"
  142. :scroll="{ x: 1300 }"
  143. :data-url="dataUrl"
  144. >
  145. <div slot="action" slot-scope="text, record">
  146. <a-button type="link" @click="detailClick(record)">明细</a-button>
  147. </div>
  148. </sd-data-table>
  149. </a-card>
  150. <audit-advanced-export
  151. ref="export"
  152. :v-if="false"
  153. :exclebxh="false"
  154. table-id="iamModelMaintain"
  155. :expressions="exportExpressions"
  156. :config-id="121"
  157. />
  158. </div>
  159. </div>
  160. </div>
  161. </a-spin>
  162. </template>
  163. <script>
  164. // import AuditRangeDatePicker from '../../components/picker/audit-range-date-picker.vue'
  165. import components from './_import-components/audit-summarry-list-import'
  166. import auditAdvancedExport from '../../components/audit-advanced-export.vue'
  167. import { getUserInfo } from '@/common/store-mixin'
  168. import AuditRiskbraryService from './riskLibrary'
  169. import download from '@/common/services/download'
  170. import { message, Modal } from 'ant-design-vue'
  171. import moment from 'moment'
  172. import auditSelectArea from './audit-select-area'
  173. import { sdSessionStorage } from '@/common/services/storage-service'
  174. export default {
  175. name: 'AuditSummarryList',
  176. metaInfo: {
  177. title: '审计问题总汇',
  178. },
  179. components: {
  180. ...components,
  181. // AuditRangeDatePicker,
  182. auditAdvancedExport,
  183. auditSelectArea,
  184. },
  185. data() {
  186. return {
  187. exportLoading: false,
  188. isshowLoading: false,
  189. dataUrl: 'api/xcoa-mobile/v1/iamquestionreform/iamQuestionReformSummary',
  190. exportExpressions: [],
  191. form: {
  192. businessCode: null,
  193. eventTagName: null,
  194. viewFlag: undefined,
  195. secondUnit: null,
  196. risk: null,
  197. modelType: '1',
  198. // timeRange: [],
  199. belongedSecondUnit: null,
  200. unit: null,
  201. // buss_time
  202. bussTime: null,
  203. abbreviation: null,
  204. modelDomain: undefined,
  205. endType: undefined,
  206. reformStatus: undefined,
  207. // bussTimeSt bussTimeEd 业务时间
  208. bussTimeSt: null,
  209. bussTimeEd: null,
  210. pushDateSt: null,
  211. pushDateEd: null,
  212. reformDeadlineEd: null,
  213. jmEventType: '',
  214. reformDeadlineSt: null,
  215. },
  216. time1: [],
  217. time2: [],
  218. time3: [],
  219. time4: [],
  220. formItemLayout: {
  221. layout: 'inline',
  222. labelCol: { span: 10 },
  223. wrapperCol: { span: 14 },
  224. },
  225. dataKey: 0,
  226. columns: [
  227. {
  228. title: '序号',
  229. dataIndex: 'sortNumber',
  230. width: '50px',
  231. customRender: (text, record, index) => `${index + 1}`,
  232. },
  233. {
  234. title: '业务编码',
  235. dataIndex: 'businessCode',
  236. },
  237. {
  238. title: '模型编码',
  239. dataIndex: 'modelCode',
  240. },
  241. {
  242. title: '模型名称',
  243. dataIndex: 'modelName',
  244. },
  245. {
  246. title: '业务领域',
  247. dataIndex: 'modelDomainName',
  248. },
  249. {
  250. title: '业务阶段',
  251. dataIndex: 'modelPhaseName',
  252. },
  253. {
  254. title: '模型类型',
  255. dataIndex: 'modelTypeName',
  256. },
  257. {
  258. title: '二级单位简称',
  259. dataIndex: 'secondUnit',
  260. width: '100px',
  261. },
  262. {
  263. title: '单位',
  264. dataIndex: 'unit',
  265. width: '100px',
  266. },
  267. {
  268. title: '问题推送日期',
  269. dataIndex: 'pushDate',
  270. },
  271. // 整改截至日期reformDeadline
  272. {
  273. title: '整改截至日期',
  274. dataIndex: 'reformDeadline',
  275. },
  276. // 整改期限 reformTime
  277. {
  278. title: '整改期限',
  279. dataIndex: 'reformTime',
  280. customRender: (text, record) => {
  281. if (record.modelTypeName.includes('关注类')) {
  282. return '--'
  283. } else {
  284. return text
  285. }
  286. },
  287. },
  288. // 整改状态rectStatus
  289. {
  290. title: '整改状态',
  291. dataIndex: 'reformStatus',
  292. customRender: (text, record) => {
  293. if (record.modelTypeName.includes('关注类')) {
  294. return '--'
  295. }
  296. if (text === 0) {
  297. return '期限内已整改'
  298. } else if (text === 1) {
  299. return '逾期已整改'
  300. } else if (text === 2) {
  301. return '期限内未整改完成'
  302. } else if (text === 3) {
  303. return '逾期未整改完成'
  304. }
  305. },
  306. },
  307. // 查看状态
  308. {
  309. title: '查看状态',
  310. dataIndex: 'viewFlag',
  311. customRender: (text, record) => {
  312. if (record.modelTypeName.includes('整改类')) {
  313. return '--'
  314. }
  315. // <span>{{ record.viewFlag === 1 ? '已查看' : '未查看' }}</span>
  316. if (text === 0 || text === null) {
  317. return '未查看'
  318. } else if (text === 1) {
  319. return '已查看'
  320. }
  321. },
  322. },
  323. // 审核状态status
  324. {
  325. title: '审核状态',
  326. dataIndex: 'endType',
  327. customRender: (text, record) => {
  328. if (record.modelTypeName.includes('关注类')) {
  329. return '--'
  330. }
  331. if (text === 2) {
  332. return '未提交审核'
  333. } else if (text === 1) {
  334. return '已提交待审核'
  335. } else if (text === 5) {
  336. return '审核通过'
  337. } else if (text === 0) {
  338. return '审核驳回'
  339. }
  340. },
  341. },
  342. {
  343. title: '操作',
  344. dataIndex: 'sharedSetting',
  345. fixed: 'right',
  346. width: '100px',
  347. scopedSlots: { customRender: 'action' },
  348. },
  349. ],
  350. rolesType: false,
  351. pageData: {},
  352. oldSearch: null,
  353. }
  354. },
  355. created() {
  356. this.time3 = [moment('2024-01-01', 'YYYY-MM-DD'), moment(new Date(), 'YYYY-MM-DD')]
  357. const timeList = this.time3.map((item) => {
  358. // 转化成时间戳 并忽略时分秒
  359. return moment(item._d)
  360. .startOf('day')
  361. .valueOf()
  362. })
  363. this.form.bussTimeSt = timeList[0]
  364. this.form.bussTimeEd = timeList[1] + 60 * 60 * 24 * 1000
  365. const roles = this.$store.state.sd.common.userInfo.default.roles
  366. this.rolesType = roles.map((val) => val.code).includes('G-1_SITUATION_LEADER')
  367. if (this.rolesType) {
  368. this.dataUrl = 'api/xcoa-mobile/v1/iamquestionreform/iamQuestionReformSummaryQueryListNew'
  369. this.columns = [
  370. {
  371. title: '序号',
  372. dataIndex: 'sortNumber',
  373. width: '70px',
  374. customRender: (text, record, index) => `${index + 1}`,
  375. },
  376. {
  377. title: '业务编码',
  378. dataIndex: 'businessCode',
  379. },
  380. // 业务时间
  381. // {
  382. // title: '业务时间',
  383. // dataIndex: 'bussTime',
  384. // },
  385. // todo 事件标签
  386. {
  387. title: '事件标签',
  388. dataIndex: 'jmEventType',
  389. },
  390. {
  391. title: '事件标签分类',
  392. dataIndex: 'eventTagName',
  393. },
  394. {
  395. title: '模型类型',
  396. dataIndex: 'modelTypeName',
  397. },
  398. {
  399. dataIndex: 'modelType',
  400. sdHidden: true,
  401. },
  402. {
  403. title: '问题推送日期',
  404. dataIndex: 'pushDate',
  405. },
  406. // {
  407. // title: '关注风险',
  408. // dataIndex: 'risk',
  409. // },
  410. // todo 改为二级单位简称
  411. // {
  412. // title: '管理归属二级单位',
  413. // dataIndex: 'belongedSecondUnit',
  414. // },
  415. // todo二级单位简称 字段需确认
  416. {
  417. title: '二级单位简称',
  418. dataIndex: 'secondUnit',
  419. },
  420. {
  421. dataIndex: 'secondUnitCode',
  422. sdHidden: true,
  423. },
  424. {
  425. dataIndex: 'unitCode',
  426. sdHidden: true,
  427. },
  428. {
  429. title: '单位',
  430. dataIndex: 'unit',
  431. },
  432. // 风险问题数量 total
  433. {
  434. title: '风险问题数量',
  435. dataIndex: 'total',
  436. },
  437. {
  438. title: '问题数量',
  439. dataIndex: 'questionNum',
  440. },
  441. {
  442. title: '非问题数量',
  443. dataIndex: 'nonQuestionNum',
  444. },
  445. {
  446. title: '已整改数量',
  447. dataIndex: 'reformNum',
  448. },
  449. {
  450. title: '未整改数量',
  451. dataIndex: 'nonReformNum',
  452. },
  453. {
  454. title: '操作',
  455. dataIndex: 'sharedSetting',
  456. fixed: 'right',
  457. width: '100px',
  458. scopedSlots: { customRender: 'action' },
  459. },
  460. ]
  461. // 初始化 业务默认时间
  462. // 2024.01.01-至今
  463. }
  464. },
  465. mounted() {
  466. this.oldSearch = this.setExpressions()
  467. },
  468. methods: {
  469. filterColumns() {
  470. // 过滤 问题 非问题 已整改 未整改
  471. this.columns = this.columns.filter((item) => {
  472. return (
  473. item.dataIndex !== 'questionNum' &&
  474. item.dataIndex !== 'reformNum' &&
  475. item.dataIndex !== 'nonReformNum' &&
  476. item.dataIndex !== 'nonQuestionNum' &&
  477. item.dataIndex !== 'nonViewNum' &&
  478. item.dataIndex !== 'viewNum'
  479. )
  480. })
  481. },
  482. selectModelTypeChange(val) {
  483. // 如果是领导
  484. if (this.rolesType) {
  485. this.filterColumns()
  486. if (val === '1') {
  487. // 从倒数第二位开始插入
  488. this.columns.splice(
  489. this.columns.length - 1,
  490. 0,
  491. ...[
  492. {
  493. title: '问题数量',
  494. dataIndex: 'questionNum',
  495. },
  496. {
  497. title: '非问题数量',
  498. dataIndex: 'nonQuestionNum',
  499. },
  500. {
  501. title: '已整改数量',
  502. dataIndex: 'reformNum',
  503. },
  504. {
  505. title: '未整改数量',
  506. dataIndex: 'nonReformNum',
  507. },
  508. ]
  509. )
  510. }
  511. if (val === '2') {
  512. // 从倒数第二位开始插入
  513. this.columns.splice(
  514. this.columns.length - 1,
  515. 0,
  516. ...[
  517. {
  518. title: '已查看数量',
  519. dataIndex: 'viewNum',
  520. },
  521. {
  522. title: '未查看数量',
  523. dataIndex: 'nonViewNum',
  524. },
  525. ]
  526. )
  527. }
  528. }
  529. },
  530. // 开始时间 结束时间
  531. changeTimeRange(val) {
  532. // 开始天的 00:00:00 结束天的 23:59:59 时间戳
  533. const timeList = val.map((item) => {
  534. // 转化成时间戳 并忽略时分秒
  535. return moment(item._d)
  536. .startOf('day')
  537. .valueOf()
  538. })
  539. // 结束时间加一天的时间戳
  540. this.form.bussTimeSt = timeList[0]
  541. this.form.bussTimeEd = timeList[1] + 60 * 60 * 24 * 1000
  542. },
  543. changeStartTimeChange(val) {
  544. // "stringValue": "2023-12-16" 转换成这个格式
  545. this.form.pushDateSt = moment(val[0]._d).format('YYYY-MM-DD')
  546. this.form.pushDateEd = moment(val[1]._d).format('YYYY-MM-DD')
  547. },
  548. changeStartTimeChange2(val) {
  549. // reformDeadlineSt reformDeadlineEd
  550. this.form.reformDeadlineSt = moment(val[0]._d).format('YYYY-MM-DD')
  551. this.form.reformDeadlineEd = moment(val[1]._d).format('YYYY-MM-DD')
  552. },
  553. // 处理请求参数
  554. setExpressions() {
  555. const expressions = []
  556. const filter = [
  557. 'bussTimeSt',
  558. 'bussTimeEd',
  559. 'pushDateSt',
  560. 'pushDateEd',
  561. 'modelType',
  562. 'endType',
  563. 'reformStatus',
  564. 'reformDeadline',
  565. 'modelDomain',
  566. 'reformDeadlineEd',
  567. 'reformDeadlineSt',
  568. 'viewFlag',
  569. 'jmEventType',
  570. ]
  571. for (const key in this.form) {
  572. if (this.form[key] && !filter.includes(key)) {
  573. expressions.push({
  574. dataType: 'str',
  575. name: key,
  576. op: 'like',
  577. stringValue: '%' + this.form[key] + '%',
  578. })
  579. }
  580. if (this.form[key] && filter.includes(key)) {
  581. expressions.push({
  582. dataType: 'str',
  583. name: key,
  584. op: 'eq',
  585. stringValue: this.form[key],
  586. })
  587. }
  588. }
  589. return expressions
  590. },
  591. processReq(req) {
  592. this.pageData.maxResults = req.data.maxResults
  593. this.pageData.startPosition = req.data.startPosition
  594. req.data.expressions = []
  595. req.data.expressions = this.setExpressions()
  596. return req
  597. },
  598. handleReset() {
  599. this.$refs.advancedSearchForm.resetFields()
  600. this.form.bussTimeEd = null
  601. this.form.bussTimeSt = null
  602. this.form.pushDateSt = null
  603. this.form.pushDateEd = null
  604. this.form.reformDeadline = null
  605. this.form.modelType = '1'
  606. this.form.endType = undefined
  607. this.form.reformStatus = undefined
  608. this.form.modelDomain = undefined
  609. this.form.belongedSecondUnit = null
  610. this.form.businessCode = null
  611. this.form.eventTagName = null
  612. this.form.secondUnit = null
  613. this.form.risk = null
  614. this.form.jmEventType = ''
  615. this.form.unit = null
  616. this.form.abbreviation = null
  617. this.form.reformDeadlineEd = null
  618. this.form.reformDeadlineSt = null
  619. this.viewFlag = undefined
  620. this.time1 = []
  621. this.time2 = []
  622. this.time3 = []
  623. this.time4 = []
  624. this.filterColumns()
  625. this.handleSearch()
  626. },
  627. handleSearch() {
  628. this.selectModelTypeChange(this.form.modelType)
  629. this.oldSearch = this.setExpressions()
  630. this.dataKey++
  631. },
  632. detailClick(record) {
  633. if (!this.rolesType) {
  634. // 如果是关注类
  635. // setUpdateViewFlag
  636. if (record.modelTypeName.includes('关注')) {
  637. AuditRiskbraryService.setUpdateViewFlag(record.instId).then((res) => {
  638. window.open('#/sd-webflow/done-pages/' + record.instId)
  639. })
  640. } else {
  641. window.open('#/sd-webflow/done-pages/' + record.instId)
  642. }
  643. return
  644. }
  645. let url = '#/audit-summarry-rectification-list?'
  646. url = '#/audit-view-change?'
  647. const riskDetail = this.oldSearch
  648. // 存到缓存里
  649. sdSessionStorage.setItem('riskDetail', JSON.stringify(riskDetail))
  650. if (record.modelTypeName !== '整改类' && record.modelTypeName !== '定位型-整改类') {
  651. url = '#/audit-summarry-interest-list?'
  652. if (this.rolesType) {
  653. url = '#/audit-view-detail?'
  654. }
  655. }
  656. if (this.rolesType) {
  657. const allQueryData = {
  658. businessCode: record.businessCode,
  659. jmEventType: record.jmEventType,
  660. eventTagName: record.eventTagName,
  661. modelTypeName: record.modelTypeName,
  662. pushDate: record.pushDate,
  663. unitCode: record.unitCode,
  664. modelId: record.modelId,
  665. }
  666. for (const key in allQueryData) {
  667. if (allQueryData[key]) {
  668. url += `${key}=${allQueryData[key]}&`
  669. }
  670. }
  671. } else {
  672. url += 'recordId=' + record.id
  673. url += '&maxResults=' + this.pageData.maxResults
  674. url += '&startPosition=' + this.pageData.startPosition
  675. }
  676. window.open(url)
  677. },
  678. fnexport() {
  679. this.isshowLoading = true
  680. if (this.rolesType) {
  681. this.fnexportNew()
  682. return
  683. }
  684. this.exportExpressions = this.setExpressions()
  685. const account = getUserInfo().account
  686. AuditRiskbraryService.getUserInfo(account).then((res) => {
  687. const params = {
  688. columns:
  689. 'sortNumber,jmEventType,eventTagName,modelTypeName,modelType,pushDate,secondUnit,secondUnitCode,unitCode,unit,questionNum,examineNum,nonExamineNum,examineFailNum,sharedSetting',
  690. maxResults: 10,
  691. startPosition: 0,
  692. expressions: this.exportExpressions,
  693. buttonExpressions: [],
  694. }
  695. AuditRiskbraryService.export(params)
  696. .then((res) => {
  697. if (res.status === 200) {
  698. const url = URL.createObjectURL(res.data)
  699. const filename = res.headers['content-disposition']
  700. const fname = filename.substring(filename.indexOf('filename=') + 9, filename.length)
  701. download(url, decodeURI(fname))
  702. // 导出成功
  703. message.success('导出成功')
  704. } else {
  705. Modal.warning({
  706. title: '提示',
  707. content: '导出报错,请联系管理员!',
  708. })
  709. return false
  710. }
  711. })
  712. .finally(() => {
  713. this.isshowLoading = false
  714. })
  715. })
  716. },
  717. fnexportNew() {
  718. this.exportExpressions = this.setExpressions()
  719. const account = getUserInfo().account
  720. AuditRiskbraryService.getUserInfo(account).then((res) => {
  721. const params = {
  722. columns:
  723. 'sortNumber,jmEventType,eventTagName,modelTypeName,modelType,pushDate,secondUnit,secondUnitCode,unitCode,unit,questionNum,examineNum,nonExamineNum,examineFailNum,sharedSetting',
  724. maxResults: 10,
  725. startPosition: 0,
  726. expressions: this.exportExpressions,
  727. buttonExpressions: [],
  728. }
  729. AuditRiskbraryService.exportNew(params)
  730. .then((res) => {
  731. if (res.status === 200) {
  732. const url = URL.createObjectURL(res.data)
  733. const filename = res.headers['content-disposition']
  734. const fname = filename.substring(filename.indexOf('filename=') + 9, filename.length)
  735. download(url, decodeURI(fname))
  736. // 导出成功
  737. message.success('导出成功')
  738. } else {
  739. Modal.warning({
  740. title: '提示',
  741. content: '导出报错,请联系管理员!',
  742. })
  743. return false
  744. }
  745. })
  746. .finally(() => {
  747. this.isshowLoading = false
  748. })
  749. })
  750. },
  751. },
  752. }
  753. </script>
  754. <style module lang="scss">
  755. @use '@/common/design' as *;
  756. .wrap-height {
  757. height: 100%;
  758. .row-height {
  759. display: flex;
  760. flex: auto;
  761. height: 100%;
  762. .rightcard {
  763. flex: 1;
  764. width: calc(100% - 20%);
  765. height: 100%;
  766. }
  767. }
  768. }
  769. .button-content {
  770. width: 260px;
  771. margin-left: 25px;
  772. button {
  773. margin: 0 4px;
  774. }
  775. }
  776. .no-action {
  777. padding: 0 15px;
  778. color: $text-color-secondary;
  779. }
  780. </style>