提交 1fc22a6a 编写于 作者: zhentian.jia's avatar zhentian.jia

切换tab状态

上级 726bc639
...@@ -529,4 +529,12 @@ export function getDoctorIdList(data) { ...@@ -529,4 +529,12 @@ export function getDoctorIdList(data) {
} }
} }
return list; return list;
}
export function getAjustmentList(data) {
let idList = "";
for (let i = 0; i < data.length; i++) {
idList += data[i] + ',';
}
idList = idList.substring(0, idList.length - 1);
return idList;
} }
\ No newline at end of file
...@@ -222,9 +222,6 @@ export default { ...@@ -222,9 +222,6 @@ export default {
this.changedDoctor2 this.changedDoctor2
); );
}, },
handleClick(row) {
console.log(row);
},
// 更改数据显示数量 // 更改数据显示数量
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
...@@ -258,7 +255,7 @@ export default { ...@@ -258,7 +255,7 @@ export default {
let idList = operationData.getDoctorIdList(vm.tableData); let idList = operationData.getDoctorIdList(vm.tableData);
// console.log('idList',idList); // console.log('idList',idList);
vm.idList = operationData.getUnion( vm.lookedDoctor = operationData.getUnion(
vm.lookedDoctor, vm.lookedDoctor,
idList idList
); );
...@@ -305,7 +302,21 @@ export default { ...@@ -305,7 +302,21 @@ export default {
saveUpdate() { saveUpdate() {
this.dialogVisible = true; this.dialogVisible = true;
}, },
updateData() {} updateData() {
let req = {
projectId: vm.projectId,
removeDoctorIdList: operationData.getAjustmentList(vm.changedDoctor2),
joinDoctorIdList: operationData.getAjustmentList(vm.changedDoctor),
};
openLoading(vm);
vm.POST("report/portal/peopleAdjustment", req).then(res => {
closeLoading(vm);
vm.$message(res.message);
if (res.code == "000000") {
}
});
this.dialogVisible = false;
}
} }
}; };
</script> </script>
......
...@@ -97,13 +97,19 @@ export default { ...@@ -97,13 +97,19 @@ export default {
created() { created() {
vm = this; vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id"); this.projectId = vm.getUrlSearch(window.location.href, "id");
// this.search();
}, },
mounted: function() { mounted: function() {
this.$on('search',()=>{ this.$on('search',()=>{
console.log(this.formInline); // console.log(this.formInline);
this.search(); this.search();
}) });
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
}, },
methods: { methods: {
setCardData(data) { setCardData(data) {
...@@ -111,30 +117,12 @@ export default { ...@@ -111,30 +117,12 @@ export default {
vm.cardData[0].num = data.projectCourseCount; vm.cardData[0].num = data.projectCourseCount;
vm.cardData[1].num = data.projectCourseTotalTime; vm.cardData[1].num = data.projectCourseTotalTime;
vm.cardData[2].num = data.projectAvgStudyTime; vm.cardData[2].num = data.projectAvgStudyTime;
// vm.cardData = [
// {
// title: '项目所有课程数',
// num: data.projectCourseCount,
// unit: '门课程',
// },{
// title: '项目所有课程总时长',
// num: data.projectCourseTotalTime,
// unit: '分钟',
// },{
// title: '项目人均学习时长',
// num: data.projectAvgStudyTime,
// unit: '分钟',
// }
// ];
}, },
search() { search() {
if (vm.formInline.region.length == 0) { if (vm.formInline.region.length == 0) {
vm.$message("请选择地区"); vm.$message("请选择地区");
return; return;
} }
let checkAll = operationData.hasAll(vm.formInline.organization) let checkAll = operationData.hasAll(vm.formInline.organization)
let req = { let req = {
projectId: vm.projectId, projectId: vm.projectId,
......
...@@ -54,7 +54,6 @@ export default { ...@@ -54,7 +54,6 @@ export default {
data() { data() {
return { return {
radio: 1, radio: 1,
updateCrowd: false,
sexData: [], sexData: [],
projectId: "", projectId: "",
crowdData: {} crowdData: {}
...@@ -63,20 +62,18 @@ export default { ...@@ -63,20 +62,18 @@ export default {
created() { created() {
vm = this; vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id"); this.projectId = vm.getUrlSearch(window.location.href, "id");
this.$nextTick(function() {
this.search();
});
}, },
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
//父组件传值 //父组件传值
this.$on("search", () => { this.$on("search", () => {
this.updateCrowd = true;
this.search(); this.search();
}); });
this.$on("init", () => { this.$on("init", () => {
this.$nextTick(function() { this.$nextTick(function() {
this.search(); if (vm.formInline.region.length != 0) {
this.search();
}
}); });
}); });
if (this.activeName == "second") { if (this.activeName == "second") {
...@@ -85,7 +82,8 @@ export default { ...@@ -85,7 +82,8 @@ export default {
}, },
methods: { methods: {
search() { search() {
if (this.activeName != "second") { if (vm.formInline.region.length == 0) {
vm.$message("请选择地区");
return; return;
} }
let checkAll = operationData.hasAll(vm.formInline.organization); let checkAll = operationData.hasAll(vm.formInline.organization);
......
...@@ -95,14 +95,20 @@ export default { ...@@ -95,14 +95,20 @@ export default {
created() { created() {
vm = this; vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id"); this.projectId = vm.getUrlSearch(window.location.href, "id");
// vm.search();
}, },
// 挂载到Dom完成时 // 挂载到Dom完成时
mounted: function() { mounted: function() {
this.$on('search',()=>{ this.$on('search',()=>{
console.log(this.formInline); console.log(this.formInline);
this.search(); this.search();
}) });
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
}, },
methods: { methods: {
setCardData(data) { setCardData(data) {
......
...@@ -234,12 +234,13 @@ export default { ...@@ -234,12 +234,13 @@ export default {
//console.log(tab, event); //console.log(tab, event);
console.log("activeName", this.activeName); console.log("activeName", this.activeName);
if (tab.name == "first") { if (tab.name == "first") {
this.$refs.childPart.$emit("init");
} else if (tab.name == "second") { } else if (tab.name == "second") {
this.$refs.childCrowd.$emit("init"); this.$refs.childCrowd.$emit("init");
} else if (tab.name == "third") { } else if (tab.name == "third") {
this.$refs.childCourse.$emit("search"); this.$refs.childCourse.$emit("init");
} else if (tab.name == "fourth") { } else if (tab.name == "fourth") {
this.$refs.childExam.$emit("search"); this.$refs.childExam.$emit("init");
} }
}, },
handleChange(value) { handleChange(value) {
......
...@@ -103,16 +103,19 @@ export default { ...@@ -103,16 +103,19 @@ export default {
created() { created() {
vm = this; vm = this;
this.projectId = vm.getUrlSearch(window.location.href, "id"); this.projectId = vm.getUrlSearch(window.location.href, "id");
// this.$nextTick(function() {
// this.search();
// });
}, },
mounted: function() { mounted: function() {
commonUtil.resizeHeight(); commonUtil.resizeHeight();
this.$on("search", () => { this.$on("search", () => {
// console.log(this.formInline, this.organizationNum);
this.search(); this.search();
}); });
this.$on("init", () => {
this.$nextTick(function() {
if (vm.formInline.region.length != 0) {
this.search();
}
});
});
// if (this.activeName == "first") { // if (this.activeName == "first") {
// this.updateResize(); // this.updateResize();
// } // }
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册