【前端】智能库房综合管理系统前端项目
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.

191 lines
6.7 KiB

  1. <template>
  2. <div class="app-container">
  3. <el-row class="container-main" :gutter="20">
  4. <!--左侧树状数据-->
  5. <el-col class="container-left" :xs="9" :sm="6" :md="5" :lg="4" :xl="4">
  6. <span class="right-top-line" />
  7. <span class="left-bottom-line" />
  8. <div class="head-container" style="color:#fff">
  9. 档案门类
  10. </div>
  11. <el-tree ref="archivesTree" v-loading="crud.loading" :data="crud.data" :props="defaultProps" node-key="id" :expand-on-click-node="false" highlight-current @node-click="handleNodeClick" />
  12. </el-col>
  13. <!--用户数据-->
  14. <el-col class="container-right" :xs="15" :sm="18" :md="19" :lg="20" :xl="20">
  15. <span class="right-top-line" />
  16. <span class="left-bottom-line" />
  17. <!--工具栏-->
  18. <div class="head-container">
  19. <el-button icon="el-icon-delete" size="mini" @click="handleDelete">彻底删除</el-button>
  20. <el-button size="mini" style="margin-right:10px" @click="handleRestore">
  21. <svg-icon icon-class="huanyuan-fanbai" class-name="svg-style" />还原</el-button>
  22. <!-- 搜索 -->
  23. <!-- <div v-if="crud.props.searchToggle" class="head-search"> -->
  24. <el-input
  25. v-model="query.blurry"
  26. clearable
  27. size="small"
  28. prefix-icon="el-icon-search"
  29. placeholder="请输入关键词"
  30. style="width: 200px;margin-right:10px"
  31. class="filter-item"
  32. />
  33. <rrOperation />
  34. <!-- </div> -->
  35. </div>
  36. <!--表格渲染-->
  37. <el-table
  38. ref="table"
  39. :data="tableData"
  40. style="min-width: 100%"
  41. height="calc(100vh - 355px)"
  42. @selection-change="selectionChangeHandler"
  43. @row-click="clickRowHandler"
  44. >
  45. <el-table-column type="selection" width="55" />
  46. <el-table-column type="index" label="序号" width="55" />
  47. <el-table-column prop="" label="文件" min-width="55" />
  48. <el-table-column prop="" label="全宗名" min-width="85" />
  49. <el-table-column prop="archivesID" :show-overflow-tooltip="true" label="档号" min-width="110" />
  50. <el-table-column prop="" label="部门名称" min-width="85" />
  51. <el-table-column prop="" label="件号" min-width="55" />
  52. <el-table-column :show-overflow-tooltip="true" prop="titleName" label="题名" min-width="100" />
  53. <el-table-column prop="" label="成文日期" min-width="80" />
  54. <el-table-column prop="" label="机构(问题)" :show-overflow-tooltip="true" min-width="80" />
  55. <el-table-column prop="" label="页号" min-width="60" />
  56. <el-table-column prop="" label="责任者" min-width="85" />
  57. <el-table-column prop="" label="保管期限" min-width="85" />
  58. <el-table-column prop="" label="备注" min-width="85" />
  59. </el-table>
  60. <!-- 删除模态框 -->
  61. <el-dialog title="确认删除" :visible.sync="deleteVisible">
  62. <span class="dialog-right-top" />
  63. <span class="dialog-left-bottom" />
  64. <div class="setting-dialog">
  65. <p><span style="color:#fff;">确定要彻底删除当前档案数据吗?</span></p>
  66. <p><span style="color:#fff;">数据来源:文件1条数据</span></p>
  67. <p><span style="color:#f00;">提示:确定彻底删除后该档案数据及所属文件不能还原</span></p>
  68. <div slot="footer" class="dialog-footer">
  69. <el-button type="primary" @click.native="handleDelConfirm">确定</el-button>
  70. </div>
  71. </div>
  72. </el-dialog>
  73. <!-- 还原模态框 -->
  74. <el-dialog title="确认还原" :visible.sync="restoreVisible">
  75. <span class="dialog-right-top" />
  76. <span class="dialog-left-bottom" />
  77. <div class="setting-dialog">
  78. <p><span style="color:#fff;">确定将当前选择的档案数据进行还原?</span></p>
  79. <div slot="footer" class="dialog-footer">
  80. <el-button type="primary" @click.native="handleRestoreConfirm">确定</el-button>
  81. </div>
  82. </div>
  83. </el-dialog>
  84. <!--分页组件-->
  85. <pagination />
  86. </el-col>
  87. </el-row>
  88. </div>
  89. </template>
  90. <script>
  91. import CRUD, { presenter, header, crud } from '@crud/crud'
  92. import rrOperation from '@crud/RR.operation'
  93. import pagination from '@crud/Pagination'
  94. import data1 from '../lendManage/data1.json'
  95. import crudCategory from '@/api/category/category'
  96. export default {
  97. name: 'RecycleBin',
  98. components: { rrOperation, pagination },
  99. cruds() {
  100. return CRUD({
  101. title: '门类',
  102. url: 'api/archives-type/menu',
  103. crudMethod: { ...crudCategory },
  104. optShow: {
  105. add: false,
  106. edit: false,
  107. del: false,
  108. download: true,
  109. group: false
  110. }
  111. })
  112. },
  113. mixins: [presenter(), header(), crud()],
  114. // 数据字典
  115. dicts: ['user_status'],
  116. data() {
  117. return {
  118. selections: [], // 选中列表
  119. deleteVisible: false,
  120. restoreVisible: false,
  121. tableData: [],
  122. defaultProps: { children: 'children', label: 'cnName' }
  123. }
  124. },
  125. created() {
  126. this.getData()
  127. },
  128. methods: {
  129. // 获取表格数据
  130. getData() {
  131. this.tableData = data1.rows
  132. },
  133. // 切换菜单
  134. handleNodeClick(data) {
  135. console.log(data)
  136. },
  137. // 彻底删除
  138. handleDelete() {
  139. if (this.selections.length > 0) {
  140. this.deleteVisible = true
  141. } else {
  142. this.$message({
  143. message: '请选择要删除的数据',
  144. type: 'warning'
  145. })
  146. }
  147. },
  148. // 还原
  149. handleRestore() {
  150. if (this.selections.length > 0) {
  151. this.restoreVisible = true
  152. } else {
  153. this.$message({
  154. message: '请选择要还原的数据',
  155. type: 'warning'
  156. })
  157. }
  158. },
  159. clickRowHandler(row) {
  160. this.$refs.table.toggleRowSelection(row) // 单击选中
  161. },
  162. selectionChangeHandler(val) {
  163. this.selections = val
  164. },
  165. handleDelConfirm() {
  166. this.deleteVisible = false
  167. },
  168. handleRestoreConfirm() {
  169. this.restoreVisible = false
  170. }
  171. }
  172. }
  173. </script>
  174. <style rel="stylesheet/scss" lang="scss" scoped>
  175. ::v-deep .vue-treeselect__control,::v-deep .vue-treeselect__placeholder,::v-deep .vue-treeselect__single-value {
  176. height: 30px;
  177. line-height: 30px;
  178. }
  179. ::v-deep .head-container .filter-item input{
  180. height: 30px;
  181. line-height: 30px;
  182. }
  183. .svg-style{
  184. margin-right: 5px;
  185. }
  186. </style>