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

800 lines
28 KiB

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