|
@@ -51,6 +51,7 @@
|
|
|
type="text"
|
|
|
>
|
|
|
<title-item
|
|
|
+ :descss="descs"
|
|
|
:type="item[0].isError ? 'error' : 'warning'"
|
|
|
:data="
|
|
|
item.map((title) => ({
|
|
@@ -227,7 +228,6 @@ export default {
|
|
|
this.FetchList();
|
|
|
},
|
|
|
async formatData(data) {
|
|
|
- console.log(data);
|
|
|
const list = {};
|
|
|
for (const item of data) {
|
|
|
const row = errorType[item.errorType] || {};
|
|
@@ -239,30 +239,43 @@ export default {
|
|
|
...item,
|
|
|
...row,
|
|
|
});
|
|
|
- // if (item.errorType == "COURSE_TIME_ERROR") {
|
|
|
- // try {
|
|
|
- // const res = await getSysTenantConfig({ group: "SERVER_ERROR" });
|
|
|
- // let startStr = "";
|
|
|
- // let endStr = "";
|
|
|
- // res.data.forEach((item) => {
|
|
|
- // // this.form[item.paramName] = item.paranValue
|
|
|
- // if (item.id == "195") {
|
|
|
- // startStr = item.paranValue.substring(0,5);
|
|
|
- // }
|
|
|
- // if (item.id == "196") {
|
|
|
- // endStr = item.paranValue.substring(0,5);
|
|
|
- // }
|
|
|
- // });
|
|
|
- // this.descs[
|
|
|
- // "COURSE_TIME_ERROR"
|
|
|
- // ] = `上课时间在${startStr}~${endStr}时间段内为时间安排异常`;
|
|
|
- // console.log(this.descs);
|
|
|
- // } catch (e) {
|
|
|
- // console.log(e);
|
|
|
- // }
|
|
|
- // }
|
|
|
+ if (
|
|
|
+ item.errorType == "COURSE_TIME_ERROR" ||
|
|
|
+ item.errorType == "STUDENT_ERROR_LEAVE"
|
|
|
+ ) {
|
|
|
+ try {
|
|
|
+ const res = await getSysTenantConfig({ group: "SERVER_ERROR" });
|
|
|
+ let startStr = "";
|
|
|
+ let endStr = "";
|
|
|
+ let leaveStr = "";
|
|
|
+ res.data.forEach((item) => {
|
|
|
+ // this.form[item.paramName] = item.paranValue
|
|
|
+ if (item.id == "195") {
|
|
|
+ startStr = item.paranValue.substring(0, 5);
|
|
|
+ }
|
|
|
+ if (item.id == "196") {
|
|
|
+ endStr = item.paranValue.substring(0, 5);
|
|
|
+ }
|
|
|
+ if (item.id == "194") {
|
|
|
+ leaveStr = item.paranValue;
|
|
|
+ }
|
|
|
+ });
|
|
|
+ if (startStr && endStr) {
|
|
|
+ this.descs[
|
|
|
+ "COURSE_TIME_ERROR"
|
|
|
+ ] = `上课时间不在${startStr}~${endStr}时间段内为时间安排异常`;
|
|
|
+ }
|
|
|
+ if(leaveStr){
|
|
|
+ this.descs[
|
|
|
+ "STUDENT_ERROR_LEAVE"
|
|
|
+ ] = `当月请假${leaveStr}次及以上`;
|
|
|
+ }
|
|
|
+ } catch (e) {
|
|
|
+ console.log(e);
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
- console.log(Object.values(list))
|
|
|
+
|
|
|
return Object.values(list);
|
|
|
},
|
|
|
async FetchList() {
|
|
@@ -276,7 +289,7 @@ export default {
|
|
|
const info = {};
|
|
|
for (const item of this.list) {
|
|
|
info[item.errorType] = item;
|
|
|
- data[item.errorType] = this.formatData(item?.result || []);
|
|
|
+ data[item.errorType] = await this.formatData(item?.result || []);
|
|
|
}
|
|
|
this.infoByType = info;
|
|
|
this.listByType = data;
|