阅行客电子档案
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.

797 lines
28 KiB

2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
3 months ago
3 months ago
3 months ago
3 months ago
2 years ago
2 years ago
1 year ago
3 months ago
3 months ago
3 months ago
2 years ago
4 months ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
1 year ago
1 year ago
4 months ago
1 year ago
2 years ago
1 year ago
3 months ago
4 months ago
2 years ago
3 months ago
2 years ago
3 months ago
2 years ago
4 months ago
2 years ago
3 months ago
4 months ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
2 years ago
1 year ago
1 year ago
1 year ago
2 years ago
1 year ago
2 years ago
2 years ago
2 years ago
  1. <template>
  2. <div class="app-container archives-container">
  3. <div class="container-main" style="justify-content: flex-start;">
  4. <div class="elect-cont-left">
  5. <div class="container-left">
  6. <span class="right-top-line" />
  7. <span class="left-bottom-line" />
  8. <div class="arc-left-tree">
  9. <h3 class="arc-title arc-title-top">档案门类</h3>
  10. <div class="tree-scroll">
  11. <el-tree ref="categroyTree" v-loading="crud.loading" class="arc-tree arc-tree-01" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick">
  12. <span slot-scope="{ node, data }" class="custom-tree-node">
  13. <el-tooltip :content="node.label" placement="left" :enterable="false" effect="dark">
  14. <span v-if="data.isType === 0">
  15. {{ data.label }}
  16. </span>
  17. <span v-if="data.isType === 1" class="iconFolder tree-text">
  18. {{ data.label }}
  19. </span>
  20. <span v-if="data.isType === 2" class="iconArch tree-text">
  21. {{ data.label }}
  22. </span>
  23. <span v-if="data.isType === 3" class="iconFile tree-text">
  24. {{ data.label }}
  25. </span>
  26. </el-tooltip>
  27. </span>
  28. </el-tree>
  29. </div>
  30. <h3 class="arc-title arc-title-bottom">快速筛选</h3>
  31. <el-tree
  32. ref="classifyTree"
  33. v-loading="classifyLoading"
  34. class="arc-tree arc-tree-02"
  35. :data="classifyTree"
  36. :props="defaultClassifyProps"
  37. node-key="id"
  38. :expand-on-click-node="false"
  39. highlight-current
  40. show-checkbox
  41. @check="handleCheckChange"
  42. >
  43. <span slot-scope="{ node, data }" class="custom-tree-node">
  44. <span v-if="data.childDictionarys || data.fondsName" class="iconClassify">
  45. {{ data.dictionaryName || data.fondsName }}
  46. </span>
  47. <span v-else class="iconClassify-child">
  48. {{ data.dictionaryName }}
  49. </span>
  50. </span>
  51. </el-tree>
  52. </div>
  53. </div>
  54. </div>
  55. <!--用户数据-->
  56. <div v-if="selectedCategory.isType !== 1" class="elect-cont-right">
  57. <div class="container-right tab-content">
  58. <span class="right-top-line" />
  59. <span class="left-bottom-line" />
  60. <Project v-if="selectedCategory.arrangeType === 3" ref="projectEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" :smart-query="smartQuery" @openAnjuan="handleOpenAnjuan" @myYearEvent="handleYearData" />
  61. <Anjuan v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="anjuanEle" :selected-category="selectedCategory" :data="sharedData" :is-recycle="isRecycle" :smart-query="smartQuery" @openJuannei="handleOpenJuannei" @myYearEvent="handleYearData" @changeActiveIndex="handleActive" />
  62. <Juannei v-if="selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="juanneiEle" :data="sharedData" :selected-category="selectedCategory" :is-recycle="isRecycle" :smart-query="smartQuery" @openFile="handleOpenFile" />
  63. <File v-if="selectedCategory.arrangeType === 1 || selectedCategory.arrangeType === 2 || selectedCategory.arrangeType === 3" ref="fileEle" :is-recycle="isRecycle" :selected-category="selectedCategory" :smart-query="smartQuery" />
  64. </div>
  65. </div>
  66. </div>
  67. </div>
  68. </template>
  69. <script>
  70. import crudCategory from '@/api/category/category'
  71. import crudRoles from '@/api/system/role'
  72. import { FetchInitSearchFonds } from '@/api/archiveUtilize/archiveUtilize'
  73. import { collectionLibraryCrud } from './mixins/index.js'
  74. import { FetchDictionaryTreeByCategoryId } from '@/api/system/dict'
  75. import CRUD, { presenter, header } from '@crud/crud'
  76. import Project from './project/index'
  77. import Anjuan from './anjuan/index'
  78. import Juannei from './juannei/index'
  79. import File from './file/index'
  80. import { mapGetters } from 'vuex'
  81. export default {
  82. name: 'CollectionLibrary',
  83. components: { Project, Anjuan, Juannei, File },
  84. cruds() {
  85. return [
  86. CRUD({
  87. title: '收集库', url: 'api/category/fondMenu',
  88. crudMethod: { ...crudCategory },
  89. query: { page: null, size: null },
  90. optShow: {
  91. add: false,
  92. edit: false,
  93. del: false,
  94. download: false,
  95. group: false
  96. }
  97. })
  98. ]
  99. },
  100. mixins: [presenter(), header(), collectionLibraryCrud],
  101. props: {
  102. isRecycle: {
  103. type: Boolean,
  104. default: false
  105. },
  106. isdel: {
  107. type: Boolean,
  108. default: false
  109. }
  110. },
  111. provide() {
  112. return {
  113. parentsData: this
  114. }
  115. },
  116. data() {
  117. return {
  118. defaultProps: {
  119. children: 'children',
  120. label: 'label'
  121. },
  122. defaultClassifyProps: {
  123. children: 'childDictionarys' || null,
  124. label: 'dictionaryName' || 'fondsName'
  125. },
  126. defaultFondsProps: {
  127. children: 'children',
  128. label: 'fondsName'
  129. },
  130. sharedData: '',
  131. selectedCategory: {},
  132. yearChildData: '',
  133. parentsAnjuanRow: null,
  134. parentsProjectRow: null,
  135. parentsProjectId: null,
  136. parentsAnjuanId: null,
  137. parentsJuanneiId: null,
  138. smartQuery: {
  139. 'retention': null, // 保管期限
  140. 'security_class': null, // 密级
  141. 'doc_type': null, // 文种
  142. 'medium_type': null, // 载体类型
  143. 'archive_year': null, // 年度
  144. 'organ_or_function': null, // 机构与类型
  145. 'fonds_no': null // 全宗
  146. },
  147. isTabFile: false,
  148. fixedStatusBar: false,
  149. topLevelNode: null,
  150. listCategory: null
  151. }
  152. },
  153. computed: {
  154. ...mapGetters([
  155. 'user'
  156. ])
  157. },
  158. watch: {
  159. isdel: function(newValue, oldValue) {
  160. },
  161. isRecycle: function(newValue, oldValue) {
  162. }
  163. },
  164. created() {
  165. },
  166. mounted() {
  167. },
  168. methods: {
  169. handleYearData(data) {
  170. this.yearChildData = data
  171. this.classifyLoading = true
  172. setTimeout(() => {
  173. if (this.classifyTree.length !== 0 && this.classifyTree[0].dictionaryName === '年度') {
  174. this.classifyTree = this.classifyTree.slice(1)
  175. }
  176. if (this.yearChildData.length !== 0) {
  177. const newYearArr = this.yearChildData.map((item, index) => {
  178. const json = {}
  179. json.id = item
  180. json.dictionaryName = item
  181. json.dictionaryParents = '-1'
  182. json.childDictionarys = []
  183. return json
  184. })
  185. this.classifyTree.unshift({ id: -1, dictionaryName: '年度', dictionaryCode: 'archive_year', childDictionarys: newYearArr })
  186. }
  187. this.classifyLoading = false
  188. }, 500)
  189. },
  190. filterData(data) {
  191. return data.filter(node => {
  192. if (node.children && node.children.length > 0) {
  193. node.children = this.filterData(node.children) // 递归处理子节点
  194. }
  195. return node.isType !== 3 // 过滤掉isType为3的节点
  196. })
  197. },
  198. // 逆归实现 获取指定元素
  199. findNode(tree, func) {
  200. for (const node of tree) {
  201. if (func(node)) return node
  202. if (node.children) {
  203. const res = this.findNode(node.children, func)
  204. if (res) return res
  205. }
  206. }
  207. return null
  208. },
  209. // 根据父级展开全部子级
  210. expandAllChildren(node, targetElement) {
  211. node.expanded = true
  212. // 递归展开当前节点的每个子节点
  213. if (node.childNodes && node.childNodes.length > 0) {
  214. for (let i = 0; i < node.childNodes.length; i++) {
  215. if (node.childNodes[i].data.id === targetElement.id) {
  216. this.$refs.categroyTree.setCurrentKey(node.childNodes[i])
  217. }
  218. this.expandAllChildren(node.childNodes[i], targetElement)
  219. }
  220. }
  221. },
  222. // 转换函数,将原始数据转换为el-tree所需格式
  223. transformData(rawData) {
  224. return rawData.map(item => {
  225. return {
  226. label: item.fondName,
  227. isType: 0,
  228. id: item.fondsId,
  229. fondsNo: item.fondsNo,
  230. children: item.categoryList.map(category => {
  231. return {
  232. label: category.cnName,
  233. cnName: category.cnName,
  234. code: category.code,
  235. id: category.id,
  236. arrangeType: category.arrangeType,
  237. isType: category.isType,
  238. fondsId: item.fondsId,
  239. fondName: item.fondName,
  240. fondsNo: item.fondsNo,
  241. children: this.transformChildren(category.children, category.code, item.fondsId, item.fondName, item.fondsNo)
  242. }
  243. })
  244. }
  245. })
  246. },
  247. // 递归函数,用于处理数据的子节点
  248. transformChildren(children, code, fondsId, fondName, fondsNo) {
  249. return children.map(child => {
  250. return {
  251. label: child.cnName,
  252. cnName: child.cnName,
  253. id: child.id,
  254. isType: child.isType,
  255. pid: child.pid,
  256. code: child.code || code,
  257. arrangeType: child.arrangeType,
  258. fondsId: fondsId,
  259. fondName: fondName,
  260. fondsNo: fondsNo,
  261. children: child.children.length ? this.transformChildren(child.children, fondsId, fondName, fondsNo) : []
  262. }
  263. })
  264. },
  265. // 找顶级节点
  266. findTopLevelNode(data, fondsId) {
  267. for (let i = 0; i < data.length; i++) {
  268. if (data[i].id === fondsId) {
  269. return data[i]
  270. }
  271. }
  272. return null
  273. },
  274. [CRUD.HOOK.afterRefresh]() {
  275. this.crud.data = this.filterData(this.transformData(this.crud.data))
  276. this.$nextTick(() => {
  277. let currentKey
  278. if (localStorage.getItem('currentArchivesKey') !== null) {
  279. currentKey = JSON.parse(localStorage.getItem('currentArchivesKey'))
  280. // 删除门类节点后
  281. if (this.$refs.categroyTree.getCurrentKey(currentKey.id) == null) {
  282. localStorage.removeItem('currentArchivesKey')
  283. }
  284. this.topLevelNode = this.findTopLevelNode(this.crud.data, currentKey.fondsId)
  285. // 如果找到了顶级节点,则从该节点开始递归查找指定元素
  286. if (this.topLevelNode) {
  287. if (currentKey) {
  288. // 展开顶级节点的子节点
  289. if (currentKey.isType === 1) {
  290. currentKey = this.findNode(this.crud.data[0].children, (node) => {
  291. return node.isType !== 1
  292. })
  293. }
  294. this.expandAllChildren(this.$refs.categroyTree.getNode(this.topLevelNode), currentKey)
  295. } else {
  296. this.defaultSetting(currentKey)
  297. }
  298. } else {
  299. this.defaultSetting(currentKey)
  300. }
  301. } else {
  302. this.defaultSetting(currentKey)
  303. }
  304. if (currentKey && currentKey.id) {
  305. this.$nextTick(() => {
  306. // 选中节点的门类详情
  307. console.log('444')
  308. this.handleNodeClick(currentKey)
  309. })
  310. }
  311. })
  312. },
  313. defaultSetting(currentKey) {
  314. if (this.crud.data[0].isType === 0) {
  315. currentKey = this.findNode(this.crud.data[0].children, (node) => {
  316. return node.isType !== 1
  317. })
  318. this.expandAllChildren(this.$refs.categroyTree.getNode(this.crud.data[0]), currentKey)
  319. console.log('currentKey', currentKey)
  320. } else {
  321. currentKey = this.crud.data[0]
  322. this.expandAllChildren(this.$refs.categroyTree.getNode(this.crud.data[0]), currentKey)
  323. }
  324. if (currentKey && currentKey.id) {
  325. this.$nextTick(() => {
  326. this.handleNodeClick(currentKey)
  327. })
  328. }
  329. },
  330. handleNodeClick(val) {
  331. localStorage.removeItem('savePrevFromData')
  332. localStorage.removeItem('currentPageSize')
  333. localStorage.removeItem('currentPage')
  334. this.smartQuery = {
  335. // 'retention': null, // 保管期限
  336. // 'security_class': null, // 密级
  337. // 'doc_type': null, // 文种
  338. // 'medium_type': null, // 载体类型
  339. 'archive_year': null // 年度
  340. // 'organ_or_function': null, // 机构与类型
  341. // 'fonds_no': null // 全宗
  342. }
  343. this.parentsProjectId = null
  344. this.parentsAnjuanId = null
  345. this.parentsJuanneiId = null
  346. this.parentsAnjuanRow = null
  347. this.parentsProjectRow = null
  348. // 缓存当前的选中的
  349. localStorage.setItem('currentArchivesKey', JSON.stringify(val))
  350. this.selectedCategory = val
  351. if (this.selectedCategory.isType !== 1) {
  352. this.getDictionaryTreeByCategoryId(val.id)
  353. } else {
  354. this.classifyTree = []
  355. }
  356. this.$nextTick(() => {
  357. this.smartQuery.fonds_no = this.selectedCategory.fondsId
  358. this.getDictsList()
  359. // this.getFonds()
  360. this.handlePageList()
  361. // Promise.all(this.user.roles.map(item => this.getRole(item.id)))
  362. // .then(roles => {
  363. // const allFondsIds = []
  364. // const fondsObj = {}
  365. // console.log(roles)
  366. // roles.forEach(role => {
  367. // role.fonds.forEach(fond => {
  368. // if (!fondsObj[fond.id]) {
  369. // fondsObj[fond.id] = fond
  370. // allFondsIds.push(fond.id)
  371. // }
  372. // })
  373. // })
  374. // console.log(allFondsIds)
  375. // this.$refs.classifyTree.setCheckedKeys(allFondsIds)
  376. // if (allFondsIds.length !== 0) {
  377. // const defaultChecked = this.$refs.classifyTree.getCheckedNodes()
  378. // const fondsGroup = defaultChecked.filter(item => item.fondsId).map(item => item.fondsNo)
  379. // this.smartQuery.fonds_no = fondsGroup.join(',')
  380. // } else {
  381. // // this.smartQuery.fonds_no = null
  382. // FetchInitSearchFonds().then(res => {
  383. // this.smartQuery.fonds_no = res.map(item => item.fondsNo).join(',')
  384. // })
  385. // }
  386. // this.handlePageList()
  387. // })
  388. // .catch(error => {
  389. // console.error(error)
  390. // })
  391. })
  392. },
  393. getFonds() {
  394. FetchInitSearchFonds().then(res => {
  395. const allFondsIds = res.map(item => item.fondsId)
  396. // this.$refs.classifyTree.setCheckedKeys(allFondsIds)
  397. this.smartQuery.fonds_no = allFondsIds.join(',')
  398. })
  399. },
  400. handlePageList(isQuickFilter) {
  401. if (this.selectedCategory.arrangeType === 3) {
  402. const tablistEle = this.$refs.projectEle
  403. tablistEle.page.page = 0
  404. tablistEle.currentPage = 1
  405. // 项目下
  406. if (isQuickFilter) {
  407. tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
  408. tablistEle.getTableDisplayFieldsLoading = true
  409. tablistEle.getViewTableList(1, null, isQuickFilter)
  410. } else {
  411. tablistEle.getCommonData(1)
  412. }
  413. } else if (this.selectedCategory.arrangeType === 2) {
  414. const getActiveIndex = this.$refs.anjuanEle.$refs.ajContent.activeIndex
  415. const tablistEle = this.$refs.anjuanEle.$refs.ajContent.$refs.tableList
  416. tablistEle.page.page = 0
  417. tablistEle.currentPage = 0
  418. // 案卷下
  419. if (isQuickFilter) {
  420. tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
  421. tablistEle.getTableDisplayFieldsLoading = true
  422. if (getActiveIndex === 0) {
  423. tablistEle.getViewTableList(2, null, isQuickFilter)
  424. } else {
  425. tablistEle.getViewTableList(3, null, isQuickFilter)
  426. }
  427. } else {
  428. tablistEle.getCommonData(2)
  429. if (this.$refs.anjuanEle) {
  430. this.$refs.anjuanEle.anjuanDrawer = false
  431. if (this.$refs.anjuanEle.$refs.ajContent) {
  432. this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
  433. }
  434. }
  435. }
  436. } else if (this.selectedCategory.arrangeType === 1) {
  437. const tablistEle = this.$refs.anjuanEle.$refs.ajContent.$refs.tableList
  438. tablistEle.page.page = 0
  439. tablistEle.currentPage = 1
  440. // 文件下
  441. if (isQuickFilter) {
  442. tablistEle.$refs.collectHeaderRef.getInitArchivesClass()
  443. tablistEle.getTableDisplayFieldsLoading = true
  444. tablistEle.getViewTableList(3, null, isQuickFilter)
  445. } else {
  446. tablistEle.getCommonData(3)
  447. }
  448. }
  449. if (this.$refs.anjuanEle) {
  450. this.$refs.anjuanEle.anjuanDrawer = false
  451. }
  452. if (this.$refs.juanneiEle) {
  453. this.$refs.juanneiEle.juanneiDrawer = false
  454. }
  455. if (this.$refs.fileEle) {
  456. this.$refs.fileEle.fileDrawer = false
  457. }
  458. },
  459. getRole(id) {
  460. return crudRoles.get(id)
  461. },
  462. getDictionaryTreeByCategoryId(categoryId) {
  463. this.classifyLoading = true
  464. const params = {
  465. 'categoryId': categoryId
  466. }
  467. FetchDictionaryTreeByCategoryId(params).then((res) => {
  468. this.classifyTree = res.dictionarys
  469. // let fonds
  470. // if (res.fonds.length <= 1) {
  471. // fonds = []
  472. // } else {
  473. // const parent = {}
  474. // parent.id = 0
  475. // parent.fondsName = '全宗'
  476. // parent.childDictionarys = res.fonds.map(item => {
  477. // return {
  478. // ...item,
  479. // id: item.fondsId
  480. // }
  481. // })
  482. // fonds = parent
  483. // }
  484. // if (res.dictionarys.length === 0) {
  485. // this.classifyTree = []
  486. // if (fonds.length !== 0) {
  487. // this.classifyTree.push(fonds)
  488. // }
  489. // } else {
  490. // this.classifyTree = res.dictionarys.concat(fonds)
  491. // }
  492. this.classifyLoading = false
  493. }).catch(err => {
  494. console.log(err)
  495. })
  496. },
  497. getIdByCode(dictionaryCode) {
  498. for (const dictionary of this.classifyTree) {
  499. if (dictionary.dictionaryCode === dictionaryCode) {
  500. return dictionary.id
  501. }
  502. }
  503. return null
  504. },
  505. handleCheckChange(data, checked, indeterminate) {
  506. // 获取所有选中的节点
  507. const res = this.$refs.classifyTree.getCheckedNodes()
  508. this.smartQuery.fonds_no = this.selectedCategory.fondsId
  509. // const fondsGroup = res.filter(item => item.fondsId).map(item => item.fondsId)
  510. // console.log('fondsGroup', fondsGroup)
  511. // if (fondsGroup.length === 0) {
  512. // this.smartQuery.fonds_no = this.selectedCategory.fondsId
  513. // // FetchInitSearchFonds().then(res => {
  514. // // this.smartQuery.fonds_no = res.map(item => item.fondsId).join(',')
  515. // // this.$nextTick(() => {
  516. // // this.handlePageList('quickFilter')
  517. // // })
  518. // // })
  519. // } else {
  520. // this.smartQuery.fonds_no = fondsGroup.join(',')
  521. // }
  522. const groupedData = {}
  523. const securityId = this.getIdByCode('security_class')
  524. const retentionId = this.getIdByCode('retention')
  525. const docTypeId = this.getIdByCode('doc_type')
  526. const mediumTypeId = this.getIdByCode('medium_type')
  527. const organOrFunctionId = this.getIdByCode('organ_or_function')
  528. res.forEach(function(item) {
  529. if (item.dictionaryParents === '-1') {
  530. groupedData.archive_year = groupedData.archive_year || []
  531. groupedData.archive_year.push(item.dictionaryName)
  532. } else if (item.dictionaryParents === securityId) {
  533. groupedData.security_class = groupedData.security_class || []
  534. groupedData.security_class.push(item.dictionaryName)
  535. } else if (item.dictionaryParents === retentionId) {
  536. groupedData.retention = groupedData.retention || []
  537. groupedData.retention.push(item.dictionaryName)
  538. } else if (item.dictionaryParents === docTypeId) {
  539. groupedData.doc_type = groupedData.doc_type || []
  540. groupedData.doc_type.push(item.dictionaryName)
  541. } else if (item.dictionaryParents === mediumTypeId) {
  542. groupedData.medium_type = groupedData.medium_type || []
  543. groupedData.medium_type.push(item.dictionaryName)
  544. } else if (item.dictionaryParents === organOrFunctionId) {
  545. groupedData.organ_or_function = groupedData.organ_or_function || []
  546. groupedData.organ_or_function.push(item.dictionaryName)
  547. }
  548. })
  549. if (data.id) {
  550. const selectedParentVal = this.$refs.classifyTree.getNode(data.id).parent.data.dictionaryCode
  551. switch (selectedParentVal) {
  552. case 'security_class':
  553. if (res.find(obj => obj.dictionaryCode === 'security_class')) {
  554. this.smartQuery.security_class = null
  555. } else {
  556. if (groupedData.security_class) {
  557. this.smartQuery.security_class = groupedData.security_class.join(',')
  558. } else {
  559. this.smartQuery.security_class = null
  560. }
  561. }
  562. break
  563. case 'retention':
  564. if (res.find(obj => obj.dictionaryCode === 'retention')) {
  565. this.smartQuery.retention = null
  566. } else {
  567. if (groupedData.retention) {
  568. this.smartQuery.retention = groupedData.retention.join(',')
  569. } else {
  570. this.smartQuery.retention = null
  571. }
  572. }
  573. break
  574. case 'doc_type':
  575. if (res.find(obj => obj.dictionaryCode === 'doc_type')) {
  576. this.smartQuery.doc_type = null
  577. } else {
  578. if (groupedData.doc_type) {
  579. this.smartQuery.doc_type = groupedData.doc_type.join(',')
  580. } else {
  581. this.smartQuery.doc_type = null
  582. }
  583. }
  584. break
  585. case 'medium_type':
  586. if (res.find(obj => obj.dictionaryCode === 'medium_type')) {
  587. this.smartQuery.medium_type = null
  588. } else {
  589. if (groupedData.medium_type) {
  590. this.smartQuery.medium_type = groupedData.medium_type.join(',')
  591. } else {
  592. this.smartQuery.medium_type = null
  593. }
  594. }
  595. break
  596. case 'organ_or_function':
  597. if (res.find(obj => obj.dictionaryCode === 'organ_or_function')) {
  598. this.smartQuery.organ_or_function = null
  599. } else {
  600. if (groupedData.organ_or_function) {
  601. this.smartQuery.organ_or_function = groupedData.organ_or_function.join(',')
  602. } else {
  603. this.smartQuery.organ_or_function = null
  604. }
  605. }
  606. break
  607. default:
  608. if (groupedData.archive_year) {
  609. this.smartQuery.archive_year = groupedData.archive_year.join(',')
  610. } else {
  611. this.smartQuery.archive_year = null
  612. }
  613. }
  614. }
  615. this.$nextTick(() => {
  616. this.handlePageList('quickFilter')
  617. })
  618. },
  619. handleOpenAnjuan(data, parentId, parentsRow) {
  620. localStorage.removeItem('savePrevFromData')
  621. this.parentsProjectId = parentId
  622. this.parentsProjectRow = parentsRow
  623. this.$refs.anjuanEle.anjuanDrawer = true
  624. this.activeIndex = 0
  625. if (this.$refs.anjuanEle.$refs.ajContent) {
  626. this.$refs.anjuanEle.$refs.ajContent.activeIndex = 0
  627. }
  628. this.$nextTick(() => {
  629. this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.currentPage = 1
  630. this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.page.page = 0
  631. this.$refs.anjuanEle.$refs.ajContent.$refs.tableList.getCommonData(2, this.parentsProjectId)
  632. this.$refs.anjuanEle.$refs.ajContent.test = data
  633. })
  634. },
  635. handleOpenJuannei(data, parentId, parentsRow) {
  636. localStorage.removeItem('savePrevFromData')
  637. this.parentsAnjuanId = parentId
  638. this.parentsAnjuanRow = parentsRow
  639. if (this.selectedCategory.arrangeType === 1 || (this.selectedCategory.arrangeType === 3 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1) || (this.selectedCategory.arrangeType === 2 && this.$refs.anjuanEle.$refs.ajContent.activeIndex === 1)) {
  640. this.$refs.fileEle.fileDrawer = true
  641. this.$nextTick(() => {
  642. this.$refs.fileEle.currentPage = 1
  643. this.$refs.fileEle.page.page = 0
  644. this.$refs.fileEle.getCommonData(4, this.parentsAnjuanId)
  645. this.$refs.fileEle.test = data
  646. this.$refs.fileEle.isAjNo = 1
  647. })
  648. } else {
  649. this.$refs.juanneiEle.juanneiDrawer = true
  650. this.$nextTick(() => {
  651. this.$refs.juanneiEle.currentPage = 1
  652. this.$refs.juanneiEle.page.page = 0
  653. this.$refs.juanneiEle.getCommonData(3, this.parentsAnjuanId)
  654. this.$refs.juanneiEle.test = data
  655. this.$refs.fileEle.isAjNo = 0
  656. })
  657. }
  658. },
  659. handleOpenFile(data, parentId) {
  660. localStorage.removeItem('savePrevFromData')
  661. this.parentsJuanneiId = parentId
  662. this.$refs.fileEle.fileDrawer = true
  663. this.$nextTick(() => {
  664. this.$refs.fileEle.currentPage = 1
  665. this.$refs.fileEle.page.page = 0
  666. this.$refs.fileEle.getCommonData(4, this.parentsJuanneiId)
  667. this.$refs.fileEle.test = data
  668. })
  669. },
  670. handleActive(data) {
  671. localStorage.removeItem('savePrevFromData')
  672. this.smartQuery = {
  673. 'retention': null, // 保管期限
  674. 'security_class': null, // 密级
  675. 'doc_type': null, // 文种
  676. 'medium_type': null, // 载体类型
  677. 'archive_year': null, // 年度
  678. 'organ_or_function': null, // 机构与类型
  679. 'fonds_no': null // 全宗
  680. }
  681. this.smartQuery.fonds_no = this.selectedCategory.fondsId
  682. this.$refs.classifyTree.setCheckedKeys([])
  683. var treeNodeList = this.$refs.classifyTree.store._getAllNodes()
  684. for (var i = 0; i < treeNodeList.length; i++) {
  685. treeNodeList[i].expanded = false
  686. }
  687. }
  688. }
  689. }
  690. </script>
  691. <style lang="scss" scoped>
  692. .elect-cont-left{
  693. width: 276px;
  694. padding: 0 !important;
  695. }
  696. .hideSidebar .elect-cont-left {
  697. width: 265px !important;
  698. }
  699. [data-theme=light] .elect-cont-left .container-left {
  700. min-height: calc(100vh - 140px);
  701. }
  702. [data-theme=dark] .elect-cont-left .container-left {
  703. min-height: calc(100vh - 160px);
  704. }
  705. .openSidebar .elect-cont-right {
  706. width: calc(100vw - 592px);
  707. }
  708. [data-theme=light] .elect-cont-right .container-right.tab-content {
  709. min-height: calc(100vh - 200px) !important;
  710. }
  711. .arc-title{
  712. position: relative;
  713. height: 48px;
  714. line-height: 48px;
  715. text-align: center;
  716. font-size: 16px;
  717. color: #0C0E1E;
  718. background-color: #F3F5F8;
  719. &::after{
  720. content: "";
  721. position: absolute;
  722. right: 12px;
  723. bottom: 0;
  724. }
  725. }
  726. .arc-title-top{
  727. &::after{
  728. width: 44px;
  729. height: 35px;
  730. background: url("~@/assets/images/collect/daml.png") no-repeat;
  731. background-size: 100% 100%;
  732. }
  733. }
  734. .arc-title-bottom{
  735. &::after{
  736. width: 41px;
  737. height: 40px;
  738. background: url("~@/assets/images/collect/kssx.png") no-repeat;
  739. background-size: 100% 100%;
  740. }
  741. }
  742. .arc-tree{
  743. padding: 0 20px;
  744. }
  745. .arc-tree-01{
  746. height: 400px;
  747. overflow: hidden;
  748. overflow-y: scroll;
  749. }
  750. [data-theme=dark] .arc-tree-01{
  751. height: 370px;
  752. }
  753. .arc-tree-02{
  754. height: calc(100vh - 720px);
  755. overflow: hidden;
  756. overflow-y: scroll;
  757. .el-tree{
  758. margin: 0;
  759. }
  760. }
  761. ::v-deep .el-tree-node__children .custom-tree-node{
  762. font-size: 14px;
  763. }
  764. ::v-deep .custom-tree-node{
  765. font-size: 14px;
  766. font-weight: normal;
  767. }
  768. [data-theme=light] .elect-cont-right {
  769. padding: 15px 0 !important;
  770. }
  771. [data-theme=dark] .elect-cont-right {
  772. margin-top: 0 !important;
  773. }
  774. .el-tree{
  775. .el-tree-node__children{
  776. .tree-text {
  777. text-overflow: ellipsis;
  778. overflow: hidden;
  779. white-space: nowrap;
  780. width: 160px;
  781. }
  782. }
  783. }
  784. </style>