部门页面塌陷修复

duhanyu
许宏杰 2 years ago
parent 1f5ab14201
commit dbcd95edd0

@ -0,0 +1,44 @@
import request from "@/utils/request";
// 查询证书管理列表
export function listCertificates(query) {
return request({
url: "/system/certificates/list",
method: "get",
params: query,
});
}
// 查询证书管理详细
export function getCertificates(id) {
return request({
url: "/system/certificates/" + id,
method: "get",
});
}
// 新增证书管理
export function addCertificates(data) {
return request({
url: "/system/certificates",
method: "post",
data: data,
});
}
// 修改证书管理
export function updateCertificates(data) {
return request({
url: "/system/certificates",
method: "put",
data: data,
});
}
// 删除证书管理
export function delCertificates(id) {
return request({
url: "/system/certificates/" + id,
method: "delete",
});
}

@ -1,129 +1,141 @@
/** /**
* css * css
* Copyright (c) 2019 ruoyi * Copyright (c) 2019 ruoyi
*/ */
/** 基础通用 **/ /** 基础通用 **/
.pt5 { .pt5 {
padding-top: 5px; padding-top: 5px;
} }
.pr5 { .pr5 {
padding-right: 5px; padding-right: 5px;
} }
.pb5 { .pb5 {
padding-bottom: 5px; padding-bottom: 5px;
} }
.mt5 { .mt5 {
margin-top: 5px; margin-top: 5px;
} }
.mr5 { .mr5 {
margin-right: 5px; margin-right: 5px;
} }
.mb5 { .mb5 {
margin-bottom: 5px; margin-bottom: 5px;
} }
.mb8 { .mb8 {
margin-bottom: 8px; margin-bottom: 8px;
} }
.ml5 { .ml5 {
margin-left: 5px; margin-left: 5px;
} }
.mt10 { .mt10 {
margin-top: 10px; margin-top: 10px;
} }
.mr10 { .mr10 {
margin-right: 10px; margin-right: 10px;
} }
.mb10 { .mb10 {
margin-bottom: 10px; margin-bottom: 10px;
} }
.ml10 { .ml10 {
margin-left: 10px; margin-left: 10px;
} }
.mt20 { .mt20 {
margin-top: 20px; margin-top: 20px;
} }
.mr20 { .mr20 {
margin-right: 20px; margin-right: 20px;
} }
.mb20 { .mb20 {
margin-bottom: 20px; margin-bottom: 20px;
} }
.ml20 { .ml20 {
margin-left: 20px; margin-left: 20px;
} }
.h1, .h2, .h3, .h4, .h5, .h6, h1, h2, h3, h4, h5, h6 { .h1,
font-family: inherit; .h2,
font-weight: 500; .h3,
line-height: 1.1; .h4,
color: inherit; .h5,
.h6,
h1,
h2,
h3,
h4,
h5,
h6 {
font-family: inherit;
font-weight: 500;
line-height: 1.1;
color: inherit;
} }
.el-message-box__status + .el-message-box__message{ .el-message-box__status + .el-message-box__message {
word-break: break-word; word-break: break-word;
} }
.el-dialog:not(.is-fullscreen) { .el-dialog:not(.is-fullscreen) {
margin-top: 6vh !important; margin-top: 6vh !important;
} }
.el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body { .el-dialog__wrapper.scrollbar .el-dialog .el-dialog__body {
overflow: auto; overflow: auto;
overflow-x: hidden; overflow-x: hidden;
max-height: 70vh; max-height: 70vh;
padding: 10px 20px 0; padding: 10px 20px 0;
} }
.el-table { .el-table {
.el-table__header-wrapper, .el-table__fixed-header-wrapper { .el-table__header-wrapper,
th { .el-table__fixed-header-wrapper {
word-break: break-word; th {
background-color: #f8f8f9; word-break: break-word;
color: #515a6e; background-color: #f8f8f9;
height: 40px; color: #515a6e;
font-size: 13px; height: 40px;
} font-size: 13px;
} }
.el-table__body-wrapper { }
.el-button [class*="el-icon-"] + span { .el-table__body-wrapper {
margin-left: 1px; .el-button [class*="el-icon-"] + span {
} margin-left: 1px;
} }
}
} }
/** 表单布局 **/ /** 表单布局 **/
.form-header { .form-header {
font-size:15px; font-size: 15px;
color:#6379bb; color: #6379bb;
border-bottom:1px solid #ddd; border-bottom: 1px solid #ddd;
margin:8px 10px 25px 10px; margin: 8px 10px 25px 10px;
padding-bottom:5px padding-bottom: 5px;
} }
/** 表格布局 **/ /** 表格布局 **/
.pagination-container { .pagination-container {
position: relative; position: relative;
height: 25px; height: 25px;
margin-bottom: 10px; margin-bottom: 10px;
margin-top: 15px; margin-top: 15px;
padding: 10px 20px !important; padding: 10px 20px !important;
} }
/* tree border */ /* tree border */
.tree-border { .tree-border {
margin-top: 5px; margin-top: 5px;
border: 1px solid #e5e6e7; border: 1px solid #e5e6e7;
background: #FFFFFF none; background: #ffffff none;
border-radius:4px; border-radius: 4px;
} }
.pagination-container .el-pagination { .pagination-container .el-pagination {
right: 0; right: 0;
position: absolute; position: absolute;
} }
@media ( max-width : 768px) { @media (max-width: 768px) {
.pagination-container .el-pagination > .el-pagination__jump { .pagination-container .el-pagination > .el-pagination__jump {
display: none !important; display: none !important;
} }
@ -133,145 +145,150 @@
} }
.el-table .fixed-width .el-button--mini { .el-table .fixed-width .el-button--mini {
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
width: inherit; width: inherit;
} }
/** 表格更多操作下拉样式 */ /** 表格更多操作下拉样式 */
.el-table .el-dropdown-link,.el-table .el-dropdown-selfdefine { .el-table .el-dropdown-link,
cursor: pointer; .el-table .el-dropdown-selfdefine {
margin-left: 5px; cursor: pointer;
margin-left: 5px;
} }
.el-table .el-dropdown, .el-icon-arrow-down { .el-table .el-dropdown,
font-size: 12px; .el-icon-arrow-down {
font-size: 12px;
} }
.el-tree-node__content > .el-checkbox { .el-tree-node__content > .el-checkbox {
margin-right: 8px; margin-right: 8px;
} }
.list-group-striped > .list-group-item { .list-group-striped > .list-group-item {
border-left: 0; border-left: 0;
border-right: 0; border-right: 0;
border-radius: 0; border-radius: 0;
padding-left: 0; padding-left: 0;
padding-right: 0; padding-right: 0;
} }
.list-group { .list-group {
padding-left: 0px; padding-left: 0px;
list-style: none; list-style: none;
} }
.list-group-item { .list-group-item {
border-bottom: 1px solid #e7eaec; border-bottom: 1px solid #e7eaec;
border-top: 1px solid #e7eaec; border-top: 1px solid #e7eaec;
margin-bottom: -1px; margin-bottom: -1px;
padding: 11px 0px; padding: 11px 0px;
font-size: 13px; font-size: 13px;
} }
.pull-right { .pull-right {
float: right !important; float: right !important;
} }
.el-card {
width: 100%;
}
.el-card__header { .el-card__header {
padding: 14px 15px 7px; padding: 14px 15px 7px;
min-height: 40px; min-height: 40px;
} }
.el-card__body { .el-card__body {
padding: 15px 20px 20px 20px; padding: 15px 20px 20px 20px;
} }
.card-box { .card-box {
padding-right: 15px; padding-right: 15px;
padding-left: 15px; padding-left: 15px;
margin-bottom: 10px; margin-bottom: 10px;
} }
/* button color */ /* button color */
.el-button--cyan.is-active, .el-button--cyan.is-active,
.el-button--cyan:active { .el-button--cyan:active {
background: #20B2AA; background: #20b2aa;
border-color: #20B2AA; border-color: #20b2aa;
color: #FFFFFF; color: #ffffff;
} }
.el-button--cyan:focus, .el-button--cyan:focus,
.el-button--cyan:hover { .el-button--cyan:hover {
background: #48D1CC; background: #48d1cc;
border-color: #48D1CC; border-color: #48d1cc;
color: #FFFFFF; color: #ffffff;
} }
.el-button--cyan { .el-button--cyan {
background-color: #20B2AA; background-color: #20b2aa;
border-color: #20B2AA; border-color: #20b2aa;
color: #FFFFFF; color: #ffffff;
} }
/* text color */ /* text color */
.text-navy { .text-navy {
color: #1ab394; color: #1ab394;
} }
.text-primary { .text-primary {
color: inherit; color: inherit;
} }
.text-success { .text-success {
color: #1c84c6; color: #1c84c6;
} }
.text-info { .text-info {
color: #23c6c8; color: #23c6c8;
} }
.text-warning { .text-warning {
color: #f8ac59; color: #f8ac59;
} }
.text-danger { .text-danger {
color: #ed5565; color: #ed5565;
} }
.text-muted { .text-muted {
color: #888888; color: #888888;
} }
/* image */ /* image */
.img-circle { .img-circle {
border-radius: 50%; border-radius: 50%;
} }
.img-lg { .img-lg {
width: 120px; width: 120px;
height: 120px; height: 120px;
} }
.avatar-upload-preview { .avatar-upload-preview {
position: relative; position: relative;
top: 50%; top: 50%;
left: 50%; left: 50%;
transform: translate(-50%, -50%); transform: translate(-50%, -50%);
width: 200px; width: 200px;
height: 200px; height: 200px;
border-radius: 50%; border-radius: 50%;
box-shadow: 0 0 4px #ccc; box-shadow: 0 0 4px #ccc;
overflow: hidden; overflow: hidden;
} }
/* 拖拽列样式 */ /* 拖拽列样式 */
.sortable-ghost{ .sortable-ghost {
opacity: .8; opacity: 0.8;
color: #fff!important; color: #fff !important;
background: #42b983!important; background: #42b983 !important;
} }
.top-right-btn { .top-right-btn {
position: relative; position: relative;
float: right; float: right;
} }

