提交 23375f4d 编写于 作者: zhentian.jia's avatar zhentian.jia

fix 3:30

上级 251e03af
...@@ -28,8 +28,13 @@ export function getIntersect(a, b) { ...@@ -28,8 +28,13 @@ export function getIntersect(a, b) {
//获取id的list //获取id的list
export function getIdList(data) { export function getIdList(data) {
let list = []; let list = [];
for (let i = 0; i < data.length; i++) { if(typeof data === 'undefined') {
list.push(data[i].id); return list;
}
if (data.constructor === Array) {
for (let i = 0; i < data.length; i++) {
list.push(data[i].id);
}
} }
return list; return list;
} }
......
...@@ -96,13 +96,13 @@ ...@@ -96,13 +96,13 @@
:before-upload="beforeUploadListPic" :before-upload="beforeUploadListPic"
:disabled="peopleLevel == 'L3'" :disabled="peopleLevel == 'L3'"
> >
<img v-if="formData.attachmentUrl1" :src="formData.attachmentUrl1" class="bg-img"> <img v-if="formData.attachmentUrl1" @mouseover.stop="imgMouseOver=true" :src="formData.attachmentUrl1" class="bg-img">
<img <img
v-if="!formData.attachmentUrl1" v-if="!formData.attachmentUrl1"
class="bg-img" class="bg-img"
src="../../assets/image/small.png" src="../../assets/image/small.png"
> >
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> --> <div class="img-delete" v-show="imgMouseOver" @click.stop="deleteImg(1)" @mouseout.stop="imgMouseOver=false"><i class="el-icon-delete"></i></div>
<div class="limit-text"> <div class="limit-text">
<p>尺寸:115*86</p> <p>尺寸:115*86</p>
<p>限制大小: 500Kb</p> <p>限制大小: 500Kb</p>
...@@ -137,6 +137,7 @@ ...@@ -137,6 +137,7 @@
<img <img
v-if="formData.type == 1 && formData.attachmentUrl2" v-if="formData.type == 1 && formData.attachmentUrl2"
:src="formData.attachmentUrl2" :src="formData.attachmentUrl2"
@mouseover.stop="imgMouseOver2=true"
class="bg-img" class="bg-img"
> >
<video <video
...@@ -152,7 +153,7 @@ ...@@ -152,7 +153,7 @@
class="bg-img" class="bg-img"
src="../../assets/image/small.png" src="../../assets/image/small.png"
> >
<!-- <i v-else class="el-icon-plus avatar-uploader-icon"></i> --> <div class="img-delete" v-show="imgMouseOver2" @click.stop="deleteImg(2)" @mouseout.stop="imgMouseOver2=false"><i class="el-icon-delete"></i></div>
<div v-show="formData.type == 1" class="limit-text"> <div v-show="formData.type == 1" class="limit-text">
<p>尺寸:375*210</p> <p>尺寸:375*210</p>
<p>限制大小: 2.0 Mb</p> <p>限制大小: 2.0 Mb</p>
...@@ -529,27 +530,27 @@ export default { ...@@ -529,27 +530,27 @@ export default {
BreadCrumb BreadCrumb
}, },
data() { data() {
const itemOrganization = { // const itemOrganization = {
name: "上海市第一人民医院", // name: "上海市第一人民医院",
grade: "二甲医院", // grade: "二甲医院",
province: "上海市", // province: "上海市",
city: "上海市", // city: "上海市",
district: "浦东新区", // district: "浦东新区",
street: "张江街道" // street: "张江街道"
}; // };
const itemPerson = { // const itemPerson = {
name: "云小鹊", // name: "云小鹊",
hospital: "上海市第一人民医院", // hospital: "上海市第一人民医院",
department: "全科", // department: "全科",
province: "上海市", // province: "上海市",
city: "上海市", // city: "上海市",
district: "长宁区" // district: "长宁区"
}; // };
return { return {
idTypeValue: 1, idTypeValue: 1,
idTypeProject: '', idTypeProject: '',
itemOrganization: itemOrganization, // itemOrganization: itemOrganization,
itemPerson: itemPerson, // itemPerson: itemPerson,
projectId: null, projectId: null,
peopleLevel: null, peopleLevel: null,
//面包屑 //面包屑
...@@ -562,6 +563,8 @@ export default { ...@@ -562,6 +563,8 @@ export default {
//基层信息 数据 //基层信息 数据
uploadImgMessage: false, uploadImgMessage: false,
uploadImgMessage2: false, uploadImgMessage2: false,
imgMouseOver: false,
imgMouseOver2: false,
imageUrl: "", imageUrl: "",
formData: { formData: {
projectName: "", projectName: "",
...@@ -778,6 +781,7 @@ export default { ...@@ -778,6 +781,7 @@ export default {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
}, },
methods: { methods: {
//表单校验 //表单校验
submitForm(formName) { submitForm(formName) {
let flag = null; let flag = null;
...@@ -796,6 +800,16 @@ export default { ...@@ -796,6 +800,16 @@ export default {
resetForm(formName) { resetForm(formName) {
this.$refs[formName].resetFields(); this.$refs[formName].resetFields();
}, },
// 删除图片
deleteImg(type) {
if(type == 1) {
vm.formData.attachmentUrl1 = '';
vm.imgMouseOver = false;
} else {
vm.formData.attachmentUrl2 = '';
vm.imgMouseOver2 = false;
}
},
//改变封面类型 //改变封面类型
changeCover(radio) { changeCover(radio) {
this.formData.attachmentUrl2 = ""; this.formData.attachmentUrl2 = "";
...@@ -1484,6 +1498,9 @@ export default { ...@@ -1484,6 +1498,9 @@ export default {
let tabName = tab.name; let tabName = tab.name;
if (tabName == "second") { if (tabName == "second") {
//设定机构 //设定机构
this.formOrganization.name ="";
this.formOrganization.administrativeIdList = ['0'];
this.formOrganization.level ="0";
this.getCheckedTree(); this.getCheckedTree();
this.getOrganization(); this.getOrganization();
// this.listLevels(); // this.listLevels();
...@@ -1495,6 +1512,9 @@ export default { ...@@ -1495,6 +1512,9 @@ export default {
// } // }
} else if (tabName == "fourth") { } else if (tabName == "fourth") {
//设定人员 //设定人员
this.formPerson.name ="";
this.formPerson.departmentId = -1;
this.formPerson.hospitalId = 0;
this.getHospital(); this.getHospital();
this.departmentList = this.getDepartmentList(); this.departmentList = this.getDepartmentList();
//console.log('departmentList',this.departmentList); //console.log('departmentList',this.departmentList);
...@@ -1719,6 +1739,11 @@ export default { ...@@ -1719,6 +1739,11 @@ export default {
if (res.code == "000000") { if (res.code == "000000") {
// console.log(res); // console.log(res);
this.organizationRank = operationData.getLevelList(res.data.list); this.organizationRank = operationData.getLevelList(res.data.list);
} else {
this.organizationRank = [{
id: '0',
label: '全部医院等级',
}];
} }
}); });
}, },
...@@ -1989,6 +2014,32 @@ export default { ...@@ -1989,6 +2014,32 @@ export default {
this.getOrganizationChoose(); this.getOrganizationChoose();
} }
}, },
//初始化搜索人员状态
initOrganizationChoose() {
let tableStatus = this.tableOrganization;
if(typeof tableStatus === 'undefined') {
return;
}
tableStatus.forEach(row => {
let idList = [];
idList[0] = row.id;
let intersect = operationData.getIntersect(idList,this.changedOrganization);
let intersect2 = operationData.getIntersect(idList,this.changedOrganization2);
debugger;
if(intersect.length > 0) {
//选中
this.$refs.multipleOrganization.toggleRowSelection(row);
} else if (intersect2.length > 0) {
//不选
} else {
if (row.status == 1) {
this.$nextTick(function() {
this.$refs.multipleOrganization.toggleRowSelection(row);
});
}
}
});
},
//机构搜索 //机构搜索
getOrganizationChoose() { getOrganizationChoose() {
// console.log('formOrganization',this.formOrganization); // console.log('formOrganization',this.formOrganization);
...@@ -2032,10 +2083,7 @@ export default { ...@@ -2032,10 +2083,7 @@ export default {
); );
//console.log('全部看过的:',this.lookedOrganization); //console.log('全部看过的:',this.lookedOrganization);
if (vm.checkTableState.multipleOrganization === "") { if (vm.checkTableState.multipleOrganization === "") {
if (intersect.length == 0) { this.initOrganizationChoose();
this.initOrganizationStatus();
}
} else if (vm.checkTableState.multipleOrganization === true) { } else if (vm.checkTableState.multipleOrganization === true) {
let intersect2 = operationData.getIntersect( let intersect2 = operationData.getIntersect(
idList, idList,
...@@ -2208,16 +2256,6 @@ export default { ...@@ -2208,16 +2256,6 @@ export default {
} }
}) })
}, },
initPeopleStatus() {
let tableStatus = this.tablePerson;
tableStatus.forEach(row => {
if (row.status == 1) {
this.$nextTick(function() {
this.$refs.multiplePerson.toggleRowSelection(row);
});
}
});
},
//选择搜索机构方式 //选择搜索机构方式
searchPeople() { searchPeople() {
this.formPerson.pageNum = 1; this.formPerson.pageNum = 1;
...@@ -2234,6 +2272,32 @@ export default { ...@@ -2234,6 +2272,32 @@ export default {
this.getPeopleChoose(); this.getPeopleChoose();
} }
}, },
//初始化搜索人员状态
initPeopleChoose() {
let tableStatus = this.tablePerson;
if(typeof tableStatus === 'undefined') {
return;
}
tableStatus.forEach(row => {
let idList = [];
idList[0] = row.id;
let intersect = operationData.getIntersect(idList,this.changedPerson);
let intersect2 = operationData.getIntersect(idList,this.changedPerson2);
// debugger;
if(intersect.length > 0) {
//选中
this.$refs.multiplePerson.toggleRowSelection(row);
} else if (intersect2.length > 0) {
//不选
} else {
if (row.status == 1) {
this.$nextTick(function() {
this.$refs.multiplePerson.toggleRowSelection(row);
});
}
}
});
},
//人员搜索 //人员搜索
getPeopleChoose() { getPeopleChoose() {
// console.log('formOrganization',this.formOrganization); // console.log('formOrganization',this.formOrganization);
...@@ -2285,21 +2349,26 @@ export default { ...@@ -2285,21 +2349,26 @@ export default {
); );
//console.log('全部看过的:',this.lookedPerson); //console.log('全部看过的:',this.lookedPerson);
if (vm.checkTableState.multiplePerson === "") { if (vm.checkTableState.multiplePerson === "") {
if (intersect.length == 0) { this.initPeopleChoose();
this.initPeopleStatus();
}
debugger;
} else if (vm.checkTableState.multiplePerson === true) { } else if (vm.checkTableState.multiplePerson === true) {
let intersect2 = operationData.getIntersect( let intersect2 = operationData.getIntersect(
idList, idList,
this.changedPerson this.changedPerson
); );
// console.log('intersect2',intersect2);
if (intersect2.length == 0) { if (intersect2.length == 0) {
this.$refs.multiplePerson.toggleAllSelection(); this.$refs.multiplePerson.toggleAllSelection();
} }
} }
}
});
},
initPeopleStatus() {
let tableStatus = this.tablePerson;
tableStatus.forEach(row => {
if (row.status == 1) {
this.$nextTick(function() {
this.$refs.multiplePerson.toggleRowSelection(row);
});
} }
}); });
}, },
...@@ -2463,8 +2532,7 @@ export default { ...@@ -2463,8 +2532,7 @@ export default {
//console.log('this.tagsComponent',this.tagsComponent); //console.log('this.tagsComponent',this.tagsComponent);
}, },
initTags(value) { initTags(value) {
console.log('value',value,'optionsComponent',this.optionsComponent); //console.log('value',value,'optionsComponent',this.optionsComponent);
//debugger;
this.tagsComponent = []; this.tagsComponent = [];
let len = 0; let len = 0;
for (let i = 0; i < value.length; i++) { for (let i = 0; i < value.length; i++) {
......
...@@ -85,8 +85,8 @@ ...@@ -85,8 +85,8 @@
min-width="100" min-width="100"
show-overflow-tooltip show-overflow-tooltip
></el-table-column> ></el-table-column>
<el-table-column prop="projectBegintime" label="项目开始时间" align="center"></el-table-column> <el-table-column prop="projectBegintime" label="项目开始时间" min-width="90" align="center"></el-table-column>
<el-table-column prop="projectEndtime" label="项目结束时间" align="center"></el-table-column> <el-table-column prop="projectEndtime" label="项目结束时间" min-width="90" align="center"></el-table-column>
<el-table-column prop="projectStatus" label="状态" align="center"> <el-table-column prop="projectStatus" label="状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<span>{{ [scope.row.projectStatus , idType] | statusProject }}</span> <span>{{ [scope.row.projectStatus , idType] | statusProject }}</span>
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册