修改
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,198 +343,212 @@ 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;
|
|
||||||
this.categoryAgeFractionList = res.data.categoryAgeFractionList;
|
|
||||||
this.categoryScoreList = res.data.categoryScoreList;
|
|
||||||
var list = [];
|
|
||||||
this.categoryTableNameList.forEach((e) => {
|
|
||||||
e.childrenTableNameList.forEach((el) => {
|
|
||||||
list.push(el.categoryId);
|
|
||||||
});
|
|
||||||
});
|
|
||||||
let yname = [];
|
|
||||||
this.categoryScoreList.forEach((el) => {
|
|
||||||
yname.push(el.className);
|
|
||||||
var listname = list.map((e) => {
|
|
||||||
var num = 0;
|
|
||||||
var number = el.categoryScoreList.findIndex(
|
|
||||||
(o) => o.categoryId == e
|
|
||||||
);
|
|
||||||
if (number != -1) {
|
|
||||||
num = el.categoryScoreList[number].categoryName;
|
|
||||||
}
|
|
||||||
return num;
|
|
||||||
});
|
|
||||||
this.listname = listname;
|
|
||||||
|
|
||||||
var list1 = list.map((e) => {
|
|
||||||
var num = 0;
|
|
||||||
var number = el.categoryScoreList.findIndex(
|
|
||||||
(o) => o.categoryId == e
|
|
||||||
);
|
|
||||||
if (number != -1) {
|
|
||||||
num = el.categoryScoreList[number].avgScore;
|
|
||||||
}
|
|
||||||
return num;
|
|
||||||
});
|
|
||||||
el.list = list1;
|
|
||||||
});
|
|
||||||
console.log(this.categoryScoreList);
|
|
||||||
console.log(this.listname);
|
|
||||||
for (var i = 0; i < this.listname.length; i++) {
|
|
||||||
name = this.categoryScoreList[0].categoryScoreList[i].categoryName;
|
|
||||||
ydata = [
|
|
||||||
this.categoryScoreList[0].list[i],
|
|
||||||
this.categoryScoreList[1].list[i],
|
|
||||||
this.categoryScoreList[2].list[i],
|
|
||||||
];
|
|
||||||
var obj = {
|
|
||||||
name: name,
|
|
||||||
type: "bar",
|
|
||||||
label: labelOption,
|
|
||||||
emphasis: {
|
|
||||||
focus: "series",
|
|
||||||
},
|
|
||||||
data: ydata,
|
|
||||||
};
|
|
||||||
console.log(ydata);
|
|
||||||
yseries.push(obj);
|
|
||||||
names.push(name);
|
|
||||||
}
|
}
|
||||||
console.log(yseries);
|
if (res.data.categoryAgeFractionList) {
|
||||||
|
this.categoryAgeFractionList = res.data.categoryAgeFractionList;
|
||||||
var myChart = echarts.init(document.getElementById("chart"));
|
}
|
||||||
|
var list = [];
|
||||||
var option;
|
if (res.data.categoryTableNameList && res.data.categoryScoreList) {
|
||||||
|
this.categoryTableNameList = res.data.categoryTableNameList;
|
||||||
const posList = [
|
this.categoryTableNameList.forEach((e) => {
|
||||||
"left",
|
e.childrenTableNameList.forEach((el) => {
|
||||||
"right",
|
list.push(el.categoryId);
|
||||||
"top",
|
|
||||||
"bottom",
|
|
||||||
"inside",
|
|
||||||
"insideTop",
|
|
||||||
"insideLeft",
|
|
||||||
"insideRight",
|
|
||||||
"insideBottom",
|
|
||||||
"insideTopLeft",
|
|
||||||
"insideTopRight",
|
|
||||||
"insideBottomLeft",
|
|
||||||
"insideBottomRight",
|
|
||||||
];
|
|
||||||
app.configParameters = {
|
|
||||||
rotate: {
|
|
||||||
min: 0,
|
|
||||||
max: 90,
|
|
||||||
},
|
|
||||||
align: {
|
|
||||||
options: {
|
|
||||||
left: "left",
|
|
||||||
center: "center",
|
|
||||||
right: "right",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
verticalAlign: {
|
|
||||||
options: {
|
|
||||||
top: "top",
|
|
||||||
middle: "middle",
|
|
||||||
bottom: "bottom",
|
|
||||||
},
|
|
||||||
},
|
|
||||||
position: {
|
|
||||||
options: posList.reduce(function (map, pos) {
|
|
||||||
map[pos] = pos;
|
|
||||||
return map;
|
|
||||||
}, {}),
|
|
||||||
},
|
|
||||||
distance: {
|
|
||||||
min: 0,
|
|
||||||
max: 100,
|
|
||||||
},
|
|
||||||
};
|
|
||||||
app.config = {
|
|
||||||
rotate: 0,
|
|
||||||
align: "center",
|
|
||||||
verticalAlign: "middle",
|
|
||||||
position: "top",
|
|
||||||
distance: 15,
|
|
||||||
onChange: function () {
|
|
||||||
const labelOption = {
|
|
||||||
rotate: app.config.rotate,
|
|
||||||
align: app.config.align,
|
|
||||||
verticalAlign: app.config.verticalAlign,
|
|
||||||
position: app.config.position,
|
|
||||||
distance: app.config.distance,
|
|
||||||
};
|
|
||||||
myChart.setOption({
|
|
||||||
series: [
|
|
||||||
{
|
|
||||||
label: labelOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: labelOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: labelOption,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: labelOption,
|
|
||||||
},
|
|
||||||
],
|
|
||||||
});
|
});
|
||||||
},
|
});
|
||||||
};
|
console.log(list);
|
||||||
const labelOption = {
|
|
||||||
show: true,
|
|
||||||
position: app.config.position,
|
|
||||||
distance: app.config.distance,
|
|
||||||
align: app.config.align,
|
|
||||||
verticalAlign: app.config.verticalAlign,
|
|
||||||
rotate: app.config.rotate,
|
|
||||||
formatter: "{c}",
|
|
||||||
fontSize: 16,
|
|
||||||
rich: {
|
|
||||||
name: {},
|
|
||||||
},
|
|
||||||
};
|
|
||||||
|
|
||||||
option = {
|
this.categoryScoreList = res.data.categoryScoreList;
|
||||||
tooltip: {
|
let yname = [];
|
||||||
trigger: "axis",
|
console.log(this.categoryScoreList);
|
||||||
axisPointer: {
|
this.categoryScoreList.forEach((el) => {
|
||||||
type: "",
|
yname.push(el.className);
|
||||||
},
|
var listname = list.map((e) => {
|
||||||
},
|
var num = 0;
|
||||||
legend: {
|
var number = el.categoryScoreList.findIndex(
|
||||||
data: names,
|
(o) => o.categoryId == e
|
||||||
},
|
);
|
||||||
xAxis: [
|
if (number != -1) {
|
||||||
{
|
num = el.categoryScoreList[number].categoryName;
|
||||||
type: "category",
|
}
|
||||||
axisTick: { show: false },
|
return num;
|
||||||
data: yname,
|
});
|
||||||
},
|
this.listname = listname;
|
||||||
],
|
console.log(list);
|
||||||
yAxis: [
|
var list1 = list.map((e) => {
|
||||||
{
|
var num = 0;
|
||||||
type: "value",
|
var number = el.categoryScoreList.findIndex(
|
||||||
},
|
(o) => o.categoryId == e
|
||||||
],
|
);
|
||||||
series: yseries,
|
if (number != -1) {
|
||||||
};
|
num = el.categoryScoreList[number].avgScore;
|
||||||
|
}
|
||||||
|
if (num == null) {
|
||||||
|
num = 0;
|
||||||
|
return num;
|
||||||
|
}
|
||||||
|
console.log(num);
|
||||||
|
return num;
|
||||||
|
});
|
||||||
|
el.list = list1;
|
||||||
|
});
|
||||||
|
console.log(this.categoryScoreList);
|
||||||
|
console.log(this.listname);
|
||||||
|
for (var i = 0; i < this.listname.length; i++) {
|
||||||
|
name =
|
||||||
|
this.categoryScoreList[0].categoryScoreList[i].categoryName;
|
||||||
|
ydata = [
|
||||||
|
this.categoryScoreList[0].list[i],
|
||||||
|
this.categoryScoreList[1].list[i],
|
||||||
|
this.categoryScoreList[2].list[i],
|
||||||
|
];
|
||||||
|
var obj = {
|
||||||
|
name: name,
|
||||||
|
type: "bar",
|
||||||
|
label: labelOption,
|
||||||
|
emphasis: {
|
||||||
|
focus: "series",
|
||||||
|
},
|
||||||
|
data: ydata,
|
||||||
|
};
|
||||||
|
console.log(ydata);
|
||||||
|
yseries.push(obj);
|
||||||
|
names.push(name);
|
||||||
|
}
|
||||||
|
|
||||||
option && myChart.setOption(option, true);
|
this.listname = [];
|
||||||
this.itemshow2 = false;
|
|
||||||
this.itemshow = true;
|
console.log(yseries);
|
||||||
|
|
||||||
|
var myChart = echarts.init(document.getElementById("chart"));
|
||||||
|
|
||||||
|
var option;
|
||||||
|
|
||||||
|
const posList = [
|
||||||
|
"left",
|
||||||
|
"right",
|
||||||
|
"top",
|
||||||
|
"bottom",
|
||||||
|
"inside",
|
||||||
|
"insideTop",
|
||||||
|
"insideLeft",
|
||||||
|
"insideRight",
|
||||||
|
"insideBottom",
|
||||||
|
"insideTopLeft",
|
||||||
|
"insideTopRight",
|
||||||
|
"insideBottomLeft",
|
||||||
|
"insideBottomRight",
|
||||||
|
];
|
||||||
|
app.configParameters = {
|
||||||
|
rotate: {
|
||||||
|
min: 0,
|
||||||
|
max: 90,
|
||||||
|
},
|
||||||
|
align: {
|
||||||
|
options: {
|
||||||
|
left: "left",
|
||||||
|
center: "center",
|
||||||
|
right: "right",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
verticalAlign: {
|
||||||
|
options: {
|
||||||
|
top: "top",
|
||||||
|
middle: "middle",
|
||||||
|
bottom: "bottom",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
position: {
|
||||||
|
options: posList.reduce(function (map, pos) {
|
||||||
|
map[pos] = pos;
|
||||||
|
return map;
|
||||||
|
}, {}),
|
||||||
|
},
|
||||||
|
distance: {
|
||||||
|
min: 0,
|
||||||
|
max: 100,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
app.config = {
|
||||||
|
rotate: 0,
|
||||||
|
align: "center",
|
||||||
|
verticalAlign: "middle",
|
||||||
|
position: "top",
|
||||||
|
distance: 15,
|
||||||
|
onChange: function () {
|
||||||
|
const labelOption = {
|
||||||
|
rotate: app.config.rotate,
|
||||||
|
align: app.config.align,
|
||||||
|
verticalAlign: app.config.verticalAlign,
|
||||||
|
position: app.config.position,
|
||||||
|
distance: app.config.distance,
|
||||||
|
};
|
||||||
|
myChart.setOption({
|
||||||
|
series: [
|
||||||
|
{
|
||||||
|
label: labelOption,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: labelOption,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: labelOption,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: labelOption,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
});
|
||||||
|
},
|
||||||
|
};
|
||||||
|
const labelOption = {
|
||||||
|
show: true,
|
||||||
|
position: app.config.position,
|
||||||
|
distance: app.config.distance,
|
||||||
|
align: app.config.align,
|
||||||
|
verticalAlign: app.config.verticalAlign,
|
||||||
|
rotate: app.config.rotate,
|
||||||
|
formatter: "{c}",
|
||||||
|
fontSize: 16,
|
||||||
|
rich: {
|
||||||
|
name: {},
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
option = {
|
||||||
|
tooltip: {
|
||||||
|
trigger: "axis",
|
||||||
|
axisPointer: {
|
||||||
|
type: "",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
legend: {
|
||||||
|
data: names,
|
||||||
|
},
|
||||||
|
xAxis: [
|
||||||
|
{
|
||||||
|
type: "category",
|
||||||
|
axisTick: { show: false },
|
||||||
|
data: yname,
|
||||||
|
},
|
||||||
|
],
|
||||||
|
yAxis: [
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
series: yseries,
|
||||||
|
};
|
||||||
|
|
||||||
|
option && myChart.setOption(option, true);
|
||||||
|
this.itemshow2 = false;
|
||||||
|
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