角色权限功能新增、新增用户级别、学历、职务下拉修改。
This commit is contained in:
parent
6594e53ec5
commit
216989412f
|
@ -71,10 +71,10 @@ const formRow = [{
|
||||||
tag: 'elRadio',
|
tag: 'elRadio',
|
||||||
options: [{
|
options: [{
|
||||||
label: '是',
|
label: '是',
|
||||||
value: "1"
|
value: "0"
|
||||||
},{
|
},{
|
||||||
label: '否',
|
label: '否',
|
||||||
value: "0",
|
value: "1",
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
@ -1,98 +1,98 @@
|
||||||
<template>
|
<template>
|
||||||
<div >
|
<div >
|
||||||
<div flex="cross:center cross:baseline" flex-wrap v-for="(el,elIndex) in classifyButtonList"
|
<div flex="cross:center cross:baseline" flex-wrap v-for="(el,elIndex) in classifyButtonList"
|
||||||
class="buttonSetting">
|
class="buttonSetting">
|
||||||
<p style="width:100px;text-align: right;">{{el.label}}</p>
|
<p style="width:100px;text-align: right;">{{el.label}}</p>
|
||||||
<div flex="cross:center" flex-wrap style="width: calc(100% - 200px);">
|
<div flex="cross:center" flex-wrap style="width: calc(100% - 200px);">
|
||||||
<p class="recordText" v-for="(item,index) in el.buttonList" @click="typeChange(item)" :key="index"
|
<p class="recordText" v-for="(item,index) in el.buttonList" @click="typeChange(item)" :key="index"
|
||||||
:class="{'active':item.type}">{{item.NameCN}}</p>
|
:class="{'active':item.type}">{{item.NameCN}}</p>
|
||||||
<p v-if="el.buttonList.length == 0" class="recordText">暂无按钮</p>
|
<p v-if="el.buttonList.length == 0" class="recordText">暂无按钮</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
GetAllButton,
|
GetAllButton,
|
||||||
} from '@/api/apis/jurisdiction'
|
} from '@/api/apis/jurisdiction'
|
||||||
export default {
|
export default {
|
||||||
// props:{
|
// props:{
|
||||||
// ButtonList: {
|
// ButtonList: {
|
||||||
// type: Array,
|
// type: Array,
|
||||||
// default: () => {
|
// default: () => {
|
||||||
// return []
|
// return []
|
||||||
// }
|
// }
|
||||||
// },
|
// },
|
||||||
// }
|
// }
|
||||||
data(){
|
data(){
|
||||||
return{
|
return{
|
||||||
// ButtonList:[],
|
// ButtonList:[],
|
||||||
classifyButtonList: [],
|
classifyButtonList: [],
|
||||||
buttonPopedom:[],
|
buttonPopedom:[],
|
||||||
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods:{
|
methods:{
|
||||||
async GetAllButtonList(ids, checkdata) {
|
async GetAllButtonList(ids, checkdata) {
|
||||||
this.classifyButtonList = []
|
this.classifyButtonList = []
|
||||||
let params = {
|
let params = {
|
||||||
menuIDs: ids.join(",")
|
menuIDs: ids.join(",")
|
||||||
}
|
}
|
||||||
let res = await GetAllButton(params)
|
let res = await GetAllButton(params)
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
let allButtonList = res.data[0]
|
let allButtonList = res.data[0]
|
||||||
checkdata.forEach(el => {
|
checkdata.forEach(el => {
|
||||||
el.buttonList = []
|
el.buttonList = []
|
||||||
allButtonList.forEach(item => {
|
allButtonList.forEach(item => {
|
||||||
if (el.id == item.MenuID) {
|
if (el.id == item.MenuID) {
|
||||||
el.buttonList.push(item)
|
el.buttonList.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.classifyButtonList = checkdata
|
this.classifyButtonList = checkdata
|
||||||
}
|
}
|
||||||
if(this.buttonPopedom.length > 0){
|
if(this.buttonPopedom.length > 0){
|
||||||
this.classifyButtonList.forEach(item=>{
|
this.classifyButtonList.forEach(item=>{
|
||||||
item.buttonList.forEach(bItem=>{
|
item.buttonList.forEach(bItem=>{
|
||||||
this.buttonPopedom.forEach(el=>{
|
this.buttonPopedom.forEach(el=>{
|
||||||
if(el == bItem.id){
|
if(el == bItem.id){
|
||||||
bItem.type = true
|
bItem.type = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
typeChange(item) {
|
typeChange(item) {
|
||||||
item.type = !item.type
|
item.type = !item.type
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
.buttonSetting{
|
.buttonSetting{
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
.recordText {
|
.recordText {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
margin:3px;
|
margin:3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recordText.active {
|
|
||||||
background: $activeColor;
|
|
||||||
color: #fff;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
</style>
|
.recordText.active {
|
||||||
|
background: $activeColor;
|
||||||
|
color: #fff;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|
|
@ -4,41 +4,37 @@ const searchModelJson = [
|
||||||
]
|
]
|
||||||
// 页面操作按钮配置
|
// 页面操作按钮配置
|
||||||
const fucDataJson = [{
|
const fucDataJson = [{
|
||||||
name: '导出',
|
name: '导出',
|
||||||
type: 'danger',
|
type: 'danger',
|
||||||
icon: 'el-icon-position'
|
icon: 'el-icon-position'
|
||||||
},
|
},
|
||||||
|
|
||||||
]
|
]
|
||||||
// 表头配置
|
// 表头配置
|
||||||
const tableColumnJson = [
|
const tableColumnJson = [
|
||||||
{
|
{
|
||||||
label: '角色编码',
|
label: '角色编号',
|
||||||
prop: 'r_RoleCode',
|
prop: 'roleCode',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
// sortable:true
|
sortable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: '角色名称',
|
label: '角色名称',
|
||||||
prop: 'r_RoleName',
|
prop: 'roleName',
|
||||||
tooltip: true,
|
tooltip: true,
|
||||||
},
|
sortable: true,
|
||||||
{
|
},
|
||||||
label: '顺序',
|
{
|
||||||
prop: 'r_Sort',
|
label: '角色描述 ',
|
||||||
tooltip: true,
|
prop: 'description',
|
||||||
},
|
tooltip: true,
|
||||||
{
|
},
|
||||||
label: '角色描述',
|
|
||||||
prop: 'r_Description',
|
|
||||||
tooltip: true,
|
|
||||||
},
|
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
searchModelJson,
|
searchModelJson,
|
||||||
fucDataJson,
|
fucDataJson,
|
||||||
tableColumnJson,
|
tableColumnJson,
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
v-for="item in scope.row.dataList"
|
v-for="item in scope.row.dataList"
|
||||||
:label="item.id"
|
:label="item.id"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
>{{ item.name }}</el-checkbox
|
>{{ item.name }}</el-checkbox
|
||||||
>
|
>
|
||||||
</el-checkbox-group>
|
</el-checkbox-group>
|
||||||
</template>
|
</template>
|
||||||
|
@ -89,6 +89,7 @@ export default {
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
|
return
|
||||||
let data = [];
|
let data = [];
|
||||||
const res = await GetAllBilldata({});
|
const res = await GetAllBilldata({});
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
|
|
@ -1,87 +1,87 @@
|
||||||
<template>
|
<template>
|
||||||
<div>
|
<div>
|
||||||
<div v-for="(item, index) in dataList" :key="index" class="dataSetting" flex>
|
<div v-for="(item, index) in dataList" :key="index" class="dataSetting" flex>
|
||||||
<p style="width: 100px;text-align: right;">{{ item.billName }}</p>
|
<p style="width: 100px;text-align: right;">{{ item.billName }}</p>
|
||||||
<div flex flex-wrap style="margin-left: 10px;width: calc(100% - 150px);">
|
<div flex flex-wrap style="margin-left: 10px;width: calc(100% - 150px);">
|
||||||
<p class="recordText" v-for="el in item.buttonList" :class="{ 'active': el.type }" @click="typeChange(el)">
|
<p class="recordText" v-for="el in item.buttonList" :class="{ 'active': el.type }" @click="typeChange(el)">
|
||||||
{{ el.name }}</p>
|
{{ el.name }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import {
|
import {
|
||||||
GetAllBillDataPepedom,
|
GetAllBillDataPepedom,
|
||||||
GetAllBilldata
|
GetAllBilldata
|
||||||
} from '@/api/apis/jurisdiction.js'
|
} from '@/api/apis/jurisdiction.js'
|
||||||
export default {
|
export default {
|
||||||
name: "dataSetting",
|
name: "dataSetting",
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
dataList: [],
|
dataList: [],
|
||||||
dataPepedom: [],
|
dataPepedom: [],
|
||||||
dataSet: [],
|
dataSet: [],
|
||||||
activeList: [],
|
activeList: [],
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
// this.inPage()
|
// this.inPage()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
inPage() {
|
inPage() {
|
||||||
let dataPepedom = this.getDataPepedom()
|
let dataPepedom = this.getDataPepedom()
|
||||||
let dataSet = this.getDataSet()
|
let dataSet = this.getDataSet()
|
||||||
Promise.all([dataSet, dataPepedom]).then((value) => {
|
Promise.all([dataSet, dataPepedom]).then((value) => {
|
||||||
this.getDataList(value[0], value[1])
|
this.getDataList(value[0], value[1])
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|
||||||
async getDataPepedom() {
|
async getDataPepedom() {
|
||||||
let res = await GetAllBillDataPepedom()
|
let res = await GetAllBillDataPepedom()
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
return res.data[0]
|
return res.data[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
async getDataSet() {
|
async getDataSet() {
|
||||||
let res = await GetAllBilldata()
|
let res = await GetAllBilldata()
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
res.data[0].forEach(el => {
|
res.data[0].forEach(el => {
|
||||||
el.buttonList = []
|
el.buttonList = []
|
||||||
})
|
})
|
||||||
return res.data[0]
|
return res.data[0]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
getDataList(dataSet, dataPepedom) {
|
getDataList(dataSet, dataPepedom) {
|
||||||
console.log(dataSet, dataPepedom);
|
console.log(dataSet, dataPepedom);
|
||||||
this.dataList = []
|
this.dataList = []
|
||||||
let arr = []
|
let arr = []
|
||||||
dataSet.forEach((el, index) => {
|
dataSet.forEach((el, index) => {
|
||||||
dataPepedom.forEach((item) => {
|
dataPepedom.forEach((item) => {
|
||||||
if (el.billKindID == item.billKindID) {
|
if (el.billKindID == item.billKindID) {
|
||||||
el.buttonList.push(item)
|
el.buttonList.push(item)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
this.dataList = dataSet
|
this.dataList = dataSet
|
||||||
if (this.activeList.length > 0) {
|
if (this.activeList.length > 0) {
|
||||||
this.dataList.forEach(item => {
|
this.dataList.forEach(item => {
|
||||||
item.buttonList.forEach(bItem => {
|
item.buttonList.forEach(bItem => {
|
||||||
this.activeList.forEach(el => {
|
this.activeList.forEach(el => {
|
||||||
if (el == bItem.id) {
|
if (el == bItem.id) {
|
||||||
bItem.type = true
|
bItem.type = true
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
typeChange(item) {
|
typeChange(item) {
|
||||||
item.type = !item.type
|
item.type = !item.type
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
|
@ -89,28 +89,28 @@ export default {
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
|
|
||||||
.el-icon-star-on {
|
.el-icon-star-on {
|
||||||
/* color: #00aa00; */
|
/* color: #00aa00; */
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.dataSetting {
|
.dataSetting {
|
||||||
color: #000;
|
color: #000;
|
||||||
|
|
||||||
.recordText {
|
.recordText {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 80px;
|
width: 80px;
|
||||||
padding: 8px 0;
|
padding: 8px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
margin: 3px;
|
margin: 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recordText.active {
|
.recordText.active {
|
||||||
background: $activeColor;
|
background: $activeColor;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -59,6 +59,7 @@ import {
|
||||||
GetAllBilldata,
|
GetAllBilldata,
|
||||||
PopedomSaveData,
|
PopedomSaveData,
|
||||||
} from "@/api/apis/jurisdiction";
|
} from "@/api/apis/jurisdiction";
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
export default {
|
export default {
|
||||||
name: "review",
|
name: "review",
|
||||||
components: {
|
components: {
|
||||||
|
@ -95,8 +96,8 @@ export default {
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
pageModel: {
|
pageModel: {
|
||||||
page: 1,
|
pageNum: 1,
|
||||||
limit: 20,
|
pageSize: 20,
|
||||||
departmentID: "",
|
departmentID: "",
|
||||||
Sequence: "",
|
Sequence: "",
|
||||||
SequenceName: "",
|
SequenceName: "",
|
||||||
|
@ -139,7 +140,7 @@ export default {
|
||||||
onShow() { },
|
onShow() { },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage();
|
this.initPage();
|
||||||
this.getMenuData();
|
// this.getMenuData();
|
||||||
},
|
},
|
||||||
filters: {},
|
filters: {},
|
||||||
methods: {
|
methods: {
|
||||||
|
@ -183,16 +184,17 @@ export default {
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
initPage() {
|
initPage() {
|
||||||
this.getTableList();
|
this.getTableList();
|
||||||
this.getOrganList();
|
// this.getOrganList();
|
||||||
this.$refs.userCustomtable.clearRadioIndex();
|
this.$refs.userCustomtable.clearRadioIndex();
|
||||||
},
|
},
|
||||||
//获取菜单树
|
//获取菜单树
|
||||||
async getMenuData() {
|
async getMenuData() {
|
||||||
let res = await GetMenuButton({});
|
// let res = await GetMenuButton({});
|
||||||
if (res.code == 1) {
|
let res = await authApi('sysMenuConfigService', '', 'queryEntityTree', '', { state: 0 })
|
||||||
let arr = JSON.parse(res.data[0]);
|
if (res.status == 200) {
|
||||||
this.menuData = JSON.parse(res.data[0]);
|
let arr = res.attribute
|
||||||
this.changeMenu(this.menuData, 0);
|
this.menuData = res.attribute
|
||||||
|
this.changeMenu(this.menuData, 0)
|
||||||
// this.getButtonArray(this.menuData)
|
// this.getButtonArray(this.menuData)
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -216,13 +218,14 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
...this.pageModel,
|
...this.pageModel,
|
||||||
};
|
};
|
||||||
let res = await RoleGetBillList(params);
|
const res = await authApi("sysRoleService","","queryEntityPage","",params)
|
||||||
if (res.code === 1) {
|
if (res.status == 200) {
|
||||||
this.tableData = res.data[1];
|
console.log(res,'res')
|
||||||
|
this.tableData = res.attribute.list;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
// this.$refs.customtable.clearRadioIndex()
|
// this.$refs.customtable.clearRadioIndex()
|
||||||
|
|
||||||
this.$refs.userLayout.setPageTotal(res.data[0]);
|
this.$refs.userLayout.setPageTotal(res.attribute.total);
|
||||||
});
|
});
|
||||||
this.tabLoading = false;
|
this.tabLoading = false;
|
||||||
}
|
}
|
||||||
|
@ -244,7 +247,7 @@ export default {
|
||||||
// 单选
|
// 单选
|
||||||
userRadioChange(val) {
|
userRadioChange(val) {
|
||||||
this.radioIndex = val.index;
|
this.radioIndex = val.index;
|
||||||
this.userRadioId = val.r_RoleID;
|
this.userRadioId = val.id;
|
||||||
},
|
},
|
||||||
// 获取组织列表
|
// 获取组织列表
|
||||||
async getOrganList() {
|
async getOrganList() {
|
||||||
|
@ -266,7 +269,7 @@ export default {
|
||||||
},
|
},
|
||||||
|
|
||||||
resetTable() {
|
resetTable() {
|
||||||
this.pageModel.page = 1;
|
this.pageModel.pageNum = 1;
|
||||||
this.userRadioId = false;
|
this.userRadioId = false;
|
||||||
this.radioIndex = false;
|
this.radioIndex = false;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -283,35 +286,23 @@ export default {
|
||||||
}
|
}
|
||||||
this[btnEven.btnFunciton]();
|
this[btnEven.btnFunciton]();
|
||||||
},
|
},
|
||||||
|
//点击权限设置
|
||||||
async setting() {
|
async setting() {
|
||||||
this.getMenuData();
|
this.getMenuData()
|
||||||
|
this.permissionPopup = true
|
||||||
this.permissionPopup = true;
|
this.$nextTick(async() => {
|
||||||
this.$nextTick(() => {
|
this.$refs.rightDialog.drawer = true
|
||||||
this.$refs.rightDialog.drawer = true;
|
this.$refs.rightDialog.buttonLoading = true
|
||||||
this.$refs.rightDialog.buttonLoading = true;
|
|
||||||
let params = {
|
let params = {
|
||||||
objectID: this.userRadioId,
|
id: this.userRadioId,
|
||||||
kindid: 2,
|
kindId: 2
|
||||||
};
|
}
|
||||||
GetPppedomSet(params).then((res) => {
|
const res = await authApi('sysUserService', '', 'jurisdiction', '',params)
|
||||||
if (res.code == 1) {
|
if (res.status == 200) {
|
||||||
const data = res.data;
|
const data = res.attribute
|
||||||
let menuIDs =
|
this.$refs.rightDialog.exhibitList(res.attribute.menvVoList,res.attribute.homeList,this.userRadioId)
|
||||||
data[0].length > 0 ? data[0][0].fp_MenuIdList.split(",") : [];
|
}
|
||||||
let echo = data[1].length > 0 ? data[1] : [];
|
})
|
||||||
this.$refs.rightDialog.exhibitList(menuIDs, echo, this.userRadioId);
|
|
||||||
let dataPermissions = data[2].length > 0 ? data[2] : [];
|
|
||||||
this.$refs.rightDialog.$refs.dataPermissions.selectedList =
|
|
||||||
dataPermissions;
|
|
||||||
this.$refs.rightDialog.$refs.layOutPermissions.selectedList = res
|
|
||||||
.data[3][0]
|
|
||||||
? res.data[3][0].widgetList
|
|
||||||
: "";
|
|
||||||
// this.menuData = this.addToButtonList(this.menuData,echo)
|
|
||||||
}
|
|
||||||
});
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
// setting() {
|
// setting() {
|
||||||
// if (this.radioIndex === false) {
|
// if (this.radioIndex === false) {
|
||||||
|
@ -325,7 +316,7 @@ export default {
|
||||||
async GetPppedomData() {
|
async GetPppedomData() {
|
||||||
let params = {
|
let params = {
|
||||||
objectID: this.userRadioId,
|
objectID: this.userRadioId,
|
||||||
kindid: 2,
|
kindId: 2,
|
||||||
};
|
};
|
||||||
let res = await GetPppedomSet(params);
|
let res = await GetPppedomSet(params);
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
@ -360,8 +351,8 @@ export default {
|
||||||
return array;
|
return array;
|
||||||
},
|
},
|
||||||
pageChange(model) {
|
pageChange(model) {
|
||||||
this.pageModel.page = model.page;
|
this.pageModel.pageNum = model.page;
|
||||||
this.pageModel.limit = model.limit;
|
this.pageModel.pageSize = model.limit;
|
||||||
this.getTableList();
|
this.getTableList();
|
||||||
},
|
},
|
||||||
settingConfirmClick() {
|
settingConfirmClick() {
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div flex>
|
<div flex>
|
||||||
<base-layout title="菜单权限" ref="layout" :bodyHight="treeHight" :mainHight="mainHight" :operateButtonSwitch="false">
|
<base-layout title="菜单权限" ref="layout" :bodyHight="treeHight" :mainHight="mainHight" :operateButtonSwitch="false">
|
||||||
<div slot="main">
|
<div slot="main">
|
||||||
<base-tree ref="menuTree" :isCenter="false" :showCheckbox="true" :menuData="menuData" :setting="true"
|
<base-tree ref="menuTree" :isCenter="false" :showCheckbox="true" :menuData="menuData" :setting="true"
|
||||||
@checkChange="checkChange">
|
@checkChange="checkChange">
|
||||||
</base-tree>
|
</base-tree>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
@ -16,101 +16,101 @@ import baseTable from "@/components/base/baseTable";
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
||||||
import configData from "./configData";
|
import configData from "./configData";
|
||||||
import {
|
import {
|
||||||
GetPppedomSet,
|
GetPppedomSet,
|
||||||
GetAllButton,
|
GetAllButton,
|
||||||
} from '@/api/apis/jurisdiction'
|
} from '@/api/apis/jurisdiction'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "jurisdictionSetting",
|
name: "jurisdictionSetting",
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
baseTable,
|
baseTable,
|
||||||
baseTree
|
baseTree
|
||||||
},
|
},
|
||||||
props: {
|
props: {
|
||||||
objectID: {
|
objectID: {
|
||||||
type: [Number, String, Boolean],
|
type: [Number, String, Boolean],
|
||||||
default: false
|
default: false
|
||||||
},
|
},
|
||||||
menuData: {
|
menuData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: []
|
default: []
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
treeHight: '444px',
|
treeHight: '444px',
|
||||||
mainHight: 'calc(100% - 80px)',
|
mainHight: 'calc(100% - 80px)',
|
||||||
classifyButtonList: [],
|
classifyButtonList: [],
|
||||||
buttonArray: [],
|
buttonArray: [],
|
||||||
colorsKey: false,
|
colorsKey: false,
|
||||||
menuPopedom: [],
|
menuPopedom: [],
|
||||||
buttonPopedom: []
|
buttonPopedom: []
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
computed: {
|
computed: {
|
||||||
|
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
|
|
||||||
},
|
},
|
||||||
onShow() { },
|
onShow() { },
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage()
|
this.initPage()
|
||||||
},
|
},
|
||||||
filters: {
|
filters: {
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 初始化页面
|
// 初始化页面
|
||||||
initPage() {
|
initPage() {
|
||||||
},
|
},
|
||||||
checkChange(ids, checkdata) {
|
checkChange(ids, checkdata) {
|
||||||
this.menuPopedom = ids
|
this.menuPopedom = ids
|
||||||
this.checkdata = checkdata
|
this.checkdata = checkdata
|
||||||
},
|
},
|
||||||
|
|
||||||
typeChange(item) {
|
typeChange(item) {
|
||||||
item.type = !item.type
|
item.type = !item.type
|
||||||
this.$forceUpdate()
|
this.$forceUpdate()
|
||||||
},
|
},
|
||||||
|
|
||||||
},
|
},
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang='scss'>
|
||||||
.buttonSetting {
|
.buttonSetting {
|
||||||
margin: 10px 0;
|
margin: 10px 0;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
$activeColor: var(--bg-color, "#00aaff");
|
$activeColor: var(--bg-color, "#00aaff");
|
||||||
|
|
||||||
.el-icon-star-on {
|
.el-icon-star-on {
|
||||||
/* color: #00aa00; */
|
/* color: #00aa00; */
|
||||||
color: $activeColor;
|
color: $activeColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
.buttonSetting {
|
.buttonSetting {
|
||||||
.recordText {
|
.recordText {
|
||||||
border: 1px solid #fff;
|
border: 1px solid #fff;
|
||||||
width: 100px;
|
width: 100px;
|
||||||
padding: 10px 0;
|
padding: 10px 0;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
background: #f2f2f2;
|
background: #f2f2f2;
|
||||||
color: #e0e0e0;
|
color: #e0e0e0;
|
||||||
margin: 0px 3px;
|
margin: 0px 3px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.recordText.active {
|
.recordText.active {
|
||||||
background: $activeColor;
|
background: $activeColor;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -18,11 +18,8 @@
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
"
|
"
|
||||||
v-show="
|
v-show="btnShowHandle(homeList,true)"
|
||||||
scope.row.dataList.length != 0 &&
|
@click="cancellation(homeList)"
|
||||||
scope.row.dataList.length == scope.row.buttonList.length
|
|
||||||
"
|
|
||||||
@click="cancellation(scope.row)"
|
|
||||||
></i>
|
></i>
|
||||||
<i
|
<i
|
||||||
class="el-icon-star-on"
|
class="el-icon-star-on"
|
||||||
|
@ -33,20 +30,10 @@
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
color: #808080;
|
color: #808080;
|
||||||
"
|
"
|
||||||
v-show="
|
v-show="btnShowHandle(homeList,false)"
|
||||||
scope.row.dataList.length != 0 &&
|
@click="selectAllButton(homeList)"
|
||||||
scope.row.dataList.length != scope.row.buttonList.length
|
|
||||||
"
|
|
||||||
@click="selectAllButton(scope.row)"
|
|
||||||
></i>
|
></i>
|
||||||
<el-checkbox-group v-model="scope.row.buttonList" size="small">
|
<el-checkbox v-model="item.check" v-for="item in homeList">{{ item.name }}</el-checkbox>
|
||||||
<el-checkbox
|
|
||||||
v-for="item in scope.row.dataList"
|
|
||||||
:label="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
>{{ item.name }}</el-checkbox
|
|
||||||
>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
@ -54,63 +41,81 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import config from "@/views/doraChunk/config/indexChunkConfig.js";
|
import config from '@/views/doraChunk/config/indexChunkConfig.js'
|
||||||
import { mapMutations } from "vuex";
|
import { mapMutations } from 'vuex'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableData: [
|
tableData: [
|
||||||
{
|
{
|
||||||
billName: "首页拖拽模块",
|
billName: '首页拖拽模块',
|
||||||
dataList: config.config.map((item) => {
|
dataList: config.config.map((item) => {
|
||||||
let obj = {
|
let obj = {
|
||||||
id: item.componentName,
|
id: item.componentName,
|
||||||
name: item.name,
|
name: item.name
|
||||||
};
|
}
|
||||||
return obj;
|
return obj
|
||||||
}),
|
}),
|
||||||
buttonList: [],
|
buttonList: []
|
||||||
},
|
|
||||||
|
}
|
||||||
],
|
],
|
||||||
selectedList: "",
|
selectedList: '',
|
||||||
};
|
homeList: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
created() {},
|
created() {
|
||||||
|
},
|
||||||
|
|
||||||
components: {},
|
components: {},
|
||||||
|
|
||||||
computed: {},
|
computed: {},
|
||||||
|
|
||||||
mounted() {},
|
mounted() {
|
||||||
|
},
|
||||||
|
|
||||||
beforeUpdate() {
|
beforeUpdate() {
|
||||||
this.handleTabClick();
|
this.handleTabClick()
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
//判断全选是否显示
|
||||||
|
btnShowHandle(list, flag = false) {
|
||||||
|
if (!list.length) return false
|
||||||
|
let flagResult = list.every(item => {
|
||||||
|
return item.check
|
||||||
|
})
|
||||||
|
if (flag) {
|
||||||
|
return flagResult
|
||||||
|
} else {
|
||||||
|
return !flagResult
|
||||||
|
}
|
||||||
|
},
|
||||||
selectAllButton(item) {
|
selectAllButton(item) {
|
||||||
let data = [];
|
console.log(item)
|
||||||
item.dataList.forEach((el) => {
|
item.forEach(item => {
|
||||||
data.push(el.id);
|
item.check = true
|
||||||
});
|
})
|
||||||
item.buttonList = data;
|
|
||||||
},
|
},
|
||||||
cancellation(item) {
|
cancellation(item) {
|
||||||
item.buttonList = [];
|
item.forEach(item => {
|
||||||
|
item.check = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleTabClick() {
|
handleTabClick() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
|
this.$refs.multipleTable && this.$refs.multipleTable.doLayout()
|
||||||
});
|
})
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
selectedList(newV, oldV) {
|
selectedList(newV, oldV) {
|
||||||
let tempArr = newV.split(",");
|
let tempArr = newV.split(',')
|
||||||
this.tableData[0].buttonList = tempArr;
|
this.tableData[0].buttonList = tempArr
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss"></style>
|
<style scoped lang="scss"></style>
|
||||||
|
|
|
@ -38,46 +38,40 @@
|
||||||
></el-table-column>
|
></el-table-column>
|
||||||
<el-table-column prop="buttonSelection" label="按钮">
|
<el-table-column prop="buttonSelection" label="按钮">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<i
|
<div style="display: flex;align-items: center">
|
||||||
class="el-icon-star-on"
|
<i
|
||||||
style="
|
class="el-icon-star-on"
|
||||||
|
style="
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
|
cursor: pointer;
|
||||||
"
|
"
|
||||||
v-show="
|
v-show="btnShowHandle(scope.row.buttonList,true)"
|
||||||
scope.row.buttons.length != 0 &&
|
@click="cancellation(scope.row.buttonList)"
|
||||||
scope.row.buttons.length == scope.row.buttonList.length
|
></i>
|
||||||
"
|
<i
|
||||||
@click="cancellation(scope.row)"
|
class="el-icon-star-on"
|
||||||
></i>
|
style="
|
||||||
<i
|
|
||||||
class="el-icon-star-on"
|
|
||||||
style="
|
|
||||||
height: 30px;
|
height: 30px;
|
||||||
line-height: 30px;
|
line-height: 30px;
|
||||||
font-size: 25px;
|
font-size: 25px;
|
||||||
margin-right: 7px;
|
margin-right: 7px;
|
||||||
color: #808080;
|
color: #808080;
|
||||||
|
cursor: pointer;
|
||||||
"
|
"
|
||||||
v-show="
|
@click="selectAllButton(scope.row.buttonList)"
|
||||||
scope.row.buttons.length != 0 &&
|
v-show="btnShowHandle(scope.row.buttonList,false)"
|
||||||
scope.row.buttons.length != scope.row.buttonList.length
|
></i>
|
||||||
"
|
<el-checkbox v-model="item.check" v-for="item in scope.row.buttonList">{{ item.nameCh }}</el-checkbox>
|
||||||
@click="selectAllButton(scope.row)"
|
</div>
|
||||||
></i>
|
|
||||||
<el-checkbox-group v-model="scope.row.buttonList" size="small">
|
|
||||||
<el-checkbox
|
|
||||||
v-for="item in scope.row.buttons"
|
|
||||||
:label="item.id"
|
|
||||||
:key="item.id"
|
|
||||||
>{{ item.NameCN }}</el-checkbox
|
|
||||||
>
|
|
||||||
</el-checkbox-group>
|
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table></el-tab-pane
|
</el-table>
|
||||||
|
</el-tab-pane
|
||||||
>
|
>
|
||||||
<el-tab-pane label="数据权限" name="second">
|
<el-tab-pane label="数据权限" name="second">
|
||||||
<data-permissions ref="dataPermissions"></data-permissions>
|
<data-permissions ref="dataPermissions"></data-permissions>
|
||||||
|
@ -91,11 +85,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseRightDialog from "@/components/base/baseRightDialog";
|
import baseRightDialog from '@/components/base/baseRightDialog'
|
||||||
import { PopedomSaveData, GetAllBilldata } from "@/api/apis/jurisdiction";
|
import { PopedomSaveData, GetAllBilldata } from '@/api/apis/jurisdiction'
|
||||||
import dataPermissions from "./dataPermissions.vue";
|
import dataPermissions from './dataPermissions.vue'
|
||||||
import layOutPermissions from "./layOutPermissions.vue";
|
import layOutPermissions from './layOutPermissions.vue'
|
||||||
import loginVue from "../../../login.vue";
|
import loginVue from '../../../login.vue'
|
||||||
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
@ -105,186 +101,146 @@ export default {
|
||||||
isAllSelect: false,
|
isAllSelect: false,
|
||||||
selected: false,
|
selected: false,
|
||||||
childNode: false,
|
childNode: false,
|
||||||
build: "",
|
build: '',
|
||||||
activeName: "first",
|
activeName: 'first',
|
||||||
dataPermissions: [],
|
dataPermissions: [],
|
||||||
buttonLoading: false,
|
buttonLoading: false,
|
||||||
};
|
menuDatas: []
|
||||||
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
props: {
|
props: {
|
||||||
menuData: {
|
menuData: {
|
||||||
type: Array,
|
type: Array,
|
||||||
default: () => {
|
default: () => {
|
||||||
return [];
|
return []
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
components: {
|
components: {
|
||||||
baseRightDialog,
|
baseRightDialog,
|
||||||
dataPermissions,
|
dataPermissions,
|
||||||
layOutPermissions,
|
layOutPermissions
|
||||||
},
|
},
|
||||||
|
|
||||||
beforeUpdate() {
|
beforeUpdate() {
|
||||||
this.handleTabClick();
|
this.handleTabClick()
|
||||||
},
|
},
|
||||||
|
|
||||||
computed: {
|
computed: {
|
||||||
menuDatas: {
|
// menuDatas: {
|
||||||
// return JSON.parse(JSON.stringify(this.menuData));
|
// // return JSON.parse(JSON.stringify(this.menuData));
|
||||||
get: function () {
|
// get: function () {
|
||||||
return JSON.parse(JSON.stringify(this.menuData));
|
// return JSON.parse(JSON.stringify(this.menuData));
|
||||||
},
|
// },
|
||||||
set: function (item) {
|
// set: function (item) {
|
||||||
return JSON.parse(JSON.stringify(item));
|
// return JSON.parse(JSON.stringify(item));
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
|
|
||||||
methods: {
|
methods: {
|
||||||
|
//判断全选是否显示
|
||||||
|
btnShowHandle(list, flag = false) {
|
||||||
|
if (!list.length) return false
|
||||||
|
let flagResult = list.every(item => {
|
||||||
|
return item.check
|
||||||
|
})
|
||||||
|
if (flag) {
|
||||||
|
return flagResult
|
||||||
|
} else {
|
||||||
|
return !flagResult
|
||||||
|
}
|
||||||
|
},
|
||||||
// tab切换
|
// tab切换
|
||||||
handleTabClick() {
|
handleTabClick() {
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.multipleTable && this.$refs.multipleTable.doLayout();
|
this.$refs.multipleTable && this.$refs.multipleTable.doLayout()
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
selectAllButton(item) {
|
selectAllButton(item) {
|
||||||
let data = [];
|
item.forEach(item => {
|
||||||
item.buttons.forEach((el) => {
|
item.check = true
|
||||||
data.push(el.id);
|
})
|
||||||
});
|
|
||||||
item.buttonList = data;
|
|
||||||
},
|
},
|
||||||
cancellation(item) {
|
cancellation(item) {
|
||||||
item.buttonList = [];
|
|
||||||
|
item.forEach(item => {
|
||||||
|
item.check = false
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 全选/取消全选
|
// 全选/取消全选
|
||||||
selectAll() {
|
selectAll() {
|
||||||
let data = this.treeToArray(this.menuDatas);
|
let data = this.treeToArray(this.menuDatas)
|
||||||
this.selected = !this.selected;
|
this.selected = !this.selected
|
||||||
data.forEach((el, index) => {
|
data.forEach((el, index) => {
|
||||||
this.$refs.multipleTable.toggleRowSelection(el, this.selected);
|
el.check = this.selected
|
||||||
});
|
this.$refs.multipleTable.toggleRowSelection(el, this.selected)
|
||||||
|
})
|
||||||
},
|
},
|
||||||
handleSelectionChange(val, row) {
|
handleSelectionChange(val, row) {
|
||||||
this.multipleSelection = val;
|
row.check = !row.check
|
||||||
let data = this.treeToArray([row]);
|
|
||||||
this.childNode = !this.childNode;
|
|
||||||
if (data.length > 1) {
|
|
||||||
data.forEach((el, index) => {
|
|
||||||
this.$refs.multipleTable.toggleRowSelection(el, this.childNode);
|
|
||||||
});
|
|
||||||
let ids = data[0].id;
|
|
||||||
let arr = this.treeFindPath(
|
|
||||||
this.menuDatas,
|
|
||||||
(data) => data.id == ids,
|
|
||||||
"id"
|
|
||||||
);
|
|
||||||
arr = arr.splice(0, arr.length - 1);
|
|
||||||
let dataList = [];
|
|
||||||
let allList = this.treeToArray(this.menuDatas);
|
|
||||||
allList.forEach((el, index) => {
|
|
||||||
if (arr.includes(el.id)) {
|
|
||||||
dataList.push(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dataList.forEach((el, index) => {
|
|
||||||
this.$refs.multipleTable.toggleRowSelection(el, true);
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
let ids = data[0].id;
|
|
||||||
let arr = this.treeFindPath(
|
|
||||||
this.menuDatas,
|
|
||||||
(data) => data.id == ids,
|
|
||||||
"id"
|
|
||||||
);
|
|
||||||
arr = arr.splice(0, arr.length - 1);
|
|
||||||
let dataList = [];
|
|
||||||
let allList = this.treeToArray(this.menuDatas);
|
|
||||||
allList.forEach((el, index) => {
|
|
||||||
if (arr.includes(el.id)) {
|
|
||||||
dataList.push(el);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
dataList.forEach((el, index) => {
|
|
||||||
this.$refs.multipleTable.toggleRowSelection(el, true);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
// 默认选中
|
// 默认选中
|
||||||
exhibitList(id, echo, build) {
|
exhibitList(menu, homeList, id) {
|
||||||
let data = this.treeToArray(this.menuDatas);
|
this.$refs.layOutPermissions.homeList = homeList
|
||||||
this.build = build;
|
console.log(menu, 'menu')
|
||||||
data.forEach((el, index) => {
|
// let data = this.treeToArray(this.menuDatas);
|
||||||
if (id.includes(el.id)) {
|
this.build = id
|
||||||
this.$refs.multipleTable.toggleRowSelection(el, true);
|
// data.forEach((el, index) => {
|
||||||
|
// if (id.includes(el.id)) {
|
||||||
|
// this.$refs.multipleTable.toggleRowSelection(el, true);
|
||||||
|
// }
|
||||||
|
// });
|
||||||
|
this.menuCheckHandle(menu)
|
||||||
|
this.menuDatas = menu
|
||||||
|
console.log(this.menuDatas, 'this.menuDatas')
|
||||||
|
this.buttonLoading = false
|
||||||
|
},
|
||||||
|
//数据处理
|
||||||
|
menuCheckHandle(arr) {
|
||||||
|
arr.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
this.$refs.multipleTable.toggleRowSelection(item, true)
|
||||||
}
|
}
|
||||||
});
|
if (item.children.length) {
|
||||||
this.menuDatas = this.addToButtonList(this.menuDatas, echo);
|
this.menuCheckHandle(item.children)
|
||||||
this.buttonLoading = false;
|
}
|
||||||
|
})
|
||||||
},
|
},
|
||||||
// 数据扁平
|
// 数据扁平
|
||||||
treeToArray(items) {
|
treeToArray(items) {
|
||||||
let children = [];
|
let children = []
|
||||||
items.forEach((item) => {
|
items.forEach((item) => {
|
||||||
children.push(item);
|
children.push(item)
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
children = children.concat(this.treeToArray(item.children));
|
children = children.concat(this.treeToArray(item.children))
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
return children;
|
return children
|
||||||
},
|
},
|
||||||
handleDialogClose() {
|
handleDialogClose() {
|
||||||
let data = this.treeToArray(this.menuDatas);
|
let data = this.treeToArray(this.menuDatas)
|
||||||
data.forEach((el, index) => {
|
data.forEach((el, index) => {
|
||||||
this.$refs.multipleTable.toggleRowSelection(el, false);
|
this.$refs.multipleTable.toggleRowSelection(el, false)
|
||||||
});
|
})
|
||||||
this.changeMenu(this.menuDatas, 0);
|
this.changeMenu(this.menuDatas, 0)
|
||||||
this.drawer = false;
|
this.drawer = false
|
||||||
this.$parent.permissionPopup = false;
|
this.$parent.permissionPopup = false
|
||||||
},
|
},
|
||||||
async handleConfirmClick() {
|
async handleConfirmClick() {
|
||||||
let data = {
|
let params = {
|
||||||
objectID: this.build,
|
id: this.build,
|
||||||
kindid: 2,
|
kindId: 2,
|
||||||
menuPopedom: "",
|
sysPopedomHomeEntities: [],
|
||||||
buttonPopedom: [],
|
sysPopedomMenuEntities: [],
|
||||||
dataPopedom: [],
|
sysPopedomOperateEntities: []
|
||||||
widgetPopedom: "",
|
}
|
||||||
};
|
this.homeListHandle(params.sysPopedomHomeEntities)
|
||||||
this.$refs.multipleTable.selection.forEach((el, index) => {
|
this.menuListHandle(this.menuDatas, params.sysPopedomMenuEntities, params.sysPopedomOperateEntities)
|
||||||
let dataLength = this.$refs.multipleTable.selection.length;
|
const res = await authApi("sysUserService","","saveJurisdiction","",params)
|
||||||
if (index == dataLength - 1) {
|
if(res.status == '200'){
|
||||||
data.menuPopedom = data.menuPopedom.concat(`${el.id}`);
|
|
||||||
} else {
|
|
||||||
data.menuPopedom = data.menuPopedom.concat(`${el.id},`);
|
|
||||||
}
|
|
||||||
if (el.buttonList.length != 0) {
|
|
||||||
data.buttonPopedom.push({
|
|
||||||
op_MenuID: el.id,
|
|
||||||
op_OperateKindList: el.buttonList + [],
|
|
||||||
});
|
|
||||||
}
|
|
||||||
});
|
|
||||||
let dataPopedom = [];
|
|
||||||
this.$refs.dataPermissions.tableData.forEach((el) => {
|
|
||||||
dataPopedom.push({
|
|
||||||
dp_billKindID: el.billKindID,
|
|
||||||
dp_popeList: el.buttonList.length > 0 ? el.buttonList + [] : "",
|
|
||||||
});
|
|
||||||
});
|
|
||||||
let tempStr = "";
|
|
||||||
this.$refs.layOutPermissions.tableData.forEach((item) => {
|
|
||||||
item.buttonList.forEach((ele) => {
|
|
||||||
tempStr += ele + ",";
|
|
||||||
});
|
|
||||||
});
|
|
||||||
data.widgetPopedom = tempStr.length ? tempStr.slice(0, -1) : "none";
|
|
||||||
data.dataPopedom = dataPopedom;
|
|
||||||
const res = await PopedomSaveData(data);
|
|
||||||
if (res.success == "true") {
|
|
||||||
this.handleDialogClose();
|
this.handleDialogClose();
|
||||||
this.$message({
|
this.$message({
|
||||||
message: "保存成功",
|
message: "保存成功",
|
||||||
|
@ -292,6 +248,42 @@ export default {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//处理首页拖拽
|
||||||
|
homeListHandle(arr) {
|
||||||
|
this.$refs.layOutPermissions.homeList.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
arr.push({ homeId: item.id })
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//菜单数据处理
|
||||||
|
menuListHandle(list, result, btnResult) {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
result.push({
|
||||||
|
menuId: item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
if (item.children.length) {
|
||||||
|
this.menuListHandle(item.children, result,btnResult)
|
||||||
|
}
|
||||||
|
if (item.buttonList.length) {
|
||||||
|
this.btnListHandle(item.buttonList, btnResult, item.id)
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
//按钮选中处理
|
||||||
|
btnListHandle(list, btnResult, menuId) {
|
||||||
|
list.forEach(item => {
|
||||||
|
if (item.check) {
|
||||||
|
console.log(btnResult,'btnResult')
|
||||||
|
btnResult.push({
|
||||||
|
menuId,
|
||||||
|
operate: item.id
|
||||||
|
})
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
// 递归,添加选中按钮
|
// 递归,添加选中按钮
|
||||||
addToButtonList(arr, newArr) {
|
addToButtonList(arr, newArr) {
|
||||||
newArr.forEach((newItem) => {
|
newArr.forEach((newItem) => {
|
||||||
|
@ -299,97 +291,101 @@ export default {
|
||||||
arr,
|
arr,
|
||||||
newItem.op_MenuID,
|
newItem.op_MenuID,
|
||||||
newItem.op_OperateKindList
|
newItem.op_OperateKindList
|
||||||
);
|
)
|
||||||
});
|
})
|
||||||
return arr;
|
return arr
|
||||||
},
|
},
|
||||||
addToButtonListRecursive(arr, targetId, operateKindList) {
|
addToButtonListRecursive(arr, targetId, operateKindList) {
|
||||||
for (let i = 0; i < arr.length; i++) {
|
for (let i = 0; i < arr.length; i++) {
|
||||||
const item = arr[i];
|
const item = arr[i]
|
||||||
if (item.id == targetId) {
|
if (item.id == targetId) {
|
||||||
let lists = operateKindList.split(",");
|
let lists = operateKindList.split(',')
|
||||||
lists.forEach((el) => {
|
lists.forEach((el) => {
|
||||||
item.buttonList.push(parseInt(el));
|
item.buttonList.push(parseInt(el))
|
||||||
});
|
})
|
||||||
return item;
|
return item
|
||||||
}
|
}
|
||||||
if (item.children && item.children.length > 0) {
|
if (item.children && item.children.length > 0) {
|
||||||
this.addToButtonListRecursive(
|
this.addToButtonListRecursive(
|
||||||
item.children,
|
item.children,
|
||||||
targetId,
|
targetId,
|
||||||
operateKindList
|
operateKindList
|
||||||
);
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
changeMenu(data, num) {
|
changeMenu(data, num) {
|
||||||
let level = num;
|
let level = num
|
||||||
level = level + 1;
|
level = level + 1
|
||||||
data.forEach((el) => {
|
data.forEach((el) => {
|
||||||
el.buttonList = [];
|
el.buttonList = []
|
||||||
el.type = false;
|
el.type = false
|
||||||
if (el.children != null && el.children && el.children.length) {
|
if (el.children != null && el.children && el.children.length) {
|
||||||
this.changeMenu(el.children, level);
|
this.changeMenu(el.children, level)
|
||||||
}
|
}
|
||||||
});
|
})
|
||||||
},
|
},
|
||||||
toFlatArray(tree, parentId) {
|
toFlatArray(tree, parentId) {
|
||||||
return tree.reduce((t, _) => {
|
return tree.reduce((t, _) => {
|
||||||
const child = _[children];
|
const child = _[children]
|
||||||
return [
|
return [
|
||||||
...t,
|
...t,
|
||||||
parentId ? { ..._, parentId } : _,
|
parentId ? { ..._, parentId } : _,
|
||||||
...(child && child.length ? toFlatArray(child, _[id]) : []),
|
...(child && child.length ? toFlatArray(child, _[id]) : [])
|
||||||
];
|
]
|
||||||
}, []);
|
}, [])
|
||||||
},
|
},
|
||||||
getIds(flatArray) {
|
getIds(flatArray) {
|
||||||
let ids = [nodeId];
|
let ids = [nodeId]
|
||||||
let child = flatArray.find((_) => _[id] === nodeId);
|
let child = flatArray.find((_) => _[id] === nodeId)
|
||||||
while (child && child.parentId) {
|
while (child && child.parentId) {
|
||||||
ids = [child.parentId, ...ids];
|
ids = [child.parentId, ...ids]
|
||||||
child = flatArray.find((_) => _[id] === child.parentId);
|
child = flatArray.find((_) => _[id] === child.parentId)
|
||||||
}
|
}
|
||||||
return ids;
|
return ids
|
||||||
},
|
},
|
||||||
|
|
||||||
treeFindPath(tree, func, field = "", path = []) {
|
treeFindPath(tree, func, field = '', path = []) {
|
||||||
if (!tree) return [];
|
if (!tree) return []
|
||||||
for (const data of tree) {
|
for (const data of tree) {
|
||||||
field === "" ? path.push(data) : path.push(data[field]);
|
field === '' ? path.push(data) : path.push(data[field])
|
||||||
if (func(data)) return path;
|
if (func(data)) return path
|
||||||
if (data.children) {
|
if (data.children) {
|
||||||
const findChildren = this.treeFindPath(
|
const findChildren = this.treeFindPath(
|
||||||
data.children,
|
data.children,
|
||||||
func,
|
func,
|
||||||
field,
|
field,
|
||||||
path
|
path
|
||||||
);
|
)
|
||||||
if (findChildren.length) return findChildren;
|
if (findChildren.length) return findChildren
|
||||||
}
|
}
|
||||||
path.pop();
|
path.pop()
|
||||||
}
|
}
|
||||||
return [];
|
return []
|
||||||
},
|
}
|
||||||
},
|
}
|
||||||
};
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang="scss">
|
<style scoped lang="scss">
|
||||||
.rightDialog {
|
.rightDialog {
|
||||||
height: 100%;
|
height: 100%;
|
||||||
padding: 0 16px;
|
padding: 0 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .cell {
|
::v-deep .cell {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-checkbox-group {
|
::v-deep .el-checkbox-group {
|
||||||
display: flex;
|
display: flex;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
flex-wrap: wrap;
|
flex-wrap: wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-checkbox {
|
::v-deep .el-checkbox {
|
||||||
margin-right: 15px;
|
margin-right: 15px;
|
||||||
}
|
}
|
||||||
|
|
||||||
::v-deep .el-tabs__nav {
|
::v-deep .el-tabs__nav {
|
||||||
transform: translateX(22px) !important;
|
transform: translateX(22px) !important;
|
||||||
}
|
}
|
||||||
|
|
|
@ -94,6 +94,7 @@ export default {
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
async init() {
|
async init() {
|
||||||
|
return
|
||||||
let data = [];
|
let data = [];
|
||||||
const res = await GetAllBilldata({});
|
const res = await GetAllBilldata({});
|
||||||
if (res.code == 1) {
|
if (res.code == 1) {
|
||||||
|
|
|
@ -335,19 +335,7 @@ export default {
|
||||||
}
|
}
|
||||||
const res = await authApi('sysUserService', '', 'jurisdiction', '',params)
|
const res = await authApi('sysUserService', '', 'jurisdiction', '',params)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
console.log(res,'进来了')
|
|
||||||
const data = res.attribute
|
const data = res.attribute
|
||||||
// let menuIDs =
|
|
||||||
// data[0].length > 0 ? data[0][0].fp_MenuIdList.split(',') : []
|
|
||||||
// let echo = data[1].length > 0 ? data[1] : []
|
|
||||||
// let dataPermissions = data[2].length > 0 ? data[2] : []
|
|
||||||
// this.$refs.rightDialog.$refs.dataPermissions.selectedList =
|
|
||||||
// dataPermissions
|
|
||||||
// this.$refs.rightDialog.$refs.layOutPermissions.selectedList = res
|
|
||||||
// .data[3][0]
|
|
||||||
// ? res.data[3][0].widgetList
|
|
||||||
// : ''
|
|
||||||
// this.$refs.rightDialog.exhibitList(menuIDs, echo, this.userRadioId)
|
|
||||||
this.$refs.rightDialog.exhibitList(res.attribute.menvVoList,res.attribute.homeList,this.userRadioId)
|
this.$refs.rightDialog.exhibitList(res.attribute.menvVoList,res.attribute.homeList,this.userRadioId)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
|
@ -7,25 +7,31 @@
|
||||||
<div>
|
<div>
|
||||||
<!-- 人员弹窗 -->
|
<!-- 人员弹窗 -->
|
||||||
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="addDialog"
|
<base-dialog :closeEscape="true" :showClose="true" :closeModal="false" :dialogVisible.sync="addDialog"
|
||||||
@handleClose="handleClose" class="userDialog" title="新增人员" width="700px" top="10vh">
|
@handleClose="handleClose" class="userDialog" title="新增人员" width="700px" top="10vh"
|
||||||
|
>
|
||||||
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" @elDialogClick="organClick"
|
<base-form ref="customForm" :formRow="formRow" :isFunBtn="isFunBtn" @elDialogClick="organClick"
|
||||||
:rules="userRules" @onSubmit="getSubmit">
|
:rules="userRules" @onSubmit="getSubmit"
|
||||||
|
>
|
||||||
</base-form>
|
</base-form>
|
||||||
</base-dialog>
|
</base-dialog>
|
||||||
<div flex style="height: 100%;">
|
<div flex style="height: 100%;">
|
||||||
<base-layout title="组织机构" style="width:260px;" :defaultButtonSwitch="false" :isPage="false"
|
<base-layout title="组织机构" style="width:260px;" :defaultButtonSwitch="false" :isPage="false"
|
||||||
:mainColor="mainColor" :operateButtonSwitch="false" v-loading="treeLoading">
|
:mainColor="mainColor" :operateButtonSwitch="false" v-loading="treeLoading"
|
||||||
|
>
|
||||||
<div slot="main" style="height: 100%;border-right: 1px solid #dfe6ec;overflow-y: auto;">
|
<div slot="main" style="height: 100%;border-right: 1px solid #dfe6ec;overflow-y: auto;">
|
||||||
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
<base-tree ref="baseTree" :isCenter="false" :isSaveBtn="false" :Allshow="false" :showCheckbox="false"
|
||||||
:menuData="menuData" @handleNodeClick="treeClick"></base-tree>
|
:menuData="menuData" @handleNodeClick="treeClick"
|
||||||
|
></base-tree>
|
||||||
</div>
|
</div>
|
||||||
</base-layout>
|
</base-layout>
|
||||||
<base-layout title="人员信息" ref="personLayout" @pageChange="pageChange" :buttonList="buttonList"
|
<base-layout title="人员信息" ref="personLayout" @pageChange="pageChange" :buttonList="buttonList"
|
||||||
@onFuncBtn="getFuncBtn" :isPage="true" style="flex:1;">
|
@onFuncBtn="getFuncBtn" :isPage="true" style="flex:1;"
|
||||||
|
>
|
||||||
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
<div slot="main" slot-scope="{ tableHeight }" style="height: 100%;">
|
||||||
<base-table ref="personCustomtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
<base-table ref="personCustomtable" :border="true" :showIndex="false" :tabLoading.sync="tabLoading"
|
||||||
@radioChange="radioChange" :tableHeight="tableHeight" :tableData="tableData"
|
@radioChange="radioChange" :tableHeight="tableHeight" :tableData="tableData"
|
||||||
:tableColumn="tableColumn" :slotrow="true">
|
:tableColumn="tableColumn" :slotrow="true"
|
||||||
|
>
|
||||||
<!-- 入职时间 -->
|
<!-- 入职时间 -->
|
||||||
<template v-slot:p_EntryTime="{ row }">
|
<template v-slot:p_EntryTime="{ row }">
|
||||||
<span>{{ row.row.p_EntryTime | timeDate }}</span>
|
<span>{{ row.row.p_EntryTime | timeDate }}</span>
|
||||||
|
@ -41,7 +47,8 @@
|
||||||
|
|
||||||
<!-- 部门+对外签订弹窗 -->
|
<!-- 部门+对外签订弹窗 -->
|
||||||
<base-organization ref="baseOrganization" :menuData="menuData"
|
<base-organization ref="baseOrganization" :menuData="menuData"
|
||||||
@handleConfirmClick="organizationHandleConfirm"></base-organization>
|
@handleConfirmClick="organizationHandleConfirm"
|
||||||
|
></base-organization>
|
||||||
<!-- <base-dialog :closeEscape="true" :showClose="true" :closeModal="false"
|
<!-- <base-dialog :closeEscape="true" :showClose="true" :closeModal="false"
|
||||||
@handleConfirmClick="organizationHandleConfirm" :dialogVisible.sync="organizationDialog" class="userDialog"
|
@handleConfirmClick="organizationHandleConfirm" :dialogVisible.sync="organizationDialog" class="userDialog"
|
||||||
title="选择组织机构" width="700px" top="10vh" :footerShow="true">
|
title="选择组织机构" width="700px" top="10vh" :footerShow="true">
|
||||||
|
@ -68,13 +75,13 @@
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import baseLayout from "@/components/base/baseLayout";
|
import baseLayout from '@/components/base/baseLayout'
|
||||||
import baseTable from "@/components/base/baseTable";
|
import baseTable from '@/components/base/baseTable'
|
||||||
// import baseDialog from "@/components/base/BaseNewDialog";
|
// import baseDialog from "@/components/base/BaseNewDialog";
|
||||||
import baseDialog from "@/components/base/BaseNewDialog/index.vue";
|
import baseDialog from '@/components/base/BaseNewDialog/index.vue'
|
||||||
import baseForm from "@/components/base/baseNewForm/index.vue";
|
import baseForm from '@/components/base/baseNewForm/index.vue'
|
||||||
import baseTree from "@/components/base/BaseMenuTree/index.vue";
|
import baseTree from '@/components/base/BaseMenuTree/index.vue'
|
||||||
import baseOrganization from "@/components/base/baseOrganization/index.vue";
|
import baseOrganization from '@/components/base/baseOrganization/index.vue'
|
||||||
import { getCompanyId } from '@/utils/auth'
|
import { getCompanyId } from '@/utils/auth'
|
||||||
import {
|
import {
|
||||||
PersonList,
|
PersonList,
|
||||||
|
@ -90,11 +97,11 @@ import {
|
||||||
import {
|
import {
|
||||||
dataDictionaryGetBillList
|
dataDictionaryGetBillList
|
||||||
} from '@/api/apis/dataDictionary'
|
} from '@/api/apis/dataDictionary'
|
||||||
import configData from "./configData";
|
import configData from './configData'
|
||||||
import { authApi } from '@/api/apis/auth'
|
import { authApi } from '@/api/apis/auth'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "review",
|
name: 'review',
|
||||||
components: {
|
components: {
|
||||||
baseLayout,
|
baseLayout,
|
||||||
baseTable,
|
baseTable,
|
||||||
|
@ -116,13 +123,13 @@ export default {
|
||||||
buttonList: [
|
buttonList: [
|
||||||
{
|
{
|
||||||
icon: 'button_reset',
|
icon: 'button_reset',
|
||||||
menuName: '启用',
|
menuName: '启用'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
icon: 'button_reset',
|
icon: 'button_reset',
|
||||||
menuName: '停用',
|
menuName: '停用',
|
||||||
type: 'danger'
|
type: 'danger'
|
||||||
},
|
}
|
||||||
],
|
],
|
||||||
tabLoading: false,
|
tabLoading: false,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
@ -135,7 +142,7 @@ export default {
|
||||||
roleName: null, // 角色名称
|
roleName: null, // 角色名称
|
||||||
roleNumber: null, // 角色编码
|
roleNumber: null, // 角色编码
|
||||||
order: null, // 排序
|
order: null, // 排序
|
||||||
describe: null, // 描述
|
describe: null // 描述
|
||||||
},
|
},
|
||||||
roleOptions: configData.roleOptions,
|
roleOptions: configData.roleOptions,
|
||||||
formRow: configData.formRow,
|
formRow: configData.formRow,
|
||||||
|
@ -156,7 +163,7 @@ export default {
|
||||||
// 表头配置
|
// 表头配置
|
||||||
tableColumn() {
|
tableColumn() {
|
||||||
return configData.tableColumnJson
|
return configData.tableColumnJson
|
||||||
},
|
}
|
||||||
},
|
},
|
||||||
watch: {
|
watch: {
|
||||||
|
|
||||||
|
@ -173,8 +180,10 @@ export default {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
created() { },
|
created() {
|
||||||
onShow() { },
|
},
|
||||||
|
onShow() {
|
||||||
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.initPage()
|
this.initPage()
|
||||||
|
|
||||||
|
@ -213,10 +222,10 @@ export default {
|
||||||
this.treeLoading = false
|
this.treeLoading = false
|
||||||
}, 180000)
|
}, 180000)
|
||||||
let params = {
|
let params = {
|
||||||
state: 0,
|
state: 0
|
||||||
// CompanyID: this.$store.state.user.companyID?this.$store.state.user.companyID:getCompanyId()
|
// CompanyID: this.$store.state.user.companyID?this.$store.state.user.companyID:getCompanyId()
|
||||||
}
|
}
|
||||||
let res = await authApi("sysOrganService","","queryEntityTree","",{})
|
let res = await authApi('sysOrganService', '', 'queryEntityTree', '', {})
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.menuData = res.attribute
|
this.menuData = res.attribute
|
||||||
this.treeLoading = false
|
this.treeLoading = false
|
||||||
|
@ -227,7 +236,7 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
id: id
|
id: id
|
||||||
}
|
}
|
||||||
let res = await authApi('sysPersonService','','deleteEntity','',params)
|
let res = await authApi('sysPersonService', '', 'deleteEntity', '', params)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.$vmNews('删除成功', 'success')
|
this.$vmNews('删除成功', 'success')
|
||||||
this.resetTable()
|
this.resetTable()
|
||||||
|
@ -241,8 +250,8 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
id: id
|
id: id
|
||||||
}
|
}
|
||||||
let res = await authApi('sysPersonService',"","getEntity","",params)
|
let res = await authApi('sysPersonService', '', 'getEntity', '', params)
|
||||||
console.log(res,'res')
|
console.log(res, 'res')
|
||||||
// res.data[0].o_OrganName = res.data[0].orgainName
|
// res.data[0].o_OrganName = res.data[0].orgainName
|
||||||
this.addDialog = true
|
this.addDialog = true
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
|
@ -252,72 +261,70 @@ export default {
|
||||||
// 获取学历类型
|
// 获取学历类型
|
||||||
async getEducationList() {
|
async getEducationList() {
|
||||||
let params = {
|
let params = {
|
||||||
KindId: 3,
|
'usedSts': '1',//1 使用,2 不使用
|
||||||
page: 1,
|
tabName: 'sys_person',
|
||||||
limit: 999,
|
columnName: 'degree_id'
|
||||||
Sequence: '',
|
|
||||||
SequenceName: ''
|
|
||||||
}
|
}
|
||||||
let res = await dataDictionaryGetBillList(params)
|
let res = await authApi('sysDictionaryshopService', '', 'queryEntity', '', params)
|
||||||
if (res.code == 1) {
|
if (res.status == 200) {
|
||||||
|
console.log(res.attribute,'res')
|
||||||
let arrList = []
|
let arrList = []
|
||||||
if (res.data[0] > 0) {
|
if (res.attribute.length) {
|
||||||
res.data[1].forEach(el => {
|
res.attribute.forEach(el => {
|
||||||
let arr = {
|
let arr = {
|
||||||
label: el.ddd_DicDetailsName,
|
label: el.columnContent,
|
||||||
value: el.ddd_DicDetailsID
|
value: el.id
|
||||||
}
|
}
|
||||||
arrList.push(arr)
|
arrList.push(arr)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log(arrList,'arrList')
|
||||||
configData.formRow[2].elCol[1].options = arrList
|
configData.formRow[2].elCol[1].options = arrList
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取职务类型
|
// 获取职务类型
|
||||||
async getPostList() {
|
async getPostList() {
|
||||||
let params = {
|
let params = {
|
||||||
KindId: 1,
|
'usedSts': '1',//1 使用,2 不使用
|
||||||
page: 1,
|
tabName: 'sys_person',
|
||||||
limit: 999,
|
columnName: 'post_id'
|
||||||
Sequence: '',
|
|
||||||
SequenceName: ''
|
|
||||||
}
|
}
|
||||||
let res = await dataDictionaryGetBillList(params)
|
let res = await authApi('sysDictionaryshopService', '', 'queryEntity', '', params)
|
||||||
if (res.code == 1) {
|
if (res.status == 200) {
|
||||||
let arrList = []
|
let arrList = []
|
||||||
if (res.data[0] > 0) {
|
if (res.attribute.length) {
|
||||||
res.data[1].forEach(el => {
|
res.attribute.forEach(el => {
|
||||||
let arr = {
|
let arr = {
|
||||||
label: el.ddd_DicDetailsName,
|
label: el.columnContent,
|
||||||
value: el.ddd_DicDetailsID
|
value: el.id
|
||||||
}
|
}
|
||||||
arrList.push(arr)
|
arrList.push(arr)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log(arrList,'arrList222')
|
||||||
configData.formRow[3].elCol[0].options = arrList
|
configData.formRow[3].elCol[0].options = arrList
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取级别类型
|
// 获取级别类型
|
||||||
async getLevelnList() {
|
async getLevelnList() {
|
||||||
let params = {
|
let params = {
|
||||||
KindId: 2,
|
'usedSts': '1',//1 使用,2 不使用
|
||||||
page: 1,
|
tabName: 'sys_person',
|
||||||
limit: 999,
|
columnName: 'level_id'
|
||||||
Sequence: '',
|
|
||||||
SequenceName: ''
|
|
||||||
}
|
}
|
||||||
let res = await dataDictionaryGetBillList(params)
|
let res = await authApi('sysDictionaryshopService', '', 'queryEntity', '', params)
|
||||||
if (res.code == 1) {
|
if (res.status == 200) {
|
||||||
let arrList = []
|
let arrList = []
|
||||||
if (res.data[0] > 0) {
|
if (res.attribute.length) {
|
||||||
res.data[1].forEach(el => {
|
res.attribute.forEach(el => {
|
||||||
let arr = {
|
let arr = {
|
||||||
label: el.ddd_DicDetailsName,
|
label: el.columnContent,
|
||||||
value: el.ddd_DicDetailsID
|
value: el.id
|
||||||
}
|
}
|
||||||
arrList.push(arr)
|
arrList.push(arr)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
console.log(arrList,'arrList222')
|
||||||
configData.formRow[3].elCol[1].options = arrList
|
configData.formRow[3].elCol[1].options = arrList
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -329,10 +336,10 @@ export default {
|
||||||
let params = {
|
let params = {
|
||||||
...this.pageModel
|
...this.pageModel
|
||||||
}
|
}
|
||||||
let res = await authApi("sysPersonService","","queryEntityPage","",params)
|
let res = await authApi('sysPersonService', '', 'queryEntityPage', '', params)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
console.log(res.attribute,'res.attribute',res)
|
console.log(res.attribute, 'res.attribute', res)
|
||||||
this.tableData = res.attribute.list;
|
this.tableData = res.attribute.list
|
||||||
this.$refs.personCustomtable.clearRadioIndex()
|
this.$refs.personCustomtable.clearRadioIndex()
|
||||||
|
|
||||||
this.$refs.personLayout.setPageTotal(res.attribute.total)
|
this.$refs.personLayout.setPageTotal(res.attribute.total)
|
||||||
|
@ -344,9 +351,9 @@ export default {
|
||||||
async closeDelData(id) {
|
async closeDelData(id) {
|
||||||
let params = {
|
let params = {
|
||||||
id: id,
|
id: id,
|
||||||
"state": "1"
|
'state': '1'
|
||||||
}
|
}
|
||||||
let res = await authApi("sysPersonService","","enableDisableEntity","",params)
|
let res = await authApi('sysPersonService', '', 'enableDisableEntity', '', params)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.$vmNews('已停用', 'success')
|
this.$vmNews('已停用', 'success')
|
||||||
this.resetTable()
|
this.resetTable()
|
||||||
|
@ -356,9 +363,9 @@ export default {
|
||||||
async openDelData(id) {
|
async openDelData(id) {
|
||||||
let params = {
|
let params = {
|
||||||
id: id,
|
id: id,
|
||||||
"state": "0"
|
'state': '0'
|
||||||
}
|
}
|
||||||
let res = await authApi("sysPersonService","","enableDisableEntity","",params)
|
let res = await authApi('sysPersonService', '', 'enableDisableEntity', '', params)
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.$vmNews('已启用', 'success')
|
this.$vmNews('已启用', 'success')
|
||||||
this.resetTable()
|
this.resetTable()
|
||||||
|
@ -398,8 +405,8 @@ export default {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消删除'
|
message: '已取消删除'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (btnEven.menuName === '停用') { // 停用
|
if (btnEven.menuName === '停用') { // 停用
|
||||||
// if (!this.judgeCheckbox()) {
|
// if (!this.judgeCheckbox()) {
|
||||||
|
@ -415,8 +422,8 @@ export default {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消删除'
|
message: '已取消删除'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
if (btnEven.menuName === '启用') { // 停用
|
if (btnEven.menuName === '启用') { // 停用
|
||||||
|
|
||||||
|
@ -433,8 +440,8 @@ export default {
|
||||||
this.$message({
|
this.$message({
|
||||||
type: 'info',
|
type: 'info',
|
||||||
message: '已取消删除'
|
message: '已取消删除'
|
||||||
});
|
})
|
||||||
});
|
})
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
judgeCheckbox() {
|
judgeCheckbox() {
|
||||||
|
@ -454,14 +461,14 @@ export default {
|
||||||
|
|
||||||
async getSubmit(data) {
|
async getSubmit(data) {
|
||||||
let params = {
|
let params = {
|
||||||
...data,
|
...data
|
||||||
}
|
}
|
||||||
let res
|
let res
|
||||||
console.log(params,'params')
|
console.log(params, 'params')
|
||||||
if(params.id){
|
if (params.id) {
|
||||||
res = await authApi("sysPersonService","","updateEntity","",params)
|
res = await authApi('sysPersonService', '', 'updateEntity', '', params)
|
||||||
}else{
|
} else {
|
||||||
res = await authApi("sysPersonService","","saveEntity","",params)
|
res = await authApi('sysPersonService', '', 'saveEntity', '', params)
|
||||||
|
|
||||||
}
|
}
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
|
@ -475,7 +482,7 @@ export default {
|
||||||
this.radioIndex = false
|
this.radioIndex = false
|
||||||
this.radioId = false
|
this.radioId = false
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.personCustomtable.clearSelect();
|
this.$refs.personCustomtable.clearSelect()
|
||||||
this.$refs.personLayout.pageClear()
|
this.$refs.personLayout.pageClear()
|
||||||
})
|
})
|
||||||
this.getTableList()
|
this.getTableList()
|
||||||
|
@ -504,13 +511,13 @@ export default {
|
||||||
this.organizationForm = {
|
this.organizationForm = {
|
||||||
code: data.code,
|
code: data.code,
|
||||||
O_OrganID: data.id,
|
O_OrganID: data.id,
|
||||||
ParentOrganName: data.label,
|
ParentOrganName: data.label
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<style scoped lang='scss'>
|
<style scoped lang="scss">
|
||||||
/* .userDialog {
|
/* .userDialog {
|
||||||
margin-top: 10vh;
|
margin-top: 10vh;
|
||||||
width: 700px;
|
width: 700px;
|
||||||
|
|
Loading…
Reference in New Issue