StoragespaceView.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259
  1. <template>
  2. <div class="containe">
  3. <div class="header">
  4. <span>个人设置</span>
  5. <img src="../../../assets/img/chevron-down.png" alt="" />
  6. <img src="../../../assets/img/slash.png" alt="" />
  7. <span class="top1">分组存储空间</span>
  8. <img src="../../../assets/img/chevron-up.png" alt="" class="top2" />
  9. <img src="../../../assets/img/slash.png" alt="" />
  10. </div>
  11. <div class="title">分组存储空间</div>
  12. <div class="main">
  13. <div class="app-container">
  14. <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
  15. <el-form-item label="分组名称" prop="groupName">
  16. <el-input v-model="queryParams.groupName" placeholder="请输入分组名称" clearable @keyup.enter.native="handleQuery" />
  17. </el-form-item>
  18. <el-form-item>
  19. <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
  20. <el-button icon="el-icon-refresh" size="mini" @click="resetQuery" class="reset1">重置</el-button>
  21. </el-form-item>
  22. </el-form>
  23. <el-table v-loading="loading" :data="groupList" @selection-change="handleSelectionChange">
  24. <el-table-column type="selection" width="55" align="center" />
  25. <el-table-column label="分组名称" align="center" prop="groupName" />
  26. <el-table-column label="分组管理员" align="center" prop="groupManagerName" />
  27. <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
  28. <template slot-scope="scope">
  29. <el-button size="mini" type="text" icon="el-icon-user" @click="handleGroupSpace(scope.row)">分组空间</el-button>
  30. </template>
  31. </el-table-column>
  32. </el-table>
  33. <pagination v-show="total>0" :total="total" :page.sync="queryParams.pageNum" :limit.sync="queryParams.pageSize"
  34. @pagination="getList" />
  35. </div>
  36. </div>
  37. </div>
  38. </template>
  39. <script>
  40. import {
  41. listGroup,
  42. selectGroup,
  43. getGroup,
  44. delGroup,
  45. addGroup,
  46. updateGroup
  47. } from "@/api/doc/group";
  48. export default {
  49. name: "GroupSpaceSelect",
  50. data() {
  51. return {
  52. // 遮罩层
  53. loading: true,
  54. // 选中数组
  55. ids: [],
  56. // 非单个禁用
  57. single: true,
  58. // 非多个禁用
  59. multiple: true,
  60. // 显示搜索条件
  61. showSearch: true,
  62. // 总条数
  63. total: 0,
  64. // 分组表格数据
  65. groupList: [],
  66. // 弹出层标题
  67. title: "",
  68. // 是否显示弹出层
  69. open: false,
  70. // 查询参数
  71. queryParams: {
  72. pageNum: 1,
  73. pageSize: 10,
  74. groupName: null,
  75. groupManager: null,
  76. groupManagerName: null,
  77. },
  78. // 表单参数
  79. form: {},
  80. // 表单校验
  81. rules: {}
  82. };
  83. },
  84. created() {
  85. this.getList();
  86. },
  87. methods: {
  88. /** 查询分组列表 */
  89. getList() {
  90. this.loading = true;
  91. selectGroup(this.queryParams).then(response => {
  92. this.groupList = response.rows;
  93. if( this.groupList.length==1){
  94. const groupId = this.groupList[0].groupId;
  95. this.$router.push("/home/personal/GroupSpace/space/" + groupId);
  96. }
  97. this.total = response.total;
  98. this.loading = false;
  99. });
  100. },
  101. // 取消按钮
  102. cancel() {
  103. this.open = false;
  104. this.reset();
  105. },
  106. // 表单重置
  107. reset() {
  108. this.form = {
  109. groupId: null,
  110. groupName: null,
  111. groupManager: null,
  112. groupManagerName: null,
  113. creater: null,
  114. createBy: null,
  115. createTime: null,
  116. updateBy: null,
  117. updateTime: null,
  118. remark: null,
  119. isDel: null
  120. };
  121. this.resetForm("form");
  122. },
  123. /** 搜索按钮操作 */
  124. handleQuery() {
  125. this.queryParams.pageNum = 1;
  126. this.getList();
  127. },
  128. /** 重置按钮操作 */
  129. resetQuery() {
  130. this.resetForm("queryForm");
  131. this.handleQuery();
  132. },
  133. // 多选框选中数据
  134. handleSelectionChange(selection) {
  135. this.ids = selection.map(item => item.groupId)
  136. this.single = selection.length !== 1
  137. this.multiple = !selection.length
  138. },
  139. /** 分组空间按钮操作 */
  140. handleGroupSpace(row) {
  141. const groupId = row.groupId;
  142. this.$router.push("/home/personal/GroupSpace/space/" + groupId);
  143. }
  144. }
  145. };
  146. </script>
  147. <style scoped lang='scss'>
  148. .containe {
  149. color: #7ea4c8;
  150. font-size: 0.14rem;
  151. font-family: PingFang SC-Medium, PingFang SC;
  152. font-weight: 500;
  153. padding-left: calc(100vw * (20 / 1920));
  154. .header {
  155. width: calc(100vw * (300 / 1920));
  156. height: calc(100vh * (22 / 1080));
  157. margin-top: calc(100vh * (20 / 1080));
  158. margin-bottom: calc(100vh * (20 / 1080));
  159. display: flex;
  160. align-items: center;
  161. img {
  162. width: calc(100vw * (16 / 1920));
  163. height: calc(100vh * (16 / 1080));
  164. border: 1px dashed grey;
  165. margin-left: 3px;
  166. margin-right: 3px;
  167. }
  168. .top1 {
  169. color: #2e8aecff;
  170. }
  171. }
  172. .title {
  173. height: calc(100vh * (22 / 1080));
  174. margin-top: calc(100vh * (20 / 1080));
  175. margin-bottom: calc(100vh * (20 / 1080));
  176. color: #ffffffff;
  177. font-size: 0.16rem;
  178. font-weight: bold;
  179. line-height: calc(100vh * (22 / 1080));
  180. }
  181. .main {
  182. width: calc(100vw * (1876 / 1920));
  183. height: calc(100vh * (880 / 1080));
  184. background: url(../../../assets/img/Group-615.png);
  185. background-size: calc(100vw * (1876 / 1920)) calc(100vh * (880 / 1080));
  186. .app-container {
  187. width: calc(100vw * (1876 / 1920));
  188. height: calc(100vh * (880 / 1080));
  189. // padding: 0;
  190. }
  191. .reset1 {
  192. color: #2e8aecff;
  193. background: transparent;
  194. border: 1px solid #2E8AECFF;
  195. }
  196. //表格底部
  197. .pagination-container {
  198. width: calc(100vw * (1830 / 1920));
  199. height: calc(100vh * (50 / 1080));
  200. background: transparent;
  201. padding: 0 !important;
  202. margin: 0;
  203. // margin-left: calc(100vw * (20 / 1920));
  204. margin-top: calc(100vh * (10 / 1080));
  205. }
  206. }
  207. }
  208. //table样式
  209. ::v-deep .el-table {
  210. height: calc(100vh * (700 / 1080));
  211. overflow: auto;
  212. background: transparent;
  213. color: #7EA4C8FF;
  214. }
  215. ::v-deep .el-table th {
  216. background: #016c9aa6;
  217. color: #2e8aec;
  218. }
  219. ::v-deep .el-table tr {
  220. background: transparent;
  221. }
  222. ::v-deep .el-table tbody tr:hover > td {
  223. background-color: #016c9a78 !important;
  224. }
  225. ::v-deep .el-table td.el-table__cell {
  226. border-bottom: 1px solid #006c9aff;
  227. }
  228. ::v-deep .el-table th.el-table__cell.is-leaf {
  229. border-bottom: 1px solid #006c9aff;
  230. }
  231. //表格线条隐藏
  232. ::v-deep .el-table::before {
  233. height: 0;
  234. }
  235. //顶部搜索框样式
  236. ::v-deep .el-input__inner {
  237. background-color: transparent;
  238. border: 1px solid #01d1ffff;
  239. color: #ffffffcc;
  240. }
  241. // ::v-deep .el-form-item--small .el-form-item__content {
  242. // width: calc(100vw * (220 / 1920));
  243. // }
  244. //重置按钮
  245. ::v-deep .el-button + .el-button {
  246. color: #1890ff;
  247. }
  248. </style>