|
|
@@ -212,13 +212,9 @@
|
|
|
|
|
|
<script>
|
|
|
import { list, delOperlog, cleanOperlog, exportOperlog } from "@/api/company/companyOperLog";
|
|
|
-import { getCompanyList } from "@/api/company/company";
|
|
|
-import { treeselect } from "@/api/company/companyDept";
|
|
|
-import Treeselect from "@riophae/vue-treeselect";
|
|
|
-import "@riophae/vue-treeselect/dist/vue-treeselect.css";
|
|
|
+import { listAllCompanies } from "@/api/admin/sysCompany";
|
|
|
export default {
|
|
|
name: "Operlog",
|
|
|
- components: {Treeselect },
|
|
|
watch: {
|
|
|
// 监听deptId
|
|
|
'deptId': 'currDeptChange'
|
|
|
@@ -274,11 +270,15 @@ export default {
|
|
|
this.getDicts("sys_common_status").then(response => {
|
|
|
this.statusOptions = response.data;
|
|
|
});
|
|
|
- getCompanyList().then(response => {
|
|
|
- this.companys = response.data;
|
|
|
- if(this.companys!=null&&this.companys.length>0){
|
|
|
+ listAllCompanies().then(response => {
|
|
|
+ // admin端返回TableDataInfo格式(rows),字段为id/tenantName,映射为companyId/companyName
|
|
|
+ const rows = response.rows || [];
|
|
|
+ this.companys = rows.map(item => ({
|
|
|
+ companyId: item.id,
|
|
|
+ companyName: item.tenantName
|
|
|
+ }));
|
|
|
+ if(this.companys!=null&&this.companys.length>0){
|
|
|
this.companyId=this.companys[0].companyId;
|
|
|
- this.getTreeselect();
|
|
|
}
|
|
|
this.companys.push({companyId:"-1",companyName:"无"})
|
|
|
});
|
|
|
@@ -355,20 +355,11 @@ export default {
|
|
|
},
|
|
|
/** 查询部门下拉树结构 */
|
|
|
getTreeselect() {
|
|
|
- var that=this;
|
|
|
- var param={companyId:this.companyId}
|
|
|
- treeselect(param).then((response) => {
|
|
|
- this.deptOptions = response.data;
|
|
|
- console.log(this.deptOptions)
|
|
|
- if(response.data!=null&&response.data.length>0){
|
|
|
- //this.queryParams.deptId=response.data[0].id;
|
|
|
- }
|
|
|
- });
|
|
|
+ // treeselect已移除,保留空方法避免报错
|
|
|
},
|
|
|
companyChange(val){
|
|
|
console.log(val);
|
|
|
this.companyId=val;
|
|
|
- this.getTreeselect();
|
|
|
},
|
|
|
currDeptChange(val){
|
|
|
console.log(val)
|