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

card组件使用时候的问题

上级 20ba6fdd
...@@ -312,6 +312,7 @@ export function setRegionOptionNew(data) { ...@@ -312,6 +312,7 @@ export function setRegionOptionNew(data) {
obj.label = data[i].label; obj.label = data[i].label;
obj.value = data[i].id; obj.value = data[i].id;
if(obj.degree == 4 || obj.degree == 0 || obj.label == "全部") { if(obj.degree == 4 || obj.degree == 0 || obj.label == "全部") {
// if(obj.degree == 4 ) {
obj.leaf = true; obj.leaf = true;
} }
option.push(obj); option.push(obj);
......
...@@ -102,7 +102,7 @@ ...@@ -102,7 +102,7 @@
@size-change="handleSizeChange" @size-change="handleSizeChange"
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="formData.pageNo" :current-page="formData.pageNo"
:page-sizes="[20, 50 ,100]" :page-sizes="[20, 50 ,100, 200]"
:page-size="formData.pageSize" :page-size="formData.pageSize"
layout="total, sizes, prev, pager, next, jumper" layout="total, sizes, prev, pager, next, jumper"
:total="totalRows" :total="totalRows"
...@@ -239,6 +239,7 @@ export default { ...@@ -239,6 +239,7 @@ export default {
handleSizeChange(val) { handleSizeChange(val) {
console.log(`每页 ${val} 条`); console.log(`每页 ${val} 条`);
vm.formData.pageSize = val; vm.formData.pageSize = val;
vm.formData.pageNo = 1;
vm.search(); vm.search();
}, },
// 换页 // 换页
...@@ -261,15 +262,18 @@ export default { ...@@ -261,15 +262,18 @@ export default {
let checkAll = operationData.hasAll(vm.formInline.organization); let checkAll = operationData.hasAll(vm.formInline.organization);
let req = { let req = {
projectId: vm.projectId, projectId: vm.projectId,
hospitalIdList: vm.formInline.organization,
originalFlag: vm.formInline.checked == false ? 0 : 1,
regionId: vm.formInline.region[vm.formInline.region.length - 1],
timeFlag: vm.formInline.timeFlag,
achievementStatus: vm.formData.achievementStatus, achievementStatus: vm.formData.achievementStatus,
status: vm.formData.status, status: vm.formData.status,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline,checkAll),
doctorName: vm.formData.doctorName, doctorName: vm.formData.doctorName,
pageNo: vm.formData.pageNo, pageNo: vm.formData.pageNo,
pageSize: vm.formData.pageSize, pageSize: vm.formData.pageSize,
}; };
vm.reportGET("report/portal/getProjectData", req).then(res => { vm.POST("stats/report/getProjectData", req).then(res => {
// closeLoading(vm); // closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
vm.tableData = res.data.projectData; vm.tableData = res.data.projectData;
...@@ -339,7 +343,7 @@ export default { ...@@ -339,7 +343,7 @@ export default {
joinDoctorIdList: operationData.getAjustmentList(vm.changedDoctor), joinDoctorIdList: operationData.getAjustmentList(vm.changedDoctor),
}; };
openLoading(vm); openLoading(vm);
vm.reportPOST("report/portal/peopleAdjustment", req).then(res => { vm.POST("stats/report/peopleAdjustment", req).then(res => {
closeLoading(vm); closeLoading(vm);
vm.$message(res.message); vm.$message(res.message);
if (res.code == "000000") { if (res.code == "000000") {
......
<template> <template>
<div class="course-analysis-wrap"> <div class="course-analysis-wrap">
<div class="box-list"> <div class="box-list">
<div v-for="(item , index) in cardData" :key="index" class="box"> <div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }">
<el-card class="box-card" v-bind:class="{ 'box-last': index == 2 }"> <!-- <el-card class="box-card" v-bind:class="{ 'box-last': index == 2 }"> -->
<!-- <div class="box-center"> -->
<p class="value">{{ item.value }}</p> <p class="value">{{ item.value }}</p>
<p class="title">{{ item.title }}</p> <p class="title">{{ item.title }}</p>
<!-- </div> --> <!-- </el-card> -->
</el-card>
</div> </div>
</div> </div>
<div class="spacing"></div> <div class="spacing"></div>
......
...@@ -224,7 +224,7 @@ export default { ...@@ -224,7 +224,7 @@ export default {
vm.sexData = sexData; vm.sexData = sexData;
}, },
educationDivision(data) { educationDivision(data) {
console.log('this.$refs.education',this.$refs.education) // console.log('this.$refs.education',this.$refs.education)
let myChart = echarts.init(this.$refs.education); let myChart = echarts.init(this.$refs.education);
let educationList = this.crowdData.eduList; let educationList = this.crowdData.eduList;
let legendData = []; let legendData = [];
......
...@@ -2,8 +2,8 @@ ...@@ -2,8 +2,8 @@
<div class="data-all-wrap"> <div class="data-all-wrap">
<div v-if="dataType == 0" class="data-chart"> <div v-if="dataType == 0" class="data-chart">
<div class="box-list"> <div class="box-list">
<div v-for="(item , index) in cardData" :key="index" class="box"> <!-- <div v-for="(item , index) in cardData" :key="index" class="box"> -->
<el-card class="box-card" v-bind:class="{ 'box-last': index == 2 }"> <div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }">
<el-tooltip v-if="index == 2" class="item-tool" placement="bottom-end" effect="light"> <el-tooltip v-if="index == 2" class="item-tool" placement="bottom-end" effect="light">
<div slot="content"> <div slot="content">
<p v-for="text in item.content">{{ text }}</p> <p v-for="text in item.content">{{ text }}</p>
...@@ -19,9 +19,8 @@ ...@@ -19,9 +19,8 @@
<p class="has">{{ item.hasKey }}:{{ item.hasNum }}</p> <p class="has">{{ item.hasKey }}:{{ item.hasNum }}</p>
<p class="should">{{ item.shouldKey }}:{{ item.shouldNum }}</p> <p class="should">{{ item.shouldKey }}:{{ item.shouldNum }}</p>
</div> </div>
</el-card> </div>
<!-- <div v-if="index+1 !== cardData.length" class="line"></div> --> <!-- </div> -->
</div>
</div> </div>
<div class="date-table"> <div class="date-table">
<el-tabs class="change-range" v-model="checkRange" type="card" @tab-click="handleCheckRange"> <el-tabs class="change-range" v-model="checkRange" type="card" @tab-click="handleCheckRange">
...@@ -99,9 +98,9 @@ ...@@ -99,9 +98,9 @@
</div> </div>
<div v-if="dataType == 1" class="data-table"> <div v-if="dataType == 1" class="data-table">
<div class="box-list"> <div class="box-list">
<div v-for="(item , index) in cardData" :key="index" class="box"> <div v-for="(item , index) in cardData" :key="index" class="box-card box-card2" v-bind:class="{ 'box-last': index == 1 }">
<el-card class="box-card box-card2" v-bind:class="{ 'box-last': index == 1 }"> <!-- <el-card class="box-card box-card2" v-bind:class="{ 'box-last': index == 1 }"> -->
<el-tooltip class="item-tool" placement="bottom-end" effect="light"> <el-tooltip v-if="index == 1" class="item-tool" placement="bottom-end" effect="light">
<div slot="content"> <div slot="content">
<p v-for="text in item.content">{{ text }}</p> <p v-for="text in item.content">{{ text }}</p>
</div> </div>
...@@ -116,7 +115,7 @@ ...@@ -116,7 +115,7 @@
<p class="has">{{ item.hasKey }}:{{ item.hasNum }}</p> <p class="has">{{ item.hasKey }}:{{ item.hasNum }}</p>
<p class="should">{{ item.shouldKey }}:{{ item.shouldNum }}</p> <p class="should">{{ item.shouldKey }}:{{ item.shouldNum }}</p>
</div> </div>
</el-card> <!-- </el-card> -->
</div> </div>
</div> </div>
<div class="date-table"> <div class="date-table">
...@@ -301,7 +300,7 @@ export default { ...@@ -301,7 +300,7 @@ export default {
vm.GET("stats/region/hospitals/cnt", req).then(res => { vm.GET("stats/region/hospitals/cnt", req).then(res => {
if (res.code == "000000") { if (res.code == "000000") {
vm.hospitalCnt = res.data.hospitalCnt; vm.hospitalCnt = res.data.hospitalCnt;
vm.hospitalCnt = 1; // vm.hospitalCnt = 1;
if(vm.hospitalCnt == 1) { if(vm.hospitalCnt == 1) {
vm.hospitalId[0] = res.data.list[0].hospitalId; vm.hospitalId[0] = res.data.list[0].hospitalId;
} }
...@@ -721,6 +720,9 @@ export default { ...@@ -721,6 +720,9 @@ export default {
position: relative; position: relative;
padding: 30px 30px 0 30px; padding: 30px 30px 0 30px;
height: 136px; height: 136px;
// .box {
// height: 106px;
// }
.box-card { .box-card {
position: relative; position: relative;
background-color: #e3efed; background-color: #e3efed;
......
<template> <template>
<div class="examination-analysis"> <div class="examination-analysis">
<div class="box-list"> <div class="box-list">
<div v-for="(item , index) in cardData" :key="index" class="box"> <div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 2 }">
<el-card class="box-card" v-bind:class="{ 'box-last': index == 2 }"> <!-- <el-card class="box-card" v-bind:class="{ 'box-last': index == 2 }"> -->
<!-- <div class="box-center"> -->
<p class="value">{{ item.value }}</p> <p class="value">{{ item.value }}</p>
<p class="title">{{ item.title }}</p> <p class="title">{{ item.title }}</p>
<!-- </div> --> <!-- </el-card> -->
</el-card>
</div> </div>
</div> </div>
<div class="spacing"></div> <div class="spacing"></div>
......
<template> <template>
<div class="learning-effect"> <div class="learning-effect">
<div class="box-list"> <div class="box-list">
<div v-for="(item , index) in cardData" :key="index" class="box"> <div v-for="(item , index) in cardData" :key="index" class="box-card" v-bind:class="{ 'box-last': index == 1 }">
<el-card class="box-card" v-bind:class="{ 'box-last': index == 1 }"> <!-- <el-card class="box-card" v-bind:class="{ 'box-last': index == 1 }"> -->
<!-- <div class="left-content"> --> <p class="value">{{ item.value }}</p>
<p class="value">{{ item.value }}</p> <p class="title">{{ item.title }}</p>
<p class="title">{{ item.title }}</p> <!-- </el-card> -->
<!-- </div> -->
</el-card>
</div> </div>
</div> </div>
<div class="spacing"></div> <div class="spacing"></div>
......
...@@ -149,10 +149,10 @@ ...@@ -149,10 +149,10 @@
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
<el-dialog title="提示" :visible.sync="dialogVisible" width="30%" center> <el-dialog title="提示" :visible.sync="dialogVisible" width="30%" center>
<p style="text-align:center">文件正在生成,你可以去“我的导出下载”页,下载文件</p> <p style="text-align:center">由于查询数据较大,预估需要花费 5 小时左右。确定继续生成报告吗?</p>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="dialogVisible = false">留在当前页</el-button> <el-button @click="dialogVisible = false">取消</el-button>
<el-button type="primary" @click="toDownload()">去下载</el-button> <el-button type="primary" @click="exportHttp()">继续生成</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title :visible.sync="dialogUpdate" width="80%" center> <el-dialog title :visible.sync="dialogUpdate" width="80%" center>
...@@ -248,7 +248,7 @@ export default { ...@@ -248,7 +248,7 @@ export default {
// organizationData: "", // organizationData: "",
}, },
tags: [], tags: [],
activeName: "second", activeName: "zero",
organizationNum: 0, organizationNum: 0,
dialogVisible: false, dialogVisible: false,
dialogUpdate: false, dialogUpdate: false,
...@@ -430,10 +430,11 @@ export default { ...@@ -430,10 +430,11 @@ export default {
vm.GET("stats/region", req).then(res => { vm.GET("stats/region", req).then(res => {
closeLoading(vm); closeLoading(vm);
if (res.code == "000000") { if (res.code == "000000") {
vm.formInline.region = [];
vm.formInline.region[0] = res.data.list[0].id;
vm.optionsRegion = operationData.setRegionOptionNew( vm.optionsRegion = operationData.setRegionOptionNew(
res.data.list res.data.list
); );
vm.formInline.region[0] = res.data.list[0].id;
vm.search(); vm.search();
} }
}); });
...@@ -529,21 +530,27 @@ export default { ...@@ -529,21 +530,27 @@ export default {
},3000); },3000);
this.dialogVisible = true; this.dialogVisible = true;
//download接口 //download接口
let checkAll = operationData.hasAll(vm.formInline.organization) // let checkAll = operationData.hasAll(vm.formInline.organization)
let req = { // let req = {
projectId : vm.projectId, // projectId : vm.projectId,
ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll), // ids: operationData.getIds(vm.formInline,vm.organizationList,checkAll),
type: operationData.getSearchType(vm.formInline,checkAll), // type: operationData.getSearchType(vm.formInline,checkAll),
originalFlag: vm.formInline.checked == false ? 0 : 1, // originalFlag: vm.formInline.checked == false ? 0 : 1,
projectName: vm.$route.query.projectName, // projectName: vm.$route.query.projectName,
cityName: vm.getCityName(), // cityName: vm.getCityName(),
}; // };
// openLoading(vm);
// vm.reportGET("report/downLoad/downLoad", req).then(res => {
// closeLoading(vm);
// // console
// if (res.code == "000000") {
// }
// });
},
exportHttp() {
let req = {};
openLoading(vm); openLoading(vm);
vm.reportGET("report/downLoad/downLoad", req).then(res => { vm.POST("report/downLoad/downLoad", req).then(res => {
closeLoading(vm);
// console
if (res.code == "000000") {
}
}); });
}, },
getCityName() { getCityName() {
...@@ -622,9 +629,9 @@ export default { ...@@ -622,9 +629,9 @@ export default {
let pageData = canvas.toDataURL('image/jpeg', 1.0); let pageData = canvas.toDataURL('image/jpeg', 1.0);
let pdf = new JsPDF('', 'pt', [contentWidth*0.7,contentHeight*0.7]); let pdf = new JsPDF('', 'pt', [contentWidth*0.8,contentHeight*0.8]);
pdf.addImage(pageData, 'JPEG', 0, position, contentWidth*0.7, contentHeight*0.7) pdf.addImage(pageData, 'JPEG', 0, position, contentWidth*0.8, contentHeight*0.8)
let title = "导出学情报告"; let title = "导出学情报告";
pdf.save(title + '.pdf'); pdf.save(title + '.pdf');
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册