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 \ No newline at end of file
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
* @Author: huyue * @Author: huyue
* @Date: 2022-11-08 10:23:20 * @Date: 2022-11-08 10:23:20
* @LastEditors: huyue * @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 // The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias. // (runtime-only or standalone) has been set in webpack.base.conf with an alias.
...@@ -25,7 +25,7 @@ Vue.use(ElementUI) ...@@ -25,7 +25,7 @@ Vue.use(ElementUI)
var mixin = { var mixin = {
data() { data() {
return { return {
eventBus: new Vue(), eventBus: new Vue()
} }
}, },
mounted() { mounted() {
...@@ -41,8 +41,8 @@ var mixin = { ...@@ -41,8 +41,8 @@ var mixin = {
}, },
translate(params) { translate(params) {
_this.eventBus.$emit('params', params) _this.eventBus.$emit('params', params)
}, }
}, }
}) })
connection.promise.then((parent) => { connection.promise.then((parent) => {
const cfg = _this.$get_session_config() const cfg = _this.$get_session_config()
...@@ -75,12 +75,12 @@ var mixin = { ...@@ -75,12 +75,12 @@ var mixin = {
}, },
close(title) { close(title) {
this.$$parent.close(title) this.$$parent.close(title)
}, }
}, }
} }
const URL = const URL =
'https://oss-config.test.glsx.com.cn/mock/5be17454f31545347559d499/config' '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) => { return new Promise((resolve, reject) => {
request({ url }).then((res) => { request({ url }).then((res) => {
if (res.status === 'success') { if (res.status === 'success') {
...@@ -96,7 +96,7 @@ const render = (App) => { ...@@ -96,7 +96,7 @@ const render = (App) => {
window.vm = new Vue({ window.vm = new Vue({
el: '#app', el: '#app',
mixins: [mixin], mixins: [mixin],
render: (h) => h(App), render: (h) => h(App)
}) })
} }
export default { render, getConfig }
\ No newline at end of file \ No newline at end of file
export default { render, getConfig }
...@@ -128,7 +128,7 @@ export default { ...@@ -128,7 +128,7 @@ export default {
// 搜索条件 // 搜索条件
searchForm: { searchForm: {
type: Object, type: Object,
default: () => [] default: () => {}
}, },
// 表格数据-外部传入 // 表格数据-外部传入
tableData: { tableData: {
...@@ -215,11 +215,11 @@ export default { ...@@ -215,11 +215,11 @@ export default {
mounted() { mounted() {
const btn = document.getElementById(this.tableParams.btnId) const btn = document.getElementById(this.tableParams.btnId)
btn && btn.addEventListener('click', this.refreshEmit) btn && btn.addEventListener('click', this.refreshEmit)
console.log(this.getListApi)
this.getListApi && this.refreshTable() this.getListApi && this.refreshTable()
}, },
methods: { methods: {
// 排序 // 排序
sortChange({ column, prop, order }) { sortChange({ column, prop, order }) {
this.sortColum = order ? prop : '' this.sortColum = order ? prop : ''
...@@ -259,30 +259,35 @@ export default { ...@@ -259,30 +259,35 @@ export default {
params.sortColum = this.sortColum params.sortColum = this.sortColum
params.sort = this.sort === 'descending' ? 1 : 0 params.sort = this.sort === 'descending' ? 1 : 0
} }
this.getListApi(params).then(res => { this.getListApi(params)
this.data = res[this.tableParams.listName] .then(res => {
this.total = res.pagination.totalCount this.data = res[this.tableParams.listName]
this.loading = false this.total = res.pagination.totalCount
}).catch(() => { this.loading = false
this.loading = false })
}) .catch(() => {
this.loading = false
})
}) })
}, },
// 每页条数 // 每页条数
handleSizeChange(value) { handleSizeChange(value) {
this.page.pageSize = 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) { handleCurrentChange(value) {
this.page.currentPage = 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> </script>
<style> <style>
.a-click { .a-click {
......
<!-- <!--
* @Description: * @Description: 操作记录
* @Author: huyue * @Author: huyue
* @Date: 2022-11-08 10:38:40 * @Date: 2022-11-08 10:38:40
* @LastEditors: huyue * @LastEditors: huyue
* @LastEditTime: 2022-11-09 11:06:32 * @LastEditTime: 2022-11-09 15:15:40
--> -->
<template> <template>
<div> <div>
...@@ -18,53 +18,39 @@ ...@@ -18,53 +18,39 @@
</template> </template>
<script> <script>
import { getLogList } from '../../../api/operations'
export default { export default {
data() { data() {
return { return {
getListApi: '', getListApi: getLogList.req,
pageConf: { pageConf: {
pageSize: 'pageSize', pageSize: 'pageSize',
pageNum: 'pageNum', pageNum: 'pageNum',
totalCount: 'data.count' totalCount: 'data.total'
}, },
tableParams: { tableParams: {
// btnId: new Date().getTime() + parseInt(Math.random() * 1000), listName: 'data.list',
listName: 'data.data', tableOption: false,
tableOption: true,
tableColumns: [ tableColumns: [
{ {
label: '业务场景', label: '登录账户',
prop: 'businessScene', prop: 'username'
addHtml: 'businessScene',
width: 150
}, },
{ {
label: '商户', label: '登录IP',
prop: 'merchantName', prop: 'clientIp'
width: 150
}, },
{ {
label: '活动/产品', label: '修改内容',
prop: 'activityName', prop: 'logContext'
width: 200
}, },
{ {
label: '任务数', label: '操作人',
prop: 'missionCount' prop: 'realName'
}, },
{ {
label: '创建人', label: '操作时间',
prop: 'createdBy' prop: 'createTime'
},
{
label: '创建时间',
prop: 'createdTime',
width: 150
},
{
label: '状态',
prop: 'activityStatus',
addHtml: 'activityStatus'
} }
] ]
} }
......
'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!