修改
This commit is contained in:
parent
e621393740
commit
c620698570
@ -1,3 +1,3 @@
|
|||||||
var baseurl = "http://192.168.16.81:8081";
|
var baseurl = "http://192.168.16.62:8080";
|
||||||
|
|
||||||
export default baseurl
|
export default baseurl
|
||||||
@ -29,11 +29,10 @@ export function updateKindergartenCheckReport(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
// 幼儿园报告下载/预览
|
// 幼儿园报告预览
|
||||||
export function report(id) {
|
export function report(kindergartenId, batchCode) {
|
||||||
return request({
|
return request({
|
||||||
url: `/system/kindergartenCheckReport/download/report?id=${id}`,
|
url: `/system/checkReport/kindergarten/constitution?kindergartenId=${kindergartenId}&batchCode=${batchCode}`,
|
||||||
method: 'POST',
|
method: 'get'
|
||||||
responseType: 'blob'
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
@ -343,25 +343,29 @@ export default {
|
|||||||
if (res.code == 500) {
|
if (res.code == 500) {
|
||||||
this.itemshow2 = true;
|
this.itemshow2 = true;
|
||||||
this.itemshow = false;
|
this.itemshow = false;
|
||||||
} else if (res.data == []) {
|
|
||||||
this.itemshow2 = true;
|
|
||||||
this.itemshow = false;
|
|
||||||
} else if (!res.data) {
|
} else if (!res.data) {
|
||||||
this.itemshow2 = true;
|
this.itemshow2 = true;
|
||||||
this.itemshow = false;
|
this.itemshow = false;
|
||||||
} else {
|
} else {
|
||||||
this.listname = [];
|
if (res.data.totalAvgFraction) {
|
||||||
this.totalAvgFraction = res.data.totalAvgFraction;
|
this.totalAvgFraction = res.data.totalAvgFraction;
|
||||||
this.categoryTableNameList = res.data.categoryTableNameList;
|
}
|
||||||
|
if (res.data.categoryAgeFractionList) {
|
||||||
this.categoryAgeFractionList = res.data.categoryAgeFractionList;
|
this.categoryAgeFractionList = res.data.categoryAgeFractionList;
|
||||||
this.categoryScoreList = res.data.categoryScoreList;
|
}
|
||||||
var list = [];
|
var list = [];
|
||||||
|
if (res.data.categoryTableNameList && res.data.categoryScoreList) {
|
||||||
|
this.categoryTableNameList = res.data.categoryTableNameList;
|
||||||
this.categoryTableNameList.forEach((e) => {
|
this.categoryTableNameList.forEach((e) => {
|
||||||
e.childrenTableNameList.forEach((el) => {
|
e.childrenTableNameList.forEach((el) => {
|
||||||
list.push(el.categoryId);
|
list.push(el.categoryId);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
console.log(list);
|
||||||
|
|
||||||
|
this.categoryScoreList = res.data.categoryScoreList;
|
||||||
let yname = [];
|
let yname = [];
|
||||||
|
console.log(this.categoryScoreList);
|
||||||
this.categoryScoreList.forEach((el) => {
|
this.categoryScoreList.forEach((el) => {
|
||||||
yname.push(el.className);
|
yname.push(el.className);
|
||||||
var listname = list.map((e) => {
|
var listname = list.map((e) => {
|
||||||
@ -375,7 +379,7 @@ export default {
|
|||||||
return num;
|
return num;
|
||||||
});
|
});
|
||||||
this.listname = listname;
|
this.listname = listname;
|
||||||
|
console.log(list);
|
||||||
var list1 = list.map((e) => {
|
var list1 = list.map((e) => {
|
||||||
var num = 0;
|
var num = 0;
|
||||||
var number = el.categoryScoreList.findIndex(
|
var number = el.categoryScoreList.findIndex(
|
||||||
@ -384,6 +388,11 @@ export default {
|
|||||||
if (number != -1) {
|
if (number != -1) {
|
||||||
num = el.categoryScoreList[number].avgScore;
|
num = el.categoryScoreList[number].avgScore;
|
||||||
}
|
}
|
||||||
|
if (num == null) {
|
||||||
|
num = 0;
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
console.log(num);
|
||||||
return num;
|
return num;
|
||||||
});
|
});
|
||||||
el.list = list1;
|
el.list = list1;
|
||||||
@ -391,7 +400,8 @@ export default {
|
|||||||
console.log(this.categoryScoreList);
|
console.log(this.categoryScoreList);
|
||||||
console.log(this.listname);
|
console.log(this.listname);
|
||||||
for (var i = 0; i < this.listname.length; i++) {
|
for (var i = 0; i < this.listname.length; i++) {
|
||||||
name = this.categoryScoreList[0].categoryScoreList[i].categoryName;
|
name =
|
||||||
|
this.categoryScoreList[0].categoryScoreList[i].categoryName;
|
||||||
ydata = [
|
ydata = [
|
||||||
this.categoryScoreList[0].list[i],
|
this.categoryScoreList[0].list[i],
|
||||||
this.categoryScoreList[1].list[i],
|
this.categoryScoreList[1].list[i],
|
||||||
@ -410,6 +420,9 @@ export default {
|
|||||||
yseries.push(obj);
|
yseries.push(obj);
|
||||||
names.push(name);
|
names.push(name);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.listname = [];
|
||||||
|
|
||||||
console.log(yseries);
|
console.log(yseries);
|
||||||
|
|
||||||
var myChart = echarts.init(document.getElementById("chart"));
|
var myChart = echarts.init(document.getElementById("chart"));
|
||||||
@ -536,6 +549,7 @@ export default {
|
|||||||
this.itemshow2 = false;
|
this.itemshow2 = false;
|
||||||
this.itemshow = true;
|
this.itemshow = true;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
//点击所属班级
|
//点击所属班级
|
||||||
|
|||||||
@ -616,19 +616,22 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
const id = row.id || this.ids;
|
const id = row.id || this.ids;
|
||||||
this.form = row;
|
this.form = row;
|
||||||
|
var code = "";
|
||||||
existKindergartenCheckReport(row.kindergartenId, row.batchCode).then(
|
existKindergartenCheckReport(row.kindergartenId, row.batchCode).then(
|
||||||
(response) => {
|
(response) => {
|
||||||
console.log(this.form);
|
console.log(response);
|
||||||
if (response.code == 200) {
|
code = response.code;
|
||||||
|
if (response.data.existFlag) {
|
||||||
this.title = "修改幼儿园检测报告审批状态";
|
this.title = "修改幼儿园检测报告审批状态";
|
||||||
this.pdfurl = baseurl + response.data.downloadAddress;
|
this.pdfurl = baseurl + response.data.downloadAddress;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
} else if (response.code == 500) {
|
} else {
|
||||||
report(row.id).then((res) => {
|
report(row.kindergartenId, row.batchCode).then((res) => {
|
||||||
this.pdfurl = baseurl + res.data.downloadAddress;
|
this.pdfurl = baseurl + res.data.downloadAddress;
|
||||||
this.form.id = res.data.id;
|
this.form.id = res.data.id;
|
||||||
// this.pdfurl = window.URL.createObjectURL(res);
|
// this.pdfurl = window.URL.createObjectURL(res);
|
||||||
// window.open(this.pdfurl);
|
// window.open(this.pdfurl);
|
||||||
|
console.log(this.form)
|
||||||
this.open = true;
|
this.open = true;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@ -639,7 +642,11 @@ export default {
|
|||||||
submitForm() {
|
submitForm() {
|
||||||
console.log(this.form);
|
console.log(this.form);
|
||||||
if (this.form.id != null) {
|
if (this.form.id != null) {
|
||||||
updateKindergartenCheckReport(this.form).then((response) => {
|
var obj = {
|
||||||
|
id: this.form.id,
|
||||||
|
checkStatus: this.form.checkStatus,
|
||||||
|
};
|
||||||
|
updateKindergartenCheckReport(obj).then((response) => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功");
|
||||||
this.open = false;
|
this.open = false;
|
||||||
this.queryParams = {
|
this.queryParams = {
|
||||||
@ -654,8 +661,9 @@ export default {
|
|||||||
},
|
},
|
||||||
//预览
|
//预览
|
||||||
lookhand(item) {
|
lookhand(item) {
|
||||||
report(item.id).then((res) => {
|
report(item.kindergartenId, item.batchCode).then((res) => {
|
||||||
this.pdfurl = window.URL.createObjectURL(res);
|
// this.pdfurl = window.URL.createObjectURL(res);
|
||||||
|
this.pdfurl = baseurl + res.data.downloadAddress;
|
||||||
this.openiframe = true;
|
this.openiframe = true;
|
||||||
console.log(this.pdfurl);
|
console.log(this.pdfurl);
|
||||||
// window.open(this.pdfurl);
|
// window.open(this.pdfurl);
|
||||||
@ -676,9 +684,6 @@ export default {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
kinbatlist(kindergartenId, batchCode) {
|
|
||||||
console.log(kindergartenId, batchCode);
|
|
||||||
},
|
|
||||||
|
|
||||||
//幼儿园左侧点击
|
//幼儿园左侧点击
|
||||||
kindergartenNameclick(row) {
|
kindergartenNameclick(row) {
|
||||||
|
|||||||
@ -884,7 +884,7 @@ export default {
|
|||||||
// this.form = row;
|
// this.form = row;
|
||||||
this.title = "修改个人体质检测报告";
|
this.title = "修改个人体质检测报告";
|
||||||
existCheckReport(row.studentId, row.batchCode).then((res) => {
|
existCheckReport(row.studentId, row.batchCode).then((res) => {
|
||||||
if (res.code == 200) {
|
if (res.data.existFlag) {
|
||||||
this.pdfurl = baseurl + res.data.downloadAddress;
|
this.pdfurl = baseurl + res.data.downloadAddress;
|
||||||
this.open = true;
|
this.open = true;
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user