123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121 |
- <template>
- <vxe-modal
- v-model="value"
- id="openLogModal"
- title="操作日志"
- width="50%"
- height="60%"
- min-width="460"
- min-height="320"
- show-zoom
- resize
- transfer
- :show-footer="!hideBtn"
- v-loading="load"
- >
- <by-table :propConfig="config" ref="table">
- <!-- <template v-slot:num="{row}">
- <vxe-input v-model="row.num" v-if="row.splitNum > 0" placeholder="请输入" type="integer" @input="onChangeRow(row)"></vxe-input>
- </template> -->
- </by-table>
- <template #footer>
- <div class="page">
- <el-pagination
- v-if="page.total > 0"
- @size-change="handleSizeChange"
- @current-change="handleCurrentChange"
- :current-page="page.pageNo"
- :page-size="page.pageSize"
- :layout="'total, sizes, prev, pager, next, jumper'"
- :total="page.total"
- ></el-pagination>
- </div>
- <!-- <div class="btn">
- <el-button plain size="small" @click="value = false">取消</el-button>
- </div> -->
- </template>
- </vxe-modal>
- </template>
- <script lang="ts">
- import { Component, Prop, Vue, Watch } from "vue-property-decorator";
- @Component({ components: {} })
- export default class openLogModal extends Vue {
- value = false;
- load = false;
- billData: any = null;
- hideBtn = false;
- data: Array<any> = [];
- datas=[];
- page: any = {
- pageNo: 1, //当前页
- pageSize: 10, //每页条数
- total: 0, //总条数
- };
- config: any = {
- attr: {
- size: "small",
- align: "center",
- seq: true,
- },
- columns: [
- {
- title: "操作内容",
- field: "content",
- },
- {
- title: "操作人",
- field: "userName",
- },
- {
- title: "创建时间",
- field: "createTime",
- },
- ],
- };
- setShow(v: boolean) {
- this.hideBtn = false;
- // console.log("数据111111111========", v);
- this.value = v;
- }
- mounted(){
-
-
- }
- setValue(data: any) {
- this.$nextTick(() => {
- // const data = localStorage.getItem("logLsit");
- // console.log("数据111111111datas========", JSON.parse(data)||null);
- const datas:string|null = localStorage.getItem("logLsit");
- if(datas){
- let data=JSON.parse(datas)
- this.data=data;
- this.page.total=data.length
- // let height = (document.getElementById('openLogModal') as any).parentNode.offsetHeight;
- // this.config.attr.height=height - 36;
- if (this.$refs.table) {
- (this.$refs.table as any).setConfig(this.config);
- (this.$refs.table as any).setValue(this.data);
- }
- }
-
- });
- }
- handleSizeChange(v: number) {
- this.page.pageSize = v;
- }
- handleCurrentChange(v: number) {
- this.page.pageNo = v;
- }
- }
- </script>
- <style lang="scss" scoped>
- .page {
- width: 100%;
- display: flex;
- justify-content: flex-end;
- padding: 8px;
- box-sizing: border-box;
- }
- </style>
|