给租户增加有效期
This commit is contained in:
@@ -49,9 +49,11 @@
|
||||
<a-row :gutter="24">
|
||||
<a-col :sm="24" :md="24" :xl="24" :style="{ marginBottom: '5px' }">
|
||||
<a-card :bordered="false" :body-style="{padding: '5'}">
|
||||
<div class="hidden-xs" style="float:right;">当前版本:V3.0</div>
|
||||
© 2015-2030 {{systemTitle}} - Powered By
|
||||
<a :href="systemUrl" target="_blank">官方网站</a>
|
||||
<div class="hidden-xs" style="float:right;">© 2015-2030 {{systemTitle}} V3.0</div>
|
||||
<a-tag v-if="tenant.type==0" color="blue">试用到期:{{tenant.expireTime}}</a-tag>
|
||||
<a-tag v-if="tenant.type==0" color="blue">试用用户:{{tenant.userCurrentNum}}/{{tenant.userNumLimit}}</a-tag>
|
||||
<a-tag v-if="tenant.type==1" color="blue">服务到期:{{tenant.expireTime}}</a-tag>
|
||||
<a-tag v-if="tenant.type==1" color="blue">授权用户:{{tenant.userCurrentNum}}/{{tenant.userNumLimit}}</a-tag>
|
||||
</a-card>
|
||||
</a-col>
|
||||
</a-row>
|
||||
@@ -69,6 +71,7 @@
|
||||
import HeadInfo from '@/components/tools/HeadInfo.vue'
|
||||
import Trend from '@/components/Trend'
|
||||
import { getBuyAndSaleStatistics, buyOrSalePrice } from '@/api/api'
|
||||
import { getAction } from '../../api/manage'
|
||||
|
||||
export default {
|
||||
name: "IndexChart",
|
||||
@@ -94,14 +97,21 @@
|
||||
buyPriceData: [],
|
||||
salePriceData: [],
|
||||
visitFields:['ip','visit'],
|
||||
visitInfo:[]
|
||||
visitInfo:[],
|
||||
tenant: {
|
||||
type: '',
|
||||
expireTime: '',
|
||||
userCurrentNum: '',
|
||||
userNumLimit: ''
|
||||
}
|
||||
}
|
||||
},
|
||||
created() {
|
||||
setTimeout(() => {
|
||||
this.loading = !this.loading
|
||||
}, 1000)
|
||||
this.initInfo();
|
||||
this.initInfo()
|
||||
this.initWithTenant()
|
||||
},
|
||||
methods: {
|
||||
initInfo () {
|
||||
@@ -116,6 +126,13 @@
|
||||
this.salePriceData = res.data.salePriceList;
|
||||
}
|
||||
})
|
||||
},
|
||||
initWithTenant() {
|
||||
getAction("/user/infoWithTenant",{}).then(res=>{
|
||||
if(res && res.code === 200) {
|
||||
this.tenant = res.data
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -11,6 +11,22 @@
|
||||
<a-input placeholder="输入登录名称模糊查询" v-model="queryParam.loginName"></a-input>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-form-item label="租户类型" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select v-model="queryParam.type" placeholder="请选择租户类型">
|
||||
<a-select-option value="0">免费租户</a-select-option>
|
||||
<a-select-option value="1">付费租户</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<a-form-item label="租户状态" :labelCol="labelCol" :wrapperCol="wrapperCol">
|
||||
<a-select v-model="queryParam.enabled" placeholder="请选择操作状态">
|
||||
<a-select-option value="1">启用</a-select-option>
|
||||
<a-select-option value="0">禁用</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
</a-col>
|
||||
<a-col :md="6" :sm="24">
|
||||
<span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
|
||||
<a-button type="primary" @click="searchQuery">查询</a-button>
|
||||
@@ -51,7 +67,11 @@
|
||||
<a @click="handleEdit(record)">编辑</a>
|
||||
</span>
|
||||
<!-- 状态渲染模板 -->
|
||||
<template slot="customRenderFlag" slot-scope="enabled">
|
||||
<template slot="customRenderType" slot-scope="type">
|
||||
<a-tag v-if="type==0">免费租户</a-tag>
|
||||
<a-tag v-if="type==1" color="green">付费租户</a-tag>
|
||||
</template>
|
||||
<template slot="customRenderEnabled" slot-scope="enabled">
|
||||
<a-tag v-if="enabled" color="green">启用</a-tag>
|
||||
<a-tag v-if="!enabled" color="orange">禁用</a-tag>
|
||||
</template>
|
||||
@@ -85,7 +105,9 @@
|
||||
offset: 1
|
||||
},
|
||||
queryParam: {
|
||||
loginName: ""
|
||||
loginName: '',
|
||||
type: '',
|
||||
enabled: ''
|
||||
},
|
||||
columns: [
|
||||
{
|
||||
@@ -100,8 +122,11 @@
|
||||
},
|
||||
{ title: '登录名称', dataIndex: 'loginName', width: 100, align: "center"},
|
||||
{ title: '用户数量限制', dataIndex: 'userNumLimit', width: 100, align: "center"},
|
||||
{ title: '状态',dataIndex: 'enabled',width:70,align:"center",
|
||||
scopedSlots: { customRender: 'customRenderFlag' }
|
||||
{ title: '租户类型',dataIndex: 'type',width:70,align:"center",
|
||||
scopedSlots: { customRender: 'customRenderType' }
|
||||
},
|
||||
{ title: '租户状态',dataIndex: 'enabled',width:70,align:"center",
|
||||
scopedSlots: { customRender: 'customRenderEnabled' }
|
||||
},
|
||||
{ title: '创建时间', dataIndex: 'createTimeStr', width: 100, align: "center"},
|
||||
{ title: '到期时间', dataIndex: 'expireTimeStr', width: 100, align: "center"},
|
||||
|
||||
@@ -16,7 +16,16 @@
|
||||
suffix="初始密码:123456" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="用户数量限制">
|
||||
<a-input-number style="width:50%" placeholder="请输入用户数量限制" v-decorator.trim="[ 'userNumLimit' ]" />
|
||||
<a-input-number style="width:60%" placeholder="请输入用户数量限制" v-decorator.trim="[ 'userNumLimit' ]" />
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="租户类型">
|
||||
<a-select style="width:60%" placeholder="请选择租户类型" v-decorator.trim="[ 'type' ]">
|
||||
<a-select-option value="0">免费租户</a-select-option>
|
||||
<a-select-option value="1">付费租户</a-select-option>
|
||||
</a-select>
|
||||
</a-form-item>
|
||||
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="到期时间">
|
||||
<j-date style="width:60%" placeholder="请选择到期时间" v-decorator.trim="[ 'expireTime' ]" :show-time="true"/>
|
||||
</a-form-item>
|
||||
</a-form>
|
||||
</a-spin>
|
||||
@@ -25,8 +34,12 @@
|
||||
<script>
|
||||
import pick from 'lodash.pick'
|
||||
import {registerUser,editTenant,checkTenant } from '@/api/api'
|
||||
import JDate from '@/components/jeecg/JDate'
|
||||
export default {
|
||||
name: "TenantModal",
|
||||
components: {
|
||||
JDate
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title:"操作",
|
||||
@@ -62,9 +75,10 @@
|
||||
edit (record) {
|
||||
this.form.resetFields();
|
||||
this.model = Object.assign({}, record);
|
||||
this.model.expireTime = this.model.expireTimeStr
|
||||
this.visible = true;
|
||||
this.$nextTick(() => {
|
||||
this.form.setFieldsValue(pick(this.model,'loginName', 'userNumLimit', 'billsNumLimit'))
|
||||
this.form.setFieldsValue(pick(this.model,'loginName', 'userNumLimit', 'billsNumLimit', 'type', 'expireTime'))
|
||||
});
|
||||
},
|
||||
close () {
|
||||
|
||||
@@ -202,6 +202,10 @@
|
||||
err.message = '用户所属的租户被禁用';
|
||||
this.requestFailed(err)
|
||||
this.Logout();
|
||||
} else if(res.data.msgTip == 'tenant is expire'){
|
||||
err.message = '用户所属的租户已过期';
|
||||
this.requestFailed(err)
|
||||
this.Logout();
|
||||
} else if(res.data.msgTip == 'access service error'){
|
||||
err.message = '查询服务异常';
|
||||
this.requestFailed(err)
|
||||
|
||||
@@ -242,7 +242,7 @@
|
||||
} else {
|
||||
this.$notification['error']({
|
||||
message: "提示",
|
||||
description: "注册失败",
|
||||
description: res.data.message || "注册失败",
|
||||
duration: 2
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user