交通管理局公文项目
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

774 lines
26 KiB

1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
1 month ago
  1. <template>
  2. <div class="app-container">
  3. <!-- 门类列表 -->
  4. <div class="container-main">
  5. <div class="elect-cont-left">
  6. <TreeList ref="treeList" @nodeClick="handleNodeClick" />
  7. </div>
  8. <div v-if="selectedDocument.isType!==1" class="elect-cont-right">
  9. <!--工具栏-->
  10. <div class="head-container" :style="isRecycle?'display:flex;justify-content: space-between; align-items: center;':'' ">
  11. <div class="head-search" :style="isRecycle?'margin: 0;':''">
  12. <!-- 搜索 -->
  13. <el-input v-model="query.search" clearable size="small" placeholder="输入题名搜索" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="crud.toQuery" />
  14. <rrOperation />
  15. <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
  16. </div>
  17. <crudOperation v-if="!isRecycle" :permission="permission">
  18. <template v-slot:left>
  19. <!-- 新增 -->
  20. <el-button size="mini" @click="handleForm('add')"><i class="iconfont icon-xinzeng" />新增</el-button>
  21. <!-- 修改 -->
  22. <el-button size="mini" :disabled="crud.selections.length !== 1" @click="handleForm('edit')"><i class="iconfont icon-bianji" />编辑</el-button>
  23. <!-- 删除btn 多选 -->
  24. <el-button size="mini" :loading="crud.delAllLoading" :disabled="crud.selections.length === 0" @click="toDelete(crud.selections)"><i class="iconfont icon-shanchu" />删除</el-button>
  25. <el-button :loading="crud.downloadLoading" size="mini" :disabled="crud.selections.length === 0" @click="doExport(crud.selections)">
  26. <i class="iconfont icon-daochu" />
  27. 导出
  28. </el-button>
  29. </template>
  30. <template v-slot:rightButtonGroup>
  31. <div>
  32. <el-button size="mini" :disabled="crud.selections.length === 0" @click="doPrint(crud.selections)"><i class="iconfont icon-dayin" />打印处理单</el-button>
  33. </div>
  34. </template>
  35. </crudOperation>
  36. <div v-if="isRecycle">
  37. <el-button size="mini" type="success" @click="toRecover(crud.selections)"><i class="iconfont icon-huifu" />恢复</el-button>
  38. <el-button size="mini" type="success" @click="toCompletelyDelete(crud.selections)"><i class="iconfont icon-shanchu" />彻底删除</el-button>
  39. </div>
  40. </div>
  41. <!--表格渲染-->
  42. <div class="container-right">
  43. <span class="right-top-line" />
  44. <span class="left-bottom-line" />
  45. <el-table
  46. ref="table"
  47. v-loading="crud.loading"
  48. class="archives-table"
  49. :data="crud.data"
  50. style="width: 100%;"
  51. @row-click="clickRowHandler"
  52. @select="crud.selectChange"
  53. @select-all="crud.selectAllChange"
  54. @selection-change="crud.selectionChangeHandler"
  55. @cell-dblclick="tableDoubleClick"
  56. >
  57. <el-table-column type="selection" align="center" width="55" />
  58. <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
  59. <template slot="header">
  60. <el-tooltip
  61. class="item"
  62. effect="dark"
  63. :content="field.fieldCnName"
  64. placement="top-start"
  65. >
  66. <span>{{ field.fieldCnName }}</span>
  67. </el-tooltip>
  68. </template>
  69. <template slot-scope="scope">
  70. <!-- 仅针对read_type字段添加特殊处理 -->
  71. <span
  72. v-if="field.fieldName === 'read_type'"
  73. :class="{
  74. 'row-state row-packing': scope.row.read_type === '未传阅',
  75. 'row-state row-warehousing state-active': scope.row.read_type === '传阅中',
  76. 'row-state row-binding state-active': scope.row.read_type === '已完成',
  77. }"
  78. >
  79. {{ scope.row[field.fieldName] }}
  80. </span>
  81. <span v-else>{{ scope.row[field.fieldName] }}</span>
  82. </template>
  83. </el-table-column>
  84. </el-table>
  85. <!--分页组件-->
  86. <pagination v-if="crud.data.length !== 0" />
  87. </div>
  88. <detail ref="archivesInfo" :selected-document="selectedDocument" />
  89. <!--新增 / 编辑 表单组件-->
  90. <el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body :before-close="closeDialog" :visible="formVisible" :title="formTitle">
  91. <span class="dialog-right-top" />
  92. <span class="dialog-left-bottom" />
  93. <div class="setting-dialog">
  94. <PreviewForm
  95. ref="previewForm"
  96. :form-preview-data.sync="formPreviewData"
  97. :selected-category="selectedCategory"
  98. :parents-id="parentsId"
  99. :arc-id="arcId"
  100. :is-des-form-type="isDesFormType"
  101. :is-disabled="isDisabled"
  102. :selected-document="selectedDocument"
  103. :is-has-code="isHasCode"
  104. @close-dialog="closeDialog"
  105. @formLoadingShow="formLoadingShow"
  106. @refreshTree="refreshTreeList"
  107. />
  108. <div slot="footer" class="dialog-footer" style="margin-top: 20px !important;">
  109. <el-button type="text" @click="closeDialog">取消</el-button>
  110. <el-button :loading="archivesBtnLoading" type="primary" @click="handlerArchivesSubmit">保存</el-button>
  111. <!-- @click="handlerArchivesSubmit" -->
  112. <el-button :loading="bindSaveLoading" type="primary">保存并绑定标签</el-button>
  113. </div>
  114. </div>
  115. </el-dialog>
  116. <!--表单组件-->
  117. <el-dialog class="tip-dialog" :close-on-click-modal="false" :modal-append-to-body="false" append-to-body title="提示" :visible.sync="printVisible">
  118. <div class="setting-dialog">
  119. <div class="tip-content">
  120. <p class="tipMsg">此操作将打印所选公文库数据</p>
  121. </div>
  122. <el-radio-group v-model="printType" style="padding-left: 36px;">
  123. <el-radio :label="1">套打</el-radio>
  124. <el-radio :label="2">彩打</el-radio>
  125. </el-radio-group>
  126. <div slot="footer" class="dialog-footer">
  127. <el-button @click.native="printVisible = false">取消</el-button>
  128. <el-button type="primary" @click.native="handlePrint">确定</el-button>
  129. </div>
  130. </div>
  131. </el-dialog>
  132. </div>
  133. </div>
  134. <!-- 注册PDF对话框组件 -->
  135. <PdfDialog ref="pdfDialog" />
  136. <!-- <PdfViewer v-if="pdfSources.length !== 0" :pdf-sources="pdfSources" frame-height="600px" /> -->
  137. </div>
  138. </template>
  139. <script>
  140. import CRUD, { presenter, header } from '@crud/crud'
  141. import { miodLibraryCrud } from './mixins/index'
  142. import crudDocumentArchives, { FetchDelArchives, FetchCompleteDelArchives, FetchRestoreArchives, FetchInitDistributorByDocumentId } from '@/api/system/documentArchives'
  143. import rrOperation from '@crud/RR.operation'
  144. import crudOperation from '@crud/CRUD.operation'
  145. import pagination from '@crud/Pagination'
  146. import TreeList from './treeList'
  147. import PreviewForm from '@/views/components/category/PreviewForm'
  148. import detail from './module/detail'
  149. import { exportFile } from '@/utils/index'
  150. import qs from 'qs'
  151. import { mapGetters } from 'vuex'
  152. // import html2canvas from 'html2canvas'
  153. // import printJS from 'print-js'
  154. // import PdfViewer from './module/pdfViewer'
  155. import PdfDialog from './module/pdfDialog'
  156. export default {
  157. name: 'MiodLibrary',
  158. components: { TreeList, PreviewForm, detail, rrOperation, crudOperation, pagination, PdfDialog },
  159. cruds() {
  160. return [
  161. CRUD({
  162. title: '收发文', url: 'api/documentArchives/initPreDocument',
  163. crudMethod: { ...crudDocumentArchives },
  164. optShow: {
  165. add: false,
  166. edit: false,
  167. del: false,
  168. download: false,
  169. group: false,
  170. reset: false
  171. },
  172. queryOnPresenterCreated: false
  173. })
  174. ]
  175. },
  176. provide() {
  177. return {
  178. parentsData: this
  179. }
  180. },
  181. mixins: [presenter(), header(), miodLibraryCrud],
  182. props: {
  183. isRecycle: {
  184. type: Boolean,
  185. default: false
  186. },
  187. isdel: {
  188. type: Boolean,
  189. default: false
  190. }
  191. },
  192. data() {
  193. return {
  194. archivesBtnLoading: false,
  195. bindSaveLoading: false,
  196. permission: {
  197. add: ['admin', 'prearchiveLibrary:add'],
  198. edit: ['admin', 'prearchiveLibrary:edit'],
  199. del: ['admin', 'prearchiveLibrary:del'],
  200. sort: ['admin', 'prearchiveLibrary:sort']
  201. },
  202. tableDisplayFields: [], // table-list-title字段
  203. arrySort: [],
  204. selectedDocument: {},
  205. form: {},
  206. formVisible: false,
  207. formTitle: '新增文件',
  208. formPreviewData: [],
  209. selectedCategory: null,
  210. parentsId: null,
  211. arcId: null,
  212. isDesFormType: 'miodLibrary',
  213. isDisabled: false,
  214. isHasCode: false,
  215. printVisible: false,
  216. printType: 1,
  217. isHidden: false,
  218. formData: {
  219. receiveNo: '武交收〔2025〕12号',
  220. receiveDate: '2025年05月20日',
  221. urgency: '急件',
  222. senderUnit: '湖北省交通运输厅',
  223. senderNo: '鄂交发〔2025〕35号',
  224. secrecyLevel: '普通',
  225. tip: '请办公室尽快协调相关部门阅办',
  226. fileTitle: '关于加强交通运输安全生产管理的通知',
  227. recommendation: '建议转交运输科牵头办理,5个工作日内反馈意见',
  228. leaderApproval: '同意拟办意见,张XX 2025.05.20',
  229. departmentOpinion: '已阅,将于2025.05.25前反馈'
  230. },
  231. printTitle: '',
  232. pdfSources: [],
  233. printSelections: []
  234. }
  235. },
  236. computed: {
  237. ...mapGetters([
  238. 'baseApi'
  239. ])
  240. },
  241. watch: {
  242. isdel: function(newValue, oldValue) {
  243. },
  244. isRecycle: function(newValue, oldValue) {
  245. }
  246. },
  247. created() {
  248. },
  249. methods: {
  250. refreshTreeList() {
  251. this.$refs.treeList.refreshData()
  252. },
  253. resetQuery() {
  254. if (this.selectedDocument.isType === 3) {
  255. this.crud.query.docDepartment = this.selectedDocument.label
  256. this.crud.query.archiveYear = null
  257. this.crud.query.search = null
  258. } else if (this.selectedDocument.isType === 4) {
  259. this.crud.query.docDepartment = null
  260. this.crud.query.archiveYear = this.selectedDocument.label
  261. this.crud.query.search = null
  262. } else {
  263. this.crud.query.search = null
  264. this.crud.query.docDepartment = null
  265. this.crud.query.archiveYear = null
  266. }
  267. this.crud.toQuery()
  268. },
  269. [CRUD.HOOK.beforeRefresh]() {
  270. if (this.selectedDocument.isType === 2) {
  271. this.crud.query.documentId = this.selectedDocument.id
  272. } else {
  273. this.crud.query.documentId = this.selectedDocument.documentId
  274. }
  275. this.crud.query.isdel = this.isdel
  276. // this.crud.query.ignore = false
  277. this.crud.query.fondsAffiliation = this.selectedDocument.fondsId
  278. this.crud.query.sort = this.arrySort
  279. },
  280. formLoadingShow(loadingType) {
  281. this.archivesBtnLoading = loadingType
  282. },
  283. handleNodeClick(data) {
  284. if (data.isType !== 1) {
  285. this.selectedDocument = data
  286. let documentId = null
  287. if (data.isType === 2) {
  288. documentId = data.id
  289. } else {
  290. documentId = data.documentId
  291. }
  292. this.getInitDocumentsViewTable(documentId)
  293. }
  294. },
  295. // table字段项
  296. getInitDocumentsViewTable(documentId) {
  297. crudDocumentArchives.FetchInitDocumentsViewTable({ documentId: documentId }).then(data => {
  298. if (data) {
  299. this.arrySort = []
  300. this.tableDisplayFields = data
  301. const orderSortArry = this.tableDisplayFields.filter(item => item.queue).sort((a, b) => a.queue - b.queue)
  302. orderSortArry.forEach(item => {
  303. if (item.displayOrderBy) {
  304. this.arrySort.push(item.fieldName + ',' + item.displayOrderBy)
  305. }
  306. })
  307. this.$nextTick(() => {
  308. if (this.selectedDocument.isType === 3) {
  309. this.crud.query.docDepartment = this.selectedDocument.label
  310. this.crud.query.archiveYear = null
  311. } else if (this.selectedDocument.isType === 4) {
  312. this.crud.query.docDepartment = null
  313. this.crud.query.archiveYear = this.selectedDocument.label
  314. } else {
  315. this.crud.query.search = null
  316. this.crud.query.docDepartment = null
  317. this.crud.query.archiveYear = null
  318. }
  319. this.crud.toQuery()
  320. })
  321. }
  322. })
  323. },
  324. handleForm(type) {
  325. const { selectedDocument, crud } = this
  326. if (!selectedDocument) {
  327. console.warn('selectedDocument 未定义,无法继续操作')
  328. return
  329. }
  330. this.selectedCategory = selectedDocument
  331. this.isDesFormType = 'miodLibrary'
  332. let documentId
  333. if (selectedDocument.isType === 2) {
  334. documentId = selectedDocument.id
  335. } else {
  336. documentId = selectedDocument.documentId
  337. }
  338. const params = { documentId }
  339. if (type === 'add') {
  340. this.formTitle = '新增文件'
  341. params.archivesId = null
  342. } else if (type === 'edit') {
  343. this.formTitle = '编辑文件'
  344. const { id: archivesId } = crud.selections[0]
  345. this.arcId = archivesId
  346. params.archivesId = archivesId
  347. }
  348. this.getFormInfo(params, type)
  349. },
  350. getFormInfo(params, type) {
  351. crudDocumentArchives.FetchDoeditDocument(params).then(data => {
  352. console.log('data', data)
  353. const showFiledAll = data.showFiled.filter(item => item.isSequence).sort((a, b) => a.isSequence - b.isSequence)
  354. this.$nextTick(() => {
  355. this.formPreviewData = showFiledAll
  356. this.formVisible = true
  357. this.$nextTick(() => {
  358. this.$refs.previewForm.fileOriginal = null
  359. this.$refs.previewForm.fileJsonString = null
  360. if (type === 'edit') {
  361. this.$refs.previewForm.archivesType = 'edit'
  362. this.$refs.previewForm.addOrUpdateForm = data.echo
  363. if (data.fileecho) {
  364. this.$refs.previewForm.fileOriginal = data.fileecho.file_name || null
  365. this.$refs.previewForm.fileJsonString = JSON.stringify([data.fileecho])
  366. } else {
  367. this.$refs.previewForm.fileOriginal = ''
  368. this.$refs.previewForm.fileJsonString = ''
  369. }
  370. // 获取借阅者
  371. FetchInitDistributorByDocumentId(params).then(res => {
  372. if (res && res.length !== 0) {
  373. this.$refs.previewForm.miodDeptsTags = res
  374. const ids = res.map(item => item.id)
  375. this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', ids)
  376. } else {
  377. this.$set(this.$refs.previewForm.addOrUpdateForm, 'miodDepts', null)
  378. }
  379. })
  380. } else {
  381. this.$refs.previewForm.archivesType = 'add'
  382. }
  383. })
  384. })
  385. })
  386. },
  387. handlerArchivesSubmit() {
  388. let documentId
  389. if (this.selectedDocument.isType === 2) {
  390. documentId = this.selectedDocument.id
  391. } else {
  392. documentId = this.selectedDocument.documentId
  393. }
  394. this.$refs.previewForm.submitForm('addOrUpdateForm', documentId)
  395. },
  396. clickRowHandler(row) {
  397. this.$refs.table.clearSelection()
  398. this.$refs.table.toggleRowSelection(row)
  399. },
  400. // 双击查看详情
  401. tableDoubleClick(row) {
  402. console.log('tableDoubleClick', row)
  403. this.$refs.archivesInfo.archivesInfoVisible = true
  404. this.$refs.archivesInfo.archivesTabIndex = 0
  405. this.$refs.archivesInfo.parentInfo = row
  406. this.$refs.archivesInfo.getDetial(row.id)
  407. },
  408. // 删除
  409. toDelete(datas) {
  410. this.$confirm('此操作将删除当前所选公文库数据' + '<span>你是否还要继续?</span>', '提示', {
  411. confirmButtonText: '继续',
  412. cancelButtonText: '取消',
  413. type: 'warning',
  414. dangerouslyUseHTMLString: true
  415. }).then(() => {
  416. this.crud.delAllLoading = true
  417. const ids = []
  418. datas.forEach(val => {
  419. ids.push(val.id)
  420. })
  421. let documentId
  422. if (this.selectedDocument.isType === 2) {
  423. documentId = this.selectedDocument.id
  424. } else {
  425. documentId = this.selectedDocument.documentId
  426. }
  427. const params = {
  428. 'documentId': documentId,
  429. 'archivesIds': ids
  430. }
  431. FetchDelArchives(params).then((res) => {
  432. console.log('res', res)
  433. if (res.code !== 500) {
  434. this.crud.notify('删除成功', CRUD.NOTIFICATION_TYPE.SUCCESS)
  435. this.crud.refresh()
  436. } else {
  437. this.crud.notify('删除失败', CRUD.NOTIFICATION_TYPE.ERROR)
  438. }
  439. this.crud.delAllLoading = false
  440. }).catch(err => {
  441. this.crud.delAllLoading = false
  442. console.log(err)
  443. })
  444. }).catch(() => {
  445. })
  446. },
  447. // 导出
  448. doExport(datas) {
  449. this.crud.downloadLoading = true
  450. this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
  451. confirmButtonText: '继续',
  452. cancelButtonText: '取消',
  453. type: 'warning',
  454. dangerouslyUseHTMLString: true
  455. }).then(() => {
  456. const ids = []
  457. datas.forEach(val => {
  458. ids.push(val.id)
  459. })
  460. let documentId
  461. if (this.selectedDocument.isType === 2) {
  462. documentId = this.selectedDocument.id
  463. } else {
  464. documentId = this.selectedDocument.documentId
  465. }
  466. const params = {
  467. 'documentId': documentId,
  468. 'ids': ids
  469. }
  470. exportFile(this.baseApi + '/api/documentArchives/downloadDocumentArchives?' + qs.stringify(params, { indices: false }))
  471. this.crud.downloadLoading = false
  472. }).catch(() => {
  473. this.crud.downloadLoading = false
  474. })
  475. },
  476. doPrint(datas) {
  477. this.printVisible = true
  478. this.printSelections = datas
  479. },
  480. handlePrint() {
  481. this.printVisible = false
  482. let documentId
  483. if (this.selectedDocument.isType === 2) {
  484. documentId = this.selectedDocument.id
  485. } else {
  486. documentId = this.selectedDocument.documentId
  487. }
  488. const ids = this.printSelections.map(item => item.id)
  489. console.log('ids', ids)
  490. const params = {
  491. 'archivesId': ids,
  492. 'documentId': documentId,
  493. 'printType': this.printType // 1 套打 2 彩打
  494. }
  495. this.$refs.pdfDialog.openDialog(params)
  496. // this.getHandleDocument()
  497. },
  498. async getHandleDocument() {
  499. try {
  500. // console.log('params', params)
  501. // FetchHandleDocument(params).then(async(res) => {
  502. // console.log(res)
  503. // this.pdfSources = res.map(item => {
  504. // // 如果后端返回的是带前缀的Base64,可以直接使用
  505. // return item.startsWith('data:application/pdf;base64,')
  506. // ? item
  507. // : `data:application/pdf;base64,${item}`
  508. // })
  509. // })
  510. } catch (error) {
  511. console.error(error)
  512. }
  513. },
  514. // 回收站 - 恢复
  515. toRecover(datas) {
  516. if (datas.length === 0) {
  517. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  518. return false
  519. }
  520. this.$confirm('此恢复将会把所选条目及其子集一并恢复' + '<span>你是否还要继续?</span>', '提示', {
  521. confirmButtonText: '继续',
  522. cancelButtonText: '取消',
  523. type: 'warning',
  524. dangerouslyUseHTMLString: true
  525. }).then(() => {
  526. const archivesIds = []
  527. datas.forEach(val => {
  528. archivesIds.push(val.id)
  529. })
  530. let documentId
  531. if (this.selectedDocument.isType === 2) {
  532. documentId = this.selectedDocument.id
  533. } else {
  534. documentId = this.selectedDocument.documentId
  535. }
  536. const params = {
  537. 'documentId': documentId,
  538. 'archivesIds': archivesIds
  539. }
  540. console.log('params', params)
  541. FetchRestoreArchives(params).then((res) => {
  542. console.log('res', res)
  543. if (res.code !== 500) {
  544. if (res.includes('成功')) {
  545. this.$message({ message: res, type: 'success', offset: 8 })
  546. this.crud.refresh()
  547. this.refreshTreeList()
  548. } else {
  549. this.$message({ message: res, type: 'error', offset: 8 })
  550. }
  551. } else {
  552. this.$message({ message: '恢复所选档案失败', type: 'error', offset: 8 })
  553. }
  554. }).catch(err => {
  555. console.log(err)
  556. })
  557. }).catch(() => {
  558. })
  559. },
  560. // 回收站 - 彻底删除
  561. toCompletelyDelete(datas) {
  562. if (datas.length === 0) {
  563. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  564. return false
  565. }
  566. this.$confirm('此删除将把会所选条目与其子集彻底删除' + '<span>你是否还要继续?</span>', '提示', {
  567. confirmButtonText: '继续',
  568. cancelButtonText: '取消',
  569. type: 'warning',
  570. dangerouslyUseHTMLString: true
  571. }).then(() => {
  572. const archivesIds = []
  573. datas.forEach(val => {
  574. archivesIds.push(val.id)
  575. })
  576. let documentId
  577. if (this.selectedDocument.isType === 2) {
  578. documentId = this.selectedDocument.id
  579. } else {
  580. documentId = this.selectedDocument.documentId
  581. }
  582. const params = {
  583. 'documentId': documentId,
  584. 'archivesIds': archivesIds
  585. }
  586. console.log('params', params)
  587. FetchCompleteDelArchives(params).then((res) => {
  588. if (res.code !== 500) {
  589. this.$message({ message: res, type: 'success', offset: 8 })
  590. this.crud.refresh()
  591. this.refreshTreeList()
  592. } else {
  593. this.$message({ message: '删除所选档案失败', type: 'error', offset: 8 })
  594. }
  595. }).catch(err => {
  596. console.log(err)
  597. })
  598. }).catch(() => {
  599. })
  600. },
  601. closeDialog() {
  602. this.formVisible = false
  603. this.$refs.previewForm.miodDeptsTags = []
  604. this.$refs.previewForm.miodDeptsSelections = []
  605. this.$refs.previewForm.deptsValid = false
  606. if (this.$refs.previewForm.$refs['addOrUpdateForm']) {
  607. this.$refs.previewForm.$refs['addOrUpdateForm'].clearValidate()
  608. this.$refs.previewForm.$refs['addOrUpdateForm'].resetFields()
  609. }
  610. }
  611. }
  612. }
  613. </script>
  614. <style>
  615. @media print {
  616. html,body{
  617. height: inherit;
  618. }
  619. .print-container {
  620. position: absolute;
  621. top: 0;
  622. right: 0;
  623. bottom: 0;
  624. left: 0;
  625. }
  626. @page {
  627. size: A4;
  628. margin: 2cm;
  629. }
  630. }
  631. </style>
  632. <style lang='scss' scoped>
  633. @import "~@/assets/styles/collect-reorganizi.scss";
  634. @mixin management-fixed-style{
  635. [data-theme="dark"] & {
  636. background-color: #031435 !important;
  637. -webkit-box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16);
  638. box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16);
  639. }
  640. [data-theme="light"] & {
  641. background-color: #fff;
  642. }
  643. }
  644. .el-table {
  645. ::v-deep .el-table__fixed-right {
  646. @include management-fixed-style;
  647. }
  648. }
  649. .preview-dialog .el-dialog .preview-content {
  650. height: calc(100vh - 264px) !important;
  651. }
  652. .elect-cont-right .container-right {
  653. min-height: calc(100vh - 284px);
  654. }
  655. .dialog-footer .el-button.el-button--primary,
  656. .el-message-box__btns .el-button.el-button--primary{
  657. width: auto;
  658. height: auto;
  659. line-height:normal;
  660. padding: 6px 20px;
  661. }
  662. .tip-dialog{
  663. ::v-deep .el-dialog{
  664. width: 504px;
  665. .setting-dialog{
  666. padding: 10px 10px 0 10px;
  667. }
  668. .tip-content{
  669. padding-left: 34px;
  670. font-size: 14px;
  671. line-height: 24px;
  672. color: #0C0E1E;
  673. background: url("~@/assets/images/icon/tip-icon.png") no-repeat left top;
  674. background-size: 24px 24px;
  675. padding-bottom: 20px;
  676. span{
  677. font-size: 12px;
  678. color: #ED4A41;
  679. }
  680. }
  681. }
  682. .dialog-footer{
  683. margin-top: 27px;
  684. }
  685. }
  686. .intoExamine{
  687. position: fixed;
  688. left: 50%;
  689. top: 50%;
  690. transform: translate(-50%,-50%);
  691. z-index: 99;
  692. }
  693. /* 基础样式 */
  694. .print-container {
  695. position: fixed;
  696. left: 50%;
  697. top: 50%;
  698. transform: translate(-50%,-50%);
  699. z-index: 99;
  700. padding: 0 0 40px 0;
  701. }
  702. /* 标题样式 */
  703. .print-title {
  704. font-size: 22pt;
  705. font-family: "华文中宋";
  706. color: #ff0000;
  707. margin: 20px 0;
  708. }
  709. /* 表格样式 */
  710. .official-table {
  711. border-collapse: collapse;
  712. width: 100%;
  713. }
  714. .label-cell, .content-cell {
  715. border: 1px solid #ff0000;
  716. padding: 8px;
  717. }
  718. .label-cell {
  719. background: #ffffff;
  720. text-align: center;
  721. font-size: 12pt;
  722. color: #ff0000;
  723. vertical-align: middle;
  724. }
  725. .content-cell {
  726. background: #ffffff;
  727. font-size: 12pt;
  728. vertical-align: top;
  729. }
  730. .content-left {
  731. text-align: left;
  732. }
  733. .content-center {
  734. text-align: center;
  735. }
  736. .header-cell {
  737. border: none;
  738. padding: 20px 0;
  739. text-align: center;
  740. }
  741. .header-text {
  742. font-family: "华文中宋";
  743. font-size: 22pt;
  744. color: #ff0000;
  745. margin: 0;
  746. }
  747. </style>