Procházet zdrojové kódy

update:saas管理企微主体

ct před 1 týdnem
rodič
revize
6ffe4762c4
2 změnil soubory, kde provedl 1 přidání a 88 odebrání
  1. 0 8
      src/api/qw/qwCompany.js
  2. 1 80
      src/views/qw/qwCompany/index.vue

+ 0 - 8
src/api/qw/qwCompany.js

@@ -56,11 +56,3 @@ export function exportQwCompany(query) {
     params: query
   })
 }
-
-export function setTenant(data) {
-  return request({
-    url: '/qw/qwCompany/setTenant',
-    method: 'post',
-    data: data
-  })
-}

+ 1 - 80
src/views/qw/qwCompany/index.vue

@@ -104,13 +104,6 @@
       <el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
       <el-table-column label="更改时间" align="center" prop="updateTime" width="180"/>
       <el-table-column label="创建人" align="center" prop="createBy" />
-      <el-table-column label="租户" align="center" prop="tenantId" v-if="tenantCode == null">
-        <template slot-scope="scope">
-          <div>
-            <span v-for="item in tenantInfos" v-if="scope.row.tenantId==item.id">{{item.tenantName }} </span>
-          </div>
-        </template>
-      </el-table-column>
       <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -127,14 +120,6 @@
             @click="handleDelete(scope.row)"
             v-hasPermi="['qw:qwCompany:remove']"
           >删除</el-button>
-          <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-edit"
-            @click="handleTenant(scope.row)"
-            v-hasPermi="['qw:qwCompany:tenant']"
-            v-if="tenantCode==null"
-          >设置租户</el-button>
         </template>
       </el-table-column>
     </el-table>
@@ -253,33 +238,13 @@
       </div>
     </el-dialog>
 
-    <el-dialog :title="tenantDialog.title" :visible.sync="tenantDialog.open" width="500px" append-to-body>
-      <el-form ref="tenantForm" :model="tenantForm" label-width="200px">
-        <el-form-item label="租户">
-          <el-select filterable v-model="tenantForm.tenantId"  placeholder="请选择租户"  clearable>
-            <el-option
-              v-for="item in tenantInfos"
-              :key="item.id"
-              :label="item.tenantName"
-              :value="item.id"
-            />
-          </el-select>
-        </el-form-item>
-
-      </el-form>
-      <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitTenantForm">确 定</el-button>
-        <el-button @click="cancelTenant">取 消</el-button>
-      </div>
-    </el-dialog>
   </div>
 </template>
 
 <script>
-import { listQwCompany, getQwCompany, delQwCompany, addQwCompany, updateQwCompany, exportQwCompany ,setTenant} from "@/api/qw/qwCompany";
+import { listQwCompany, getQwCompany, delQwCompany, addQwCompany, updateQwCompany, exportQwCompany } from "@/api/qw/qwCompany";
 import { getCompanyList } from "@/api/company/company";
 import { listAll } from '@/api/course/coursePlaySourceConfig'
-import { tenantList } from "@/api/tenant/tenant";
 export default {
   name: "QwCompany",
   watch: {
@@ -299,14 +264,6 @@ export default {
     },
   data() {
     return {
-      tenantForm:{
-        tenantId:null
-      },
-      tenantInfos:{},
-      tenantDialog:{
-        open: false,
-        title:"设置租户"
-      },
       // 遮罩层
       loading: true,
       // 导出遮罩层
@@ -374,15 +331,6 @@ export default {
         this.companys = response.data;
 
     });
-    tenantList({status:1}).then(response => {
-      this.tenantInfos =  response.rows;
-    });
-  },
-  computed: {
-    tenantCode() {
-      console.log("----------------",this.$store.state.user.tenantCode)
-      return this.$store.state.user.tenantCode
-    }
   },
   methods: {
     /** 查询企微主体列表 */
@@ -395,13 +343,6 @@ export default {
         this.loading = false;
       });
     },
-    cancelTenant(){
-      this.tenantDialog.open = false;
-      this.tenantForm = {
-          tenantId:null,
-          qwCompanyId:null
-      }
-    },
     // 取消按钮
     cancel() {
       this.open = false;
@@ -494,22 +435,6 @@ export default {
         this.title = "修改企微主体";
       });
     },
-    submitTenantForm(){
-      if(this.tenantForm.tenantId == null){
-        this.msgError("租户不能为空");
-        return;
-      }
-      if(this.tenantForm.qwCompanyId == null){
-        this.msgError("企微主体不能为空");
-        return;
-      }
-      console.log("----------------",this.tenantForm);
-      setTenant(this.tenantForm).then(response => {
-        this.msgSuccess("设置成功");
-        this.tenantDialog.open = false;
-        this.getList();
-      });
-    },
     /** 提交按钮 */
     submitForm() {
       this.$refs["form"].validate(valid => {
@@ -532,10 +457,6 @@ export default {
         }
       });
     },
-    handleTenant(row){
-      this.tenantForm.qwCompanyId = row.id
-      this.tenantDialog.open = true;
-    },
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;