@ -10,9 +10,9 @@
> >
<logo v-if="showLogo" :collapse="isCollapse" /> <logo v-if="showLogo" :collapse="isCollapse" />
<el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper"> <el-scrollbar :class="settings.sideTheme" wrap-class="scrollbar-wrapper">
<!-- :collapse="isCollapse" -->
<el-menu <el-menu
:default-active="activeMenu" :default-active="activeMenu"
:collapse="isCollapse"
:background-color=" :background-color="
settings.sideTheme === 'theme-dark' settings.sideTheme === 'theme-dark'
? 'transparent' ? 'transparent'

@ -103,7 +103,7 @@ export default {
.app-main { .app-main {
height: calc(100% - 60px); height: calc(100% - 60px);
display: flex; display: flex;
align-items: center;
.left-sidebar { .left-sidebar {
height: 100%; height: 100%;
background: url("~@/assets/images/sidebar.png"); background: url("~@/assets/images/sidebar.png");

@ -1,5 +1,5 @@
<template> <template>
<i-frame :src="url" /> <i-frame :src="url" style="width: 100%" />
</template> </template>
<script> <script>
import iFrame from "@/components/iFrame/index"; import iFrame from "@/components/iFrame/index";
@ -8,7 +8,7 @@ export default {
components: { iFrame }, components: { iFrame },
data() { data() {
return { return {
url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html" url: process.env.VUE_APP_BASE_API + "/swagger-ui/index.html",
}; };
}, },
}; };

@ -1,6 +1,6 @@
<template> <template>
<div class="app-container" ref="main"> <div class="app-container" ref="main">
<div ref="search"> <div ref="search" class="search">
<el-form <el-form
:model="queryParams" :model="queryParams"
ref="queryForm" ref="queryForm"
@ -20,6 +20,13 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<el-button
v-hasPermi="['system:certificates:add']"
type="primary"
size="small"
@click="handleAdd"
>新增</el-button
>
</div> </div>
<div class="book-main" :style="{ height: tableHeigth + 'px' }"> <div class="book-main" :style="{ height: tableHeigth + 'px' }">
@ -29,7 +36,10 @@
src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg" src="https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg"
fit="cover" fit="cover"
></el-image> ></el-image>
<div class="operate" style="font-size: 14px; color: #4d4949"> <div
class="operate"
style="font-size: 14px; color: #4d4949; font-weight: bold"
>
<div>高级</div> <div>高级</div>
<div class="right-operate"> <div class="right-operate">
<div class="operate-item"> <div class="operate-item">
@ -42,11 +52,18 @@
type="text" type="text"
size="mini" size="mini"
style="color: #e6a23c; margin: 0 10px" style="color: #e6a23c; margin: 0 10px"
@click="handleUpdate"
v-hasPermi="['system:certificates:edit']"
>修改</el-button >修改</el-button
> >
</div> </div>
<div class="operate-item"> <div class="operate-item">
<el-button type="text" size="mini" style="color: #f56c6c" <el-button
v-hasPermi="['system:certificates:remove']"
type="text"
size="mini"
style="color: #f56c6c"
@click="handleDelete"
>删除</el-button >删除</el-button
> >
</div> </div>
@ -61,10 +78,60 @@
:limit.sync="queryParams.pageSize" :limit.sync="queryParams.pageSize"
@pagination="getList" @pagination="getList"
/> />
<!-- 添加或修改证书管理对话框 -->
<el-dialog :visible.sync="open" width="950px" append-to-body>
<div slot="title" class="dialog-title">
<span class="title-line"></span>
{{ title }}
</div>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="证书名称" prop="name">
<el-input v-model="form.name" placeholder="请输入证书名称" />
</el-form-item>
<el-form-item label="证书时间" prop="datetime">
<el-date-picker
clearable
v-model="form.datetime"
type="date"
value-format="yyyy-MM-dd"
placeholder="请选择证书时间"
>
</el-date-picker>
</el-form-item>
<el-form-item label="服务时长" prop="serviceDuration">
<el-input
v-model="form.serviceDuration"
placeholder="请输入服务时长"
/>
</el-form-item>
<el-form-item label="证书内容">
<el-input
type="textarea"
:rows="3"
v-model="form.content"
placeholder="请输入证书内容"
/>
</el-form-item>
<el-form-item label="证书封面" prop="cover">
<ImageUpload :limit="1" v-model="form.cover" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="submitForm"> </el-button>
<el-button @click="cancel"> </el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {
listCertificates,
getCertificates,
delCertificates,
addCertificates,
updateCertificates,
} from "@/api/volunteer/gxhzs/gxhzsgl/index.js";
export default { export default {
data() { data() {
return { return {
@ -77,24 +144,111 @@ export default {
pageNum: 0, pageNum: 0,
pageSize: 10, pageSize: 10,
}, },
form: {},
rules: {},
open: false,
title: "",
fileList: [],
}; };
}, },
created() { created() {
// // // //
this.$nextTick(() => { this.$nextTick(() => {
this.tableHeigth = this.tableHeigth =
this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 100; this.$refs.main.offsetHeight - this.$refs.search.offsetHeight - 80;
console.log(this.$refs.search.offsetHeight, "高度"); console.log(this.$refs.search.offsetHeight, "高度");
}); });
}, },
methods: { methods: {
getList() {}, getList() {},
//
reset() {
this.form = {
id: null,
name: null,
type: null,
cover: null,
content: null,
datetime: null,
serviceDuration: null,
createId: null,
createBy: null,
createTime: null,
updateId: null,
updateBy: null,
updateTime: null,
remark: null,
userId: null,
deptId: null,
};
this.resetForm("form");
},
//
cancel() {
this.open = false;
this.reset();
},
/** 新增按钮操作 */
handleAdd() {
this.reset();
this.open = true;
this.title = "添加证书管理";
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset();
const id = row.id || this.ids;
getCertificates(id).then((response) => {
this.form = response.data;
this.open = true;
this.title = "修改证书管理";
});
},
/** 提交按钮 */
submitForm() {
this.$refs["form"].validate((valid) => {
if (valid) {
if (this.form.id != null) {
updateCertificates(this.form).then((response) => {
this.$modal.msgSuccess("修改成功");
this.open = false;
this.getList();
});
} else {
addCertificates(this.form).then((response) => {
this.$modal.msgSuccess("新增成功");
this.open = false;
this.getList();
});
}
}
});
},
/** 删除按钮操作 */
handleDelete(row) {
const ids = row.id || this.ids;
this.$modal
.confirm('是否确认删除证书管理编号为"' + ids + '"的数据项?')
.then(function () {
return delCertificates(ids);
})
.then(() => {
this.getList();
this.$modal.msgSuccess("删除成功");
})
.catch(() => {});
},
}, },
}; };
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
// @import "@/assets/styles/myTable.scss"; // @import "@/assets/styles/myTable.scss";
// @import "@/assets/styles/element-variables.scss"; // @import "@/assets/styles/element-variables.scss";
.search {
display: flex;
align-items: center;
justify-content: space-between;
}
::v-deep .search-container { ::v-deep .search-container {
.el-form-item__content { .el-form-item__content {
width: 550px; width: 550px;
@ -141,4 +295,22 @@ export default {
} }
} }
} }
::v-deep .el-dialog__header {
background: #f7f5f5;
.dialog-title {
font-size: 17px;
font-family: "Alibaba-PuHuiTi-Bold";
color: #4c4949;
display: flex;
align-items: center;
.title-line {
display: inline-block;
width: 5px;
height: 18px;
background: #f8414d;
margin-right: 6px;
}
}
}
</style> </style>

Loading…
Cancel
Save