Commit 8055e5a7 authored by 周远喜's avatar 周远喜

Merge branch 'portal' of http://git.mes123.com/zhouyx/mes-ui into portal

parents f7870e61 3dbdbcce
......@@ -698,7 +698,18 @@ i.icon-gengxin {
.tc {
text-align: center;
}
.lt30
{
line-height: 30px;
}
.lt40
{
line-height: 40px;
}
.lt50
{
line-height: 50px;
}
/*清除浮动*/
......
......@@ -102,6 +102,7 @@ export default {
treeData: [], //物料数据
codeRuleData: [], //物料编码
routingHeaderData: [], //工艺规程
allUser: []
};
},
props: {
......@@ -277,6 +278,7 @@ export default {
//this.getTreeData();
//this.getcodeRuleData();
//this.getRoutingHeaderData();
this.getAllUser()
},
methods: {
//数据加载
......@@ -477,6 +479,36 @@ export default {
this.footerToolbar = false;
this.$refs.table.selectAll(false);
},
//获取所有用户信息
getAllUser() {
this.$api.post(`${systemUrl}/user/paged`, {
conditions: [],
pageIndex: 1,
pageSize: 100000,
})
.then((r) => {
if (r.success) {
let tempUserInfo = r.result.items
tempUserInfo.forEach(ele => {
let temObj = {
userId: ele.id,
name: ele.userName
}
this.allUser.push(temObj)
})
}
})
},
getUserName(id) {
let name = ''
this.allUser.forEach(ele => {
if (id == ele.userId) {
name = ele.name
}
})
return name
},
//导出excel
export2Excel() {
......@@ -516,10 +548,13 @@ export default {
};
this.$api.post(this.action, searchs).then((r) => {
let list = [];
list = r.result.items;
if (r.success) {
list = r.result.items || [];
}
const tHeader = []; // 设置Excel的表格第一行的标题
const filterVal = []; //list里对象的属性
var tempCol = [];
var tempColUser = [];
var columnsCur = this.$u.clone(this.columnsCur); //导出列标题信息griddata this.$refs.grid.columnsCur
columnsCur.forEach((el) => {
if (
......@@ -535,7 +570,12 @@ export default {
code: el.code,
}); //临时存放code数据字典的字段及对应的数据字典code
}
if (el.type && el.type == "user") {
tempColUser.push({
key: el.key,
code: el.type,
}); //临时存放user列
}
tHeader.push(el.title);
filterVal.push(el.key);
}
......@@ -579,6 +619,15 @@ export default {
}
}
});
tempColUser.forEach(eluser => {
if (
e[eluser.key] &&
e[eluser.key] != "" &&
e[eluser.key] != null
) {
e[eluser.key] = this.getUserName(e[eluser.key])
}
})
});
let nowDate = this.$u.getNowTime(); //年月日时分秒yyyyMMddhhmmss
......@@ -591,7 +640,6 @@ export default {
);
});
},
},
computed: {
columnsNow() {
......
This diff is collapsed.
......@@ -1177,6 +1177,8 @@ export default {
requestUrl: '服务地址',
requestParam: '参数',
exception: '异常详细信息',
remark:'备注'
},
user_message_config: {
creationTime: '创建时间',
......
......@@ -425,7 +425,7 @@ export default {
parent_Id: ele.parent_Id ? ele.parent_Id : '', //上级部门 [id]
code: ele.code ? ele.code : '', //部门编号
location: ele.location ? this.getCityValue(ele.location) : '', //省市县
isProduction: ele.property.indexOf('1') > -1 && ele.property.indexOf('2') > -1 && ele.property.indexOf('3') > -1 ? 1 : 0, //是否生产班组:1是,0否. 属性值为三个值,则是生产班组
isProduction: ele.property.indexOf('1') > -1 && ele.property.indexOf('2') > -1 && ele.property.indexOf('3') > -1 ? 1 : 0, //是否生产班组:1是,0否. 属性值为三个值同时选择,则是生产班组
property: ele.property ? ele.property : '' //属性
};
if (ele.name && ele.name != '') {
......
This diff is collapsed.
<template>
<div class="detail">
<Row>
<!-- <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<div class="detail">
<Row>
<!-- <Filed :span="12" :name="l('creationTime')">{{entity.creationTime}}</Filed>
<Filed :span="12" :name="l('creatorUserId')">{{entity.creatorUserId}}</Filed>
<Filed :span="12" :name="l('lastModificationTime')">{{entity.lastModificationTime}}</Filed>
<Filed :span="12" :name="l('lastModifierUserId')">{{entity.lastModifierUserId}}</Filed>
<Filed :span="12" :name="l('isDeleted')">{{entity.isDeleted}}</Filed>
<Filed :span="12" :name="l('deletionTime')">{{entity.deletionTime}}</Filed>
<Filed :span="12" :name="l('deleterUserId')">{{entity.deleterUserId}}</Filed> -->
<Filed :span="12" :name="l('timestamp')">{{entity.timestamp}}</Filed>
<Filed :span="12" :name="l('level')">{{entity.level}}</Filed>
<!-- <Filed :span="12" :name="l('messageTemplate')">{{entity.messageTemplate}}</Filed> -->
<Filed :span="12" :name="l('renderedMessage')">{{entity.renderedMessage}}</Filed>
<Filed :span="12" :name="l('clientIpAddress')">{{entity.clientIpAddress}}</Filed>
<Filed :span="12" :name="l('loginName')">{{entity.loginName}}</Filed>
<Filed :span="12" :name="l('tanentCode')">{{entity.tanentCode}}</Filed>
<Filed :span="12" :name="l('host')">{{entity.host}}</Filed>
<Filed :span="12" :name="l('status')">{{entity.status}}</Filed>
<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>
</div>
<Filed :span="12" :name="l('timestamp')">{{ entity.timestamp }}</Filed>
<Filed :span="12" :name="l('level')">{{ entity.level }}</Filed>
<!-- <Filed :span="12" :name="l('messageTemplate')">{{entity.messageTemplate}}</Filed> -->
<Filed :span="12" :name="l('renderedMessage')">{{
entity.renderedMessage
}}</Filed>
<Filed :span="12" :name="l('clientIpAddress')">{{
entity.clientIpAddress
}}</Filed>
<Filed :span="12" :name="l('loginName')">{{ entity.loginName }}</Filed>
<Filed :span="12" :name="l('tanentCode')">{{ entity.tanentCode }}</Filed>
<Filed :span="12" :name="l('host')">{{ entity.host }}</Filed>
<Filed :span="12" :name="l('status')">{{ entity.status }}</Filed>
<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>
<script>
import Api from './api'
export default {
name: 'Add',
data() {
return {
entity: {},
rules: {
name: [{ required: true, message: '必填', trigger: 'blur' }],
code: [{ required: true, message: '必填', trigger: 'blur' }]
}
}
},
props: {
eid: Number
},
mounted() {
if (this.eid) {
this.load(this.eid);
}
},
methods: {
load(v) {
Api.get({ id: v }).then(r => {
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);
}
}
}
import Api from "./api";
export default {
name: "Add",
data() {
return {
entity: {
exception: "",
properties: {},
status: 0,
},
rules: {
name: [{ required: true, message: "必填", trigger: "blur" }],
code: [{ required: true, message: "必填", trigger: "blur" }],
},
disabled: false,
};
},
props: {
eid: "",
},
mounted() {
if (this.eid) {
this.load(this.eid);
}
},
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>
\ No newline at end of file
<template>
<div>
<DataGrid :columns="columns" ref="grid" :action="action">
<DataGrid
:columns="columns"
ref="grid"
:action="action"
exportTitle="异常记录"
>
<template slot="easySearch">
<Form ref="formInline" :model="easySearch" inline>
<FormItem prop="keys">
<Input placeholder="请输入关键字登录账号/租户编号" v-model="easySearch.keys.value" v-width="300"/>
<Input
placeholder="请输入关键字登录账号/租户编号"
v-model="easySearch.keys.value"
v-width="300"
/>
</FormItem>
<FormItem>
<Button type="primary" @click="search">查询</Button>
......@@ -15,7 +24,12 @@
<Search />
</template>
<template slot="buttons">
<DatePicker type="date" v-model="end" placeholder="选择终止日期" style="width: 150px"></DatePicker>
<DatePicker
type="date"
v-model="end"
placeholder="选择终止日期"
style="width: 150px"
></DatePicker>
<Button type="error" @click="clear" :disabled="dis">清理</Button>
</template>
</DataGrid>
......@@ -24,6 +38,7 @@
</Modal>
</div>
</template>
<script>
import Api from "./api";
import Search from "./search";
......@@ -41,9 +56,12 @@ export default {
return {
action: Api.index,
easySearch: {
keys: { op: "loginName,tanentCode", value: null },
keys: {
op: "loginName,tanentCode",
value: null,
},
},
end:null,
end: null,
modal: false,
title: "新增",
detail: null,
......@@ -124,8 +142,16 @@ export default {
hide: true,
high: true,
},
// { key:"status",title:this.l("status") ,align:"left" ,high:true },
{
key: "status",
title: this.l("status"),
align: "left",
high: true,
render: (h, params) => {
return h("span", {}, params.row.status == 1 ? "已解决" : "未解决");
},
},
{ key: "remark", title: this.l("remark"), align: "left", high: true },
{
key: "requestParam",
title: this.l("requestParam"),
......@@ -140,34 +166,48 @@ export default {
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) },
},
"删除"
),
]);
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);
var date = new Date().getTime() - 24 * 60 * 60 * 1000 * 5;
this.end = new Date(date);
console.log(this);
},
......@@ -215,21 +255,21 @@ export default {
}
});
},
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("出现异常")
}
})
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;
......@@ -237,39 +277,41 @@ export default {
},
l(key) {
/*
run_log:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
timestamp:'异常发生时间',
level:'日志级别',
messageTemplate:'消息模板',
renderedMessage:'异常信息',
clientIpAddress:'客户端IP',
loginName:'登录账号',
tanentCode:'租户编号',
host:'主机IP',
status:'状态',
requestUrl:'服务地址',
requestParam:'参数',
exception:'异常详细信息',
}
*/
run_log:{
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
timestamp:'异常发生时间',
level:'日志级别',
messageTemplate:'消息模板',
renderedMessage:'异常信息',
clientIpAddress:'客户端IP',
loginName:'登录账号',
tanentCode:'租户编号',
host:'主机IP',
status:'状态',
requestUrl:'服务地址',
requestParam:'参数',
exception:'异常详细信息',
}
*/
let vkey = "run_log" + "." + key;
return this.$t(vkey) || key;
},
},
computed:{
dis(){
var num=(new Date().getTime()-this.end.getTime())/(1000*60*60*24);
return num<1
}
}
computed: {
dis() {
var num =
(new Date().getTime() - this.end.getTime()) / (1000 * 60 * 60 * 24);
return num < 1;
},
},
};
</script>
<style lang="less">
</style>
\ No newline at end of file
</style>
......@@ -8,6 +8,46 @@ html body {
#__layout {
height: 100%;
}
/*flex*/
.flex {
display: flex;
}
.fc-m {
justify-content: center;
}
.fa-m {
align-items: center;
}
.fc-e {
justify-content: flex-end;
}
.fc-b {
justify-content: space-between;
}
.fc-a {
justify-content: space-around;
}
.fc-ev {
justify-content: space-evenly;
}
.fd {
flex-direction: column;
}
.fg {
flex-grow: 1;
}
.fs {
flex-shrink: 0;
}
.fg2 {
flex-grow: 2;
}
.fos {
order: -1;
}
.foe {
order: 99;
}
/*字体*/
.ib {
display: inline;
......@@ -475,6 +515,15 @@ i.icon-gengxin {
.tc {
text-align: center;
}
.lt30 {
line-height: 30px;
}
.lt40 {
line-height: 40px;
}
.lt50 {
line-height: 50px;
}
/*清除浮动*/
.clear {
clear: both;
......@@ -523,6 +572,7 @@ textarea::-webkit-input-placeholder {
background: #fff;
padding: 0px 10px 20px 10px;
margin-top: 10px;
overflow: auto;
}
.zh-tree .zh-title {
font-size: 14px;
......@@ -646,7 +696,7 @@ html [type=button] {
}
.waitTask {
/*flex 布局*/
display: flex;
display: flex!important;
align-items: center;
width: 200px;
height: 100px;
......@@ -892,7 +942,6 @@ html [type=button] {
color: #249e91;
}
.full .menu .tree {
height: calc(100% - 150px);
overflow: auto;
}
.full .content {
......@@ -922,3 +971,7 @@ html [type=button] {
.content {
padding-left: 5px;
}
.row_border_bottom {
border-bottom: 1px solid #E0E0E0;
padding: 15px 20px;
}
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