提交 051b2cef 编写于 作者: guangjun.yang's avatar guangjun.yang

修改两个页面的逻辑

上级 aba432d7
......@@ -8,23 +8,21 @@
</ul>
<ul v-show="cIndex === 0" class="list">
<li v-for="(item, index) in certUserList" :key="index">
<span>{{item.doctorName}}</span>
<span>{{item.departmentName}}</span>
<span>成绩 {{item.score}}</span>
<span>{{(item.doctorName || '- ' ) | shortName}}</span>
<span>{{(item.departmentName || '- ') | shortName}}</span>
<span>成绩 {{item.score || '- '}}</span>
</li>
</ul>
<ul v-show="cIndex === 1" class="list">
<li v-for="(item, index) in noCertUserList" :key="index">
<span>{{item.doctorName}}</span>
<span>{{item.departmentName}}</span>
<!-- <span>成绩 {{item.score}}</span> -->
<span>{{(item.doctorName || '- ') | shortName}}</span>
<span>{{(item.departmentName || '- ') | shortName}}</span>
</li>
</ul>
<ul v-show="cIndex === 2" class="list">
<li v-for="(item, index) in noJoinList" :key="index">
<span>{{item.doctorName}}</span>
<span>{{item.departmentName}}</span>
<!-- <span>成绩 {{item.score}}</span> -->
<span>{{(item.doctorName || '- ') | shortName}}</span>
<span>{{(item.departmentName || '- ') | shortName}}</span>
</li>
</ul>
<NoContent v-show="((cIndex === 0 && !certUserList.length) || (cIndex === 1 && !noCertUserList.length) || (cIndex === 2 && !noJoinList.length))"></NoContent>
......@@ -70,6 +68,15 @@ export default {
this.cIndex = newVal;
}
},
filters: {
shortName: function (value, length = 5, append = '...') {
if (value && value.length > length) {
return value.substring(0, length) + append
} else {
return value
}
},
},
methods: {
tabClick(index) {
this.cIndex = index;
......@@ -125,6 +132,10 @@ export default {
// flex: 1;
text-align: center;
font-weight: 400;
color: #676869;
}
span:first-child {
font-weight: 700;
color: #373839;
}
}
......
......@@ -20,28 +20,28 @@ import ExamScoreList from "@/components/bussiness/exam-score-list";
export default {
data() {
return {
// title: "共0条数据",
title: "共0条数据",
needRightBtn: true,
token: "",
// // 查询概况数据
// queryGDParams: {
// appSelectType: 2,
// beginDate: "",
// endDate: "",
// hospitalIdList: [],
// originalFlag: 1, // 默认值0:0不查看原始数据
// projectId: 374,
// regionId: "",
// timeFlag: 1,
// pageNo: 0,
// pageSize: 0,
// sourceType: 1,
// pageCfg: {
// type: 1
// }
// },
// allData: {},
// dataList: [],
// 查询概况数据
queryGDParams: {
appSelectType: 2,
beginDate: "",
endDate: "",
hospitalIdList: [],
originalFlag: 1, // 默认值0:0不查看原始数据
projectId: 374,
regionId: "",
timeFlag: 1,
pageNo: 0,
pageSize: 0,
sourceType: 1,
pageCfg: {
type: 1
}
},
allData: {},
dataList: [],
dropdownList: [{
desc: '1分',
type: 1
......@@ -61,63 +61,63 @@ export default {
CommonNoMore,
ExamScoreList
},
async asyncData( { query } ) {
let queryGDParams = {
appSelectType: 2,
beginDate: "",
endDate: "",
hospitalIdList: [],
originalFlag: 1, // 默认值0:0不查看原始数据
projectId: 374,
regionId: "",
timeFlag: 1,
pageNo: 0,
pageSize: 0,
sourceType: 1,
pageCfg: {
type: 1
// async asyncData( { query } ) {
// let queryGDParams = {
// appSelectType: 2,
// beginDate: "",
// endDate: "",
// hospitalIdList: [],
// originalFlag: 1, // 默认值0:0不查看原始数据
// projectId: 374,
// regionId: "",
// timeFlag: 1,
// pageNo: 0,
// pageSize: 0,
// sourceType: 1,
// pageCfg: {
// type: 1
// }
// };
// let hospitalIdList = query.hospitalIdList || ''
// queryGDParams.projectId = query.projectId || '';
// queryGDParams.regionId = query.regionId || '';
// queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
// cookies.set("token", query.token || '');
// let examData = await getGeneralExam(queryGDParams);
// console.log(examData);
// return {
// allData: examData.data,
// dataList: examData.data && examData.data.examScoreList || [],
// title: `共${examData.data && examData.data.examScoreList && examData.data.examScoreList.length || 0}条数据`
// }
// },
created() {
if (process.client) {
if(this.$route && this.$route.query) {
let cQuery = this.$route.query
this.queryGDParams.projectId = cQuery.projectId || '';
this.queryGDParams.regionId = cQuery.regionId || '';
let hospitalIdList = cQuery.hospitalIdList || ''
this.queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
cookies.set("token", cQuery.token || '');
this.getGeneralExam(this.queryGDParams);
}
};
let hospitalIdList = query.hospitalIdList || ''
queryGDParams.projectId = query.projectId || '';
queryGDParams.regionId = query.regionId || '';
queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
cookies.set("token", query.token || '');
let examData = await getGeneralExam(queryGDParams);
console.log(examData);
return {
allData: examData.data,
dataList: examData.data && examData.data.examScoreList || [],
title: `共${examData.data && examData.data.examScoreList && examData.data.examScoreList.length || 0}条数据`
}
},
created() {
// if (process.client) {
// if(this.$route && this.$route.query) {
// let cQuery = this.$route.query
// this.queryGDParams.projectId = cQuery.projectId || '';
// this.queryGDParams.regionId = cQuery.regionId || '';
// let hospitalIdList = cQuery.hospitalIdList || ''
// this.queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
// cookies.set("token", cQuery.token || '');
// this.getGeneralExam(this.queryGDParams);
// }
// }
},
mounted() {
},
methods: {
// // 考试分析
// async getGeneralExam(queryData) {
// await getGeneralExam(queryData).then(res => {
// if (res.code === "000000") {
// this.allData = res.data;
// this.dataList = res.data.examScoreList;
// this.title = `共${this.dataList.length}条数据`;
// }
// });
// },
// 考试分析
async getGeneralExam(queryData) {
await getGeneralExam(queryData).then(res => {
if (res.code === "000000") {
this.allData = res.data;
this.dataList = res.data.examScoreList;
this.title = `共${this.dataList.length}条数据`;
}
});
},
selectSortItem(type) {
if(type == 1) {
this.dataList = this.allData.examScoreList || [];
......
......@@ -18,10 +18,27 @@ import ExamTimesList from "@/components/bussiness/exam-times-list";
export default {
data() {
return {
// title: "共0条数据",
title: "共0条数据",
needRightBtn: false,
token: "",
// dataList: []
// 查询概况数据
queryGDParams: {
appSelectType: 1,
beginDate: "",
endDate: "",
hospitalIdList: [],
originalFlag: 1, // 默认值0:0不查看原始数据
projectId: 374,
regionId: "",
timeFlag: 1,
pageNo: 0,
pageSize: 0,
sourceType: 1,
pageCfg: {
type: 1
}
},
dataList: []
};
},
components: {
......@@ -30,63 +47,63 @@ export default {
CommonNoMore,
ExamTimesList
},
async asyncData( { query } ) {
let queryGDParams = {
appSelectType: 1,
beginDate: "",
endDate: "",
hospitalIdList: [],
originalFlag: 1, // 默认值0:0不查看原始数据
projectId: 374,
regionId: "",
timeFlag: 1,
pageNo: 0,
pageSize: 0,
sourceType: 1,
pageCfg: {
type: 1
}
};
let hospitalIdList = query.hospitalIdList || ''
queryGDParams.projectId = query.projectId || '';
queryGDParams.regionId = query.regionId || '';
queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
cookies.set("token", query.token || '');
let examData = await getGeneralExam(queryGDParams);
// async asyncData( { query } ) {
// let queryGDParams = {
// appSelectType: 1,
// beginDate: "",
// endDate: "",
// hospitalIdList: [],
// originalFlag: 1, // 默认值0:0不查看原始数据
// projectId: 374,
// regionId: "",
// timeFlag: 1,
// pageNo: 0,
// pageSize: 0,
// sourceType: 1,
// pageCfg: {
// type: 1
// }
// };
// let hospitalIdList = query.hospitalIdList || ''
// queryGDParams.projectId = query.projectId || '';
// queryGDParams.regionId = query.regionId || '';
// queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
// cookies.set("token", query.token || '');
// let examData = await getGeneralExam(queryGDParams);
console.log(examData);
return {
dataList: examData.data && examData.data.examTimesList,
title: `共${(examData.data && examData.data.examTimesList && examData.data.examTimesList.length) || 0}条数据`
}
},
// console.log(examData);
// return {
// dataList: examData.data && examData.data.examTimesList,
// title: `共${(examData.data && examData.data.examTimesList && examData.data.examTimesList.length) || 0}条数据`
// }
// },
created() {
// if (process.client) {
// if(this.$route && this.$route.query) {
// let cQuery = this.$route.query
// let hospitalIdList = cQuery.hospitalIdList || ''
// this.queryGDParams.projectId = cQuery.projectId || '';
// this.queryGDParams.regionId = cQuery.regionId || '';
// this.queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
// cookies.set("token", cQuery.token || '');
// this.getGeneralExam(this.queryGDParams);
// }
// }
if (process.client) {
if(this.$route && this.$route.query) {
let cQuery = this.$route.query
let hospitalIdList = cQuery.hospitalIdList || ''
this.queryGDParams.projectId = cQuery.projectId || '';
this.queryGDParams.regionId = cQuery.regionId || '';
this.queryGDParams.hospitalIdList = hospitalIdList && hospitalIdList.split(',') || [];
cookies.set("token", cQuery.token || '');
this.getGeneralExam(this.queryGDParams);
}
}
},
mounted() {
},
methods: {
// // 考试分析
// async getGeneralExam(queryData) {
// await getGeneralExam(queryData).then(res => {
// if (res.code === "000000") {
// this.dataList = res.data.examTimesList;
// this.title = `共${this.dataList.length}条数据`
// }
// });
// },
// 考试分析
async getGeneralExam(queryData) {
await getGeneralExam(queryData).then(res => {
if (res.code === "000000") {
this.dataList = res.data.examTimesList;
this.title = `共${this.dataList.length}条数据`
}
});
},
}
};
</script>
......
......@@ -70,7 +70,7 @@
<CommonSplitLine></CommonSplitLine>
<CommonTitle title="完成项目考试次数情况"></CommonTitle>
<ChartColumnVerticalTimes :dataList="generalExamData.examTimesList" id="chartCourseTimesId" :colors="colors"></ChartColumnVerticalTimes>
<ShowAll @action="gotoPage('/examtimes')" class="mt-10"></ShowAll>
<ShowAll v-show="generalExamData && generalExamData.examTimesList.length > 5" @action="gotoPage('/examtimes')" class="mt-10"></ShowAll>
<CommonSplitLine></CommonSplitLine>
<CommonTitle title="完成项目考试分数情况"></CommonTitle>
<ChartColumnVerticalScore id="chartCourseScoreId" :dataList="generalExamData.examScoreList"></ChartColumnVerticalScore>
......@@ -219,7 +219,7 @@ export default {
allData: {},
projectId: "",
token:
"11B8076631AE45999D350EC08A7E66AE" ||
"93650BA5D0BB4D8B97E9C75859B54495" ||
"A220943B006347799F277CC524EBB662" ||
"B10441890E2940499621C76667675B2D" ||
// "17B31C94D44947829097A953BC7C2732" ||
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册