Browse Source

修改新版样式

main
蒋吉兆 3 years ago
parent
commit
983e343373
  1. 121
      server/resource/template/web/table.vue.tpl
  2. 32
      web/src/api/sysOperationRecord.js
  3. 122
      web/src/api/workflowProcess.js
  4. 1044
      web/src/style/animition.scss
  5. 8
      web/src/style/base.scss
  6. 184
      web/src/style/main.scss
  7. 47
      web/src/view/example/breakpoint/breakpoint.vue
  8. 91
      web/src/view/example/customer/customer.vue
  9. 62
      web/src/view/example/excel/excel.vue
  10. 33
      web/src/view/example/upload/upload.vue
  11. 99
      web/src/view/superAdmin/api/api.vue
  12. 84
      web/src/view/superAdmin/authority/authority.vue
  13. 100
      web/src/view/superAdmin/dictionary/sysDictionary.vue
  14. 97
      web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue
  15. 105
      web/src/view/superAdmin/menu/menu.vue
  16. 170
      web/src/view/superAdmin/operation/sysOperationRecord.vue
  17. 110
      web/src/view/superAdmin/user/user.vue
  18. 258
      web/src/view/systemTools/autoCode/index.vue
  19. 108
      web/src/view/systemTools/autoCodeAdmin/index.vue
  20. 5
      web/src/view/systemTools/system/system.vue

121
server/resource/template/web/table.vue.tpl

