Commit 0b9e5e12 authored by 王鹏云's avatar 王鹏云
parents 14afc05e b14d749a
import request from '@/utils/request'
import Qs from 'qs'
/**
* 1. 列表查询
* 2. 查询详细信息
* 3. 新增
* 4. 修改
* 5. 逻辑删除
* 6. 导出
*
*/
// 1. 查询标签信息列表
export function listResLabelInfo(query) {
return request({
url: '/reslabelinfo/list',
method: 'get',
params: query
})
}
// 2. 查询标签信息详细信息
export function getResLabelInfo(businessId) {
return request({
url: '/reslabelinfo/detail/' + businessId,
method: 'get'
})
}
// 3. 新增标签信息
export function addResLabelInfo(data) {
data = Qs.stringify(data)
return request({
url: '/reslabelinfo/add',
method: 'post',
data: data
})
}
// 4. 修改标签信息
export function updateResLabelInfo(data) {
const businessId = data.businessId
data = Qs.stringify(data)
return request({
url: '/reslabelinfo/update/' + businessId,
method: 'put',
data
})
}
// 5. 逻辑删除标签信息
export function delResLabelInfo(businessId) {
return request({
url: '/reslabelinfo/deleteLogical/' + businessId,
method: 'delete'
})
}
// 6. 导出标签信息
export function exportResLabelInfo(query) {
return request({
url: '/reslabelinfo/export',
method: 'get',
params: query,
responseType: 'blob'
})
}
......@@ -5,9 +5,7 @@
font-family: Microsoft YaHei;
font-weight: 700;
text-align: LEFT;
position: absolute;
left: 0.25rem;
top: 0.45rem;
margin-bottom: 10px;
// background-color: #000;
}
.container {
......
$color-theme: #f4ac10;
.dictBtnRow{
text-align: end;
margin-right: 9px;
}
.dict-manage {
font-size: 18px;
padding: 0;
......
......@@ -236,7 +236,7 @@
}
#app .sidebar-container .el-submenu .el-menu-item.is-active {
background-color: #171725 !important;
background-color: #1D2B36 !important;
}
.router-link-active .el-menu-item.is-active {
......
......@@ -88,7 +88,7 @@ $menuBg: #1d2b36;
$menuHover:#2288ff;
$subMenuBg:#1A2229;
$subMenuHover:#1A2229;
$subMenuHover:#1D2B36;
$sideBarWidth: 13.25rem;
$sideHideWidth: 3rem;
......
<template>
<div class="errLog-manage">
<div v-if="themeType === '8'" class="tableTitle">异常日志列表</div>
<div class="search">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="系统模块" prop="title">
......@@ -57,7 +58,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">异常日志列表</div>
<div v-if="themeType !== '8'" class="tableTitle">异常日志列表</div>
<el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column :show-overflow-tooltip="true" label="系统模块" align="center" prop="systemMode">
......@@ -264,6 +265,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="loginInfo-manage">
<div v-if="themeType === '8'" class="tableTitle">登录日志列表</div>
<div class="search">
<el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="用户名称" prop="userName">
......@@ -48,7 +49,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">登录日志列表</div>
<div v-if="themeType !== '8'" class="tableTitle">登录日志列表</div>
<el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange">
<el-table-column type="index" width="55" label="序号" align="center" />
<el-table-column label="用户名称" align="center" prop="username" />
......@@ -213,6 +214,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="operlog-manage">
<div v-if="themeType === '8'" class="tableTitle">操作日志列表</div>
<div class="search">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="系统模块" prop="title">
......@@ -57,7 +58,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">操作日志列表</div>
<div v-if="themeType !== '8'" class="tableTitle">操作日志列表</div>
<el-table v-loading="loading" border :data="list" @selection-change="handleSelectionChange">
<el-table-column type="index" width="55" align="center" />
<!-- <el-table-column :show-overflow-tooltip="true" label="日志编号" width="100" align="center" prop="operId">-->
......@@ -298,6 +299,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="app-container">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="名称" prop="labelName">
<el-input
v-model="queryParams.labelName"
placeholder="请输入名称"
clearable
:maxlength="255"
size="small"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="分类(1模版,2镜像,3数据集)" prop="labelType">
<el-input
v-model="queryParams.labelType"
placeholder="请输入分类(1模版,2镜像,3数据集)"
clearable
:maxlength="1"
size="small"
style="width: 150px"
/>
</el-form-item>
<el-form-item label="状态" prop="flag">
<el-select v-model="queryParams.flag" placeholder="请选择状态" clearable size="small">
<el-option
v-for="dict in statusOptions"
:key="dict.dictValue"
:label="dict.dictLabel"
:value="dict.dictValue"
/>
</el-select>
</el-form-item>
<el-form-item>
<el-button
:class="commonField.queryClass"
:type="commonField.typePrimary"
:icon="commonField.queryIcon"
:size="commonField.smallSize"
@click="handleQuery"
>查询</el-button>
<el-button
:class="commonField.resetClass"
:icon="commonField.resetIcon"
:size="commonField.smallSize"
@click="resetQuery"
>重置</el-button>
</el-form-item>
<div style="float: right">
<el-form-item>
<el-button
:class="commonField.addClass"
:type="commonField.typePrimary"
:icon="commonField.addIcon"
:size="commonField.smallSize"
@click="handleAdd"
>新增</el-button>
<el-button
:class="commonField.exportClass"
:type="commonField.typeSuccess"
:icon="commonField.exportIcon"
:size="commonField.smallSize"
@click="handleExport"
>导出</el-button>
</el-form-item>
</div>
</el-form>
<div class="placeholder" />
<div style="padding:5px 10px">
<div class="mb12 font-small-bold">标签信息列表</div>
<el-table v-loading="loading" border :data="resLabelInfoList">
<el-table-column type="index" label="序号" width="55" align="center" />
<el-table-column label="名称" prop="labelName" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.labelName || '-' }}
</template>
</el-table-column>
<el-table-column label="分类(1模版,2镜像,3数据集)" prop="labelType" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.labelType || '-' }}
</template>
</el-table-column>
<el-table-column label="权重" prop="weight" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.weight || '-' }}
</template>
</el-table-column>
<el-table-column width="120" label="状态" prop="flag">
<template slot-scope="scope">
<el-switch
v-model="scope.row.flag"
class="switchDisabledStyle"
inactive-value="0"
active-value="1"
@click.native="handleStatusChange(scope.row)"
/>
</template>
</el-table-column>
<el-table-column label="备注" prop="remarks" :show-overflow-tooltip="true">
<template slot-scope="scope">
{{ scope.row.remarks || '-' }}
</template>
</el-table-column>
<el-table-column label="创建时间" prop="createDate" :show-overflow-tooltip="true">
<template slot-scope="scope">
<span>{{ scope.row.createDate | transformDateByFormat('YYYY-MM-DD HH:mm') }}</span>
</template>
</el-table-column>
<el-table-column label="操作" class-name="small-padding fixed-width" width="200px">
<template slot-scope="scope">
<el-button
:class="commonField.updateClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleUpdate(scope.row)"
>修改</el-button>
<el-button
:class="commonField.delClass"
:type="commonField.typeParent"
:size="commonField.size"
@click="handleDelete(scope.row)"
>删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<pagination
v-show="total>0"
:total="total"
:page.sync="queryParams.page"
:limit.sync="queryParams.rows"
@pagination="getList"
/>
<!-- 添加或修改标签信息配置对话框 -->
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="90px">
<el-form-item label="名称" prop="labelName">
<el-input v-model.trim="form.labelName" show-word-limit :maxlength="255" placeholder="请输入名称" />
</el-form-item>
<el-form-item label="分类(1模版,2镜像,3数据集)" prop="labelType">
<el-input v-model.trim="form.labelType" show-word-limit :maxlength="1" placeholder="请输入分类(1模版,2镜像,3数据集)" />
</el-form-item>
<el-form-item label="权重" prop="weight">
<el-input-number v-model.trim="form.weight" controls-position="right" :min="0" />
</el-form-item>
<el-form-item label="状态">
<el-radio-group v-model="form.flag">
<el-radio label="1">启用</el-radio>
<el-radio label="0">停用</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="备注" prop="remarks">
<el-input v-model.trim="form.remarks" maxlength="200" show-word-limit type="textarea" placeholder="请输入内容" />
</el-form-item>
</el-form>
<div slot="footer" class="dialog-footer">
<el-button class="cancelBtn" @click="cancel">取 消</el-button>
<el-button class="submitBtn" type="primary" @click="submitForm">确 定</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
import {
listResLabelInfo,
getResLabelInfo,
delResLabelInfo,
addResLabelInfo,
updateResLabelInfo,
exportResLabelInfo } from '@/api/resLabelInfo'
import commonField from '@/utils/commonField'
export default {
name: 'ResLabelInfo',
data() {
return {
// 遮罩层
loading: true,
// 总条数
total: 0,
// 标签信息表格数据
resLabelInfoList: [],
// 弹出层标题
title: '',
// 是否显示弹出层
open: false,
// 状态菜单
statusOptions: [
{
dictLabel: '启用',
dictValue: '1'
},
{
dictLabel: '停用',
dictValue: '0'
}
],
// 查询参数
queryParams: {
page: 1,
rows: 10,
labelName: undefined,
labelType: undefined,
weight: undefined,
flag: ''
},
// 表单参数
form: {},
// 表单校验
rules: {
}
}
},
computed: {
commonField() {
return commonField
}
},
created() {
this.getList() // 列表查询
},
methods: {
/** 查询标签信息列表 */
getList() {
this.loading = true
listResLabelInfo(this.queryParams).then(
response => {
this.resLabelInfoList = response.rows
this.total = response.total
this.loading = false
}
)
},
// 取消按钮
cancel() {
this.open = false
this.reset()
},
// 表单重置
reset() {
this.form = {
businessId: undefined,
remarks: undefined,
labelName: undefined,
labelType: undefined,
weight: undefined,
flag: '1'
}
this.resetForm('form')
},
/** 查询按钮操作 */
handleQuery() {
this.queryParams.page = 1
this.getList()
},
/** 重置按钮操作 */
resetQuery() {
this.queryParams = {
page: 1,
rows: 10,
labelName: undefined,
labelType: undefined,
weight: undefined,
flag: ''
}
this.handleQuery()
},
/** 新增按钮操作 */
handleAdd() {
this.reset()
this.open = true
this.title = '添加标签信息'
},
/** 修改按钮操作 */
handleUpdate(row) {
this.reset()
const id = row.businessId
getResLabelInfo(id).then(response => {
this.form = response.data
this.open = true
this.title = '修改标签信息'
})
},
// 改变状态
handleStatusChange(row) {
const text = row.flag === '1' ? '启用' : '停用'
this.$confirm('确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return updateResLabelInfo(row)
}).then(() => {
this.$message({
message: text + '成功',
type: 'success'
})
}).catch(function() {
row.flag = row.flag === '0' ? '1' : '0'
})
},
/** 提交按钮 */
submitForm: function() {
this.$refs['form'].validate(valid => {
if (valid) {
if (this.form.businessId !== undefined) {
updateResLabelInfo(this.form).then(response => {
this.msgSuccess('修改成功')
this.open = false
this.getList()
})
} else {
addResLabelInfo(this.form).then(response => {
this.msgSuccess('新增成功')
this.open = false
this.getList()
})
}
}
})
},
/** 删除按钮操作 */
handleDelete(row) {
const id = row.businessId
this.$confirm('是否确认操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return delResLabelInfo(id)
}).then(() => {
this.getList()
this.$message({
message: '删除成功',
type: 'success'
})
}).catch(function() {
})
},
/** 导出按钮操作 */
handleExport() {
const queryParams = this.queryParams
this.$confirm('是否确认操作?', '警告', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(function() {
return exportResLabelInfo(queryParams).then(response => {
const blob = new Blob([response])
const downloadElement = document.createElement('a')
const href = window.URL.createObjectURL(blob)// 创建下载的链接
downloadElement.href = href
downloadElement.download = '标签信息信息' + '.xls' // 下载后文件名
document.body.appendChild(downloadElement)
downloadElement.click()// 点击下载
document.body.removeChild(downloadElement)// 下载完成移除元素
window.URL.revokeObjectURL(href)// 释放掉blob对象
})
})
}
}
}
</script>
<style lang="scss" scoped>
.app-container {
font-size: 18px;
padding: 0;
.placeholder {
height: 1.3vh;
background-color: #F4F4F4;
margin-bottom: 10px
}
}
</style>
<template>
<div class="dept-manage">
<div v-if="themeType === '8'" class="tableTitle">部门管理列表</div>
<div class="search">
<el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="部门名称" prop="deptName">
......@@ -53,7 +54,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">部门管理列表</div>
<div v-if="themeType !== '8'" class="tableTitle">部门管理列表</div>
<el-table
v-loading="Loading"
:data="deptList"
......@@ -236,6 +237,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="dictData-manage">
<div v-if="themeType === '8'" class="tableTitle">字典参数列表</div>
<div class="search">
<el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="字典名称" prop="dictType">
......@@ -36,8 +37,8 @@
<el-button class="queryBtn" type="primary" icon="el-icon-search" size="small" @click="handleQuery">查询</el-button>
<el-button class="resetBtn" icon="el-icon-refresh" size="small" @click="resetQuery">重置</el-button>
</el-form-item>
<div style="padding-bottom: 15px">
<coolbutton :class-name="commonField.addClass" :type="commonField.typePrimary" :name="commonField.addName" :icon="commonField.addIcon" :size="commonField.size" :haspermi="hasDataAddPerm" @btn-click="handleAdd" />
<div style="padding-bottom: 15px" class="dictBtnRow">
<coolbutton :class-name="commonField.addClass" :type="commonField.typePrimary" :name="commonField.addName" :icon="commonField.addIcon" :size="commonField.size" :haspermi="hasDataAddPerm" @btn-click="handleAdd" />
<el-button
class="importBtn"
type="warning"
......@@ -60,7 +61,7 @@
</div>
<div class="placeholder" />
<div style="padding:10px">
<div class="mb12 font-small-bold">字典参数列表</div>
<div v-if="themeType !== '8'" class="tableTitle">字典参数列表</div>
<el-table v-loading="loading" :data="dataList" border @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" />
<el-table-column label="字典编码" align="center" prop="businessId" />
......@@ -283,6 +284,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="dict-manage">
<div v-if="themeType === '8'" class="tableTitle">字典管理列表</div>
<div class="search">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="字典名称" prop="dictName">
......@@ -69,8 +70,8 @@
@click="resetQuery"
>{{ commonField.resetName }}</el-button>
</el-form-item>
<div style="padding-bottom: 15px">
<!-- //新增按钮-->
<div style="padding-bottom: 15px" class="dictBtnRow">
<!-- //新增按钮-->
<el-button
v-hasPermi="hasDictAddPerm"
:class="commonField.addClass"FR
......@@ -93,7 +94,7 @@
</el-form>
</div>
<div style="min-height: 445px;padding:5px 10px">
<div class="tableTitle">字典管理列表</div>
<div v-if="themeType !== '8'" class="tableTitle">字典管理列表</div>
<el-table v-loading="loading" border :data="typeList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="55" align="center" />
<!-- <el-table-column label="字典编号" align="center" prop="businessId" />-->
......@@ -299,6 +300,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="menu-manage">
<div v-if="themeType === '8'" class="tableTitle">菜单管理列表</div>
<div class="search">
<el-form style="padding: 0 0 0 10px" :inline="true">
<el-form-item label="菜单名称">
......@@ -45,7 +46,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">菜单管理列表</div>
<div v-if="themeType !== '8'" class="tableTitle">菜单管理列表</div>
<el-table
v-loading="loading"
:data="menuList"
......@@ -345,6 +346,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="role-manage">
<div v-if="themeType == '8'" class="tableTitle">角色管理列表</div>
<div class="search">
<el-form ref="queryForm" style="padding: 0 0 0 10px" :model="queryParams" :inline="true">
<el-form-item label="角色名称" prop="roleName">
......@@ -81,7 +82,7 @@
</el-form>
</div>
<div style="padding:5px 10px">
<div class="tableTitle">角色管理列表</div>
<div v-if="themeType !== '8'" class="tableTitle">角色管理列表</div>
<el-table v-loading="loading" border :data="roleList" @selection-change="handleSelectionChange">
<el-table-column type="index" label="序号" width="90" />
<el-table-column label="名称" prop="roleName" :show-overflow-tooltip="true">
......@@ -399,6 +400,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
<template>
<div class="user-manage">
<div v-if="themeType === '8'" class="tableTitle">用户管理列表</div>
<div class="search">
<el-form v-show="showSearch" ref="queryForm" style="padding: 0 0 0 10px" class="formClass" :model="queryParams" :inline="true" label-width="auto">
<el-form-item label="登录名" prop="username">
......@@ -114,7 +115,7 @@
</el-col>
<!--用户数据-->
<el-col :span="20" :xs="24">
<div class="tableTitleUser">用户管理列表</div>
<div v-if="themeType === '8'" class="tableTitle">用户管理列表</div>
<el-table
v-loading="loading"
style="padding-right: 10px"
......@@ -612,6 +613,9 @@ export default {
}
},
computed: {
themeType() {
return localStorage.getItem('theme')
},
commonField() {
return commonField
}
......
......@@ -91,7 +91,7 @@ module.exports = {
// 直接修改 terserOptions 下的属性值,保留原有配置
// 这里访问 terserOptions 的时候并没有 output,访问不到 output.comments 需要直接赋值
args[0].terserOptions.output = {
comments: false,
comments: false
}
return args
})
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment