Parcourir la source

货代首页租户复制 2024-2-21

caojunjie il y a 1 an
Parent
commit
8643cac36f

+ 10 - 0
src/api/system/tenant.js

@@ -79,3 +79,13 @@ export const info = (domain) => {
     }
   })
 }
+
+// 租户复制
+export const tenantCopyData = (params) => {
+  return request({
+    url: '/api/blade-system/tenant/copyData',
+    method: 'get',
+    params: params
+  })
+}
+

+ 1 - 1
src/views/system/dept.vue

@@ -239,7 +239,7 @@
                   prop: "bankAddress",
                   overHidden:true,
               },
-
+              {},
               {
                   label: "人民币账号",
                   prop: "rmbAccount",

+ 105 - 1
src/views/system/tenant.vue

@@ -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("请选择至少一条数据");

+ 3 - 0
src/views/wel/components/losHome.vue

@@ -22,6 +22,9 @@ import losleftform from "@/views/wel/components/losAssembly/losleftform.vue";
             losleftform,
             losrightform
         },
+        props:{
+            sysType:Number,
+        },
         data(){
             return {
                 menuAll:[],

+ 2 - 2
src/views/wel/index.vue

@@ -49,9 +49,9 @@
               <xindongPower :sysType="billType"></xindongPower>
           </div>
       </dev>
-      <!--货代首页-->
+      <!--货代首页 货代billType 12 -->
       <div v-if="saberTenantId == 409341">
-          <los-home></los-home>
+          <los-home :sysType="billType" ></los-home>
       </div>
   </div>
 </template>

+ 2 - 2
vue.config.js

@@ -32,10 +32,10 @@ module.exports = {
       '/api': {
         //本地服务接口地址
         // target: 'http://192.168.3.64:1080',
-        target: 'http://192.168.8.104:1080',
+        // target: 'http://192.168.8.104:1080',
         // target: 'http://127.0.0.1:1080',
         // 打包地址
-        // target: 'http://121.37.83.47:10004',//服务器ip
+        target: 'http://121.37.83.47:10004',//服务器ip
         // target: 'http://trade.tubaosoft.com:10004',//服务器域名
         ws: true,
         pathRewrite: {