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

226 lines
6.8 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
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. <template>
  2. <el-drawer
  3. :with-header="false"
  4. :visible.sync="juanneiDrawer"
  5. :modal="false"
  6. :wrapper-closable="false"
  7. :show-close="false"
  8. direction="rtl"
  9. :size="selectedCategory.arrangeType === 2 ? '90%' :'80%'"
  10. >
  11. <collectHeader ref="collectHeaderRef" :is-title-type="isTitleType" :selected-category="selectedCategory" :selections="selections" :test="test" :is-recycle="isRecycle" />
  12. <div class="collect-table">
  13. <el-table
  14. ref="table"
  15. v-loading="crud.loading || getTableDisplayFieldsLoading"
  16. class="archives-table"
  17. :data="junneiData"
  18. highlight-current-row
  19. style="width: 100%;"
  20. height="calc(100vh - 418px)"
  21. :row-class-name="tableRowClassName"
  22. :row-key="rowKey"
  23. @select-all="selectAll"
  24. @selection-change="crud.selectionChangeHandler"
  25. @row-click="clickRowHandler"
  26. @cell-dblclick="tableDoubleClick"
  27. @select="handleCurrentChange"
  28. >
  29. <el-table-column type="selection" width="55" :reserve-selection="true" align="center" />
  30. <el-table-column type="index" label="序号" width="55" align="center" />
  31. <el-table-column label="原文" prop="child" width="55" align="center">
  32. <template slot-scope="scope">
  33. {{ scope.row.child === '' ? 0 : scope.row.child }}
  34. </template>
  35. </el-table-column>
  36. <el-table-column v-for="field in tableDisplayFields" :key="field.id" :label="field.fieldCnName" :align="field.displayformatType" :width="field.displayLength" show-overflow-tooltip>
  37. <template slot="header">
  38. <el-tooltip
  39. class="item"
  40. effect="dark"
  41. :content="field.fieldCnName"
  42. placement="top-start"
  43. >
  44. <span>{{ field.fieldCnName }}</span>
  45. </el-tooltip>
  46. </template>
  47. <template slot-scope="scope">
  48. {{ scope.row[field.fieldName] }}
  49. </template>
  50. </el-table-column>
  51. <el-table-column v-if="!isRecycle" label="归档审批" width="88" align="center" :fixed="parentsData.fixedStatusBar ? false : 'right' ">
  52. <template slot-scope="scope">
  53. <span :class="['row-state', 'row-warehousing', scope.row.collect_formal===2 ? 'state-active' : '' ]">{{ scope.row.collect_formal===2 ? '锁定': '-' }}</span>
  54. </template>
  55. </el-table-column>
  56. </el-table>
  57. <!--分页组件-->
  58. <el-pagination
  59. v-if="junneiData.length !== 0"
  60. :current-page="page.page"
  61. :total="page.total"
  62. :page-size="page.size"
  63. :pager-count="5"
  64. layout="total, prev, pager, next, sizes"
  65. @size-change="handleSizeChange"
  66. @current-change="handleCurrentPage"
  67. />
  68. </div>
  69. <!-- 档案详情 -->
  70. <ArchivesInfo ref="archivesInfo" :selected-category="selectedCategory" :arc-id="arcId" :is-title-type="isTitleType" />
  71. <span class="closed-btn" @click="closeDrawer" />
  72. </el-drawer>
  73. </template>
  74. <script>
  75. import { collectionLibraryCrud } from '../mixins/index'
  76. import { header, form } from '@crud/crud'
  77. import collectHeader from '../module/collectHeader.vue'
  78. import ArchivesInfo from '../module/archivesInfo/index'
  79. export default {
  80. name: 'Juannei',
  81. components: { collectHeader, ArchivesInfo },
  82. mixins: [
  83. header(),
  84. form({}),
  85. collectionLibraryCrud
  86. ],
  87. props: {
  88. selectedCategory: {
  89. type: Object,
  90. default: function() {
  91. return {}
  92. }
  93. },
  94. isRecycle: {
  95. type: Boolean,
  96. default: false
  97. },
  98. smartQuery: {
  99. type: Object,
  100. default: function() {
  101. return {}
  102. }
  103. }
  104. },
  105. inject: ['parentsData'],
  106. data() {
  107. return {
  108. isTitleType: 4,
  109. juanneiDrawer: false,
  110. categoryId: '',
  111. arcId: '',
  112. test: '',
  113. selections: [],
  114. parentId: null
  115. }
  116. },
  117. watch: {
  118. selectedCategory: function(newValue, oldValue) {
  119. },
  120. tableDisplayFields(val) {
  121. this.doLayout()
  122. }
  123. },
  124. created() {
  125. },
  126. mounted() {
  127. },
  128. methods: {
  129. getCommonData(categoryLevel, parentId, type) {
  130. this.getViewTable(categoryLevel, parentId, type)
  131. },
  132. openFile(data, parentId) {
  133. // this.$emit('openFile', '这是来自卷内的通知')
  134. this.$emit('openFile', data, parentId)
  135. },
  136. closeDrawer() {
  137. this.juanneiDrawer = false
  138. this.$parent.parentsAnjuanId = null
  139. },
  140. rowKey(row) {
  141. return row.id
  142. },
  143. // table选中加上选中状态
  144. tableRowClassName({ row, rowIndex }) {
  145. let color = ''
  146. this.selections.forEach(item => {
  147. if (item.id === row.id) {
  148. color = 'rowStyle'
  149. }
  150. })
  151. return color
  152. },
  153. // table - 全选
  154. selectAll(val) {
  155. this.selections = val
  156. },
  157. // table - 双击查看详情
  158. tableDoubleClick(row) {
  159. if (this.timer) {
  160. clearTimeout(this.timer)
  161. }
  162. this.arcId = row.id
  163. this.$nextTick(() => {
  164. this.$refs.archivesInfo.isHasFile = true
  165. this.$refs.archivesInfo.isFourTest = true
  166. this.$refs.archivesInfo.detailTitle = '卷内详情'
  167. this.$refs.archivesInfo.archivesInfoVisible = true
  168. this.$refs.archivesInfo.archivesTabIndex = 0
  169. this.$refs.archivesInfo.getDetial(3, row.id)
  170. })
  171. },
  172. // table - 当前选中得row
  173. clickRowHandler(row) {
  174. this.parentsData.smartQuery = {
  175. 'retention': null,
  176. 'security_class': null,
  177. 'doc_type': null,
  178. 'medium_type': null,
  179. 'archive_year': null,
  180. 'fonds_no': null
  181. }
  182. if (this.timer) {
  183. clearTimeout(this.timer)
  184. }
  185. this.timer = setTimeout(() => {
  186. this.parentId = row.id
  187. this.openFile('所属卷内:' + row.archive_no, this.parentId)
  188. }, 300)
  189. // this.selections = this.crud.selections
  190. },
  191. // 触发单选
  192. handleCurrentChange(selection, row) {
  193. this.selections = selection
  194. },
  195. handleSizeChange(size) {
  196. this.page.size = size
  197. this.page.page = 1
  198. this.getViewTable(3, this.parentsData.parentsAnjuanId)
  199. },
  200. handleCurrentPage(val) {
  201. this.page.page = val
  202. this.getViewTable(3, this.parentsData.parentsAnjuanId)
  203. }
  204. }
  205. }
  206. </script>
  207. <style lang='scss' scoped>
  208. @import "~@/assets/styles/collect-reorganizi.scss";
  209. @mixin management-fixed-style{
  210. [data-theme="dark"] & {
  211. background-color: #031435 !important;
  212. -webkit-box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16);
  213. box-shadow: -5px 5px 10px 1px rgba(15,164,222,.16);
  214. }
  215. [data-theme="light"] & {
  216. background-color: #fff;
  217. }
  218. }
  219. .el-table {
  220. ::v-deep .el-table__fixed-right {
  221. @include management-fixed-style;
  222. }
  223. }
  224. </style>