提交 5d34dd3a 编写于 作者: zhentian.jia's avatar zhentian.jia

编辑项目完成

上级 fdf66e66
...@@ -8,7 +8,6 @@ const createComponent = r => require.ensure([], () => r(require('../views/educat ...@@ -8,7 +8,6 @@ const createComponent = r => require.ensure([], () => r(require('../views/educat
const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role') const roleManager = r => require.ensure([], () => r(require('../views/system/role.vue')),'role')
const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager') const addManager = r => require.ensure([], () => r(require('../views/education/add-manager.vue')), 'add-manager')
const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role') const itemRole = r => require.ensure([], () => r(require('../views/system/item-role.vue')), 'item-role')
const tree = r => require.ensure([], () => r(require('../views/education/tree.vue')), 'tree')
export default [{ export default [{
path: '/', path: '/',
...@@ -44,9 +43,6 @@ export default [{ ...@@ -44,9 +43,6 @@ export default [{
},{ },{
path: '/item-role', path: '/item-role',
component: itemRole component: itemRole
},{
path: '/tree',
component: tree
}, },
] ]
}] }]
\ No newline at end of file
...@@ -255,9 +255,9 @@ ...@@ -255,9 +255,9 @@
</el-col> </el-col>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="设定人员" name="fourth"> <el-tab-pane label="设定人员" name="fourth">
<el-form :inline="true" :model="formPersonnel" class="demo-form-inline"> <el-form :inline="true" :model="formPerson" class="demo-form-inline">
<el-form-item label> <el-form-item label>
<el-select size="mini" v-model="formPersonnel.hospital" placeholder="全部医院"> <el-select size="mini" v-model="formPerson.hospital" placeholder="全部医院">
<el-option <el-option
v-for="(item, index) in organizationRank" v-for="(item, index) in organizationRank"
:key="index" :key="index"
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
<el-select size="mini" v-model="formPersonnel.department" placeholder="全部部门"> <el-select size="mini" v-model="formPerson.department" placeholder="全部部门">
<el-option <el-option
v-for="(item, index) in organizationRank" v-for="(item, index) in organizationRank"
:key="index" :key="index"
...@@ -315,9 +315,9 @@ ...@@ -315,9 +315,9 @@
background background
@size-change="handleSizePerson" @size-change="handleSizePerson"
@current-change="handleCurrentPerson" @current-change="handleCurrentPerson"
:current-page="formPersonnel.pageNum" :current-page="formPerson.pageNum"
:page-sizes="[10, 20, 40]" :page-sizes="[10, 20, 40]"
:page-size="formPersonnel.pageSize" :page-size="formPerson.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="totalPerson" :total="totalPerson"
></el-pagination> ></el-pagination>
...@@ -427,7 +427,7 @@ export default { ...@@ -427,7 +427,7 @@ export default {
curmbSecond: "新建项目", curmbSecond: "新建项目",
//页面展示位置 //页面展示位置
stepData: [true, false, false], stepData: [true, false, false],
active: 1, active: 0,
activeName: "first", activeName: "first",
//基层信息 数据 //基层信息 数据
imageUrl: "", imageUrl: "",
...@@ -444,6 +444,7 @@ export default { ...@@ -444,6 +444,7 @@ export default {
}, },
fileList: [], fileList: [],
//设定行政范围 数据 //设定行政范围 数据
allSelectedKeys: [],
updatedTree: false, updatedTree: false,
defaultProps: { defaultProps: {
children: "children", children: "children",
...@@ -495,6 +496,7 @@ export default { ...@@ -495,6 +496,7 @@ export default {
pageSizeOrganization: 2, pageSizeOrganization: 2,
changedOrganization: {}, changedOrganization: {},
//设定科室 数据 //设定科室 数据
firstDepartment: true,
formDepartment: { formDepartment: {
grade: "" grade: ""
}, },
...@@ -503,7 +505,7 @@ export default { ...@@ -503,7 +505,7 @@ export default {
updatedDepartment: false, updatedDepartment: false,
changedDepartment: {}, changedDepartment: {},
//设定人员 数据 //设定人员 数据
formPersonnel: { formPerson: {
hospital: "", hospital: "",
department: "", department: "",
pageNum: 1, pageNum: 1,
...@@ -514,7 +516,7 @@ export default { ...@@ -514,7 +516,7 @@ export default {
currentPerson: 1, currentPerson: 1,
pageSizePerson: 2, pageSizePerson: 2,
totalPerson: 10, totalPerson: 10,
updatedPersonn: false, updatedPerson: false,
changedPerson: {}, changedPerson: {},
//选择项目组件 数据 //选择项目组件 数据
optionsComponent: [], optionsComponent: [],
...@@ -867,16 +869,30 @@ export default { ...@@ -867,16 +869,30 @@ export default {
} }
} else if (this.active == 1) { } else if (this.active == 1) {
let req = { let req = {
projectId: 54, projectId: this.projectId,
setKindOfAdministrative: 3, setKindOfAdministrative: this.getKind("administrative"),
scopeOfAdministrative: "000:2|000_110:1", //scopeOfAdministrative: "000:2|000_110:1",
setKindOfOrganization: 3, setKindOfOrganization: this.getKind("organization"),
scopeOfOrganization: "2|3|4|5|6|7", //scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment: 3, setKindOfDepartment: this.getKind("department"),
scopeOfDepartment: "54", //scopeOfDepartment: "54",
setKindOfPeople: 1, setKindOfPeople: this.getKind("person")
scopeOfPeople: "" //scopeOfPeople: ""
}; };
if (req.setKindOfAdministrative == 3) {
req.scopeOfAdministrative = this.getScope("administrativeUpdate");
}
if (req.setKindOfOrganization == 2 || req.setKindOfOrganization == 3) {
req.scopeOfOrganization = this.getScopeOrganization(
req.setKindOfOrganization
);
}
if (req.setKindOfDepartment == 3) {
req.scopeOfDepartment = this.getScopeDepartment();
}
if (req.setKindOfPeople == 2 || req.setKindOfPeople == 3) {
req.scopeOfPeople = this.getScopePeople(req.setKindOfPeople);
}
vm.POST("scope", req).then(res => { vm.POST("scope", req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
//移动到选择项目组件 //移动到选择项目组件
...@@ -1034,8 +1050,11 @@ export default { ...@@ -1034,8 +1050,11 @@ export default {
//设定机构 //设定机构
this.getOrganization(); this.getOrganization();
} else if (tabName == "third") { } else if (tabName == "third") {
this.$refs.multipleDepartment.toggleAllSelection();
//设定科室 //设定科室
if (this.checkTableState.multipleDepartment && this.firstDepartment) {
this.$refs.multipleDepartment.toggleAllSelection();
this.firstDepartment = false;
}
} else if (tabName == "fourth") { } else if (tabName == "fourth") {
//设定人员 //设定人员
this.getPeople(); this.getPeople();
...@@ -1084,7 +1103,7 @@ export default { ...@@ -1084,7 +1103,7 @@ export default {
for (let i = 0; i < nodeData.length; i++) { for (let i = 0; i < nodeData.length; i++) {
for (let j = 0; j < allSelectedKeys.length; j++) { for (let j = 0; j < allSelectedKeys.length; j++) {
if ( if (
allSelectedKeys[j].type == 2 && allSelectedKeys[j].type == 1 &&
nodeData[i].id == allSelectedKeys[j].key nodeData[i].id == allSelectedKeys[j].key
) { ) {
let tagObj = {}; let tagObj = {};
...@@ -1163,15 +1182,17 @@ export default { ...@@ -1163,15 +1182,17 @@ export default {
halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(), halfCheckedKeys = this.$refs.tree.getHalfCheckedKeys(),
savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map( savedCheckedKeys = this.handlerCheckedData(oldData, checkedKeys).map(
key => { key => {
return { type: 2, key: key }; return { type: 1, key: key };
} }
), ),
savedHalfCheckedKeys = halfCheckedKeys.map(key => { savedHalfCheckedKeys = halfCheckedKeys.map(key => {
return { type: 1, key: key }; return { type: 2, key: key };
}), }),
allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys); allSelectedKeys = savedCheckedKeys.concat(savedHalfCheckedKeys);
this.allSelectedKeys = allSelectedKeys;
this.initCheckList(allSelectedKeys); this.initCheckList(allSelectedKeys);
console.log("allSelectedKeys", allSelectedKeys);
//改变行政范围后,更新设定机构和设定人员 //改变行政范围后,更新设定机构和设定人员
this.updateOrganizationAndPerson(allSelectedKeys); this.updateOrganizationAndPerson(allSelectedKeys);
this.updatedTree = true; this.updatedTree = true;
...@@ -1276,12 +1297,32 @@ export default { ...@@ -1276,12 +1297,32 @@ export default {
//改变机构 table 的check状态 //改变机构 table 的check状态
selectionChangeDepartment(val) { selectionChangeDepartment(val) {
this.multipleSelectionDepartment = val; this.multipleSelectionDepartment = val;
console.log(this.multipleSelectionDepartment); //console.log(this.multipleSelectionDepartment);
}, },
//改变人员 table的check状态 //改变人员 table的check状态
selectionChangePerson(val) { selectionChangePerson(val) {
this.multipleSelectionPerson = val; this.multipleSelectionPerson = val;
//console.log(this.multipleSelectionPerson); //console.log(this.multipleSelectionPerson);
if (
val.length != 0 &&
val.length != this.formPerson.pageSize &&
this.updatedPerson == false
) {
this.updatedPerson = true;
console.log("人员被更新", this.updatedPerson);
}
if (this.updatedPerson == true) {
this.changedPerson[this.formPerson.pageNum] = [];
this.changedPerson[
this.formPerson.pageNum
][0] = this.multipleSelectionPerson;
let reverse = this.getDifference(
this.tablePerson,
this.multipleSelectionPerson
);
this.changedPerson[this.formPerson.pageNum][1] = reverse;
console.log("check人员:", this.changedPerson);
}
}, },
//设定机构table全选 //设定机构table全选
checkAll(flag, name) { checkAll(flag, name) {
...@@ -1305,7 +1346,8 @@ export default { ...@@ -1305,7 +1346,8 @@ export default {
getKind(type) { getKind(type) {
let kind = 0; let kind = 0;
if (type == "administrative") { if (type == "administrative") {
if (this.updatedTree) { //console.log('this.tagsRegion',this.tagsRegion);
if (this.tagsRegion.length > 0) {
kind = 3; kind = 3;
} }
} else if (type == "organization") { } else if (type == "organization") {
...@@ -1330,6 +1372,24 @@ export default { ...@@ -1330,6 +1372,24 @@ export default {
if (this.multipleSelectionDepartment.length > 0) { if (this.multipleSelectionDepartment.length > 0) {
kind = 3; kind = 3;
} }
} else if (type == "person") {
if (this.checkTableState.multiplePerson == true) {
//设置机构类别0:无 1:全选 2:去掉 3:选中
kind = 1;
for (let key in this.changedPerson) {
if (this.changedPerson[key][1].length > 0) {
kind = 2;
}
}
} else {
//全部不选
kind = 0;
for (let key in this.changedPerson) {
if (this.changedPerson[key][0].length > 0) {
kind = 3;
}
}
}
} }
return kind; return kind;
}, },
...@@ -1343,7 +1403,17 @@ export default { ...@@ -1343,7 +1403,17 @@ export default {
scope += "|"; scope += "|";
} }
} }
} else if (type == "administrativeUpdate") {
//console.log("allSelectedKeys", this.allSelectedKeys);
for (let i = 0; i < this.allSelectedKeys.length; i++) {
scope +=
this.allSelectedKeys[i].key + ":" + this.allSelectedKeys[i].type;
if (i < this.allSelectedKeys.length - 1) {
scope += "|";
}
}
} }
console.log(scope);
return scope; return scope;
}, },
//查询机构列表 //查询机构列表
...@@ -1456,6 +1526,29 @@ export default { ...@@ -1456,6 +1526,29 @@ export default {
console.log("scope", scope); console.log("scope", scope);
return scope; return scope;
}, },
//获取人员id列表
getScopePeople(type) {
let scope = "";
if (type == 2) {
for (let key in this.changedPerson) {
let peopleItem = this.changedPerson[key][1];
//console.log("peopleItem:", peopleItem);
for (let i = 0; i < peopleItem.length; i++) {
scope += peopleItem[i].id + "|";
}
}
} else if (type == 3) {
for (let key in this.changedPerson) {
let peopleItem = this.changedPerson[key][0];
for (let i = 0; i < peopleItem.length; i++) {
scope += peopleItem[i].id + "|";
}
}
}
scope = scope.substring(0, scope.length - 1);
console.log("scope people", scope);
return scope;
},
//获取科室列表 //获取科室列表
getScopeDepartment() { getScopeDepartment() {
let scope = ""; let scope = "";
...@@ -1475,8 +1568,8 @@ export default { ...@@ -1475,8 +1568,8 @@ export default {
//scopeOfOrganization: "2|3|4|5|6|7", //scopeOfOrganization: "2|3|4|5|6|7",
setKindOfDepartment: this.getKind("department"), setKindOfDepartment: this.getKind("department"),
//scopeOfDepartment: 54, //scopeOfDepartment: 54,
pageNum: this.formPersonnel.pageNum, pageNum: this.formPerson.pageNum,
pageSize: this.formPersonnel.pageSize pageSize: this.formPerson.pageSize
}; };
if (req.setKindOfAdministrative == 3) { if (req.setKindOfAdministrative == 3) {
req.scopeOfAdministrative = this.getScope("administrative"); req.scopeOfAdministrative = this.getScope("administrative");
...@@ -1489,11 +1582,60 @@ export default { ...@@ -1489,11 +1582,60 @@ export default {
if (req.setKindOfDepartment == 3) { if (req.setKindOfDepartment == 3) {
req.scopeOfDepartment = this.getScopeDepartment(); req.scopeOfDepartment = this.getScopeDepartment();
} }
openLoading(vm);
vm.GET("scope/v1/people", req).then(res => { vm.GET("scope/v1/people", req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
closeLoading(vm);
console.log(res); console.log(res);
this.tablePerson = res.data.people; this.tablePerson = res.data.people;
this.totalPerson = res.data.total; this.totalPerson = res.data.total;
if (this.checkTableState.multiplePerson == true) {
//全选
if (
this.updatedPerson == true &&
this.changedPerson[this.formPerson.pageNum] != undefined
) {
//机构table 勾选被更新过
let rowCheck = this.changedPerson[this.formPerson.pageNum][0];
//console.log("rowCheck:",rowCheck);
rowCheck.forEach(row => {
// console.log("row", row);
let rowItem = {};
for (let i = 0; i < this.tablePerson.length; i++) {
if (this.tablePerson[i].id == row.id) {
rowItem = this.tablePerson[i];
}
}
this.$nextTick(function() {
this.$refs.multiplePerson.toggleRowSelection(rowItem);
});
});
} else {
this.$refs.multiplePerson.toggleAllSelection();
}
} else {
//person 全不选
if (
this.updatedPerson == true &&
this.changedPerson[this.formPerson.pageNum] != undefined
) {
let rowCheck = this.changedPerson[this.formPerson.pageNum][0];
//console.log("rowCheck:",rowCheck);
rowCheck.forEach(row => {
// console.log("row", row);
let rowItem = {};
for (let i = 0; i < this.tablePerson.length; i++) {
if (this.tablePerson[i].id == row.id) {
rowItem = this.tablePerson[i];
}
}
this.$nextTick(function() {
this.$refs.multiplePerson.toggleRowSelection(rowItem);
});
});
}
}
} }
}); });
}, },
...@@ -1511,11 +1653,11 @@ export default { ...@@ -1511,11 +1653,11 @@ export default {
//角色table修改 //角色table修改
handleSizePerson(val) { handleSizePerson(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
this.formPersonnel.pageSize = val; this.formPerson.pageSize = val;
}, },
handleCurrentPerson(val) { handleCurrentPerson(val) {
console.log(`当前页: ${val}`); console.log(`当前页: ${val}`);
this.formPersonnel.pageNum = val; this.formPerson.pageNum = val;
this.getPeople(); this.getPeople();
}, },
//行政范围改变更新设定机构和设定人员 //行政范围改变更新设定机构和设定人员
......
...@@ -57,11 +57,6 @@ export default { ...@@ -57,11 +57,6 @@ export default {
icon: 'el-icon-setting', icon: 'el-icon-setting',
index: 'item-manager' index: 'item-manager'
}, },
{
title: '树',
icon: 'el-icon-setting',
index: 'tree'
}
] ]
},{ },{
title: '系统管理', title: '系统管理',
......
...@@ -58,7 +58,6 @@ ...@@ -58,7 +58,6 @@
</el-form> </el-form>
</el-row> </el-row>
<el-table <el-table
v-loading="loading"
:data="tableData" :data="tableData"
:header-cell-style="{background:'#FAFAFA',color:'#000'}" :header-cell-style="{background:'#FAFAFA',color:'#000'}"
> >
...@@ -133,6 +132,7 @@ ...@@ -133,6 +132,7 @@
<script> <script>
import BreadCrumb from "../../components/breadcrumb.vue"; import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain"; import { create } from "domain";
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null; let vm = null;
export default { export default {
components: { components: {
...@@ -203,7 +203,6 @@ export default { ...@@ -203,7 +203,6 @@ export default {
methods: { methods: {
//查询用户列表 //查询用户列表
queryRoleList() { queryRoleList() {
this.loading = true;
this.formInline.portalProjectId = vm.getUrlSearch( this.formInline.portalProjectId = vm.getUrlSearch(
window.location.href, window.location.href,
"portalProjectId" "portalProjectId"
...@@ -213,11 +212,12 @@ export default { ...@@ -213,11 +212,12 @@ export default {
} }
let req = {}; let req = {};
req = this.formInline; req = this.formInline;
openLoading(vm);
vm.GET("portalProjectOrRole/queryRoleList", req).then(res => { vm.GET("portalProjectOrRole/queryRoleList", req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
closeLoading(vm);
vm.tableData = res.data.projectRoleInfoModels; vm.tableData = res.data.projectRoleInfoModels;
vm.totalRows = res.data.total; vm.totalRows = res.data.total;
this.loading = false;
//this.roleList = setRoleList(res.data.roleList); //this.roleList = setRoleList(res.data.roleList);
this.organizationList = res.data.organizationList; this.organizationList = res.data.organizationList;
......
...@@ -29,7 +29,6 @@ ...@@ -29,7 +29,6 @@
</el-form> </el-form>
</el-row> </el-row>
<el-table <el-table
v-loading="loading"
:data="tableData" :data="tableData"
:header-cell-style="{background:'#FAFAFA',color:'#000'}" :header-cell-style="{background:'#FAFAFA',color:'#000'}"
> >
...@@ -68,6 +67,7 @@ ...@@ -68,6 +67,7 @@
<script> <script>
import BreadCrumb from "../../components/breadcrumb.vue"; import BreadCrumb from "../../components/breadcrumb.vue";
import { create } from "domain"; import { create } from "domain";
import { openLoading, closeLoading } from "../../utils/utils";
let vm = null; let vm = null;
export default { export default {
components: { components: {
...@@ -125,11 +125,12 @@ export default { ...@@ -125,11 +125,12 @@ export default {
let req = {}; let req = {};
console.log(this.formInline); console.log(this.formInline);
req = this.setParam(this.formInline); req = this.setParam(this.formInline);
openLoading(vm);
vm.GET("portalInfo/getProjectList", req).then(res => { vm.GET("portalInfo/getProjectList", req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
closeLoading(vm);
vm.tableData = res.data.data; vm.tableData = res.data.data;
vm.totalRows = res.data.totalRows; vm.totalRows = res.data.totalRows;
this.loading = false;
} }
}); });
}, },
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册