增加平台配置的页面
This commit is contained in:
@@ -78,6 +78,8 @@ const checkSystemConfig = (params)=>getAction("/systemConfig/checkIsNameExist",p
|
|||||||
const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
|
const getCurrentSystemConfig = (params)=>getAction("/systemConfig/getCurrentInfo",params);
|
||||||
const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);
|
const fileSizeLimit = (params)=>getAction("/systemConfig/fileSizeLimit",params);
|
||||||
//平台参数
|
//平台参数
|
||||||
|
const addPlatformConfig = (params)=>postAction("/platformConfig/add",params);
|
||||||
|
const editPlatformConfig = (params)=>putAction("/platformConfig/update",params);
|
||||||
const getPlatformConfigByKey = (params)=>getAction("/platformConfig/getPlatformConfigByKey",params);
|
const getPlatformConfigByKey = (params)=>getAction("/platformConfig/getPlatformConfigByKey",params);
|
||||||
//用户|角色|模块关系
|
//用户|角色|模块关系
|
||||||
const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
|
const addUserBusiness = (params)=>postAction("/userBusiness/add",params);
|
||||||
@@ -164,6 +166,8 @@ export {
|
|||||||
checkSystemConfig,
|
checkSystemConfig,
|
||||||
getCurrentSystemConfig,
|
getCurrentSystemConfig,
|
||||||
fileSizeLimit,
|
fileSizeLimit,
|
||||||
|
addPlatformConfig,
|
||||||
|
editPlatformConfig,
|
||||||
getPlatformConfigByKey,
|
getPlatformConfigByKey,
|
||||||
addUserBusiness,
|
addUserBusiness,
|
||||||
editUserBusiness,
|
editUserBusiness,
|
||||||
|
|||||||
103
jshERP-web/src/views/system/PlatformConfigList.vue
Normal file
103
jshERP-web/src/views/system/PlatformConfigList.vue
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
<template>
|
||||||
|
<a-row :gutter="24">
|
||||||
|
<a-col :md="24">
|
||||||
|
<a-card :style="cardStyle" :bordered="false">
|
||||||
|
<!-- table区域-begin -->
|
||||||
|
<div>
|
||||||
|
<a-table
|
||||||
|
ref="table"
|
||||||
|
size="middle"
|
||||||
|
bordered
|
||||||
|
rowKey="id"
|
||||||
|
:columns="columns"
|
||||||
|
:dataSource="dataSource"
|
||||||
|
:pagination="ipagination"
|
||||||
|
:scroll="scroll"
|
||||||
|
:loading="loading"
|
||||||
|
@change="handleTableChange">
|
||||||
|
<span slot="action" slot-scope="text, record">
|
||||||
|
<a @click="handleEdit(record)">编辑</a>
|
||||||
|
</span>
|
||||||
|
</a-table>
|
||||||
|
</div>
|
||||||
|
<!-- table区域-end -->
|
||||||
|
<!-- 表单区域 -->
|
||||||
|
<platform-config-modal ref="modalForm" @ok="modalFormOk"></platform-config-modal>
|
||||||
|
</a-card>
|
||||||
|
</a-col>
|
||||||
|
</a-row>
|
||||||
|
</template>
|
||||||
|
<!-- f r o m 7 5 2 7 1 8 9 2 0 -->
|
||||||
|
<script>
|
||||||
|
import PlatformConfigModal from './modules/PlatformConfigModal'
|
||||||
|
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
|
||||||
|
export default {
|
||||||
|
name: "PlatformConfigList",
|
||||||
|
mixins:[JeecgListMixin],
|
||||||
|
components: {
|
||||||
|
PlatformConfigModal
|
||||||
|
},
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
currentRoleId: '',
|
||||||
|
labelCol: {
|
||||||
|
span: 5
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
span: 18,
|
||||||
|
offset: 1
|
||||||
|
},
|
||||||
|
// 查询条件
|
||||||
|
queryParam: {platformKey:'',},
|
||||||
|
// 表头
|
||||||
|
columns: [
|
||||||
|
{
|
||||||
|
title: '#',
|
||||||
|
dataIndex: '',
|
||||||
|
key:'rowIndex',
|
||||||
|
width:40,
|
||||||
|
align:"center",
|
||||||
|
customRender:function (t,r,index) {
|
||||||
|
return parseInt(index)+1;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '配置名称',
|
||||||
|
dataIndex: 'platformKeyInfo',
|
||||||
|
width: 100
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '配置值',
|
||||||
|
dataIndex: 'platformValue',
|
||||||
|
width: 500
|
||||||
|
},
|
||||||
|
{
|
||||||
|
title: '操作',
|
||||||
|
dataIndex: 'action',
|
||||||
|
align:"center",
|
||||||
|
width: 100,
|
||||||
|
scopedSlots: { customRender: 'action' },
|
||||||
|
}
|
||||||
|
],
|
||||||
|
url: {
|
||||||
|
list: "/platformConfig/list",
|
||||||
|
delete: "/platformConfig/delete",
|
||||||
|
deleteBatch: "/platformConfig/deleteBatch"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
handleEdit: function (record) {
|
||||||
|
this.$refs.modalForm.edit(record);
|
||||||
|
this.$refs.modalForm.title = "编辑";
|
||||||
|
this.$refs.modalForm.disableSubmit = false;
|
||||||
|
if(this.btnEnableList.indexOf(1)===-1) {
|
||||||
|
this.$refs.modalForm.isReadOnly = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
@import '~@assets/less/common.less'
|
||||||
|
</style>
|
||||||
100
jshERP-web/src/views/system/modules/PlatformConfigModal.vue
Normal file
100
jshERP-web/src/views/system/modules/PlatformConfigModal.vue
Normal file
@@ -0,0 +1,100 @@
|
|||||||
|
<template>
|
||||||
|
<a-modal
|
||||||
|
:title="title"
|
||||||
|
:width="800"
|
||||||
|
:visible="visible"
|
||||||
|
:confirmLoading="confirmLoading"
|
||||||
|
@ok="handleOk"
|
||||||
|
@cancel="handleCancel"
|
||||||
|
cancelText="关闭"
|
||||||
|
wrapClassName="ant-modal-cust-warp"
|
||||||
|
style="top:30%;height: 40%;overflow-y: hidden">
|
||||||
|
<a-spin :spinning="confirmLoading">
|
||||||
|
<a-form :form="form" id="platformConfigModal">
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="配置名称">
|
||||||
|
<a-input placeholder="请输入配置名称" v-decorator.trim="[ 'platformKeyInfo' ]" :readOnly="true" />
|
||||||
|
</a-form-item>
|
||||||
|
<a-form-item :labelCol="labelCol" :wrapperCol="wrapperCol" label="配置值">
|
||||||
|
<a-input placeholder="请输入配置值" v-decorator.trim="[ 'platformValue' ]" />
|
||||||
|
</a-form-item>
|
||||||
|
</a-form>
|
||||||
|
</a-spin>
|
||||||
|
</a-modal>
|
||||||
|
</template>
|
||||||
|
<script>
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
import {addPlatformConfig,editPlatformConfig } from '@/api/api'
|
||||||
|
import {autoJumpNextInput} from "@/utils/util"
|
||||||
|
export default {
|
||||||
|
name: "PlatformConfigModal",
|
||||||
|
data () {
|
||||||
|
return {
|
||||||
|
title:"操作",
|
||||||
|
visible: false,
|
||||||
|
model: {},
|
||||||
|
labelCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 5 },
|
||||||
|
},
|
||||||
|
wrapperCol: {
|
||||||
|
xs: { span: 24 },
|
||||||
|
sm: { span: 16 },
|
||||||
|
},
|
||||||
|
confirmLoading: false,
|
||||||
|
form: this.$form.createForm(this)
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created () {
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
add () {
|
||||||
|
this.edit({});
|
||||||
|
},
|
||||||
|
edit (record) {
|
||||||
|
this.form.resetFields();
|
||||||
|
this.model = Object.assign({}, record);
|
||||||
|
this.visible = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.form.setFieldsValue(pick(this.model,'platformKeyInfo', 'platformValue'))
|
||||||
|
autoJumpNextInput('platformConfigModal')
|
||||||
|
});
|
||||||
|
},
|
||||||
|
close () {
|
||||||
|
this.$emit('close');
|
||||||
|
this.visible = false;
|
||||||
|
},
|
||||||
|
handleOk () {
|
||||||
|
const that = this;
|
||||||
|
// 触发表单验证
|
||||||
|
this.form.validateFields((err, values) => {
|
||||||
|
if (!err) {
|
||||||
|
that.confirmLoading = true;
|
||||||
|
let formData = Object.assign(this.model, values);
|
||||||
|
let obj;
|
||||||
|
if(!this.model.id){
|
||||||
|
obj=addPlatformConfig(formData);
|
||||||
|
}else{
|
||||||
|
obj=editPlatformConfig(formData);
|
||||||
|
}
|
||||||
|
obj.then((res)=>{
|
||||||
|
if(res.code === 200){
|
||||||
|
that.$emit('ok');
|
||||||
|
}else{
|
||||||
|
that.$message.warning(res.data.message);
|
||||||
|
}
|
||||||
|
}).finally(() => {
|
||||||
|
that.confirmLoading = false;
|
||||||
|
that.close();
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
handleCancel () {
|
||||||
|
this.close()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
<a-form-item>
|
<a-form-item>
|
||||||
<a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]" >自动登陆</a-checkbox>
|
<a-checkbox v-decorator="['rememberMe', {initialValue: true, valuePropName: 'checked'}]" >自动登陆</a-checkbox>
|
||||||
<router-link :to="{ name: 'register'}" class="forge-password" style="float: right;margin-right: 10px;" >
|
<router-link v-if="registerFlag==='1'" :to="{ name: 'register'}" class="forge-password" style="float: right;margin-right: 10px;" >
|
||||||
注册租户
|
注册租户
|
||||||
</router-link>
|
</router-link>
|
||||||
</a-form-item>
|
</a-form-item>
|
||||||
@@ -61,11 +61,13 @@
|
|||||||
import { mapActions } from "vuex"
|
import { mapActions } from "vuex"
|
||||||
import { timeFix } from "@/utils/util"
|
import { timeFix } from "@/utils/util"
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
import {getPlatformConfigByKey } from '@/api/api'
|
||||||
import { ACCESS_TOKEN ,ENCRYPTED_STRING} from "@/store/mutation-types"
|
import { ACCESS_TOKEN ,ENCRYPTED_STRING} from "@/store/mutation-types"
|
||||||
import { putAction,postAction,getAction } from '@/api/manage'
|
import { putAction,postAction,getAction } from '@/api/manage'
|
||||||
import { encryption , getEncryptedString } from '@/utils/encryption/aesEncrypt'
|
import { encryption , getEncryptedString } from '@/utils/encryption/aesEncrypt'
|
||||||
import store from '@/store/'
|
import store from '@/store/'
|
||||||
import { USER_INFO } from "@/store/mutation-types"
|
import { USER_INFO } from "@/store/mutation-types"
|
||||||
|
import pick from 'lodash.pick'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@@ -104,6 +106,7 @@
|
|||||||
validate_status:"",
|
validate_status:"",
|
||||||
currdatetime:'',
|
currdatetime:'',
|
||||||
randCodeImage:'',
|
randCodeImage:'',
|
||||||
|
registerFlag:'',
|
||||||
requestCodeSuccess:false
|
requestCodeSuccess:false
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -111,6 +114,7 @@
|
|||||||
this.currdatetime = new Date().getTime();
|
this.currdatetime = new Date().getTime();
|
||||||
Vue.ls.remove(ACCESS_TOKEN)
|
Vue.ls.remove(ACCESS_TOKEN)
|
||||||
this.getRouterData();
|
this.getRouterData();
|
||||||
|
this.getRegisterFlag();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
...mapActions([ "Login", "Logout" ]),
|
...mapActions([ "Login", "Logout" ]),
|
||||||
@@ -241,6 +245,13 @@
|
|||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
getRegisterFlag(){
|
||||||
|
getPlatformConfigByKey( {"platformKey": "register_flag"}).then((res)=>{
|
||||||
|
if(res && res.code == 200) {
|
||||||
|
this.registerFlag = res.data.platformValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
//获取密码加密规则
|
//获取密码加密规则
|
||||||
getEncrypte(){
|
getEncrypte(){
|
||||||
var encryptedString = Vue.ls.get(ENCRYPTED_STRING);
|
var encryptedString = Vue.ls.get(ENCRYPTED_STRING);
|
||||||
|
|||||||
Reference in New Issue
Block a user