Commit d08ba565 authored by 张莎莎's avatar 张莎莎

提交

parent 3931d459
...@@ -93,23 +93,26 @@ ...@@ -93,23 +93,26 @@
</el-table-column>--> </el-table-column>-->
<el-table-column label="操作" width="150"> <el-table-column label="操作" width="150">
<template slot-scope="scope" v-if="!scope.row.isAdministrator"> <template slot-scope="scope" v-if="!scope.row.isAdministrator">
<tableOpts @edit="addOrUpdateHandle(scope.row.id)" @del="handleDel(scope.row.id)"> <el-button type="text" @click="addOrUpdateHandle(scope.row.id)">编辑</el-button>
<!-- <el-dropdown hide-on-click> <el-button type="text" style="color:red;" v-if="account!=scope.row.mobilePhone" @click="handleDel(scope.row.id)">删除</el-button>
<span class="el-dropdown-link">
<el-button size="mini" type="text"> <!-- <tableOpts @edit="addOrUpdateHandle(scope.row.id)" @del="handleDel(scope.row.id)">-->
{{$t('common.moreBtn')}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i> <!-- <el-dropdown hide-on-click>
</el-button> <span class="el-dropdown-link">
</span> <el-button size="mini" type="text">
<el-dropdown-menu slot="dropdown"> {{$t('common.moreBtn')}}<i class="el-icon-arrow-down el-icon&#45;&#45;right"></i>
<el-dropdown-item </el-button>
@click.native="handleResetPwd(scope.row.id, scope.row.account)"> </span>
{{$t('user.resetPassword')}} <el-dropdown-menu slot="dropdown">
</el-dropdown-item> <el-dropdown-item
<el-dropdown-item @click.native="unlockUser(scope.row.id)" @click.native="handleResetPwd(scope.row.id, scope.row.account)">
v-if="scope.row.enabledMark == 2">解除锁定</el-dropdown-item> {{$t('user.resetPassword')}}
</el-dropdown-menu> </el-dropdown-item>
</el-dropdown>--> <el-dropdown-item @click.native="unlockUser(scope.row.id)"
</tableOpts> v-if="scope.row.enabledMark == 2">解除锁定</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>-->
<!-- </tableOpts>-->
</template> </template>
</el-table-column> </el-table-column>
</JNPF-table> </JNPF-table>
...@@ -174,6 +177,7 @@ export default { ...@@ -174,6 +177,7 @@ export default {
data() { data() {
return { return {
account:'',
editdialogVisible:false, editdialogVisible:false,
deletedialogVisible:false, deletedialogVisible:false,
keysInfo:[], keysInfo:[],
...@@ -219,6 +223,7 @@ export default { ...@@ -219,6 +223,7 @@ export default {
} }
}, },
mounted() { mounted() {
this.account=this.$store.state.user.userInfo.userAccount
this.getOrganizeList(true) this.getOrganizeList(true)
}, },
methods: { methods: {
...@@ -290,27 +295,26 @@ export default { ...@@ -290,27 +295,26 @@ export default {
this.organizeId=this.$store.state.user.userInfo.organizeId; this.organizeId=this.$store.state.user.userInfo.organizeId;
if(this.organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){ if(this.organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){
getOrganizeList().then(res => { getOrganizeList().then(res => {
let topItem = {
this.$nextTick(() => { fullName: "全部",
let topItem = { hasChildren: true,
fullName: "全部", id: "",
hasChildren: true, children: res.data.list
id: "", }
children: res.data.list this.treeData =[topItem]
} if (!this.treeData.length) {
this.treeData =[topItem]
if (!this.treeData.length) {
this.treeLoading = false
this.listLoading = false
return
}
if (isInit) this.listQuery.organizeId= this.treeData[0].id
this.$refs.treeBox.setCurrentKey(this.treeData[0].id)
this.treeLoading = false this.treeLoading = false
if (isInit) this.initData() this.listLoading = false
this.getcommontree() return
}
this.listQuery.organizeId= this.treeData[0].id
this.$nextTick(()=>{
this.$refs.treeBox.setCurrentKey(this.treeData[0].id)
}) })
this.$refs.treeBox.setCurrentKey(this.treeData[0].id)
this.treeLoading = false
this.initData()
this.getcommontree()
}).catch(() => { }).catch(() => {
this.treeLoading = false this.treeLoading = false
}) })
...@@ -364,11 +368,7 @@ export default { ...@@ -364,11 +368,7 @@ export default {
}, },
getcommontree(){ getcommontree(){
this.treeData.map(firstLevel => { this.treeData.map(firstLevel => {
if (firstLevel.children) { this.expandedKeys.push(firstLevel.id);
firstLevel.children.forEach(secondLevel => {
this.expandedKeys.push(secondLevel.id);
});
}
}); });
}, },
personFormatter(row){ personFormatter(row){
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment