|
@@ -1,7 +1,154 @@
|
|
|
<template>
|
|
|
- <div></div>
|
|
|
+ <div class="log">
|
|
|
+ <div class="log-main">
|
|
|
+ <div class="log-row" v-for="(item,index) of data" :key="index">
|
|
|
+ <div class="log-time">{{item.createTime}}</div>
|
|
|
+ <div class="log-user">{{item.optUser}}</div>
|
|
|
+ <div class="log-act">{{item.optName}}</div>
|
|
|
+ <div class="log-desc" v-html="item.optDesc"></div>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="log-page">
|
|
|
+ <el-pagination
|
|
|
+ background
|
|
|
+ layout="prev, pager, next"
|
|
|
+ @current-change="handleCurrentChange"
|
|
|
+ :current-page="page.pageNo"
|
|
|
+ :page-size="page.pageSize"
|
|
|
+ :total="page.total">
|
|
|
+ </el-pagination>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</template>
|
|
|
|
|
|
<script lang="ts">
|
|
|
+import { Component, Prop, Vue, Watch } from "vue-property-decorator";
|
|
|
+import VueViews from '@/benyun/compVue/VueViews'
|
|
|
+@Component
|
|
|
+export default class ByLog extends VueViews {
|
|
|
+ config:any={}
|
|
|
+ data:Array<any>=[];
|
|
|
+ load=false;
|
|
|
+ page = {
|
|
|
+ pageNo: 1, //当前页
|
|
|
+ pageSize: 20, //每页条数
|
|
|
+ total: 0 //总条数
|
|
|
+ }
|
|
|
+ created(){
|
|
|
+ if(this.propConfig){
|
|
|
+ this.setConfig(this.propConfig)
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
-</script>
|
|
|
+ mounted(){
|
|
|
+ this.request();
|
|
|
+ }
|
|
|
+ resertPage(){
|
|
|
+ this.page={
|
|
|
+ pageNo: 1, //当前页
|
|
|
+ pageSize: 20, //每页条数
|
|
|
+ total: 0 //总条数
|
|
|
+ }
|
|
|
+ }
|
|
|
+ handleCurrentChange(v:number){
|
|
|
+ this.page.pageNo = v;
|
|
|
+ this.request();
|
|
|
+ }
|
|
|
+ request(){
|
|
|
+ if(!this.requestConfig || !this.requestConfig.url){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.parentValue || !this.parentValue.id){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ let parame = (this as any).$lodash.cloneDeep(this.requestConfig);
|
|
|
+ parame.params={
|
|
|
+ docId:this.parentValue.id,
|
|
|
+ pageNo:this.page.pageNo,
|
|
|
+ pageSize:this.page.pageSize
|
|
|
+ }
|
|
|
+ parame.success = (res:any) => {
|
|
|
+ this.load = false;
|
|
|
+ if(res.data && res.data.records){
|
|
|
+ this.data = res.data.records;
|
|
|
+ }
|
|
|
+ this.page.pageNo = res.data.current;
|
|
|
+ this.page.total = res.data.total;
|
|
|
+ }
|
|
|
+ parame.fail = () => {
|
|
|
+ this.load = false;
|
|
|
+ }
|
|
|
+ this.load = true;
|
|
|
+ this.requestHandle(parame);
|
|
|
+ }
|
|
|
+}
|
|
|
+</script>
|
|
|
+
|
|
|
+<style lang="scss" scoped>
|
|
|
+.log{
|
|
|
+ width: 100%;
|
|
|
+ height: 100%;
|
|
|
+ box-sizing: border-box;
|
|
|
+ padding: 0 16px;
|
|
|
+ .log-row{
|
|
|
+ width: 100%;
|
|
|
+ display: flex;
|
|
|
+ flex-flow: wrap;
|
|
|
+ font-size: 14px;
|
|
|
+ padding: 16px 0;
|
|
|
+ border-bottom: dotted 1px #CCC;
|
|
|
+ .log-time{
|
|
|
+ width: 150px;
|
|
|
+ }
|
|
|
+ .log-user{
|
|
|
+ width: 120px;
|
|
|
+ padding-right: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ .log-act{
|
|
|
+ width: 130px;
|
|
|
+ padding-right: 8px;
|
|
|
+ overflow: hidden;
|
|
|
+ white-space: nowrap;
|
|
|
+ text-overflow: ellipsis;
|
|
|
+ }
|
|
|
+ .log-desc{
|
|
|
+ // min-width: 150px;
|
|
|
+ width: 100%;
|
|
|
+ font-size: 12px;
|
|
|
+ padding-top: 8px;
|
|
|
+ display: flex;
|
|
|
+ flex-wrap: wrap;
|
|
|
+ .mData{
|
|
|
+ font-style: italic;
|
|
|
+ }
|
|
|
+ .mCode{
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+ .mNum,.mPrice{
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ color: #F00;
|
|
|
+ }
|
|
|
+ .mCont{
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 700;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .log-main{
|
|
|
+ height: calc(100% - 50px);
|
|
|
+ overflow-y: auto;
|
|
|
+ }
|
|
|
+ .log-page{
|
|
|
+ height:50px;
|
|
|
+ display: flex;
|
|
|
+ align-items: flex-end;
|
|
|
+ flex-direction: column;
|
|
|
+ justify-content: center;
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|