|
@@ -104,13 +104,6 @@
|
|
|
<el-table-column label="创建时间" align="center" prop="createTime" width="180"/>
|
|
<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="updateTime" width="180"/>
|
|
|
<el-table-column label="创建人" align="center" prop="createBy" />
|
|
<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">
|
|
<el-table-column label="操作" align="center" class-name="small-padding fixed-width">
|
|
|
<template slot-scope="scope">
|
|
<template slot-scope="scope">
|
|
|
<el-button
|
|
<el-button
|
|
@@ -127,14 +120,6 @@
|
|
|
@click="handleDelete(scope.row)"
|
|
@click="handleDelete(scope.row)"
|
|
|
v-hasPermi="['qw:qwCompany:remove']"
|
|
v-hasPermi="['qw:qwCompany:remove']"
|
|
|
>删除</el-button>
|
|
>删除</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>
|
|
</template>
|
|
|
</el-table-column>
|
|
</el-table-column>
|
|
|
</el-table>
|
|
</el-table>
|
|
@@ -253,33 +238,13 @@
|
|
|
</div>
|
|
</div>
|
|
|
</el-dialog>
|
|
</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>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script>
|
|
<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 { getCompanyList } from "@/api/company/company";
|
|
|
import { listAll } from '@/api/course/coursePlaySourceConfig'
|
|
import { listAll } from '@/api/course/coursePlaySourceConfig'
|
|
|
-import { tenantList } from "@/api/tenant/tenant";
|
|
|
|
|
export default {
|
|
export default {
|
|
|
name: "QwCompany",
|
|
name: "QwCompany",
|
|
|
watch: {
|
|
watch: {
|
|
@@ -299,14 +264,6 @@ export default {
|
|
|
},
|
|
},
|
|
|
data() {
|
|
data() {
|
|
|
return {
|
|
return {
|
|
|
- tenantForm:{
|
|
|
|
|
- tenantId:null
|
|
|
|
|
- },
|
|
|
|
|
- tenantInfos:{},
|
|
|
|
|
- tenantDialog:{
|
|
|
|
|
- open: false,
|
|
|
|
|
- title:"设置租户"
|
|
|
|
|
- },
|
|
|
|
|
// 遮罩层
|
|
// 遮罩层
|
|
|
loading: true,
|
|
loading: true,
|
|
|
// 导出遮罩层
|
|
// 导出遮罩层
|
|
@@ -374,15 +331,6 @@ export default {
|
|
|
this.companys = response.data;
|
|
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: {
|
|
methods: {
|
|
|
/** 查询企微主体列表 */
|
|
/** 查询企微主体列表 */
|
|
@@ -395,13 +343,6 @@ export default {
|
|
|
this.loading = false;
|
|
this.loading = false;
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- cancelTenant(){
|
|
|
|
|
- this.tenantDialog.open = false;
|
|
|
|
|
- this.tenantForm = {
|
|
|
|
|
- tenantId:null,
|
|
|
|
|
- qwCompanyId:null
|
|
|
|
|
- }
|
|
|
|
|
- },
|
|
|
|
|
// 取消按钮
|
|
// 取消按钮
|
|
|
cancel() {
|
|
cancel() {
|
|
|
this.open = false;
|
|
this.open = false;
|
|
@@ -494,22 +435,6 @@ export default {
|
|
|
this.title = "修改企微主体";
|
|
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() {
|
|
submitForm() {
|
|
|
this.$refs["form"].validate(valid => {
|
|
this.$refs["form"].validate(valid => {
|
|
@@ -532,10 +457,6 @@ export default {
|
|
|
}
|
|
}
|
|
|
});
|
|
});
|
|
|
},
|
|
},
|
|
|
- handleTenant(row){
|
|
|
|
|
- this.tenantForm.qwCompanyId = row.id
|
|
|
|
|
- this.tenantDialog.open = true;
|
|
|
|
|
- },
|
|
|
|
|
/** 删除按钮操作 */
|
|
/** 删除按钮操作 */
|
|
|
handleDelete(row) {
|
|
handleDelete(row) {
|
|
|
const ids = row.id || this.ids;
|
|
const ids = row.id || this.ids;
|