Commit b86d8606 authored by 赵啸非's avatar 赵啸非

前端页面添加

parent 1d77a20e
...@@ -38,6 +38,13 @@ const router = new Router({ ...@@ -38,6 +38,13 @@ const router = new Router({
...restBuilder('user', 'system/user'), // 用户管理 -- 管理用户 ...restBuilder('user', 'system/user'), // 用户管理 -- 管理用户
...restBuilder('param', 'system/param'), // 系统管理--参数管理 ...restBuilder('param', 'system/param'), // 系统管理--参数管理
...restBuilder('task', 'system/task'), // 系统管理--任务管理 ...restBuilder('task', 'system/task'), // 系统管理--任务管理
...restBuilder('access', 'access'), //链路访问日志
...restBuilder('biz', 'biz'), //业务日志
...restBuilder('biz', 'biz'), //异常日志
...restBuilder('operate', 'operate'), //操作日志
//以下为基础路由配置 //以下为基础路由配置
builder('', 'Home'), builder('', 'Home'),
......
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="追踪Id" prop="traceID" v-model="form.traceID" placeholder="请输入追踪Id"/>
<Field label="应用名称" prop="appName" v-model="form.appName" placeholder="请输入应用名称"/>
<Field label="实例IP" prop="hostName" v-model="form.hostName" placeholder="请输入实例IP"/>
<Field label="日志等级" prop="logLevel" v-model="form.logLevel" placeholder="请输入日志等级"/>
<Field label="请求者IP" prop="requestIp" v-model="form.requestIp" placeholder="请输入请求者IP"/>
<Field label="请求方式" prop="method" v-model="form.method" placeholder="请输入请求方式"/>
<Field label="用户浏览器UA" prop="ua" v-model="form.ua" placeholder="请输入用户浏览器UA"/>
<Field label="请求URI" prop="uri" v-model="form.uri" placeholder="请输入请求URI"/>
<Field label="请求参数,json序列化" prop="requestParam" v-model="form.requestParam" type="textarea" placeholder="请输入请求参数,json序列化"/>
<Field label="响应结果" prop="response" v-model="form.response" type="textarea" placeholder="请输入响应结果"/>
<Field label="日志产生时间" prop="logTime" v-model="form.logTime" type="date" />
<Field label="持续时间,单位毫秒" prop="duration" v-model="form.duration" placeholder="请输入持续时间,单位毫秒"/>
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "AccessLogDetail",
mixins: [form],
components: {
},
created() {
this.changePath("access/log")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "访问日志",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"logTime",
],
// 表单校验
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="access/log/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改访问日志";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "access/log/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增访问日志";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="access/log/view";
this.getData();
this.pageInfo.type="view"
this.title = "访问日志详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
traceID : "",
appName : "",
hostName : "",
logLevel : "",
requestIp : "",
method : "",
ua : "",
uri : "",
requestParam : "",
response : "",
logTime : null,
duration : null,
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "AccessLogList",
components: {
drawerShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
},
data() {
return {
config: {
search: [
{
name: "traceID",
type: "text",
label: "追踪Id",
fuzzy: true
},
{
name: "appName",
type: "text",
label: "应用名称",
fuzzy: true
},
{
name: "method",
type: "text",
label: "请求方式",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "追踪Id", prop: "traceID"},
{label: "应用名称", prop: "appName"},
{label: "请求方式", prop: "method"},
{label: "请求URI", prop: "uri"},
{label: "日志产生时间", prop: "logTime", formatter: this.formatterDate},
{label: "持续时间,单位毫秒", prop: "duration",formatter: this.formatter},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-view>
<el-descriptions :title="title" :column="column" :size="size" :colon="false" border>
<template slot="title">
<i class="el-icon-tickets"></i>
基本详细信息
</template>
<template slot="extra">
<el-button type="primary" @click="$router.go(-1)" size="small">返回</el-button>
</template>
<el-descriptions-item label="追踪Id" label-class-name="labelClass" content-class-name="contentClass">
{{form.traceID}}
</el-descriptions-item>
<el-descriptions-item label="应用名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.appName}}
</el-descriptions-item>
<el-descriptions-item label="实例IP" label-class-name="labelClass" content-class-name="contentClass">
{{form.hostName}}
</el-descriptions-item>
<el-descriptions-item label="日志等级" label-class-name="labelClass" content-class-name="contentClass">
{{form.logLevel}}
</el-descriptions-item>
<el-descriptions-item label="请求者IP" label-class-name="labelClass" content-class-name="contentClass">
{{form.requestIp}}
</el-descriptions-item>
<el-descriptions-item label="请求方式" label-class-name="labelClass" content-class-name="contentClass">
{{form.method}}
</el-descriptions-item>
<el-descriptions-item label="用户浏览器UA" label-class-name="labelClass" content-class-name="contentClass">
{{form.ua}}
</el-descriptions-item>
<el-descriptions-item label="请求URI" label-class-name="labelClass" content-class-name="contentClass">
{{form.uri}}
</el-descriptions-item>
<el-descriptions-item label="请求参数,json序列化" label-class-name="labelClass" content-class-name="contentClass">
{{form.requestParam}}
</el-descriptions-item>
<el-descriptions-item label="响应结果" label-class-name="labelClass" content-class-name="contentClass">
{{form.response}}
</el-descriptions-item>
<el-descriptions-item label="日志产生时间" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.logTime)}}
</el-descriptions-item>
<el-descriptions-item label="持续时间,单位毫秒" label-class-name="labelClass" content-class-name="contentClass">
{{form.duration}}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</template>
<script>
import view from "@/assets/mixins/view";
export default {
mixins: [view],
components: {
},
methods: {
},
data() {
return {
size:"small",
column:2,
toString:[
],
toArrays: [
],
toDate: [
]
}
}
}
</script>
<style lang="less">
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
</style>
\ No newline at end of file
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="追踪Id" prop="traceID" v-model="form.traceID" placeholder="请输入追踪Id"/>
<Field label="应用名称" prop="appName" v-model="form.appName" placeholder="请输入应用名称"/>
<Field label="实例IP" prop="hostName" v-model="form.hostName" placeholder="请输入实例IP"/>
<Field label="日志等级" prop="logLevel" v-model="form.logLevel" placeholder="请输入日志等级"/>
<Field label="用户唯一标识" prop="userCode" v-model="form.userCode" placeholder="请输入用户唯一标识"/>
<Field label="设备唯一标识" prop="deviceCode" v-model="form.deviceCode" placeholder="请输入设备唯一标识"/>
<Field label="记录埋点的事件主题,方便实时计算或同步进行数据筛选" prop="eventTopic" v-model="form.eventTopic" placeholder="请输入记录埋点的事件主题,方便实时计算或同步进行数据筛选"/>
<Field label="记录埋点中文名称" prop="eventTopicName" v-model="form.eventTopicName" placeholder="请输入记录埋点中文名称"/>
<Field label="事件参数,json" prop="msg" v-model="form.msg" type="textarea" placeholder="请输入事件参数,json"/>
<Field label="日志产生时间" prop="logTime" v-model="form.logTime" type="date" />
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "BizLogDetail",
mixins: [form],
components: {
},
created() {
this.changePath("biz/log")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "业务日志",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"logTime",
],
// 表单校验
rules: {
logTime: [
{required: true,message: "请选择日志产生时间" },
],
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="biz/log/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改业务日志";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "biz/log/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增业务日志";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="biz/log/view";
this.getData();
this.pageInfo.type="view"
this.title = "业务日志详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
traceID : "",
appName : "",
hostName : "",
logLevel : "",
userCode : "",
deviceCode : "",
eventTopic : "",
eventTopicName : "",
msg : "",
logTime : null,
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "BizLogList",
components: {
drawerShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
},
data() {
return {
config: {
search: [
{
name: "traceID",
type: "text",
label: "追踪Id",
fuzzy: true
},
{
name: "appName",
type: "text",
label: "应用名称",
fuzzy: true
},
{
name: "userCode",
type: "text",
label: "用户唯一标识",
fuzzy: true
},
{
name: "deviceCode",
type: "text",
label: "设备唯一标识",
fuzzy: true
},
{
name: "eventTopic",
type: "text",
label: "记录埋点的事件主题,方便实时计算或同步进行数据筛选",
fuzzy: true
},
{
name: "eventTopicName",
type: "text",
label: "记录埋点中文名称",
fuzzy: true
},
{
name: "logTime",
type: "date",
label: "日志产生时间",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "追踪Id", prop: "traceID"},
{label: "应用名称", prop: "appName"},
{label: "用户唯一标识", prop: "userCode"},
{label: "设备唯一标识", prop: "deviceCode"},
{label: "记录埋点的事件主题,方便实时计算或同步进行数据筛选", prop: "eventTopic"},
{label: "记录埋点中文名称", prop: "eventTopicName"},
{label: "日志产生时间", prop: "logTime", formatter: this.formatterDate},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-view>
<el-descriptions :title="title" :column="column" :size="size" :colon="false" border>
<template slot="title">
<i class="el-icon-tickets"></i>
基本详细信息
</template>
<template slot="extra">
<el-button type="primary" @click="$router.go(-1)" size="small">返回</el-button>
</template>
<el-descriptions-item label="追踪Id" label-class-name="labelClass" content-class-name="contentClass">
{{form.traceID}}
</el-descriptions-item>
<el-descriptions-item label="应用名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.appName}}
</el-descriptions-item>
<el-descriptions-item label="实例IP" label-class-name="labelClass" content-class-name="contentClass">
{{form.hostName}}
</el-descriptions-item>
<el-descriptions-item label="日志等级" label-class-name="labelClass" content-class-name="contentClass">
{{form.logLevel}}
</el-descriptions-item>
<el-descriptions-item label="用户唯一标识" label-class-name="labelClass" content-class-name="contentClass">
{{form.userCode}}
</el-descriptions-item>
<el-descriptions-item label="设备唯一标识" label-class-name="labelClass" content-class-name="contentClass">
{{form.deviceCode}}
</el-descriptions-item>
<el-descriptions-item label="记录埋点的事件主题,方便实时计算或同步进行数据筛选" label-class-name="labelClass" content-class-name="contentClass">
{{form.eventTopic}}
</el-descriptions-item>
<el-descriptions-item label="记录埋点中文名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.eventTopicName}}
</el-descriptions-item>
<el-descriptions-item label="事件参数,json" label-class-name="labelClass" content-class-name="contentClass">
{{form.msg}}
</el-descriptions-item>
<el-descriptions-item label="日志产生时间" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.logTime)}}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</template>
<script>
import view from "@/assets/mixins/view";
export default {
mixins: [view],
components: {
},
methods: {
},
data() {
return {
size:"small",
column:2,
toString:[
],
toArrays: [
],
toDate: [
]
}
}
}
</script>
<style lang="less">
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
</style>
\ No newline at end of file
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="追踪Id" prop="traceID" v-model="form.traceID" placeholder="请输入追踪Id"/>
<Field label="服务类型,webOS,android,IOS,服务后端" prop="serverType" v-model="form.serverType" placeholder="请输入服务类型,webOS,android,IOS,服务后端"/>
<Field label="应用名称" prop="appName" v-model="form.appName" placeholder="请输入应用名称"/>
<Field label="实例IP" prop="hostName" v-model="form.hostName" placeholder="请输入实例IP"/>
<Field label="日志等级" prop="logLevel" v-model="form.logLevel" placeholder="请输入日志等级"/>
<Field label="线程号" prop="threadNo" v-model="form.threadNo" placeholder="请输入线程号"/>
<Field label="异常堆栈信息" prop="error" v-model="form.error" type="textarea" placeholder="请输入异常堆栈信息"/>
<Field label="响应结果" prop="response" v-model="form.response" type="textarea" placeholder="请输入响应结果"/>
<Field label="日志产生时间" prop="logTime" v-model="form.logTime" type="date" />
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "ErrorLogDetail",
mixins: [form],
components: {
},
created() {
this.changePath("error/log")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "异常日志",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
],
toDate:[
"logTime",
],
// 表单校验
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="error/log/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改异常日志";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "error/log/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增异常日志";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="error/log/view";
this.getData();
this.pageInfo.type="view"
this.title = "异常日志详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
traceID : "",
serverType : "",
appName : "",
hostName : "",
logLevel : "",
threadNo : "",
error : "",
response : "",
logTime : null,
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "ErrorLogList",
components: {
drawerShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
},
data() {
return {
config: {
search: [
{
name: "traceID",
type: "text",
label: "追踪Id",
fuzzy: true
},
{
name: "serverType",
type: "text",
label: "服务类型,webOS,android,IOS,服务后端",
fuzzy: true
},
{
name: "appName",
type: "text",
label: "应用名称",
fuzzy: true
},
{
name: "logTime",
type: "date",
label: "日志产生时间",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "追踪Id", prop: "traceID"},
{label: "服务类型,webOS,android,IOS,服务后端", prop: "serverType"},
{label: "应用名称", prop: "appName"},
{label: "线程号", prop: "threadNo"},
{label: "日志产生时间", prop: "logTime", formatter: this.formatterDate},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-view>
<el-descriptions :title="title" :column="column" :size="size" :colon="false" border>
<template slot="title">
<i class="el-icon-tickets"></i>
基本详细信息
</template>
<template slot="extra">
<el-button type="primary" @click="$router.go(-1)" size="small">返回</el-button>
</template>
<el-descriptions-item label="追踪Id" label-class-name="labelClass" content-class-name="contentClass">
{{form.traceID}}
</el-descriptions-item>
<el-descriptions-item label="服务类型,webOS,android,IOS,服务后端" label-class-name="labelClass" content-class-name="contentClass">
{{form.serverType}}
</el-descriptions-item>
<el-descriptions-item label="应用名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.appName}}
</el-descriptions-item>
<el-descriptions-item label="实例IP" label-class-name="labelClass" content-class-name="contentClass">
{{form.hostName}}
</el-descriptions-item>
<el-descriptions-item label="日志等级" label-class-name="labelClass" content-class-name="contentClass">
{{form.logLevel}}
</el-descriptions-item>
<el-descriptions-item label="线程号" label-class-name="labelClass" content-class-name="contentClass">
{{form.threadNo}}
</el-descriptions-item>
<el-descriptions-item label="异常堆栈信息" label-class-name="labelClass" content-class-name="contentClass">
{{form.error}}
</el-descriptions-item>
<el-descriptions-item label="响应结果" label-class-name="labelClass" content-class-name="contentClass">
{{form.response}}
</el-descriptions-item>
<el-descriptions-item label="日志产生时间" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.logTime)}}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</template>
<script>
import view from "@/assets/mixins/view";
export default {
mixins: [view],
components: {
},
methods: {
},
data() {
return {
size:"small",
column:2,
toString:[
],
toArrays: [
],
toDate: [
]
}
}
}
</script>
<style lang="less">
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
</style>
\ No newline at end of file
<template>
<!-- 弹出框表单 -->
<el-drawer
:title="title"
:visible.sync="open"
:direction="direction"
size="50%">
<el-form ref="form" :model="form" :rules="rules" label-width="120px">
<el-row>
<Field label="平台标识" prop="platformMark" v-model="form.platformMark" placeholder="请输入平台标识"/>
<Field label="用户id" prop="userId" v-model="form.userId" placeholder="请输入用户id"/>
<Field label="用户名称" prop="userName" v-model="form.userName" placeholder="请输入用户名称"/>
<Field label="用户登录名" prop="loginName" v-model="form.loginName" placeholder="请输入用户登录名"/>
<Field label="请求地址" prop="requestUrl" v-model="form.requestUrl" placeholder="请输入请求地址"/>
<Field label="操作内容,记录操作具体信息,如修改前修改或的数据"><editor v-model="form.content" :min-height="256"/></Field>
<Field label="操作IP地址" prop="ip" v-model="form.ip" placeholder="请输入操作IP地址"/>
<Field label="操作时间" prop="logDate" v-model="form.logDate" type="date" />
<Field label="操作类型,0:新增,1:修改,2:删除" prop="operType" v-model="form.operType" type="select" :enumData="dict.operType" placeholder="请选择操作类型,0:新增,1:修改,2:删除"/>
</el-row>
<form-buttons @submit='submitForm' noCancelBtn />
</el-form>
</el-drawer>
</template>
<script>
import form from "@/assets/mixins/formdialog";
export default {
name: "OperateLogDetail",
mixins: [form],
components: {
},
created() {
this.changePath("operate/log")
},
data() {
return {
// 遮罩层
loading: true,
// 弹出层标题
title: "平台用户操作日志业务",
// 是否显示弹出层
open: false,
direction:"rtl",
toString:[
"operType",
],
toDate:[
"logDate",
],
// 表单校验
rules: {
createTime: [
{required: true,message: "请选择创建时间" },
],
}
};
},
methods: {
/** 编辑 */
edit(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="operate/log/edit";
this.getData();
this.pageInfo.type="edit"
this.title = "修改平台用户操作日志业务";
},
/** 新增 */
add(row) {
this.reset()
this.urls.currUrl = "operate/log/add";
this.getData();
this.pageInfo.type="add"
this.title = "新增平台用户操作日志业务";
},
/** 查看*/
view(row) {
this.reset()
this.query = { id: row.id };
this.urls.currUrl ="operate/log/view";
this.getData();
this.pageInfo.type="view"
this.title = "平台用户操作日志业务详细";
},
/**取消按钮 */
cancel() {
this.open = false;
},
/**获取数据后弹框 */
afterRender(data) {
this.open = true;
},
afterSubmit(data) {
this.open = false;
this.$emit("ok");
},
// 表单重置
reset() {
this.form = {
platformMark : "",
userId : null,
userName : "",
loginName : "",
requestUrl : "",
content : "",
ip : "",
logDate : null,
operType : null,
};
this.resetForm("form");
},
resetForm(refName) {
if (this.$refs[refName]) {
this.$refs[refName].resetFields();
}
},
},
};
</script>
<template>
<div class="page">
<LayoutTable :data="tableData" :config="tableConfig">
</LayoutTable>
<drawer-show ref="drawerform" @ok="getData" />
</div>
</template>
<script>
/** 表单弹出框模式需引入 */
import drawerShow from "./drawershow";
import table from "@/assets/mixins/table";
export default {
name: "OperateLogList",
components: {
drawerShow
},
mixins: [table],
created() {
},
methods: {
/** 重写新增方法 */
toAdd(row) {
this.$refs.drawerform.add(row);
},
/** 重写编辑方法 */
toEdit(row) {
this.$refs.drawerform.edit(row);
},
/** 重写查看方法 */
toView(row) {
this.$refs.drawerform.view(row);
},
},
data() {
return {
config: {
search: [
{
name: "platformMark",
type: "text",
label: "平台标识",
fuzzy: true
},
{
name: "logDate",
type: "date",
label: "操作时间",
fuzzy: true
},
],
columns: [
{type: "selection", width: 60},
{type: "index",label: "序号",width: 50},
{label: "平台标识", prop: "platformMark"},
{label: "用户名称", prop: "userName"},
{label: "用户登录名", prop: "loginName"},
{label: "请求地址", prop: "requestUrl"},
{label: "操作内容,记录操作具体信息,如修改前修改或的数据", prop: "content"},
{label: "操作IP地址", prop: "ip"},
{label: "操作时间", prop: "logDate", formatter: this.formatterDate},
{
label: "操作",
width: 240,
formatter: row => {
return (
<table-buttons noAdd row={row} onEdit={this.toEdit} onView={this.toView} onDel={this.toDel} />
);
}
}
]
}
};
}
};
</script>
\ No newline at end of file
<template>
<layout-view>
<el-descriptions :title="title" :column="column" :size="size" :colon="false" border>
<template slot="title">
<i class="el-icon-tickets"></i>
基本详细信息
</template>
<template slot="extra">
<el-button type="primary" @click="$router.go(-1)" size="small">返回</el-button>
</template>
<el-descriptions-item label="平台标识" label-class-name="labelClass" content-class-name="contentClass">
{{form.platformMark}}
</el-descriptions-item>
<el-descriptions-item label="用户id" label-class-name="labelClass" content-class-name="contentClass">
{{form.userId}}
</el-descriptions-item>
<el-descriptions-item label="用户名称" label-class-name="labelClass" content-class-name="contentClass">
{{form.userName}}
</el-descriptions-item>
<el-descriptions-item label="用户登录名" label-class-name="labelClass" content-class-name="contentClass">
{{form.loginName}}
</el-descriptions-item>
<el-descriptions-item label="请求地址" label-class-name="labelClass" content-class-name="contentClass">
{{form.requestUrl}}
</el-descriptions-item>
<el-descriptions-item label="操作内容,记录操作具体信息,如修改前修改或的数据" label-class-name="labelClass" content-class-name="contentClass">
<editor v-model="form.content" :min-height="256"/>
</el-descriptions-item>
<el-descriptions-item label="操作IP地址" label-class-name="labelClass" content-class-name="contentClass">
{{form.ip}}
</el-descriptions-item>
<el-descriptions-item label="操作时间" label-class-name="labelClass" content-class-name="contentClass">
{{ util_formatterDate(form.logDate)}}
</el-descriptions-item>
<el-descriptions-item label="操作类型,0:新增,1:修改,2:删除" label-class-name="labelClass" content-class-name="contentClass">
{{form.operType}}
</el-descriptions-item>
</el-descriptions>
</layout-view>
</template>
<script>
import view from "@/assets/mixins/view";
import Editor from '@/components/Editor';
export default {
mixins: [view],
components: {
Editor,
},
methods: {
},
data() {
return {
size:"small",
column:2,
toString:[
"operType",
],
toArrays: [
],
toDate: [
]
}
}
}
</script>
<style lang="less">
.labelClass{
width: 200px;
}
.el-descriptions__body{
margin-left: 5px;
margin-right: 5px;
color: #606266;
background-color: #FFF;
}
.contentClass{
width: 600px;
}
</style>
\ No newline at end of file
...@@ -13,11 +13,11 @@ module.exports = { ...@@ -13,11 +13,11 @@ module.exports = {
devServer: { devServer: {
inline: true, inline: true,
disableHostCheck: true, disableHostCheck: true,
port: 8084, port: 8086,
hot: true,//自动保存 hot: true,//自动保存
proxy: { proxy: {
'/m': { '/m': {
target: 'http://127.0.0.1:18222', target: 'http://127.0.0.1:18225',
changeOrigin: true, changeOrigin: true,
secure: false, secure: false,
cookieDomainRewrite: 'plm.testnew.com', cookieDomainRewrite: 'plm.testnew.com',
......
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