交通管理局公文项目
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.

816 lines
28 KiB

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