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

修改两个页面的逻辑

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