未验证 提交 e32465c0 编写于 作者: Mr.奇淼('s avatar Mr.奇淼( 提交者: GitHub

Merge pull request #723 from flipped-aurora/gva-vue3

发布v2.4.5 bate.1
version = 1
[[analyzers]]
name = "javascript"
enabled = true
[analyzers.meta]
plugins = ["vue"]
[[analyzers]]
name = "go"
enabled = true
[analyzers.meta]
import_root = "github.com/flipped-aurora/gin-vue-admin"
dependencies_vendored = true
...@@ -38,7 +38,7 @@ func RunWindowsServer() { ...@@ -38,7 +38,7 @@ func RunWindowsServer() {
fmt.Printf(` fmt.Printf(`
欢迎使用 github.com/flipped-aurora/gin-vue-admin/server 欢迎使用 github.com/flipped-aurora/gin-vue-admin/server
当前版本:V2.4.5 beta 当前版本:V2.4.5 beta.1
加群方式:微信号:shouzi_1994 QQ群:622360840 加群方式:微信号:shouzi_1994 QQ群:622360840
默认自动化文档地址:http://127.0.0.1%s/swagger/index.html 默认自动化文档地址:http://127.0.0.1%s/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:8080 默认前端文件运行地址:http://127.0.0.1:8080
......
...@@ -12,13 +12,16 @@ type {{.StructName}}Router struct { ...@@ -12,13 +12,16 @@ type {{.StructName}}Router struct {
// Init{{.StructName}}Router 初始化 {{.StructName}} 路由信息 // Init{{.StructName}}Router 初始化 {{.StructName}} 路由信息
func (s *{{.StructName}}Router) Init{{.StructName}}Router(Router *gin.RouterGroup) { func (s *{{.StructName}}Router) Init{{.StructName}}Router(Router *gin.RouterGroup) {
{{.Abbreviation}}Router := Router.Group("{{.Abbreviation}}").Use(middleware.OperationRecord()) {{.Abbreviation}}Router := Router.Group("{{.Abbreviation}}").Use(middleware.OperationRecord())
{{.Abbreviation}}RouterWithoutRecord := Router.Group("{{.Abbreviation}}")
var {{.Abbreviation}}Api = v1.ApiGroupApp.AutoCodeApiGroup.{{.StructName}}Api var {{.Abbreviation}}Api = v1.ApiGroupApp.AutoCodeApiGroup.{{.StructName}}Api
{ {
{{.Abbreviation}}Router.POST("create{{.StructName}}", {{.Abbreviation}}Api.Create{{.StructName}}) // 新建{{.StructName}} {{.Abbreviation}}Router.POST("create{{.StructName}}", {{.Abbreviation}}Api.Create{{.StructName}}) // 新建{{.StructName}}
{{.Abbreviation}}Router.DELETE("delete{{.StructName}}", {{.Abbreviation}}Api.Delete{{.StructName}}) // 删除{{.StructName}} {{.Abbreviation}}Router.DELETE("delete{{.StructName}}", {{.Abbreviation}}Api.Delete{{.StructName}}) // 删除{{.StructName}}
{{.Abbreviation}}Router.DELETE("delete{{.StructName}}ByIds", {{.Abbreviation}}Api.Delete{{.StructName}}ByIds) // 批量删除{{.StructName}} {{.Abbreviation}}Router.DELETE("delete{{.StructName}}ByIds", {{.Abbreviation}}Api.Delete{{.StructName}}ByIds) // 批量删除{{.StructName}}
{{.Abbreviation}}Router.PUT("update{{.StructName}}", {{.Abbreviation}}Api.Update{{.StructName}}) // 更新{{.StructName}} {{.Abbreviation}}Router.PUT("update{{.StructName}}", {{.Abbreviation}}Api.Update{{.StructName}}) // 更新{{.StructName}}
{{.Abbreviation}}Router.GET("find{{.StructName}}", {{.Abbreviation}}Api.Find{{.StructName}}) // 根据ID获取{{.StructName}} }
{{.Abbreviation}}Router.GET("get{{.StructName}}List", {{.Abbreviation}}Api.Get{{.StructName}}List) // 获取{{.StructName}}列表 {
{{.Abbreviation}}RouterWithoutRecord.GET("find{{.StructName}}", {{.Abbreviation}}Api.Find{{.StructName}}) // 根据ID获取{{.StructName}}
{{.Abbreviation}}RouterWithoutRecord.GET("get{{.StructName}}List", {{.Abbreviation}}Api.Get{{.StructName}}List) // 获取{{.StructName}}列表
} }
} }
<template> <template>
<div> <div>
<el-form :model="formData" label-position="right" label-width="80px"> <div class="gva-form-box">
{{- range .Fields}} <el-form :model="formData" label-position="right" label-width="80px">
<el-form-item label="{{.FieldDesc}}:"> {{- range .Fields}}
{{- if eq .FieldType "bool" }} <el-form-item label="{{.FieldDesc}}:">
<el-switch v-model="formData.{{.FieldJson}}" active-color="#13ce66" inactive-color="#ff4949" active-text="是" inactive-text="否" clearable ></el-switch> {{- if eq .FieldType "bool" }}
{{- end }} <el-switch v-model="formData.{{.FieldJson}}" active-color="#13ce66" inactive-color="#ff4949" active-text="是" inactive-text="否" clearable ></el-switch>
{{- if eq .FieldType "string" }} {{- end }}
<el-input v-model="formData.{{.FieldJson}}" clearable placeholder="请输入" /> {{- if eq .FieldType "string" }}
{{- end }} <el-input v-model="formData.{{.FieldJson}}" clearable placeholder="请输入" />
{{- if eq .FieldType "int" }} {{- end }}
{{- if .DictType }} {{- if eq .FieldType "int" }}
<el-select v-model="formData.{{ .FieldJson }}" placeholder="请选择" clearable> {{- if .DictType }}
<el-option v-for="(item,key) in {{ .DictType }}Options" :key="key" :label="item.label" :value="item.value" /> <el-select v-model="formData.{{ .FieldJson }}" placeholder="请选择" clearable>
</el-select> <el-option v-for="(item,key) in {{ .DictType }}Options" :key="key" :label="item.label" :value="item.value" />
{{- else }} </el-select>
<el-input v-model.number="formData.{{ .FieldJson }}" clearable placeholder="请输入" /> {{- else }}
{{- end }} <el-input v-model.number="formData.{{ .FieldJson }}" clearable placeholder="请输入" />
{{- end }} {{- end }}
{{- if eq .FieldType "time.Time" }} {{- end }}
<el-date-picker v-model="formData.{{ .FieldJson }}" type="date" placeholder="选择日期" clearable></el-date-picker> {{- if eq .FieldType "time.Time" }}
{{- end }} <el-date-picker v-model="formData.{{ .FieldJson }}" type="date" placeholder="选择日期" clearable></el-date-picker>
{{- if eq .FieldType "float64" }} {{- end }}
<el-input-number v-model="formData.{{ .FieldJson }}" :precision="2" clearable></el-input-number> {{- if eq .FieldType "float64" }}
{{- end }} <el-input-number v-model="formData.{{ .FieldJson }}" :precision="2" clearable></el-input-number>
</el-form-item> {{- end }}
{{- end }} </el-form-item>
<el-form-item> {{- end }}
<el-button size="mini" type="primary" @click="save">保存</el-button> <el-form-item>
<el-button size="mini" type="primary" @click="back">返回</el-button> <el-button size="mini" type="primary" @click="save">保存</el-button>
</el-form-item> <el-button size="mini" type="primary" @click="back">返回</el-button>
</el-form> </el-form-item>
</el-form>
</div>
</div> </div>
</template> </template>
......
<template> <template>
<div> <div>
<div class="search-term"> <div class="gva-search-box">
<el-form :inline="true" :model="searchInfo" class="demo-form-inline"> <el-form :inline="true" :model="searchInfo" class="demo-form-inline">
{{- range .Fields}} {{- if .FieldSearchType}} {{- if eq .FieldType "bool" }} {{- range .Fields}} {{- if .FieldSearchType}} {{- if eq .FieldType "bool" }}
<el-form-item label="{{.FieldDesc}}" prop="{{.FieldJson}}"> <el-form-item label="{{.FieldDesc}}" prop="{{.FieldJson}}">
...@@ -21,66 +21,71 @@ ...@@ -21,66 +21,71 @@
<el-form-item label="{{.FieldDesc}}"> <el-form-item label="{{.FieldDesc}}">
<el-input v-model="searchInfo.{{.FieldJson}}" placeholder="搜索条件" /> <el-input v-model="searchInfo.{{.FieldJson}}" placeholder="搜索条件" />
</el-form-item>{{ end }}{{ end }}{{ end }} </el-form-item>{{ end }}{{ end }}{{ end }}
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form> </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> </div>
<el-table <div class="gva-table-box">
ref="multipleTable" <div class="gva-btn-list">
border <el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
stripe <el-popover v-model:visible="deleteVisible" placement="top" width="160">
style="width: 100%" <p>确定要删除吗?</p>
tooltip-effect="dark" <div style="text-align: right; margin-top: 8px;">
:data="tableData" <el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
@selection-change="handleSelectionChange" <el-button size="mini" type="primary" @click="onDelete">确定</el-button>
> </div>
<el-table-column type="selection" width="55" /> <template #reference>
<el-table-column label="日期" width="180"> <el-button icon="el-icon-delete" size="mini" style="margin-left: 10px;">删除</el-button>
<template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template> </template>
</el-table-column> </el-popover>
{{- range .Fields}} </div>
{{- if .DictType}} <el-table
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120"> ref="multipleTable"
<template #default="scope"> style="width: 100%"
{{"{{"}} filterDict(scope.row.{{.FieldJson}},"{{.DictType}}") {{"}}"}} tooltip-effect="dark"
</template> :data="tableData"
</el-table-column> row-key="ID"
{{- else if eq .FieldType "bool" }} @selection-change="handleSelectionChange"
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120"> >
<template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template> <el-table-column type="selection" width="55" />
</el-table-column> {{- else }} <el-table-column align="center" label="日期" width="180">
<el-table-column label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" /> <template #default="scope">{{ "{{ formatDate(scope.row.CreatedAt) }}" }}</template>
{{- end }} </el-table-column>
{{- end }} {{- range .Fields}}
<el-table-column label="按钮组"> {{- if .DictType}}
<template #default="scope"> <el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
<el-button size="small" type="primary" icon="el-icon-edit" class="table-button" @click="update{{.StructName}}(scope.row)">变更</el-button> <template #default="scope">
<el-button type="danger" icon="el-icon-delete" size="mini" @click="deleteRow(scope.row)">删除</el-button> {{"{{"}} filterDict(scope.row.{{.FieldJson}},"{{.DictType}}") {{"}}"}}
</template> </template>
</el-table-column> </el-table-column>
</el-table> {{- else if eq .FieldType "bool" }}
<el-pagination <el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120">
layout="total, sizes, prev, pager, next, jumper" <template #default="scope">{{"{{"}} formatBoolean(scope.row.{{.FieldJson}}) {{"}}"}}</template>
:current-page="page" </el-table-column> {{- else }}
:page-size="pageSize" <el-table-column align="center" label="{{.FieldDesc}}" prop="{{.FieldJson}}" width="120" />
:page-sizes="[10, 30, 50, 100]" {{- end }}
:style="{float:'right',padding:'20px'}" {{- end }}
:total="total" <el-table-column align="center" label="按钮组">
@current-change="handleCurrentChange" <template #default="scope">
@size-change="handleSizeChange" <el-button type="text" icon="el-icon-edit" size="small" 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-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作">
<el-form :model="formData" label-position="right" label-width="80px"> <el-form :model="formData" label-position="right" label-width="80px">
{{- range .Fields}} {{- range .Fields}}
...@@ -93,7 +98,7 @@ ...@@ -93,7 +98,7 @@
{{- end }} {{- end }}
{{- if eq .FieldType "int" }} {{- if eq .FieldType "int" }}
{{- if .DictType}} {{- if .DictType}}
<el-select v-model="formData.{{ .FieldJson }}" placeholder="请选择" clearable> <el-select v-model="formData.{{ .FieldJson }}" placeholder="请选择" style="width:100%" clearable>
<el-option v-for="(item,key) in {{ .DictType }}Options" :key="key" :label="item.label" :value="item.value" /> <el-option v-for="(item,key) in {{ .DictType }}Options" :key="key" :label="item.label" :value="item.value" />
</el-select> </el-select>
{{- else }} {{- else }}
...@@ -101,18 +106,18 @@ ...@@ -101,18 +106,18 @@
{{- end }} {{- end }}
{{- end }} {{- end }}
{{- if eq .FieldType "time.Time" }} {{- if eq .FieldType "time.Time" }}
<el-date-picker v-model="formData.{{ .FieldJson }}" type="date" placeholder="选择日期" clearable /> <el-date-picker v-model="formData.{{ .FieldJson }}" type="date" style="width:100%" placeholder="选择日期" clearable />
{{- end }} {{- end }}
{{- if eq .FieldType "float64" }} {{- if eq .FieldType "float64" }}
<el-input-number v-model="formData.{{ .FieldJson }}" :precision="2" clearable /> <el-input-number v-model="formData.{{ .FieldJson }}" style="width:100%" :precision="2" clearable />
{{- end }} {{- end }}
</el-form-item> </el-form-item>
{{- end }} {{- end }}
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="closeDialog">取 消</el-button> <el-button size="small" @click="closeDialog">取 消</el-button>
<el-button type="primary" @click="enterDialog">确 定</el-button> <el-button size="small" type="primary" @click="enterDialog">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
...@@ -174,6 +179,9 @@ export default { ...@@ -174,6 +179,9 @@ export default {
{{- end }} {{- end }}
}, },
methods: { methods: {
onReset() {
this.searchInfo = {}
},
// 条件搜索前端看此方法 // 条件搜索前端看此方法
onSubmit() { onSubmit() {
this.page = 1 this.page = 1
......
...@@ -11,12 +11,15 @@ type AutoCodeExampleRouter struct { ...@@ -11,12 +11,15 @@ type AutoCodeExampleRouter struct {
func (s *AutoCodeExampleRouter) InitSysAutoCodeExampleRouter(Router *gin.RouterGroup) { func (s *AutoCodeExampleRouter) InitSysAutoCodeExampleRouter(Router *gin.RouterGroup) {
autoCodeExampleRouter := Router.Group("autoCodeExample").Use(middleware.OperationRecord()) autoCodeExampleRouter := Router.Group("autoCodeExample").Use(middleware.OperationRecord())
autoCodeExampleRouterWithoutRecord := Router.Group("autoCodeExample")
var autoCodeExampleApi = v1.ApiGroupApp.AutoCodeApiGroup.AutoCodeExampleApi var autoCodeExampleApi = v1.ApiGroupApp.AutoCodeApiGroup.AutoCodeExampleApi
{ {
autoCodeExampleRouter.POST("createSysAutoCodeExample", autoCodeExampleApi.CreateAutoCodeExample) // 新建AutoCodeExample autoCodeExampleRouter.POST("createSysAutoCodeExample", autoCodeExampleApi.CreateAutoCodeExample) // 新建AutoCodeExample
autoCodeExampleRouter.DELETE("deleteSysAutoCodeExample", autoCodeExampleApi.DeleteAutoCodeExample) // 删除AutoCodeExample autoCodeExampleRouter.DELETE("deleteSysAutoCodeExample", autoCodeExampleApi.DeleteAutoCodeExample) // 删除AutoCodeExample
autoCodeExampleRouter.PUT("updateSysAutoCodeExample", autoCodeExampleApi.UpdateAutoCodeExample) // 更新AutoCodeExample autoCodeExampleRouter.PUT("updateSysAutoCodeExample", autoCodeExampleApi.UpdateAutoCodeExample) // 更新AutoCodeExample
autoCodeExampleRouter.GET("findSysAutoCodeExample", autoCodeExampleApi.FindAutoCodeExample) // 根据ID获取AutoCodeExample }
autoCodeExampleRouter.GET("getSysAutoCodeExampleList", autoCodeExampleApi.GetAutoCodeExampleList) // 获取AutoCodeExample列表 {
autoCodeExampleRouterWithoutRecord.GET("findSysAutoCodeExample", autoCodeExampleApi.FindAutoCodeExample) // 根据ID获取AutoCodeExample
autoCodeExampleRouterWithoutRecord.GET("getSysAutoCodeExampleList", autoCodeExampleApi.GetAutoCodeExampleList) // 获取AutoCodeExample列表
} }
} }
...@@ -11,12 +11,15 @@ type CustomerRouter struct { ...@@ -11,12 +11,15 @@ type CustomerRouter struct {
func (e *CustomerRouter) InitCustomerRouter(Router *gin.RouterGroup) { func (e *CustomerRouter) InitCustomerRouter(Router *gin.RouterGroup) {
customerRouter := Router.Group("customer").Use(middleware.OperationRecord()) customerRouter := Router.Group("customer").Use(middleware.OperationRecord())
customerRouterWithoutRecord := Router.Group("customer")
var exaCustomerApi = v1.ApiGroupApp.ExampleApiGroup.CustomerApi var exaCustomerApi = v1.ApiGroupApp.ExampleApiGroup.CustomerApi
{ {
customerRouter.POST("customer", exaCustomerApi.CreateExaCustomer) // 创建客户 customerRouter.POST("customer", exaCustomerApi.CreateExaCustomer) // 创建客户
customerRouter.PUT("customer", exaCustomerApi.UpdateExaCustomer) // 更新客户 customerRouter.PUT("customer", exaCustomerApi.UpdateExaCustomer) // 更新客户
customerRouter.DELETE("customer", exaCustomerApi.DeleteExaCustomer) // 删除客户 customerRouter.DELETE("customer", exaCustomerApi.DeleteExaCustomer) // 删除客户
customerRouter.GET("customer", exaCustomerApi.GetExaCustomer) // 获取单一客户信息 }
customerRouter.GET("customerList", exaCustomerApi.GetExaCustomerList) // 获取客户列表 {
customerRouterWithoutRecord.GET("customer", exaCustomerApi.GetExaCustomer) // 获取单一客户信息
customerRouterWithoutRecord.GET("customerList", exaCustomerApi.GetExaCustomerList) // 获取客户列表
} }
} }
...@@ -12,9 +12,9 @@ func (e *ExcelRouter) InitExcelRouter(Router *gin.RouterGroup) { ...@@ -12,9 +12,9 @@ func (e *ExcelRouter) InitExcelRouter(Router *gin.RouterGroup) {
excelRouter := Router.Group("excel") excelRouter := Router.Group("excel")
var exaExcelApi = v1.ApiGroupApp.ExampleApiGroup.ExcelApi var exaExcelApi = v1.ApiGroupApp.ExampleApiGroup.ExcelApi
{ {
excelRouter.POST("/importExcel", exaExcelApi.ImportExcel) // 导入Excel excelRouter.POST("importExcel", exaExcelApi.ImportExcel) // 导入Excel
excelRouter.GET("/loadExcel", exaExcelApi.LoadExcel) // 加载Excel数据 excelRouter.GET("loadExcel", exaExcelApi.LoadExcel) // 加载Excel数据
excelRouter.POST("/exportExcel", exaExcelApi.ExportExcel) // 导出Excel excelRouter.POST("exportExcel", exaExcelApi.ExportExcel) // 导出Excel
excelRouter.GET("/downloadTemplate", exaExcelApi.DownloadTemplate) // 下载模板文件 excelRouter.GET("downloadTemplate", exaExcelApi.DownloadTemplate) // 下载模板文件
} }
} }
...@@ -12,12 +12,12 @@ func (e *FileUploadAndDownloadRouter) InitFileUploadAndDownloadRouter(Router *gi ...@@ -12,12 +12,12 @@ func (e *FileUploadAndDownloadRouter) InitFileUploadAndDownloadRouter(Router *gi
fileUploadAndDownloadRouter := Router.Group("fileUploadAndDownload") fileUploadAndDownloadRouter := Router.Group("fileUploadAndDownload")
var exaFileUploadAndDownloadApi = v1.ApiGroupApp.ExampleApiGroup.FileUploadAndDownloadApi var exaFileUploadAndDownloadApi = v1.ApiGroupApp.ExampleApiGroup.FileUploadAndDownloadApi
{ {
fileUploadAndDownloadRouter.POST("/upload", exaFileUploadAndDownloadApi.UploadFile) // 上传文件 fileUploadAndDownloadRouter.POST("upload", exaFileUploadAndDownloadApi.UploadFile) // 上传文件
fileUploadAndDownloadRouter.POST("/getFileList", exaFileUploadAndDownloadApi.GetFileList) // 获取上传文件列表 fileUploadAndDownloadRouter.POST("getFileList", exaFileUploadAndDownloadApi.GetFileList) // 获取上传文件列表
fileUploadAndDownloadRouter.POST("/deleteFile", exaFileUploadAndDownloadApi.DeleteFile) // 删除指定文件 fileUploadAndDownloadRouter.POST("deleteFile", exaFileUploadAndDownloadApi.DeleteFile) // 删除指定文件
fileUploadAndDownloadRouter.POST("/breakpointContinue", exaFileUploadAndDownloadApi.BreakpointContinue) // 断点续传 fileUploadAndDownloadRouter.POST("breakpointContinue", exaFileUploadAndDownloadApi.BreakpointContinue) // 断点续传
fileUploadAndDownloadRouter.GET("/findFile", exaFileUploadAndDownloadApi.FindFile) // 查询当前文件成功的切片 fileUploadAndDownloadRouter.GET("findFile", exaFileUploadAndDownloadApi.FindFile) // 查询当前文件成功的切片
fileUploadAndDownloadRouter.POST("/breakpointContinueFinish", exaFileUploadAndDownloadApi.BreakpointContinueFinish) // 查询当前文件成功的切片 fileUploadAndDownloadRouter.POST("breakpointContinueFinish", exaFileUploadAndDownloadApi.BreakpointContinueFinish) // 查询当前文件成功的切片
fileUploadAndDownloadRouter.POST("/removeChunk", exaFileUploadAndDownloadApi.RemoveChunk) // 查询当前文件成功的切片 fileUploadAndDownloadRouter.POST("removeChunk", exaFileUploadAndDownloadApi.RemoveChunk) // 查询当前文件成功的切片
} }
} }
...@@ -11,14 +11,17 @@ type ApiRouter struct { ...@@ -11,14 +11,17 @@ type ApiRouter struct {
func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup) { func (s *ApiRouter) InitApiRouter(Router *gin.RouterGroup) {
apiRouter := Router.Group("api").Use(middleware.OperationRecord()) apiRouter := Router.Group("api").Use(middleware.OperationRecord())
apiRouterWithoutRecord := Router.Group("api")
var apiRouterApi = v1.ApiGroupApp.SystemApiGroup.SystemApiApi var apiRouterApi = v1.ApiGroupApp.SystemApiGroup.SystemApiApi
{ {
apiRouter.POST("createApi", apiRouterApi.CreateApi) // 创建Api apiRouter.POST("createApi", apiRouterApi.CreateApi) // 创建Api
apiRouter.POST("deleteApi", apiRouterApi.DeleteApi) // 删除Api apiRouter.POST("deleteApi", apiRouterApi.DeleteApi) // 删除Api
apiRouter.POST("getApiList", apiRouterApi.GetApiList) // 获取Api列表
apiRouter.POST("getApiById", apiRouterApi.GetApiById) // 获取单条Api消息 apiRouter.POST("getApiById", apiRouterApi.GetApiById) // 获取单条Api消息
apiRouter.POST("updateApi", apiRouterApi.UpdateApi) // 更新api apiRouter.POST("updateApi", apiRouterApi.UpdateApi) // 更新api
apiRouter.POST("getAllApis", apiRouterApi.GetAllApis) // 获取所有api
apiRouter.DELETE("deleteApisByIds", apiRouterApi.DeleteApisByIds) // 删除选中api apiRouter.DELETE("deleteApisByIds", apiRouterApi.DeleteApisByIds) // 删除选中api
} }
{
apiRouterWithoutRecord.POST("getAllApis", apiRouterApi.GetAllApis) // 获取所有api
apiRouterWithoutRecord.POST("getApiList", apiRouterApi.GetApiList) // 获取Api列表
}
} }
...@@ -11,13 +11,16 @@ type AuthorityRouter struct { ...@@ -11,13 +11,16 @@ type AuthorityRouter struct {
func (s *AuthorityRouter) InitAuthorityRouter(Router *gin.RouterGroup) { func (s *AuthorityRouter) InitAuthorityRouter(Router *gin.RouterGroup) {
authorityRouter := Router.Group("authority").Use(middleware.OperationRecord()) authorityRouter := Router.Group("authority").Use(middleware.OperationRecord())
authorityRouterWithoutRecord := Router.Group("authority")
var authorityApi = v1.ApiGroupApp.SystemApiGroup.AuthorityApi var authorityApi = v1.ApiGroupApp.SystemApiGroup.AuthorityApi
{ {
authorityRouter.POST("createAuthority", authorityApi.CreateAuthority) // 创建角色 authorityRouter.POST("createAuthority", authorityApi.CreateAuthority) // 创建角色
authorityRouter.POST("deleteAuthority", authorityApi.DeleteAuthority) // 删除角色 authorityRouter.POST("deleteAuthority", authorityApi.DeleteAuthority) // 删除角色
authorityRouter.PUT("updateAuthority", authorityApi.UpdateAuthority) // 更新角色 authorityRouter.PUT("updateAuthority", authorityApi.UpdateAuthority) // 更新角色
authorityRouter.POST("copyAuthority", authorityApi.CopyAuthority) // 更新角色 authorityRouter.POST("copyAuthority", authorityApi.CopyAuthority) // 拷贝角色
authorityRouter.POST("getAuthorityList", authorityApi.GetAuthorityList) // 获取角色列表
authorityRouter.POST("setDataAuthority", authorityApi.SetDataAuthority) // 设置角色资源权限 authorityRouter.POST("setDataAuthority", authorityApi.SetDataAuthority) // 设置角色资源权限
} }
{
authorityRouterWithoutRecord.POST("getAuthorityList", authorityApi.GetAuthorityList) // 获取角色列表
}
} }
...@@ -11,9 +11,12 @@ type CasbinRouter struct { ...@@ -11,9 +11,12 @@ type CasbinRouter struct {
func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) { func (s *CasbinRouter) InitCasbinRouter(Router *gin.RouterGroup) {
casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord()) casbinRouter := Router.Group("casbin").Use(middleware.OperationRecord())
casbinRouterWithoutRecord := Router.Group("casbin")
var casbinApi = v1.ApiGroupApp.SystemApiGroup.CasbinApi var casbinApi = v1.ApiGroupApp.SystemApiGroup.CasbinApi
{ {
casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin) casbinRouter.POST("updateCasbin", casbinApi.UpdateCasbin)
casbinRouter.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId) }
{
casbinRouterWithoutRecord.POST("getPolicyPathByAuthorityId", casbinApi.GetPolicyPathByAuthorityId)
} }
} }
...@@ -11,12 +11,15 @@ type DictionaryRouter struct { ...@@ -11,12 +11,15 @@ type DictionaryRouter struct {
func (s *DictionaryRouter) InitSysDictionaryRouter(Router *gin.RouterGroup) { func (s *DictionaryRouter) InitSysDictionaryRouter(Router *gin.RouterGroup) {
sysDictionaryRouter := Router.Group("sysDictionary").Use(middleware.OperationRecord()) sysDictionaryRouter := Router.Group("sysDictionary").Use(middleware.OperationRecord())
sysDictionaryRouterWithoutRecord := Router.Group("sysDictionary")
var sysDictionaryApi = v1.ApiGroupApp.SystemApiGroup.DictionaryApi var sysDictionaryApi = v1.ApiGroupApp.SystemApiGroup.DictionaryApi
{ {
sysDictionaryRouter.POST("createSysDictionary", sysDictionaryApi.CreateSysDictionary) // 新建SysDictionary sysDictionaryRouter.POST("createSysDictionary", sysDictionaryApi.CreateSysDictionary) // 新建SysDictionary
sysDictionaryRouter.DELETE("deleteSysDictionary", sysDictionaryApi.DeleteSysDictionary) // 删除SysDictionary sysDictionaryRouter.DELETE("deleteSysDictionary", sysDictionaryApi.DeleteSysDictionary) // 删除SysDictionary
sysDictionaryRouter.PUT("updateSysDictionary", sysDictionaryApi.UpdateSysDictionary) // 更新SysDictionary sysDictionaryRouter.PUT("updateSysDictionary", sysDictionaryApi.UpdateSysDictionary) // 更新SysDictionary
sysDictionaryRouter.GET("findSysDictionary", sysDictionaryApi.FindSysDictionary) // 根据ID获取SysDictionary }
sysDictionaryRouter.GET("getSysDictionaryList", sysDictionaryApi.GetSysDictionaryList) // 获取SysDictionary列表 {
sysDictionaryRouterWithoutRecord.GET("findSysDictionary", sysDictionaryApi.FindSysDictionary) // 根据ID获取SysDictionary
sysDictionaryRouterWithoutRecord.GET("getSysDictionaryList", sysDictionaryApi.GetSysDictionaryList) // 获取SysDictionary列表
} }
} }
...@@ -11,12 +11,15 @@ type DictionaryDetailRouter struct { ...@@ -11,12 +11,15 @@ type DictionaryDetailRouter struct {
func (s *DictionaryDetailRouter) InitSysDictionaryDetailRouter(Router *gin.RouterGroup) { func (s *DictionaryDetailRouter) InitSysDictionaryDetailRouter(Router *gin.RouterGroup) {
dictionaryDetailRouter := Router.Group("sysDictionaryDetail").Use(middleware.OperationRecord()) dictionaryDetailRouter := Router.Group("sysDictionaryDetail").Use(middleware.OperationRecord())
dictionaryDetailRouterWithoutRecord := Router.Group("sysDictionaryDetail")
var sysDictionaryDetailApi = v1.ApiGroupApp.SystemApiGroup.DictionaryDetailApi var sysDictionaryDetailApi = v1.ApiGroupApp.SystemApiGroup.DictionaryDetailApi
{ {
dictionaryDetailRouter.POST("createSysDictionaryDetail", sysDictionaryDetailApi.CreateSysDictionaryDetail) // 新建SysDictionaryDetail dictionaryDetailRouter.POST("createSysDictionaryDetail", sysDictionaryDetailApi.CreateSysDictionaryDetail) // 新建SysDictionaryDetail
dictionaryDetailRouter.DELETE("deleteSysDictionaryDetail", sysDictionaryDetailApi.DeleteSysDictionaryDetail) // 删除SysDictionaryDetail dictionaryDetailRouter.DELETE("deleteSysDictionaryDetail", sysDictionaryDetailApi.DeleteSysDictionaryDetail) // 删除SysDictionaryDetail
dictionaryDetailRouter.PUT("updateSysDictionaryDetail", sysDictionaryDetailApi.UpdateSysDictionaryDetail) // 更新SysDictionaryDetail dictionaryDetailRouter.PUT("updateSysDictionaryDetail", sysDictionaryDetailApi.UpdateSysDictionaryDetail) // 更新SysDictionaryDetail
dictionaryDetailRouter.GET("findSysDictionaryDetail", sysDictionaryDetailApi.FindSysDictionaryDetail) // 根据ID获取SysDictionaryDetail }
dictionaryDetailRouter.GET("getSysDictionaryDetailList", sysDictionaryDetailApi.GetSysDictionaryDetailList) // 获取SysDictionaryDetail列表 {
dictionaryDetailRouterWithoutRecord.GET("findSysDictionaryDetail", sysDictionaryDetailApi.FindSysDictionaryDetail) // 根据ID获取SysDictionaryDetail
dictionaryDetailRouterWithoutRecord.GET("getSysDictionaryDetailList", sysDictionaryDetailApi.GetSysDictionaryDetailList) // 获取SysDictionaryDetail列表
} }
} }
...@@ -2,7 +2,6 @@ package system ...@@ -2,7 +2,6 @@ package system
import ( import (
v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1" v1 "github.com/flipped-aurora/gin-vue-admin/server/api/v1"
"github.com/flipped-aurora/gin-vue-admin/server/middleware"
"github.com/gin-gonic/gin" "github.com/gin-gonic/gin"
) )
...@@ -10,7 +9,7 @@ type JwtRouter struct { ...@@ -10,7 +9,7 @@ type JwtRouter struct {
} }
func (s *JwtRouter) InitJwtRouter(Router *gin.RouterGroup) { func (s *JwtRouter) InitJwtRouter(Router *gin.RouterGroup) {
jwtRouter := Router.Group("jwt").Use(middleware.OperationRecord()) jwtRouter := Router.Group("jwt")
var jwtApi = v1.ApiGroupApp.SystemApiGroup.JwtApi var jwtApi = v1.ApiGroupApp.SystemApiGroup.JwtApi
{ {
jwtRouter.POST("jsonInBlacklist", jwtApi.JsonInBlacklist) // jwt加入黑名单 jwtRouter.POST("jsonInBlacklist", jwtApi.JsonInBlacklist) // jwt加入黑名单
......
...@@ -11,17 +11,20 @@ type MenuRouter struct { ...@@ -11,17 +11,20 @@ type MenuRouter struct {
func (s *MenuRouter) InitMenuRouter(Router *gin.RouterGroup) (R gin.IRoutes) { func (s *MenuRouter) InitMenuRouter(Router *gin.RouterGroup) (R gin.IRoutes) {
menuRouter := Router.Group("menu").Use(middleware.OperationRecord()) menuRouter := Router.Group("menu").Use(middleware.OperationRecord())
menuRouterWithoutRecord := Router.Group("menu")
var authorityMenuApi = v1.ApiGroupApp.SystemApiGroup.AuthorityMenuApi var authorityMenuApi = v1.ApiGroupApp.SystemApiGroup.AuthorityMenuApi
{ {
menuRouter.POST("getMenu", authorityMenuApi.GetMenu) // 获取菜单树
menuRouter.POST("getMenuList", authorityMenuApi.GetMenuList) // 分页获取基础menu列表
menuRouter.POST("addBaseMenu", authorityMenuApi.AddBaseMenu) // 新增菜单 menuRouter.POST("addBaseMenu", authorityMenuApi.AddBaseMenu) // 新增菜单
menuRouter.POST("getBaseMenuTree", authorityMenuApi.GetBaseMenuTree) // 获取用户动态路由
menuRouter.POST("addMenuAuthority", authorityMenuApi.AddMenuAuthority) // 增加menu和角色关联关系 menuRouter.POST("addMenuAuthority", authorityMenuApi.AddMenuAuthority) // 增加menu和角色关联关系
menuRouter.POST("getMenuAuthority", authorityMenuApi.GetMenuAuthority) // 获取指定角色menu
menuRouter.POST("deleteBaseMenu", authorityMenuApi.DeleteBaseMenu) // 删除菜单 menuRouter.POST("deleteBaseMenu", authorityMenuApi.DeleteBaseMenu) // 删除菜单
menuRouter.POST("updateBaseMenu", authorityMenuApi.UpdateBaseMenu) // 更新菜单 menuRouter.POST("updateBaseMenu", authorityMenuApi.UpdateBaseMenu) // 更新菜单
menuRouter.POST("getBaseMenuById", authorityMenuApi.GetBaseMenuById) // 根据id获取菜单 }
{
menuRouterWithoutRecord.POST("getMenu", authorityMenuApi.GetMenu) // 获取菜单树
menuRouterWithoutRecord.POST("getMenuList", authorityMenuApi.GetMenuList) // 分页获取基础menu列表
menuRouterWithoutRecord.POST("getBaseMenuTree", authorityMenuApi.GetBaseMenuTree) // 获取用户动态路由
menuRouterWithoutRecord.POST("getMenuAuthority", authorityMenuApi.GetMenuAuthority) // 获取指定角色menu
menuRouterWithoutRecord.POST("getBaseMenuById", authorityMenuApi.GetBaseMenuById) // 根据id获取菜单
} }
return menuRouter return menuRouter
} }
...@@ -11,15 +11,18 @@ type UserRouter struct { ...@@ -11,15 +11,18 @@ type UserRouter struct {
func (s *UserRouter) InitUserRouter(Router *gin.RouterGroup) { func (s *UserRouter) InitUserRouter(Router *gin.RouterGroup) {
userRouter := Router.Group("user").Use(middleware.OperationRecord()) userRouter := Router.Group("user").Use(middleware.OperationRecord())
userRouterWithoutRecord := Router.Group("user")
var baseApi = v1.ApiGroupApp.SystemApiGroup.BaseApi var baseApi = v1.ApiGroupApp.SystemApiGroup.BaseApi
{ {
userRouter.POST("register", baseApi.Register) // 用户注册账号 userRouter.POST("register", baseApi.Register) // 用户注册账号
userRouter.POST("changePassword", baseApi.ChangePassword) // 用户修改密码 userRouter.POST("changePassword", baseApi.ChangePassword) // 用户修改密码
userRouter.POST("getUserList", baseApi.GetUserList) // 分页获取用户列表
userRouter.POST("setUserAuthority", baseApi.SetUserAuthority) // 设置用户权限 userRouter.POST("setUserAuthority", baseApi.SetUserAuthority) // 设置用户权限
userRouter.DELETE("deleteUser", baseApi.DeleteUser) // 删除用户 userRouter.DELETE("deleteUser", baseApi.DeleteUser) // 删除用户
userRouter.PUT("setUserInfo", baseApi.SetUserInfo) // 设置用户信息 userRouter.PUT("setUserInfo", baseApi.SetUserInfo) // 设置用户信息
userRouter.POST("setUserAuthorities", baseApi.SetUserAuthorities) // 设置用户权限组 userRouter.POST("setUserAuthorities", baseApi.SetUserAuthorities) // 设置用户权限组
userRouter.GET("getUserInfo", baseApi.GetUserInfo) // 获取自身信息 }
{
userRouterWithoutRecord.POST("getUserList", baseApi.GetUserList) // 分页获取用户列表
userRouterWithoutRecord.GET("getUserInfo", baseApi.GetUserInfo) // 获取自身信息
} }
} }
...@@ -62,9 +62,9 @@ func (e *FileUploadAndDownloadService) DeleteFile(file example.ExaFileUploadAndD ...@@ -62,9 +62,9 @@ func (e *FileUploadAndDownloadService) DeleteFile(file example.ExaFileUploadAndD
func (e *FileUploadAndDownloadService) GetFileRecordInfoList(info request.PageInfo) (err error, list interface{}, total int64) { func (e *FileUploadAndDownloadService) GetFileRecordInfoList(info request.PageInfo) (err error, list interface{}, total int64) {
limit := info.PageSize limit := info.PageSize
offset := info.PageSize * (info.Page - 1) offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB db := global.GVA_DB.Model(&example.ExaFileUploadAndDownload{})
var fileLists []example.ExaFileUploadAndDownload var fileLists []example.ExaFileUploadAndDownload
err = db.Find(&fileLists).Count(&total).Error err = db.Count(&total).Error
if err != nil { if err != nil {
return return
} }
......
...@@ -108,9 +108,9 @@ func (autoCodeHistoryService *AutoCodeHistoryService) GetMeta(id uint) (string, ...@@ -108,9 +108,9 @@ func (autoCodeHistoryService *AutoCodeHistoryService) GetMeta(id uint) (string,
func (autoCodeHistoryService *AutoCodeHistoryService) GetSysHistoryPage(info request.PageInfo) (err error, list interface{}, total int64) { func (autoCodeHistoryService *AutoCodeHistoryService) GetSysHistoryPage(info request.PageInfo) (err error, list interface{}, total int64) {
limit := info.PageSize limit := info.PageSize
offset := info.PageSize * (info.Page - 1) offset := info.PageSize * (info.Page - 1)
db := global.GVA_DB db := global.GVA_DB.Model(&system.SysAutoCodeHistory{})
var fileLists []system.SysAutoCodeHistory var fileLists []system.SysAutoCodeHistory
err = db.Find(&fileLists).Count(&total).Error err = db.Count(&total).Error
if err != nil { if err != nil {
return return
} }
......
...@@ -39,7 +39,7 @@ func (casbinService *CasbinService) UpdateCasbin(authorityId string, casbinInfos ...@@ -39,7 +39,7 @@ func (casbinService *CasbinService) UpdateCasbin(authorityId string, casbinInfos
} }
e := casbinService.Casbin() e := casbinService.Casbin()
success, _ := e.AddPolicies(rules) success, _ := e.AddPolicies(rules)
if success == false { if !success {
return errors.New("存在相同api,添加失败,请联系管理员") return errors.New("存在相同api,添加失败,请联系管理员")
} }
return nil return nil
......
...@@ -20,7 +20,7 @@ var menus = []system.SysBaseMenu{ ...@@ -20,7 +20,7 @@ var menus = []system.SysBaseMenu{
{GVA_MODEL: global.GVA_MODEL{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "admin", Name: "superAdmin", Component: "view/superAdmin/index.vue", Sort: 3, Meta: system.Meta{Title: "超级管理员", Icon: "user-solid"}}, {GVA_MODEL: global.GVA_MODEL{ID: 3, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "admin", Name: "superAdmin", Component: "view/superAdmin/index.vue", Sort: 3, Meta: system.Meta{Title: "超级管理员", Icon: "user-solid"}},
{GVA_MODEL: global.GVA_MODEL{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "authority", Name: "authority", Component: "view/superAdmin/authority/authority.vue", Sort: 1, Meta: system.Meta{Title: "角色管理", Icon: "s-custom"}}, {GVA_MODEL: global.GVA_MODEL{ID: 4, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "authority", Name: "authority", Component: "view/superAdmin/authority/authority.vue", Sort: 1, Meta: system.Meta{Title: "角色管理", Icon: "s-custom"}},
{GVA_MODEL: global.GVA_MODEL{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "menu", Name: "menu", Component: "view/superAdmin/menu/menu.vue", Sort: 2, Meta: system.Meta{Title: "菜单管理", Icon: "s-order", KeepAlive: true}}, {GVA_MODEL: global.GVA_MODEL{ID: 5, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "menu", Name: "menu", Component: "view/superAdmin/menu/menu.vue", Sort: 2, Meta: system.Meta{Title: "菜单管理", Icon: "s-order", KeepAlive: true}},
{GVA_MODEL: global.GVA_MODEL{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "api", Name: "api", Component: "view/superAdmin/api/api.vue", Sort: 3, Meta: system.Meta{Title: "api管理", Icon: "s-platform", KeepAlive: true}}, {GVA_MODEL: global.GVA_MODEL{ID: 6, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "api", Name: "api", Component: "view/superAdmin/api/api.vue", Sort: 3, Meta: system.Meta{Title: "API管理", Icon: "s-platform", KeepAlive: true}},
{GVA_MODEL: global.GVA_MODEL{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "user", Name: "user", Component: "view/superAdmin/user/user.vue", Sort: 4, Meta: system.Meta{Title: "用户管理", Icon: "coordinate"}}, {GVA_MODEL: global.GVA_MODEL{ID: 7, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "3", Path: "user", Name: "user", Component: "view/superAdmin/user/user.vue", Sort: 4, Meta: system.Meta{Title: "用户管理", Icon: "coordinate"}},
{GVA_MODEL: global.GVA_MODEL{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: true, ParentId: "0", Path: "person", Name: "person", Component: "view/person/person.vue", Sort: 4, Meta: system.Meta{Title: "个人信息", Icon: "message-solid"}}, {GVA_MODEL: global.GVA_MODEL{ID: 8, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: true, ParentId: "0", Path: "person", Name: "person", Component: "view/person/person.vue", Sort: 4, Meta: system.Meta{Title: "个人信息", Icon: "message-solid"}},
{GVA_MODEL: global.GVA_MODEL{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "example", Name: "example", Component: "view/example/index.vue", Sort: 6, Meta: system.Meta{Title: "示例文件", Icon: "s-management"}}, {GVA_MODEL: global.GVA_MODEL{ID: 9, CreatedAt: time.Now(), UpdatedAt: time.Now()}, MenuLevel: 0, Hidden: false, ParentId: "0", Path: "example", Name: "example", Component: "view/example/index.vue", Sort: 6, Meta: system.Meta{Title: "示例文件", Icon: "s-management"}},
......
...@@ -2662,8 +2662,7 @@ ...@@ -2662,8 +2662,7 @@
"balanced-match": { "balanced-match": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz", "resolved": "https://registry.npm.taobao.org/balanced-match/download/balanced-match-1.0.2.tgz?cache=0&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fbalanced-match%2Fdownload%2Fbalanced-match-1.0.2.tgz",
"integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4=", "integrity": "sha1-6D46fj8wCzTLnYf2FfoMvzV2kO4="
"dev": true
}, },
"base": { "base": {
"version": "0.11.2", "version": "0.11.2",
...@@ -2723,8 +2722,7 @@ ...@@ -2723,8 +2722,7 @@
"base64-js": { "base64-js": {
"version": "1.5.1", "version": "1.5.1",
"resolved": "https://registry.npm.taobao.org/base64-js/download/base64-js-1.5.1.tgz", "resolved": "https://registry.npm.taobao.org/base64-js/download/base64-js-1.5.1.tgz",
"integrity": "sha1-GxtEAWClv3rUC2UPCVljSBkDkwo=", "integrity": "sha1-GxtEAWClv3rUC2UPCVljSBkDkwo="
"dev": true
}, },
"batch": { "batch": {
"version": "0.6.1", "version": "0.6.1",
...@@ -2775,6 +2773,37 @@ ...@@ -2775,6 +2773,37 @@
"file-uri-to-path": "1.0.0" "file-uri-to-path": "1.0.0"
} }
}, },
"bl": {
"version": "4.1.0",
"resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz",
"integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==",
"requires": {
"buffer": "^5.5.0",
"inherits": "^2.0.4",
"readable-stream": "^3.4.0"
},
"dependencies": {
"buffer": {
"version": "5.7.1",
"resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz",
"integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==",
"requires": {
"base64-js": "^1.3.1",
"ieee754": "^1.1.13"
}
},
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"bluebird": { "bluebird": {
"version": "3.7.2", "version": "3.7.2",
"resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz", "resolved": "https://registry.npm.taobao.org/bluebird/download/bluebird-3.7.2.tgz",
...@@ -2860,7 +2889,6 @@ ...@@ -2860,7 +2889,6 @@
"version": "1.1.11", "version": "1.1.11",
"resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz", "resolved": "https://registry.npm.taobao.org/brace-expansion/download/brace-expansion-1.1.11.tgz",
"integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=", "integrity": "sha1-PH/L9SnYcibz0vUrlm/1Jx60Qd0=",
"dev": true,
"requires": { "requires": {
"balanced-match": "^1.0.0", "balanced-match": "^1.0.0",
"concat-map": "0.0.1" "concat-map": "0.0.1"
...@@ -3020,8 +3048,7 @@ ...@@ -3020,8 +3048,7 @@
"buffer-from": { "buffer-from": {
"version": "1.1.2", "version": "1.1.2",
"resolved": "https://registry.nlark.com/buffer-from/download/buffer-from-1.1.2.tgz", "resolved": "https://registry.nlark.com/buffer-from/download/buffer-from-1.1.2.tgz",
"integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U=", "integrity": "sha1-KxRqb9cugLT1XSVfNe1Zo6mkG9U="
"dev": true
}, },
"buffer-indexof": { "buffer-indexof": {
"version": "1.1.1", "version": "1.1.1",
...@@ -3584,6 +3611,15 @@ ...@@ -3584,6 +3611,15 @@
"integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=", "integrity": "sha1-/UhehMA+tIgcIHIrpIA16FMa6zM=",
"dev": true "dev": true
}, },
"commist": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/commist/-/commist-1.1.0.tgz",
"integrity": "sha512-rraC8NXWOEjhADbZe9QBNzLAN5Q3fsTPQtBV+fEVj6xKIgDgNiEVE6ZNfHpZOqfQ21YUzfVNUXLOEZquYvQPPg==",
"requires": {
"leven": "^2.1.0",
"minimist": "^1.1.0"
}
},
"commondir": { "commondir": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/commondir/download/commondir-1.0.1.tgz",
...@@ -3646,8 +3682,7 @@ ...@@ -3646,8 +3682,7 @@
"concat-map": { "concat-map": {
"version": "0.0.1", "version": "0.0.1",
"resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz", "resolved": "https://registry.npm.taobao.org/concat-map/download/concat-map-0.0.1.tgz",
"integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s=", "integrity": "sha1-2Klr13/Wjfd5OnMDajug1UBdR3s="
"dev": true
}, },
"concat-stream": { "concat-stream": {
"version": "1.6.2", "version": "1.6.2",
...@@ -4834,7 +4869,6 @@ ...@@ -4834,7 +4869,6 @@
"version": "1.4.4", "version": "1.4.4",
"resolved": "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz", "resolved": "https://registry.npm.taobao.org/end-of-stream/download/end-of-stream-1.4.4.tgz",
"integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=", "integrity": "sha1-WuZKX0UFe682JuwU2gyl5LJDHrA=",
"dev": true,
"requires": { "requires": {
"once": "^1.4.0" "once": "^1.4.0"
} }
...@@ -5781,8 +5815,7 @@ ...@@ -5781,8 +5815,7 @@
"fs.realpath": { "fs.realpath": {
"version": "1.0.0", "version": "1.0.0",
"resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz", "resolved": "https://registry.npm.taobao.org/fs.realpath/download/fs.realpath-1.0.0.tgz",
"integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8=", "integrity": "sha1-FQStJSMVjKpA20onh8sBQRmU6k8="
"dev": true
}, },
"fsevents": { "fsevents": {
"version": "2.3.2", "version": "2.3.2",
...@@ -5861,7 +5894,6 @@ ...@@ -5861,7 +5894,6 @@
"version": "7.1.7", "version": "7.1.7",
"resolved": "https://registry.nlark.com/glob/download/glob-7.1.7.tgz", "resolved": "https://registry.nlark.com/glob/download/glob-7.1.7.tgz",
"integrity": "sha1-Oxk+kjPwHULQs/eClLvutBj5SpA=", "integrity": "sha1-Oxk+kjPwHULQs/eClLvutBj5SpA=",
"dev": true,
"requires": { "requires": {
"fs.realpath": "^1.0.0", "fs.realpath": "^1.0.0",
"inflight": "^1.0.4", "inflight": "^1.0.4",
...@@ -6063,6 +6095,27 @@ ...@@ -6063,6 +6095,27 @@
"integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=", "integrity": "sha1-hK5l+n6vsWX922FWauFLrwVmTw8=",
"dev": true "dev": true
}, },
"help-me": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/help-me/-/help-me-3.0.0.tgz",
"integrity": "sha512-hx73jClhyk910sidBB7ERlnhMlFsJJIBqSVMFDwPN8o2v9nmp5KgLq1Xz1Bf1fCMMZ6mPrX159iG0VLy/fPMtQ==",
"requires": {
"glob": "^7.1.6",
"readable-stream": "^3.6.0"
},
"dependencies": {
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"hex-color-regex": { "hex-color-regex": {
"version": "1.1.0", "version": "1.1.0",
"resolved": "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz", "resolved": "https://registry.npm.taobao.org/hex-color-regex/download/hex-color-regex-1.1.0.tgz",
...@@ -6407,8 +6460,7 @@ ...@@ -6407,8 +6460,7 @@
"ieee754": { "ieee754": {
"version": "1.2.1", "version": "1.2.1",
"resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.2.1.tgz?cache=0&sync_timestamp=1603841204911&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fieee754%2Fdownload%2Fieee754-1.2.1.tgz", "resolved": "https://registry.npm.taobao.org/ieee754/download/ieee754-1.2.1.tgz?cache=0&sync_timestamp=1603841204911&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fieee754%2Fdownload%2Fieee754-1.2.1.tgz",
"integrity": "sha1-jrehCmP/8l0VpXsAFYbRd9Gw01I=", "integrity": "sha1-jrehCmP/8l0VpXsAFYbRd9Gw01I="
"dev": true
}, },
"iferr": { "iferr": {
"version": "0.1.5", "version": "0.1.5",
...@@ -6527,7 +6579,6 @@ ...@@ -6527,7 +6579,6 @@
"version": "1.0.6", "version": "1.0.6",
"resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz", "resolved": "https://registry.npm.taobao.org/inflight/download/inflight-1.0.6.tgz",
"integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=", "integrity": "sha1-Sb1jMdfQLQwJvJEKEHW6gWW1bfk=",
"dev": true,
"requires": { "requires": {
"once": "^1.3.0", "once": "^1.3.0",
"wrappy": "1" "wrappy": "1"
...@@ -6536,8 +6587,7 @@ ...@@ -6536,8 +6587,7 @@
"inherits": { "inherits": {
"version": "2.0.4", "version": "2.0.4",
"resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz?cache=0&sync_timestamp=1560975547815&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finherits%2Fdownload%2Finherits-2.0.4.tgz", "resolved": "https://registry.npm.taobao.org/inherits/download/inherits-2.0.4.tgz?cache=0&sync_timestamp=1560975547815&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Finherits%2Fdownload%2Finherits-2.0.4.tgz",
"integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w=", "integrity": "sha1-D6LGT5MpF8NDOg3tVTY6rjdBa3w="
"dev": true
}, },
"inquirer": { "inquirer": {
"version": "7.3.3", "version": "7.3.3",
...@@ -7208,6 +7258,11 @@ ...@@ -7208,6 +7258,11 @@
"launch-editor": "^2.2.1" "launch-editor": "^2.2.1"
} }
}, },
"leven": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/leven/-/leven-2.1.0.tgz",
"integrity": "sha1-wuep93IJTe6dNCAq6KzORoeHVYA="
},
"levn": { "levn": {
"version": "0.3.0", "version": "0.3.0",
"resolved": "https://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz", "resolved": "https://registry.npm.taobao.org/levn/download/levn-0.3.0.tgz",
...@@ -7626,7 +7681,6 @@ ...@@ -7626,7 +7681,6 @@
"version": "3.0.4", "version": "3.0.4",
"resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz", "resolved": "https://registry.npm.taobao.org/minimatch/download/minimatch-3.0.4.tgz",
"integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=", "integrity": "sha1-UWbihkV/AzBgZL5Ul+jbsMPTIIM=",
"dev": true,
"requires": { "requires": {
"brace-expansion": "^1.1.7" "brace-expansion": "^1.1.7"
} }
...@@ -7634,8 +7688,7 @@ ...@@ -7634,8 +7688,7 @@
"minimist": { "minimist": {
"version": "1.2.5", "version": "1.2.5",
"resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&sync_timestamp=1584051509720&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz", "resolved": "https://registry.npm.taobao.org/minimist/download/minimist-1.2.5.tgz?cache=0&sync_timestamp=1584051509720&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fminimist%2Fdownload%2Fminimist-1.2.5.tgz",
"integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI=", "integrity": "sha1-Z9ZgFLZqaoqqDAg8X9WN9OTpdgI="
"dev": true
}, },
"minipass": { "minipass": {
"version": "3.1.3", "version": "3.1.3",
...@@ -7721,6 +7774,76 @@ ...@@ -7721,6 +7774,76 @@
"run-queue": "^1.0.3" "run-queue": "^1.0.3"
} }
}, },
"mqtt": {
"version": "4.2.8",
"resolved": "https://registry.npmjs.org/mqtt/-/mqtt-4.2.8.tgz",
"integrity": "sha512-DJYjlXODVXtSDecN8jnNzi6ItX3+ufGsEs9OB3YV24HtkRrh7kpx8L5M1LuyF0KzaiGtWr2PzDcMGAY60KGOSA==",
"requires": {
"commist": "^1.0.0",
"concat-stream": "^2.0.0",
"debug": "^4.1.1",
"duplexify": "^4.1.1",
"help-me": "^3.0.0",
"inherits": "^2.0.3",
"minimist": "^1.2.5",
"mqtt-packet": "^6.8.0",
"pump": "^3.0.0",
"readable-stream": "^3.6.0",
"reinterval": "^1.1.0",
"split2": "^3.1.0",
"ws": "^7.5.0",
"xtend": "^4.0.2"
},
"dependencies": {
"concat-stream": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/concat-stream/-/concat-stream-2.0.0.tgz",
"integrity": "sha512-MWufYdFw53ccGjCA+Ol7XJYpAlW6/prSMzuPOTRnJGcGzuhLn4Scrz7qf6o8bROZ514ltazcIFJZevcfbo0x7A==",
"requires": {
"buffer-from": "^1.0.0",
"inherits": "^2.0.3",
"readable-stream": "^3.0.2",
"typedarray": "^0.0.6"
}
},
"duplexify": {
"version": "4.1.2",
"resolved": "https://registry.npmjs.org/duplexify/-/duplexify-4.1.2.tgz",
"integrity": "sha512-fz3OjcNCHmRP12MJoZMPglx8m4rrFP8rovnk4vT8Fs+aonZoCwGg10dSsQsfP/E62eZcPTMSMP6686fu9Qlqtw==",
"requires": {
"end-of-stream": "^1.4.1",
"inherits": "^2.0.3",
"readable-stream": "^3.1.1",
"stream-shift": "^1.0.0"
}
},
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
},
"ws": {
"version": "7.5.5",
"resolved": "https://registry.npmjs.org/ws/-/ws-7.5.5.tgz",
"integrity": "sha512-BAkMFcAzl8as1G/hArkxOxq3G7pjUqQ3gzYbLL0/5zNkph70e+lCoxBGnm6AW1+/aiNeV4fnKqZ8m4GZewmH2w=="
}
}
},
"mqtt-packet": {
"version": "6.10.0",
"resolved": "https://registry.npmjs.org/mqtt-packet/-/mqtt-packet-6.10.0.tgz",
"integrity": "sha512-ja8+mFKIHdB1Tpl6vac+sktqy3gA8t9Mduom1BA75cI+R9AHnZOiaBQwpGiWnaVJLDGRdNhQmFaAqd7tkKSMGA==",
"requires": {
"bl": "^4.0.2",
"debug": "^4.1.1",
"process-nextick-args": "^2.0.1"
}
},
"ms": { "ms": {
"version": "2.1.2", "version": "2.1.2",
"resolved": "https://registry.nlark.com/ms/download/ms-2.1.2.tgz", "resolved": "https://registry.nlark.com/ms/download/ms-2.1.2.tgz",
...@@ -8098,7 +8221,6 @@ ...@@ -8098,7 +8221,6 @@
"version": "1.4.0", "version": "1.4.0",
"resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz", "resolved": "https://registry.npm.taobao.org/once/download/once-1.4.0.tgz",
"integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=", "integrity": "sha1-WDsap3WWHUsROsF9nFC6753Xa9E=",
"dev": true,
"requires": { "requires": {
"wrappy": "1" "wrappy": "1"
} }
...@@ -8394,8 +8516,7 @@ ...@@ -8394,8 +8516,7 @@
"path-is-absolute": { "path-is-absolute": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/path-is-absolute/download/path-is-absolute-1.0.1.tgz",
"integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18=", "integrity": "sha1-F0uSaHNVNP+8es5r9TpanhtcX18="
"dev": true
}, },
"path-is-inside": { "path-is-inside": {
"version": "1.0.2", "version": "1.0.2",
...@@ -9208,8 +9329,7 @@ ...@@ -9208,8 +9329,7 @@
"process-nextick-args": { "process-nextick-args": {
"version": "2.0.1", "version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz", "resolved": "https://registry.npm.taobao.org/process-nextick-args/download/process-nextick-args-2.0.1.tgz",
"integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I=", "integrity": "sha1-eCDZsWEgzFXKmud5JoCufbptf+I="
"dev": true
}, },
"progress": { "progress": {
"version": "2.0.3", "version": "2.0.3",
...@@ -9277,7 +9397,6 @@ ...@@ -9277,7 +9397,6 @@
"version": "3.0.0", "version": "3.0.0",
"resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz", "resolved": "https://registry.npm.taobao.org/pump/download/pump-3.0.0.tgz",
"integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=", "integrity": "sha1-tKIRaBW94vTh6mAjVOjHVWUQemQ=",
"dev": true,
"requires": { "requires": {
"end-of-stream": "^1.1.0", "end-of-stream": "^1.1.0",
"once": "^1.3.1" "once": "^1.3.1"
...@@ -9554,6 +9673,11 @@ ...@@ -9554,6 +9673,11 @@
} }
} }
}, },
"reinterval": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/reinterval/-/reinterval-1.1.0.tgz",
"integrity": "sha1-M2Hs+jymwYKDOA3Qu5VG85D17Oc="
},
"relateurl": { "relateurl": {
"version": "0.2.7", "version": "0.2.7",
"resolved": "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz", "resolved": "https://registry.npm.taobao.org/relateurl/download/relateurl-0.2.7.tgz",
...@@ -9843,8 +9967,7 @@ ...@@ -9843,8 +9967,7 @@
"safe-buffer": { "safe-buffer": {
"version": "5.1.2", "version": "5.1.2",
"resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1589129010497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz", "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.1.2.tgz?cache=0&sync_timestamp=1589129010497&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fsafe-buffer%2Fdownload%2Fsafe-buffer-5.1.2.tgz",
"integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0=", "integrity": "sha1-mR7GnSluAxN0fVm9/St0XDX4go0="
"dev": true
}, },
"safe-regex": { "safe-regex": {
"version": "1.1.0", "version": "1.1.0",
...@@ -10524,6 +10647,26 @@ ...@@ -10524,6 +10647,26 @@
"extend-shallow": "^3.0.0" "extend-shallow": "^3.0.0"
} }
}, },
"split2": {
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/split2/-/split2-3.2.2.tgz",
"integrity": "sha512-9NThjpgZnifTkJpzTZ7Eue85S49QwpNhZTq6GRJwObb6jnLFNGB7Qm73V5HewTROPyxD0C29xqmaI68bQtV+hg==",
"requires": {
"readable-stream": "^3.0.0"
},
"dependencies": {
"readable-stream": {
"version": "3.6.0",
"resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz",
"integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==",
"requires": {
"inherits": "^2.0.3",
"string_decoder": "^1.1.1",
"util-deprecate": "^1.0.1"
}
}
}
},
"sprintf-js": { "sprintf-js": {
"version": "1.0.3", "version": "1.0.3",
"resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz", "resolved": "https://registry.npm.taobao.org/sprintf-js/download/sprintf-js-1.0.3.tgz",
...@@ -10631,8 +10774,7 @@ ...@@ -10631,8 +10774,7 @@
"stream-shift": { "stream-shift": {
"version": "1.0.1", "version": "1.0.1",
"resolved": "https://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.1.tgz?cache=0&sync_timestamp=1576147178936&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-shift%2Fdownload%2Fstream-shift-1.0.1.tgz", "resolved": "https://registry.npm.taobao.org/stream-shift/download/stream-shift-1.0.1.tgz?cache=0&sync_timestamp=1576147178936&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstream-shift%2Fdownload%2Fstream-shift-1.0.1.tgz",
"integrity": "sha1-1wiCgVWasneEJCebCHfaPDktWj0=", "integrity": "sha1-1wiCgVWasneEJCebCHfaPDktWj0="
"dev": true
}, },
"strict-uri-encode": { "strict-uri-encode": {
"version": "1.1.0", "version": "1.1.0",
...@@ -10681,7 +10823,6 @@ ...@@ -10681,7 +10823,6 @@
"version": "1.1.1", "version": "1.1.1",
"resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz?cache=0&sync_timestamp=1565170823020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring_decoder%2Fdownload%2Fstring_decoder-1.1.1.tgz", "resolved": "https://registry.npm.taobao.org/string_decoder/download/string_decoder-1.1.1.tgz?cache=0&sync_timestamp=1565170823020&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fstring_decoder%2Fdownload%2Fstring_decoder-1.1.1.tgz",
"integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=", "integrity": "sha1-nPFhG6YmhdcDCunkujQUnDrwP8g=",
"dev": true,
"requires": { "requires": {
"safe-buffer": "~5.1.0" "safe-buffer": "~5.1.0"
} }
...@@ -11193,8 +11334,7 @@ ...@@ -11193,8 +11334,7 @@
"typedarray": { "typedarray": {
"version": "0.0.6", "version": "0.0.6",
"resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz", "resolved": "https://registry.npm.taobao.org/typedarray/download/typedarray-0.0.6.tgz",
"integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c=", "integrity": "sha1-hnrHTjhkGHsdPUfZlqeOxciDB3c="
"dev": true
}, },
"uglify-js": { "uglify-js": {
"version": "3.4.10", "version": "3.4.10",
...@@ -11452,8 +11592,7 @@ ...@@ -11452,8 +11592,7 @@
"util-deprecate": { "util-deprecate": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz", "resolved": "https://registry.npm.taobao.org/util-deprecate/download/util-deprecate-1.0.2.tgz",
"integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8=", "integrity": "sha1-RQ1Nyfpw3nMnYvvS1KKJgUGaDM8="
"dev": true
}, },
"util.promisify": { "util.promisify": {
"version": "1.0.1", "version": "1.0.1",
...@@ -12517,8 +12656,7 @@ ...@@ -12517,8 +12656,7 @@
"wrappy": { "wrappy": {
"version": "1.0.2", "version": "1.0.2",
"resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz", "resolved": "https://registry.nlark.com/wrappy/download/wrappy-1.0.2.tgz",
"integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8=", "integrity": "sha1-tSQ9jz7BqjXxNkYFvA0QNuMKtp8="
"dev": true
}, },
"write": { "write": {
"version": "1.0.3", "version": "1.0.3",
...@@ -12541,8 +12679,7 @@ ...@@ -12541,8 +12679,7 @@
"xtend": { "xtend": {
"version": "4.0.2", "version": "4.0.2",
"resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz", "resolved": "https://registry.npm.taobao.org/xtend/download/xtend-4.0.2.tgz",
"integrity": "sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q=", "integrity": "sha1-u3J3n1+kZRhrH0OPZ0+jR/2121Q="
"dev": true
}, },
"y18n": { "y18n": {
"version": "4.0.3", "version": "4.0.3",
......
...@@ -8,6 +8,7 @@ ...@@ -8,6 +8,7 @@
"preview": "vite preview" "preview": "vite preview"
}, },
"dependencies": { "dependencies": {
"@element-plus/icons": "0.0.11",
"axios": "^0.19.2", "axios": "^0.19.2",
"core-js": "^3.6.5", "core-js": "^3.6.5",
"echarts": "4.9.0", "echarts": "4.9.0",
......
...@@ -9,15 +9,15 @@ import service from '@/utils/request' ...@@ -9,15 +9,15 @@ import service from '@/utils/request'
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sysOperationRecord/deleteSysOperationRecord [delete] // @Router /sysOperationRecord/deleteSysOperationRecord [delete]
export const deleteSysOperationRecord = (data) => { export const deleteSysOperationRecord = (data) => {
return service({ return service({
url: '/sysOperationRecord/deleteSysOperationRecord', url: '/sysOperationRecord/deleteSysOperationRecord',
method: 'delete', method: 'delete',
data data
}) })
} }
// @Tags SysOperationRecord // @Tags SysOperationRecord
// @Summary 批量删除SysOperationRecord // @Summary 删除SysOperationRecord
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @accept application/json // @accept application/json
// @Produce application/json // @Produce application/json
...@@ -25,11 +25,11 @@ export const deleteSysOperationRecord = (data) => { ...@@ -25,11 +25,11 @@ export const deleteSysOperationRecord = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /sysOperationRecord/deleteSysOperationRecord [delete] // @Router /sysOperationRecord/deleteSysOperationRecord [delete]
export const deleteSysOperationRecordByIds = (data) => { export const deleteSysOperationRecordByIds = (data) => {
return service({ return service({
url: '/sysOperationRecord/deleteSysOperationRecordByIds', url: '/sysOperationRecord/deleteSysOperationRecordByIds',
method: 'delete', method: 'delete',
data data
}) })
} }
// @Tags SysOperationRecord // @Tags SysOperationRecord
...@@ -41,9 +41,9 @@ export const deleteSysOperationRecordByIds = (data) => { ...@@ -41,9 +41,9 @@ export const deleteSysOperationRecordByIds = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /sysOperationRecord/getSysOperationRecordList [get] // @Router /sysOperationRecord/getSysOperationRecordList [get]
export const getSysOperationRecordList = (params) => { export const getSysOperationRecordList = (params) => {
return service({ return service({
url: '/sysOperationRecord/getSysOperationRecordList', url: '/sysOperationRecord/getSysOperationRecordList',
method: 'get', method: 'get',
params params
}) })
} }
\ No newline at end of file
...@@ -9,11 +9,11 @@ import service from '@/utils/request' ...@@ -9,11 +9,11 @@ import service from '@/utils/request'
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/createWorkflowProcess [post] // @Router /workflowProcess/createWorkflowProcess [post]
export const createWorkflowProcess = (data) => { export const createWorkflowProcess = (data) => {
return service({ return service({
url: '/workflowProcess/createWorkflowProcess', url: '/workflowProcess/createWorkflowProcess',
method: 'post', method: 'post',
data data
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -25,11 +25,11 @@ export const createWorkflowProcess = (data) => { ...@@ -25,11 +25,11 @@ export const createWorkflowProcess = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /workflowProcess/deleteWorkflowProcess [delete] // @Router /workflowProcess/deleteWorkflowProcess [delete]
export const deleteWorkflowProcess = (data) => { export const deleteWorkflowProcess = (data) => {
return service({ return service({
url: '/workflowProcess/deleteWorkflowProcess', url: '/workflowProcess/deleteWorkflowProcess',
method: 'delete', method: 'delete',
data data
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -37,15 +37,15 @@ export const deleteWorkflowProcess = (data) => { ...@@ -37,15 +37,15 @@ export const deleteWorkflowProcess = (data) => {
// @Security ApiKeyAuth // @Security ApiKeyAuth
// @accept application/json // @accept application/json
// @Produce 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":"删除成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"删除成功"}"
// @Router /workflowProcess/deleteWorkflowProcess [delete] // @Router /workflowProcess/deleteWorkflowProcess [delete]
export const deleteWorkflowProcessByIds = (data) => { export const deleteWorkflowProcessByIds = (data) => {
return service({ return service({
url: '/workflowProcess/deleteWorkflowProcessByIds', url: '/workflowProcess/deleteWorkflowProcessByIds',
method: 'delete', method: 'delete',
data data
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -57,11 +57,11 @@ export const deleteWorkflowProcessByIds = (data) => { ...@@ -57,11 +57,11 @@ export const deleteWorkflowProcessByIds = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"更新成功"}"
// @Router /workflowProcess/updateWorkflowProcess [put] // @Router /workflowProcess/updateWorkflowProcess [put]
export const updateWorkflowProcess = (data) => { export const updateWorkflowProcess = (data) => {
return service({ return service({
url: '/workflowProcess/updateWorkflowProcess', url: '/workflowProcess/updateWorkflowProcess',
method: 'put', method: 'put',
data data
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -73,11 +73,11 @@ export const updateWorkflowProcess = (data) => { ...@@ -73,11 +73,11 @@ export const updateWorkflowProcess = (data) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /workflowProcess/findWorkflowProcess [get] // @Router /workflowProcess/findWorkflowProcess [get]
export const findWorkflowProcess = (params) => { export const findWorkflowProcess = (params) => {
return service({ return service({
url: '/workflowProcess/findWorkflowProcess', url: '/workflowProcess/findWorkflowProcess',
method: 'get', method: 'get',
params params
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -89,11 +89,11 @@ export const findWorkflowProcess = (params) => { ...@@ -89,11 +89,11 @@ export const findWorkflowProcess = (params) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getWorkflowProcessList [get] // @Router /workflowProcess/getWorkflowProcessList [get]
export const getWorkflowProcessList = (params) => { export const getWorkflowProcessList = (params) => {
return service({ return service({
url: '/workflowProcess/getWorkflowProcessList', url: '/workflowProcess/getWorkflowProcessList',
method: 'get', method: 'get',
params params
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -105,11 +105,11 @@ export const getWorkflowProcessList = (params) => { ...@@ -105,11 +105,11 @@ export const getWorkflowProcessList = (params) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"查询成功"}"
// @Router /workflowProcess/findWorkflowStep [get] // @Router /workflowProcess/findWorkflowStep [get]
export const findWorkflowStep = (params) => { export const findWorkflowStep = (params) => {
return service({ return service({
url: '/workflowProcess/findWorkflowStep', url: '/workflowProcess/findWorkflowStep',
method: 'get', method: 'get',
params params
}) })
} }
// @Tags ExaWfLeave // @Tags ExaWfLeave
...@@ -120,12 +120,12 @@ export const findWorkflowStep = (params) => { ...@@ -120,12 +120,12 @@ export const findWorkflowStep = (params) => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/startWorkflow [post] // @Router /workflowProcess/startWorkflow [post]
export const startWorkflow = (data, params = { businessType: data.wf.businessType }) => { export const startWorkflow = (data, params = { businessType: data.wf.businessType }) => {
return service({ return service({
url: '/workflowProcess/startWorkflow', url: '/workflowProcess/startWorkflow',
method: 'post', method: 'post',
data, data,
params params
}) })
} }
// @Tags ExaWfLeave // @Tags ExaWfLeave
...@@ -136,12 +136,12 @@ export const startWorkflow = (data, params = { businessType: data.wf.businessTyp ...@@ -136,12 +136,12 @@ export const startWorkflow = (data, params = { businessType: data.wf.businessTyp
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/completeWorkflowMove [post] // @Router /workflowProcess/completeWorkflowMove [post]
export const completeWorkflowMove = (data, params = { businessType: data.wf.businessType }) => { export const completeWorkflowMove = (data, params = { businessType: data.wf.businessType }) => {
return service({ return service({
url: '/workflowProcess/completeWorkflowMove', url: '/workflowProcess/completeWorkflowMove',
method: 'post', method: 'post',
data, data,
params params
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -152,10 +152,10 @@ export const completeWorkflowMove = (data, params = { businessType: data.wf.busi ...@@ -152,10 +152,10 @@ export const completeWorkflowMove = (data, params = { businessType: data.wf.busi
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyStated [get] // @Router /workflowProcess/getMyStated [get]
export const getMyStated = () => { export const getMyStated = () => {
return service({ return service({
url: '/workflowProcess/getMyStated', url: '/workflowProcess/getMyStated',
method: 'get' method: 'get'
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -166,10 +166,10 @@ export const getMyStated = () => { ...@@ -166,10 +166,10 @@ export const getMyStated = () => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getMyNeed [get] // @Router /workflowProcess/getMyNeed [get]
export const getMyNeed = () => { export const getMyNeed = () => {
return service({ return service({
url: '/workflowProcess/getMyNeed', url: '/workflowProcess/getMyNeed',
method: 'get' method: 'get'
}) })
} }
// @Tags WorkflowProcess // @Tags WorkflowProcess
...@@ -181,9 +181,9 @@ export const getMyNeed = () => { ...@@ -181,9 +181,9 @@ export const getMyNeed = () => {
// @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}" // @Success 200 {string} string "{"success":true,"data":{},"msg":"获取成功"}"
// @Router /workflowProcess/getWorkflowMoveByID [get] // @Router /workflowProcess/getWorkflowMoveByID [get]
export const getWorkflowMoveByID = (params) => { export const getWorkflowMoveByID = (params) => {
return service({ return service({
url: '/workflowProcess/getWorkflowMoveByID', url: '/workflowProcess/getWorkflowMoveByID',
method: 'get', method: 'get',
params params
}) })
} }
\ No newline at end of file
<template> <template>
<span class="headerAvatar"> <span class="headerAvatar">
<template v-if="picType === 'avatar'"> <template v-if="picType === 'avatar'">
<el-avatar v-if="userInfo.headerImg" :size="30" :src="avatar" /> <el-avatar v-if="userInfo.headerImg" :size="24" :src="avatar" />
<el-avatar v-else :size="30" :src="require('@/assets/noBody.png')" /> <el-avatar v-else :size="24" :src="require('@/assets/noBody.png')" />
</template> </template>
<template v-if="picType === 'img'"> <template v-if="picType === 'img'">
<img v-if="userInfo.headerImg" :src="avatar" class="avatar"> <img v-if="userInfo.headerImg" :src="avatar" class="avatar">
...@@ -66,6 +66,7 @@ export default { ...@@ -66,6 +66,7 @@ export default {
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
margin-right: 8px;
} }
.file{ .file{
width: 80px; width: 80px;
......
<template>
<div class="warning-bar">
<el-icon>
<warning-filled />
</el-icon>
<span>
{{ title }}
</span>
</div>
</template>
<script>
import { WarningFilled } from '@element-plus/icons'
export default {
components: {
[WarningFilled.name]: WarningFilled
},
props: {
title: {
type: String,
default: ''
}
}
}
</script>
<style lang="scss" scoped>
.warning-bar{
background-color: #FFF5ED;
font-size: 14px;
padding: 6px 14px;
display: flex;
align-items: center;
.el-icon{
color: #ED6A0C;
}
margin-bottom: 22px;
span{
color:#5D5D5E;
margin-left: 8px;
line-height: 18px;
}
}
</style>
...@@ -6,13 +6,13 @@ ...@@ -6,13 +6,13 @@
import { register } from './global' import { register } from './global'
export const run = function(app) { export const run = function(app) {
register(app) register(app)
console.log(` console.log(`
欢迎使用 Gin-Vue-Admin 欢迎使用 Gin-Vue-Admin
当前版本:V2.4.5 beta 当前版本:V2.4.5 beta.1
加群方式:微信:shouzi_1994 QQ群:622360840 加群方式:微信:shouzi_1994 QQ群:622360840
默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html 默认自动化文档地址:http://127.0.0.1:${import.meta.env.VITE_SERVER_PORT}/swagger/index.html
默认前端文件运行地址:http://127.0.0.1:${import.meta.env.VITE_CLI_PORT} 默认前端文件运行地址:http://127.0.0.1:${import.meta.env.VITE_CLI_PORT}
如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee 如果项目让您获得了收益,希望您能请团队喝杯可乐:https://www.gin-vue-admin.com/docs/coffee
`) `)
} }
\ No newline at end of file
...@@ -9,7 +9,7 @@ const getRouter = async() => { ...@@ -9,7 +9,7 @@ const getRouter = async() => {
await store.dispatch('router/SetAsyncRouter') await store.dispatch('router/SetAsyncRouter')
await store.dispatch('user/GetUserInfo') await store.dispatch('user/GetUserInfo')
const asyncRouters = store.getters['router/asyncRouters'] const asyncRouters = store.getters['router/asyncRouters']
asyncRouters.map(asyncRouter => { asyncRouters.forEach(asyncRouter => {
router.addRoute(asyncRouter) router.addRoute(asyncRouter)
}) })
} }
......
...@@ -21,7 +21,7 @@ export const dictionary = { ...@@ -21,7 +21,7 @@ export const dictionary = {
if (res.code === 0) { if (res.code === 0) {
const dictionaryMap = {} const dictionaryMap = {}
const dict = [] const dict = []
res.data.resysDictionary.sysDictionaryDetails && res.data.resysDictionary.sysDictionaryDetails.map(item => { res.data.resysDictionary.sysDictionaryDetails && res.data.resysDictionary.sysDictionaryDetails.forEach(item => {
dict.push({ dict.push({
label: item.label, label: item.label,
value: item.value value: item.value
......
...@@ -5,7 +5,7 @@ import { asyncMenu } from '@/api/menu' ...@@ -5,7 +5,7 @@ import { asyncMenu } from '@/api/menu'
const routerList = [] const routerList = []
const formatRouter = (routes) => { const formatRouter = (routes) => {
routes && routes.map(item => { routes && routes.forEach(item => {
if ((!item.children || item.children.every(ch => ch.hidden)) && item.name !== '404' && !item.hidden) { if ((!item.children || item.children.every(ch => ch.hidden)) && item.name !== '404' && !item.hidden) {
routerList.push({ label: item.meta.title, value: item.name }) routerList.push({ label: item.meta.title, value: item.name })
} }
......
import { login, getUserInfo } from '@/api/user' import { login, getUserInfo, setUserInfo } from '@/api/user'
import { jsonInBlacklist } from '@/api/jwt' import { jsonInBlacklist } from '@/api/jwt'
import router from '@/router/index' import router from '@/router/index'
import { setUserInfo } from '@/api/user'
import { ElMessage } from 'element-plus' import { ElMessage } from 'element-plus'
export const user = { export const user = {
...@@ -13,7 +12,7 @@ export const user = { ...@@ -13,7 +12,7 @@ export const user = {
headerImg: '', headerImg: '',
authority: {}, authority: {},
sideMode: 'dark', sideMode: 'dark',
activeColor: '#1890ff', activeColor: '#0d84ff',
baseColor: '#fff' baseColor: '#fff'
}, },
token: '', token: '',
...@@ -45,15 +44,9 @@ export const user = { ...@@ -45,15 +44,9 @@ export const user = {
...userInfo ...userInfo
} }
}, },
ChangeActiveColor: async(state, val) => { ChangeSideMode: (state, val) => {
state.userInfo.activeColor = val
},
ChangeSideMode: async(state, val) => {
state.userInfo.sideMode = val state.userInfo.sideMode = val
}, },
ChangeBaseColor: (state, val) => {
state.userInfo.baseColor = val
}
}, },
actions: { actions: {
async GetUserInfo({ commit }) { async GetUserInfo({ commit }) {
...@@ -70,7 +63,7 @@ export const user = { ...@@ -70,7 +63,7 @@ export const user = {
commit('setToken', res.data.token) commit('setToken', res.data.token)
await dispatch('router/SetAsyncRouter', {}, { root: true }) await dispatch('router/SetAsyncRouter', {}, { root: true })
const asyncRouters = rootGetters['router/asyncRouters'] const asyncRouters = rootGetters['router/asyncRouters']
asyncRouters.map(asyncRouter => { asyncRouters.forEach(asyncRouter => {
router.addRoute(asyncRouter) router.addRoute(asyncRouter)
}) })
// const redirect = router.history.current.query.redirect // const redirect = router.history.current.query.redirect
...@@ -89,16 +82,6 @@ export const user = { ...@@ -89,16 +82,6 @@ export const user = {
commit('LoginOut') commit('LoginOut')
} }
}, },
async changeActiveColor({ commit, state }, data) {
const res = await setUserInfo({ activeColor: data, ID: state.userInfo.ID })
if (res.code === 0) {
commit('ChangeActiveColor', data)
ElMessage({
type: 'success',
message: '设置成功'
})
}
},
async changeSideMode({ commit, state }, data) { async changeSideMode({ commit, state }, data) {
const res = await setUserInfo({ sideMode: data, ID: state.userInfo.ID }) const res = await setUserInfo({ sideMode: data, ID: state.userInfo.ID })
if (res.code === 0) { if (res.code === 0) {
...@@ -109,16 +92,6 @@ export const user = { ...@@ -109,16 +92,6 @@ export const user = {
}) })
} }
}, },
async changeBaseColor({ commit, state }, data) {
const res = await setUserInfo({ baseColor: data, ID: state.userInfo.ID })
if (res.code === 0) {
commit('ChangeBaseColor', data)
ElMessage({
type: 'success',
message: '设置成功'
})
}
}
}, },
getters: { getters: {
userInfo(state) { userInfo(state) {
...@@ -150,7 +123,7 @@ export const user = { ...@@ -150,7 +123,7 @@ export const user = {
}, },
activeColor(state) { activeColor(state) {
if (state.userInfo.sideMode === 'dark' || state.userInfo.sideMode === 'light') { if (state.userInfo.sideMode === 'dark' || state.userInfo.sideMode === 'light') {
return '#1890ff' return '#0d84ff'
} }
return state.userInfo.activeColor return state.userInfo.activeColor
} }
......
此差异已折叠。
...@@ -58,17 +58,3 @@ ...@@ -58,17 +58,3 @@
.title-3 { .title-3 {
text-align: center; text-align: center;
} }
.el-pager li.active{
color: #409EFF !important;
border: 1px solid #409EFF;
}
.el-pager li.active+li{
border-left: 1px;
}
.el-pager li:hover{
color: #409EFF !important;
border: 1px solid #409EFF;
}
\ No newline at end of file
// basice // basice
$font-size: 14px; $font-size: 14px;
$icon-size:17px; $icon-size:18px;
$active-color:#1890ff; $active-color:#1890ff;
$bg-main:#f0f2f5; $bg-main:#f0f2f5;
$border-color: #f4f4f4; $border-color: #f4f4f4;
...@@ -11,7 +11,7 @@ $el-icon-mini:24px; ...@@ -11,7 +11,7 @@ $el-icon-mini:24px;
$width-aside:220px; $width-aside:220px;
$width-hideside-aside:54px; $width-hideside-aside:54px;
$width-mobile-aside:210px; $width-mobile-aside:210px;
$color-aside:rgba(255, 255, 255,.9); $color-aside:rgba(255, 255, 255, .9);
$icon-arrow-size-aside:12px; $icon-arrow-size-aside:12px;
$width-submenu-aside:55px; $width-submenu-aside:55px;
$bg-aside:#191a23; $bg-aside:#191a23;
...@@ -34,4 +34,4 @@ $color-table-thead:#262626; ...@@ -34,4 +34,4 @@ $color-table-thead:#262626;
$height-car:68px; $height-car:68px;
// mobile // mobile
$padding-xs: 5px; $padding-xs: 5px;
$margin-xs: 5px; $margin-xs: 5px;
\ No newline at end of file
...@@ -652,9 +652,6 @@ li { ...@@ -652,9 +652,6 @@ li {
.el-sub-menu__title:hover span { .el-sub-menu__title:hover span {
color: #fff; color: #fff;
} }
.el-menu--inline {
// border-left: 5px solid #2c3b41;
}
} }
.hideside { .hideside {
.aside { .aside {
...@@ -720,26 +717,10 @@ li { ...@@ -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 { .admin-box {
min-height: calc(100vh - 200px); min-height: calc(100vh - 200px);
background-color: $white-bg; padding: 12px 16px;
padding: 14px; margin: 100px 2px 20px;
margin: 114px 14px 20px;
border-radius: 2px;
.el-table--border { .el-table--border {
border-radius: 4px; border-radius: 4px;
margin-bottom: 14px; margin-bottom: 14px;
...@@ -749,26 +730,28 @@ li { ...@@ -749,26 +730,28 @@ li {
color: $color-table-thead; color: $color-table-thead;
} }
th { th {
padding: 5px 0; padding: 6px 0;
background: #F7FBFF;
.cell { .cell {
min-height: 34px; color: rgba($color: #000000, $alpha: 0.85);
line-height: 34px; font-size: 14px;
line-height: 40px;
min-height: 40px;
} }
} }
td { td {
padding: 8px 0; padding: 6px 0;
.cell {
min-height: 40px;
line-height: 40px;
color: rgba($color: #000000, $alpha: 0.65);
}
} }
td, td.is-leaf {
th.is-leaf {
border-bottom: 1px solid #e8e8e8; border-bottom: 1px solid #e8e8e8;
} }
} th.is-leaf {
.search-term { border-bottom: none;
border-left: none;
border-right: none;
padding: 0 5px;
.el-form-item {
margin-bottom: 10px;
} }
} }
.el-pagination { .el-pagination {
...@@ -778,17 +761,31 @@ li { ...@@ -778,17 +761,31 @@ li {
.upload { .upload {
padding: 0; padding: 0;
} }
.system { .edit_container,
.edit {
padding: 0; padding: 0;
} }
.el-form.el-form--inline { .el-input {
.el-form-item:last-child { .el-input__suffix {
margin-bottom: 0; margin-top: -3px;
}
&.is-disabled {
.el-input__suffix {
margin-top: 0px;
}
} }
} }
.edit_container, .el-cascader {
.edit { .el-input {
padding: 0; .el-input__suffix {
margin-top: 0px;
}
}
}
.el-input__inner {
border-color: rgba($color: #000000, $alpha: 0.15);
height: 32px;
border-radius: 2px;
} }
} }
...@@ -805,13 +802,6 @@ li { ...@@ -805,13 +802,6 @@ li {
padding: 0 0 10px 0px; padding: 0 0 10px 0px;
} }
.search-term {
background: $white-bg;
padding: 0 15px;
border-left: 1px solid #ebeef5;
border-right: 1px solid #ebeef5;
}
// table // table
.has-gutter { .has-gutter {
tr { tr {
...@@ -833,7 +823,7 @@ li { ...@@ -833,7 +823,7 @@ li {
.el-table th, .el-table th,
.el-table tr { .el-table tr {
background-color: #fafafa; background-color: #ffffff;
} }
.el-pagination { .el-pagination {
...@@ -886,36 +876,6 @@ li { ...@@ -886,36 +876,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 { // .el-menu .el-menu--inline {
// background: #2c3b41; // background: #2c3b41;
// } // }
...@@ -973,14 +933,6 @@ li { ...@@ -973,14 +933,6 @@ li {
// border-bottom: 1px solid #e8e8e8; // border-bottom: 1px solid #e8e8e8;
// } // }
// } // }
// .search-term {
// border-left: none;
// border-right: none;
// padding: 0 5px;
// .el-form-item {
// margin-bottom: 10px;
// }
// }
// .el-pagination { // .el-pagination {
// padding: 20px 0 0 0; // padding: 20px 0 0 0;
// } // }
...@@ -1025,8 +977,8 @@ li { ...@@ -1025,8 +977,8 @@ li {
background-color: $bg-main; background-color: $bg-main;
.menu-total { .menu-total {
cursor: pointer; cursor: pointer;
font-size: 22px; font-size: 24px;
color: #838383; color: #000000;
margin-top: 16px; margin-top: 16px;
} }
// background-color: #f0f2f5; // background-color: #f0f2f5;
...@@ -1049,11 +1001,10 @@ li { ...@@ -1049,11 +1001,10 @@ li {
border: none; border: none;
border-left: 1px solid $border-color; border-left: 1px solid $border-color;
border-right: 1px solid $border-color; border-right: 1px solid $border-color;
+.el-tabs__item{ +.el-tabs__item {
border-left: 0px solid $border-color; border-left: 0px solid $border-color;
} }
} }
.el-tabs__item.is-active { .el-tabs__item.is-active {
background-color: rgba(64, 158, 255, .08); background-color: rgba(64, 158, 255, .08);
} }
...@@ -1122,19 +1073,15 @@ li { ...@@ -1122,19 +1073,15 @@ li {
.el-input-number__increase { .el-input-number__increase {
position: absolute; position: absolute;
z-index: 1; z-index: 1;
top: 6px !important; top: 3px !important;
width: 42px; width: 42px;
height: 26px; height: 29px;
line-height: 26px; line-height: 29px;
text-align: center; text-align: center;
background: #F5F7FA; background: #F5F7FA;
color: #606266; color: #606266;
cursor: pointer; cursor: pointer;
font-size: 13px; font-size: 12px;
}
.table-button+span {
margin-left: 10px !important;
} }
$headerHigh: 52px; $headerHigh: 52px;
...@@ -1158,11 +1105,9 @@ $mainHight: 100vh; ...@@ -1158,11 +1105,9 @@ $mainHight: 100vh;
.layout-cont { .layout-cont {
.right-box { .right-box {
height: $height-header; display: flex;
line-height: $height-header; justify-content: flex-end;
text-align: center; align-items: center;
vertical-align: middle;
margin-right: 10px;
img { img {
vertical-align: middle; vertical-align: middle;
border: 1px solid #ccc; border: 1px solid #ccc;
...@@ -1170,6 +1115,7 @@ $mainHight: 100vh; ...@@ -1170,6 +1115,7 @@ $mainHight: 100vh;
} }
} }
.header-cont { .header-cont {
padding: 0 16px;
height: $height-header; height: $height-header;
background: #fff; background: #fff;
} }
...@@ -1178,8 +1124,19 @@ $mainHight: 100vh; ...@@ -1178,8 +1124,19 @@ $mainHight: 100vh;
height: $height-header; height: $height-header;
line-height: $height-header; line-height: $height-header;
display: inline-block; display: inline-block;
background-color: #fff;
padding: 0; padding: 0;
margin-left: 46px;
font-size: 16px;
.el-breadcrumb__item {
.el-breadcrumb__inner {
color: rgba($color: #000000, $alpha: 0.45);
}
}
.el-breadcrumb__item:nth-last-child(1) {
.el-breadcrumb__inner {
color: rgba($color: #000000, $alpha: 0.65);
}
}
} }
&.el-main { &.el-main {
overflow: auto; overflow: auto;
...@@ -1189,7 +1146,7 @@ $mainHight: 100vh; ...@@ -1189,7 +1146,7 @@ $mainHight: 100vh;
overflow: visible; overflow: visible;
position: relative; position: relative;
.menu-total { .menu-total {
margin-left:6px; margin-left: 6px;
cursor: pointer; cursor: pointer;
float: left; float: left;
margin-top: 10px; margin-top: 10px;
...@@ -1244,10 +1201,6 @@ $mainHight: 100vh; ...@@ -1244,10 +1201,6 @@ $mainHight: 100vh;
} }
} }
.screenfull {
display: inline-block;
}
.header-avatar { .header-avatar {
display: flex; display: flex;
justify-content: center; justify-content: center;
...@@ -1255,10 +1208,8 @@ $mainHight: 100vh; ...@@ -1255,10 +1208,8 @@ $mainHight: 100vh;
} }
.search-component { .search-component {
display: inline-block; display: inline-flex;
overflow: hidden; overflow: hidden;
height: 60px;
width: 120px;
text-align: center; text-align: center;
.el-input__inner { .el-input__inner {
border: none; border: none;
...@@ -1269,27 +1220,31 @@ $mainHight: 100vh; ...@@ -1269,27 +1220,31 @@ $mainHight: 100vh;
} }
.search-icon { .search-icon {
font-size: $icon-size; font-size: $icon-size;
margin-right: 14px;
display: inline-block; display: inline-block;
vertical-align: middle; vertical-align: middle;
box-sizing: border-box; box-sizing: border-box;
color: #606266; color: rgba($color: #000000, $alpha: 0.65);
} }
.dropdown-group { .dropdown-group {
min-width: 100px; min-width: 100px;
} }
.user-box {
cursor: pointer;
margin-right: 24px;
color: rgba($color: #000000, $alpha: 0.65);
}
} }
.transition-box { .transition-box {
overflow: hidden; overflow: hidden;
width: 120px; width: 120px;
margin-right: 32px;
text-align: center; text-align: center;
} }
.screenfull { .screenfull {
overflow: hidden; overflow: hidden;
width: 40px; color: rgba($color: #000000, $alpha: 0.65);
text-align: center;
} }
.el-dropdown { .el-dropdown {
...@@ -1402,15 +1357,18 @@ $mainHight: 100vh; ...@@ -1402,15 +1357,18 @@ $mainHight: 100vh;
} }
} }
.gva-btn-list{ .gva-btn-list {
margin-bottom: 12px; margin-bottom: 12px;
display: flex; display: flex;
justify-content: flex-end; .el-button+.el-button {
.el-button+.el-button{
margin-left: 12px; margin-left: 12px;
} }
} }
.justify-content-flex-end {
justify-content: flex-end;
}
::-webkit-scrollbar-track-piece { ::-webkit-scrollbar-track-piece {
background-color: #f8f8f8; background-color: #f8f8f8;
} }
...@@ -1429,4 +1387,164 @@ $mainHight: 100vh; ...@@ -1429,4 +1387,164 @@ $mainHight: 100vh;
::-webkit-scrollbar-thumb:hover { ::-webkit-scrollbar-thumb:hover {
background-color: #bbb; 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 {
.el-collapse {
border: none;
.el-collapse-item__header,
.el-collapse-item__wrap {
border-bottom: none;
}
}
padding: 24px;
padding-bottom: 2px;
background-color: #fff;
border-radius: 2px;
margin-bottom: 12px;
.el-form {
.el-form-item {
padding-right: 28px;
}
}
}
.gva-form-box {
padding: 24px;
background-color: #fff;
border-radius: 2px;
}
.gva-table-box {
padding: 24px;
background-color: #fff;
border-radius: 2px;
}
.gva-pagination {
display: flex;
justify-content: flex-end;
.el-pagination__editor {
.el-input__inner {
height: 32px;
}
}
.el-pagination__total {
line-height: 32px !important;
}
.btn-prev {
padding-right: 6px;
display: inline-flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
}
.number {
display: inline-flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
}
.btn-quicknext {
display: inline-flex;
justify-content: center;
align-items: center;
width: 32px;
height: 32px;
}
.btn-next {
padding-left: 6px;
width: 32px;
height: 32px;
display: inline-flex;
justify-content: center;
align-items: center;
}
.active {
background: #4D70FF;
border-radius: 2px;
color: #ffffff !important;
}
.el-pager li.active+li {
border-left: 1px solid #ddd !important;
}
.el-pagination__sizes {
.el-input {
.el-input__suffix {
margin-top: 2px;
}
}
}
.el-pagination__jump {
.el-pagination__editor {}
}
}
.el-button--mini {
min-height: 32px;
}
.el-button {
padding: 8px 16px;
border-radius: 2px;
&.el-button--text {
padding: 8px 0;
}
}
.el-dialog {
padding: 12px;
.el-dialog__body {
padding: 12px 6px;
}
.el-dialog__header {
.el-dialog__title {
font-size: 14px;
font-weight: 500;
}
padding: 2px 20px 12px 20px;
border-bottom: 1px solid #E4E4E4;
}
.el-dialog__headerbtn {
top: 16px;
}
.el-dialog__footer {
margin-top: -12px;
padding: 0 0 16px 0;
.dialog-footer {
.el-button {
padding-left: 24px;
padding-right: 24px;
}
.el-button+.el-button {
margin-left: 30px;
}
}
}
} }
\ No newline at end of file
@import '@/style/basics.scss'; @import '@/style/basics.scss';
@media screen and (min-width: 320px)and (max-width: 750px){ @media screen and (min-width: 320px)and (max-width: 750px) {
.el-header{ .el-header {
padding: 0 $padding-xs; padding: 0 $padding-xs;
} }
.layout-cont { .layout-cont {
.main-cont{ .main-cont {
.breadcrumb{ .breadcrumb {
padding: 0 $padding-xs; padding: 0 $padding-xs;
}
} }
} }
.layout-cont{ }
.right-box{ .layout-cont {
margin-right: $margin-xs; .right-box {
} margin-right: $margin-xs;
} }
.search-component{ }
width: 30px; .el-main {
.admin-box {
margin-left: 0;
margin-right: 0;
} }
.screenfull{ .big.admin-box {
width: 26px; padding: 0;
text-align: center;
} }
.el-main{ .big {
.admin-box{ .bottom {
margin-left: 0; .chart-player {
margin-right: 0; height: auto!important;
} margin-bottom: 15px;
.big.admin-box{ }
padding: 0; .todoapp {
} background-color: #fff;
.big { padding-bottom: 10px;
.bottom {
.chart-player{
height: auto!important;
margin-bottom: 15px;
}
.todoapp{
background-color: #fff;
padding-bottom: 10px;
}
} }
} }
} }
}
.card .car-left, .card .car-left,
.card .car-right{ .card .car-right {
width: 100%;
height: 100%;
}
.card {
padding-left: $padding-xs;
padding-right: $padding-xs;
}
.card {
.text {
width: 100%; width: 100%;
height: 100%; h4 {
} white-space: break-spaces;
.card{
padding-left: $padding-xs;
padding-right: $padding-xs;
}
.card {
.text{
width: 100%;
h4{
white-space: break-spaces;
}
} }
} }
.shadow{ }
margin-left: 4px; .shadow {
margin-right: 4px; margin-left: 4px;
.grid-content{ margin-right: 4px;
margin-bottom: 10px; .grid-content {
padding: 0; margin-bottom: 10px;
} padding: 0;
} }
.el-dialog{ }
width: 90%; .el-dialog {
width: 90%;
}
.el-transfer {
.el-transfer-panel {
width: 40%;
display: inline-block;
} }
.el-transfer{ .el-transfer__buttons {
.el-transfer-panel{ padding: 0 5px;
width: 40%; display: inline-block;
display: inline-block;
}
.el-transfer__buttons{
padding: 0 5px;
display: inline-block;
}
} }
}
} }
\ No newline at end of file
const modules = import.meta.glob('../view/**/*.vue') const modules = import.meta.glob('../view/**/*.vue')
export const asyncRouterHandle = (asyncRouter) => { export const asyncRouterHandle = (asyncRouter) => {
asyncRouter.map(item => { asyncRouter.forEach(item => {
if (item.component) { if (item.component) {
item.component = dynamicImport(modules, item.component) item.component = dynamicImport(modules, item.component)
} else { } else {
......
<template> <template>
<div class="dashbord-line-box"> <div class="dashbord-line-box">
<div class="dashbord-line-title">Gva 仓库commit 记录</div> <div class="dashbord-line-title">
访问趋势
</div>
<div <div
ref="echart" ref="echart"
class="dashbord-line" class="dashbord-line"
...@@ -12,8 +14,8 @@ import echarts from 'echarts' ...@@ -12,8 +14,8 @@ import echarts from 'echarts'
import 'echarts/theme/macarons' import 'echarts/theme/macarons'
var dataAxis = [] var dataAxis = []
for (var i = 1; i < 21; i++) { for (var i = 1; i < 13; i++) {
dataAxis.push(`${i}`) dataAxis.push(`${i}`)
} }
var data = [ var data = [
220, 220,
...@@ -28,14 +30,6 @@ var data = [ ...@@ -28,14 +30,6 @@ var data = [
321, 321,
90, 90,
149, 149,
210,
122,
133,
334,
198,
123,
125,
220,
] ]
var yMax = 500 var yMax = 500
var dataShadow = [] var dataShadow = []
...@@ -71,6 +65,12 @@ export default { ...@@ -71,6 +65,12 @@ export default {
}, },
setOptions() { setOptions() {
this.chart.setOption({ this.chart.setOption({
grid: {
left: '40',
right: '40',
top: '40',
bottom: '20',
},
xAxis: { xAxis: {
data: dataAxis, data: dataAxis,
axisTick: { axisTick: {
...@@ -102,21 +102,14 @@ export default { ...@@ -102,21 +102,14 @@ export default {
series: [ series: [
{ {
type: 'bar', type: 'bar',
barWidth: 40,
itemStyle: { itemStyle: {
borderRadius: [5, 5, 0, 0], borderRadius: [5, 5, 0, 0],
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ color: '#188df0',
{ offset: 0, color: '#83bff6' },
{ offset: 0.5, color: '#188df0' },
{ offset: 1, color: '#188df0' },
]),
}, },
emphasis: { emphasis: {
itemStyle: { itemStyle: {
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [ color: '#188df0',
{ offset: 0, color: '#2378f7' },
{ offset: 0.7, color: '#2378f7' },
{ offset: 1, color: '#83bff6' },
]),
}, },
}, },
data: data, data: data,
...@@ -129,15 +122,14 @@ export default { ...@@ -129,15 +122,14 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.dashbord-line-box { .dashbord-line-box {
padding: 20px;
.dashbord-line { .dashbord-line {
background-color: #fff; background-color: #fff;
height: 360px; height: 360px;
width: calc(100% - 40px); width: 100%;
} }
.dashbord-line-title { .dashbord-line-title {
color: rgb(56, 137, 206); font-weight: 600;
font-size: 18px; margin-bottom: 12px;
} }
} }
</style> </style>
<template> <template>
<div class="commit-table"> <div class="commit-table">
<div class="commit-table-title">Gva 仓库commit 记录</div> <div class="commit-table-title">
<el-table v-loading="loading" :data="dataTimeline" style="width: 100%"> 更新日志
<el-table-column prop="from" show-overflow-tooltip label="日期" width="180" /> </div>
<el-table-column prop="title" show-overflow-tooltip label="推送者" width="120" /> <div class="log">
<el-table-column prop="message" show-overflow-tooltip label="commit 信息" /> <div v-for="(item,key) in dataTimeline" :key="key" class="log-item">
</el-table> <div class="flex-1 flex"><span class="key" :class="key<3&&'top'">{{ key+1 }}</span></div>
<div class="flex-5 flex message">{{ item.message }}</div>
<div class="flex-3 flex form">{{ item.from }}</div>
</div>
</div>
</div> </div>
</template> </template>
<script> <script>
import { Commits } from '@/api/github' import { Commits } from '@/api/github'
import { formatTimeToStr } from '@/utils/date.js'
export default { export default {
data() { data() {
return { return {
...@@ -26,9 +31,9 @@ export default { ...@@ -26,9 +31,9 @@ export default {
Commits(0).then(({ data }) => { Commits(0).then(({ data }) => {
this.loading = false this.loading = false
data.forEach((element, index) => { data.forEach((element, index) => {
if (element.commit.message && index < 6) { if (element.commit.message && index < 10) {
this.dataTimeline.push({ this.dataTimeline.push({
from: new Date(element.commit.author.date), from: formatTimeToStr(element.commit.author.date, 'yyyy-MM-dd'),
title: element.commit.author.name, title: element.commit.author.name,
showDayAndMonth: true, showDayAndMonth: true,
message: element.commit.message, message: element.commit.message,
...@@ -42,13 +47,62 @@ export default { ...@@ -42,13 +47,62 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.commit-table{ .commit-table{
padding: 20px;
background-color: #fff; background-color: #fff;
height: 400px; height: 400px;
&-title{ &-title{
color: rgb(56,137,206); font-weight: 600;
font-size: 18px; margin-bottom: 12px;
margin-bottom: 20px; }
.log{
&-item{
display: flex;
justify-content: space-between;
margin-top: 14px;
.key{
margin-left: 12px;
&.top{
background: #314659;
color: #FFFFFF;;
}
display: inline-flex;
justify-content: center;
align-items: center;
width: 20px;
height: 20px;
border-radius: 50%;
background: #F0F2F5;
text-align: center;
color:rgba($color: #000000, $alpha: 0.65)
}
.message{
color: rgba(0, 0, 0, 0.65);
}
.form{
color: rgba(0, 0, 0, 0.65);
margin-left: 12px;
}
.flex{
line-height: 20px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.flex-1{
flex:1;
}
.flex-2{
flex:2;
}
.flex-3{
flex:3;
}
.flex-4{
flex:4;
}
.flex-5{
flex:5;
}
}
} }
} }
</style> </style>
<template> <template>
<div class="page"> <div class="page">
<div class="mycard dashbord1"> <div class="gva-card-box">
<div class="dashbord1-left"> <div class="gva-card gva-top-card">
<div class="dashbord1-left-title">早安,管理员,请开始一天的工作吧</div> <div class="gva-top-card-left">
<div class="dashbord1-left-dot">今日晴,0℃ - 10℃,天气寒冷,注意添加衣物。</div> <div class="gva-top-card-left-title">早安,管理员,请开始一天的工作吧</div>
<div class="dashbord1-left-rows"> <div class="gva-top-card-left-dot">今日晴,0℃ - 10℃,天气寒冷,注意添加衣物。</div>
<el-row :gutter="20"> <div class="gva-top-card-left-rows">
<el-col :span="8" :xs="24" :sm="8"> <el-row>
<div class="flex-center"> <el-col :span="8" :xs="24" :sm="8">
<i class="el-icon-sort icon" />今日流量 (1231231) <div class="flex-center">
</div> <i class="el-icon-sort icon" />今日流量 (1231231)
</el-col> </div>
<el-col :span="8" :xs="24" :sm="8"> </el-col>
<div class="flex-center"> <el-col :span="8" :xs="24" :sm="8">
<i class="el-icon-s-custom icon" />总用户数 (24001) <div class="flex-center">
</div> <i class="el-icon-s-custom icon" />总用户数 (24001)
</el-col> </div>
<el-col :span="8" :xs="24" :sm="8"> </el-col>
<div class="flex-center"> <el-col :span="8" :xs="24" :sm="8">
<i class="el-icon-s-comment icon" />好评率 (99%) <div class="flex-center">
</div> <i class="el-icon-s-comment icon" />好评率 (99%)
</el-col> </div>
</el-row> </el-col>
</el-row>
</div>
<div>
<div class="gva-top-card-left-item">
使用教学:
<a
style="color:#409EFF"
target="view_window"
href="https://www.bilibili.com/video/BV1Rg411u7xH/"
>https://www.bilibili.com/video/BV1Rg411u7xH</a>
</div>
<div class="gva-top-card-left-item">
插件仓库:
<a
style="color:#409EFF"
target="view_window"
href="https://github.com/flipped-aurora/gva-plugins"
>https://github.com/flipped-aurora/gva-plugins</a>
</div>
</div>
</div> </div>
<img src="@/assets/dashbord.png" class="gva-top-card-right" alt>
</div> </div>
<img src="@/assets/dashbord.png" class="dashbord1-right" alt>
</div> </div>
<div class="mycard dashbord2"> <div class="gva-card-box">
<div> <el-card class="gva-card quick-entrance">
<div class="dashbord2-item"> <template #header>
使用教学: <div class="card-header">
<a <span>快捷入口</span>
style="color:#409EFF" </div>
target="view_window" </template>
href="https://www.bilibili.com/video/BV1Rg411u7xH/" <el-row :gutter="20">
>https://www.bilibili.com/video/BV1Rg411u7xH</a> <el-col
</div> v-for="(card, key) in toolCards"
<div class="dashbord2-item"> :key="key"
插件仓库: :span="4"
<a :xs="8"
style="color:#409EFF" class="quick-entrance-items"
target="view_window" @click="toTarget(card.name)"
href="https://github.com/flipped-aurora/gva-plugins" >
>https://github.com/flipped-aurora/gva-plugins</a> <div class="quick-entrance-item">
</div> <div class="quick-entrance-item-icon" :style="{ backgroundColor: card.bg }">
</div> <i :class="card.icon" :style="{ color: card.color }" />
</div>
<p>{{ card.label }}</p>
</div>
</el-col>
</el-row>
</el-card>
<!-- <div class="quick-entrance-title"></div> -->
</div> </div>
<div class="gva-card-box">
<el-card class="mycard quick-entrance"> <div class="gva-card">
<template #header>
<div class="card-header"> <div class="card-header">
<span>快捷入口</span> <span>数据统计</span>
</div> </div>
</template> <div class="echart-box">
<el-row :gutter="20"> <el-row :gutter="20">
<el-col <el-col :xs="24" :sm="18">
v-for="(card, key) in toolCards" <echarts-line />
:key="key" </el-col>
:span="4" <el-col :xs="24" :sm="6">
:xs="8" <dashbord-table />
class="quick-entrance-items" </el-col>
@click="toTarget(card.name)" </el-row>
> </div>
<div class="quick-entrance-item"> </div>
<div class="quick-entrance-item-icon" :style="{ backgroundColor: card.bg }">
<i :class="card.icon" :style="{ color: card.color }" />
</div>
<p>{{ card.label }}</p>
</div>
</el-col>
</el-row>
</el-card>
<!-- <div class="quick-entrance-title"></div> -->
<div class="mycard">
<el-row :gutter="0">
<el-col :xs="24" :sm="16">
<echarts-line />
</el-col>
<el-col :xs="24" :sm="8">
<dashbord-table />
</el-col>
</el-row>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import echartsLine from '@/components/dashbordCharts/echartsLine.vue' import echartsLine from '@/view/dashboard/dashbordCharts/echartsLine.vue'
import dashbordTable from '@/components/dashbordTable/dashbordTable.vue' import dashbordTable from '@/view/dashboard/dashbordTable/dashbordTable.vue'
export default { export default {
components: { components: {
echartsLine, echartsLine,
...@@ -157,36 +164,52 @@ export default { ...@@ -157,36 +164,52 @@ export default {
.page { .page {
background: #f0f2f5; background: #f0f2f5;
padding: 0; padding: 0;
.gva-card-box{
.mycard { padding: 12px 16px;
&+.gva-card-box{
padding-top: 0px;
}
}
.gva-card {
box-sizing: border-box;
background-color: #fff; background-color: #fff;
border-radius: 10px; border-radius: 2px;
height: auto; height: auto;
padding: 10px 30px; padding: 26px 30px;
overflow: hidden; overflow: hidden;
margin-bottom: 15px;
box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.03); box-shadow: 0 0 7px 1px rgba(0, 0, 0, 0.03);
} }
.dashbord1 { .gva-top-card {
height: 120px; height: 260px;
@include flex-center; @include flex-center;
justify-content: space-between; justify-content: space-between;
color: #777; color: #777;
&-left { &-left {
height: 100%;
display: flex;
flex-direction: column;
&-title { &-title {
margin-top: 15px;
font-size: 22px; font-size: 22px;
color: #000; color: #343844;
} }
&-dot { &-dot {
font-size: 14px; font-size: 14px;
margin-top: 10px; color: #6B7687;
margin-top: 24px;
} }
&-rows { &-rows {
// margin-top: 15px; // margin-top: 15px;
margin-top: 18px;
color: #6B7687;
width: 600px; width: 600px;
align-items: center; align-items: center;
} }
&-item{
+.gva-top-card-left-item{
margin-top: 24px;
}
margin-top: 14px;
}
} }
&-right { &-right {
height: 600px; height: 600px;
...@@ -194,14 +217,14 @@ export default { ...@@ -194,14 +217,14 @@ export default {
margin-top: 28px; margin-top: 28px;
} }
} }
.dashbord2 { ::v-deep(.el-card__header){
@include flex-center; padding:0;
justify-content: flex-start; border-bottom: none;
height: 60px; }
&-item { .card-header{
line-height: 25px; padding-bottom: 20px;
border-bottom: 1px solid #e8e8e8;
} }
}
.quick-entrance-title { .quick-entrance-title {
height: 30px; height: 30px;
font-size: 22px; font-size: 22px;
...@@ -215,6 +238,15 @@ export default { ...@@ -215,6 +238,15 @@ export default {
text-align: center; text-align: center;
color: #333; color: #333;
.quick-entrance-item { .quick-entrance-item {
padding: 16px 28px;
margin-top: -16px;
margin-bottom: -16px;
border-radius: 4px;
transition: all 0.2s;
&:hover{
box-shadow: 0px 0px 7px 0px rgba(217, 217, 217, 0.55);
}
cursor: pointer;
height: auto; height: auto;
text-align: center; text-align: center;
// align-items: center; // align-items: center;
...@@ -234,6 +266,9 @@ export default { ...@@ -234,6 +266,9 @@ export default {
} }
} }
} }
.echart-box{
padding: 14px;
}
} }
.icon { .icon {
font-size: 20px; font-size: 20px;
...@@ -249,9 +284,9 @@ export default { ...@@ -249,9 +284,9 @@ export default {
//小屏幕不显示右侧,将登陆框居中 //小屏幕不显示右侧,将登陆框居中
@media (max-width: 750px) { @media (max-width: 750px) {
.mycard { .gva-card {
padding: 20px 10px !important; padding: 20px 10px !important;
.dashbord1 { .gva-top-card {
height: auto; height: auto;
&-left { &-left {
&-title { &-title {
...@@ -266,7 +301,7 @@ export default { ...@@ -266,7 +301,7 @@ export default {
display: none; display: none;
} }
} }
.dashbord2 { .gva-middle-card {
&-item { &-item {
line-height: 20px; line-height: 20px;
} }
......
<template> <template>
<div class="hello"> <div class="break-point">
<el-divider content-position="left">大文件上传</el-divider> <div class="gva-table-box">
<form id="fromCont" method="post"> <el-divider content-position="left">大文件上传</el-divider>
<div class="fileUpload" @click="inputChange"> <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> <input v-show="false" id="file" ref="Input" multiple="multiple" type="file" @change="choseFile">
</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> </div>
</transition> </form>
</div> <el-button :disabled="limitFileSize" type="primary" size="mini" class="uploadBtn" @click="getFile">上传文件</el-button>
<!-- <span <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" v-if="this.file"
>{{Math.floor(((this.formDataList.length-this.waitNum)/this.formDataList.length)*100)}}%</span> --> >{{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> </div>
</template> </template>
<script> <script>
...@@ -35,7 +38,7 @@ import { ...@@ -35,7 +38,7 @@ import {
removeChunk removeChunk
} from '@/api/breakpoint' } from '@/api/breakpoint'
export default { export default {
name: 'HelloWorld', name: 'BreakPoint',
data() { data() {
return { return {
file: null, file: null,
...@@ -124,7 +127,7 @@ export default { ...@@ -124,7 +127,7 @@ export default {
}, },
sliceFile() { sliceFile() {
this.waitUpLoad && this.waitUpLoad &&
this.waitUpLoad.map(item => { this.waitUpLoad.forEach(item => {
// 需要上传的切片 // 需要上传的切片
item.formData.append('chunkTotal', this.formDataList.length) // 切片总数携带给后台 总有用的 item.formData.append('chunkTotal', this.formDataList.length) // 切片总数携带给后台 总有用的
const fileR = new FileReader() // 功能同上 const fileR = new FileReader() // 功能同上
......
<template> <template>
<div> <div>
<div class="search-term"> <div class="gva-table-box">
<div class="gva-btn-list"> <div class="gva-btn-list">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button> <el-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
</div> </div>
<el-table
ref="multipleTable"
:data="tableData"
style="width: 100%"
tooltip-effect="dark"
row-key="ID"
>
<el-table-column type="selection" width="55" />
<el-table-column align="center" label="接入日期" width="180">
<template #default="scope">
<span>{{ formatDate(scope.row.CreatedAt) }}</span>
</template>
</el-table-column>
<el-table-column align="center" label="姓名" prop="customerName" width="120" />
<el-table-column align="center" label="电话" prop="customerPhoneData" width="120" />
<el-table-column align="center" label="接入人ID" prop="sysUserId" width="120" />
<el-table-column align="center" label="按钮组" min-width="160">
<template #default="scope">
<el-button size="small" type="text" icon="el-icon-edit" @click="updateCustomer(scope.row)">变更</el-button>
<el-popover :visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗?</p>
<div style="text-align: right; margin-top: 8px;">
<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>
<warning-bar style="margin-top:12px;" title="在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示" />
<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>
<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"
/>
<el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="客户"> <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="客户">
<el-form :inline="true" :model="form" label-width="80px"> <el-form :inline="true" :model="form" label-width="80px">
<el-form-item label="客户名"> <el-form-item label="客户名">
...@@ -61,12 +60,11 @@ ...@@ -61,12 +60,11 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="closeDialog">取 消</el-button> <el-button size="small" @click="closeDialog">取 消</el-button>
<el-button type="primary" @click="enterDialog">确 定</el-button> <el-button size="small" type="primary" @click="enterDialog">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<div class="tips">在资源权限中将此角色的资源权限清空 或者不包含创建者的角色 即可屏蔽此客户资源的显示</div>
</div> </div>
</template> </template>
...@@ -79,9 +77,11 @@ import { ...@@ -79,9 +77,11 @@ import {
getExaCustomerList getExaCustomerList
} from '@/api/customer' } from '@/api/customer'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
import warningBar from '@/components/warningBar/warningBar.vue'
export default { export default {
name: 'Customer', name: 'Customer',
components: { warningBar },
mixins: [infoList], mixins: [infoList],
data() { data() {
return { return {
...@@ -119,7 +119,7 @@ export default { ...@@ -119,7 +119,7 @@ export default {
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '' message: '删除成功'
}) })
if (this.tableData.length === 1 && this.page > 1) { if (this.tableData.length === 1 && this.page > 1) {
this.page-- this.page--
......
<template> <template>
<div class="upload"> <div class="upload">
<div class="btn-list"> <div class="gva-table-box">
<el-upload
class="excel-btn" <div class="gva-btn-list">
:action="`${path}/excel/importExcel`" <el-upload
:headers="{'x-token':token}" class="excel-btn"
:on-success="loadExcel" :action="`${path}/excel/importExcel`"
:show-file-list="false" :headers="{'x-token':token}"
> :on-success="loadExcel"
<el-button size="mini" type="primary" icon="el-icon-upload2">导入</el-button> :show-file-list="false"
</el-upload> >
<el-button class="excel-btn" size="mini" type="primary" icon="el-icon-download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button> <el-button size="mini" type="primary" icon="el-icon-upload2">导入</el-button>
<el-button class="excel-btn" size="mini" type="success" icon="el-icon-download" @click="downloadExcelTemplate()">下载模板</el-button> </el-upload>
</div> <el-button class="excel-btn" size="mini" type="primary" icon="el-icon-download" @click="handleExcelExport('ExcelExport.xlsx')">导出</el-button>
<el-table :data="tableData" border row-key="ID" stripe> <el-button class="excel-btn" size="mini" type="success" icon="el-icon-download" @click="downloadExcelTemplate()">下载模板</el-button>
<el-table-column label="ID" min-width="100" prop="ID" /> </div>
<el-table-column label="路由Name" min-width="160" prop="name" /> <el-table :data="tableData" row-key="ID">
<el-table-column label="路由Path" min-width="160" prop="path" /> <el-table-column align="center" label="ID" min-width="100" prop="ID" />
<el-table-column label="是否隐藏" min-width="100" prop="hidden"> <el-table-column align="center" show-overflow-tooltip label="路由Name" min-width="160" prop="name" />
<el-table-column align="center" show-overflow-tooltip label="路由Path" min-width="160" prop="path" />
<el-table-column align="center" label="是否隐藏" min-width="100" prop="hidden">
<template #default="scope"> <template #default="scope">
<span>{{ scope.row.hidden?"隐藏":"显示" }}</span> <span>{{ scope.row.hidden?"隐藏":"显示" }}</span>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="父节点" min-width="90" prop="parentId" /> <el-table-column align="center" label="父节点" min-width="90" prop="parentId" />
<el-table-column label="排序" min-width="70" prop="sort" /> <el-table-column align="center" label="排序" min-width="70" prop="sort" />
<el-table-column label="文件路径" min-width="360" prop="component" /> <el-table-column align="center" label="文件路径" min-width="360" prop="component" />
</el-table> </el-table>
</div>
</div> </div>
</template> </template>
...@@ -75,8 +78,9 @@ export default { ...@@ -75,8 +78,9 @@ export default {
display: flex; display: flex;
margin-bottom: 12px; margin-bottom: 12px;
justify-content: flex-end; justify-content: flex-end;
.excel-btn+.excel-btn{
margin-left: 12px; }
} .excel-btn+.excel-btn{
margin-left: 10px;
} }
</style> </style>
<template> <template>
<div v-loading.fullscreen.lock="fullscreenLoading"> <div v-loading.fullscreen.lock="fullscreenLoading">
<div class="upload"> <div class="gva-table-box">
<div class="upload-box"> <div class="gva-btn-list">
<el-upload <el-upload
:action="`${path}/fileUploadAndDownload/upload`" :action="`${path}/fileUploadAndDownload/upload`"
:before-upload="checkFile" :before-upload="checkFile"
...@@ -22,20 +22,20 @@ ...@@ -22,20 +22,20 @@
/> />
</div> </div>
<el-table :data="tableData" border stripe> <el-table :data="tableData">
<el-table-column label="预览" width="100"> <el-table-column align="center" label="预览" width="100">
<template #default="scope"> <template #default="scope">
<CustomPic pic-type="file" :pic-src="scope.row.url" /> <CustomPic pic-type="file" :pic-src="scope.row.url" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="日期" prop="UpdatedAt" width="180"> <el-table-column align="center" label="日期" prop="UpdatedAt" width="180">
<template #default="scope"> <template #default="scope">
<div>{{ formatDate(scope.row.UpdatedAt) }}</div> <div>{{ formatDate(scope.row.UpdatedAt) }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="文件名" prop="name" width="180" /> <el-table-column align="center" label="文件名" prop="name" width="180" />
<el-table-column label="链接" prop="url" min-width="300" /> <el-table-column align="center" label="链接" prop="url" min-width="300" />
<el-table-column label="标签" prop="tag" width="100"> <el-table-column align="center" label="标签" prop="tag" width="100">
<template #default="scope"> <template #default="scope">
<el-tag <el-tag
:type="scope.row.tag === 'jpg' ? 'primary' : 'success'" :type="scope.row.tag === 'jpg' ? 'primary' : 'success'"
...@@ -43,23 +43,25 @@ ...@@ -43,23 +43,25 @@
>{{ scope.row.tag }}</el-tag> >{{ scope.row.tag }}</el-tag>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="操作" width="160"> <el-table-column align="center" label="操作" width="160">
<template #default="scope"> <template #default="scope">
<el-button size="small" type="text" @click="downloadFile(scope.row)">下载</el-button> <el-button size="small" icon="el-icon-download" type="text" @click="downloadFile(scope.row)">下载</el-button>
<el-button size="small" type="text" @click="deleteFile(scope.row)">删除</el-button> <el-button size="small" icon="el-icon-delete" type="text" @click="deleteFile(scope.row)">删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<el-pagination <div class="gva-pagination">
:current-page="page" <el-pagination
:page-size="pageSize" :current-page="page"
:page-sizes="[10, 30, 50, 100]" :page-size="pageSize"
:style="{ float: 'right', padding: '20px' }" :page-sizes="[10, 30, 50, 100]"
:total="total" :style="{ float: 'right', padding: '20px' }"
layout="total, sizes, prev, pager, next, jumper" :total="total"
@current-change="handleCurrentChange" layout="total, sizes, prev, pager, next, jumper"
@size-change="handleSizeChange" @current-change="handleCurrentChange"
/> @size-change="handleSizeChange"
/>
</div>
</div> </div>
</div> </div>
</template> </template>
...@@ -170,3 +172,8 @@ export default { ...@@ -170,3 +172,8 @@ export default {
} }
} }
</script> </script>
<style scoped>
.upload-btn+.upload-btn {
margin-left: 12px;
}
</style>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
<div> <div>
<div class="hello_title">GIN-VUE-ADMIN</div> <div class="hello_title">GIN-VUE-ADMIN</div>
<p class="in-two a-fadeinT">初始化须知</p> <p class="in-two a-fadeinT">初始化须知</p>
<p class="init_p">1.您需有用一定的VUE和golang基础</p> <p class="init_p">1.您需有用一定的VUE和GOLANG基础</p>
<p class="init_p">2.请您确认是否已经阅读过官方文档</p> <p class="init_p">2.请您确认是否已经阅读过官方文档</p>
<p class="init_p">3.请您确认是否了解后续的配置流程</p> <p class="init_p">3.请您确认是否了解后续的配置流程</p>
<p class="init_p">注:开发组不为文档中书写过的内容提供无偿服务</p> <p class="init_p">注:开发组不为文档中书写过的内容提供无偿服务</p>
......
...@@ -67,7 +67,7 @@ export default { ...@@ -67,7 +67,7 @@ export default {
const query = {} const query = {}
const params = {} const params = {}
ele.route.parameters && ele.route.parameters &&
ele.route.parameters.map(item => { ele.route.parameters.forEach(item => {
if (item.type === 'query') { if (item.type === 'query') {
query[item.key] = item.value query[item.key] = item.value
} else { } else {
......
...@@ -21,14 +21,14 @@ ...@@ -21,14 +21,14 @@
<el-col> <el-col>
<el-header class="header-cont"> <el-header class="header-cont">
<el-row class="pd-0"> <el-row class="pd-0">
<el-col :xs="2" :lg="1" :md="1" :sm="1" :xl="1"> <el-col :xs="2" :lg="1" :md="1" :sm="1" :xl="1" style="z-index:100">
<div class="menu-total" @click="totalCollapse"> <div class="menu-total" @click="totalCollapse">
<i v-if="isCollapse" class="el-icon-s-unfold" /> <i v-if="isCollapse" class="el-icon-s-unfold" />
<i v-else class="el-icon-s-fold" /> <i v-else class="el-icon-s-fold" />
</div> </div>
</el-col> </el-col>
<el-col :xs="10" :lg="14" :md="14" :sm="9" :xl="14"> <el-col :xs="10" :lg="14" :md="14" :sm="9" :xl="14" :pull="1">
<el-breadcrumb class="breadcrumb" separator-class="el-icon-arrow-right"> <el-breadcrumb class="breadcrumb">
<el-breadcrumb-item <el-breadcrumb-item
v-for="item in matched.slice(1,matched.length)" v-for="item in matched.slice(1,matched.length)"
:key="item.path" :key="item.path"
...@@ -36,7 +36,7 @@ ...@@ -36,7 +36,7 @@
</el-breadcrumb> </el-breadcrumb>
</el-col> </el-col>
<el-col :xs="12" :lg="9" :md="9" :sm="14" :xl="9"> <el-col :xs="12" :lg="9" :md="9" :sm="14" :xl="9">
<div class="fl-right right-box"> <div class="right-box">
<Search /> <Search />
<Screenfull class="screenfull" :style="{cursor:'pointer'}" /> <Screenfull class="screenfull" :style="{cursor:'pointer'}" />
<el-dropdown> <el-dropdown>
......
<template> <template>
<div @click="click"> <div @click="click">
<!-- <svg
t="1508738709248"
class="screenfull-svg"
viewBox="0 0 1024 1024"
version="1.1"
xmlns="http://www.w3.org/2000/svg"
p-id="2069"
xmlns:xlink="http://www.w3.org/1999/xlink"
width="32"
height="32"
v-if="isShow"
>
<path
d="M333.493443 428.647617 428.322206 333.832158 262.572184 168.045297 366.707916 64.444754 64.09683 64.444754 63.853283 366.570793 167.283957 262.460644Z"
p-id="2070"/>
<path
d="M854.845439 760.133334 688.61037 593.95864 593.805144 688.764889 759.554142 854.56096 655.44604 958.161503 958.055079 958.161503 958.274066 656.035464Z"
p-id="2071"/>
<path
d="M688.535669 428.550403 854.31025 262.801405 957.935352 366.921787 957.935352 64.34754 655.809313 64.081481 759.919463 167.535691 593.70793 333.731874Z"
p-id="2072"/>
<path
d="M333.590658 594.033341 167.8171 759.804852 64.218604 655.67219 64.218604 958.270996 366.342596 958.502263 262.234493 855.071589 428.421466 688.86108Z"
p-id="2073"/>
</svg> -->
<svg <svg
v-if="isShow" v-if="isShow"
t="1590133227479" t="1590133227479"
class="screenfull-svg" class="screenfull-svg"
viewBox="0 0 1024 1024" viewBox="0 0 1024 1024"
version="1.1" version="1.1"
width="20"
height="20"
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
> >
<path id="svg_1" d="m928.512,959.744a32,32 0 0 1 -32,-32l0,-256a32,32 0 0 1 64,0l0,256a32,32 0 0 1 -32,32z" /> <path id="svg_1" d="m928.512,959.744a32,32 0 0 1 -32,-32l0,-256a32,32 0 0 1 64,0l0,256a32,32 0 0 1 -32,32z" />
...@@ -63,8 +36,6 @@ ...@@ -63,8 +36,6 @@
xmlns="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg"
p-id="1862" p-id="1862"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xlink="http://www.w3.org/1999/xlink"
width="20"
height="20"
> >
<path d="M928.512 959.744a32 32 0 0 1-32-32v-256a32 32 0 0 1 64 0v256a32 32 0 0 1-32 32z" fill="" p-id="1863" /> <path d="M928.512 959.744a32 32 0 0 1-32-32v-256a32 32 0 0 1 64 0v256a32 32 0 0 1-32 32z" fill="" p-id="1863" />
<path <path
...@@ -135,13 +106,13 @@ export default { ...@@ -135,13 +106,13 @@ export default {
} }
</script> </script>
<style scoped> <style scoped lang="scss">
.screenfull-svg { .screenfull-svg {
width: 17px; width: 16px;
height: 17px; height: 16px;
cursor: pointer; cursor: pointer;
fill: #606266;
vertical-align: middle; vertical-align: middle;
margin-right: 15px; margin-right: 32px;
fill: rgba(0, 0, 0, 0.45);
} }
</style> </style>
...@@ -20,13 +20,16 @@ ...@@ -20,13 +20,16 @@
</div> </div>
</transition> </transition>
<div <div
:style="{display:'inline-block',float:'right',width:'31px',textAlign:'left',fontSize:'16px',paddingTop:'2px'}" v-if="btnShow"
class="user-box" class="user-box"
> >
<i :style="{cursor:'pointer',paddingLeft:'1px'}" class="el-icon-refresh reload" :class="[reload ? 'reloading' : '']" @click="handleReload" /> <i class="el-icon-refresh reload" :class="[reload ? 'reloading' : '']" @click="handleReload" />
</div> </div>
<div :style="{display:'inline-block',float:'right'}" class="user-box"> <div
<i :style="{cursor:'pointer'}" class="el-icon-search search-icon" @click="showSearch()" /> v-if="btnShow"
class="user-box"
>
<i class="el-icon-search search-icon" @click="showSearch()" />
</div> </div>
</div> </div>
</template> </template>
...@@ -41,6 +44,7 @@ export default { ...@@ -41,6 +44,7 @@ export default {
return { return {
value: '', value: '',
show: false, show: false,
btnShow: true,
reload: false reload: false
} }
}, },
...@@ -55,8 +59,12 @@ export default { ...@@ -55,8 +59,12 @@ export default {
}, },
hiddenSearch() { hiddenSearch() {
this.show = false this.show = false
setTimeout(() => {
this.btnShow = true
}, 500)
}, },
showSearch() { showSearch() {
this.btnShow = false
this.show = true this.show = true
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['search-input'].focus() this.$refs['search-input'].focus()
...@@ -74,10 +82,7 @@ export default { ...@@ -74,10 +82,7 @@ export default {
</script> </script>
<style scoped lang="scss"> <style scoped lang="scss">
.reload{ .reload{
font-size: 17px; font-size: 18px;
&:hover{
transform: scale(1.02)
}
} }
.reloading{ .reloading{
......
...@@ -9,30 +9,25 @@ ...@@ -9,30 +9,25 @@
> >
<div class="setting_body"> <div class="setting_body">
<div class="setting_card"> <div class="setting_card">
<div class="setting_title">侧边栏主题 (注:自定义请先配置背景色)</div>
<div class="setting_content"> <div class="setting_content">
<div class="theme-box"> <div class="theme-box">
<div class="item" @click="changeMode('light')"> <div class="item" @click="changeMode('light')">
<i v-if="mode === 'light'" class="el-icon-check check" /> <div class="item-top">
<img src="https://gw.alipayobjects.com/zos/antfincdn/NQ%24zoisaD2/jpRkZQMyYRryryPNtyIC.svg"> <i v-if="mode === 'light'" class="el-icon-check check" />
<img src="https://gw.alipayobjects.com/zos/antfincdn/NQ%24zoisaD2/jpRkZQMyYRryryPNtyIC.svg">
</div>
<p>
简约白
</p>
</div> </div>
<div class="item" @click="changeMode('dark')"> <div class="item" @click="changeMode('dark')">
<i v-if="mode === 'dark'" class="el-icon-check check" /> <div class="item-top">
<img src="https://gw.alipayobjects.com/zos/antfincdn/XwFOFbLkSM/LCkqqYNmvBEbokSDscrm.svg"> <i v-if="mode === 'dark'" class="el-icon-check check" />
</div> <img src="https://gw.alipayobjects.com/zos/antfincdn/XwFOFbLkSM/LCkqqYNmvBEbokSDscrm.svg">
</div> </div>
<div class="color-box"> <p>
<div> 商务黑
<div class="setting_title">自定义背景色</div> </p>
<el-color-picker :value="sideMode" @change="changeMode" />
</div>
<div>
<div class="setting_title">自定义基础色</div>
<el-color-picker :value="baseColor" @change="changeBaseColor" />
</div>
<div>
<div class="setting_title">活跃色</div>
<el-color-picker :value="activeColor" @change="activeColorChange" />
</div> </div>
</div> </div>
</div> </div>
...@@ -53,7 +48,7 @@ export default { ...@@ -53,7 +48,7 @@ export default {
} }
}, },
computed: { computed: {
...mapGetters('user', ['sideMode', 'baseColor', 'activeColor', 'mode']) ...mapGetters('user', ['mode'])
}, },
methods: { methods: {
handleClose() { handleClose() {
...@@ -69,20 +64,6 @@ export default { ...@@ -69,20 +64,6 @@ export default {
} }
this.$store.dispatch('user/changeSideMode', e) this.$store.dispatch('user/changeSideMode', e)
}, },
changeBaseColor(e) {
if (e === null) {
this.$store.dispatch('user/changeBaseColor', '#fff')
return
}
this.$store.dispatch('user/changeBaseColor', e)
},
activeColorChange(e) {
if (e === null) {
this.$store.dispatch('user/changeActiveColor', '#1890ff')
return
}
this.$store.dispatch('user/changeActiveColor', e)
}
} }
} }
</script> </script>
...@@ -126,17 +107,24 @@ export default { ...@@ -126,17 +107,24 @@ export default {
} }
} }
.item{ .item{
position: relative;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: center; justify-content: center;
flex-direction: column;
margin-right: 20px;
.item-top{
position: relative;
}
.check{ .check{
position: absolute; position: absolute;
font-size: 20px; font-size: 20px;
color: #00afff; color: #00afff;
right:10px;
bottom: 10px;
} }
img{ p{
margin-right: 20px; text-align: center;
font-size: 12px;
} }
} }
} }
......
...@@ -26,9 +26,9 @@ ...@@ -26,9 +26,9 @@
<li> <li>
<i class="el-icon-video-camera-solid" />中国·北京市·朝阳区 <i class="el-icon-video-camera-solid" />中国·北京市·朝阳区
</li> </li>
<el-tooltip class="item" effect="light" content="goLang/JavaScript/Vue/Gorm" placement="top"> <el-tooltip class="item" effect="light" content="GoLang/JavaScript/Vue/Gorm" placement="top">
<li> <li>
<i class="el-icon-medal-1" />goLang/JavaScript/Vue/Gorm <i class="el-icon-medal-1" />GoLang/JavaScript/Vue/Gorm
</li> </li>
</el-tooltip> </el-tooltip>
...@@ -93,8 +93,8 @@ ...@@ -93,8 +93,8 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="showPassword=false">取 消</el-button> <el-button size="small" @click="showPassword=false">取 消</el-button>
<el-button type="primary" @click="savePassword">确 定</el-button> <el-button size="small" type="primary" @click="savePassword">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
......
<template> <template>
<div> <div>
<div class="search-term"> <div class="gva-search-box">
<el-form :inline="true" :model="searchInfo"> <el-form ref="searchForm" :inline="true" :model="searchInfo">
<el-form-item label="路径"> <el-form-item label="路径">
<el-input v-model="searchInfo.path" placeholder="路径" /> <el-input v-model="searchInfo.path" placeholder="路径" />
</el-form-item> </el-form-item>
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model="searchInfo.description" placeholder="描述" /> <el-input v-model="searchInfo.description" placeholder="描述" />
</el-form-item> </el-form-item>
<el-form-item label="api组"> <el-form-item label="API组">
<el-input v-model="searchInfo.apiGroup" placeholder="api组" /> <el-input v-model="searchInfo.apiGroup" placeholder="api组" />
</el-form-item> </el-form-item>
<el-form-item label="请求"> <el-form-item label="请求">
...@@ -21,75 +21,83 @@ ...@@ -21,75 +21,83 @@
/> />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form> </el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list"> <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-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog('addApi')">新增</el-button>
<el-popover v-model:visible="deleteVisible" placement="top" width="160"> <el-popover v-model:visible="deleteVisible" placement="top" width="160">
<p>确定要删除吗?</p> <p>确定要删除吗?</p>
<div style="text-align: right; margin: 0"> <div style="text-align: right; margin-top: 8px;">
<el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button> <el-button size="mini" type="text" @click="deleteVisible = false">取消</el-button>
<el-button size="mini" type="primary" @click="onDelete">确定</el-button> <el-button size="mini" type="primary" @click="onDelete">确定</el-button>
</div> </div>
<template #reference> <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> </template>
</el-popover> </el-popover>
</div> </div>
</div> <el-table :data="tableData" @sort-change="sortChange" @selection-change="handleSelectionChange">
<el-table :data="tableData" border stripe @sort-change="sortChange" @selection-change="handleSelectionChange"> <el-table-column
<el-table-column type="selection"
type="selection" width="55"
width="55" />
/> <el-table-column align="center" label="id" min-width="60" prop="ID" sortable="custom" />
<el-table-column label="id" min-width="60" prop="ID" sortable="custom" /> <el-table-column align="center" label="API路径" min-width="150" prop="path" sortable="custom" />
<el-table-column label="api路径" min-width="150" prop="path" sortable="custom" /> <el-table-column align="center" label="API分组" min-width="150" prop="apiGroup" sortable="custom" />
<el-table-column label="api分组" min-width="150" prop="apiGroup" sortable="custom" /> <el-table-column align="center" label="API简介" min-width="150" prop="description" sortable="custom" />
<el-table-column label="api简介" min-width="150" prop="description" sortable="custom" /> <el-table-column align="center" label="请求" min-width="150" prop="method" sortable="custom">
<el-table-column label="请求" min-width="150" prop="method" sortable="custom"> <template #default="scope">
<template #default="scope"> <div>
<div> {{ scope.row.method }} / {{ methodFiletr(scope.row.method) }}
{{ scope.row.method }} </div>
<el-tag </template>
:key="scope.row.methodFiletr" </el-table-column>
:type="tagTypeFiletr(scope.row.method)"
effect="dark" <el-table-column align="center" fixed="right" label="操作" width="200">
size="mini" <template #default="scope">
>{{ methodFiletr(scope.row.method) }}</el-tag> <el-button
</div> icon="el-icon-edit"
</template> size="small"
</el-table-column> type="text"
@click="editApi(scope.row)"
>编辑</el-button>
<el-button
icon="el-icon-delete"
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>
<el-table-column fixed="right" label="操作" width="200"> </div>
<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-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle"> <el-dialog v-model="dialogFormVisible" :before-close="closeDialog" :title="dialogTitle">
<el-form ref="apiForm" :inline="true" :model="form" :rules="rules" label-width="80px"> <warning-bar title="新增API,需要在角色管理内篇日志权限才可使用" />
<el-form ref="apiForm" :model="form" :rules="rules" label-width="80px">
<el-form-item label="路径" prop="path"> <el-form-item label="路径" prop="path">
<el-input v-model="form.path" autocomplete="off" /> <el-input v-model="form.path" autocomplete="off" />
</el-form-item> </el-form-item>
<el-form-item label="请求" prop="method"> <el-form-item label="请求" prop="method">
<el-select v-model="form.method" placeholder="请选择"> <el-select v-model="form.method" placeholder="请选择" style="width:100%">
<el-option <el-option
v-for="item in methodOptions" v-for="item in methodOptions"
:key="item.value" :key="item.value"
...@@ -105,11 +113,10 @@ ...@@ -105,11 +113,10 @@
<el-input v-model="form.description" autocomplete="off" /> <el-input v-model="form.description" autocomplete="off" />
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="warning">新增Api需要在角色管理内配置权限才可使用</div>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="closeDialog">取 消</el-button> <el-button size="small" @click="closeDialog">取 消</el-button>
<el-button type="primary" @click="enterDialog">确 定</el-button> <el-button size="small" type="primary" @click="enterDialog">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
...@@ -129,6 +136,7 @@ import { ...@@ -129,6 +136,7 @@ import {
} from '@/api/api' } from '@/api/api'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
import { toSQLLine } from '@/utils/stringFun' import { toSQLLine } from '@/utils/stringFun'
import warningBar from '@/components/warningBar/warningBar.vue'
const methodOptions = [ const methodOptions = [
{ {
value: 'POST', value: 'POST',
...@@ -154,6 +162,9 @@ const methodOptions = [ ...@@ -154,6 +162,9 @@ const methodOptions = [
export default { export default {
name: 'Api', name: 'Api',
components: {
warningBar
},
mixins: [infoList], mixins: [infoList],
data() { data() {
return { return {
...@@ -201,7 +212,7 @@ export default { ...@@ -201,7 +212,7 @@ export default {
this.apis = val this.apis = val
}, },
async onDelete() { async onDelete() {
const ids = this.apis.map(item => item.ID) const ids = this.apis.forEach(item => item.ID)
const res = await deleteApisByIds({ ids }) const res = await deleteApisByIds({ ids })
if (res.code === 0) { if (res.code === 0) {
this.$message({ this.$message({
...@@ -223,6 +234,9 @@ export default { ...@@ -223,6 +234,9 @@ export default {
} }
this.getTableData() this.getTableData()
}, },
onReset() {
this.searchInfo = {}
},
// 条件搜索前端看此方法 // 条件搜索前端看此方法
onSubmit() { onSubmit() {
this.page = 1 this.page = 1
...@@ -280,12 +294,6 @@ export default { ...@@ -280,12 +294,6 @@ export default {
this.getTableData() this.getTableData()
} }
}) })
.catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
})
})
}, },
async enterDialog() { async enterDialog() {
this.$refs.apiForm.validate(async valid => { this.$refs.apiForm.validate(async valid => {
...@@ -345,9 +353,6 @@ export default { ...@@ -345,9 +353,6 @@ export default {
float: right; float: right;
} }
} }
.el-tag--mini {
margin-left: 5px;
}
.warning { .warning {
color: #dc143c; color: #dc143c;
} }
......
<template> <template>
<div class="authority"> <div class="authority">
<div class="gva-btn-list"> <div class="gva-table-box">
<el-button size="mini" type="primary" icon="el-icon-plus" @click="addAuthority('0')">新增角色</el-button> <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 align="center" label="角色名称" min-width="180" prop="authorityName" />
<el-table-column align="center" label="操作" width="460">
<template #default="scope">
<el-button
icon="el-icon-setting"
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>
<warning-bar title="注:右上角头像下拉可切换角色" style="margin-top:12px;" />
</div> </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"> <el-dialog v-model="dialogFormVisible" :title="dialogTitle">
<el-form ref="authorityForm" :model="form" :rules="rules"> <el-form ref="authorityForm" :model="form" :rules="rules" label-width="80px">
<el-form-item label="父级角色" prop="parentId"> <el-form-item label="父级角色" prop="parentId">
<el-cascader <el-cascader
v-model="form.parentId" v-model="form.parentId"
style="width:100%"
:disabled="dialogType=='add'" :disabled="dialogType=='add'"
:options="AuthorityOption" :options="AuthorityOption"
:props="{ checkStrictly: true,label:'authorityName',value:'authorityId',disabled:'disabled',emitPath:false}" :props="{ checkStrictly: true,label:'authorityName',value:'authorityId',disabled:'disabled',emitPath:false}"
...@@ -66,8 +72,8 @@ ...@@ -66,8 +72,8 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="closeDialog">取 消</el-button> <el-button size="small" @click="closeDialog">取 消</el-button>
<el-button type="primary" @click="enterDialog">确 定</el-button> <el-button size="small" type="primary" @click="enterDialog">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
...@@ -102,6 +108,7 @@ import { ...@@ -102,6 +108,7 @@ import {
import Menus from '@/view/superAdmin/authority/components/menus.vue' import Menus from '@/view/superAdmin/authority/components/menus.vue'
import Apis from '@/view/superAdmin/authority/components/apis.vue' import Apis from '@/view/superAdmin/authority/components/apis.vue'
import Datas from '@/view/superAdmin/authority/components/datas.vue' import Datas from '@/view/superAdmin/authority/components/datas.vue'
import warningBar from '@/components/warningBar/warningBar.vue'
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
export default { export default {
...@@ -109,7 +116,8 @@ export default { ...@@ -109,7 +116,8 @@ export default {
components: { components: {
Menus, Menus,
Apis, Apis,
Datas Datas,
warningBar
}, },
mixins: [infoList], mixins: [infoList],
data() { data() {
...@@ -313,7 +321,7 @@ export default { ...@@ -313,7 +321,7 @@ export default {
setAuthorityOptions(AuthorityData, optionsData, disabled) { setAuthorityOptions(AuthorityData, optionsData, disabled) {
this.form.authorityId = String(this.form.authorityId) this.form.authorityId = String(this.form.authorityId)
AuthorityData && AuthorityData &&
AuthorityData.map(item => { AuthorityData.forEach(item => {
if (item.children && item.children.length) { if (item.children && item.children.length) {
const option = { const option = {
authorityId: item.authorityId, authorityId: item.authorityId,
......
...@@ -52,7 +52,7 @@ export default { ...@@ -52,7 +52,7 @@ export default {
}) })
this.activeUserId = this.row.authorityId this.activeUserId = this.row.authorityId
this.apiTreeIds = [] this.apiTreeIds = []
res.data.paths && res.data.paths.map(item => { res.data.paths && res.data.paths.forEach(item => {
this.apiTreeIds.push('p:' + item.path + 'm:' + item.method) this.apiTreeIds.push('p:' + item.path + 'm:' + item.method)
}) })
}, },
...@@ -68,7 +68,7 @@ export default { ...@@ -68,7 +68,7 @@ export default {
buildApiTree(apis) { buildApiTree(apis) {
const apiObj = {} const apiObj = {}
apis && apis &&
apis.map(item => { apis.forEach(item => {
item.onlyId = 'p:' + item.path + 'm:' + item.method item.onlyId = 'p:' + item.path + 'm:' + item.method
if (Object.prototype.hasOwnProperty.call(apiObj, item.apiGroup)) { if (Object.prototype.hasOwnProperty.call(apiObj, item.apiGroup)) {
apiObj[item.apiGroup].push(item) apiObj[item.apiGroup].push(item)
...@@ -91,7 +91,7 @@ export default { ...@@ -91,7 +91,7 @@ export default {
async authApiEnter() { async authApiEnter() {
const checkArr = this.$refs.apiTree.getCheckedNodes(true) const checkArr = this.$refs.apiTree.getCheckedNodes(true)
var casbinInfos = [] var casbinInfos = []
checkArr && checkArr.map(item => { checkArr && checkArr.forEach(item => {
var casbinInfo = { var casbinInfo = {
path: item.path, path: item.path,
method: item.method method: item.method
......
...@@ -9,16 +9,17 @@ ...@@ -9,16 +9,17 @@
<el-checkbox-group v-model="dataAuthorityId" @change="selectAuthority"> <el-checkbox-group v-model="dataAuthorityId" @change="selectAuthority">
<el-checkbox v-for="(item,key) in authoritys" :key="key" :label="item">{{ item.authorityName }}</el-checkbox> <el-checkbox v-for="(item,key) in authoritys" :key="key" :label="item">{{ item.authorityName }}</el-checkbox>
</el-checkbox-group> </el-checkbox-group>
<span> <warning-bar title="此功能仅用于创建角色和角色的many2many关系表,具体使用还须自己结合表实现业务,详情参考示例代码(客户示例)" />
此功能仅用于创建角色和角色的many2many关系表,具体使用还须自己结合表实现业务,详情参考示例代码(客户示例)
</span>
</div> </div>
</template> </template>
<script> <script>
import { setDataAuthority } from '@/api/authority' import { setDataAuthority } from '@/api/authority'
import warningBar from '@/components/warningBar/warningBar.vue'
export default { export default {
name: 'Datas', name: 'Datas',
components: { warningBar },
props: { props: {
row: { row: {
default: function() { default: function() {
...@@ -44,7 +45,7 @@ export default { ...@@ -44,7 +45,7 @@ export default {
this.authoritys = [] this.authoritys = []
this.dataAuthorityId = [] this.dataAuthorityId = []
this.roundAuthority(this.authority) this.roundAuthority(this.authority)
this.row.dataAuthorityId && this.row.dataAuthorityId.map(item => { this.row.dataAuthorityId && this.row.dataAuthorityId.forEach(item => {
const obj = this.authoritys && this.authoritys.filter(au => au.authorityId === item.authorityId) && this.authoritys.filter(au => au.authorityId === item.authorityId)[0] const obj = this.authoritys && this.authoritys.filter(au => au.authorityId === item.authorityId) && this.authoritys.filter(au => au.authorityId === item.authorityId)[0]
this.dataAuthorityId.push(obj) this.dataAuthorityId.push(obj)
}) })
...@@ -73,7 +74,7 @@ export default { ...@@ -73,7 +74,7 @@ export default {
}, },
getChildrenId(row, arrBox) { getChildrenId(row, arrBox) {
arrBox.push(row.authorityId) arrBox.push(row.authorityId)
row.children && row.children.map(item => { row.children && row.children.forEach(item => {
this.getChildrenId(item, arrBox) this.getChildrenId(item, arrBox)
}) })
}, },
...@@ -86,7 +87,7 @@ export default { ...@@ -86,7 +87,7 @@ export default {
}, },
// 平铺角色 // 平铺角色
roundAuthority(authoritys) { roundAuthority(authoritys) {
authoritys && authoritys.map(item => { authoritys && authoritys.forEach(item => {
const obj = {} const obj = {}
obj.authorityId = item.authorityId obj.authorityId = item.authorityId
obj.authorityName = item.authorityName obj.authorityName = item.authorityName
......
...@@ -70,7 +70,7 @@ export default { ...@@ -70,7 +70,7 @@ export default {
const res1 = await getMenuAuthority({ authorityId: this.row.authorityId }) const res1 = await getMenuAuthority({ authorityId: this.row.authorityId })
const menus = res1.data.menus const menus = res1.data.menus
const arr = [] const arr = []
menus.map(item => { menus.forEach(item => {
// 防止直接选中父级造成全选 // 防止直接选中父级造成全选
if (!menus.some(same => same.parentId === item.menuId)) { if (!menus.some(same => same.parentId === item.menuId)) {
arr.push(Number(item.menuId)) arr.push(Number(item.menuId))
......
<template> <template>
<div> <div>
<div class="search-term"> <div class="gva-search-box">
<el-form :inline="true" :model="searchInfo"> <el-form :inline="true" :model="searchInfo">
<el-form-item label="字典名(中)"> <el-form-item label="字典名(中)">
<el-input v-model="searchInfo.name" placeholder="搜索条件" /> <el-input v-model="searchInfo.name" placeholder="搜索条件" />
...@@ -17,64 +17,71 @@ ...@@ -17,64 +17,71 @@
<el-form-item label="描述"> <el-form-item label="描述">
<el-input v-model="searchInfo.desc" placeholder="搜索条件" /> <el-input v-model="searchInfo.desc" placeholder="搜索条件" />
</el-form-item> </el-form-item>
<el-form-item>
<el-button size="mini" type="primary" icon="el-icon-search" @click="onSubmit">查询</el-button>
<el-button size="mini" icon="el-icon-refresh" @click="onReset">重置</el-button>
</el-form-item>
</el-form> </el-form>
</div>
<div class="gva-table-box">
<div class="gva-btn-list"> <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-button size="mini" type="primary" icon="el-icon-plus" @click="openDialog">新增</el-button>
</div> </div>
</div> <el-table
<el-table ref="multipleTable"
ref="multipleTable" :data="tableData"
:data="tableData" style="width: 100%"
border tooltip-effect="dark"
stripe row-key="ID"
style="width: 100%" >
tooltip-effect="dark" <el-table-column type="selection" width="55" />
> <el-table-column align="center" label="日期" width="180">
<el-table-column type="selection" width="55" /> <template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
<el-table-column label="日期" width="180"> </el-table-column>
<template #default="scope">{{ formatDate(scope.row.CreatedAt) }}</template>
</el-table-column>
<el-table-column label="字典名(中)" prop="name" width="120" /> <el-table-column align="center" label="字典名(中)" prop="name" width="160" />
<el-table-column label="字典名(英)" prop="type" width="120" /> <el-table-column align="center" label="字典名(英)" prop="type" width="120" />
<el-table-column label="状态" prop="status" width="120"> <el-table-column align="center" label="状态" prop="status" width="120">
<template #default="scope">{{ formatBoolean(scope.row.status) }}</template> <template #default="scope">{{ formatBoolean(scope.row.status) }}</template>
</el-table-column> </el-table-column>
<el-table-column label="描述" prop="desc" width="280" /> <el-table-column align="center" 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 align="center" label="按钮组">
<template #default="scope">
<el-button size="mini" icon="el-icon-document" type="text" @click="toDetile(scope.row)">详情</el-button>
<el-button size="mini" icon="el-icon-edit" type="text" @click="updateSysDictionary(scope.row)">变更</el-button>
<el-popover :visible="scope.row.visible" placement="top" width="160">
<p>确定要删除吗?</p>
<div style="text-align: right; margin-top: 8px;">
<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>
<warning-bar
title="获取字典且缓存方法已在前端utils/dictionary 已经封装完成 不必自己书写 使用方法查看文件内注释"
style="margin-top:12px"
/>
<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-dialog v-model="dialogFormVisible" :before-close="closeDialog" title="弹窗操作">
<el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px"> <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="110px">
<el-form-item label="字典名(中)" prop="name"> <el-form-item label="字典名(中)" prop="name">
...@@ -102,14 +109,11 @@ ...@@ -102,14 +109,11 @@
</el-form> </el-form>
<template #footer> <template #footer>
<div class="dialog-footer"> <div class="dialog-footer">
<el-button @click="closeDialog">取 消</el-button> <el-button size="small" @click="closeDialog">取 消</el-button>
<el-button type="primary" @click="enterDialog">确 定</el-button> <el-button size="small" type="primary" @click="enterDialog">确 定</el-button>
</div> </div>
</template> </template>
</el-dialog> </el-dialog>
<div style="margin-top:40px;color:red">获取字典且缓存方法已在前端utils/dictionary 已经封装完成 不必自己书写 使用方法查看文件内注释</div>
</div> </div>
</template> </template>
...@@ -122,8 +126,12 @@ import { ...@@ -122,8 +126,12 @@ import {
getSysDictionaryList getSysDictionaryList
} from '@/api/sysDictionary' // 此处请自行替换地址 } from '@/api/sysDictionary' // 此处请自行替换地址
import infoList from '@/mixins/infoList' import infoList from '@/mixins/infoList'
import warningBar from '@/components/warningBar/warningBar.vue'
export default { export default {
name: 'SysDictionary', name: 'SysDictionary',
components: {
warningBar
},
mixins: [infoList], mixins: [infoList],
data() { data() {
return { return {
...@@ -173,6 +181,9 @@ export default { ...@@ -173,6 +181,9 @@ export default {
} }
}) })
}, },
onReset() {
this.searchInfo = {}
},
// 条件搜索前端看此方法 // 条件搜索前端看此方法
onSubmit() { onSubmit() {
this.page = 1 this.page = 1
......
<template> <template>
<div> <div>
<el-form <i
ref="menuForm" class="icon"
:inline="true" :class="'el-icon-'+ metaData.icon"
label-width="85px" style="position: absolute; z-index: 9999; padding: 5px 10px; "
label-position="top" />
> <el-select v-model="metaData.icon" style="width:100%" clearable filterable class="gva-select" placeholder="请选择">
<el-form-item prop="icon" style="width:100%"> <el-option v-for="item in options" :key="item.key" :label="item.key" :value="item.key">
<i <span class="icon" :class="item.label" />
class="icon" <span style="float: left">{{ item.key }}</span>
:class="'el-icon-'+ metaData.icon" </el-option>
style="position: absolute; z-index: 9999; padding: 5px 10px; " </el-select>
/>
<el-select v-model="metaData.icon" clearable filterable class="gva-select" placeholder="请选择">
<el-option v-for="item in options" :key="item.key" :label="item.key" :value="item.key">
<span class="icon" :class="item.label" />
<span style="float: left">{{ item.key }}</span>
</el-option>
</el-select>
</el-form-item>
</el-form>
</div> </div>
</template> </template>
......
<template> <template>
<div class="previewCode"> <div class="previewCode">
<div class="previewCodeTool">
<p>操作栏:</p>
<el-button @click="selectText">全选</el-button>
<el-button @click="copy">复制</el-button>
</div>
<el-tabs v-model="activeName"> <el-tabs v-model="activeName">
<el-tab-pane v-for="(item, key) in previewCode" :key="key" :label="key" :name="key"> <el-tab-pane v-for="(item, key) in previewCode" :key="key" :label="key" :name="key">
<div :id="key" class="tab-info" /> <div :id="key" class="tab-info" />
...@@ -82,12 +77,6 @@ export default { ...@@ -82,12 +77,6 @@ export default {
<style lang="scss"> <style lang="scss">
.previewCode { .previewCode {
.previewCodeTool {
display: flex;
align-items: center;
padding: 5px 0;
margin-top: -40px;
}
.tab-info { .tab-info {
height: 50vh; height: 50vh;
background: #fff; background: #fff;
......
<template> <template>
<div class="system"> <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 --> <!-- System start -->
<h2>系统配置</h2> <h2>系统配置</h2>
<el-form-item label="环境值"> <el-form-item label="环境值">
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
<el-input v-model.number="config.system.addr" /> <el-input v-model.number="config.system.addr" />
</el-form-item> </el-form-item>
<el-form-item label="数据库类型"> <el-form-item label="数据库类型">
<el-select v-model="config.system.dbType"> <el-select v-model="config.system.dbType" style="width:100%">
<el-option value="mysql" /> <el-option value="mysql" />
<el-option value="sqlite" /> <el-option value="sqlite" />
<el-option value="sqlserver" /> <el-option value="sqlserver" />
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="Oss类型"> <el-form-item label="Oss类型">
<el-select v-model="config.system.ossType"> <el-select v-model="config.system.ossType" style="width:100%">
<el-option value="local" /> <el-option value="local" />
<el-option value="qiniu" /> <el-option value="qiniu" />
<el-option value="tencent-cos" /> <el-option value="tencent-cos" />
...@@ -373,6 +373,9 @@ export default { ...@@ -373,6 +373,9 @@ export default {
<style lang="scss"> <style lang="scss">
.system { .system {
background: #fff;
padding:12px;
border-radius: 2px;
h2 { h2 {
padding: 10px; padding: 10px;
margin: 10px 0; margin: 10px 0;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册