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

对接api

上级 ec25080c
......@@ -654,4 +654,16 @@ export function setSelectedKeys(checkedKeys, halfCheckedKeys) {
selected.push(obj);
}
return selected;
}
export function setDuringTime(time , type) {
let value = time;
if(time == '' || time == null) {
return '';
}
if(type == 'begin') {
value = time[0];
} else if(type == 'end') {
value = time[1];
}
return value;
}
\ No newline at end of file
......@@ -155,7 +155,7 @@ export default {
type: operationData.getSearchType(vm.formInline,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("3 req", req);
// console.log("3 req", req);
openLoading(vm);
vm.reportGET("report/portalProjectCourse/getTotal", req).then(res => {
closeLoading(vm);
......
......@@ -109,7 +109,7 @@ export default {
type: vm.radio,
originalFlag: vm.formInline.checked == false ? 0 : 1
};
console.log("2 req", req);
// console.log("2 req", req);
openLoading(vm);
vm.reportGET("report/portal/getPeoplesDetails", req).then(res => {
closeLoading(vm);
......
......@@ -199,8 +199,8 @@ export default {
pageNo: 1,
pageSize: 10,
},
checkRange: 2,
checkTime: 2,
checkRange: 1,
checkTime: 1,
};
},
created() {
......@@ -222,8 +222,33 @@ export default {
vm.setTable();
}
},
mounted: function() {},
mounted: function() {
this.$on("search", () => {
vm.checkRange = 1;
vm.checkTime = 1,
this.search();
});
},
methods: {
search() {
let req = {
projectId: vm.projectId,
beginDate: operationData.setDuringTime(vm.formInline.during,'begin'),
endDate: operationData.setDuringTime(vm.formInline.during,'end'),
hospitalIdList: vm.formInline.organization,
originalFlag: vm.formInline.checked == false ? 0 : 1,
regionId: vm.formInline.region[vm.formInline.region.length - 1],
timeFlag: vm.formInline.timeFlag,
};
openLoading(vm);
// console.log("0 req", req);
vm.POST("stats/report/general", req).then(res => {
closeLoading(vm);
if (res.code == "000000") {
}
});
},
initCard() {
let cardData = [
{
......
......@@ -67,6 +67,7 @@
<el-date-picker
size="small"
v-model="formInline.during"
value-format="yyyy-MM-dd"
type="daterange"
range-separator="~"
start-placeholder="开始日期"
......@@ -134,15 +135,6 @@
:organizationList="organizationList"
></examination-analysisfrom>
</el-tab-pane>
<!-- <el-tab-pane label="数据总览" name="zero" >
<data-all
ref="childDataAll"
:formInline="formInline"
:activeName="activeName"
:organizationNum="organizationNum"
:organizationList="organizationList"
></data-all>
</el-tab-pane> -->
<el-tab-pane label="学习效果分析" name="fifth" >
<learning-effect ref="childEffect"></learning-effect>
</el-tab-pane>
......@@ -235,7 +227,7 @@ export default {
organization: [],
checked: false,
timeFlag: 1,
during: '',
during: null,
pageNo: 1,
pageSize: 20,
},
......@@ -472,6 +464,7 @@ export default {
},
search() {
// console.log(vm.formInline.during);
this.$refs.childDataAll.$emit("search");
this.$refs.childCrowd.$emit("search");
this.$refs.childCourse.$emit("search");
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册