xm-annual-report-list.vue 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796
  1. <template>
  2. <div :class="$style.wrapHeight">
  3. <a-card :bordered="false">
  4. <a-tabs v-model="activeKey" type="line" @change="toggleTabs">
  5. <a-tab-pane key="1" tab="年度报告">
  6. <!-- 高级搜索组件 -->
  7. <audit-advanced-query
  8. :class="$style.advancedQuery"
  9. :expand="expand"
  10. :search-data="formData"
  11. :ref-name="searchform"
  12. :search-style="{ height: '210px', left: '20px', top: '60px' }"
  13. :search-fun="handleSearch"
  14. @searchedClick="searchedClick"
  15. >
  16. <template>
  17. <a-row>
  18. <a-col :span="12">
  19. <a-form-model-item :label="'年\u2002\u2002度'" prop="reportYear">
  20. <a-input v-model="formData.reportYear" allow-clear />
  21. </a-form-model-item>
  22. </a-col>
  23. <a-col :span="12">
  24. <a-form-model-item :label="'标\u2002\u2002题'" prop="title">
  25. <a-input v-model="formData.title" allow-clear />
  26. </a-form-model-item>
  27. </a-col>
  28. </a-row>
  29. <a-row>
  30. <a-col :span="12">
  31. <a-form-model-item :label="'当前状态'" prop="flowState">
  32. <sd-select
  33. v-model="formData.flowState"
  34. :allow-clear="true"
  35. :options="flowStateOptions"
  36. />
  37. </a-form-model-item>
  38. </a-col>
  39. <a-col :span="12">
  40. <a-form-model-item :label="'上报单位'" prop="auditedUnitNames">
  41. <a-input v-model="formData.auditedUnitNames" allow-clear />
  42. </a-form-model-item>
  43. </a-col>
  44. </a-row>
  45. <a-row>
  46. <a-col :span="12">
  47. <a-form-model-item :label="'是否逾期未报'" prop="isLate">
  48. <sd-select
  49. v-model="formData.isLate"
  50. :allow-clear="true"
  51. :options="isLateOptions"
  52. />
  53. </a-form-model-item>
  54. </a-col>
  55. </a-row>
  56. </template>
  57. </audit-advanced-query>
  58. <a-card>
  59. <sd-data-table-ex
  60. ref="SJMBKDataTable"
  61. :filter-expressions="expressions"
  62. :columns="columns"
  63. :actions="actions"
  64. form-id="spicAnnualReport"
  65. data-url="api/xcoa-mobile/v1/spicannualreport/all-list"
  66. :search-fields="['fileTitle']"
  67. show-selection
  68. :show-advance-query="true"
  69. :custom-delete-fun="deleteFun"
  70. @searchbtnClick="searchbtnClick"
  71. >
  72. <div slot="islink" slot-scope="text, record">
  73. <a :title="text" @click="rowClick(record)">{{ text }}</a>
  74. </div>
  75. </sd-data-table-ex>
  76. </a-card>
  77. </a-tab-pane>
  78. <a-tab-pane key="2" tab="年报资料下发">
  79. <!-- 高级搜索区域 -->
  80. <audit-advanced-query
  81. :expand="expand"
  82. :search-data="SJJHAdvSearchForm"
  83. :ref-name="searchform"
  84. :search-style="{ height: '170px', left: '20px', top: '57px' }"
  85. :search-fun="handleSearch2"
  86. @searchedClick="searchedClick"
  87. >
  88. <template>
  89. <a-col :span="8">
  90. <a-form-model-item :label="'年度'" prop="reportYear">
  91. <a-input v-model="SJJHAdvSearchForm.reportYear" allow-clear />
  92. </a-form-model-item>
  93. </a-col>
  94. <a-col :span="8">
  95. <a-form-model-item label="当前状态" prop="status">
  96. <sd-select
  97. v-model="SJJHAdvSearchForm.status"
  98. :allow-clear="true"
  99. :options="flowStateOptions2"
  100. />
  101. </a-form-model-item>
  102. </a-col>
  103. <a-col :span="8">
  104. <a-form-model-item label="编辑人员" prop="creatorName">
  105. <a-input v-model="SJJHAdvSearchForm.creatorName" />
  106. </a-form-model-item>
  107. </a-col>
  108. </template>
  109. </audit-advanced-query>
  110. <sd-data-table-ex
  111. ref="SJJHDataTable"
  112. :filter-expressions="SJJHTableExpressions"
  113. :columns="columns2"
  114. show-selection
  115. form-id="spicAnnualReportPublish"
  116. data-url="api/xcoa-mobile/v1/spicannualreportpublish/all_list"
  117. :search-fields="['fileTitle']"
  118. :actions="this.isApplicationAdmin === true ? actions2 : actions1"
  119. :custom-delete-fun="deleteRows"
  120. :show-advance-query="true"
  121. @searchbtnClick="searchbtnClick"
  122. >
  123. <div slot="islink" slot-scope="text, record">
  124. <a :title="text" @click="rowClick2(record)">{{ text }}</a>
  125. </div>
  126. </sd-data-table-ex>
  127. </a-tab-pane>
  128. </a-tabs>
  129. </a-card>
  130. </div>
  131. </template>
  132. <script>
  133. import { message, Modal } from 'ant-design-vue'
  134. import moment from 'moment'
  135. import errorUtil from '@/common/services/error-util'
  136. import CompositeDatabaseService from '../spiccompositedatabase/composite-database-service'
  137. import components from './_import-components/xm-annual-report-list-import'
  138. import crossWindowWatcher from '@/common/services/cross-window-watcher'
  139. import TableColumnTypes from '@/common/services/table-column-types'
  140. import TableActionTypes from '@/common/services/table-action-types'
  141. import auditAdvancedQuery from '@product/iam/components/audit-advanced-query.vue'
  142. import auditAdvancedQueryMixins from '@product/iam/components/audit-advanced-query-mixins'
  143. import auditAdvancedGroupMixins from '@product/iam/components/audit-advanced-group-mixins'
  144. import { getUserInfo } from '@/common/store-mixin'
  145. import axios from '@/common/services/axios-instance'
  146. export default {
  147. name: 'XmAnnualReportList',
  148. metaInfo: {
  149. title: '年度报告库',
  150. },
  151. components: {
  152. ...components,
  153. auditAdvancedQuery,
  154. },
  155. mixins: [auditAdvancedQueryMixins, auditAdvancedGroupMixins],
  156. data() {
  157. return {
  158. year: null,
  159. endOpen: false,
  160. expand: false,
  161. isApplicationAdmin: false, // 是否为年度报告管理员
  162. searchform: 'searchform',
  163. SJJHTableExpressions: [],
  164. activeKey: '1',
  165. expressions: [],
  166. formData: {
  167. reportYear: '',
  168. title: '',
  169. flowState: '',
  170. auditedUnitNames: '',
  171. isLate: '',
  172. },
  173. SJJHAdvSearchForm: {
  174. reportYear: '',
  175. status: '',
  176. creatorName: '',
  177. },
  178. formId: 'spicAnnualReport',
  179. tableId: 'SJMBKDataTable',
  180. flowStateOptions: [
  181. {
  182. id: '开始',
  183. name: '开始',
  184. },
  185. {
  186. id: '结束',
  187. name: '结束',
  188. },
  189. ],
  190. flowStateOptions2: [
  191. {
  192. id: '起草中',
  193. name: '起草中',
  194. },
  195. {
  196. id: '已发布',
  197. name: '已发布',
  198. },
  199. ],
  200. columns: [
  201. {
  202. title: '序号',
  203. dataIndex: 'sortNumber',
  204. width: '60px',
  205. customRender: (text, record, index) => `${index + 1}`,
  206. },
  207. {
  208. title: '年度',
  209. dataIndex: 'reportYear',
  210. width: '80px',
  211. },
  212. {
  213. title: '标题',
  214. dataIndex: 'fileTitle',
  215. scopedSlots: { customRender: 'islink' },
  216. width: '15%',
  217. },
  218. {
  219. title: '上报单位',
  220. dataIndex: 'auditedUnitNames',
  221. width: '200px',
  222. },
  223. {
  224. title: '编制人员',
  225. dataIndex: 'creatorName',
  226. width: '100px',
  227. },
  228. {
  229. title: '编制日期',
  230. dataIndex: 'creationTime',
  231. sorter: true,
  232. sdRender: TableColumnTypes.date,
  233. sortDirections: ['ascend', 'descend'],
  234. width: '100px',
  235. },
  236. // {
  237. // title: '编制日期',
  238. // dataIndex: 'creationTime',
  239. // sdRender: TableColumnTypes.date,
  240. // defaultSortOrder: 'descend',
  241. // sorter: true,
  242. // sortDirections: ['ascend', 'descend'],
  243. // width: '30%',
  244. // },
  245. {
  246. title: '当前状态',
  247. dataIndex: 'flowState',
  248. width: '100px',
  249. sorter: true,
  250. },
  251. {
  252. title: '当前处理人',
  253. dataIndex: 'currentUser',
  254. width: '100px',
  255. },
  256. {
  257. title: '操作',
  258. dataIndex: 'opt',
  259. aligen: 'center',
  260. customRender: (text, record, index) => {
  261. if (record.endType === 5 && record.publishAccount === getUserInfo().account) {
  262. return (
  263. <span>
  264. <a vOn:click={(evt) => this.overruleReport(record)}>驳回上报</a>
  265. </span>
  266. )
  267. }
  268. },
  269. width: '100px',
  270. },
  271. ],
  272. columns2: [
  273. {
  274. title: '序号',
  275. dataIndex: 'sortNumber',
  276. width: '60px',
  277. customRender: (text, record, index) => `${index + 1}`,
  278. },
  279. {
  280. title: '年度',
  281. dataIndex: 'reportYear',
  282. width: '80px',
  283. },
  284. {
  285. title: '标题',
  286. width: '15%',
  287. dataIndex: 'fileTitle',
  288. scopedSlots: { customRender: 'islink' },
  289. },
  290. {
  291. title: '在线反馈截止时间',
  292. dataIndex: 'lastTime',
  293. width: '120px',
  294. sorter: true,
  295. sdRender: TableColumnTypes.date,
  296. },
  297. {
  298. title: '编制人员',
  299. dataIndex: 'creatorName',
  300. width: '120px',
  301. },
  302. {
  303. title: '编制日期',
  304. dataIndex: 'creationTime',
  305. sorter: true,
  306. sdRender: TableColumnTypes.date,
  307. sortDirections: ['ascend', 'descend'],
  308. width: '120px',
  309. },
  310. {
  311. title: '当前状态',
  312. dataIndex: 'status',
  313. sortDirections: ['ascend', 'descend'],
  314. width: '120px',
  315. sorter: true,
  316. },
  317. ],
  318. isLateOptions: [
  319. {
  320. id: '是',
  321. name: '是',
  322. },
  323. {
  324. id: '否',
  325. name: '否',
  326. },
  327. ],
  328. actions: [
  329. // {
  330. // label: '新建',
  331. // id: 'new',
  332. // permission: 'create',
  333. // type: TableActionTypes.primary, // 新建按钮,不需要回调,自动处理
  334. // callback: () => {
  335. // const url = '/sd-flow-guide?code=SPIC_AUDIT_REPORT' // 新页面要打开的路由地址
  336. // crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  337. // if (refreshFlag) {
  338. // // 这里写或者调刷新的方法
  339. // this.refreshDataTable()
  340. // }
  341. // })
  342. // },
  343. // },
  344. // {
  345. // label: '删除',
  346. // id: 'delete',
  347. // type: 'delete', // 删除按钮,不需要回调,会自动处理
  348. // permission: null,
  349. // },
  350. {
  351. label: '批量导出附件',
  352. id: 'exportdataFiles',
  353. permission: null, // 纯前端操作,不需要权限控制
  354. callback: this.exportAnnualReportFiles,
  355. },
  356. ],
  357. actions1: [],
  358. actions2: [
  359. {
  360. label: '新建',
  361. id: 'new',
  362. permission: 'create',
  363. type: TableActionTypes.primary, // 新建按钮,不需要回调,自动处理
  364. callback: () => {
  365. const url = '/xm-annual-report-puiblish' // 新页面要打开的路由地址
  366. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  367. if (refreshFlag) {
  368. // 这里写或者调刷新的方法
  369. this.refreshDataTable()
  370. }
  371. })
  372. },
  373. },
  374. {
  375. label: '删除',
  376. id: 'delete',
  377. type: 'delete', // 删除按钮,不需要回调,会自动处理
  378. permission: null,
  379. },
  380. ],
  381. }
  382. },
  383. mounted() {
  384. // 初始化权限
  385. this.initJurisdiction()
  386. },
  387. methods: {
  388. // 初始化权限
  389. initJurisdiction() {
  390. debugger
  391. // 校验权限(检查为年度报告管理员)
  392. CompositeDatabaseService.checkAnnualReportPermission().then((res) => {
  393. this.isApplicationAdmin = res.data.isHasPermission // 按钮权限(年度报告管理员)
  394. })
  395. },
  396. // 驳回上报
  397. overruleReport(record) {
  398. axios({
  399. url: 'api/xcoa-mobile/v1/spicannualreport/overruleReport?id=' + record.id,
  400. method: 'get',
  401. }).then((res) => {
  402. if (res.data) {
  403. Modal.info({
  404. title: '提示',
  405. content: '驳回成功!',
  406. })
  407. this.$refs.SJMBKDataTable.refresh()
  408. } else {
  409. Modal.warning({
  410. title: '提示',
  411. content: '驳回失败,请联系管理员!',
  412. })
  413. }
  414. })
  415. },
  416. // 导出审计模板附件
  417. exportAnnualReportFiles() {
  418. const selectedRowKeys = this.$refs.SJMBKDataTable.getSelectedRowKeys()
  419. if (selectedRowKeys.length === 0) {
  420. Modal.warning({
  421. title: '提示',
  422. content: '请选择要一键导出附件的报告(最多可选择10条)',
  423. })
  424. } else {
  425. const timestamp = new Date().getTime()
  426. console.log(timestamp)
  427. axios({
  428. method: 'get',
  429. url: 'api/xcoa-mobile/v1/spic-common/exportAnnualReportFiles/' + selectedRowKeys,
  430. responseType: 'blob',
  431. }).then((res) => {
  432. if (res.data) {
  433. let blob = null
  434. let fileName = res.headers['content-disposition']?.split('fileName=')[1]
  435. if (fileName === null || fileName === undefined) {
  436. fileName = '.zip'
  437. }
  438. blob = new Blob([res.data], { type: 'application/zip' })
  439. const time = moment(moment()).format('yyyyMMDD')
  440. fileName = '年度报告-' + time + '.zip'
  441. if ('msSaveOrOpenBlob' in navigator) {
  442. // 适配ie
  443. window.navigator.msSaveOrOpenBlob(blob, fileName)
  444. } else {
  445. // 其他浏览器
  446. const blobUrl = window.URL.createObjectURL(blob)
  447. const a = document.createElement('a')
  448. a.style.display = 'none'
  449. a.href = blobUrl
  450. a.setAttribute('download', fileName)
  451. a.click()
  452. }
  453. message.success('导出成功')
  454. } else {
  455. message.error('导出失败,请联系系统管理员')
  456. }
  457. })
  458. }
  459. },
  460. onChange(value) {
  461. if (value) {
  462. this.SJJHAdvSearchForm.reportYear = value.format('yyyy')
  463. } else {
  464. this.SJJHAdvSearchForm.reportYear = ''
  465. }
  466. },
  467. deleteRows() {
  468. const selectedRowKeys = this.$refs.SJJHDataTable.getSelectedRowKeys()
  469. if (selectedRowKeys.length === 0) {
  470. Modal.info({
  471. content: '请选择需要删除的文件',
  472. })
  473. return
  474. }
  475. const selectedRows = this.$refs.SJJHDataTable.getSelectedRows()
  476. let flag = false
  477. selectedRows.forEach((item) => {
  478. if (item.status === '已发布') {
  479. flag = true
  480. }
  481. })
  482. if (flag) {
  483. Modal.error({
  484. title: '删除失败:存在已发布状态的数据',
  485. })
  486. return
  487. }
  488. const currentAccount = getUserInfo().account
  489. const instIds = []
  490. var flages = true
  491. selectedRows.forEach((item) => {
  492. var instId = item.instId - 0
  493. if (item.creatorAccount !== currentAccount) {
  494. Modal.info({
  495. content: '请选择自己创建的文件',
  496. })
  497. flages = false
  498. } else {
  499. instIds.push(instId)
  500. }
  501. })
  502. if (!flages) {
  503. return
  504. }
  505. return new Promise((resolve) => {
  506. Modal.confirm({
  507. title: '您确定删除这项内容吗?',
  508. content: '删除这条数据后,就无法恢复初始的状态。',
  509. okText: '删除',
  510. cancelText: '取消',
  511. okType: 'danger',
  512. onOk: () => {
  513. axios({
  514. url: 'api/framework/v1/page/' + this.$refs.SJJHDataTable.formId,
  515. method: 'delete',
  516. params: { ids: selectedRowKeys.join(',') },
  517. })
  518. .then(() => {
  519. this.$refs.SJJHDataTable.clearSelection()
  520. this.$refs.SJJHDataTable.refresh()
  521. message.success('删除成功')
  522. this.$emit('recordsDeleted', selectedRowKeys)
  523. })
  524. .catch((err) => {
  525. const msg = errorUtil.getMessage(err) || '删除失败'
  526. message.error(msg)
  527. })
  528. .finally(resolve)
  529. },
  530. onCancel: () => {
  531. resolve()
  532. },
  533. })
  534. })
  535. },
  536. yearChange(value) {
  537. this.year = value
  538. this.model.reportYear = value.format('YYYY')
  539. if (document.getElementsByClassName('ant-calendar-picker-container').length > 0) {
  540. document.getElementsByClassName('ant-calendar-picker-container')[0].style.display = 'none'
  541. }
  542. },
  543. handleEndOpenChange(open) {
  544. this.endOpen = open
  545. },
  546. clearSelection() {
  547. this.$refs.SJMBKDataTable.clearSelection()
  548. },
  549. // 刷新列表
  550. refresh() {
  551. this.$emit('refreshTable')
  552. },
  553. deleteFun() {
  554. debugger
  555. const selectedRowKeys = this.$refs.SJMBKDataTable.getSelectedRowKeys()
  556. if (selectedRowKeys.length === 0) {
  557. Modal.info({
  558. content: '请选择需要删除的文件',
  559. })
  560. return
  561. }
  562. const selectedRows = this.$refs.SJMBKDataTable.getSelectedRows()
  563. const currentAccount = getUserInfo().account
  564. const instIds = []
  565. let flag = false
  566. selectedRows.forEach((item) => {
  567. if (item.endType !== 0) {
  568. flag = true
  569. }
  570. })
  571. if (flag) {
  572. Modal.error({
  573. title: '删除失败:存在不是草稿状态的数据',
  574. })
  575. return
  576. }
  577. var flages = true
  578. selectedRows.forEach((item) => {
  579. var instId = item.instId - 0
  580. if (item.creatorAccount !== currentAccount) {
  581. Modal.info({
  582. content: '请选择自己创建的文件',
  583. })
  584. flages = false
  585. } else {
  586. instIds.push(instId)
  587. }
  588. })
  589. if (!flages) {
  590. return
  591. }
  592. return new Promise((resolve) => {
  593. Modal.confirm({
  594. title: '您确定删除这项内容吗?',
  595. content: '删除这条数据后,就无法恢复初始的状态。',
  596. okText: '删除',
  597. okType: 'danger',
  598. onOk: () => {
  599. axios({
  600. url: 'api/flow-mobile/v1/process-manager/process-instance/remove',
  601. method: 'POST',
  602. data: {
  603. flowCallbackBeanName: 'formBeanCleanerCallBack',
  604. processInstanceIds: instIds.join(','),
  605. },
  606. })
  607. .then(() => {
  608. this.clearSelection()
  609. this.$refs.SJMBKDataTable.refresh()
  610. message.success('删除成功')
  611. /**
  612. * 数据删除成功后触发
  613. * @property {Array} rowKeys 已删除的记录ids
  614. */
  615. this.$emit('recordsDeleted', selectedRowKeys)
  616. })
  617. .catch((err) => {
  618. const msg = errorUtil.getMessage(err) || '删除失败'
  619. message.error(msg)
  620. })
  621. .finally(resolve)
  622. },
  623. onCancel: () => {
  624. resolve()
  625. },
  626. })
  627. })
  628. },
  629. // 新建、详情打开新页面
  630. rowClick(record) {
  631. let openurl = ''
  632. if (
  633. (record.flowState === '起草') |
  634. (record.flowState === '开始') |
  635. (record.flowState === null)
  636. ) {
  637. if (
  638. (record.flowState === '起草' || record.flowState === '开始') &&
  639. record.creatorAccount === getUserInfo().account
  640. ) {
  641. openurl = '/sd-webflow/pages/draft/' + record.instId
  642. } else {
  643. openurl = '/sd-webflow/done-pages/' + record.instId
  644. }
  645. } else {
  646. openurl = '/sd-webflow/done-pages/' + record.instId
  647. }
  648. crossWindowWatcher.waitForChanged(openurl).then((refreshFlag) => {
  649. if (refreshFlag) {
  650. // 这里写或者调刷新的方法
  651. this.refresh()
  652. }
  653. })
  654. },
  655. rowClick2(record) {
  656. const url = '/xm-annual-report-puiblish?record=' + record.id
  657. crossWindowWatcher.waitForChanged(url).then((refreshFlag) => {
  658. if (refreshFlag) {
  659. this.refreshDataTable()
  660. }
  661. })
  662. },
  663. refreshDataTable() {
  664. if (this.activeKey === '1') {
  665. this.tableId = 'SJMBKDataTable'
  666. }
  667. if (this.activeKey === '2') {
  668. this.tableId = 'SJJHDataTable'
  669. }
  670. if (this.$refs[`${this.tableId}`]) {
  671. this.$refs[`${this.tableId}`].clearSelection()
  672. this.$refs[`${this.tableId}`].refresh()
  673. }
  674. },
  675. toggleTabs(key) {
  676. this.activeKey = key
  677. if (this.activeKey === '1') {
  678. this.tableId = 'SJMBKDataTable'
  679. this.expressions = []
  680. } else {
  681. this.tableId = 'SJJHDataTable'
  682. this.SJJHTableExpressions = []
  683. }
  684. if (this.$refs[`${this.tableId}`]) {
  685. this.$refs[`${this.tableId}`].clearSelection()
  686. }
  687. },
  688. searchedClick() {
  689. this.expand = !this.expand
  690. },
  691. // 查询
  692. handleSearch() {
  693. debugger
  694. this.expressions = []
  695. // 年度
  696. if (this.formData.reportYear) {
  697. this.expressions.push({
  698. dataType: 'str',
  699. name: 'reportYear',
  700. op: 'like',
  701. stringValue: `%${this.formData.reportYear}%`,
  702. })
  703. }
  704. // 当前状态
  705. if (this.formData.flowState[0]) {
  706. this.expressions.push({
  707. dataType: 'str',
  708. name: 'flowState',
  709. op: 'like',
  710. stringValue: `%${this.formData.flowState[0].id}%`,
  711. })
  712. }
  713. // 报送机构名称
  714. if (this.formData.auditedUnitNames) {
  715. this.expressions.push({
  716. dataType: 'str',
  717. name: 'auditedUnitNames',
  718. op: 'like',
  719. stringValue: `%${this.formData.auditedUnitNames}%`,
  720. })
  721. }
  722. if (this.formData.title) {
  723. this.expressions.push({
  724. dataType: 'str',
  725. name: 'title',
  726. op: 'like',
  727. stringValue: `%${this.formData.title}%`,
  728. })
  729. }
  730. if (this.formData.isLate[0]) {
  731. this.expressions.push({
  732. dataType: 'str',
  733. name: 'isLate',
  734. op: 'like',
  735. stringValue: `${this.formData.isLate[0].id}`,
  736. })
  737. }
  738. this.$refs[`${this.tableId}`].clearSelection()
  739. },
  740. handleSearch2() {
  741. this.SJJHTableExpressions = []
  742. // 年度
  743. if (this.SJJHAdvSearchForm.reportYear) {
  744. this.SJJHTableExpressions.push({
  745. dataType: 'str',
  746. name: 'reportYear',
  747. op: 'like',
  748. stringValue: `%${this.SJJHAdvSearchForm.reportYear}%`,
  749. })
  750. }
  751. // 当前状态
  752. if (this.SJJHAdvSearchForm.status[0]) {
  753. this.SJJHTableExpressions.push({
  754. dataType: 'str',
  755. name: 'status',
  756. op: 'like',
  757. stringValue: `%${this.SJJHAdvSearchForm.status[0].id}%`,
  758. })
  759. }
  760. // 编辑人员
  761. if (this.SJJHAdvSearchForm.creatorName) {
  762. this.SJJHTableExpressions.push({
  763. dataType: 'str',
  764. name: 'creatorName',
  765. op: 'like',
  766. stringValue: `%${this.SJJHAdvSearchForm.creatorName}%`,
  767. })
  768. }
  769. this.$refs[`${this.tableId}`].clearSelection()
  770. },
  771. },
  772. }
  773. </script>
  774. <style module lang="scss">
  775. @use '@/common/design' as *;
  776. .advancedQuery {
  777. :global(.ant-col .ant-form-item-label) {
  778. width: 30% !important;
  779. }
  780. :global(.ant-col .ant-form-item-control-wrapper) {
  781. width: 60% !important;
  782. }
  783. }
  784. </style>