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

950 lines
35 KiB

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>
  3. <div class="collect-header contorl-header">
  4. <h4 :class="classType">{{ collectTitle }} </h4>
  5. <div class="collect-filter">
  6. <el-select
  7. v-if="!isRecycle && isTitleType !== 6 && isTitleType !== 2"
  8. v-model="selectStatus"
  9. multiple
  10. collapse-tags
  11. style="margin-right: 10px; width: 160px;"
  12. placeholder="请选择状态"
  13. @change="handleSearch(collectLevel)"
  14. >
  15. <el-option-group
  16. v-for="group in statusOptions"
  17. v-show="!(selectedCategory.arrangeType === 2 && isTitleType===3 && (group.label === '标签状态' || group.label === '借阅状态'))"
  18. :key="group.label"
  19. :label="group.label"
  20. >
  21. <el-option
  22. v-for="item in group.options"
  23. :key="item.value"
  24. :label="item.label"
  25. :value="item.value"
  26. />
  27. </el-option-group>
  28. </el-select>
  29. <treeselect
  30. v-if="selectedCategory.arrangeType === 3 && isTitleType !== 4 && isTitleType !== 6"
  31. v-model="query.project_class"
  32. :options="projectOptions"
  33. style="width: 180px;"
  34. flat
  35. :multiple="false"
  36. :normalizer="normalizerProject"
  37. :default-expand-level="Infinity"
  38. :placeholder="projectPlaceholder"
  39. @input="handleSearch(collectLevel)"
  40. @select="handleSearch(collectLevel)"
  41. >
  42. <p
  43. slot="option-label"
  44. slot-scope="{node}"
  45. style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 100%; padding-left: 10px;"
  46. :title="node.label"
  47. >
  48. <template> {{ node.label }} </template>
  49. </p>
  50. </treeselect>
  51. <treeselect
  52. v-if="isTitleType !== 6"
  53. v-model="query.archive_ctg_no"
  54. :options="classifyOptions"
  55. style="width: 160px;"
  56. flat
  57. :multiple="false"
  58. :normalizer="normalizer"
  59. placeholder="请选择档案分类"
  60. @input="handleSearch(collectLevel)"
  61. @select="handleSearch(collectLevel)"
  62. ><p
  63. slot="option-label"
  64. slot-scope="{node}"
  65. style="overflow: hidden;white-space: nowrap;text-overflow: ellipsis; width: 100%; padding-left: 10px;"
  66. :title="node.label"
  67. >
  68. <template> {{ node.label }} </template>
  69. </p>
  70. </treeselect>
  71. </div>
  72. <div v-if="isTitleType !== 6" class="head-search">
  73. <!-- 搜索 -->
  74. <el-input v-model="query.search" clearable size="small" :placeholder="placeholderType" prefix-icon="el-icon-search" style="width: 200px;" class="filter-item" @keyup.enter.native="handleSearch(collectLevel)" @clear="handleSearch(collectLevel)" />
  75. <el-button class="filter-item filter-search" size="mini" type="success" icon="el-icon-search" @click="handleSearch(collectLevel)">搜索</el-button>
  76. <el-button class="filter-item filter-refresh" size="mini" type="warning" icon="el-icon-refresh-left" @click="resetQuery">重置</el-button>
  77. </div>
  78. <div v-if="!isRecycle" class="collect-menu">
  79. <el-menu
  80. :default-active="activeMenuIndex"
  81. mode="horizontal"
  82. @select="handleSelect"
  83. >
  84. <el-submenu v-if="isTitleType !== 6" index="1">
  85. <template slot="title">
  86. <i class="iconfont icon-changgui" />
  87. <span>常规</span>
  88. </template>
  89. <el-menu-item-group class="collect-submenu-group">
  90. <el-menu-item v-if="isTitleType !== 6" index="1-1" @click="handleForm('edit')">编辑</el-menu-item>
  91. </el-menu-item-group>
  92. </el-submenu>
  93. <el-submenu v-if="isTitleType === 3" index="2">
  94. <template slot="title">
  95. <i class="iconfont icon-zhengli" />
  96. <span>整理</span>
  97. </template>
  98. <el-menu-item-group class="collect-submenu-group">
  99. <el-menu-item v-if="selectedCategory.arrangeType === 1" index="2-1" @click="bindingTag(selections)">标签绑定</el-menu-item>
  100. <el-menu-item-group class="collect-submenu-group submenu-tree">
  101. <template slot="title">档案装盒</template>
  102. <el-menu-item index="2-2" @click="handlePackingBox(0)">装盒</el-menu-item>
  103. <el-menu-item v-if="selectedCategory.arrangeType !== 1" index="2-3" @click="handlePackingBox(1)">分卷装盒</el-menu-item>
  104. </el-menu-item-group>
  105. <el-menu-item-group class="collect-submenu-group submenu-tree">
  106. <template slot="title">档案移交</template>
  107. <el-menu-item index="2-4" @click="handleOnlineHandover">在线移交</el-menu-item>
  108. <el-menu-item index="2-5" @click="handleOffLineHandover">离线移交</el-menu-item>
  109. </el-menu-item-group>
  110. <!-- <el-menu-item v-if="selectedCategory.isType === 2" index="2-6" @click="handleExportZip">导出ZIP包</el-menu-item> -->
  111. <el-menu-item index="2-7" @click="handleArcReturn">档案退回</el-menu-item>
  112. <el-menu-item index="2-8" @click="handleJD(0)">开放审核</el-menu-item>
  113. <el-menu-item index="2-9" @click="handleJD(1)">销毁鉴定</el-menu-item>
  114. </el-menu-item-group>
  115. </el-submenu>
  116. <el-submenu v-if="isTitleType === 4" index="2">
  117. <template slot="title">
  118. <i class="iconfont icon-zhengli" />
  119. <span>整理</span>
  120. </template>
  121. <el-menu-item-group class="collect-submenu-group">
  122. <el-menu-item index="2-1" @click="bindingTag(selections)">标签绑定</el-menu-item>
  123. </el-menu-item-group>
  124. </el-submenu>
  125. <el-submenu v-if="isTitleType !== 6" index="3">
  126. <template slot="title">
  127. <i class="iconfont icon-gengduo" />
  128. <span>更多</span>
  129. </template>
  130. <el-menu-item-group class="collect-submenu-group">
  131. <el-menu-item v-if="isTitleType !== 6" index="3-1" @click="handleExport">导出</el-menu-item>
  132. <el-menu-item v-if="isTitleType === 3" index="3-2" @click="handlePrint">打印</el-menu-item>
  133. <el-menu-item v-if="isTitleType === 6" index="3-3" @click="handleOriginalDownload">下载</el-menu-item>
  134. </el-menu-item-group>
  135. </el-submenu>
  136. </el-menu>
  137. </div>
  138. <!-- 利用权限操作 -->
  139. <div v-if="!isRecycle && isTitleType === 6" class="collect-menu">
  140. <el-button v-if="parentsData.authUtilize.look" class="filter-item" size="mini" type="success" @click="toPreview"><i class="iconfont icon-sulan" />预览</el-button>
  141. <el-button v-if="parentsData.authUtilize.download" class="filter-item" size="mini" type="success" :disabled="selections.length !== 1" @click="handleOriginalDownload"><i class="iconfont icon-xiazai" :disabled="crud.selections.length !== 1" />下载</el-button>
  142. <el-button v-if="parentsData.authUtilize.print" class="filter-item" size="mini" type="success" :disabled="selections.length !== 1"><i class="iconfont icon-dayin" />打印</el-button>
  143. </div>
  144. <div v-if="isRecycle && (isTitleType === 2 || isTitleType === 3)" class="collect-menu">
  145. <el-button class="filter-item" size="mini" type="success" @click="toRecover"><i class="iconfont icon-huifu" />恢复</el-button>
  146. <el-button class="filter-item" size="mini" type="success" @click="toCompletelyDelete"><i class="iconfont icon-shanchu" />彻底删除</el-button>
  147. <el-button class="filter-item" size="mini" type="success" :disabled="selections.length === 0" @click="handleExport"><i class="iconfont icon-daochu" />导出</el-button>
  148. </div>
  149. <!--新增 / 编辑 表单组件-->
  150. <el-dialog class="preview-dialog" :modal-append-to-body="false" :close-on-click-modal="false" append-to-body :before-close="handleClose" :visible="formVisible" :title="formTitle">
  151. <span class="dialog-right-top" />
  152. <span class="dialog-left-bottom" />
  153. <div class="setting-dialog">
  154. <PreviewForm
  155. v-if="formPreviewData.length"
  156. ref="previewForm"
  157. :is-has-code="true"
  158. :is-disabled="false"
  159. :form-preview-data.sync="formPreviewData"
  160. :selected-category="selectedCategory"
  161. :arc-id="arcId"
  162. :is-des-form-type="isDesFormType"
  163. :is-title-type="isTitleType"
  164. :collect-level="collectLevel"
  165. :category-menu="categoryMenu"
  166. :archives-type="archivesType"
  167. @close-dialog="closeDialog"
  168. />
  169. <div slot="footer" class="dialog-footer" style="margin-top: 85px !important;">
  170. <el-button type="primary" @click="handlerArchivesSubmit">保存</el-button>
  171. </div>
  172. </div>
  173. </el-dialog>
  174. <!-- 绑定标签 -->
  175. <binding-tag-dlg ref="bindingTag" :binding-id="selections[0] && selections[0].id" :binding-type="1" binding-txt="档案" @close-dialog="closeDialog" />
  176. <!-- 装盒 / 分卷装盒 -->
  177. <PackingBox ref="packingBox" :selected-category="selectedCategory" :selections="selections" :total-sum-all="totalSumAll" @close-dialog="closeDialog" />
  178. <!-- 在线移交 -->
  179. <OnlineHandover ref="onlineHandover" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" :total-sum-all="totalSumAll" @close-dialog="closeDialog" />
  180. <!-- 离线移交 -->
  181. <OffLineHandover ref="offLineHandover" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" :total-sum-all="totalSumAll" @close-dialog="closeDialog" />
  182. <!-- 导出zip -->
  183. <ExportZip ref="exportZip" :selected-category="selectedCategory" :selections="selections" @close-dialog="closeDialog" />
  184. <!-- 开放审核 / 销毁鉴定 -->
  185. <HandOverForm ref="formModule" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
  186. <!-- 打印 -->
  187. <Print ref="printRef" :selected-category="selectedCategory" :collect-level="collectLevel" :selections="selections" @close-dialog="closeDialog" />
  188. </div>
  189. <div style="display: flex; justify-content: space-between; height: 30px; line-height: 30px; padding: 0 10px; ">
  190. <span v-if="(isTitleType !== 2 && selectedCategory.arrangeType === 3 ) || ((isTitleType === 4 || isTitleType === 6) && selectedCategory.arrangeType === 2) || (isTitleType === 6 && selectedCategory.arrangeType === 1)" style="font-size: 12px;">{{ test }}</span>
  191. <div v-if="!isRecycle && isTitleType === 6 && parentsData.authUtilize.endTime" style="font-size: 12px;">
  192. <!-- 利用开始时间{{ parentsData.authUtilize.startTime | parseTime }} -->
  193. 利用结束时间{{ parentsData.authUtilize.endTime | parseTime }}
  194. </div>
  195. <div v-if="isTitleType !== 2 && !isRecycle && isTitleType !== 6" class="mangement-fixed-top">
  196. <el-checkbox v-model="parentsData.fixedStatusBar" @change="statusBarChecked">隐藏状态栏</el-checkbox>
  197. </div>
  198. </div>
  199. </div>
  200. </template>
  201. <script>
  202. import { crud } from '@crud/crud'
  203. import { manageLibraryCrud } from '../mixins/index'
  204. import { FetchInitCategoryInputFieldByPid, FetchCategoryMenu } from '@/api/system/category/category'
  205. import { FetchDetailsById, FetchCompleteDelArchives, FetchRestoreArchives } from '@/api/collect/collect'
  206. import { FetchArchivesClassTree } from '@/api/system/archivesClass'
  207. import Treeselect from '@riophae/vue-treeselect'
  208. import '@riophae/vue-treeselect/dist/vue-treeselect.css'
  209. import PreviewForm from '@/views/components/category/PreviewForm'
  210. import Print from './print/index'
  211. import BindingTagDlg from '@/views/components/BindingTagDlg'
  212. import PackingBox from './packingBox/index'
  213. import OnlineHandover from './onlineHandover/index'
  214. import OffLineHandover from './offLineHandover/index'
  215. import ExportZip from './exportZip/index'
  216. import HandOverForm from './handOverForm'
  217. import qs from 'qs'
  218. import { downloadFile, exportFile } from '@/utils/index'
  219. import { mapGetters } from 'vuex'
  220. export default {
  221. name: 'CollectHeader',
  222. components: { Treeselect, PreviewForm, BindingTagDlg, Print, PackingBox, OnlineHandover, OffLineHandover, ExportZip, HandOverForm },
  223. mixins: [manageLibraryCrud, crud()],
  224. props: {
  225. selectedCategory: {
  226. type: Object,
  227. default: function() {
  228. return {}
  229. }
  230. },
  231. isTitleType: {
  232. type: Number,
  233. default: 2
  234. },
  235. test: {
  236. type: String,
  237. default: function() {
  238. return ''
  239. }
  240. },
  241. isRecycle: {
  242. type: Boolean,
  243. default: false
  244. },
  245. selections: {
  246. type: Array,
  247. default: function() {
  248. return []
  249. }
  250. }
  251. },
  252. inject: ['parentsData'],
  253. data() {
  254. return {
  255. permission: {
  256. convention: ['admin', 'archives:convention'],
  257. arrange: ['admin', 'archives:arrange'],
  258. more: ['admin', 'archives:more']
  259. },
  260. value: null,
  261. categoryMenu: [],
  262. statusOptions: [
  263. {
  264. label: '标签状态',
  265. options: [
  266. {
  267. value: 1,
  268. label: '未绑定'
  269. },
  270. {
  271. value: 2,
  272. label: '已绑定'
  273. }
  274. ]
  275. },
  276. {
  277. label: '装盒状态',
  278. options: [
  279. {
  280. value: 3,
  281. label: '未装盒'
  282. },
  283. {
  284. value: 4,
  285. label: '已装盒'
  286. }
  287. ]
  288. },
  289. {
  290. label: '入库状态',
  291. options: [
  292. {
  293. value: 5,
  294. label: '未入库'
  295. },
  296. {
  297. value: 6,
  298. label: '待入库'
  299. },
  300. {
  301. value: 7,
  302. label: '待出库'
  303. },
  304. {
  305. value: 8,
  306. label: '已入库'
  307. }
  308. ]
  309. },
  310. {
  311. label: '借阅状态',
  312. options: [
  313. {
  314. value: 9,
  315. label: '实体在库'
  316. },
  317. {
  318. value: 10,
  319. label: '实体待借'
  320. },
  321. {
  322. value: 11,
  323. label: '实体已借'
  324. }
  325. ]
  326. },
  327. {
  328. label: '实体状态',
  329. options: [
  330. {
  331. value: 12,
  332. label: '无实体'
  333. },
  334. {
  335. value: 13,
  336. label: '有实体'
  337. }
  338. ]
  339. },
  340. {
  341. label: '开放状态',
  342. options: [
  343. {
  344. value: 14,
  345. label: '未开放'
  346. },
  347. {
  348. value: 15,
  349. label: '已开放'
  350. }
  351. ]
  352. },
  353. {
  354. label: '审批锁定',
  355. options: [
  356. {
  357. value: 16,
  358. label: '空闲'
  359. },
  360. {
  361. value: 17,
  362. label: '退回'
  363. },
  364. {
  365. value: 18,
  366. label: '开放'
  367. },
  368. {
  369. value: 19,
  370. label: '销毁'
  371. }, {
  372. value: 20,
  373. label: '利用'
  374. }, {
  375. value: 21,
  376. label: '内部移交'
  377. }, {
  378. value: 22,
  379. label: '外部移交'
  380. }
  381. ]
  382. }
  383. ],
  384. selectStatus: null,
  385. activeMenuIndex: '1',
  386. formVisible: false,
  387. formTitle: '项目',
  388. formPreviewData: [], // 预览界面data
  389. projectOptions: [],
  390. classifyOptions: [],
  391. isDesFormType: 'manageArcives', // 区分是门类得还是档案得
  392. arcId: null,
  393. totalSumAll: 0,
  394. archivesType: null
  395. }
  396. },
  397. computed: {
  398. ...mapGetters([
  399. 'baseApi'
  400. ]),
  401. collectTitle() {
  402. if (this.isTitleType === 2) {
  403. return '项目'
  404. } else if (this.isTitleType === 3) {
  405. if (this.selectedCategory.arrangeType === 1) {
  406. return '文件'
  407. } else {
  408. return '案卷'
  409. }
  410. } else if (this.isTitleType === 4) {
  411. return '卷内'
  412. } else if (this.isTitleType === 6) {
  413. return '原文'
  414. }
  415. return ''
  416. },
  417. collectLevel() {
  418. if (this.isTitleType === 2) {
  419. return 1
  420. } else if (this.isTitleType === 3) {
  421. if (this.selectedCategory.arrangeType === 1) {
  422. return 3
  423. } else {
  424. return 2
  425. }
  426. } else if (this.isTitleType === 4) {
  427. return 3
  428. } else if (this.isTitleType === 6) {
  429. return 4
  430. }
  431. return null
  432. },
  433. classType() {
  434. if (this.isTitleType === 2) {
  435. return ''
  436. } else if (this.isTitleType === 3) {
  437. return 'is-anjuan'
  438. } else if (this.isTitleType === 4) {
  439. return 'is-juannei'
  440. } else if (this.isTitleType === 6) {
  441. return 'is-file'
  442. }
  443. return ''
  444. },
  445. placeholderType() {
  446. if (this.isTitleType === 2) {
  447. return '输入项目名称或编号搜索'
  448. } else if (this.isTitleType === 3 || this.isTitleType === 4) {
  449. return '输入题名或档号搜索'
  450. }
  451. return '输入项目名称或编号搜索'
  452. },
  453. projectPlaceholder() {
  454. if (this.isTitleType === 2) {
  455. return '请选择项目分类'
  456. } else if (this.isTitleType === 3) {
  457. return '请选择项目阶段'
  458. }
  459. return '请选择项目分类'
  460. }
  461. },
  462. created() {
  463. },
  464. mounted() {
  465. this.getInitArchivesClass()
  466. if (localStorage.getItem('statusBarFixedType') !== 'undefined') {
  467. this.parentsData.fixedStatusBar = JSON.parse(localStorage.getItem('statusBarFixedType')) === true
  468. }
  469. this.getCategoryDataTree()
  470. },
  471. methods: {
  472. getCategoryDataTree() {
  473. FetchCategoryMenu().then(res => {
  474. this.categoryMenu = res
  475. })
  476. },
  477. resetQuery() {
  478. this.selectStatus = []
  479. this.query = {
  480. 'search': null,
  481. 'project_class': null,
  482. 'archive_ctg_no': null
  483. }
  484. this.handleSearch(this.collectLevel)
  485. },
  486. // 筛选 - 档案分类
  487. getInitArchivesClass() {
  488. this.classifyOptions = []
  489. this.query = {
  490. 'search': null,
  491. 'project_class': null,
  492. 'archive_ctg_no': null
  493. }
  494. const params = {
  495. 'categoryId': this.selectedCategory.id
  496. }
  497. FetchArchivesClassTree(params).then((res) => {
  498. this.classifyOptions = JSON.parse(JSON.stringify(res))
  499. }).catch(err => {
  500. console.log(err)
  501. })
  502. },
  503. normalizer(node) {
  504. if (node.childArchivesClass === null) {
  505. delete node.childArchivesClass
  506. }
  507. return {
  508. id: node.code,
  509. label: `${node.name} - ${node.code}`,
  510. children: node.childArchivesClass
  511. }
  512. },
  513. handleSelect(key, keyPath) {
  514. console.log(key, keyPath)
  515. },
  516. // 著录界面-form/详情-api
  517. handleForm(type) {
  518. if (type === 'add') {
  519. this.formTitle = '新增' + this.collectTitle
  520. this.arcId = null
  521. } else if (type === 'edit') {
  522. if (this.selections.length === 0) {
  523. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  524. return false
  525. } else if (this.selections.length > 1) {
  526. this.$message({ message: '编辑操作只可勾选唯一目标条目,请先确认!', offset: 8 })
  527. return false
  528. } else if (this.selections[0].process_status !== 1) {
  529. this.$message({ message: '当前所选的档案处于流程中,不可操作编辑,请先确认!', offset: 8 })
  530. return false
  531. }
  532. this.arcId = this.selections[0].id
  533. this.formTitle = '编辑' + this.collectTitle
  534. }
  535. // this.form.dictionaryConfigId = {}
  536. // this.formPreviewData = []
  537. // 档案预编辑获取字段
  538. this.formVisible = true
  539. this.$nextTick(() => {
  540. this.getFormInfo(type)
  541. })
  542. },
  543. getFormInfo(type) {
  544. this.archivesType = type
  545. if (type === 'edit') {
  546. const params = {
  547. 'categoryId': this.selectedCategory.id,
  548. 'categoryLevel': this.collectLevel,
  549. 'id': this.arcId
  550. }
  551. FetchDetailsById(params).then(data => {
  552. // const showFiledAll = data.showFiled.filter(item => item.isSequence).sort((a, b) => a.isSequence - b.isSequence)
  553. const showFiledAll = data.showFiled
  554. this.$nextTick(() => {
  555. this.formPreviewData = showFiledAll
  556. this.isDesFormType = 'manageArcives'
  557. this.$nextTick(() => {
  558. this.$refs.previewForm.addOrUpdateForm = data.echo
  559. this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
  560. })
  561. })
  562. })
  563. } else {
  564. const params = {
  565. 'categoryId': this.selectedCategory.id,
  566. 'categoryLevel': this.collectLevel
  567. }
  568. FetchInitCategoryInputFieldByPid(params).then(data => {
  569. this.formPreviewData = data
  570. this.isDesFormType = 'manageArcives'
  571. this.$nextTick(() => {
  572. this.$refs.previewForm.FetchNoFormatField(this.selectedCategory.id)
  573. })
  574. })
  575. }
  576. },
  577. // form - submit
  578. handlerArchivesSubmit() {
  579. this.$refs.previewForm.submitForm('addOrUpdateForm', this.selectedCategory.id,)
  580. },
  581. handleClose(done) {
  582. this.formVisible = false
  583. done()
  584. },
  585. // 绑定标签
  586. bindingTag(data) {
  587. if (this.selections.length === 0) {
  588. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  589. return false
  590. }
  591. if (this.selections.length > 1) {
  592. this.$message({ message: '只可勾选唯一目标条目,请先确认!', offset: 8 })
  593. return false
  594. }
  595. const isHasFillFormal = this.selections.some(item => item.process_status !== 1)
  596. if (isHasFillFormal) {
  597. this.$message({ message: '您所选的条目有正在流程中,不可操作绑定标签,请先确认!', offset: 8 })
  598. return false
  599. }
  600. if (data[0].tid) {
  601. // this.$refs.bindingTag.isBinding = true
  602. this.$refs.bindingTag.tidCode = data[0].tid
  603. this.$confirm('当前标签已被绑定,是否覆盖' + '<span>你是否还要继续?</span>', '提示', {
  604. confirmButtonText: '继续',
  605. cancelButtonText: '取消',
  606. type: 'warning',
  607. dangerouslyUseHTMLString: true
  608. }).then(() => {
  609. this.$refs.bindingTag.bindingVisible = true
  610. this.$refs.bindingTag.opened()
  611. }).catch(() => {
  612. })
  613. } else {
  614. this.$refs.bindingTag.bindingVisible = true
  615. }
  616. },
  617. // 导出
  618. handleExport() {
  619. if (this.selections.length === 0) {
  620. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  621. return false
  622. }
  623. this.$confirm('此操作将导出所选数据' + '<span>你是否还要继续?</span>', '提示', {
  624. confirmButtonText: '继续',
  625. cancelButtonText: '取消',
  626. type: 'warning',
  627. dangerouslyUseHTMLString: true
  628. }).then(() => {
  629. const archivesIds = []
  630. this.selections.forEach(val => {
  631. archivesIds.push(val.id)
  632. })
  633. const params = {
  634. 'categoryId': this.selectedCategory.id,
  635. 'categoryLevel': this.collectLevel,
  636. 'archivesIds': archivesIds
  637. }
  638. exportFile(this.baseApi + '/api/control/exportDate?' + qs.stringify(params, { indices: false }))
  639. }).catch(() => {
  640. })
  641. },
  642. // 打印
  643. handlePrint() {
  644. if (this.selections.length === 0) {
  645. this.$refs.printRef.form.printRange = '当页条目'
  646. let currentTableData = []
  647. if (this.collectLevel === 2) {
  648. currentTableData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData
  649. } else if (this.collectLevel === 3) {
  650. if (this.isTitleType === 3) {
  651. currentTableData = this.parentsData.$refs.anjuanEle.$refs.ajContent.$refs.tableList.anjuanData
  652. } else {
  653. currentTableData = this.parentsData.$refs.juanneiEle.junneiData
  654. }
  655. }
  656. this.$refs.printRef.currentTable = JSON.parse(JSON.stringify(currentTableData))
  657. } else {
  658. this.$refs.printRef.form.printRange = '勾选条目'
  659. }
  660. this.$refs.printRef.printVisible = true
  661. },
  662. // 原文内的附件下载
  663. handleOriginalDownload() {
  664. if (this.selections.length > 1 || this.selections.length === 0) {
  665. this.$message({ message: '下载操作只可勾选唯一目标条目,请先确认!', offset: 8 })
  666. return false
  667. }
  668. const url = this.baseApi + '/downloadFile' + this.selections[0].file_path
  669. fetch(url).then(res => res.blob()).then(blob => {
  670. downloadFile(blob, this.selections[0].file_name.split('.')[0], this.selections[0].file_type)
  671. }).catch(() => {
  672. this.$message({ message: '下载文件失败', type: 'error', offset: 8 })
  673. })
  674. },
  675. // 回收站 - 恢复
  676. toRecover() {
  677. if (this.selections.length === 0) {
  678. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  679. return false
  680. }
  681. this.$confirm('此恢复将会把所选条目及其子集一并恢复' + '<span>你是否还要继续?</span>', '提示', {
  682. confirmButtonText: '继续',
  683. cancelButtonText: '取消',
  684. type: 'warning',
  685. dangerouslyUseHTMLString: true
  686. }).then(() => {
  687. const archivesIds = []
  688. this.selections.forEach(val => {
  689. archivesIds.push(val.id)
  690. })
  691. const params = {
  692. 'categoryId': this.selectedCategory.id,
  693. 'categoryLevel': this.collectLevel,
  694. 'archivesIds': archivesIds,
  695. 'collectFormal': this.isTitleType === 2 ? 3 : null
  696. }
  697. FetchRestoreArchives(params).then((res) => {
  698. if (res.code !== 500) {
  699. localStorage.removeItem('currentPageSize')
  700. localStorage.removeItem('currentPage')
  701. this.$message({ message: res, type: 'success', offset: 8 })
  702. this.handleSearch(this.collectLevel)
  703. } else {
  704. this.$message({ message: '恢复所选档案失败', type: 'error', offset: 8 })
  705. }
  706. }).catch(err => {
  707. console.log(err)
  708. })
  709. }).catch(() => {
  710. })
  711. },
  712. // 回收站 - 彻底删除
  713. toCompletelyDelete() {
  714. if (this.selections.length === 0) {
  715. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  716. return false
  717. }
  718. this.$confirm('此删除将把会所选条目与其子集彻底删除' + '<span>你是否还要继续?</span>', '提示', {
  719. confirmButtonText: '继续',
  720. cancelButtonText: '取消',
  721. type: 'warning',
  722. dangerouslyUseHTMLString: true
  723. }).then(() => {
  724. const archivesIds = []
  725. this.selections.forEach(val => {
  726. archivesIds.push(val.id)
  727. })
  728. const params = {
  729. 'categoryId': this.selectedCategory.id,
  730. 'categoryLevel': this.collectLevel,
  731. 'archivesIds': archivesIds
  732. }
  733. FetchCompleteDelArchives(params).then((res) => {
  734. if (res.code !== 500) {
  735. localStorage.removeItem('currentPageSize')
  736. localStorage.removeItem('currentPage')
  737. this.$message({ message: res, type: 'success', offset: 8 })
  738. this.handleSearch(this.collectLevel)
  739. } else {
  740. this.$message({ message: '删除所选档案失败', type: 'error', offset: 8 })
  741. }
  742. }).catch(err => {
  743. console.log(err)
  744. })
  745. }).catch(() => {
  746. })
  747. },
  748. // 装盒 / 分卷装盒
  749. handlePackingBox(type) {
  750. if (this.selections.length === 0) {
  751. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  752. return false
  753. }
  754. const isHasFillFormal = this.selections.some(item => item.process_status !== 1)
  755. if (isHasFillFormal) {
  756. this.$message({ message: '您所选的条目有正在流程中,不可操作装盒,请先确认!', offset: 8 })
  757. return false
  758. }
  759. if (this.selectedCategory.arrangeType === 2) {
  760. if (type === 1) {
  761. if (this.selections.length > 1) {
  762. this.$message({ message: '只可勾选唯一目标条目,请先确认!', offset: 8 })
  763. return false
  764. }
  765. }
  766. if (this.selections[0].child === 0) {
  767. this.$message({ message: '当前选中的档案无相关卷内文件,不可装盒!', type: 'error', offset: 8 })
  768. return
  769. }
  770. }
  771. if (this.selections[0].case_no) {
  772. this.$message({ message: '当前档案已装盒,请勿重复操作!', type: 'error', offset: 8 })
  773. return
  774. }
  775. // 后面与后端对接确定字段name
  776. // const existsNotEmpty = this.selections.some(item => item.caseNum)
  777. // if (existsNotEmpty) {
  778. // this.$message('所选条目中存在已装盒档案,请勿重复操作!')
  779. // return false
  780. // }
  781. this.$refs.packingBox.packingVisible = true
  782. this.$refs.packingBox.isPackingOrPartType = type
  783. this.$refs.packingBox.packFileCategory = this.parentsData.listCategory
  784. if (type === 0) {
  785. this.$refs.packingBox.packingTitle = '装盒'
  786. } else {
  787. this.$refs.packingBox.packingTitle = '分卷装盒'
  788. this.$refs.packingBox.getViewTable()
  789. }
  790. this.getTotalSumAll()
  791. },
  792. getTotalSumAll() {
  793. this.totalSumAll = 0
  794. this.selections.map((item) => { if (!isNaN(item.child)) this.totalSumAll += item.child })
  795. if (isNaN(this.totalSumAll)) {
  796. return 0
  797. }
  798. return this.totalSumAll
  799. },
  800. // 在线移交
  801. handleOnlineHandover() {
  802. if (this.selections.length === 0) {
  803. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  804. return false
  805. }
  806. this.$refs.onlineHandover.handOverFileCategory = this.parentsData.listCategory
  807. this.$refs.onlineHandover.onlineHandoverVisible = true
  808. this.getTotalSumAll()
  809. },
  810. // 离线移交
  811. handleOffLineHandover() {
  812. if (this.selections.length === 0) {
  813. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  814. return false
  815. }
  816. // this.$refs.offLineHandover.offLineHandoverVisible = true
  817. this.$refs.formModule.activeIndex = 0
  818. this.$refs.formModule.overType = 7
  819. this.$refs.formModule.overDetialVisible = true
  820. this.$refs.formModule.overDetialTitle = '离线移交-流程'
  821. },
  822. // 导出zip包
  823. handleExportZip() {
  824. if (this.selections.length === 0) {
  825. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  826. return false
  827. }
  828. this.$refs.exportZip.exportZipVisible = true
  829. },
  830. // 档案退回
  831. handleArcReturn() {
  832. if (this.selections.length === 0) {
  833. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  834. return false
  835. }
  836. const isHasFillFormal = this.selections.some(item => item.process_status !== 1)
  837. if (isHasFillFormal) {
  838. this.$message({ message: '您所选的条目有正在流程中,不可操作档案退回,请先确认!', offset: 8 })
  839. return false
  840. }
  841. this.$confirm('此移出将把会所选条目退回到收集库' + '<span>你是否还要继续?</span>', '提示', {
  842. confirmButtonText: '继续',
  843. cancelButtonText: '取消',
  844. type: 'warning',
  845. dangerouslyUseHTMLString: true
  846. }).then(() => {
  847. this.$refs.formModule.overType = 2
  848. this.$refs.formModule.overDetialTitle = '退回审核-流程'
  849. this.$refs.formModule.overDetialVisible = true
  850. }).catch(() => {
  851. })
  852. },
  853. // 开放审核 / 销毁鉴定
  854. handleJD(type) {
  855. if (this.selections.length === 0) {
  856. this.$message({ message: '您还未勾选需要操作的条目,请先确认!', offset: 8 })
  857. return false
  858. }
  859. if (type === 0) {
  860. this.$refs.formModule.overType = 3
  861. this.$refs.formModule.overDetialTitle = '开放审核-流程'
  862. } else {
  863. this.$refs.formModule.overType = 4
  864. this.$refs.formModule.overDetialTitle = '销毁鉴定-流程'
  865. }
  866. this.$refs.formModule.activeIndex = 0
  867. this.$refs.formModule.overDetialVisible = true
  868. },
  869. toPreview() {
  870. const routeData = this.$router.resolve({ path: '/preview' })
  871. window.open(routeData.href, '_blank')
  872. },
  873. closeDialog(data) {
  874. this.formVisible = false
  875. setTimeout(() => {
  876. this.handleSearch(this.collectLevel)
  877. })
  878. }
  879. }
  880. }
  881. </script>
  882. <style lang='scss' scoped>
  883. .collect-header{
  884. border-top: none !important;
  885. padding: 20px 0 0 0 !important;
  886. }
  887. .manage-fixed-style{
  888. margin-bottom: 30px;
  889. }
  890. .contorl-header{
  891. flex-wrap: wrap;
  892. height: 94px;
  893. .head-search{
  894. height: 32px;
  895. margin-right: 0 !important;
  896. margin-bottom: 10px !important;
  897. }
  898. .collect-menu{
  899. width: 100%;
  900. display: flex;
  901. justify-content: flex-end;
  902. .el-submenu{
  903. margin-right: 0;
  904. margin-left: 10px;
  905. }
  906. }
  907. }
  908. ::v-deep .vue-treeselect__list-item{
  909. width: 220px;
  910. }
  911. ::v-deep .vue-treeselect__menu {
  912. padding: 20px 0;
  913. }
  914. ::v-deep .vue-treeselect__option--highlight{
  915. background: #f5f9fc !important;
  916. color: #0348f3 !important;
  917. }
  918. ::v-deep .vue-treeselect__option-arrow-container .vue-treeselect__option-arrow{
  919. color: #1c1c1c !important;
  920. }
  921. ::v-deep .vue-treeselect__placeholder{
  922. font-size: 14px;
  923. }
  924. ::v-deep .vue-treeselect__label-container{
  925. font-size: 14px;
  926. height: 34px;
  927. line-height: 34px;
  928. color: #1c1c1c;
  929. }
  930. ::v-deep .vue-treeselect__option.vue-treeselect__option--disabled{
  931. .vue-treeselect__label-container{
  932. color: #545b65 !important;
  933. }
  934. }
  935. ::v-deep.vue-treeselect--has-value .vue-treeselect__single-value{
  936. font-size: 14px;
  937. }
  938. </style>