mirror of
https://gitee.com/xiangheng/x_admin.git
synced 2025-10-06 08:37:12 +08:00
更新数据库文件
This commit is contained in:
@@ -89,7 +89,7 @@
|
||||
</div>
|
||||
</template>
|
||||
<script lang="ts" setup>
|
||||
import type { ElTable, FormInstance } from 'element-plus'
|
||||
import type { ElTable } from 'element-plus'
|
||||
import EditPopup from './edit.vue'
|
||||
import { deptDelete, deptAll } from '@/api/org/department'
|
||||
import feedback from '@/utils/feedback'
|
||||
@@ -99,7 +99,7 @@ defineOptions({
|
||||
})
|
||||
const tableRef = shallowRef<InstanceType<typeof ElTable>>()
|
||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||
const formRef = shallowRef<FormInstance>()
|
||||
// const formRef = shallowRef<FormInstance>()
|
||||
let isExpand = false
|
||||
const loading = ref(false)
|
||||
const lists = ref<any[]>([])
|
||||
@@ -119,10 +119,10 @@ const getLists = async () => {
|
||||
loading.value = false
|
||||
}
|
||||
|
||||
const resetParams = () => {
|
||||
formRef.value?.resetFields()
|
||||
getLists()
|
||||
}
|
||||
// const resetParams = () => {
|
||||
// formRef.value?.resetFields()
|
||||
// getLists()
|
||||
// }
|
||||
|
||||
const handleAdd = async (id?: number) => {
|
||||
showEdit.value = true
|
||||
|
@@ -22,6 +22,10 @@ export default ({ mode }) => {
|
||||
// 依赖预构建,避免开发刷新
|
||||
include: ['@wangeditor/editor-for-vue', 'vuedraggable', 'vue-echarts', 'crypto-js']
|
||||
},
|
||||
build: {
|
||||
// 打包后文件名
|
||||
sourcemap: true
|
||||
},
|
||||
server: {
|
||||
open: true,
|
||||
host: '0.0.0.0',
|
||||
@@ -58,10 +62,10 @@ export default ({ mode }) => {
|
||||
}),
|
||||
viteCompression({
|
||||
algorithm: 'gzip'
|
||||
}),
|
||||
viteCompression({
|
||||
algorithm: 'brotliCompress'
|
||||
})
|
||||
// viteCompression({
|
||||
// algorithm: 'brotliCompress'
|
||||
// })
|
||||
// visualizer({
|
||||
// gzipSize: true,
|
||||
// brotliSize: true,
|
||||
|
@@ -14,18 +14,18 @@ import (
|
||||
|
||||
type MonitorProjectHandler struct{}
|
||||
|
||||
// @Summary 错误项目列表
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param PageNo query int true "页码"
|
||||
// @Param PageSize query int true "每页数量"
|
||||
// @Param projectKey query string false "项目uuid."
|
||||
// @Param projectName query string false "项目名称."
|
||||
// @Param projectType query string false "项目类型go java web node php 等."
|
||||
// @Success 200 {object} []MonitorProjectResp "成功"
|
||||
// @Failure 400 {object} string "请求错误"
|
||||
// @Router /api/admin/monitor_project/list [get]
|
||||
// @Summary 错误项目列表
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param PageNo query int true "页码"
|
||||
// @Param PageSize query int true "每页数量"
|
||||
// @Param projectKey query string false "项目uuid."
|
||||
// @Param projectName query string false "项目名称."
|
||||
// @Param projectType query string false "项目类型go java web node php 等."
|
||||
// @Success 200 {object} []MonitorProjectResp "成功"
|
||||
// @Failure 400 {object} string "请求错误"
|
||||
// @Router /api/admin/monitor_project/list [get]
|
||||
func (hd MonitorProjectHandler) List(c *gin.Context) {
|
||||
var page request.PageReq
|
||||
var listReq MonitorProjectListReq
|
||||
@@ -39,11 +39,11 @@ func (hd MonitorProjectHandler) List(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// @Summary 错误项目列表-所有
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Success 200 {object} []MonitorProjectResp "成功"
|
||||
// @Router /api/admin/monitor_project/listAll [get]
|
||||
// @Summary 错误项目列表-所有
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Success 200 {object} []MonitorProjectResp "成功"
|
||||
// @Router /api/admin/monitor_project/listAll [get]
|
||||
func (hd MonitorProjectHandler) ListAll(c *gin.Context) {
|
||||
res, err := Service.ListAll()
|
||||
// var listReq MonitorProjectListReq
|
||||
@@ -53,13 +53,13 @@ func (hd MonitorProjectHandler) ListAll(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// @Summary 错误项目详情
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id query int false "项目id."
|
||||
// @Success 200 {object} MonitorProjectResp "成功"
|
||||
// @Router /api/admin/monitor_project/detail [get]
|
||||
// @Summary 错误项目详情
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id query int false "项目id."
|
||||
// @Success 200 {object} MonitorProjectResp "成功"
|
||||
// @Router /api/admin/monitor_project/detail [get]
|
||||
func (hd MonitorProjectHandler) Detail(c *gin.Context) {
|
||||
var detailReq MonitorProjectDetailReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &detailReq)) {
|
||||
@@ -69,15 +69,15 @@ func (hd MonitorProjectHandler) Detail(c *gin.Context) {
|
||||
response.CheckAndRespWithData(c, res, err)
|
||||
}
|
||||
|
||||
// @Summary 错误项目新增
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param projectKey body string false "项目uuid."
|
||||
// @Param projectName body string false "项目名称."
|
||||
// @Param projectType body string false "项目类型go java web node php 等."
|
||||
// @Success 200 {object} response.RespType "成功"
|
||||
// @Router /api/admin/monitor_project/add [post]
|
||||
// @Summary 错误项目新增
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param projectKey body string false "项目uuid."
|
||||
// @Param projectName body string false "项目名称."
|
||||
// @Param projectType body string false "项目类型go java web node php 等."
|
||||
// @Success 200 {object} response.RespType "成功"
|
||||
// @Router /api/admin/monitor_project/add [post]
|
||||
func (hd MonitorProjectHandler) Add(c *gin.Context) {
|
||||
var addReq MonitorProjectAddReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &addReq)) {
|
||||
@@ -86,16 +86,16 @@ func (hd MonitorProjectHandler) Add(c *gin.Context) {
|
||||
response.CheckAndResp(c, Service.Add(addReq))
|
||||
}
|
||||
|
||||
// @Summary 错误项目编辑
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "项目id."
|
||||
// @Param projectKey body string false "项目uuid."
|
||||
// @Param projectName body string false "项目名称."
|
||||
// @Param projectType body string false "项目类型go java web node php 等."
|
||||
// @Success 200 {object} response.RespType "成功"
|
||||
// @Router /api/admin/monitor_project/edit [post]
|
||||
// @Summary 错误项目编辑
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "项目id."
|
||||
// @Param projectKey body string false "项目uuid."
|
||||
// @Param projectName body string false "项目名称."
|
||||
// @Param projectType body string false "项目类型go java web node php 等."
|
||||
// @Success 200 {object} response.RespType "成功"
|
||||
// @Router /api/admin/monitor_project/edit [post]
|
||||
func (hd MonitorProjectHandler) Edit(c *gin.Context) {
|
||||
var editReq MonitorProjectEditReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &editReq)) {
|
||||
@@ -104,13 +104,13 @@ func (hd MonitorProjectHandler) Edit(c *gin.Context) {
|
||||
response.CheckAndResp(c, Service.Edit(editReq))
|
||||
}
|
||||
|
||||
// @Summary 错误项目删除
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "项目id."
|
||||
// @Success 200 {object} response.RespType "成功"
|
||||
// @Router /api/admin/monitor_project/del [post]
|
||||
// @Summary 错误项目删除
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param id body int false "项目id."
|
||||
// @Success 200 {object} response.RespType "成功"
|
||||
// @Router /api/admin/monitor_project/del [post]
|
||||
func (hd MonitorProjectHandler) Del(c *gin.Context) {
|
||||
var delReq MonitorProjectDelReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyJSON(c, &delReq)) {
|
||||
@@ -119,14 +119,14 @@ func (hd MonitorProjectHandler) Del(c *gin.Context) {
|
||||
response.CheckAndResp(c, Service.Del(delReq.Id))
|
||||
}
|
||||
|
||||
// @Summary 错误项目导出
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param projectKey query string false "项目uuid."
|
||||
// @Param projectName query string false "项目名称."
|
||||
// @Param projectType query string false "项目类型go java web node php 等."
|
||||
// @Router /api/admin/monitor_project/ExportFile [get]
|
||||
// @Summary 错误项目导出
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Param Token header string true "token"
|
||||
// @Param projectKey query string false "项目uuid."
|
||||
// @Param projectName query string false "项目名称."
|
||||
// @Param projectType query string false "项目类型go java web node php 等."
|
||||
// @Router /api/admin/monitor_project/ExportFile [get]
|
||||
func (hd MonitorProjectHandler) ExportFile(c *gin.Context) {
|
||||
var listReq MonitorProjectListReq
|
||||
if response.IsFailWithResp(c, util.VerifyUtil.VerifyQuery(c, &listReq)) {
|
||||
@@ -145,9 +145,9 @@ func (hd MonitorProjectHandler) ExportFile(c *gin.Context) {
|
||||
excel.DownLoadExcel("错误项目"+time.Now().Format("2006-01-02 15:04:05"), c.Writer, f)
|
||||
}
|
||||
|
||||
// @Summary 错误项目导入
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
// @Summary 错误项目导入
|
||||
// @Tags monitor_project-错误项目
|
||||
// @Produce json
|
||||
func (hd MonitorProjectHandler) ImportFile(c *gin.Context) {
|
||||
file, _, err := c.Request.FormFile("file")
|
||||
if err != nil {
|
||||
|
@@ -27,10 +27,10 @@ func GetExcelColumnName(columnNumber int) string {
|
||||
//
|
||||
// 需要在传入的结构体中的字段加上tag:excel:"title:列头名称;index:列下标(从0开始);"
|
||||
//
|
||||
// @param list 要导出的数据
|
||||
// @param sheet 文档
|
||||
// @param title 标题
|
||||
// @param changeHead map[string]string{"Id": "账号", "Name": "真实姓名"}
|
||||
// @param list 要导出的数据
|
||||
// @param sheet 文档
|
||||
// @param title 标题
|
||||
// @param changeHead map[string]string{"Id": "账号", "Name": "真实姓名"}
|
||||
func NormalDynamicExport(list interface{}, sheet string, title string, changeHead map[string]string) (file *excelize.File, err error) {
|
||||
e := ExcelInit()
|
||||
err = ExportExcel(sheet, title, list, changeHead, e)
|
||||
|
960
sql/x_admin.sql
960
sql/x_admin.sql
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user