页面优化
This commit is contained in:
@@ -65,6 +65,9 @@ import DocAlert from '@/components/DocAlert'
|
|||||||
// 头部标签插件
|
// 头部标签插件
|
||||||
import VueMeta from 'vue-meta'
|
import VueMeta from 'vue-meta'
|
||||||
|
|
||||||
|
//去除谷歌浏览器 scroll-blocking 警告
|
||||||
|
import 'default-passive-events'
|
||||||
|
|
||||||
Vue.use(VueAreaLinkage);
|
Vue.use(VueAreaLinkage);
|
||||||
Vue.use(directive)
|
Vue.use(directive)
|
||||||
Vue.use(plugins)
|
Vue.use(plugins)
|
||||||
|
|||||||
@@ -42,7 +42,7 @@
|
|||||||
<el-table-column label="序列号" align="center" prop="id" />
|
<el-table-column label="序列号" align="center" prop="id" />
|
||||||
<el-table-column label="作物名" align="center" prop="resourceType" >
|
<el-table-column label="作物名" align="center" prop="resourceType" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span> {{cropList.find(t=>t.id == scope.row.cropId ).name}} </span>
|
<span v-if="scope.row.cropId"> {{cropList.find(t=>t.id == scope.row.cropId ).name}} </span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="出入库" align="center" prop="type" />
|
<el-table-column label="出入库" align="center" prop="type" />
|
||||||
|
|||||||
@@ -26,10 +26,10 @@
|
|||||||
|
|
||||||
<!-- 操作工具栏 -->
|
<!-- 操作工具栏 -->
|
||||||
<el-row :gutter="10" class="mb8">
|
<el-row :gutter="10" class="mb8">
|
||||||
<el-col :span="1.5">
|
<!-- <el-col :span="1.5">
|
||||||
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
<el-button type="primary" plain icon="el-icon-plus" size="mini" @click="handleAdd"
|
||||||
v-hasPermi="['farm:log-msg:create']">新增</el-button>
|
v-hasPermi="['farm:log-msg:create']">新增</el-button>
|
||||||
</el-col>
|
</el-col> -->
|
||||||
<el-col :span="1.5">
|
<el-col :span="1.5">
|
||||||
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
<el-button type="warning" plain icon="el-icon-download" size="mini" @click="handleExport" :loading="exportLoading"
|
||||||
v-hasPermi="['farm:log-msg:export']">导出</el-button>
|
v-hasPermi="['farm:log-msg:export']">导出</el-button>
|
||||||
@@ -41,8 +41,14 @@
|
|||||||
<el-table v-loading="loading" :data="list">
|
<el-table v-loading="loading" :data="list">
|
||||||
<el-table-column label="" align="center" prop="id" />
|
<el-table-column label="" align="center" prop="id" />
|
||||||
<el-table-column label="类型" align="center" prop="type" />
|
<el-table-column label="类型" align="center" prop="type" />
|
||||||
|
<el-table-column label="操作" align="center" prop="operation" />
|
||||||
<el-table-column label="标题" align="center" prop="title" />
|
<el-table-column label="标题" align="center" prop="title" />
|
||||||
<el-table-column label="用户id" align="center" prop="userId" />
|
<el-table-column label="任务内容" align="center" prop="msg" />
|
||||||
|
<el-table-column label="用户" align="center" prop="userId">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ userConver(scope.row.userId)}}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
@@ -86,6 +92,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { createLogMsg, updateLogMsg, deleteLogMsg, getLogMsg, getLogMsgPage, exportLogMsgExcel } from "@/api/farm/logMsg";
|
import { createLogMsg, updateLogMsg, deleteLogMsg, getLogMsg, getLogMsgPage, exportLogMsgExcel } from "@/api/farm/logMsg";
|
||||||
|
import {listUser} from "@/api/system/user";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "LogMsg",
|
name: "LogMsg",
|
||||||
@@ -120,7 +127,9 @@ export default {
|
|||||||
form: {},
|
form: {},
|
||||||
// 表单校验
|
// 表单校验
|
||||||
rules: {
|
rules: {
|
||||||
}
|
},
|
||||||
|
|
||||||
|
systemUserList:[]
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
@@ -138,8 +147,17 @@ export default {
|
|||||||
this.list = response.data.list;
|
this.list = response.data.list;
|
||||||
this.total = response.data.total;
|
this.total = response.data.total;
|
||||||
this.loading = false;
|
this.loading = false;
|
||||||
|
this.getSysUserList();
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
getSysUserList(){
|
||||||
|
listUser({
|
||||||
|
pageNo:1,
|
||||||
|
pageSize:200
|
||||||
|
}).then(res=>{
|
||||||
|
this.systemUserList = res.data.list;
|
||||||
|
})
|
||||||
|
},
|
||||||
/** 取消按钮 */
|
/** 取消按钮 */
|
||||||
cancel() {
|
cancel() {
|
||||||
this.open = false;
|
this.open = false;
|
||||||
@@ -230,6 +248,10 @@ export default {
|
|||||||
this.$download.excel(response, '${table.classComment}.xls');
|
this.$download.excel(response, '${table.classComment}.xls');
|
||||||
this.exportLoading = false;
|
this.exportLoading = false;
|
||||||
}).catch(() => {});
|
}).catch(() => {});
|
||||||
|
},
|
||||||
|
userConver(userId){
|
||||||
|
let sa = this.systemUserList.filter(user => user.id == userId)[0];
|
||||||
|
return sa == undefined ? userId : sa.nickname;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -43,7 +43,7 @@
|
|||||||
<el-table-column label="id" align="center" prop="id" />
|
<el-table-column label="id" align="center" prop="id" />
|
||||||
<el-table-column label="员工名" align="center" prop="userId" >
|
<el-table-column label="员工名" align="center" prop="userId" >
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{userConvert(scope.row.userId)}}</span>
|
<span v-if="scope.row.userId">{{userConvert(scope.row.userId)}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="项目名" align="center" prop="projectId" >
|
<el-table-column label="项目名" align="center" prop="projectId" >
|
||||||
|
|||||||
Reference in New Issue
Block a user