Commit 2261e5c9 authored by shangtx's avatar shangtx

feat: 通用列表组件

parent 2c1be876
import {axios} from '@/util/axios/request'
const api = {
getPage: '/base/error/log/page'
}
export default api
export function getPage(parameter) {
return axios({
url: api.getPage,
url: '/log/error/page',
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function exportExxx(parameter) {
return axios({
responseType: 'blob',
headers: {'Accept': 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet'},
url: '/log/error/xxxxx',
method: 'get',
data: parameter,
useFullLoading: true
})
}
\ No newline at end of file
import { axios } from '@/util/axios/request'
// 数据展示接口
const baseURI = '/data-show'
// 用车统计
export function getUsageAmount(data) {
return axios({
url: `${baseURI}/usage-amount`,
method: 'post',
data
})
}
// 基础数据
export function getBasicData(communityId) {
return axios({
url: `${baseURI}/basic-statistics/${communityId}`,
method: 'get',
})
}
// 可选单位
export function getSelectableCommunities() {
return axios({
url: `${baseURI}/selectable-communities`,
method: 'get'
})
}
// 费用统计
export function getCostData(data) {
return axios({
url: `${baseURI}/cost-data`,
method: 'post',
data
})
}
// 加油统计
export function getFuelData(data) {
return axios({
url: `${baseURI}/fuel-data`,
method: 'post',
data
})
}
// 车辆使用寿命统计
export function getCarYears(data) {
return axios({
url: `${baseURI}/used-years`,
method: 'post',
data
})
}
\ No newline at end of file
import { axios } from '@/util/axios/request'
const api = {
baseUrl: '/workflow'
};
export function getProcdefPage(parameter) {
return axios({
url: api.baseUrl + '/page',
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function getTaskFormDetail(id) {
return axios({
url: api.baseUrl + '/task/form/detail/' + id,
method: 'get',
useFullLoading: true
})
}
export function save(id,strategy) {
return axios({
url: api.baseUrl + '/id/' + id + '/strategy/' + strategy,
method: 'get',
useFullLoading: true
})
}
export function getTaskOutFormDetail(processId, flowOutId) {
return axios({
url: api.baseUrl + '/task/form/detail/' + processId + '/' + flowOutId,
method: 'get',
useFullLoading: true
})
}
export function saveTaskOutForm(processId, flowOutId, parameter) {
return axios({
url: api.baseUrl + '/task/form/detail/' + processId + '/' + flowOutId,
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function getTaskAuditRule(processId, taskDefId) {
return axios({
url: api.baseUrl + '/task/audit/rule/' + processId + '/' + taskDefId,
method: 'get',
useFullLoading: true
})
}
export function getTaskAuditRuleCommunity(communityId, taskId) {
return axios({
url: api.baseUrl + '/task/audit/rule/community/' + communityId + '/' + taskId,
method: 'get',
useFullLoading: true
})
}
export function saveTaskAuditRuleCommunity(communityId, taskId, parameter) {
return axios({
url: api.baseUrl + '/task/audit/rule/community/' + communityId + '/' + taskId,
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function getTaskRemindRuleCommunity(communityId, taskId) {
return axios({
url: api.baseUrl + '/task/remind/rule/community/' + communityId + '/' + taskId,
method: 'get',
useFullLoading: true
})
}
export function saveTaskRemindRuleCommunity(communityId, taskId, parameter) {
return axios({
url: api.baseUrl + '/task/remind/rule/community/' + communityId + '/' + taskId,
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function getTaskProperty(processId, taskDefId) {
return axios({
url: api.baseUrl + '/task/property/' + processId + '/' + taskDefId,
method: 'get',
useFullLoading: true
})
}
export function saveTaskProperty(parameter) {
return axios({
url: api.baseUrl + '/task/property',
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function remark(procId, parameter) {
return axios({
url: api.baseUrl + '/remark/' + procId,
method: 'post',
data: parameter,
useFullLoading: true
})
}
export function getUserByRoleId(roleId) {
return axios({
url: api.baseUrl + '/role/' + roleId + '/user',
method: 'get',
useFullLoading: true
})
}
export function getContentList(businessType) {
return axios({
url: api.baseUrl + '/list/' + businessType,
method: 'get',
useFullLoading: true
})
}
export function getTaskTree(businessTypeId) {
return axios({
url: api.baseUrl + '/task/tree/' + businessTypeId,
method: 'get',
useFullLoading: true
})
}
export function getTaskListByParent(procDefId) {
return axios({
url: api.baseUrl + '/task/list/' + procDefId,
method: 'get',
useFullLoading: true
})
}
export function getProcVersion(businessTypeId) {
return axios({
url: api.baseUrl + '/proc/version/list/' + businessTypeId,
method: 'get',
useFullLoading: true
})
}
export function getProcRole(businessTypeId,procDefId) {
return axios({
url: api.baseUrl + '/proc/role/list/' + businessTypeId + '/' +procDefId,
method: 'get',
useFullLoading: true
})
}
\ No newline at end of file
<template>
<global-layout>
<a-spin :spinning="isLoading">
<keep-alive v-if="keepAlive">
<router-view/>
</keep-alive>
<router-view v-else/>
<a-spin :spinning="isLoading" class="global-spinning">
<keep-alive v-if="keepAlive">
<router-view />
</keep-alive>
<router-view v-else />
</a-spin>
</global-layout>
</template>
<script>
import GlobalLayout from '@/components/page/GlobalLayout'
import {mapState} from 'vuex'
import GlobalLayout from '@/components/page/GlobalLayout'
import { mapState } from 'vuex'
export default {
name: "BasicLayout",
components: {
GlobalLayout
export default {
name: 'BasicLayout',
components: {
GlobalLayout
},
data() {
return {}
},
computed: {
keepAlive() {
return this.$route.meta.keepAlive
},
data() {
return {}
},
computed: {
keepAlive() {
return this.$route.meta.keepAlive
},
...mapState({
isLoading: state => state.app.isLoading
}),
},
methods: {},
}
...mapState({
isLoading: (state) => state.app.isLoading
})
},
methods: {}
}
</script>
<style lang="less">
.global-spinning {
height: 100%;
.ant-spin-container {
max-height: calc(100% - 20px);
overflow: hidden;
}
}
/*
/*
* The following styles are auto-applied to elements with
* transition="page-transition" when their visibility is toggled
* by Vue.js.
......@@ -44,34 +51,35 @@
* these styles.
*/
.page-transition-enter {
opacity: 0;
}
.page-transition-enter {
opacity: 0;
}
.page-transition-leave-active {
opacity: 0;
}
.page-transition-leave-active {
opacity: 0;
}
.page-transition-enter .page-transition-container,
.page-transition-leave-active .page-transition-container {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
.page-transition-enter .page-transition-container,
.page-transition-leave-active .page-transition-container {
-webkit-transform: scale(1.1);
transform: scale(1.1);
}
/*上传控件尺寸调整*/
.ant-upload {
width: 80px !important;
height: 80px !important;
}
.ant-upload-list-picture-card .ant-upload-list-item{
width: 80px !important;
height: 80px !important;
}
.ant-upload-list-item-uploading-text {
font-size: 10px; // 调整“文件上传中”字体大小
}
.ant-upload-list-picture .ant-upload-list-item, .ant-upload-list-picture-card .ant-upload-list-item {
padding: 4px!important; // 调整图片和边框的间隙
}
/*end*/
/*上传控件尺寸调整*/
.ant-upload {
width: 80px !important;
height: 80px !important;
}
.ant-upload-list-picture-card .ant-upload-list-item {
width: 80px !important;
height: 80px !important;
}
.ant-upload-list-item-uploading-text {
font-size: 10px; // 调整“文件上传中”字体大小
}
.ant-upload-list-picture .ant-upload-list-item,
.ant-upload-list-picture-card .ant-upload-list-item {
padding: 4px !important; // 调整图片和边框的间隙
}
/*end*/
</style>
\ No newline at end of file
......@@ -75,12 +75,13 @@
<!-- layout content -->
<a-layout-content
style="scroll-behavior:smooth"
:style="{
marginLeft: ' 16px',
height: 'calc(100vh - 65px)',
scrollBehavior: 'smooth',
marginRight: '16px',
height: 'calc(100vh - 50px)',
marginTop: fixedHeader ? '74px' : '24px',
overflow: 'hidden',
marginTop: fixedHeader ? '64px' : '14px',
}"
>
<slot></slot>
......@@ -90,14 +91,12 @@
<a-layout-footer style="padding: 0px"></a-layout-footer>
</a-layout>
<!--<setting-drawer></setting-drawer>-->
</a-layout>
</template>
<script>
import SideMenu from "@/components/menu/SideMenu";
import GlobalHeader from "@/components/page/GlobalHeader";
// import SettingDrawer from '@/components/setting/SettingDrawer'
import { triggerWindowResizeEvent } from "@/util/util";
import { mapActions, mapState } from "vuex";
import { mixin, mixinDevice } from "@/util/mixin.js";
......@@ -107,7 +106,6 @@ export default {
components: {
SideMenu,
GlobalHeader,
// ,SettingDrawer
},
mixins: [mixin, mixinDevice],
data() {
......@@ -200,20 +198,16 @@ body {
}
}
.ant-card-body {
padding: 5px !important;
}
//列表页样式调整
.ant-advanced-search-form {
margin-bottom: 5px !important;
padding: 3px !important;
background: #fbfbfb;
border: 1px solid #d9d9d9;
border-radius: 6px;
margin-bottom: 15px !important;
padding: 10px 20px 10px 5px !important;
background: #ffffff;
}
.ant-table-selection-column {
......
This diff is collapsed.
<template>
<div class="setting-drawer-index-item">
<h3 class="setting-drawer-index-title">{{ title }}</h3>
<slot></slot>
<a-divider v-if="divider"/>
</div>
</template>
<script>
export default {
name: "SettingItem",
props: {
title: {
type: String,
default: ''
},
divider: {
type: Boolean,
default: false
}
}
}
</script>
<style lang="less" scoped>
.setting-drawer-index-item {
margin-bottom: 24px;
.setting-drawer-index-title {
font-size: 14px;
color: rgba(0, 0, 0, .85);
line-height: 22px;
margin-bottom: 12px;
}
}
</style>
\ No newline at end of file
<!-- 自动生成搜索表单 -->
<template>
<a-form layout="horizontal" class="ant-advanced-search-form">
<a-row>
<template v-for="(f, i) in list">
<template v-if="f.filter.type == SearchType.RANGE && (!collapsed || i < 3)">
<a-col :span="6" :key="f.dataIndex">
<a-form-item v-bind="formItemLayout" :label="f.title">
<a-range-picker
:showTime="f.filter.showTime"
v-model="query[f.dataIndex]"
:allowClear="true"
style="width: 100%"
@change="(value) => rangeChange(f, value)"
/>
</a-form-item>
</a-col>
</template>
<template v-if="f.filter.type == SearchType.DATE && (!collapsed || i < 3)">
<a-col :span="6" :key="f.dataIndex">
<a-form-item v-bind="formItemLayout" :label="f.title">
<a-date-picker
v-model="query[f.dataIndex]"
:allowClear="true"
style="width: 100%"
@change="(value) => dateChange(f, value)"
/>
</a-form-item>
</a-col>
</template>
<template v-if="f.filter.type == SearchType.STRING && (!collapsed || i < 3)">
<a-col :span="6" :key="f.dataIndex">
<a-form-item v-bind="formItemLayout" :label="f.title">
<a-input
v-model="query[f.dataIndex]"
@change="(e) => strChange(f, e)"
@pressEnter="reload"
/>
</a-form-item>
</a-col>
</template>
<template v-if="f.filter.type == SearchType.ENUM && (!collapsed || i < 3)">
<a-col :span="6" :key="f.dataIndex">
<a-form-item v-bind="formItemLayout" :label="f.title">
<a-select
v-model="query[f.dataIndex]"
:allowClear="true"
@change="(value) => selectionChange(f, value)"
:options="options[f.enum]"
:mode="f.filter.multiple ? 'multiple' : 'default'"
show-search
:filter-option="filterOption"
/>
</a-form-item>
</a-col>
</template>
</template>
<a-col :span="6" style="float: right">
<a-space style="margin-top:4px; float:right">
<a-button @click="onReset">&nbsp;</a-button>
<a-button type="primary" @click="onSearch">&nbsp;</a-button>
<a-button type="link" @click="collapse">
{{collapsed? '展开': '收起'}}
<a-icon type="up" v-if="!collapsed" />
<a-icon type="down" v-show="collapsed" />
</a-button>
</a-space>
</a-col>
</a-row>
</a-form>
</template>
<script>
import _ from 'lodash'
const defaultDateFormat = 'YYYY-MM-DD'
export default {
name: 'commonSearchForm',
props: {
query: Object,
list: Array,
options: Object,
reload: Function,
onSearch: Function,
onReset: Function,
onCollapse: Function,
},
model: {
prop: 'query',
event: 'queryChange',
},
data() {
return {
SearchType,
collapsed: true,
gap: 0,
formItemLayout: {
labelCol: {
sm: { span: 8 },
},
wrapperCol: {
sm: { span: 16 },
},
},
}
},
methods: {
rangeChange(column, values) {
const be = {}
if (values.length) {
be[column.dataIndex + 'Begin'] = values[0].format(column.filter.format || defaultDateFormat)
be[column.dataIndex + 'End'] = values[1].format(column.filter.format || defaultDateFormat)
} else {
be[column.dataIndex + 'Begin'] = ''
be[column.dataIndex + 'End'] = ''
}
this.$emit('queryChange', _.merge(this.query, be))
this.$nextTick(() => {
this.reload && this.reload()
})
},
dateChange(c, val) {
const dt = {}
if (val) {
dt[c.dataIndex] = val.format(c.filter.format || defaultDateFormat)
} else {
dt[c.dataIndex] = ''
}
this.$emit('queryChange', _.merge(this.query, dt))
this.$nextTick(() => {
this.reload && this.reload()
})
},
strChange(c, { target: { value } }) {
this.$emit('queryChange', _.merge(this.query, { [c.dataIndex]: value }))
},
selectionChange(c, val) {
this.$emit('queryChange', _.merge(this.query, { [c.dataIndex]: val }))
this.$nextTick(() => {
this.reload && this.reload()
})
},
filterOption(input, option) {
return (
option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
)
},
// 展开
collapse() {
this.onCollapse(this.collapsed? this.gap: 0)
this.collapsed = !this.collapsed
}
},
activated() {
// 初始化一些必要数据
// this.list.forEach();
// 计算修改量
const count = Math.ceil((this.list.length - 3) / 4)
if(count <= 0) {
this.gap = 0
} else {
this.gap = count * 55
}
},
}
/**
* @typedef {Object} SearchType
* @property {String} RANGE
* @property {String} DATE
* @property {String} STRING
* @property {String} ENUM
*/
/**
* @type SearchType
*/
const SearchType = {
RANGE: 'range', // 时间范围
DATE: 'date', // 日期
STRING: 'str', // 字符串
ENUM: 'enum', // 下拉选择
}
export { SearchType }
</script>
<script>
import {
humpToLine,
setOrder,
bizCodeMapping,
getCodeOptions
} from '@/util/util'
import _ from 'lodash'
export default {
name: 'TableScript',
data() {
return {
query: {
page: 1,
size: this.$defaultPageSize()
},
rowKey: 'id',
selectedRowKeys: [],
selectedRows: [],
total: 0,
loading: false,
dataSource: [],
isFirstLoad: true,
toolbar: [],
// reset时保留的query属性
retainFields: [],
options: {},
codeMapping: {},
codes: [[], []],
columns: [],
useYScroll: false, // 是否只使用纵向滚动
useScroll: false, // 是否使用表格内滚动, 想要生效需要给列配置宽度
heightFix: 330, // 默认高度修正
widthFix: 233, // 默认宽度修正
/** 是否使用分页 */
pagination: true,
/** 是否使用列选择 */
useSelection: true,
// 标题
title: '列表',
keep: false, // 保持状态
useSearch: true, // 显示搜索
customClass: '',
useTitle: true,
expandedRowKeys: [],
bordered: false,
childrenColumnName: 'children',
searchHeight: 0 // 搜索框高度
}
},
computed: {
/* 滚动设置 */
scroll() {
if (this.useYScroll) {
return {
y: this.$store.getters.size[1] - this.heightFix - this.searchHeight
}
}
const width = this.columns
.map((c) => c.width || 0)
.reduce((w1, w2) => w1 + w2)
return this.useScroll
? {
x: width - this.widthFix,
y: this.$store.getters.size[1] - this.heightFix - this.searchHeight
}
: undefined
},
/* 最终过滤后的列 */
finalColumns() {
return this.columns.filter((c) => !c.hidden)
},
filters() {
return this.columns.filter((c) => !!c.filter)
},
defaultPageSize: function () {
return this.$defaultPageSize()
},
paginationConfig: function () {
return {
onChange: this.pageChange,
current: this.query.page,
defaultPageSize: this.$defaultPageSize(),
pageSizeOptions: this.$pageSizeOptions,
onShowSizeChange: this.sizeChange,
total: this.total,
showSizeChanger: true,
showQuickJumper: true,
showTotal: this.$showTotal
}
}
},
methods: {
reset() {
this.query = _.pick(this.query, ['page', 'size', ...this.retainFields])
this.loadData()
},
handleChange({ fileList }) {
this.isUpdateSuccess(fileList)
this.fileList = fileList
},
// eslint-disable-next-line no-unused-vars
changeClassName(row, index) {
return ''
},
loadData(size) {
this.loading = true
this.selectedRowKeys = []
if (size && !isNaN(size)) {
this.query.size = size
}
this.queryData(this.query).then((response) => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
if (this.pagination) {
let respData = response.data
this.dataSource = respData.list
this.total = respData.total
} else {
this.dataSource = response.data
}
}
this.loading = false
})
},
search() {
this.query.page = 1
this.loadData()
},
/* 新增数据 */
addNew() {
this.editRow()
},
/* 编辑行 */
// eslint-disable-next-line no-unused-vars
editRow(row) {},
async deleteOne() {},
deleteRow(id) {
this.deleteOne(id).then((response) => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
this.loadData()
}
})
},
onDelete(row) {
let _this = this
this.$confirm({
title: '提示',
content: '确定删除这条记录吗?',
onOk() {
_this.deleteRow(row.id)
},
onCancel() {}
})
},
onDeleteBatch() {
if (this.selectedRowKeys.length == 0) {
return
}
let _this = this
this.$confirm({
title: '提示',
content: '确定删除选中的记录吗?',
onOk() {
_this.deleteBatch()
},
onCancel() {}
})
},
updateSelect(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
pageChange(page) {
this.query.page = page
this.loadData()
},
sizeChange(current, size) {
this.query.page = 1
this.query.size = size
this.loadData()
},
sortChange(pagination, filters, sorter) {
this.query.sort = humpToLine(sorter.field)
this.query.order = setOrder(sorter.order)
this.loadData()
},
getTypes() {
console.info('getType')
},
beforeFirstLoad() {},
queryData() {
return new Promise((resolve) => resolve({ data: {} }))
},
init() {
this.beforeFirstLoad && this.beforeFirstLoad()
if (this.isFirstLoad == true) {
this.loadData(this.defaultPageSize)
this.isFirstLoad = false
} else {
let isModify = this.$route.query.isModify
if (isModify == true) {
this.loadData()
} else if (isModify != undefined) {
this.query.page = 1
this.loadData()
}
}
},
onCollapse(gap) {
this.searchHeight = gap
}
},
mounted() {
// 加载编码
this.codes[0].length &&
getCodeOptions(this.codes[0]).then(([codeMapping, options]) => {
this.options = { ...this.options, ...options }
this.codeMapping = codeMapping
})
this.codes[1].length &&
this.codes[1].forEach((c) => {
bizCodeMapping[c] &&
bizCodeMapping[c]().then((ops) => {
this.options = { ...this.options, [c]: ops }
const bizCodeMap = {}
ops.forEach((op) => (bizCodeMap[op.value] = op.label))
this.codeMapping = { ...this.codeMapping, [c]: bizCodeMap }
})
})
if (!this.$route.meta.keepAlive) {
this.init()
}
},
activated() {
if (this.$route.meta.keepAlive) {
this.init()
}
},
deactivated() {
if (!this.keep) {
this.dataSource = []
this.query = { page: 1, size: this.query.size }
}
}
}
</script>
<template>
<div class="common-table-container" v-if="!!soul">
<search-form
v-if="soul.useSearch"
v-model="soul.query"
:list="soul.filters"
:reload="soul.loadData"
:options="soul.options"
:onSearch="soul.search"
:onReset="soul.reset"
:onCollapse="soul.onCollapse"
/>
<a-table
size="middle"
@change="soul.sortChange"
:loading="soul.loading"
:columns="soul.finalColumns"
:dataSource="soul.dataSource"
:rowKey="soul.rowKey"
:scroll="soul.scroll"
:childrenColumnName="soul.childrenColumnName"
:rowClassName="soul.changeClassName"
:rowSelection="
soul.useSelection
? {
selectedRowKeys: soul.selectedRowKeys,
onChange: soul.updateSelect
}
: null
"
:bordered="soul.bordered"
:expandedRowKeys.sync="soul.expandedRowKeys"
:pagination="soul.paginationConfig"
>
<div slot="title" v-if="soul.useTitle">
<span class="cust-title">
{{ soul.title }}
</span>
<div class="cust-table-operator">
<a-button-group>
<!-- 额外的按钮 -->
<template v-for="(tool, i) in soul.toolbar">
<a-button
:key="i"
@click="tool.handler"
v-if="!tool.bizCode || soul.hasPerm(tool.bizCode)"
>{{ tool.text }}</a-button
>
</template>
</a-button-group>
</div>
</div>
<!-- 单元格渲染插槽(双层的插槽) -->
<template
v-for="sname in soul.finalColumns
.filter((c) => !!c.scopedSlots)
.map((c) => c.scopedSlots.customRender)"
#[sname]="value, record, index"
>
<slot :name="`${sname}`" v-bind="{ value, record, index }" />
</template>
<!-- 列title插槽 -->
<template
v-for="tname in soul.finalColumns
.filter((c) => !!c.slots && c.slots.title)
.map((c) => c.slots.title)"
#[tname]
>
<slot :name="tname" />
</template>
</a-table>
<slot name="free" />
</div>
<span v-else>what the fuck?</span>
</template>
<script>
import SearchForm from './SearchForm'
export default {
components: { SearchForm },
props: ['soul']
}
</script>
<style lang="less">
.common-table-container {
.ant-table-title {
padding: 0px 20px 10px 20px !important;
height: 55px;
line-height: 55px;
border-bottom: 0px !important;
background: #ffffff;
}
.ant-table-wrapper {
background: #ffffff;
.ant-table-pagination {
margin-right: 20px;
margin-top: 10px;
}
}
//列表页样式调整
.ant-advanced-search-form {
margin-bottom: 15px !important;
padding: 20px 20px 10px 5px !important;
background: #ffffff;
.ant-form-item {
margin-bottom: 15px;
}
}
}
</style>
import TableTemplate from './TableTemplate'
import TableScript from './TableScript'
import { SearchType } from './SearchForm'
const fieldType = {
STRING: 1, // 字符串(输入)
ENUM: 2, // 枚举(选择)
DATE: 3, // 日期
DATE_RANGE: 4, // 日期选择
}
const defaultBtn = {
QUERY: 'query', // 查询
RESET: 'reset', // 重置
RETURN: 'return', // 返回
}
export {
TableTemplate,
TableScript,
fieldType,
defaultBtn,
SearchType,
}
......@@ -4,7 +4,7 @@ import Storage from 'vue-ls'
import router from './router/index'
import store from './store/'
import {VueAxios} from "@/util/axios/request"
import { VueAxios } from "@/util/axios/request"
import Antd from 'ant-design-vue'
import 'ant-design-vue/dist/antd.less'
......@@ -42,6 +42,12 @@ new Vue({
store.commit('TOGGLE_WEAK', config.colorWeak)
store.commit('TOGGLE_COLOR', config.primaryColor)
store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
store.commit('changeSize', [window.innerWidth, window.innerHeight])
},
render: h => h(App),
created() {
window.addEventListener('resize', () => {
store.commit('changeSize', [window.innerWidth, window.innerHeight])
});
}
}).$mount('#app')
\ No newline at end of file
......@@ -10,6 +10,7 @@ const getters = {
userInfo: state => state.user.info,
addRouters: state => state.permission.addRouters,
buttons: state => state.user.buttons,
size: state => [state.app.width, state.app.height]
};
export default getters
\ No newline at end of file
......@@ -28,7 +28,9 @@ const app = {
weak: false,
breadcrumb: [],
isLoading: false,
loadingLayer: 0
loadingLayer: 0,
height: 0,
width: 0,
},
mutations: {
SET_SIDEBAR_TYPE: (state, type) => {
......@@ -95,43 +97,47 @@ const app = {
resetLoading: (state) => {
state.loadingLayer = 0
state.isLoading = false
},
changeSize: (state, [width, height]) => {
state.height = height;
state.width = width;
}
},
actions: {
setSidebar: ({commit}, type) => {
setSidebar: ({ commit }, type) => {
commit('SET_SIDEBAR_TYPE', type)
},
CloseSidebar({commit}, {withoutAnimation}) {
CloseSidebar({ commit }, { withoutAnimation }) {
commit('CLOSE_SIDEBAR', withoutAnimation)
},
ToggleDevice({commit}, device) {
ToggleDevice({ commit }, device) {
commit('TOGGLE_DEVICE', device)
},
ToggleTheme({commit}, theme) {
ToggleTheme({ commit }, theme) {
commit('TOGGLE_THEME', theme)
},
ToggleLayoutMode({commit}, mode) {
ToggleLayoutMode({ commit }, mode) {
commit('TOGGLE_LAYOUT_MODE', mode)
},
ToggleFixedHeader({commit}, fixedHeader) {
ToggleFixedHeader({ commit }, fixedHeader) {
if (!fixedHeader) {
commit('TOGGLE_FIXED_HEADER_HIDDEN', false)
}
commit('TOGGLE_FIXED_HEADER', fixedHeader)
},
ToggleFixSiderbar({commit}, fixSiderbar) {
ToggleFixSiderbar({ commit }, fixSiderbar) {
commit('TOGGLE_FIXED_SIDERBAR', fixSiderbar)
},
ToggleFixedHeaderHidden({commit}, show) {
ToggleFixedHeaderHidden({ commit }, show) {
commit('TOGGLE_FIXED_HEADER_HIDDEN', show)
},
ToggleContentWidth({commit}, type) {
ToggleContentWidth({ commit }, type) {
commit('TOGGLE_CONTENT_WIDTH', type)
},
ToggleColor({commit}, color) {
ToggleColor({ commit }, color) {
commit('TOGGLE_COLOR', color)
},
ToggleWeak({commit}, weakFlag) {
ToggleWeak({ commit }, weakFlag) {
commit('TOGGLE_WEAK', weakFlag)
}
}
......
......@@ -53,6 +53,7 @@ service.interceptors.response.use((response) => {
return response
}
let data = response.data
console.info('data', 'datata', data)
if (response.config.url.replace(response.config.baseURL, '/') != '/login') {
// 非登录请求时
if (data.code == SYS_CONST.REQUEST.NOT_LOGIN) {
......
......@@ -2,6 +2,7 @@
* 触发 window.resize
*/
import store from '@/store/index'
import {getCommonCode} from '@/api/system/sysCode'
export function triggerWindowResizeEvent() {
let event = document.createEvent('HTMLEvents')
......@@ -95,3 +96,36 @@ export function hasBtnPermission(permission) {
return myBtns.has(permission)
}
const bizCode = {
};
const bizCodeMapping = {
};
export { bizCode, bizCodeMapping };
/**
* 从编码中获取字典值映射和下拉框选项数据
*/
export function getCodeOptions(codes, valueFiled) {
if(!valueFiled) {
valueFiled = 'valueInt';
}
return getCommonCode(codes).then(({ data: { data } }) => {
const codeMapping = {};
const options = {};
Object.keys(data).forEach((k) => {
const codeArray = data[k];
const map = {};
options[k] = codeArray.map(c => {
map[c[valueFiled]] = c['name'];
return {
title: c['name'],
value: c[valueFiled]
};
});
codeMapping[k] = map;
});
return [codeMapping, options];
});
}
\ No newline at end of file
<template>
<div class="news-detail">
<a-form @submit="handleSubmit" :form="form" class="cust-detail-form">
<header-tool-bar>
<span class="cust-title" slot="title">
<a-icon type="hdd"/>业主用户明细
</span>
<a-button-group slot="extra">
<!--<a-button type='primary' htmlType='submit' :loading="loading">保存</a-button>-->
<a-button type="primary" @click="back" ghost>返回</a-button>
</a-button-group>
</header-tool-bar>
<a-card title="业主用户详情" class="cust-normal-card">
<a-row :utter="gutter">
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='实名'>
<span>{{communityUser.realName}}</span>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='昵称'>
<span>{{communityUser.nickname}}</span>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='电话'>
<span>{{communityUser.phone}}</span>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='生日'>
<span>{{formatDate(new Date(communityUser.birthday), 'yyyy-MM-dd')}}</span>
</a-form-item>
</a-col>
</a-row>
<a-row :utter="gutter">
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='头像'>
<img style="width: 86px" :src="communityUser.avatar">
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='性别'>
<span v-for="item in this.sexList" :key="item.id" :value ="item.valueInt" v-if="communityUser.sex==item.valueInt">
{{item.name}}
</span>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
v-bind="formItemLayout"
label='级别'>
<span>{{communityUser.level}}</span>
</a-form-item>
</a-col>
</a-row>
</a-card>
<a-card title="房产列表" class="cust-normal-card">
<a-table
:columns="columns"
:dataSource="itemList"
size="middle"
:rowKey="rowKey"
:pagination="false"
class="cust-card-table"
bordered
>
</a-table>
</a-card>
</a-form>
</div>
</template>
<script>
import HeaderToolBar from '@/components/page/HeaderToolBar'
import {getDetail, save } from "../../../api/base/communityUser";
import moment from 'moment';
import {formatDate} from "@/util/util";
let listPathName = 'communityUserList';
const columns = [
{title: '社区',width:150, dataIndex: 'communityName'},
{title: '房产编号', dataIndex: 'code'}
]
export default {
name: "CommunityUserDetail",
components: {HeaderToolBar},
data() {
return {
id: 0,
online: false,
rowKey: "id",
columns: columns,
form: this.$form.createForm(this),
communityUser: {},
sexList: [],
itemList: [],
formItemLayout: {
labelCol: {
sm: {span: 8},
},
wrapperCol: {
sm: {span: 16},
},
},
loading: false,
gutter: 8,
}
},
activated() {
this.form.resetFields()
this.initData()
},
methods: {
moment,
formatDate,
initData() {
this.id = this.$route.query.id || 0
getDetail(this.id).then(resp => {
if (resp && resp.code == SYS_CONST.REQUEST.SUCCEED) {
this.communityUser = resp.data.communityUser
this.sexList = resp.data.codeMap[SYS_CONST.CODE.USER_SEX]
this.itemList = resp.data.houseList || []
}
})
},
handleSubmit(e) {
e.preventDefault();
this.form.validateFieldsAndScroll((err, values) => {
if (!err) {
let community = this.$valueCopy(this.communityUser, values.communityUser);
save(community).then(resp => {
if (resp && resp.code == SYS_CONST.REQUEST.SUCCEED) {
this.$notification.success({message: '系统提示', description: "保存成功", duration: 4,});
this.$router.push({name: listPathName, query: {isModify: this.id != 0}})
}
})
}
})
},
back() {
this.$router.push({name: listPathName})
},
},
mounted() {
},
};
</script>
<style>
.news-detail .cust-normal-card .ant-row {
height: auto;
}
</style>
<template>
<a-card class="cust-list-cart">
<div>
<a-form layout="horizontal" class="ant-advanced-search-form">
<div>
<a-row>
<a-col :span="6">
<a-form-item label="昵称" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input @pressEnter="search" placeholder="请输入" v-model="query.nickname"/>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="电话" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input oninput="value=value.replace(/[^\d]/g,'')" @pressEnter="search" placeholder="请输入" v-model="query.phone"/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
</div>
<div>
<a-table
size="middle"
@change="sortChange"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:rowKey="rowKey"
:rowSelection="{selectedRowKeys: selectedRowKeys, onChange: updateSelect}"
bordered
>
<div slot="title" slot-scope="data">
<span class="cust-title">
<a-icon type="hdd"/>业主用户列表{{data.none}}
</span>
<div class="cust-table-operator">
<a-button-group>
<a-button type="primary" @click="search">查询</a-button>
<a-button @click="reset">重置</a-button>
</a-button-group>
</div>
</div>
<div slot="footer" slot-scope="data">
{{data.none}}
<a-pagination
@change="pageChange"
:current="query.page"
:defaultPageSize="defaultPageSize"
:pageSizeOptions="$pageSizeOptions"
@showSizeChange="sizeChange"
class="cust-pagination"
size="small"
:total="total"
showSizeChanger
showQuickJumper
:showTotal="$showTotal"/>
</div>
<span slot="tags" slot-scope="text">
<img :src=text style="width: 25px;height: 25px;"/>
</span>
<span slot="action" slot-scope="text, record">
<a @click="editRow(record)">详情</a>
</span>
<span slot="sexTags" slot-scope="text">
<div v-for="option in sexList" :key="option.id">
<a-tag
v-if="text == option.valueInt"
:color="setSexColor(option)"
:key="text"
>
{{ option.name }}
</a-tag>
</div>
</span>
</a-table>
</div>
</a-card>
</template>
<script>
import {formatDate, humpToLine,setOrder} from "@/util/util";
import {getCommonCode} from "@/api/system/sysCode";
import {getPage} from "../../../api/base/communityUser";
let detailPathName = 'communityUserDetail'
const dataSource = []
const columns = [
{title: '头像', width: 80, dataIndex: 'avatar',align:'center',scopedSlots: {customRender: 'tags'}},
{title: '昵称', width: 180, dataIndex: 'nickname'},
{title: '电话', width: 100, dataIndex: 'phone'},
{title: '真实姓名', width: 90, dataIndex: 'realName'},
{title: '级别', width: 90, dataIndex: 'level'},
{
title: '性别',
width: 70,
dataIndex: 'sex',
scopedSlots: {customRender: 'sexTags'}
},
{
title: '生日',
dataIndex: 'birthday',
width: 110,
customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd')
},
{title: '备注', dataIndex: 'remark'},
{
title: '创建时间',
dataIndex: 'ctDate',
width: 120,
sorter: true,
customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd hh:mm')
},
{title: '操作', key: 'operation', width: 60, scopedSlots: {customRender: 'action'}}
]
export default {
name: 'CommunityHouseList',
data() {
return {
isFirstLoad: true,
query: {
nickname: "",
phone: "",
sort: "",
page: 1,
size: 10,
},
ctDatePicker: [],
total: 0,
rowKey: "id",
columns: columns,
dataSource: dataSource,
selectedRowKeys: [],
selectedRows: [],
sexList: [],
}
},
computed: {
defaultPageSize: function () {
return this.$defaultPageSize()
}
},
methods: {
search() {
this.query.page = 1
this.loadData();
},
reset() {
this.query.page = 1
this.query.nickname = "";
this.query.phone = "";
this.loadData();
},
pageChange(page) {
this.query.page = page;
this.loadData();
},
sizeChange(current, size) {
this.query.size = size;
this.loadData();
},
loadData(pageSize) {
if (pageSize && !isNaN(pageSize)) {
this.query.size = pageSize
}
getPage(this.query).then(response => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
let respData = response.data;
this.total = respData.total;
this.dataSource = respData.list;
}
});
},
sortChange(pagination, filters, sorter) {
this.query.sort = humpToLine(sorter.field);
this.query.order = setOrder(sorter.order);
this.loadData();
},
editRow(row) {
this.$router.push({name: detailPathName, query: {id: row ? row.id : 0}})
},
updateSelect(selectedRowKeys) {
this.selectedRowKeys = selectedRowKeys
},
setSexColor(option) {
if (option.valueInt == SYS_CONST.USER_SEX.MALE) {
return "blue";
} else if (option.valueInt == SYS_CONST.USER_SEX.FEMALE) {
return "#FFB7DD"
} else {
return "#DDDDDD"
}
},
getSysCode() {
getCommonCode([SYS_CONST.CODE.USER_SEX]).then(response => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
this.sexList = response.data.data[SYS_CONST.CODE.USER_SEX]
}
})
},
},
mounted() {
this.getSysCode();
},
activated() {
if (this.isFirstLoad == true) {
this.loadData(this.defaultPageSize)
this.isFirstLoad = false
} else {
let isModify = this.$route.query.isModify
if (isModify == true) {
this.loadData()
} else if (isModify != undefined) {
this.loadData()
}
}
}
}
</script>
\ No newline at end of file
<template>
<keep-alive v-if="keepAlive">
<router-view/>
</keep-alive>
<router-view v-else/>
</template>
<script>
export default {
name: "CommunityUserRouteView",
computed: {
keepAlive() {
return this.$route.meta.keepAlive
}
},
}
</script>
\ No newline at end of file
<template>
<a-card>
<div class="cust-list-cart" ref="code">
<a-form layout="horizontal" class="ant-advanced-search-form">
<div>
<a-row>
<a-col :span="6">
<a-form-item label="项目名称" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input
@pressEnter="search"
style="width: 100%"
v-model="query.projectName"
placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item label="错误码" :labelCol="{span: 8}" :wrapperCol="{span: 16}">
<a-input
@pressEnter="search"
style="width: 100%"
v-model="query.errorCode"
placeholder="请输入"/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item label="创建时间" :labelCol="{span: 4}" :wrapperCol="{span: 20}">
<a-range-picker style="width:100%" :value="ctDatePicker" @change="onCtDateChange"/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
<a-table
size="middle"
@change="sortChange"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:rowKey="rowKey"
bordered
>
<div slot="title" slot-scope="data">
<span class="cust-title">
<a-icon type="hdd"/>异常日志列表{{data.none}}
</span>
<div class="cust-table-operator">
<a-button-group>
<a-button type="primary" @click="search">查询</a-button>
<a-button @click="reset">重置</a-button>
</a-button-group>
</div>
</div>
<div slot="footer" slot-scope="data">
{{data.none}}
<a-pagination
@change="pageChange"
:defaultPageSize="defaultPageSize"
:pageSizeOptions="$pageSizeOptions"
@showSizeChange="sizeChange"
class="cust-pagination"
size="small"
:total="total"
showSizeChanger
showQuickJumper
:showTotal="$showTotal"/>
</div>
</a-table>
</div>
</a-card>
<table-template :soul="this"> </table-template>
</template>
<script>
import {getPage} from "@/api/base/baseErrorLog";
import {formatDate, humpToLine, setOrder} from "@/util/util";
const dataSource = [];
const columns = [
{title: '操作人员', width: 120, dataIndex: 'userName'},
{title: '项目名称', width: 130, dataIndex: 'projectName'},
{title: '错误码', width: 100, dataIndex: 'errorCode'},
{title: '平台类型', width: 100, dataIndex: 'platform'},
{title: '日志异常信息', dataIndex: 'content'},
{
title: '创建时间',
dataIndex: 'ctDate',
width: 120,
sorter: true,
customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd hh:mm')
}
];
export default {
name: "ErrorLogList",
data() {
return {
query: {
page: 1,
size: 10,
projectName: "",
errorCode: "",
ctDateBegin: "",
ctDateEnd: "",
sort: ""
},
ctDatePicker: [],
rowKey: "id",
total: 0,
columns: columns,
dataSource: dataSource,
isFirstLoad: true,
}
},
methods: {
reset() {
this.query.page = 1;
this.query.projectName = "";
this.query.errorCode = "";
this.query.ctDateBegin = "";
this.query.ctDateEnd = "";
this.ctDatePicker = [];
this.loadData();
},
loadData(size) {
if (size && !isNaN(size)) {
this.query.size = size
}
getPage(this.query).then(response => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
let respData = response.data;
this.dataSource = respData.list;
this.total = respData.total;
}
});
},
search() {
this.query.page = 1;
this.loadData();
},
onCtDateChange(date, dateString) {
this.ctDatePicker = date;
this.query.ctDateBegin = dateString[0]
this.query.ctDateEnd = dateString[1]
this.loadData()
},
pageChange(page) {
this.query.page = page;
this.loadData();
},
sizeChange(current, size) {
this.query.size = size;
this.loadData();
},
sortChange(pagination, filters, sorter) {
this.query.sort = humpToLine(sorter.field);
this.query.order = setOrder(sorter.order);
this.loadData();
},
},
computed: {
defaultPageSize: function () {
return this.$defaultPageSize()
}
},
mounted() {
},
activated() {
if (this.isFirstLoad == true) {
this.loadData(this.defaultPageSize)
this.isFirstLoad = false
} else {
let isModify = this.$route.query.isModify
if (isModify == true) {
this.loadData()
} else if (isModify != undefined) {
this.loadData()
}
}
import { TableTemplate, TableScript, SearchType } from '@/components/table'
import { getPage } from '@/api/base/baseErrorLog'
const columns = [
{ title: '操作人员', width: 120, dataIndex: 'userName' },
{
title: '项目名称',
width: 130,
dataIndex: 'projectName',
filter: { type: SearchType.STRING }
},
{ title: '错误码', width: 100, dataIndex: 'errorCode', filter: { type: SearchType.STRING } },
{ title: '平台类型', width: 100, dataIndex: 'platform', filter: { type: SearchType.STRING } },
{ title: '日志异常信息', dataIndex: 'content', width: 300, ellipsis: true, filter: { type: SearchType.STRING } },
{
title: '创建时间',
dataIndex: 'createTime',
width: 120,
sorter: true,
filter: { type: SearchType.STRING }
// customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd hh:mm')
}
]
export default {
name: 'ErrorLogList',
mixins: [TableScript],
components: { TableTemplate },
data() {
return {
columns,
useYScroll: true,
title: '错误日志'
}
},
methods: {
queryData: getPage
}
</script>
<style scoped>
</style>
\ No newline at end of file
}
</script>
\ No newline at end of file
<template>
<a-card>
<div class="cust-list-cart" ref="code">
<a-form layout="horizontal" class="ant-advanced-search-form">
<div>
<a-row>
<a-col :span="6">
<a-form-item
label="项目名称"
:labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }"
>
<a-input
@pressEnter="search"
style="width: 100%"
v-model="query.projectName"
placeholder="请输入"
/>
</a-form-item>
</a-col>
<a-col :span="6">
<a-form-item
label="错误码"
:labelCol="{ span: 8 }"
:wrapperCol="{ span: 16 }"
>
<a-input
@pressEnter="search"
style="width: 100%"
v-model="query.errorCode"
placeholder="请输入"
/>
</a-form-item>
</a-col>
<a-col :span="12">
<a-form-item
label="创建时间"
:labelCol="{ span: 4 }"
:wrapperCol="{ span: 20 }"
>
<a-range-picker
style="width: 100%"
:value="ctDatePicker"
@change="onCtDateChange"
/>
</a-form-item>
</a-col>
</a-row>
</div>
</a-form>
<a-table
size="middle"
@change="sortChange"
:columns="columns"
:dataSource="dataSource"
:pagination="false"
:rowKey="rowKey"
bordered
>
<div slot="title" slot-scope="data">
<span class="cust-title">
<a-icon type="hdd" />异常日志列表{{ data.none }}
</span>
<div class="cust-table-operator">
<a-button-group>
<a-button type="primary" @click="search">查询</a-button>
<a-button key="dddsa" type="primary" @click="exportExcel">xxsad</a-button>
<a-button @click="reset">重置</a-button>
</a-button-group>
</div>
</div>
<!-- <div slot="footer" slot-scope="data">
{{ data.none }}
<a-pagination
@change="pageChange"
:defaultPageSize="defaultPageSize"
:pageSizeOptions="$pageSizeOptions"
@showSizeChange="sizeChange"
class="cust-pagination"
size="small"
:total="total"
showSizeChanger
showQuickJumper
:showTotal="$showTotal"
/>
</div> -->
</a-table>
</div>
</a-card>
</template>
<script>
import { getPage, exportExxx } from '@/api/base/baseErrorLog'
import { formatDate, humpToLine, setOrder } from '@/util/util'
import fileDownload from 'js-file-download';
const dataSource = []
const columns = [
{ title: '操作人员', width: 120, dataIndex: 'userName' },
{ title: '项目名称', width: 130, dataIndex: 'projectName' },
{ title: '错误码', width: 100, dataIndex: 'errorCode' },
{ title: '平台类型', width: 100, dataIndex: 'platform' },
{ title: '日志异常信息', dataIndex: 'content', width: 300, ellipsis: true },
{
title: '创建时间',
dataIndex: 'createTime',
width: 120,
sorter: true,
customRender: (text) => formatDate(new Date(text), 'yyyy-MM-dd hh:mm')
}
]
export default {
name: 'ErrorLogList',
data() {
return {
query: {
page: 1,
size: 10,
projectName: '',
errorCode: '',
ctDateBegin: '',
ctDateEnd: '',
sort: ''
},
ctDatePicker: [],
rowKey: 'id',
total: 0,
columns: columns,
dataSource: dataSource,
isFirstLoad: true
}
},
methods: {
reset() {
this.query.page = 1
this.query.projectName = ''
this.query.errorCode = ''
this.query.ctDateBegin = ''
this.query.ctDateEnd = ''
this.ctDatePicker = []
this.loadData()
},
exportExcel() {
exportExxx().then((response) => {
if (response && response.data) {
fileDownload(response.data, '退票统计.xlsx')
}
})
},
loadData(size) {
if (size && !isNaN(size)) {
this.query.size = size
}
getPage(this.query).then((response) => {
if (response && response.code == SYS_CONST.REQUEST.SUCCEED) {
let respData = response.data
this.dataSource = respData.list
this.total = respData.total
}
})
},
search() {
this.query.page = 1
this.loadData()
},
onCtDateChange(date, dateString) {
this.ctDatePicker = date
this.query.ctDateBegin = dateString[0]
this.query.ctDateEnd = dateString[1]
this.loadData()
},
pageChange(page) {
this.query.page = page
this.loadData()
},
sizeChange(current, size) {
this.query.size = size
this.loadData()
},
sortChange(pagination, filters, sorter) {
this.query.sort = humpToLine(sorter.field)
this.query.order = setOrder(sorter.order)
this.loadData()
}
},
computed: {
defaultPageSize: function () {
return this.$defaultPageSize()
}
},
mounted() {},
activated() {
if (this.isFirstLoad == true) {
this.loadData(this.defaultPageSize)
this.isFirstLoad = false
} else {
let isModify = this.$route.query.isModify
if (isModify == true) {
this.loadData()
} else if (isModify != undefined) {
this.loadData()
}
}
}
}
</script>
<style scoped>
</style>
\ No newline at end of file
This diff is collapsed.
<template>
<keep-alive v-if="keepAlive">
<router-view />
</keep-alive>
<router-view v-else />
</template>
<script>
export default {
name: "GroupWechatConfigRouteView",
computed: {
keepAlive () {
return this.$route.meta.keepAlive
}
},
}
</script>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment