|
@@ -2189,6 +2189,7 @@ import { listS6101, getS6101, delS6101, addS6101, updateS6101, exportS6101 } fro
|
|
|
import { listS6107, getS6107, delS6107, addS6107, updateS6107, exportS6107 } from "@/api/production/s6107";
|
|
|
import { listS6301, getS6301, delS6301, addS6301, updateS6301, exportS6301 } from "@/api/production/s6301";
|
|
|
import { listZ404, getZ404, delZ404, addZ404, updateZ404, exportZ404 } from "@/api/production/z404";
|
|
|
+import { exportQuality } from "@/api/production/quality";
|
|
|
import { treeselect } from "@/api/system/dept";
|
|
|
import { getToken } from "@/utils/auth";
|
|
|
import Treeselect from "@riophae/vue-treeselect";
|
|
@@ -2340,16 +2341,34 @@ export default {
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
|
- //设置表格高度对应屏幕高度
|
|
|
- this.$nextTick(() => {
|
|
|
- this.clientHeight = document.body.clientHeight -250
|
|
|
- })
|
|
|
+ this.setDefaultSampleDate();
|
|
|
+ //设置表格高度对应屏幕高度
|
|
|
+ this.$nextTick(() => {
|
|
|
+ this.clientHeight = document.body.clientHeight -250
|
|
|
+ })
|
|
|
this.getList();
|
|
|
this.getTreeselect();
|
|
|
},
|
|
|
methods: {
|
|
|
+ /** 设置默认时间范围 */
|
|
|
+ setDefaultSampleDate() {
|
|
|
+ let startDate = new Date();
|
|
|
+ startDate.setMonth(startDate.getMonth() - 1);
|
|
|
+ startDate.setDate(1);
|
|
|
+ this.sampleDate[0] = startDate.getFullYear() + "-" + Number(startDate.getMonth() + 1) + "-" + startDate.getDate();
|
|
|
+
|
|
|
+ let endDate = new Date();
|
|
|
+ endDate.setDate(0);
|
|
|
+ this.sampleDate[1] = endDate.getFullYear() + "-" + Number(endDate.getMonth() + 1) + "-" + endDate.getDate();
|
|
|
+ },
|
|
|
/** 查询质量月报列表 */
|
|
|
getList() {
|
|
|
+ this.queryParams.startDate = this.sampleDate[0];
|
|
|
+ this.queryParams.endDate = this.sampleDate[1];
|
|
|
+ console.log(this.sampleDate[0])
|
|
|
+ console.log(this.sampleDate[1])
|
|
|
+ console.log(this.queryParams.startDate)
|
|
|
+ console.log(this.queryParams.endDate)
|
|
|
this.getListS0501();
|
|
|
this.getListS1301();
|
|
|
this.getListS2002();
|
|
@@ -2378,168 +2397,168 @@ export default {
|
|
|
getListS0501() {
|
|
|
this.loadingS0501 = true;
|
|
|
listS0501(this.queryParams).then(response => {
|
|
|
- this.s0501List = response.rows;
|
|
|
+ this.s0501List = response.data;
|
|
|
this.loadingS0501 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS1301() {
|
|
|
this.loadingS1301 = true;
|
|
|
listS1301(this.queryParams).then(response => {
|
|
|
- this.s1301List = response.rows;
|
|
|
+ this.s1301List = response.data;
|
|
|
this.loadingS1301 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS2002() {
|
|
|
this.loadingS2002 = true;
|
|
|
listS2002(this.queryParams).then(response => {
|
|
|
- this.s2002List = response.rows;
|
|
|
+ this.s2002List = response.data;
|
|
|
this.loadingS2002 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS2005() {
|
|
|
this.loadingS2005 = true;
|
|
|
listS2005(this.queryParams).then(response => {
|
|
|
- this.s2005List = response.rows;
|
|
|
+ this.s2005List = response.data;
|
|
|
this.loadingS2005 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS2007() {
|
|
|
this.loadingS2007 = true;
|
|
|
listS2007(this.queryParams).then(response => {
|
|
|
- this.s2007List = response.rows;
|
|
|
+ this.s2007List = response.data;
|
|
|
this.loadingS2007 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS2011() {
|
|
|
this.loadingS2011 = true;
|
|
|
listS2011(this.queryParams).then(response => {
|
|
|
- this.s2011List = response.rows;
|
|
|
+ this.s2011List = response.data;
|
|
|
this.loadingS2011 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS2400() {
|
|
|
this.loadingS2400 = true;
|
|
|
listS2400(this.queryParams).then(response => {
|
|
|
- this.s2400List = response.rows;
|
|
|
+ this.s2400List = response.data;
|
|
|
this.loadingS2400 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS3004() {
|
|
|
this.loadingS3004 = true;
|
|
|
listS3004(this.queryParams).then(response => {
|
|
|
- this.s3004List = response.rows;
|
|
|
+ this.s3004List = response.data;
|
|
|
this.loadingS3004 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS3009() {
|
|
|
this.loadingS3009 = true;
|
|
|
listS3009(this.queryParams).then(response => {
|
|
|
- this.s3009List = response.rows;
|
|
|
+ this.s3009List = response.data;
|
|
|
this.loadingS3009 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS3010() {
|
|
|
this.loadingS3010 = true;
|
|
|
listS3010(this.queryParams).then(response => {
|
|
|
- this.s3010List = response.rows;
|
|
|
+ this.s3010List = response.data;
|
|
|
this.loadingS3010 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS3011() {
|
|
|
this.loadingS3011 = true;
|
|
|
listS3011(this.queryParams).then(response => {
|
|
|
- this.s3011List = response.rows;
|
|
|
+ this.s3011List = response.data;
|
|
|
this.loadingS3011 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS3012() {
|
|
|
this.loadingS3012 = true;
|
|
|
listS3012(this.queryParams).then(response => {
|
|
|
- this.s3012List = response.rows;
|
|
|
+ this.s3012List = response.data;
|
|
|
this.loadingS3012 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS3022() {
|
|
|
this.loadingS3022 = true;
|
|
|
listS3022(this.queryParams).then(response => {
|
|
|
- this.s3022List = response.rows;
|
|
|
+ this.s3022List = response.data;
|
|
|
this.loadingS3022 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS4012() {
|
|
|
this.loadingS4012 = true;
|
|
|
listS4012(this.queryParams).then(response => {
|
|
|
- this.s4012List = response.rows;
|
|
|
+ this.s4012List = response.data;
|
|
|
this.loadingS4012 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS4013() {
|
|
|
this.loadingS4013 = true;
|
|
|
listS4013(this.queryParams).then(response => {
|
|
|
- this.s4013List = response.rows;
|
|
|
+ this.s4013List = response.data;
|
|
|
this.loadingS4013 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS4501() {
|
|
|
this.loadingS4501 = true;
|
|
|
listS4501(this.queryParams).then(response => {
|
|
|
- this.s4501List = response.rows;
|
|
|
+ this.s4501List = response.data;
|
|
|
this.loadingS4501 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS5001() {
|
|
|
this.loadingS5001 = true;
|
|
|
listS5001(this.queryParams).then(response => {
|
|
|
- this.s5001List = response.rows;
|
|
|
+ this.s5001List = response.data;
|
|
|
this.loadingS5001 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS5003() {
|
|
|
this.loadingS5003 = true;
|
|
|
listS5003(this.queryParams).then(response => {
|
|
|
- this.s5003List = response.rows;
|
|
|
+ this.s5003List = response.data;
|
|
|
this.loadingS5003 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS5010() {
|
|
|
this.loadingS5010 = true;
|
|
|
listS5010(this.queryParams).then(response => {
|
|
|
- this.s5010List = response.rows;
|
|
|
+ this.s5010List = response.data;
|
|
|
this.loadingS5010 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS5012() {
|
|
|
this.loadingS5012 = true;
|
|
|
listS5012(this.queryParams).then(response => {
|
|
|
- this.s5012List = response.rows;
|
|
|
+ this.s5012List = response.data;
|
|
|
this.loadingS5012 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS6101() {
|
|
|
this.loadingS6101 = true;
|
|
|
listS6101(this.queryParams).then(response => {
|
|
|
- this.s6101List = response.rows;
|
|
|
+ this.s6101List = response.data;
|
|
|
this.loadingS6101 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS6107() {
|
|
|
this.loadingS6107 = true;
|
|
|
listS6107(this.queryParams).then(response => {
|
|
|
- this.s6107List = response.rows;
|
|
|
+ this.s6107List = response.data;
|
|
|
this.loadingS6107 = false;
|
|
|
});
|
|
|
},
|
|
|
getListS6301() {
|
|
|
this.loadingS6301 = true;
|
|
|
listS6301(this.queryParams).then(response => {
|
|
|
- this.s6301List = response.rows;
|
|
|
+ this.s6301List = response.data;
|
|
|
this.loadingS6301 = false;
|
|
|
});
|
|
|
},
|
|
|
getListZ404() {
|
|
|
this.loadingZ404 = true;
|
|
|
listZ404(this.queryParams).then(response => {
|
|
|
- this.z404List = response.rows;
|
|
|
+ this.z404List = response.data;
|
|
|
this.loadingZ404 = false;
|
|
|
});
|
|
|
},
|
|
@@ -3191,8 +3210,6 @@ export default {
|
|
|
},
|
|
|
/** 搜索按钮操作 */
|
|
|
handleQuery() {
|
|
|
- this.queryParams.startDate = this.sampleDate[0];
|
|
|
- this.queryParams.endDate = this.sampleDate[1];
|
|
|
this.getList();
|
|
|
},
|
|
|
/** 重置按钮操作 */
|
|
@@ -3775,17 +3792,16 @@ export default {
|
|
|
},
|
|
|
/** 导出按钮操作 */
|
|
|
handleExport() {
|
|
|
- alert("功能开发中")
|
|
|
- // const queryParams = this.queryParams;
|
|
|
- // this.$confirm('是否确认导出所有质量月报S0501数据项?', "警告", {
|
|
|
- // confirmButtonText: "确定",
|
|
|
- // cancelButtonText: "取消",
|
|
|
- // type: "warning"
|
|
|
- // }).then(function() {
|
|
|
- // return exportS0501(queryParams);
|
|
|
- // }).then(response => {
|
|
|
- // this.download(response.msg);
|
|
|
- // })
|
|
|
+ const queryParams = this.queryParams;
|
|
|
+ this.$confirm('是否确认导出所有质量月报数据项?', "警告", {
|
|
|
+ confirmButtonText: "确定",
|
|
|
+ cancelButtonText: "取消",
|
|
|
+ type: "warning"
|
|
|
+ }).then(function() {
|
|
|
+ return exportQuality(queryParams);
|
|
|
+ }).then(response => {
|
|
|
+ this.download(response.msg);
|
|
|
+ })
|
|
|
},
|
|
|
/** 导入按钮操作 */
|
|
|
handleImport() {
|