mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 19:06:43 +08:00
受从的查询,机构修改为接口调用,不再是本地调用了
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="box">
|
||||
<portal-header style="background: #387DF7;" :hideSearch="true" textColor="#ffffff"></portal-header>
|
||||
<iframe :src="url" style="width: 100%;height: 100%;margin-top: 30px;" frameborder="0"></iframe>
|
||||
<iframe :src="url" style="width: 100%;height: 100%;" frameborder="0"></iframe>
|
||||
<portal-footer></portal-footer>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@@ -63,17 +63,14 @@
|
||||
<template slot-scope="scope">
|
||||
<!-- v-if="scope.row.collectNumber === 0" -->
|
||||
<el-button type="text" v-if="!scope.row.published" @click="releaseData(scope.row,true)">发布</el-button>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<!-- // 成绩控制需要结束状态 -->
|
||||
<el-button type="text" v-if="scope.row.published" @click="viewResults(scope.row)">成绩</el-button>
|
||||
<el-button type="text" v-if="scope.row.published" @click="pushResults(scope.row)">推送</el-button>
|
||||
<!-- <el-button type="text" v-if="scope.row.published" @click="creatQrCode(scope.row)">二维码</el-button> -->
|
||||
<el-button type="text" v-if="scope.row.published" @click="releaseData(scope.row,false)">取消发布</el-button>
|
||||
<el-dropdown type="text" style="margin-left:10px">
|
||||
<el-button type="text" > 考试 <i class="el-icon-arrow-down el-icon--right"></i> </el-button>
|
||||
<el-button type="text" > 更多 <i class="el-icon-arrow-down el-icon--right"></i> </el-button>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<!-- <el-dropdown-item command="a">查看</el-dropdown-item> -->
|
||||
<el-dropdown-item command="b" @click.native="editData(scope.row)">编辑</el-dropdown-item>
|
||||
|
||||
@@ -121,6 +121,7 @@
|
||||
import usergroupApi from "@/api/modules/usergroup";
|
||||
import userApi from "@/api/system/user";
|
||||
import orgApi from "@/api/system/organiza";
|
||||
import apiUserBasic from "@/api/boe/userbasic";
|
||||
export default{
|
||||
data(){
|
||||
return{
|
||||
@@ -181,22 +182,45 @@
|
||||
if (node.level === 0) {
|
||||
resolve([{name:'组织机构树',id:'-1'}]);
|
||||
}else{
|
||||
let $this=this;
|
||||
if(node.level === 1){
|
||||
parentId = '-1';
|
||||
apiUserBasic.findOrgsByKeyword('').then(rs=>{
|
||||
let treeList=[];
|
||||
rs.result.forEach(item=>{
|
||||
let node={
|
||||
id:item.id,
|
||||
name:item.name,
|
||||
hrbpId:item.hrbpId,
|
||||
children:[]
|
||||
}
|
||||
treeList.push(node);
|
||||
});
|
||||
resolve(treeList);
|
||||
});
|
||||
}else{
|
||||
parentId = node.data.id;
|
||||
|
||||
apiUserBasic.getOrgInfo(parentId).then(rs=>{
|
||||
if(rs.status==200){
|
||||
let treeList=[];
|
||||
if(rs.result.directChildList){
|
||||
rs.result.directChildList.forEach(item=>{
|
||||
let node={
|
||||
id:item.id,
|
||||
name:item.name,
|
||||
hrbpId:item.hrbpId,
|
||||
children:[]
|
||||
}
|
||||
treeList.push(node);
|
||||
});
|
||||
}
|
||||
resolve(treeList);
|
||||
}else{
|
||||
resolve([]);
|
||||
}
|
||||
});
|
||||
}
|
||||
usergroupApi.userOrgs(parentId).then(res =>{
|
||||
if (res.status == 200) {
|
||||
if(res.result != null && res.result.length > 0){
|
||||
resolve(res.result);
|
||||
}else{
|
||||
resolve([]);
|
||||
}
|
||||
}else{
|
||||
this.$message.error('查询用户的机构失败');
|
||||
}
|
||||
});
|
||||
}
|
||||
},
|
||||
handleSelectionChange(val) {
|
||||
|
||||
@@ -22,40 +22,15 @@
|
||||
<el-button type="success" size="medium">导入</el-button>
|
||||
<el-button type="success" size="medium">批量删除</el-button>
|
||||
</div>
|
||||
<el-table
|
||||
ref="multipleTable"
|
||||
:data="tableData"
|
||||
tooltip-effect="dark"
|
||||
style="width: 100%"
|
||||
@selection-change="handleSelectionChange">
|
||||
<el-table-column
|
||||
type="selection"
|
||||
width="55">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="姓名"
|
||||
prop="name"
|
||||
>
|
||||
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%" @selection-change="handleSelectionChange">
|
||||
<el-table-column type="selection" width="55"> </el-table-column>
|
||||
<el-table-column label="姓名" prop="name" >
|
||||
<template slot-scope="scope">{{ scope.row.date }}</template>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="name"
|
||||
label="工号"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="address"
|
||||
label="部门"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
prop="add"
|
||||
label="岗位"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label="操作"
|
||||
>
|
||||
<el-table-column prop="name" label="工号" > </el-table-column>
|
||||
<el-table-column prop="address" label="部门" > </el-table-column>
|
||||
<el-table-column prop="add" label="岗位" > </el-table-column>
|
||||
<el-table-column label="操作" >
|
||||
<template slot-scope="scope">
|
||||
<el-button>操作</el-button>
|
||||
</template>
|
||||
@@ -65,11 +40,8 @@
|
||||
<el-button type="success" size="large">暂存</el-button>
|
||||
<el-button type="success" size="large">发布</el-button>
|
||||
</div>
|
||||
<el-dialog
|
||||
title="组织"
|
||||
custom-class="g-dialog"
|
||||
:visible.sync="dialogVisible">
|
||||
<span>这是一段信息</span>
|
||||
<el-dialog title="组织" custom-class="g-dialog" :visible.sync="dialogVisible">
|
||||
<span></span>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button @click="dialogVisible = false">关闭</el-button>
|
||||
<el-button type="primary" @click="dialogVisible = false">完成</el-button>
|
||||
|
||||
Reference in New Issue
Block a user