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

切换tab状态

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