|
@@ -38,6 +38,13 @@
|
|
|
icon="el-icon-coin"
|
|
|
@click="handleDatasource">数据源配置
|
|
|
</el-button>
|
|
|
+ <el-button type="primary"
|
|
|
+ size="small"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ plain
|
|
|
+ @click="CopyPopupfun">复 制
|
|
|
+ </el-button>
|
|
|
+
|
|
|
</template>
|
|
|
<template slot-scope="{row}"
|
|
|
slot="accountNumber">
|
|
@@ -60,12 +67,21 @@
|
|
|
width="450px">
|
|
|
<avue-form :option="datasourceOption" v-model="datasourceForm" @submit="handleDatasourceSubmit"/>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog title="租户复制"
|
|
|
+ append-to-body
|
|
|
+ :visible.sync="CopyVisible"
|
|
|
+ width="450px">
|
|
|
+ <avue-form ref="CopyRef" :option="CopyOption" v-model="CopyForm" @submit="copyTenantfun"/>
|
|
|
+ </el-dialog>
|
|
|
+
|
|
|
</basic-container>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
-import {getList, getDetail, remove, update, add, setting, datasource} from "@/api/system/tenant";
|
|
|
+import {getList, getDetail, remove, update, add, setting, datasource, tenantCopyData} from "@/api/system/tenant";
|
|
|
import {mapGetters} from "vuex";
|
|
|
+import error from "@/views/monitor/log/error.vue";
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
@@ -76,6 +92,7 @@ export default {
|
|
|
loading: true,
|
|
|
box: false,
|
|
|
datasourceBox: false,
|
|
|
+ CopyVisible:false, // 复制租户弹窗
|
|
|
page: {
|
|
|
pageSize: 10,
|
|
|
currentPage: 1,
|
|
@@ -244,6 +261,65 @@ export default {
|
|
|
},
|
|
|
]
|
|
|
},
|
|
|
+ CopyOption: {
|
|
|
+ column: [
|
|
|
+ {
|
|
|
+ label: "租户",
|
|
|
+ prop: "tenantIdCopy",
|
|
|
+ dicData:[],
|
|
|
+ type: "select",
|
|
|
+ filterable:true,
|
|
|
+ remote:true,
|
|
|
+ dicUrl: "/api/blade-system/tenant/list?tenantId={{key}}",
|
|
|
+ props: {
|
|
|
+ label: "tenantId",
|
|
|
+ value: "tenantId",
|
|
|
+ res:'data.records'
|
|
|
+ },
|
|
|
+ span: 24,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择租户",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "类型",
|
|
|
+ prop: "type",
|
|
|
+ multiple:true,
|
|
|
+ type: 'select',
|
|
|
+ dicData:[
|
|
|
+ {
|
|
|
+ label:'业务字典',
|
|
|
+ value:'1',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'角色',
|
|
|
+ value:'2',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'审批流程',
|
|
|
+ value:'3',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'编号配置',
|
|
|
+ value:'4',
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label:'业务类型',
|
|
|
+ value:'5',
|
|
|
+ }
|
|
|
+ ],
|
|
|
+ span: 24,
|
|
|
+ rules: [{
|
|
|
+ required: true,
|
|
|
+ message: "请选择类型",
|
|
|
+ trigger: "blur"
|
|
|
+ }]
|
|
|
+ },
|
|
|
+ ]
|
|
|
+ }, // 复制弹窗配置项
|
|
|
+ CopyForm:{}, // 复制弹窗表单数据
|
|
|
datasourceForm: {},
|
|
|
datasourceOption: {
|
|
|
column: [
|
|
@@ -290,6 +366,24 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
methods: {
|
|
|
+ // 复制租户
|
|
|
+ copyTenantfun(form, done, loading){
|
|
|
+ tenantCopyData({
|
|
|
+ tenantId:this.selectionList[0].tenantId,
|
|
|
+ tenantIdCopy:this.CopyForm.tenantIdCopy,
|
|
|
+ type:this.CopyForm.type.join(',')
|
|
|
+ }).then(res=>{
|
|
|
+ this.$message({
|
|
|
+ type: "success",
|
|
|
+ message: "操作成功!"
|
|
|
+ });
|
|
|
+ done();
|
|
|
+ this.CopyVisible = false
|
|
|
+ },error => {
|
|
|
+ window.console.log(error);
|
|
|
+ loading();
|
|
|
+ })
|
|
|
+ },
|
|
|
rowSave(row, done, loading) {
|
|
|
add(row).then(() => {
|
|
|
this.onLoad(this.page);
|
|
@@ -387,6 +481,16 @@ export default {
|
|
|
this.$refs.crud.toggleSelection();
|
|
|
});
|
|
|
},
|
|
|
+ // 复制弹窗开启
|
|
|
+ CopyPopupfun(){
|
|
|
+ if (this.selectionList.length === 0) {
|
|
|
+ this.$message.warning("请选择至少一条数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+ this.CopyForm.tenantIdCopy = ''
|
|
|
+ this.CopyForm.type = null
|
|
|
+ this.CopyVisible = true
|
|
|
+ },
|
|
|
handleSetting() {
|
|
|
if (this.selectionList.length === 0) {
|
|
|
this.$message.warning("请选择至少一条数据");
|