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