Commit 47749de4 authored by kangzhenfei's avatar kangzhenfei

saas优化

parent d265c609
......@@ -198,19 +198,23 @@ export default {
let model = {
id: id
};
return Api.post(`${systemUrl}/user/AccountReset`, model);
// return Api.post(`${systemUrl}/user/AccountReset`, model);
return Api.post(`${system}/account/AccountReset`, model);
},
//根据id获取用户详情
getuserinfo(params) {
return Api.get(`${systemUrl}/user/getuserinfo`,params);
// return Api.get(`${systemUrl}/user/getuserinfo`,params);
return Api.get(`${system}/account/getuserinfo`,params);
},
//修改用户头像
changeavatar(params) {
return Api.post(`${systemUrl}/user/changeavatar`, params, true);
// return Api.post(`${systemUrl}/user/changeavatar`, params, true);
return Api.post(`${system}/account/changeavatar`, params, true);
},
//根据id获取用户详情
getusermenuOld() {
return Api.get(`${systemUrl}/usermenu/getusermenu`);
// return Api.get(`${systemUrl}/usermenu/getusermenu`);
return Api.get(`${system}/usermenu/getusermenu`);
},
getFile(params)
{
......
......@@ -932,7 +932,7 @@ export default {
startTime: '服务开始时间',
endTime: '服务结束时间',
initialized: '是否已初始化',
dataSourceId: '数据源',
dataSourceId: '数据源配置 ',
creationTime: '创建时间',
creatorUserId: '创建人',
lastModificationTime: '更新时间',
......@@ -960,20 +960,29 @@ export default {
lastLoginTime:'最后登录时间',
loginTimes:'累计登录次数',
},
databases:{
hostName: "主机",
ip: "IP",
databaseTypeName: "数据库类型",
databaseName: "数据库",
databaseType: "数据字典主键",
port: "端口",
tenantId: 0,
},
//多租户-套餐管理
set_menu:{
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'套餐名称',
remark:'备注',
status:'状态',
menuIds:'菜单'
id:'',
creationTime:'创建时间',
creatorUserId:'创建人',
lastModificationTime:'更新时间',
lastModifierUserId:'更新人',
isDeleted:'删除人',
deletionTime:'删除时间',
deleterUserId:'删除人',
title:'套餐名称',
remark:'备注',
status:'状态',
menuIds:'菜单'
},//多租户-菜单管理
menu: {
id: '',
......
......@@ -69,7 +69,8 @@ export default {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
var url2 = `${systemUrl}/Dictionary/createorupdate`
// var url2 = `${systemUrl}/Dictionary/createorupdate`
var url2 = `${system}/Dictionary/createorupdate`
this.$api.post(url2, { Dictionary: this.entity }).then((r) => {
if (r.success) {
this.$Message.success('保存成功')
......
......@@ -16,17 +16,20 @@
</Col>
<Col :span="24">
<FormItem :label="l('port')" prop="port">
<InputNumber v-model="entity.port"></InputNumber>
<!-- <InputNumber v-model="entity.port"></InputNumber> -->
<span>{{entity.port}}</span>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('userName')" prop="userName">
<Input v-model="entity.userName"></Input>
<!-- <Input v-model="entity.userName"></Input> -->
<span>{{entity.userName}}</span>
</FormItem>
</Col>
<Col :span="24">
<FormItem :label="l('password')" prop="password">
<Input v-model="entity.password"></Input>
<!-- <Input v-model="entity.password"></Input> -->
<span>{{entity.password}}</span>
</FormItem>
</Col>
</Row>
......
......@@ -69,7 +69,8 @@ export default {
handleSubmit() {
this.$refs.form.validate((v) => {
if (v) {
var url2 = `${systemUrl}/Dictionary/createorupdate`
// var url2 = `${systemUrl}/Dictionary/createorupdate`
var url2 = `${system}/Dictionary/createorupdate`
this.$api.post(url2, { Dictionary: this.entity }).then((r) => {
if (r.success) {
this.$Message.success('保存成功')
......
......@@ -4,6 +4,12 @@ export default {
paged(params){
return Api.post(`${system}/setmenu/paged`,params);
},
pagedSql(params) {
return Api.get(`${system}/tenant/gettenantdatabases`, params);
},
setMenuSql(params) {
return Api.post(`${system}/tenant/configdatasource`,params );
},
get(params){
return Api.get(`${system}/setmenu/get`,params);
},
......
......@@ -27,10 +27,10 @@
<Modal v-model="detailModal" title="详情">
<Detail :eid="curId" />
</Modal>
<Modal v-model="datadetailModal" title="数据源详情">
<dataDetail :eid="datacurId" />
<Modal v-model="datadetailModal" title="数据源配置" footer-hide width='830'>
<dataDetail :elid="datacurId" />
</Modal>
<Modal v-model="setModal" title="套餐配置" footer-hide width='830'>
<Modal v-model="setModal" title="套餐配置" footer-hide width='830'>
<menuSet :companyId="curId" @set-ok="setOk"/>
</Modal>
<Modal v-model="apsModal" title="APS配置" footer-hide >
......@@ -57,7 +57,7 @@ import Add from './add'
import Edit from './edit'
import Detail from './detail'
import Search from './search'
import dataDetail from '../data_source/detail'
import dataDetail from './setdetail'
import menuSet from './menuset'
export default {
name: 'list',
......@@ -116,38 +116,40 @@ export default {
high: true
},
{ key: 'endTime', title: this.l('endTime'), align: 'left', high: true },
{
key: 'initialized',
title: this.l('initialized'),
align: 'left',
high: true,
code: 'system.Tanant.init'
},
// {
// key: 'initialized',
// title: this.l('initialized'),
// align: 'left',
// high: true,
// code: 'system.Tanant.init'
// },
{
key: 'hostTitle',
title: this.l('hostId'),
align: 'left',
high: true
},
{
key: 'dataSourceTitle',
// key: 'dataSourceTitle',
key: 'id',
title: this.l('dataSourceId'),
align: 'left',
width:120,
align:'center',
render: (h, params) => {
if (params.row.dataSourceId == 0) {
return ''
}
// if (params.row.dataSourceId == 0) {
// return ''
// }
return h('div', { class: 'action' }, [
h(
'op',
{
attrs: { oprate: 'detail' },
on: {
click: () => this.datadetail(params.row.dataSourceId)
click: () => this.datadetail(params.row.id)
}
},
params.row.dataSourceTitle
// params.row.dataSourceTitle
'配置'
)
])
}
......@@ -265,14 +267,14 @@ export default {
},
'编辑'
),
h(
'op',
{
attrs: { oprate: 'edit' },
on: { click: () => this.TanantInit(params.row) }
},
'初始化'
),
// h(
// 'op',
// {
// attrs: { oprate: 'edit' },
// on: { click: () => this.TanantInit(params.row) }
// },
// '初始化'
// ),
h(
'op',
{
......@@ -339,6 +341,10 @@ export default {
this.setModal=true
this.curId=id
},
datadetail(id) {
this.datadetailModal = true
this.datacurId = id
},
setAps(id){
this.aps=[]
this.disabled=false
......@@ -355,11 +361,6 @@ export default {
this.detailModal = true
this.curId = id
},
datadetail(id) {
this.datadetailModal = true
this.datacurId = id
},
edit(id) {
this.editModal = true
this.curId = id
......
<template>
<div>
<p class="tr pb5">
<Button type="primary" @click="setSql()" :disabled="disabled">保11存</Button>
</p>
<DataGrid
:columns="columns"
ref="grid"
:data="list"
:high="false"
:set="false"
:tool="false"
:height="400"
:page="false"
></DataGrid>
<!-- <Modal v-model="detailModal" title="详情">
<Detail :eid="curId" />
</Modal> -->
</div>
</template>
<script>
import Api1 from "./api";
import Api from "../set_menu/api";
// import Detail from "../set_menu/detail";
import Search from "../set_menu/search";
import api from "../account/api";
export default {
name: "menuSet",
components: {
// Detail,
Search
},
data() {
return {
action: "",
easySearch: {
keys: { op: "title,remark", value: null }
},
disabled: false,
detailModal: false,
list: [],
curId: 0,
currentChoose: 0,
columns: [
{
key: "id",
title: "",
width: 70,
align: "center",
render: (h, params) => {
let self = this;
let id = params.row.id;
// let cid=params.row.checkedId
let flag = false;
if (self.currentChoose === id) {
flag = true;
} else {
flag = false;
}
return h("div", [
h("Checkbox", {
props: {
value: flag
},
on: {
"on-change": () => {
// var ra=
self.currentChoose = id;
}
}
})
]);
}
},
{
key: "hostName",
title: this.l("hostName"),
align: "center",
easy: true,
high: true,
},
// { key:"remark",title:this.l("remark") ,align:"left" ,easy:true ,high:true },
{
key: "ip",
title: this.l("ip"),
align: "center",
high: true,
width: 140,
// code: "crm.customer.status"
},
{
key: "databaseTypeName",
title: this.l("databaseTypeName"),
align: "center",
width: 140
},
{
key: "databaseName",
title: this.l("databaseName"),
align: "center",
width: 100
},
{
key: "port",
title: this.l("port"),
align: "center",
width: 80
},
// {
// title: "操作",
// key: "id",
// width: 100,
// align: "center",
// render: (h, params) => {
// return h("div", { class: "action" }, [
// h(
// "op",
// {
// attrs: { oprate: "detail" },
// on: { click: () => this.detail(params.row.id) }
// },
// "查看"
// )
// ]);
// }
// }
]
};
},
props: {
v: Object,
elid: Number
},
mounted() {
console.log(this.action);
},
methods: {
//保存公司的数据源
setSql() {
// console.log(this.currentChoose)
if (this.currentChoose == 0) {
return;
}
let id = this.elid;
var a = {};
(a.tenantId = id), (a.dbSourceIdList = this.currentChoose);
this.disabled = true;
Api.setMenuSql(a).then(r => {
if (r.success) {
this.$Message.success("保存成功");
this.currentChoose = 0;
this.disabled = false;
this.$emit("set-ok");
}
});
},
search() {
this.$refs.grid.reload(this.easySearch);
},
detail(id) {
this.detailModal = true;
this.curId = id;
},
getAll() {
// debugger
let params = {
pageIndex: 1,
pageSize: 20,
conditions: [],
type: this.elid
};
this.currentChoose = 0;
Api.pagedSql(params).then(r => {
this.list = r.result;
r.result.forEach(data => {
if (data.id == data.checkedId) {
this.currentChoose = data.id;
}
});
});
},
l(key) {
/*
databases:{
databaseName: "mes"
databaseType: "0"
databaseTypeName: "MySql"
hostName: "腾讯云服务器"
ip: "49.232.68.61"
port: 1333
tenantId: 0
}
*/
let vkey = "databases" + "." + key;
return this.$t(vkey) || key;
}
},
watch: {
// v() {
// this.entity = this.$u.clone(this.v)
// },
elid() {
this.getAll();
}
}
};
</script>
<style lang="less">
</style>
\ 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