@ -1,6 +1,6 @@
<template>
<div>
<div class="search-term">
<div class="gva-search-box">
<el-form :inline="true" :model="searchInfo" class="demo-form-inline">
{{- range .Fields}} {{- if .FieldSearchType}} {{- if eq .FieldType "bool" }}
<el-form-item label="{{.FieldDesc}}" prop="{{.FieldJson}}">
@ -21,66 +21,69 @@
<el-form-item label="{{.FieldDesc}}">
<el-input v-model="searchInfo.{{.FieldJson}}" placeholder="搜索条件" />
</el-form-item>{{ end }}{{ end }}{{ end }}
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" type="danger" style="margin-left: 10px;">批量删除</el-button>
</template>
</el-popover>
</div>
</div>
<el-table
ref="multipleTable"
border
stripe
style="width: 100%"
tooltip-effect="dark"
:data="tableData"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template>
</el-table-column>
{{- range .Fields}}
{{- if .DictType}}
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">
{{"{{"}} filterDict(scope.row.{{.FieldJson}},"{{.DictType}}") {{"}}"}}
</template>
</el-table-column>
{{- else if eq .FieldType "bool" }}
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template>
</el-table-column> {{- else }}
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
{{- end }}
{{- end }}
<el-table-column label="按钮组">
<template #default="scope">
<el-button size="small" type="primary" icon="el-icon-edit" class="table-button" @click="update{{.StructName}}(scope.row)">变更</el-button>
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteRow(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
layout="total, sizes, prev, pager, next, jumper"
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗?</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
<el-table
ref="multipleTable"
style="width: 100%"
tooltip-effect="dark"
:data="tableData"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template>
</el-table-column>
{{- range .Fields}}
{{- if .DictType}}
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">
{{"{{"}} filterDict(scope.row.{{.FieldJson}},"{{.DictType}}") {{"}}"}}
</template>
</el-table-column>
{{- else if eq .FieldType "bool" }}
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template>
</el-table-column> {{- else }}
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
{{- end }}
{{- end }}
<el-table-column label="按钮组">
<template #default="scope">
<el-button size="small" type="text" icon="el-icon-edit" class="table-button" @click="update{{.StructName}}(scope.row)">变更</el-button>
<el-button type="text" icon="el-icon-delete" size="mini" @click="deleteRow(scope.row)">删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
layout="total, sizes, prev, pager, next, jumper"
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作">
<el-form :model="formData" label-position="right" label-width="80px">
{{- range .Fields}}

32
web/src/api/sysOperationRecord.js

@ -9,15 +9,15 @@ import service from '@/utils/request'
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sysOperationRecord/deleteSysOperationRecord [delete]
export const deleteSysOperationRecord = (data) => {
return service({
url: '/sysOperationRecord/deleteSysOperationRecord',
method: 'delete',
data
})
return service({
url: '/sysOperationRecord/deleteSysOperationRecord',
method: 'delete',
data
})
}
// @Tags SysOperationRecord
// @Summary 批量删除SysOperationRecord
// @Summary 删除SysOperationRecord
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
@ -25,11 +25,11 @@ export const deleteSysOperationRecord = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sysOperationRecord/deleteSysOperationRecord [delete]
export const deleteSysOperationRecordByIds = (data) => {
return service({
url: '/sysOperationRecord/deleteSysOperationRecordByIds',
method: 'delete',
data
})
return service({
url: '/sysOperationRecord/deleteSysOperationRecordByIds',
method: 'delete',
data
})
}
// @Tags SysOperationRecord
@ -41,9 +41,9 @@ export const deleteSysOperationRecordByIds = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysOperationRecord/getSysOperationRecordList [get]
export const getSysOperationRecordList = (params) => {
return service({
url: '/sysOperationRecord/getSysOperationRecordList',
method: 'get',
params
})
return service({
url: '/sysOperationRecord/getSysOperationRecordList',
method: 'get',
params
})
}

122
web/src/api/workflowProcess.js

@ -9,11 +9,11 @@ import service from '@/utils/request'
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/createWorkflowProcess [post]
export const createWorkflowProcess = (data) => {
return service({
url: '/workflowProcess/createWorkflowProcess',
method: 'post',
data
})
return service({
url: '/workflowProcess/createWorkflowProcess',
method: 'post',
data
})
}
// @Tags WorkflowProcess
@ -25,11 +25,11 @@ export const createWorkflowProcess = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /workflowProcess/deleteWorkflowProcess [delete]
export const deleteWorkflowProcess = (data) => {
return service({
url: '/workflowProcess/deleteWorkflowProcess',
method: 'delete',
data
})
return service({
url: '/workflowProcess/deleteWorkflowProcess',
method: 'delete',
data
})
}
// @Tags WorkflowProcess
@ -37,15 +37,15 @@ export const deleteWorkflowProcess = (data) => {
// @Security ApiKeyAuth
// @accept application/json
// @Produce application/json
// @Param data body request.IdsReq true "批量删除WorkflowProcess"
// @Param data body request.IdsReq true "删除WorkflowProcess"
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /workflowProcess/deleteWorkflowProcess [delete]
export const deleteWorkflowProcessByIds = (data) => {
return service({
url: '/workflowProcess/deleteWorkflowProcessByIds',
method: 'delete',
data
})
return service({
url: '/workflowProcess/deleteWorkflowProcessByIds',
method: 'delete',
data
})
}
// @Tags WorkflowProcess
@ -57,11 +57,11 @@ export const deleteWorkflowProcessByIds = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /workflowProcess/updateWorkflowProcess [put]
export const updateWorkflowProcess = (data) => {
return service({
url: '/workflowProcess/updateWorkflowProcess',
method: 'put',
data
})
return service({
url: '/workflowProcess/updateWorkflowProcess',
method: 'put',
data
})
}
// @Tags WorkflowProcess
@ -73,11 +73,11 @@ export const updateWorkflowProcess = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /workflowProcess/findWorkflowProcess [get]
export const findWorkflowProcess = (params) => {
return service({
url: '/workflowProcess/findWorkflowProcess',
method: 'get',
params
})
return service({
url: '/workflowProcess/findWorkflowProcess',
method: 'get',
params
})
}
// @Tags WorkflowProcess
@ -89,11 +89,11 @@ export const findWorkflowProcess = (params) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getWorkflowProcessList [get]
export const getWorkflowProcessList = (params) => {
return service({
url: '/workflowProcess/getWorkflowProcessList',
method: 'get',
params
})
return service({
url: '/workflowProcess/getWorkflowProcessList',
method: 'get',
params
})
}
// @Tags WorkflowProcess
@ -105,11 +105,11 @@ export const getWorkflowProcessList = (params) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /workflowProcess/findWorkflowStep [get]
export const findWorkflowStep = (params) => {
return service({
url: '/workflowProcess/findWorkflowStep',
method: 'get',
params
})
return service({
url: '/workflowProcess/findWorkflowStep',
method: 'get',
params
})
}
// @Tags ExaWfLeave
@ -120,12 +120,12 @@ export const findWorkflowStep = (params) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/startWorkflow [post]
export const startWorkflow = (data, params = { businessType: data.wf.businessType }) => {
return service({
url: '/workflowProcess/startWorkflow',
method: 'post',
data,
params
})
return service({
url: '/workflowProcess/startWorkflow',
method: 'post',
data,
params
})
}
// @Tags ExaWfLeave
@ -136,12 +136,12 @@ export const startWorkflow = (data, params = { businessType: data.wf.businessTyp
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/completeWorkflowMove [post]
export const completeWorkflowMove = (data, params = { businessType: data.wf.businessType }) => {
return service({
url: '/workflowProcess/completeWorkflowMove',
method: 'post',
data,
params
})
return service({
url: '/workflowProcess/completeWorkflowMove',
method: 'post',
data,
params
})
}
// @Tags WorkflowProcess
@ -152,10 +152,10 @@ export const completeWorkflowMove = (data, params = { businessType: data.wf.busi
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyStated [get]
export const getMyStated = () => {
return service({
url: '/workflowProcess/getMyStated',
method: 'get'
})
return service({
url: '/workflowProcess/getMyStated',
method: 'get'
})
}
// @Tags WorkflowProcess
@ -166,10 +166,10 @@ export const getMyStated = () => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyNeed [get]
export const getMyNeed = () => {
return service({
url: '/workflowProcess/getMyNeed',
method: 'get'
})
return service({
url: '/workflowProcess/getMyNeed',
method: 'get'
})
}
// @Tags WorkflowProcess
@ -181,9 +181,9 @@ export const getMyNeed = () => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getWorkflowMoveByID [get]
export const getWorkflowMoveByID = (params) => {
return service({
url: '/workflowProcess/getWorkflowMoveByID',
method: 'get',
params
})
return service({
url: '/workflowProcess/getWorkflowMoveByID',
method: 'get',
params
})
}

1044
web/src/style/animition.scss
File diff suppressed because it is too large
View File

8
web/src/style/base.scss

@ -59,16 +59,16 @@
text-align: center;
}
.el-pager li.active{
.el-pager li.active {
color: #409EFF !important;
border: 1px solid #409EFF;
}
.el-pager li.active+li{
border-left: 1px;
.el-pager li.active+li {
border-left: 1px !important;
}
.el-pager li:hover{
.el-pager li:hover {
color: #409EFF !important;
border: 1px solid #409EFF;
}

184
web/src/style/main.scss

@ -652,9 +652,6 @@ li {
.el-sub-menu__title:hover span {
color: #fff;
}
.el-menu--inline {
// border-left: 5px solid #2c3b41;
}
}
.hideside {
.aside {
@ -720,26 +717,10 @@ li {
}
}
.admin-box {
padding: 14px 20px;
.el-button {
padding: 7px 10px;
}
.el-input__inner {
height: 30px;
line-height: 30px;
}
.el-input__icon {
line-height: 30px;
}
}
.admin-box {
min-height: calc(100vh - 200px);
background-color: $white-bg;
padding: 14px;
margin: 114px 14px 20px;
border-radius: 2px;
margin: 100px 2px 20px;
.el-table--border {
border-radius: 4px;
margin-bottom: 14px;
@ -749,26 +730,30 @@ li {
color: $color-table-thead;
}
th {
padding: 5px 0;
padding: 6px 0;
background: #F7FBFF;
.cell {
min-height: 34px;
line-height: 34px;
color: rgba($color: #000000, $alpha: 0.85);
font-size: 14px;
min-height: 40px;
display: flex;
align-items: center;
}
}
td {
padding: 8px 0;
padding: 6px 0;
.cell {
min-height: 40px;
display: flex;
align-items: center;
color: rgba($color: #000000, $alpha: 0.65);
}
}
td,
th.is-leaf {
td.is-leaf {
border-bottom: 1px solid #e8e8e8;
}
}
.search-term {
border-left: none;
border-right: none;
padding: 0 5px;
.el-form-item {
margin-bottom: 10px;
th.is-leaf {
border-bottom: none;
}
}
.el-pagination {
@ -778,9 +763,6 @@ li {
.upload {
padding: 0;
}
.system {
padding: 0;
}
.el-form.el-form--inline {
.el-form-item:last-child {
margin-bottom: 0;
@ -790,6 +772,16 @@ li {
.edit {
padding: 0;
}
.el-input {
.el-input__suffix {
margin-top: -3px;
}
}
.el-input__inner {
border-color: rgba($color: #000000, $alpha: 0.15);
height: 32px;
border-radius: 2px;
}
}
.admin-box:after,
@ -805,13 +797,6 @@ li {
padding: 0 0 10px 0px;
}
.search-term {
background: $white-bg;
padding: 0 15px;
border-left: 1px solid #ebeef5;
border-right: 1px solid #ebeef5;
}
// table
.has-gutter {
tr {
@ -833,7 +818,7 @@ li {
.el-table th,
.el-table tr {
background-color: #fafafa;
background-color: #ffffff;
}
.el-pagination {
@ -886,36 +871,6 @@ li {
}
}
// upload-demo
.upload-demo,
.upload {
.upload-box{
margin-bottom: 12px;
display: flex;
justify-content: flex-end;
.upload-btn{
margin-left: 12px;
}
}
background-color: $white-bg;
padding: 15px;
.el-upload-list__item-status-label {
right: 0;
left: 120px;
}
.el-upload__tip {
margin: 10px 0;
}
}
// system
.system {
padding: 15px;
.el-input__inner {
width: 80%;
}
}
// .el-menu .el-menu--inline {
// background: #2c3b41;
// }
@ -973,14 +928,6 @@ li {
// border-bottom: 1px solid #e8e8e8;
// }
// }
// .search-term {
// border-left: none;
// border-right: none;
// padding: 0 5px;
// .el-form-item {
// margin-bottom: 10px;
// }
// }
// .el-pagination {
// padding: 20px 0 0 0;
// }
@ -1049,11 +996,10 @@ li {
border: none;
border-left: 1px solid $border-color;
border-right: 1px solid $border-color;
+.el-tabs__item{
+.el-tabs__item {
border-left: 0px solid $border-color;
}
}
.el-tabs__item.is-active {
background-color: rgba(64, 158, 255, .08);
}
@ -1133,10 +1079,6 @@ li {
font-size: 13px;
}
.table-button+span {
margin-left: 10px !important;
}
$headerHigh: 52px;
$mainHight: 100vh;
.dropdown-group {
@ -1189,7 +1131,7 @@ $mainHight: 100vh;
overflow: visible;
position: relative;
.menu-total {
margin-left:6px;
margin-left: 6px;
cursor: pointer;
float: left;
margin-top: 10px;
@ -1402,15 +1344,18 @@ $mainHight: 100vh;
}
}
.gva-btn-list{
.gva-btn-list {
margin-bottom: 12px;
display: flex;
justify-content: flex-end;
.el-button+.el-button{
.el-button+.el-button {
margin-left: 12px;
}
}
.justify-content-flex-end {
justify-content: flex-end;
}
::-webkit-scrollbar-track-piece {
background-color: #f8f8f8;
}
@ -1430,3 +1375,58 @@ $mainHight: 100vh;
::-webkit-scrollbar-thumb:hover {
background-color: #bbb;
}
.el-button--primary {
--el-button-font-color: #ffffff;
--el-button-background-color: #4D70FF;
--el-button-border-color: #4D70FF;
--el-button-hover-color: #0d84ff;
--el-button-active-font-color: #e6e6e6;
--el-button-active-background-color: #0d84ff;
--el-button-active-border-color: #0d84ff;
}
.el-button--primary {
--el-button-font-color: #ffffff;
--el-button-background-color: #4D70FF;
--el-button-border-color: #4D70FF;
--el-button-hover-color: #0d84ff;
--el-button-active-font-color: #e6e6e6;
--el-button-active-background-color: #0d84ff;
--el-button-active-border-color: #0d84ff;
}
:root {
--el-color-primary: #4D70FF;
}
.gva-search-box {
padding: 24px;
padding-bottom: 2px;
background-color: #fff;
border-radius: 2px;
margin-bottom: 10px;
}
.gva-table-box {
padding: 24px;
background-color: #fff;
border-radius: 2px;
}
.gva-pagination {
display: flex;
justify-content: flex-end;
}
.el-button--mini {
min-height: 32px;
}
.el-button {
padding: 8px 16px;
border-radius: 2px;
&.el-button--text {
padding: 8px 0;
}
}

47
web/src/view/example/breakpoint/breakpoint.vue

@ -1,29 +1,32 @@
<template>
<div class="hello">
<el-divider content-position="left">大文件上传</el-divider>
<form id="fromCont" method="post">
<div class="fileUpload" @click="inputChange">
选择文件
<input v-show="false" id="file" ref="Input" multiple="multiple" type="file" @change="choseFile">
</div>
</form>
<el-button :disabled="limitFileSize" type="primary" size="mini" class="uploadBtn" @click="getFile">上传文件</el-button>
<div class="el-upload__tip">请上传不超过5MB的文件</div>
<div class="list">
<transition name="list" tag="p">
<div v-if="file" class="list-item">
<i class="el-icon-document" />
<span>{{ file.name }}</span>
<span class="percentage">{{ percentage }}%</span>
<el-progress :show-text="false" :text-inside="false" :stroke-width="2" :percentage="percentage" />
<div class="break-point">
<div class="gva-table-box">
<el-divider content-position="left">大文件上传</el-divider>
<form id="fromCont" method="post">
<div class="fileUpload" @click="inputChange">
选择文件
<input v-show="false" id="file" ref="Input" multiple="multiple" type="file" @change="choseFile">
</div>
</transition>
</div>
<!-- <span
</form>
<el-button :disabled="limitFileSize" type="primary" size="mini" class="uploadBtn" @click="getFile">上传文件</el-button>
<div class="el-upload__tip">请上传不超过5MB的文件</div>
<div class="list">
<transition name="list" tag="p">
<div v-if="file" class="list-item">
<i class="el-icon-document" />
<span>{{ file.name }}</span>
<span class="percentage">{{ percentage }}%</span>
<el-progress :show-text="false" :text-inside="false" :stroke-width="2" :percentage="percentage" />
</div>
</transition>
</div>
<!-- <span
v-if="this.file"
>{{Math.floor(((this.formDataList.length-this.waitNum)/this.formDataList.length)*100)}}%</span> -->
<div class="tips">此版本为先行体验功能测试版样式美化和性能优化正在进行中上传切片文件和合成的完整文件分别再QMPlusserver目录的breakpointDir文件夹和fileDir文件夹</div>
<div class="tips">此版本为先行体验功能测试版样式美化和性能优化正在进行中上传切片文件和合成的完整文件分别再QMPlusserver目录的breakpointDir文件夹和fileDir文件夹</div>
</div>
</div>
</template>
<script>
@ -35,7 +38,7 @@ import {
removeChunk
} from '@/api/breakpoint'
export default {
name: 'HelloWorld',
name: 'BreakPoint',
data() {
return {
file: null,

91
web/src/view/example/customer/customer.vue

@ -1,55 +1,53 @@
<template>
<div>
<div class="search-term">
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
</div>
<el-table
ref="multipleTable"
:data="tableData"
style="width: 100%"
tooltip-effect="dark"
>
<el-table-column type="selection" width="55" />
<el-table-column label="接入日期" width="180">
<template #default="scope">
<span>{{ formatDate(scope.row.CreatedAt) }}</span>
</template>
</el-table-column>
<el-table-column label="姓名" prop="customerName" width="120" />
<el-table-column label="电话" prop="customerPhoneData" width="120" />
<el-table-column label="接入人ID" prop="sysUserId" width="120" />
<el-table-column label="按钮组" min-width="160">
<template #default="scope">
<el-button size="small" type="text" @click="updateCustomer(scope.row)">变更</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteCustomer(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="text" icon="el-icon-delete" size="mini">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-table
ref="multipleTable"
:data="tableData"
border
stripe
style="width: 100%"
tooltip-effect="dark"
>
<el-table-column type="selection" width="55" />
<el-table-column label="接入日期" width="180">
<template #default="scope">
<span>{{ formatDate(scope.row.CreatedAt) }}</span>
</template>
</el-table-column>
<el-table-column label="姓名" prop="customerName" width="120" />
<el-table-column label="电话" prop="customerPhoneData" width="120" />
<el-table-column label="接入人ID" prop="sysUserId" width="120" />
<el-table-column label="按钮组" min-width="160">
<template #default="scope">
<el-button size="small" type="text" @click="updateCustomer(scope.row)">变更</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteCustomer(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="danger" icon="el-icon-delete" size="mini">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<div class="tips">在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="客户">
<el-form :inline="true" :model="form" label-width="80px">
<el-form-item label="客户名">
@ -66,7 +64,6 @@
</div>
</template>
</el-dialog>
<div class="tips">在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示</div>
</div>
</template>

62
web/src/view/example/excel/excel.vue

@ -1,32 +1,35 @@
<template>
<div class="upload">
<div class="btn-list">
<el-upload
class="excel-btn"
:action="`${path}/excel/importExcel`"
:headers="{'x-token':token}"
:on-success="loadExcel"
:show-file-list="false"
>
<el-button size="mini" type="primary" icon="el-icon-upload2">导入</el-button>
</el-upload>
<el-button class="excel-btn" size="mini" type="primary" icon="el-icon-download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button>
<el-button class="excel-btn" size="mini" type="success" icon="el-icon-download" @click="downloadExcelTemplate()">下载模板</el-button>
</div>
<el-table :data="tableData" border row-key="ID" stripe>
<el-table-column label="ID" min-width="100" prop="ID" />
<el-table-column label="路由Name" min-width="160" prop="name" />
<el-table-column label="路由Path" min-width="160" prop="path" />
<el-table-column label="是否隐藏" min-width="100" prop="hidden">
<div class="gva-table-box">
<div class="gva-btn-list">
<el-upload
class="excel-btn"
:action="`${path}/excel/importExcel`"
:headers="{'x-token':token}"
:on-success="loadExcel"
:show-file-list="false"
>
<el-button size="mini" type="primary" icon="el-icon-upload2">导入</el-button>
</el-upload>
<el-button class="excel-btn" size="mini" type="primary" icon="el-icon-download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button>
<el-button class="excel-btn" size="mini" type="success" icon="el-icon-download" @click="downloadExcelTemplate()">下载模板</el-button>
</div>
<el-table :data="tableData" row-key="ID">
<el-table-column label="ID" min-width="100" prop="ID" />
<el-table-column label="路由Name" min-width="160" prop="name" />
<el-table-column label="路由Path" min-width="160" prop="path" />
<el-table-column label="是否隐藏" min-width="100" prop="hidden">
<template #default="scope">
<span>{{ scope.row.hidden?"隐藏":"显示" }}</span>
</template>
</el-table-column>
<el-table-column label="父节点" min-width="90" prop="parentId" />
<el-table-column label="排序" min-width="70" prop="sort" />
<el-table-column label="文件路径" min-width="360" prop="component" />
</el-table>
<template #default="scope">
<span>{{ scope.row.hidden?"隐藏":"显示" }}</span>
</template>
</el-table-column>
<el-table-column label="父节点" min-width="90" prop="parentId" />
<el-table-column label="排序" min-width="70" prop="sort" />
<el-table-column label="文件路径" min-width="360" prop="component" />
</el-table>
</div>
</div>
</template>
@ -75,8 +78,9 @@ export default {
display: flex;
margin-bottom: 12px;
justify-content: flex-end;
.excel-btn+.excel-btn{
margin-left: 12px;
}
}
.excel-btn+.excel-btn{
margin-left: 10px;
}
</style>

33
web/src/view/example/upload/upload.vue

@ -1,7 +1,7 @@
<template>
<div v-loading.fullscreen.lock="fullscreenLoading">
<div class="upload">
<div class="upload-box">
<div class="gva-table-box">
<div class="gva-btn-list">
<el-upload
:action="`${path}/fileUploadAndDownload/upload`"
:before-upload="checkFile"
@ -22,7 +22,7 @@
/>
</div>
<el-table :data="tableData" border stripe>
<el-table :data="tableData">
<el-table-column label="预览" width="100">
<template #default="scope">
<CustomPic pic-type="file" :pic-src="scope.row.url" />
@ -50,16 +50,18 @@
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{ float: 'right', padding: '20px' }"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{ float: 'right', padding: '20px' }"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>
@ -170,3 +172,8 @@ export default {
}
}
</script>
<style scoped>
.upload-btn+.upload-btn {
margin-left: 12px;
}
</style>

99
web/src/view/superAdmin/api/api.vue

@ -1,6 +1,6 @@
<template>
<div>
<div class="search-term">
<div class="gva-search-box">
<el-form :inline="true" :model="searchInfo">
<el-form-item label="路径">
<el-input v-model="searchInfo.path" placeholder="路径" />
@ -21,9 +21,14 @@
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
@ -32,56 +37,51 @@
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" type="danger" style="margin-left: 10px;">批量删除</el-button>
<el-button icon="el-icon-delete" size="mini" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
</div>
<el-table :data="tableData" border stripe @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
/>
<el-table-column label="id" min-width="60" prop="ID" sortable="custom" />
<el-table-column label="api路径" min-width="150" prop="path" sortable="custom" />
<el-table-column label="api分组" min-width="150" prop="apiGroup" sortable="custom" />
<el-table-column label="api简介" min-width="150" prop="description" sortable="custom" />
<el-table-column label="请求" min-width="150" prop="method" sortable="custom">
<template #default="scope">
<div>
{{ scope.row.method }}
<el-tag
:key="scope.row.methodFiletr"
:type="tagTypeFiletr(scope.row.method)"
effect="dark"
size="mini"
>{{ methodFiletr(scope.row.method) }}</el-tag>
</div>
</template>
</el-table-column>
<el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
/>
<el-table-column label="id" min-width="60" prop="ID" sortable="custom" />
<el-table-column label="api路径" min-width="150" prop="path" sortable="custom" />
<el-table-column label="api分组" min-width="150" prop="apiGroup" sortable="custom" />
<el-table-column label="api简介" min-width="150" prop="description" sortable="custom" />
<el-table-column label="请求" min-width="150" prop="method" sortable="custom">
<template #default="scope">
<div>
{{ scope.row.method }} / {{ methodFiletr(scope.row.method) }}
</div>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="200">
<template #default="scope">
<el-button size="small" type="primary" icon="el-icon-edit" @click="editApi(scope.row)">编辑</el-button>
<el-button
size="small"
type="danger"
icon="el-icon-delete"
@click="deleteApi(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<el-table-column fixed="right" label="操作" width="200">
<template #default="scope">
<el-button size="small" type="text" @click="editApi(scope.row)">编辑</el-button>
<el-button
size="small"
type="text"
@click="deleteApi(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle">
<el-form ref="apiForm" :inline="true" :model="form" :rules="rules" label-width="80px">
@ -345,9 +345,6 @@ export default {
float: right;
}
}
.el-tag--mini {
margin-left: 5px;
}
.warning {
color: #dc143c;
}

84
web/src/view/superAdmin/authority/authority.vue

@ -1,48 +1,48 @@
<template>
<div class="authority">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addAuthority('0')">新增角色</el-button>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addAuthority('0')">新增角色</el-button>
</div>
<el-table
:data="tableData"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
row-key="authorityId"
style="width: 100%"
>
<el-table-column label="角色id" min-width="180" prop="authorityId" />
<el-table-column label="角色名称" min-width="180" prop="authorityName" />
<el-table-column label="操作" width="460">
<template #default="scope">
<el-button size="mini" type="text" @click="opdendrawer(scope.row)">设置权限</el-button>
<el-button
icon="el-icon-plus"
size="mini"
type="text"
@click="addAuthority(scope.row.authorityId)"
>新增子角色</el-button>
<el-button
icon="el-icon-copy-document"
size="mini"
type="text"
@click="copyAuthority(scope.row)"
>拷贝</el-button>
<el-button
icon="el-icon-edit"
size="mini"
type="text"
@click="editAuthority(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="mini"
type="text"
@click="deleteAuth(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-table
:data="tableData"
:tree-props="{children: 'children', hasChildren: 'hasChildren'}"
border
row-key="authorityId"
stripe
style="width: 100%"
>
<el-table-column label="角色id" min-width="180" prop="authorityId" />
<el-table-column label="角色名称" min-width="180" prop="authorityName" />
<el-table-column label="操作" width="460">
<template #default="scope">
<el-button size="mini" type="primary" @click="opdendrawer(scope.row)">设置权限</el-button>
<el-button
icon="el-icon-plus"
size="mini"
type="primary"
@click="addAuthority(scope.row.authorityId)"
>新增子角色</el-button>
<el-button
icon="el-icon-copy-document"
size="mini"
type="primary"
@click="copyAuthority(scope.row)"
>拷贝</el-button>
<el-button
icon="el-icon-edit"
size="mini"
type="primary"
@click="editAuthority(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
size="mini"
type="danger"
@click="deleteAuth(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<span style="color: red;font-size: 12px">右上角头像下拉可切换角色</span>
<!-- 新增角色弹窗 -->
<el-dialog v-model="dialogFormVisible" :title="dialogTitle">

100
web/src/view/superAdmin/dictionary/sysDictionary.vue

@ -1,6 +1,6 @@
<template>
<div>
<div class="search-term">
<div class="gva-search-box">
<el-form :inline="true" :model="searchInfo">
<el-form-item label="字典名(中)">
<el-input v-model="searchInfo.name" placeholder="搜索条件" />
@ -17,64 +17,66 @@
<el-form-item label="描述">
<el-input v-model="searchInfo.desc" placeholder="搜索条件" />
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
</div>
</div>
<el-table
ref="multipleTable"
:data="tableData"
border
stripe
style="width: 100%"
tooltip-effect="dark"
>
<el-table-column type="selection" width="55" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table
ref="multipleTable"
:data="tableData"
style="width: 100%"
tooltip-effect="dark"
>
<el-table-column type="selection" width="55" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="字典名(中)" prop="name" width="120" />
<el-table-column label="字典名(中)" prop="name" width="120" />
<el-table-column label="字典名(英)" prop="type" width="120" />
<el-table-column label="字典名(英)" prop="type" width="120" />
<el-table-column label="状态" prop="status" width="120">
<template #default="scope">{{ formatBoolean(scope.row.status) }}</template>
</el-table-column>
<el-table-column label="状态" prop="status" width="120">
<template #default="scope">{{ formatBoolean(scope.row.status) }}</template>
</el-table-column>
<el-table-column label="描述" prop="desc" width="280" />
<el-table-column label="描述" prop="desc" width="280" />
<el-table-column label="按钮组">
<template #default="scope">
<el-button size="mini" type="success" @click="toDetile(scope.row)">详情</el-button>
<el-button size="mini" type="primary" @click="updateSysDictionary(scope.row)">变更</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteSysDictionary(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="danger" icon="el-icon-delete" size="mini" style="margin-left:10px">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<el-table-column label="按钮组">
<template #default="scope">
<el-button size="mini" type="text" @click="toDetile(scope.row)">详情</el-button>
<el-button size="mini" type="text" @click="updateSysDictionary(scope.row)">变更</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteSysDictionary(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="text" icon="el-icon-delete" size="mini" style="margin-left:10px">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px">
<el-form-item label="字典名(中)" prop="name">

97
web/src/view/superAdmin/dictionary/sysDictionaryDetail.vue

@ -1,6 +1,6 @@
<template>
<div>
<div class="search-term">
<div class="gva-search-box">
<el-form :inline="true" :model="searchInfo">
<el-form-item label="展示值">
<el-input v-model="searchInfo.label" placeholder="搜索条件" />
@ -14,62 +14,65 @@
<el-option key="false" label="否" value="false" />
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增字典项</el-button>
</div>
</div>
<el-table
ref="multipleTable"
:data="tableData"
border
stripe
style="width: 100%"
tooltip-effect="dark"
>
<el-table-column type="selection" width="55" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table
ref="multipleTable"
:data="tableData"
style="width: 100%"
tooltip-effect="dark"
>
<el-table-column type="selection" width="55" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="展示值" prop="label" width="120" />
<el-table-column label="展示值" prop="label" width="120" />
<el-table-column label="字典值" prop="value" width="120" />
<el-table-column label="字典值" prop="value" width="120" />
<el-table-column label="启用状态" prop="status" width="120">
<template #default="scope">{{ formatBoolean(scope.row.status) }}</template>
</el-table-column>
<el-table-column label="启用状态" prop="status" width="120">
<template #default="scope">{{ formatBoolean(scope.row.status) }}</template>
</el-table-column>
<el-table-column label="排序标记" prop="sort" width="120" />
<el-table-column label="排序标记" prop="sort" width="120" />
<el-table-column label="按钮组">
<template #default="scope">
<el-button size="small" type="primary" @click="updateSysDictionaryDetail(scope.row)">变更</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteSysDictionaryDetail(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="danger" icon="el-icon-delete" size="mini">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-table-column label="按钮组">
<template #default="scope">
<el-button size="small" type="text" @click="updateSysDictionaryDetail(scope.row)">变更</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteSysDictionaryDetail(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="text" icon="el-icon-delete" size="mini">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px">

105
web/src/view/superAdmin/menu/menu.vue

@ -1,57 +1,58 @@
<template>
<div>
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addMenu('0')">新增根菜单</el-button>
</div>
<!-- 由于此处菜单跟左侧列表一一对应所以不需要分页 pageSize默认999 -->
<el-table :data="tableData" border row-key="ID" stripe>
<el-table-column label="ID" min-width="100" prop="ID" />
<el-table-column label="路由Name" min-width="160" prop="name" />
<el-table-column label="路由Path" min-width="160" prop="path" />
<el-table-column label="是否隐藏" min-width="100" prop="hidden">
<template #default="scope">
<span>{{ scope.row.hidden?"隐藏":"显示" }}</span>
</template>
</el-table-column>
<el-table-column label="父节点" min-width="90" prop="parentId" />
<el-table-column label="排序" min-width="70" prop="sort" />
<el-table-column label="文件路径" min-width="360" prop="component" />
<el-table-column label="展示名称" min-width="120" prop="authorityName">
<template #default="scope">
<span>{{ scope.row.meta.title }}</span>
</template>
</el-table-column>
<el-table-column label="图标" min-width="140" prop="authorityName">
<template #default="scope">
<i :class="`el-icon-${scope.row.meta.icon}`" />
<span>{{ scope.row.meta.icon }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="300">
<template #default="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="addMenu(scope.row.ID)"
>添加子菜单</el-button>
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="editMenu(scope.row.ID)"
>编辑</el-button>
<el-button
size="mini"
type="danger"
icon="el-icon-delete"
@click="deleteMenu(scope.row.ID)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addMenu('0')">新增根菜单</el-button>
</div>
<!-- 由于此处菜单跟左侧列表一一对应所以不需要分页 pageSize默认999 -->
<el-table :data="tableData" row-key="ID">
<el-table-column label="ID" min-width="100" prop="ID" />
<el-table-column label="路由Name" show-overflow-tooltip min-width="160" prop="name" />
<el-table-column label="路由Path" show-overflow-tooltip min-width="160" prop="path" />
<el-table-column label="是否隐藏" min-width="100" prop="hidden">
<template #default="scope">
<span>{{ scope.row.hidden?"隐藏":"显示" }}</span>
</template>
</el-table-column>
<el-table-column label="父节点" min-width="90" prop="parentId" />
<el-table-column label="排序" min-width="70" prop="sort" />
<el-table-column label="文件路径" min-width="360" prop="component" />
<el-table-column label="展示名称" min-width="120" prop="authorityName">
<template #default="scope">
<span>{{ scope.row.meta.title }}</span>
</template>
</el-table-column>
<el-table-column label="图标" min-width="140" prop="authorityName">
<template #default="scope">
<i :class="`el-icon-${scope.row.meta.icon}`" />
<span>{{ scope.row.meta.icon }}</span>
</template>
</el-table-column>
<el-table-column fixed="right" label="操作" width="300">
<template #default="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="addMenu(scope.row.ID)"
>添加子菜单</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="editMenu(scope.row.ID)"
>编辑</el-button>
<el-button
size="mini"
type="text"
icon="el-icon-delete"
@click="deleteMenu(scope.row.ID)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<el-dialog v-model="dialogFormVisible" :before-close="handleClose" :title="dialogTitle">
<el-form
v-if="dialogFormVisible"
@ -135,7 +136,7 @@
icon="el-icon-edit"
@click="addParameter(form)"
>新增菜单参数</el-button>
<el-table :data="form.parameters" stripe style="width: 100%">
<el-table :data="form.parameters" style="width: 100%">
<el-table-column prop="type" label="参数类型" width="180">
<template #default="scope">
<el-select v-model="scope.row.type" placeholder="请选择">

170
web/src/view/superAdmin/operation/sysOperationRecord.vue

@ -1,6 +1,6 @@
<template>
<div>
<div class="search-term">
<div class="gva-search-box">
<el-form :inline="true" :model="searchInfo">
<el-form-item label="请求方法">
<el-input v-model="searchInfo.method" placeholder="搜索条件" />
@ -11,9 +11,14 @@
<el-form-item label="结果状态码">
<el-input v-model="searchInfo.status" placeholder="搜索条件" />
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
</el-form-item>
</el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
@ -21,95 +26,94 @@
<el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" type="danger" style="margin-left: 10px;">批量删除</el-button>
<el-button icon="el-icon-delete" size="mini" style="margin-left: 10px;">删除</el-button>
</template>
</el-popover>
</div>
</div>
<el-table
ref="multipleTable"
:data="tableData"
border
stripe
style="width: 100%"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column label="操作人" width="140">
<template #default="scope">
<div>{{ scope.row.user.userName }}({{ scope.row.user.nickName }})</div>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="状态码" prop="status" width="120">
<template #default="scope">
<div>
<el-tag type="success">{{ scope.row.status }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="请求ip" prop="ip" width="120" />
<el-table-column label="请求方法" prop="method" width="120" />
<el-table-column label="请求路径" prop="path" width="240" />
<el-table-column label="请求" prop="path" width="80">
<template #default="scope">
<div>
<el-popover v-if="scope.row.body" placement="top-start" trigger="hover">
<div class="popover-box">
<pre>{{ fmtBody(scope.row.body) }}</pre>
</div>
<template #reference>
<i class="el-icon-view" />
</template>
</el-popover>
<el-table
ref="multipleTable"
:data="tableData"
style="width: 100%"
tooltip-effect="dark"
@selection-change="handleSelectionChange"
>
<el-table-column type="selection" width="55" />
<el-table-column label="操作人" width="140">
<template #default="scope">
<div>{{ scope.row.user.userName }}({{ scope.row.user.nickName }})</div>
</template>
</el-table-column>
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="状态码" prop="status" width="120">
<template #default="scope">
<div>
<el-tag type="success">{{ scope.row.status }}</el-tag>
</div>
</template>
</el-table-column>
<el-table-column label="请求ip" prop="ip" width="120" />
<el-table-column label="请求方法" prop="method" width="120" />
<el-table-column label="请求路径" prop="path" width="240" />
<el-table-column label="请求" prop="path" width="80">
<template #default="scope">
<div>
<el-popover v-if="scope.row.body" placement="top-start" trigger="hover">
<div class="popover-box">
<pre>{{ fmtBody(scope.row.body) }}</pre>
</div>
<template #reference>
<i class="el-icon-view" />
</template>
</el-popover>
<span v-else></span>
</div>
</template>
</el-table-column>
<el-table-column label="响应" prop="path" width="80">
<template #default="scope">
<div>
<el-popover v-if="scope.row.resp" placement="top-start" trigger="hover">
<div class="popover-box">
<pre>{{ fmtBody(scope.row.resp) }}</pre>
<span v-else></span>
</div>
</template>
</el-table-column>
<el-table-column label="响应" prop="path" width="80">
<template #default="scope">
<div>
<el-popover v-if="scope.row.resp" placement="top-start" trigger="hover">
<div class="popover-box">
<pre>{{ fmtBody(scope.row.resp) }}</pre>
</div>
<template #reference>
<i class="el-icon-view" />
</template>
</el-popover>
<span v-else></span>
</div>
</template>
</el-table-column>
<el-table-column label="按钮组">
<template #default="scope">
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button size="mini" type="primary" @click="deleteSysOperationRecord(scope.row)">确定</el-button>
</div>
<template #reference>
<i class="el-icon-view" />
<el-button icon="el-icon-delete" size="mini" type="text">删除</el-button>
</template>
</el-popover>
<span v-else></span>
</div>
</template>
</el-table-column>
<el-table-column label="按钮组">
<template #default="scope">
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button size="mini" type="primary" @click="deleteSysOperationRecord(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button icon="el-icon-delete" size="mini" type="danger">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
</div>
</template>

110
web/src/view/superAdmin/user/user.vue

@ -1,60 +1,62 @@
<template>
<div>
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addUser">新增用户</el-button>
</div>
<el-table :data="tableData" border stripe>
<el-table-column label="头像" min-width="50">
<template #default="scope">
<div :style="{'textAlign':'center'}">
<CustomPic :pic-src="scope.row.headerImg" />
</div>
</template>
</el-table-column>
<el-table-column label="uuid" min-width="250" prop="uuid" />
<el-table-column label="用户名" min-width="150" prop="userName" />
<el-table-column label="昵称" min-width="150" prop="nickName" />
<el-table-column label="用户角色" min-width="150">
<template #default="scope">
<el-cascader
v-model="scope.row.authorityIds"
:options="authOptions"
:show-all-levels="false"
:props="{ multiple:true,checkStrictly: true,label:'authorityName',value:'authorityId',disabled:'disabled',emitPath:false}"
filterable
:clearable="false"
@visible-change="(flag)=>{changeAuthority(scope.row,flag)}"
@remove-tag="()=>{changeAuthority(scope.row,false)}"
/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="150">
<template #default="scope">
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除此用户吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteUser(scope.row)">确定</el-button>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addUser">新增用户</el-button>
</div>
<el-table :data="tableData">
<el-table-column label="头像" min-width="50">
<template #default="scope">
<div :style="{'textAlign':'center'}">
<CustomPic :pic-src="scope.row.headerImg" />
</div>
<template #reference>
<el-button type="danger" icon="el-icon-delete" size="mini">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<span style="color: red;font-size: 12px">右上角头像下拉可切换角色</span>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</template>
</el-table-column>
<el-table-column label="uuid" min-width="250" prop="uuid" />
<el-table-column label="用户名" min-width="150" prop="userName" />
<el-table-column label="昵称" min-width="150" prop="nickName" />
<el-table-column label="用户角色" min-width="150">
<template #default="scope">
<el-cascader
v-model="scope.row.authorityIds"
:options="authOptions"
:show-all-levels="false"
collapse-tags
:props="{ multiple:true,checkStrictly: true,label:'authorityName',value:'authorityId',disabled:'disabled',emitPath:false}"
:clearable="false"
@visible-change="(flag)=>{changeAuthority(scope.row,flag)}"
@remove-tag="()=>{changeAuthority(scope.row,false)}"
/>
</template>
</el-table-column>
<el-table-column label="操作" min-width="150">
<template #default="scope">
<el-popover v-model:visible="scope.row.visible" placement="top" width="160">
<p>确定要删除此用户吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteUser(scope.row)">确定</el-button>
</div>
<template #reference>
<el-button type="text" icon="el-icon-delete" size="mini">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<span style="color: red;font-size: 12px">右上角头像下拉可切换角色</span>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-dialog v-model="addUserDialog" custom-class="user-dialog" title="新增用户">
<el-form ref="userForm" :rules="rules" :model="userInfo">
<el-form-item label="用户名" label-width="80px" prop="username">

258
web/src/view/systemTools/autoCode/index.vue

@ -1,136 +1,138 @@
<template>
<div>
<!-- 从数据库直接获取字段 -->
<el-collapse v-model="activeNames">
<el-collapse-item name="1">
<template #title>
<div :style="{fontSize:'16px',paddingLeft:'20px'}">
点这里从现有数据库创建代码
<i class="header-icon el-icon-thumb" />
</div>
</template>
<el-form ref="getTableForm" :inline="true" :model="dbform" label-width="120px">
<el-form-item label="数据库名" prop="structName">
<el-select v-model="dbform.dbName" filterable placeholder="请选择数据库" @change="getTable">
<el-option
v-for="item in dbOptions"
:key="item.database"
:label="item.database"
:value="item.database"
/>
</el-select>
</el-form-item>
<el-form-item label="表名" prop="structName">
<el-select
v-model="dbform.tableName"
:disabled="!dbform.dbName"
filterable
placeholder="请选择表"
>
<el-option
v-for="item in tableOptions"
:key="item.tableName"
:label="item.tableName"
:value="item.tableName"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="getColumn">使用此表创建</el-button>
</el-form-item>
</el-form>
</el-collapse-item>
</el-collapse>
<el-divider />
<!-- 初始版本自动化代码工具 -->
<el-form ref="autoCodeForm" :rules="rules" :model="form" label-width="120px" :inline="true">
<el-form-item label="Struct名称" prop="structName">
<el-input v-model="form.structName" placeholder="首字母自动转换大写" />
</el-form-item>
<el-form-item label="tableName" prop="tableName">
<el-input v-model="form.tableName" placeholder="指定表名(非必填)" />
</el-form-item>
<el-form-item label="Struct简称" prop="abbreviation">
<el-input v-model="form.abbreviation" placeholder="简称会作为入参对象名和路由group" />
</el-form-item>
<el-form-item label="Struct中文名称" prop="description">
<el-input v-model="form.description" placeholder="中文描述作为自动api描述" />
</el-form-item>
<el-form-item label="文件名称" prop="packageName">
<el-input v-model="form.packageName" placeholder="生成文件的默认名称(建议为驼峰格式,首字母小写,如sysXxxXxxx)" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip content="注:把自动生成的API注册进数据库" placement="bottom" effect="light">
<div> 自动创建API </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateApiToSql" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip content="注:自动迁移生成的文件到ymal配置的对应位置" placement="bottom" effect="light">
<div> 自动移动文件 </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoMoveFile" />
</el-form-item>
</el-form>
<!-- 组件列表 -->
<div class="gva-btn-list">
<el-button size="mini" type="primary" @click="editAndAddField()">新增Field</el-button>
</div>
<el-table :data="form.fields" border stripe>
<el-table-column type="index" label="序列" width="100" />
<el-table-column prop="fieldName" label="Field名" />
<el-table-column prop="fieldDesc" label="中文名" />
<el-table-column prop="fieldJson" label="FieldJson" />
<el-table-column prop="fieldType" label="Field数据类型" width="130" />
<el-table-column prop="dataType" label="数据库字段类型" width="130" />
<el-table-column prop="dataTypeLong" label="数据库字段长度" width="130" />
<el-table-column prop="columnName" label="数据库字段" width="130" />
<el-table-column prop="comment" label="数据库字段描述" width="130" />
<el-table-column prop="fieldSearchType" label="搜索条件" width="130" />
<el-table-column prop="dictType" label="字典" width="130" />
<el-table-column label="操作" width="300">
<template #default="scope">
<el-button
size="mini"
type="primary"
icon="el-icon-edit"
@click="editAndAddField(scope.row)"
>编辑</el-button>
<el-button
size="mini"
type="text"
:disabled="scope.$index === 0"
@click="moveUpField(scope.$index)"
>上移</el-button>
<el-button
size="mini"
type="text"
:disabled="(scope.$index + 1) === form.fields.length"
@click="moveDownField(scope.$index)"
>下移</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top">
<p>确定删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteField(scope.$index)">确定</el-button>
<div class="gva-search-box">
<el-collapse v-model="activeNames" style="margin-bottom:12px">
<el-collapse-item name="1">
<template #title>
<div :style="{fontSize:'16px',paddingLeft:'20px'}">
点这里从现有数据库创建代码
<i class="header-icon el-icon-thumb" />
</div>
<template #reference>
<el-button size="mini" type="danger" icon="el-icon-delete">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-tag type="danger">id , created_at , updated_at , deleted_at 会自动生成请勿重复创建</el-tag>
</template>
<el-form ref="getTableForm" style="margin-top:24px" :inline="true" :model="dbform" label-width="120px">
<el-form-item label="数据库名" prop="structName">
<el-select v-model="dbform.dbName" filterable placeholder="请选择数据库" @change="getTable">
<el-option
v-for="item in dbOptions"
:key="item.database"
:label="item.database"
:value="item.database"
/>
</el-select>
</el-form-item>
<el-form-item label="表名" prop="structName">
<el-select
v-model="dbform.tableName"
:disabled="!dbform.dbName"
filterable
placeholder="请选择表"
>
<el-option
v-for="item in tableOptions"
:key="item.tableName"
:label="item.tableName"
:value="item.tableName"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="getColumn">使用此表创建</el-button>
</el-form-item>
</el-form>
</el-collapse-item>
</el-collapse>
<!-- 初始版本自动化代码工具 -->
<el-form ref="autoCodeForm" :rules="rules" :model="form" label-width="120px" :inline="true">
<el-form-item label="Struct名称" prop="structName">
<el-input v-model="form.structName" placeholder="首字母自动转换大写" />
</el-form-item>
<el-form-item label="tableName" prop="tableName">
<el-input v-model="form.tableName" placeholder="指定表名(非必填)" />
</el-form-item>
<el-form-item label="Struct简称" prop="abbreviation">
<el-input v-model="form.abbreviation" placeholder="简称会作为入参对象名和路由group" />
</el-form-item>
<el-form-item label="Struct中文名称" prop="description">
<el-input v-model="form.description" placeholder="中文描述作为自动api描述" />
</el-form-item>
<el-form-item label="文件名称" prop="packageName">
<el-input v-model="form.packageName" placeholder="生成文件的默认名称(建议为驼峰格式,首字母小写,如sysXxxXxxx)" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip content="注:把自动生成的API注册进数据库" placement="bottom" effect="light">
<div> 自动创建API </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoCreateApiToSql" />
</el-form-item>
<el-form-item>
<template #label>
<el-tooltip content="注:自动迁移生成的文件到ymal配置的对应位置" placement="bottom" effect="light">
<div> 自动移动文件 </div>
</el-tooltip>
</template>
<el-checkbox v-model="form.autoMoveFile" />
</el-form-item>
</el-form>
</div>
<!-- 组件列表 -->
<div class="gva-btn-list">
<el-button size="mini" type="primary" @click="enterForm(true)">预览代码</el-button>
<el-button size="mini" type="primary" @click="enterForm(false)">生成代码</el-button>
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" @click="editAndAddField()">新增Field</el-button>
</div>
<el-table :data="form.fields">
<el-table-column type="index" label="序列" width="100" />
<el-table-column prop="fieldName" label="Field名" />
<el-table-column prop="fieldDesc" label="中文名" />
<el-table-column prop="fieldJson" label="FieldJson" />
<el-table-column prop="fieldType" label="Field数据类型" width="130" />
<el-table-column prop="dataType" label="数据库字段类型" width="130" />
<el-table-column prop="dataTypeLong" label="数据库字段长度" width="130" />
<el-table-column prop="columnName" label="数据库字段" width="130" />
<el-table-column prop="comment" label="数据库字段描述" width="130" />
<el-table-column prop="fieldSearchType" label="搜索条件" width="130" />
<el-table-column prop="dictType" label="字典" width="130" />
<el-table-column label="操作" width="300">
<template #default="scope">
<el-button
size="mini"
type="text"
icon="el-icon-edit"
@click="editAndAddField(scope.row)"
>编辑</el-button>
<el-button
size="mini"
type="text"
:disabled="scope.$index === 0"
@click="moveUpField(scope.$index)"
>上移</el-button>
<el-button
size="mini"
type="text"
:disabled="(scope.$index + 1) === form.fields.length"
@click="moveDownField(scope.$index)"
>下移</el-button>
<el-popover v-model:visible="scope.row.visible" placement="top">
<p>确定删除吗</p>
<div style="text-align: right; margin: 0">
<el-button size="mini" type="text" @click="scope.row.visible = false">取消</el-button>
<el-button type="primary" size="mini" @click="deleteField(scope.$index)">确定</el-button>
</div>
<template #reference>
<el-button size="mini" type="text" icon="el-icon-delete">删除</el-button>
</template>
</el-popover>
</template>
</el-table-column>
</el-table>
<el-tag type="danger" style="margin:12px 0;">id , created_at , updated_at , deleted_at 会自动生成请勿重复创建</el-tag>
<!-- 组件列表 -->
<div class="gva-btn-list justify-content-flex-end">
<el-button size="mini" type="primary" @click="enterForm(true)">预览代码</el-button>
<el-button size="mini" type="primary" @click="enterForm(false)">生成代码</el-button>
</div>
</div>
<!-- 组件弹窗 -->
<el-dialog v-model="dialogFlag" title="组件内容">

108
web/src/view/systemTools/autoCodeAdmin/index.vue

@ -1,63 +1,63 @@
<template>
<div>
<div class="search-term">
<div class="gva-table-box">
<div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="goAutoCode(null)">新增</el-button>
</div>
<el-table :data="tableData">
<el-table-column
type="selection"
width="55"
/>
<el-table-column label="id" width="60" prop="ID" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="结构体名" min-width="150" prop="structName" />
<el-table-column label="结构体描述" min-width="150" prop="structCNName" />
<el-table-column label="表名称" min-width="150" prop="tableName" />
<el-table-column label="回滚标记" min-width="150" prop="flag">
<template #default="scope">
<el-tag
v-if="scope.row.flag"
type="danger"
size="mini"
effect="dark"
>
已回滚
</el-tag>
<el-tag
v-else
size="mini"
type="success"
effect="dark"
>
未回滚
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" min-width="180">
<template #default="scope">
<div>
<el-button size="mini" type="text" :disabled="scope.row.flag === 1" @click="rollback(scope.row)">回滚</el-button>
<el-button size="mini" type="text" @click="goAutoCode(scope.row)">复用</el-button>
<el-button size="mini" type="text" @click="deleteRow(scope.row)">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<div class="gva-pagination">
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</div>
<el-table :data="tableData" border stripe>
<el-table-column
type="selection"
width="55"
/>
<el-table-column label="id" width="60" prop="ID" />
<el-table-column label="日期" width="180">
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="结构体名" min-width="150" prop="structName" />
<el-table-column label="结构体描述" min-width="150" prop="structCNName" />
<el-table-column label="表名称" min-width="150" prop="tableName" />
<el-table-column label="回滚标记" min-width="150" prop="flag">
<template #default="scope">
<el-tag
v-if="scope.row.flag"
type="danger"
size="mini"
effect="dark"
>
已回滚
</el-tag>
<el-tag
v-else
size="mini"
type="success"
effect="dark"
>
未回滚
</el-tag>
</template>
</el-table-column>
<el-table-column label="操作" min-width="180">
<template #default="scope">
<div>
<el-button size="mini" type="primary" :disabled="scope.row.flag === 1" @click="rollback(scope.row)">回滚</el-button>
<el-button size="mini" type="success" @click="goAutoCode(scope.row)">复用</el-button>
<el-button size="mini" type="danger" @click="deleteRow(scope.row)">删除</el-button>
</div>
</template>
</el-table-column>
</el-table>
<el-pagination
:current-page="page"
:page-size="pageSize"
:page-sizes="[10, 30, 50, 100]"
:style="{float:'right',padding:'20px'}"
:total="total"
layout="total, sizes, prev, pager, next, jumper"
@current-change="handleCurrentChange"
@size-change="handleSizeChange"
/>
</div>
</template>

5
web/src/view/systemTools/system/system.vue

@ -1,6 +1,6 @@
<template>
<div class="system">
<el-form ref="form" :model="config" label-width="100px" class="system">
<el-form ref="form" :model="config" label-width="100px">
<!-- System start -->
<h2>系统配置</h2>
<el-form-item label="环境值">
@ -373,6 +373,9 @@ export default {
<style lang="scss">
.system {
background: #fff;
padding:12px;
border-radius: 2px;
h2 {
padding: 10px;
margin: 10px 0;

Loading…
Cancel
Save