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

提交

parent fea34c06
# 教育监管及调度
#### Description
武汉教育通讯录
教育通讯录
#### Software Architecture
Software architecture description
......
{
"name": "jnpf-web",
"version": "3.3.0",
"description": "武汉教育通讯录",
"author": "武汉教育通讯录",
"description": "教育通讯录",
"author": "教育通讯录",
"license": "MIT",
"scripts": {
"dev": "cross-env NODE_OPTIONS=--openssl-legacy-provider vue-cli-service serve --open",
......
......@@ -8,7 +8,13 @@ export const getOrganizeList = (data) => {
data
})
}
export const getOrganize1 = (data) => {
return request({
url: '/api/permission/Organize/getAllOrganize',
method: 'GET',
data
})
}
// 获取组织/公司下拉框列表
export const getOrganizeSelector = (id) => {
return request({
......
......@@ -138,7 +138,7 @@ export default {
setting: '设置'
},
login: {
title: '武汉教育通讯录',
title: '教育通讯录',
scanTitle: '扫码登录',
codeTitle: '手机验证登录',
logIn: '登录',
......
......@@ -5,7 +5,7 @@
<div style="display: flex;align-items: center;
justify-content: center;margin-top: -9px;">
<img src="../../../assets/images/jnpf25.png" >
<span class="tongxunword" >武汉教育通讯录</span>
<span class="tongxunword" >教育通讯录</span>
</div>
</router-link>
<router-link v-else key="expand" class="sidebar-logo-link" to="/">
......@@ -14,7 +14,7 @@
<img src="../../../assets/images/jnpf25.png"
v-if="slideClass==='lightWhite'" />
<img src="../../../assets/images/jnpf25.png" v-else />
<span class="tongxunword" >武汉教育通讯录</span>
<span class="tongxunword" >教育通讯录</span>
</div>
</router-link>
......
......@@ -5,7 +5,7 @@
<div style="display: flex;align-items: center;
justify-content: center;margin-top: -9px;">
<img src="../../../assets/images/jnpf25.png" >
<span class="tongxunword">武汉教育通讯录</span>
<span class="tongxunword">教育通讯录</span>
</div>
</router-link>
......@@ -13,7 +13,7 @@
<div style="display: flex;align-items: center;
justify-content: center;margin-top: -9px;">
<img src="../../../assets/images/jnpf25.png" >
<span class="tongxunword">武汉教育通讯录</span>
<span class="tongxunword">教育通讯录</span>
</div>
</router-link>
</transition>
......
......@@ -52,12 +52,15 @@ router.beforeEach(async (to, from, next) => {
// 检查用户角色
const userInfo = store.getters.userInfo
/**
填报员 706786921652741637
管理员 698180744190671109
校级管理员 675251512758259397
720246726413345669 通讯录市级管理员
720247312500220805 通讯录区级管理员
720247536941622149 通讯录校级管理员
440486157969526149 超级管理员
*/
// 非以上三个角色 不让登录值报系统
/* if (userInfo.roleIds.indexOf('675251512758259397') == -1&&userInfo.roleIds.indexOf('698180744190671109') == -1&&userInfo.roleIds.indexOf('706786921652741637') == -1) {
// 非以上四个角色 不让登录值报系统
if (userInfo.roleIds.indexOf('720246726413345669') == -1&&userInfo.roleIds.indexOf('720247312500220805') == -1&&userInfo.roleIds.indexOf('720247536941622149') == -1
&&userInfo.roleIds.indexOf('440486157969526149') == -1
) {
// 弹出确认框
try {
await MessageBox.confirm('您的账号无权限访问,点击确定退出登录', '提示', {
......@@ -79,7 +82,7 @@ router.beforeEach(async (to, from, next) => {
next(false)
return
}
} */
}
// if (userInfo.roleIds.indexOf('675251512758259397') == -1) {
// await MessageBox.confirm('您的账号无权限访问,点击确定退出登录?', '提示', {
// confirmButtonText: '确定',
......
module.exports = {
title: '武汉教育通讯录',
title: '教育通讯录',
/**
* @type {boolean} true | false
......
......@@ -232,6 +232,7 @@ export default {
},
initData() {
this.listLoading = true
console.log(this.companyId,'bbb');
getDepartmentList(this.companyId, this.listQuery).then(res => {
this.tableData = res.data.list
this.listLoading = false
......@@ -257,6 +258,9 @@ export default {
this.type = data.type
this.reset()
}
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(this.companyId)
})
},
addOrUpdateHandle(id) {
this.formVisible = true
......@@ -293,7 +297,7 @@ export default {
onClose: () => {
this.$store.commit('generator/SET_COMPANY_TREE', [])
this.$store.commit('generator/SET_DEP_TREE', [])
this.getOrganizeList(true)
this.initData()
}
})
})
......
......@@ -33,7 +33,7 @@
<!-- <el-input v-model="dataForm.relation" placeholder="输入上级单位关联关系" />-->
<el-select v-model="dataForm.relation" placeholder="请选择">
<el-option
v-for="item in relativeData"
v-for="item in relationData"
:key="item.enCode"
:label="item.fullName"
:value="parseInt(item.enCode)">
......@@ -173,7 +173,7 @@ import {
} from '@/api/permission/organize'
export default {
props:['typeData','relativeData'],
props:['typeData'],
data() {
return {
......@@ -181,7 +181,7 @@ export default {
strInfo:'教育行政机构代码/学校标识码',
btnLoading: false,
formLoading: false,
/* relationData:[], */
relationData:[],
isEdit:false,
dataForm: {
id: '',
......@@ -280,10 +280,10 @@ export default {
/*查询上下级关系接口*/
/* getrelativeData().then((res)=>{
getrelativeData().then((res)=>{
console.log(res)
this.relationData=res.data.list;
}) */
})
if (this.dataForm.id) {
/*this.formLoading = true*/
/*this.isEdit=true;*/
......
......@@ -23,7 +23,7 @@
<div class="JNPF-common-head">
<topOpts @add="addOrUpdateHandle()" />
<div class="JNPF-common-head-right">
<!-- <el-tooltip effect="dark" content="展开" placement="top">
<el-tooltip effect="dark" content="展开" placement="top">
<el-link v-show="!expands" type="text"
icon="icon-ym icon-ym-btn-expand JNPF-common-head-icon" :underline="false"
@click="toggleExpand()" />
......@@ -32,26 +32,25 @@
<el-link v-show="expands" type="text"
icon="icon-ym icon-ym-btn-collapse JNPF-common-head-icon" :underline="false"
@click="toggleExpand()" />
</el-tooltip>-->
</el-tooltip>
<el-tooltip effect="dark" :content="$t('common.refresh')" placement="top">
<el-link icon="icon-ym icon-ym-Refresh JNPF-common-head-icon" :underline="false"
@click="initData()" />
</el-tooltip>
</div>
</div>
<JNPF-table v-loading="listLoading" :data="treeList" row-key="fullName" v-if="refreshTable"
:tree-props="{children: 'children', hasChildren: ''}">
<JNPF-table v-loading="listLoading" :data="treeList" row-key="id" v-if="refreshTable"
:default-expand-all="expands" :tree-props="{children: 'children', hasChildren: ''}">
<el-table-column prop="fullName" label="名称" />
<el-table-column prop="shortName" label="简称" />
<el-table-column prop="relation" label="上级单位关联关系" :formatter="personFormatter"/>
<el-table-column prop="systemCode" label="教育行政机构代码/学校标识码" />
<el-table-column prop="genre" label="机构类型" :formatter="typeFormatter"/>
<el-table-column prop="address" label="机构地址" />
<!-- <el-table-column prop="creatorTime" :formatter="jnpf.tableDateFormat" label="创建时间"
width="120" />
<el-table-column prop="sortCode" label="排序" width="70" align="center" />-->
<el-table-column label="操作" width="150 ">
<template slot-scope="scope" >
<div v-if="scope.row.id!=null">
<el-table-column label="操作" width="150">
<template slot-scope="scope">
<tableOpts @edit="addOrUpdateHandle(scope.row.id)" @del="handleDel(scope.row.id)">
<el-dropdown hide-on-click>
<span class="el-dropdown-link">
......@@ -66,13 +65,12 @@
</el-dropdown-menu>
</el-dropdown>
</tableOpts>
</div>
</template>
</el-table-column>
</JNPF-table>
</div>
</div>
<Form v-show="formVisible" ref="Form" @close="closeForm" :relativeData="relativeInfo" :typeData="typeDataInfo"/>
<Form v-show="formVisible" ref="Form" @close="closeForm" :typeData="typeDataInfo"/>
<gradeForm v-if="gradeFormVisible" ref="gradeForm" @close="gradeFormVisible=false" />
</div>
</template>
......@@ -80,7 +78,7 @@
<script>
import {
getOrganizeList,
delOrganize, gettypeData, ceshi, getOrganizezuzhi, getrelativeData
delOrganize, gettypeData, ceshi, getOrganizezuzhi
} from '@/api/permission/organize'
import Form from './Form'
import GradeForm from './GradeForm'
......@@ -94,7 +92,6 @@ export default {
listQuery: {
keyword: ''
},
relativeInfo:[],
typeDataInfo:[],
treeList: [],
expands: false,
......@@ -109,28 +106,11 @@ export default {
this.initData()
},
methods: {
personFormatter(row){
let str=''
if(row.relation){
this.relativeInfo.map((item,index)=>{
if(Number(item.enCode)==row.relation){
str=item.fullName
}
})
return str
}else{
return ''
}
},
initData() {
this.listLoading= true
this.organizeId=this.$store.state.user.userInfo.organizeId;
/* 上下级关系 */
getrelativeData().then((res)=>{
this.relativeInfo=res.data.list;
})
getOrganizeList(this.listQuery).then(res => {
if(this.organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){
getOrganizezuzhi(this.listQuery).then(res => {
let data=res.data.list
// 递归处理函数
function processObject(obj) {
......@@ -152,7 +132,6 @@ export default {
// 处理所有顶层对象
data.forEach(item => processObject(item));
console.log(data,'vvvvvvvvvvvv')
this.treeList=data
/* this.treeList=processData(res.data.list)*/
......@@ -162,7 +141,28 @@ export default {
this.listLoading = false
this.btnLoading = false
})
}else{
getOrganize(this.organizeId).then(res => {
console.log(res,'ggggggggggg')
this.listLoading = false
this.btnLoading = false
this.treeList = res.data
/* this.$nextTick(() => {
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
if (isInit) this.initData()
})*/
}).catch(() => {
this.listLoading = false
this.btnLoading = false
})
}
/*查询机构接口*/
gettypeData().then((res)=>{
......
......@@ -283,7 +283,9 @@ export default {
this.type = data.type
this.reset()
}
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(this.listQuery.organizeId)
})
/* this.listQuery.organizeId = data.id
this.type = data.type
this.reset() */
......
......@@ -78,7 +78,7 @@
</template>
</el-table-column>
<el-table-column prop="organize" label="所属组织" show-overflow-tooltip />
<el-table-column prop="roleIds" label="处理人身份" :formatter="personFormatter"/>
<!-- <el-table-column prop="roleIds" label="处理人身份" :formatter="personFormatter"/>-->
<el-table-column prop="creatorTime" label="创建时间" :formatter="jnpf.tableDateFormat"
/>
<!-- <el-table-column prop="sortCode" label="排序" width="70" align="center" />-->
......@@ -337,7 +337,7 @@ export default {
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()
......@@ -355,7 +355,9 @@ export default {
return
}
if (isInit) this.listQuery.organizeId = this.treeData[0].id
this.$nextTick(()=>{
this.$refs.treeBox.setCurrentKey(this.treeData[0].id)
})
this.treeLoading = false
if (isInit) this.initData()
this.getcommontree()
......@@ -422,7 +424,9 @@ export default {
this.type = data.type
this.reset()
}
this.$nextTick(() => {
this.$refs.treeBox.setCurrentKey(this.listQuery.organizeId)
})
},
addOrUpdateHandle(id) {
......
......@@ -242,10 +242,11 @@ export default {
/* this.treeData = this.comName
this.allList = this.treeToArray(this.treeData)*/
let organizeId=this.$store.state.user.userInfo.organizeId;
this.loading=true;
if(organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){
getOrganizeList().then(res => {
/* this.treeData = res.data.list */
this.loading=false;
/* if(organizeId=='96240625-934F-490B-8AA6-0BC775B18468'){
getOrganize(organizeId).then(res => {
/!* this.treeData = res.data.list *!/
console.log(res)
function removeDepartments(data) {
// 遍历数组中的每个对象
for (let i = 0; i < data.length; i++) {
......@@ -269,14 +270,14 @@ export default {
}
// 使用示例
const processedData = removeDepartments(res.data.list);
const processedData = removeDepartments(res.data);
console.log(processedData);
this.treeData=processedData;
this.allList = this.treeToArray(this.treeData)
this.loading=false;
})
}else{
}else{ */
getOrganize(organizeId).then(res => {
console.log(res,'ggggggggggg')
this.treeData = res.data;
......@@ -285,7 +286,7 @@ export default {
})
}
/* } */
},
treeToArray(treeData) {
......
......@@ -8,7 +8,7 @@ function resolve(dir) {
return path.join(__dirname, dir)
}
const name = defaultSettings.title || '武汉教育通讯录' // page title
const name = defaultSettings.title || '教育通讯录' // page title
// If your port is set to 80,
// use administrator privileges to execute the command line.
......
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