|
@@ -54,10 +54,10 @@
|
|
|
icon="el-icon-search"
|
|
|
size="mini"
|
|
|
@click="handleQuery"
|
|
|
- >搜索
|
|
|
+ >搜索
|
|
|
</el-button>
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
|
|
|
- >重置
|
|
|
+ >重置
|
|
|
</el-button>
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
@@ -71,7 +71,7 @@
|
|
|
size="mini"
|
|
|
@click="handleAdd"
|
|
|
v-hasPermi="['system:tenant:add']"
|
|
|
- >新增
|
|
|
+ >新增
|
|
|
</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="1.5">
|
|
@@ -83,7 +83,7 @@
|
|
|
size="mini"
|
|
|
@click="handleExport"
|
|
|
v-hasPermi="['system:tenant:export']"
|
|
|
- >导出
|
|
|
+ >导出
|
|
|
</el-button>
|
|
|
<ExcelDownLoad
|
|
|
v-else
|
|
@@ -111,12 +111,12 @@
|
|
|
:tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
|
|
|
@cell-dblclick="copyText"
|
|
|
>
|
|
|
- <el-table-column label="租户ID" align="center" prop="tenantId"/>
|
|
|
- <el-table-column label="租户编号" align="center" prop="tenantCode"/>
|
|
|
- <el-table-column label="租户名称" align="center" prop="tenantName"/>
|
|
|
- <el-table-column label="联系方式" align="center" prop="contactInfo"/>
|
|
|
- <el-table-column label="租户地址" align="center" prop="address"/>
|
|
|
- <el-table-column label="负责人" align="center" prop="owner"/>
|
|
|
+ <el-table-column label="租户ID" align="center" prop="tenantId" />
|
|
|
+ <el-table-column label="租户编号" align="center" prop="tenantCode" />
|
|
|
+ <el-table-column label="租户名称" align="center" prop="tenantName" />
|
|
|
+ <el-table-column label="联系方式" align="center" prop="contactInfo" />
|
|
|
+ <el-table-column label="租户地址" align="center" prop="address" />
|
|
|
+ <el-table-column label="负责人" align="center" prop="owner" />
|
|
|
<!-- <el-table-column label="租户父级ID" align="center" prop="tenantParentId"/>-->
|
|
|
<el-table-column
|
|
|
label="客户端访问地址"
|
|
@@ -152,7 +152,7 @@
|
|
|
icon="el-icon-edit"
|
|
|
@click="handleUpdate(scope.row)"
|
|
|
v-hasPermi="['system:tenant:edit']"
|
|
|
- >修改
|
|
|
+ >修改
|
|
|
</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
@@ -162,7 +162,7 @@
|
|
|
icon="el-icon-delete"
|
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['system:tenant:remove']"
|
|
|
- >删除
|
|
|
+ >删除
|
|
|
</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
@@ -172,7 +172,7 @@
|
|
|
icon="el-icon-position"
|
|
|
@click="bindDatasource(scope.row)"
|
|
|
v-show="scope.row.datasourceId == null"
|
|
|
- >绑定数据源
|
|
|
+ >绑定数据源
|
|
|
</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
@@ -182,7 +182,7 @@
|
|
|
icon="el-icon-s-custom"
|
|
|
@click="openTenantExpirationTime(scope.row)"
|
|
|
v-hasPermi="['system:tenant:remove']"
|
|
|
- >激活租户
|
|
|
+ >激活租户
|
|
|
</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
@@ -190,9 +190,9 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-s-open"
|
|
|
- @click="openLoginConfig(scope.row,'client')"
|
|
|
+ @click="openLoginConfig(scope.row, 'client')"
|
|
|
v-hasPermi="['system:tenant:remove']"
|
|
|
- >客户端登录信息
|
|
|
+ >客户端登录信息
|
|
|
</el-button>
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item>
|
|
@@ -200,9 +200,9 @@
|
|
|
size="mini"
|
|
|
type="text"
|
|
|
icon="el-icon-s-open"
|
|
|
- @click="openLoginConfig(scope.row,'tool')"
|
|
|
+ @click="openLoginConfig(scope.row, 'tool')"
|
|
|
v-hasPermi="['system:tenant:remove']"
|
|
|
- >工具端登录信息
|
|
|
+ >工具端登录信息
|
|
|
</el-button>
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
@@ -255,7 +255,7 @@
|
|
|
</el-col>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="租户地址" prop="address">
|
|
|
- <el-input v-model="form.address" placeholder="请输入地址"/>
|
|
|
+ <el-input v-model="form.address" placeholder="请输入地址" />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="联系方式" prop="contactInfo">
|
|
|
<el-input
|
|
@@ -264,7 +264,7 @@
|
|
|
/>
|
|
|
</el-form-item>
|
|
|
<el-form-item label="负责人" prop="owner">
|
|
|
- <el-input v-model="form.owner" placeholder="请输入负责人"/>
|
|
|
+ <el-input v-model="form.owner" placeholder="请输入负责人" />
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
|
|
@@ -372,7 +372,7 @@
|
|
|
@click="submitForm1"
|
|
|
:disabled="dialogLoading"
|
|
|
:loading="dialogLoading"
|
|
|
- >{{ dialogLoading ? "绑定中" : "确 定" }}
|
|
|
+ >{{ dialogLoading ? "绑定中" : "确 定" }}
|
|
|
</el-button>
|
|
|
<el-button @click="cancel1">取 消</el-button>
|
|
|
</div>
|
|
@@ -405,7 +405,7 @@
|
|
|
<el-button
|
|
|
type="primary"
|
|
|
@click="activationOperationMethod('tenantExpirationTimeFrom')"
|
|
|
- >确 定
|
|
|
+ >确 定
|
|
|
</el-button>
|
|
|
<el-button @click="tanentCancel">取 消</el-button>
|
|
|
</el-form-item>
|
|
@@ -416,25 +416,28 @@
|
|
|
:title="login_title"
|
|
|
width="800px"
|
|
|
:visible.sync="loginOpen"
|
|
|
- append-to-body>
|
|
|
-
|
|
|
- <el-form ref="loginFormRef"
|
|
|
- :model="loginForm"
|
|
|
- :inline="true"
|
|
|
- :rules="rules"
|
|
|
- label-width="80px">
|
|
|
-
|
|
|
+ append-to-body
|
|
|
+ >
|
|
|
+ <el-form
|
|
|
+ ref="loginFormRef"
|
|
|
+ :model="loginForm"
|
|
|
+ :inline="true"
|
|
|
+ :rules="rules"
|
|
|
+ label-width="80px"
|
|
|
+ >
|
|
|
<el-form-item label="标题:" prop="loginPageTitle">
|
|
|
<el-input
|
|
|
v-model="loginForm.loginPageTitle"
|
|
|
- placeholder="请输入登录页面标题"/>
|
|
|
+ placeholder="请输入登录页面标题"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
|
|
|
<el-form-item label="描述:" prop="loginPageDescription">
|
|
|
<span slot="label">
|
|
|
<el-tooltip
|
|
|
content="推荐长度为8个汉字,可使用<br/>换行"
|
|
|
- placement="top">
|
|
|
+ placement="top"
|
|
|
+ >
|
|
|
<i class="el-icon-question"></i>
|
|
|
</el-tooltip>
|
|
|
描述:
|
|
@@ -442,12 +445,14 @@
|
|
|
<el-input
|
|
|
v-model="loginForm.loginPageDescription"
|
|
|
type="textarea"
|
|
|
- placeholder="请输入内容"/>
|
|
|
+ placeholder="请输入内容"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item label="窗口标题:" prop="windowTitle">
|
|
|
<el-input
|
|
|
v-model="loginForm.windowTitle"
|
|
|
- placeholder="请输入窗口标题"/>
|
|
|
+ placeholder="请输入窗口标题"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="loginPageLogo">
|
|
|
<span slot="label">
|
|
@@ -456,7 +461,7 @@
|
|
|
</el-tooltip>
|
|
|
logo:
|
|
|
</span>
|
|
|
- <image-upload :limit="1" v-model="loginForm.loginPageLogo"/>
|
|
|
+ <image-upload :limit="1" v-model="loginForm.loginPageLogo" />
|
|
|
</el-form-item>
|
|
|
<el-form-item prop="loginPageBackgroundImage">
|
|
|
<span slot="label">
|
|
@@ -467,11 +472,11 @@
|
|
|
</span>
|
|
|
<image-upload
|
|
|
:limit="1"
|
|
|
- v-model="loginForm.loginPageBackgroundImage"/>
|
|
|
+ v-model="loginForm.loginPageBackgroundImage"
|
|
|
+ />
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
|
|
|
-
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
<el-button type="primary" @click="submitLoginForm">确 定</el-button>
|
|
|
<el-button @click="cancelLoginForm">取 消</el-button>
|
|
@@ -495,14 +500,15 @@ import {
|
|
|
getTenantChildrenInfo,
|
|
|
getTenantAllList,
|
|
|
} from "@/api/system/tenant";
|
|
|
-import {getDataSourceInfo, insertDataSource} from "@/api/system/data";
|
|
|
+import { getDataSourceInfo, insertDataSource } from "@/api/system/data";
|
|
|
import {
|
|
|
addConfiguration,
|
|
|
- updateConfiguration, getLoginPageConfigurationInfo,
|
|
|
+ updateConfiguration,
|
|
|
+ getLoginPageConfigurationInfo,
|
|
|
} from "@/api/system/configuration";
|
|
|
-import {getIsExistUser} from "@/api/system/user";
|
|
|
+import { getIsExistUser } from "@/api/system/user";
|
|
|
import ExcelDownLoad from "@/components/ExcelDownLoad/index.vue";
|
|
|
-import {mapState} from "vuex";
|
|
|
+import { mapState } from "vuex";
|
|
|
|
|
|
export default {
|
|
|
name: "Tenant",
|
|
@@ -586,14 +592,14 @@ export default {
|
|
|
// 表单校验
|
|
|
rules: {
|
|
|
tenantName: [
|
|
|
- {required: true, message: "租户名称不能为空", trigger: "blur"},
|
|
|
+ { required: true, message: "租户名称不能为空", trigger: "blur" },
|
|
|
],
|
|
|
tenantCode: [
|
|
|
- {required: true, message: "租户编号不能为空", trigger: "blur"},
|
|
|
+ { required: true, message: "租户编号不能为空", trigger: "blur" },
|
|
|
],
|
|
|
tenantParentId: [
|
|
|
- {required: true, message: "请选择上级租户", trigger: "blur"},
|
|
|
- {validator: this.checkTenantParentId, trigger: "change"},
|
|
|
+ { required: true, message: "请选择上级租户", trigger: "blur" },
|
|
|
+ { validator: this.checkTenantParentId, trigger: "change" },
|
|
|
],
|
|
|
},
|
|
|
//数据源表单参数
|
|
@@ -612,11 +618,11 @@ export default {
|
|
|
fromTenantId: null,
|
|
|
dataSourceFormRules: {
|
|
|
databaseType: [
|
|
|
- {required: true, message: "数据源类型不能为空", trigger: "change"},
|
|
|
+ { required: true, message: "数据源类型不能为空", trigger: "change" },
|
|
|
],
|
|
|
databaseName: [
|
|
|
- {required: true, message: "数据库名不能为空", trigger: "blur"},
|
|
|
- {validator: this.databaseNameValidator, trigger: "blur"},
|
|
|
+ { required: true, message: "数据库名不能为空", trigger: "blur" },
|
|
|
+ { validator: this.databaseNameValidator, trigger: "blur" },
|
|
|
],
|
|
|
tenantAccount: [
|
|
|
{
|
|
@@ -624,19 +630,19 @@ export default {
|
|
|
message: "租户管理员账号不能为空",
|
|
|
trigger: "change",
|
|
|
},
|
|
|
- {validator: this.tenantAccountValidator, trigger: "blur"},
|
|
|
+ { validator: this.tenantAccountValidator, trigger: "blur" },
|
|
|
],
|
|
|
databaseIp: [
|
|
|
- {required: true, message: "数据库IP不能为空", trigger: "blur"},
|
|
|
+ { required: true, message: "数据库IP不能为空", trigger: "blur" },
|
|
|
],
|
|
|
username: [
|
|
|
- {required: true, message: "用户名不能为空", trigger: "blur"},
|
|
|
+ { required: true, message: "用户名不能为空", trigger: "blur" },
|
|
|
],
|
|
|
password: [
|
|
|
- {required: true, message: "密码不能为空", trigger: "blur"},
|
|
|
+ { required: true, message: "密码不能为空", trigger: "blur" },
|
|
|
],
|
|
|
portNumber: [
|
|
|
- {required: true, message: "端口号不能为空", trigger: "blur"},
|
|
|
+ { required: true, message: "端口号不能为空", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
//租户激活码弹窗表单
|
|
@@ -649,7 +655,7 @@ export default {
|
|
|
//租户激活码规则验证
|
|
|
rulesTenantExpirationTime: {
|
|
|
tenantExpirationTime: [
|
|
|
- {required: true, message: "请输入租户激活码", trigger: "blur"},
|
|
|
+ { required: true, message: "请输入租户激活码", trigger: "blur" },
|
|
|
],
|
|
|
},
|
|
|
currentPage: "",
|
|
@@ -729,7 +735,7 @@ export default {
|
|
|
"tenantParentId"
|
|
|
);
|
|
|
this.tenantAllList = [
|
|
|
- {tenantId: 0, tenantName: "顶级租户"},
|
|
|
+ { tenantId: 0, tenantName: "顶级租户" },
|
|
|
...tenantAllListOne,
|
|
|
];
|
|
|
},
|
|
@@ -766,8 +772,6 @@ export default {
|
|
|
return false;
|
|
|
}
|
|
|
});
|
|
|
-
|
|
|
-
|
|
|
},
|
|
|
// 取消登录页配置
|
|
|
cancelLoginForm() {
|
|
@@ -776,7 +780,10 @@ export default {
|
|
|
// 编辑租户登录页配置
|
|
|
async openLoginConfig(row, loginType) {
|
|
|
try {
|
|
|
- let res = await getLoginPageConfigurationInfo({"loginPageNumber": row.tenantCode, "loginType": loginType});
|
|
|
+ let res = await getLoginPageConfigurationInfo({
|
|
|
+ loginPageNumber: row.tenantCode,
|
|
|
+ loginType: loginType,
|
|
|
+ });
|
|
|
console.log(res);
|
|
|
if (res.code == 200) {
|
|
|
if (res.data) {
|
|
@@ -791,16 +798,15 @@ export default {
|
|
|
this.loginForm.tenantId = row.tenantId;
|
|
|
this.loginForm.loginType = loginType;
|
|
|
this.loginOpen = true;
|
|
|
- if (loginType == 'client') {
|
|
|
- this.login_title = '配置客户端';
|
|
|
+ if (loginType == "client") {
|
|
|
+ this.login_title = "配置客户端";
|
|
|
} else {
|
|
|
- this.login_title = '配置工具端';
|
|
|
+ this.login_title = "配置工具端";
|
|
|
}
|
|
|
} else {
|
|
|
this.$message.error("网络异常,请稍后再试");
|
|
|
}
|
|
|
- } catch (error) {
|
|
|
- }
|
|
|
+ } catch (error) {}
|
|
|
},
|
|
|
// 获取所用用户名,作校验用
|
|
|
async selectAllUser() {
|
|
@@ -833,7 +839,7 @@ export default {
|
|
|
// callback();
|
|
|
// }
|
|
|
if (value) {
|
|
|
- await getIsExistUser({userName: value}).then((res) => {
|
|
|
+ await getIsExistUser({ userName: value }).then((res) => {
|
|
|
if (res.code == 200) {
|
|
|
if (res.data) {
|
|
|
callback();
|
|
@@ -906,7 +912,7 @@ export default {
|
|
|
input.select(); // 选中输入框的内容
|
|
|
document.execCommand("copy"); // 执行复制操作
|
|
|
document.body.removeChild(input); // 移除临时的输入框
|
|
|
- this.$message({message: "复制成功", type: "success"}); // 提示
|
|
|
+ this.$message({ message: "复制成功", type: "success" }); // 提示
|
|
|
},
|
|
|
/** 查询租户信息列表 */
|
|
|
getList() {
|
|
@@ -1038,10 +1044,20 @@ export default {
|
|
|
if (!valid) return;
|
|
|
if (this.form.tenantParentId.length >= 0) {
|
|
|
// 处理当前租户的上级租户id
|
|
|
- this.form.tenantParentId = this.form.tenantParentId[this.form.tenantParentId.length - 1] != undefined ? this.form.tenantParentId[this.form.tenantParentId.length - 1] : "";
|
|
|
+ this.form.tenantParentId =
|
|
|
+ this.form.tenantParentId[this.form.tenantParentId.length - 1] !=
|
|
|
+ undefined
|
|
|
+ ? this.form.tenantParentId[this.form.tenantParentId.length - 1]
|
|
|
+ : "";
|
|
|
}
|
|
|
- this.form.tenantClientLoginUrl = this.dict.type.system_login_url.find((item) => item.label == "client_login_url")?.value.replace("#{val}", this.form.tenantCode + "client");
|
|
|
- this.form.tenantToolLoginUrl = this.dict.type.system_login_url.find((item) => item.label == "crm_login_url")?.value.replace("#{val}", this.form.tenantCode + "tool");
|
|
|
+ this.form.tenantClientLoginUrl = this.dict.type.system_login_url
|
|
|
+ .find((item) => item.label == "client_login_url")
|
|
|
+ ?.value.replace("#{val}", this.form.tenantCode);
|
|
|
+ this.form.tenantToolLoginUrl = this.dict.type.system_login_url
|
|
|
+ .find((item) => item.label == "crm_login_url")
|
|
|
+ ?.value.replace("#{val}", this.form.tenantCode);
|
|
|
+ // this.form.tenantClientLoginUrl = this.dict.type.system_login_url.find((item) => item.label == "client_login_url")?.value.replace("#{val}", this.form.tenantCode + "client");
|
|
|
+ // this.form.tenantToolLoginUrl = this.dict.type.system_login_url.find((item) => item.label == "crm_login_url")?.value.replace("#{val}", this.form.tenantCode + "tool");
|
|
|
this.$refs["form"].validate((valid) => {
|
|
|
if (valid) {
|
|
|
if (this.form.tenantId != null) {
|
|
@@ -1132,8 +1148,7 @@ export default {
|
|
|
this.getList();
|
|
|
this.$modal.msgSuccess("删除成功");
|
|
|
})
|
|
|
- .catch(() => {
|
|
|
- });
|
|
|
+ .catch(() => {});
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
@@ -1160,7 +1175,7 @@ export default {
|
|
|
qar[item.label] = item.value;
|
|
|
});
|
|
|
if (this.dataSourceType) {
|
|
|
- let {databaseIp, password, portNumber, username} = qar;
|
|
|
+ let { databaseIp, password, portNumber, username } = qar;
|
|
|
Object.assign(this.dataSourceForm, {
|
|
|
databaseIp,
|
|
|
password,
|