Commit 34041902 by 胡悦

提交

1 parent cee75597
/*
* @Description:
* @Author: huyue
* @Date: 2022-11-09 14:46:07
* @LastEditors: huyue
* @LastEditTime: 2022-11-09 14:50:37
*/
import { GlAxios } from 'glsx-vue-common'
const path = '/admin-operating-auth/log/'
const __sLogList = `${path}getLogList`
const getLogList = {
p: [__sLogList],
req: params => GlAxios.get(__sLogList, { params })
}
export {
getLogList
}
\ No newline at end of file
......@@ -3,7 +3,7 @@
* @Author: huyue
* @Date: 2022-11-08 10:23:20
* @LastEditors: huyue
* @LastEditTime: 2022-11-08 10:42:34
* @LastEditTime: 2022-11-09 15:09:29
*/
// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
......@@ -25,7 +25,7 @@ Vue.use(ElementUI)
var mixin = {
data() {
return {
eventBus: new Vue(),
eventBus: new Vue()
}
},
mounted() {
......@@ -41,8 +41,8 @@ var mixin = {
},
translate(params) {
_this.eventBus.$emit('params', params)
},
},
}
}
})
connection.promise.then((parent) => {
const cfg = _this.$get_session_config()
......@@ -75,12 +75,12 @@ var mixin = {
},
close(title) {
this.$$parent.close(title)
},
},
}
}
}
const URL =
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config'
const getConfig = (url = URL + '/task-config') => {
const getConfig = (url = URL + '/record-config') => {
return new Promise((resolve, reject) => {
request({ url }).then((res) => {
if (res.status === 'success') {
......@@ -96,7 +96,7 @@ const render = (App) => {
window.vm = new Vue({
el: '#app',
mixins: [mixin],
render: (h) => h(App),
render: (h) => h(App)
})
}
export default { render, getConfig }
\ No newline at end of file
export default { render, getConfig }
......@@ -128,7 +128,7 @@ export default {
// 搜索条件
searchForm: {
type: Object,
default: () => []
default: () => {}
},
// 表格数据-外部传入
tableData: {
......@@ -215,11 +215,11 @@ export default {
mounted() {
const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit)
console.log(this.getListApi)
this.getListApi && this.refreshTable()
},
methods: {
// 排序
sortChange({ column, prop, order }) {
this.sortColum = order ? prop : ''
......@@ -259,30 +259,35 @@ export default {
params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0
}
this.getListApi(params).then(res => {
this.data = res[this.tableParams.listName]
this.total = res.pagination.totalCount
this.loading = false
}).catch(() => {
this.loading = false
})
this.getListApi(params)
.then(res => {
this.data = res[this.tableParams.listName]
this.total = res.pagination.totalCount
this.loading = false
})
.catch(() => {
this.loading = false
})
})
},
// 每页条数
handleSizeChange(value) {
this.page.pageSize = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
this.getListApi
? this.refreshTable(false)
: this.$emit('refreshTable', this.page)
},
// 页码
handleCurrentChange(value) {
this.page.currentPage = value
this.getListApi ? this.refreshTable(false) : this.$emit('refreshTable', this.page)
this.getListApi
? this.refreshTable(false)
: this.$emit('refreshTable', this.page)
}
}
}
</script>
<style>
.a-click {
......
<!--
* @Description:
* @Description: 操作记录
* @Author: huyue
* @Date: 2022-11-08 10:38:40
* @LastEditors: huyue
* @LastEditTime: 2022-11-09 11:06:32
* @LastEditTime: 2022-11-09 15:15:40
-->
<template>
<div>
......@@ -18,53 +18,39 @@
</template>
<script>
import { getLogList } from '../../../api/operations'
export default {
data() {
return {
getListApi: '',
getListApi: getLogList.req,
pageConf: {
pageSize: 'pageSize',
pageNum: 'pageNum',
totalCount: 'data.count'
totalCount: 'data.total'
},
tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000),
listName: 'data.data',
tableOption: true,
listName: 'data.list',
tableOption: false,
tableColumns: [
{
label: '业务场景',
prop: 'businessScene',
addHtml: 'businessScene',
width: 150
label: '登录账户',
prop: 'username'
},
{
label: '商户',
prop: 'merchantName',
width: 150
label: '登录IP',
prop: 'clientIp'
},
{
label: '活动/产品',
prop: 'activityName',
width: 200
label: '修改内容',
prop: 'logContext'
},
{
label: '任务数',
prop: 'missionCount'
label: '操作人',
prop: 'realName'
},
{
label: '创建人',
prop: 'createdBy'
},
{
label: '创建时间',
prop: 'createdTime',
width: 150
},
{
label: '状态',
prop: 'activityStatus',
addHtml: 'activityStatus'
label: '操作时间',
prop: 'createTime'
}
]
}
......
'use strict'
const titles = require('./title.js')
const glob = require('glob')
const pages = {}
// const mode = process.env.NODE_ENV || 'development'
glob.sync('./src/views/**/app.js').forEach(path => {
const chunk = path.split('./src/views/')[1].split('/app.js')[0]
pages[chunk] = {
entry: path,
template: 'public/index.html',
title: titles[chunk],
chunks: ['chunk-vendors', 'chunk-common', chunk]
}
})
module.exports = {
pages,
chainWebpack: config => config.plugins.delete('named-chunks'),
configureWebpack: (config) => {
// config.devtool = (mode === 'development') ? 'inline-source-map' : false
// config.mode = mode
},
devServer: {
port: 8085,
host: '192.168.1.68',
open: true,
proxy: {
'/api': {
target: 'http://sso.dev.glsx.com.cn',
changeOrigin: true,
pathRewrite: { '^/api': '' }
}
}
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!