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