Commit 3dbdbcce authored by zhanglongtao's avatar zhanglongtao

异常信息状态修改

parent bade8ef3
...@@ -1177,6 +1177,8 @@ export default { ...@@ -1177,6 +1177,8 @@ export default {
requestUrl: '服务地址', requestUrl: '服务地址',
requestParam: '参数', requestParam: '参数',
exception: '异常详细信息', exception: '异常详细信息',
remark:'备注'
}, },
user_message_config: { user_message_config: {
creationTime: '创建时间', creationTime: '创建时间',
......
<template> <template>
<div class="detail"> <div class="detail">
<Row>
<Row> <!-- <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<!-- <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed> <Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed> <Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed> <Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed> <Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed> <Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed> --> <Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed> -->
<Filed :span="12" :name="l('timestamp')">{{entity.timestamp}}</Filed> <Filed :span="12" :name="l('timestamp')">{{ entity.timestamp }}</Filed>
<Filed :span="12" :name="l('level')">{{entity.level}}</Filed> <Filed :span="12" :name="l('level')">{{ entity.level }}</Filed>
<!-- <Filed :span="12" :name="l('messageTemplate')">{{entity.messageTemplate}}</Filed> --> <!-- <Filed :span="12" :name="l('messageTemplate')">{{entity.messageTemplate}}</Filed> -->
<Filed :span="12" :name="l('renderedMessage')">{{entity.renderedMessage}}</Filed> <Filed :span="12" :name="l('renderedMessage')">{{
<Filed :span="12" :name="l('clientIpAddress')">{{entity.clientIpAddress}}</Filed> entity.renderedMessage
<Filed :span="12" :name="l('loginName')">{{entity.loginName}}</Filed> }}</Filed>
<Filed :span="12" :name="l('tanentCode')">{{entity.tanentCode}}</Filed> <Filed :span="12" :name="l('clientIpAddress')">{{
<Filed :span="12" :name="l('host')">{{entity.host}}</Filed> entity.clientIpAddress
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed> }}</Filed>
<Filed :span="12" :name="l('requestUrl')">{{entity.requestUrl}}</Filed> <Filed :span="12" :name="l('loginName')">{{ entity.loginName }}</Filed>
<Filed :span="12" :name="l('requestParam')">{{entity.requestParam}}</Filed> <Filed :span="12" :name="l('tanentCode')">{{ entity.tanentCode }}</Filed>
<Filed :span="24" :name="l('exception')">{{entity.exception}}</Filed> <Filed :span="12" :name="l('host')">{{ entity.host }}</Filed>
</Row> <Filed :span="12" :name="l('status')">{{ entity.status }}</Filed>
</div> <Filed :span="12" :name="l('requestUrl')">{{ entity.requestUrl }}</Filed>
<Filed :span="12" :name="l('requestParam')">{{
entity.requestParam
}}</Filed>
<Filed :span="24" :name="l('exception')">{{ entity.exception }}</Filed>
</Row>
<Form
class="form"
ref="form"
:model="entity"
:rules="rules"
:label-width="90"
>
<Row>
<Col :span="12">
<FormItem :label="l('status')" prop="status">
<Dictionary
code="error.status"
v-model="entity.status"
type="radio"
></Dictionary>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('remark')" prop="remark">
<Input v-model="entity.remark" type="textarea" :rows="5"></Input>
</FormItem>
</Col>
</Row>
<FormItem>
<Button type="primary" @click="handleSubmit" :disabled="disabled"
>保存</Button
>
<Button @click="handleClose" class="ml20">取消</Button>
</FormItem>
</Form>
</div>
</template> </template>
<script> <script>
import Api from './api' import Api from "./api";
export default { export default {
name: 'Add', name: "Add",
data() { data() {
return { return {
entity: {}, entity: {
rules: { exception: "",
name: [{ required: true, message: '必填', trigger: 'blur' }], properties: {},
code: [{ required: true, message: '必填', trigger: 'blur' }] status: 0,
} },
} rules: {
}, name: [{ required: true, message: "必填", trigger: "blur" }],
props: { code: [{ required: true, message: "必填", trigger: "blur" }],
eid: Number },
}, disabled: false,
mounted() { };
if (this.eid) { },
this.load(this.eid); props: {
} eid: "",
}, },
methods: { mounted() {
load(v) { if (this.eid) {
Api.get({ id: v }).then(r => { this.load(this.eid);
this.entity = r.result;
this.$emit('on-load')
})
},
handleClose() {
this.$emit('on-close')
},
l(key) {
key = "run_log" + "." + key;
return this.$t(key)
}
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
}
}
} }
},
methods: {
load(v) {
Api.get({ id: v }).then((r) => {
if (r.result.status == "" || r.result.status == null) {
r.result.status = 0;
}
this.entity = r.result;
this.$emit("on-load");
});
},
handleClose() {
this.$emit("on-close");
},
l(key) {
key = "run_log" + "." + key;
return this.$t(key);
},
handleSubmit() {
this.disabled = true;
Api.update({
id: this.entity.id,
status: this.entity.status,
remark: this.entity.remark,
})
.then((r) => {
this.disabled = false;
if (r.success) {
this.$Message.success("保存成功");
this.$emit("on-ok");
} else {
this.$Message.error("保存失败");
}
})
.catch((err) => {
this.disabled = false;
this.$Message.error("保存失败");
cosole.warn(err);
});
},
},
watch: {
eid(v) {
if (v > 0) {
this.load(v);
}
},
},
};
</script> </script>
\ No newline at end of file
<template> <template>
<div> <div>
<DataGrid :columns="columns" ref="grid" :action="action" exportTitle="异常记录"> <DataGrid
<template slot="easySearch"> :columns="columns"
<Form ref="formInline" :model="easySearch" inline> ref="grid"
<FormItem prop="keys"> :action="action"
<Input placeholder="请输入关键字登录账号/租户编号" v-model="easySearch.keys.value" v-width="300" /> exportTitle="异常记录"
</FormItem> >
<FormItem> <template slot="easySearch">
<Button type="primary" @click="search">查询</Button> <Form ref="formInline" :model="easySearch" inline>
</FormItem> <FormItem prop="keys">
</Form> <Input
</template> placeholder="请输入关键字登录账号/租户编号"
<template slot="searchForm"> v-model="easySearch.keys.value"
<Search /> v-width="300"
</template> />
<template slot="buttons"> </FormItem>
<DatePicker type="date" v-model="end" placeholder="选择终止日期" style="width: 150px"></DatePicker> <FormItem>
<Button type="error" @click="clear" :disabled="dis">清理</Button> <Button type="primary" @click="search">查询</Button>
</template> </FormItem>
</Form>
</template>
<template slot="searchForm">
<Search />
</template>
<template slot="buttons">
<DatePicker
type="date"
v-model="end"
placeholder="选择终止日期"
style="width: 150px"
></DatePicker>
<Button type="error" @click="clear" :disabled="dis">清理</Button>
</template>
</DataGrid> </DataGrid>
<Modal v-model="modal" :title="title" fullscreen footer-hide> <Modal v-model="modal" :title="title" fullscreen footer-hide>
<component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" /> <component :is="detail" :eid="curId" @on-close="cancel" @on-ok="ok" />
</Modal> </Modal>
</div> </div>
</template> </template>
<script> <script>
import Api from "./api"; import Api from "./api";
import Search from "./search"; import Search from "./search";
export default { export default {
name: "list", name: "list",
components: { components: {
Search, Search,
}, },
head: { head: {
title: "系统异常日志", title: "系统异常日志",
author: "henq", author: "henq",
description: "run_log 7/23/2020 10:55:35 AM", description: "run_log 7/23/2020 10:55:35 AM",
}, },
data() { data() {
return { return {
action: Api.index, action: Api.index,
easySearch: { easySearch: {
keys: { keys: {
op: "loginName,tanentCode", op: "loginName,tanentCode",
value: null value: null,
}, },
}, },
end: null, end: null,
modal: false, modal: false,
title: "新增", title: "新增",
detail: null, detail: null,
curId: 0, curId: 0,
columns: [{ columns: [
key: "id", {
title: this.$t("id"), key: "id",
hide: true, title: this.$t("id"),
align: "left", hide: true,
high: true, align: "left",
}, high: true,
// { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true }, },
// { key:"creatorUserId",title:this.l("creatorUserId") ,align:"left" ,high:true }, // { key:"creationTime",title:this.l("creationTime") ,align:"left" ,high:true },
// { key:"lastModificationTime",title:this.l("lastModificationTime") ,align:"left" ,high:true }, // { key:"creatorUserId",title:this.l("creatorUserId") ,align:"left" ,high:true },
// { key:"lastModifierUserId",title:this.l("lastModifierUserId") ,align:"left" ,high:true }, // { key:"lastModificationTime",title:this.l("lastModificationTime") ,align:"left" ,high:true },
// { key:"isDeleted",title:this.l("isDeleted") ,align:"left" ,high:true }, // { key:"lastModifierUserId",title:this.l("lastModifierUserId") ,align:"left" ,high:true },
// { key:"deletionTime",title:this.l("deletionTime") ,align:"left" ,high:true }, // { key:"isDeleted",title:this.l("isDeleted") ,align:"left" ,high:true },
// { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true }, // { key:"deletionTime",title:this.l("deletionTime") ,align:"left" ,high:true },
// { key:"deleterUserId",title:this.l("deleterUserId") ,align:"left" ,high:true },
{
key: "level",
title: this.l("level"),
align: "left",
high: true,
width: 100,
},
{
key: "requestUrl",
title: this.l("requestUrl"),
align: "left",
width: 300,
high: true,
tooltip: true,
},
// { key:"messageTemplate",title:this.l("messageTemplate") ,align:"left" ,high:true },
{
key: "renderedMessage",
title: this.l("renderedMessage"),
align: "left",
high: true,
tooltip: true,
},
{
key: "timestamp",
title: this.l("timestamp"),
align: "left",
high: true,
width: 200,
},
{
key: "clientIpAddress",
title: this.l("clientIpAddress"),
align: "left",
width: 150,
high: true,
},
{
key: "loginName",
title: this.l("loginName"),
align: "left",
easy: true,
high: true,
width: 150,
},
{
key: "tanentCode",
title: this.l("tanentCode"),
align: "left",
easy: true,
high: true,
width: 80,
},
{
key: "host",
title: this.l("host"),
align: "left",
hide: true,
high: true,
},
// { key:"status",title:this.l("status") ,align:"left" ,high:true },
{
key: "requestParam",
title: this.l("requestParam"),
hide: true,
align: "left",
high: true,
},
// { key:"exception",title:this.l("exception") ,align:"left" ,high:true },
{
title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h("div", {
class: "action"
}, [
h(
"op", {
attrs: {
oprate: "detail"
},
on: {
click: () => this.view(params.row.id)
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h(
"op", {
attrs: {
oprate: "delete"
},
on: {
click: () => this.remove(params.row.id)
},
},
"删除"
),
]);
},
},
],
};
},
created() {
var date = new Date().getTime() - 24 * 60 * 60 * 1000 * 5;
this.end = new Date(date);
console.log(this); {
}, key: "level",
async fetch({ title: this.l("level"),
store, align: "left",
params high: true,
}) { width: 100,
await store.dispatch("loadDictionary"); // 加载数据字典 },
}, {
methods: { key: "requestUrl",
ok() { title: this.l("requestUrl"),
this.$refs.grid.load(); align: "left",
this.modal = false; width: 300,
this.curId = 0; high: true,
tooltip: true,
},
// { key:"messageTemplate",title:this.l("messageTemplate") ,align:"left" ,high:true },
{
key: "renderedMessage",
title: this.l("renderedMessage"),
align: "left",
high: true,
tooltip: true,
}, },
search() { {
this.$refs.grid.reload(this.easySearch); key: "timestamp",
title: this.l("timestamp"),
align: "left",
high: true,
width: 200,
}, },
add() { {
this.curId = 0; key: "clientIpAddress",
this.title = "新增"; title: this.l("clientIpAddress"),
this.detail = () => import("./add"); align: "left",
this.modal = true; width: 150,
high: true,
}, },
copy(id) { {
this.curId = id; key: "loginName",
this.title = "克隆"; title: this.l("loginName"),
this.detail = () => import("./add"); align: "left",
this.modal = true; easy: true,
high: true,
width: 150,
}, },
view(id) { {
this.curId = id; key: "tanentCode",
this.title = "详情"; title: this.l("tanentCode"),
this.detail = () => import("./detail"); align: "left",
this.modal = true; easy: true,
high: true,
width: 80,
}, },
edit(id) { {
this.curId = id; key: "host",
this.title = "编辑"; title: this.l("host"),
this.detail = () => import("./edit"); align: "left",
this.modal = true; hide: true,
high: true,
}, },
remove(id) { {
Api.delete(id).then((r) => { key: "status",
if (r.success) { title: this.l("status"),
this.$refs.grid.load(); align: "left",
this.$Message.success("删除成功"); high: true,
} render: (h, params) => {
}); return h("span", {}, params.row.status == 1 ? "已解决" : "未解决");
},
}, },
clear() { { key: "remark", title: this.l("remark"), align: "left", high: true },
this.$Modal.confirm({ {
title: "确认", key: "requestParam",
content: "确认要删除" + this.$u.toDate(this.end) + "以前的数据吗", title: this.l("requestParam"),
onOk: () => { hide: true,
Api.deleteAll(this.end).then(r => { align: "left",
if (r.success) { high: true,
this.$Message.success("删除成功")
this.$refs.grid.load();
} else {
this.$Message.error("出现异常")
}
})
}
})
}, },
cancel() { // { key:"exception",title:this.l("exception") ,align:"left" ,high:true },
this.curId = 0; {
this.modal = false; title: "操作",
key: "action",
width: 140,
align: "center",
render: (h, params) => {
return h(
"div",
{
class: "action",
},
[
h(
"op",
{
attrs: {
oprate: "detail",
},
on: {
click: () => this.view(params.row.id),
},
},
"查看"
),
//h('op', { attrs: { oprate: 'copy' }, on: { click: () => this.copy(params.row.id) } }, '克隆'),
// h('op', { attrs: { oprate: 'edit'}, on: { click: () => this.edit(params.row.id) } }, '编辑'),
h(
"op",
{
attrs: {
oprate: "delete",
},
on: {
click: () => this.remove(params.row.id),
},
},
"删除"
),
]
);
},
}, },
l(key) { ],
/* };
},
created() {
var date = new Date().getTime() - 24 * 60 * 60 * 1000 * 5;
this.end = new Date(date);
console.log(this);
},
async fetch({ store, params }) {
await store.dispatch("loadDictionary"); // 加载数据字典
},
methods: {
ok() {
this.$refs.grid.load();
this.modal = false;
this.curId = 0;
},
search() {
this.$refs.grid.reload(this.easySearch);
},
add() {
this.curId = 0;
this.title = "新增";
this.detail = () => import("./add");
this.modal = true;
},
copy(id) {
this.curId = id;
this.title = "克隆";
this.detail = () => import("./add");
this.modal = true;
},
view(id) {
this.curId = id;
this.title = "详情";
this.detail = () => import("./detail");
this.modal = true;
},
edit(id) {
this.curId = id;
this.title = "编辑";
this.detail = () => import("./edit");
this.modal = true;
},
remove(id) {
Api.delete(id).then((r) => {
if (r.success) {
this.$refs.grid.load();
this.$Message.success("删除成功");
}
});
},
clear() {
this.$Modal.confirm({
title: "确认",
content: "确认要删除" + this.$u.toDate(this.end) + "以前的数据吗",
onOk: () => {
Api.deleteAll(this.end).then((r) => {
if (r.success) {
this.$Message.success("删除成功");
this.$refs.grid.load();
} else {
this.$Message.error("出现异常");
}
});
},
});
},
cancel() {
this.curId = 0;
this.modal = false;
},
l(key) {
/*
run_log:{ run_log:{
creationTime:'创建时间', creationTime:'创建时间',
creatorUserId:'创建人', creatorUserId:'创建人',
...@@ -273,16 +299,17 @@ export default { ...@@ -273,16 +299,17 @@ export default {
exception:'异常详细信息', exception:'异常详细信息',
} }
*/ */
let vkey = "run_log" + "." + key; let vkey = "run_log" + "." + key;
return this.$t(vkey) || key; return this.$t(vkey) || key;
},
}, },
computed: { },
dis() { computed: {
var num = (new Date().getTime() - this.end.getTime()) / (1000 * 60 * 60 * 24); dis() {
return num < 1 var num =
} (new Date().getTime() - this.end.getTime()) / (1000 * 60 * 60 * 24);
} return num < 1;
},
},
}; };
</script> </script>
......
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