This commit is contained in:
2023-02-02 09:01:28 +08:00
parent 319c285641
commit 3161b54cd7
13 changed files with 324 additions and 316 deletions

View File

@@ -2,16 +2,18 @@
* @Author: zwq
* @Date: 2022-09-15 10:22:53
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:25:39
* @LastEditTime: 2023-01-09 14:20:16
* @Description: C图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="2"
:page-name="'缺陷数图'"
:data-form="dataForm"
:groupTypeShow="true"
:showRaw="false"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -31,6 +33,9 @@
></chart-line>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
</el-card>
</template>

View File

@@ -2,16 +2,18 @@
* @Author: zwq
* @Date: 2022-09-15 10:22:53
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:27:52
* @LastEditTime: 2023-01-09 14:20:30
* @Description: NP图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="2"
:page-name="'NP图'"
:data-form="dataForm"
:groupTypeShow="true"
:showRaw="false"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -31,6 +33,9 @@
></chart-line>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
</el-card>
</template>

View File

@@ -2,16 +2,18 @@
* @Author: zwq
* @Date: 2022-09-15 10:22:53
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:27:58
* @LastEditTime: 2023-01-09 14:20:41
* @Description: P图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="2"
:page-name="'NP图'"
:data-form="dataForm"
:groupTypeShow="true"
:showRaw="false"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -31,6 +33,9 @@
></chart-line>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
</el-card>
</template>

View File

@@ -2,16 +2,18 @@
* @Author: zwq
* @Date: 2022-09-15 10:22:53
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:28:04
* @LastEditTime: 2023-01-09 14:20:53
* @Description: U图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="2"
:page-name="'U图'"
:data-form="dataForm"
:groupTypeShow="true"
:showRaw="false"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -31,6 +33,9 @@
></chart-line>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
</el-card>
</template>

View File

@@ -2,15 +2,17 @@
* @Author: zwq
* @Date: 2022-09-15 10:23:42
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:31:18
* @LastEditTime: 2023-01-09 14:26:17
* @Description: 单值-移动极差 控制图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="1"
:page-name="'单值-移动极差控制图'"
:data-form="dataForm"
:showRaw="chartVisible"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -72,6 +74,16 @@
</el-card>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
<!-- 原始数据 -->
<raw-data
:lineIndex="2"
:dataList="dataList.xmrGraphEntity.list"
v-if="rawDataVisible"
ref="rawDataRef"
></raw-data>
</el-card>
</template>
@@ -79,6 +91,7 @@
import queryForm from "../query-form";
import processPage from "@/mixins/process-page";
import chartLine from "../charts/echart-2line.vue";
import rawData from "../components/rawData";
export default {
mixins: [processPage],
data() {
@@ -89,6 +102,7 @@ export default {
exportUrl: "/basic/unit/export",
},
chartVisible: false,
rawDataVisible: false,
chartTitle: "单值-移动极差控制图",
yName1: "单值",
yName2: "移动极差",
@@ -99,6 +113,7 @@ export default {
components: {
queryForm,
chartLine,
rawData,
},
created() {
this.$nextTick(() => {
@@ -140,12 +155,14 @@ export default {
// name: "ucl(上图)",
// value: res.data.xbarCL.ucl,
// });
if (res.data.sl) {
Object.keys(res.data.sl).map((key) => {
this.rightList.push({
name: key,
value: res.data.sl[key],
});
});
}
// this.rightList.push({
// name: "cl(下图)",
// value: res.data.rcl.cl,
@@ -158,12 +175,15 @@ export default {
// name: "ucl(下图)",
// value: res.data.rcl.ucl,
// });
if (res.data.standardDiviation) {
Object.keys(res.data.standardDiviation).map((key) => {
this.rightList.push({
name: key,
value: res.data.standardDiviation[key],
});
});
}
if (res.data.processCapability) {
Object.keys(res.data.processCapability).map((key) => {
if (key === "warming") {
this.waring = res.data.processCapability[key];
@@ -174,16 +194,28 @@ export default {
});
}
});
}
if (res.data.xmrGraphEntity) {
this.chartVisible = true;
this.$nextTick(() => {
this.$refs.XMRGraph.initChartLine();
});
}else{
this.chartVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
});
},
rawData() {
console.log("原始数据");
this.rawDataVisible = true;
this.$nextTick(() => {
this.$refs.rawDataRef.init();
});
},
},
};

View File

@@ -2,15 +2,17 @@
* @Author: zwq
* @Date: 2022-09-15 10:22:12
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:31:07
* @LastEditTime: 2023-01-09 14:18:18
* @Description: 均值极差控制图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="1"
:page-name="'均值极差控制图'"
:data-form="dataForm"
:showRaw="chartVisible"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -72,6 +74,16 @@
</el-card>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
<!-- 原始数据 -->
<raw-data
:lineIndex="0"
:dataList="dataList.mrGraphEntity.list"
v-if="rawDataVisible"
ref="rawDataRef"
></raw-data>
</el-card>
</template>
@@ -79,6 +91,7 @@
import queryForm from "../query-form";
import processPage from "@/mixins/process-page";
import chartLine from "../charts/echart-2line.vue";
import rawData from "../components/rawData";
export default {
mixins: [processPage],
data() {
@@ -89,6 +102,7 @@ export default {
exportUrl: "/basic/unit/export",
},
chartVisible: false,
rawDataVisible: false,
chartTitle: "均值极差控制图",
yName1: "均值",
yName2: "极差",
@@ -99,6 +113,7 @@ export default {
components: {
queryForm,
chartLine,
rawData,
},
created() {
this.$nextTick(() => {
@@ -140,12 +155,14 @@ export default {
// name: "ucl(上图)",
// value: res.data.xbarCL.ucl,
// });
Object.keys(res.data.sl).map((key) => {
this.rightList.push({
name: key,
value: res.data.sl[key],
if (res.data.sl) {
Object.keys(res.data.sl).map((key) => {
this.rightList.push({
name: key,
value: res.data.sl[key],
});
});
});
}
// this.rightList.push({
// name: "cl(下图)",
// value: res.data.rcl.cl,
@@ -158,32 +175,47 @@ export default {
// name: "ucl(下图)",
// value: res.data.rcl.ucl,
// });
Object.keys(res.data.standardDiviation).map((key) => {
this.rightList.push({
name: key,
value: res.data.standardDiviation[key],
});
});
Object.keys(res.data.processCapability).map((key) => {
if (key === "warming") {
this.waring = res.data.processCapability[key];
} else {
if (res.data.standardDiviation) {
Object.keys(res.data.standardDiviation).map((key) => {
this.rightList.push({
name: key,
value: res.data.processCapability[key],
value: res.data.standardDiviation[key],
});
}
});
this.chartVisible = true;
this.$nextTick(() => {
this.$refs.chartRef.initChartLine();
});
});
}
if (res.data.processCapability) {
Object.keys(res.data.processCapability).map((key) => {
if (key === "warming") {
this.waring = res.data.processCapability[key];
} else {
this.rightList.push({
name: key,
value: res.data.processCapability[key],
});
}
});
}
if (res.data.mrGraphEntity) {
this.chartVisible = true;
this.$nextTick(() => {
this.$refs.chartRef.initChartLine();
});
} else {
this.chartVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
});
},
rawData() {
console.log("原始数据");
this.rawDataVisible = true;
this.$nextTick(() => {
this.$refs.rawDataRef.init();
});
},
},
};

View File

@@ -2,15 +2,17 @@
* @Author: zwq
* @Date: 2022-09-15 10:22:53
* @LastEditors: zwq
* @LastEditTime: 2022-12-16 15:31:13
* @LastEditTime: 2023-01-09 14:21:51
* @Description: 均值标准差控制图
-->
<template>
<el-card shadow="never" class="aui-card--fill">
<query-form
ref="queryForm"
:f-type="1"
:page-name="'均值标准差控制图'"
:data-form="dataForm"
:showRaw="chartVisible"
@getDataList="getDataList"
@rawData="rawData"
@exportHandle="exportHandle"
@@ -72,6 +74,16 @@
</el-card>
</el-col>
</el-row>
<el-row :gutter="6" v-else>
<el-empty description="无数据"></el-empty>
</el-row>
<!-- 原始数据 -->
<raw-data
:lineIndex="1"
:dataList="dataList.msdGraphEntity.list"
v-if="rawDataVisible"
ref="rawDataRef"
></raw-data>
</el-card>
</template>
@@ -79,6 +91,7 @@
import queryForm from "../query-form";
import processPage from "@/mixins/process-page";
import chartLine from "../charts/echart-2line.vue";
import rawData from "../components/rawData";
export default {
mixins: [processPage],
data() {
@@ -89,6 +102,7 @@ export default {
exportUrl: "/basic/unit/export",
},
chartVisible: false,
rawDataVisible: false,
chartTitle: "均值标准差控制图",
yName1: "均值",
yName2: "标准差",
@@ -99,6 +113,7 @@ export default {
components: {
queryForm,
chartLine,
rawData,
},
created() {
this.$nextTick(() => {
@@ -140,12 +155,14 @@ export default {
// name: "ucl(上图)",
// value: res.data.xbarCL.ucl,
// });
if (res.data.sl) {
Object.keys(res.data.sl).map((key) => {
this.rightList.push({
name: key,
value: res.data.sl[key],
});
});
}
// this.rightList.push({
// name: "cl(下图)",
// value: res.data.rcl.cl,
@@ -158,12 +175,15 @@ export default {
// name: "ucl(下图)",
// value: res.data.rcl.ucl,
// });
if (res.data.standardDiviation) {
Object.keys(res.data.standardDiviation).map((key) => {
this.rightList.push({
name: key,
value: res.data.standardDiviation[key],
});
});
}
if (res.data.processCapability) {
Object.keys(res.data.processCapability).map((key) => {
if (key === "warming") {
this.waring = res.data.processCapability[key];
@@ -174,16 +194,28 @@ export default {
});
}
});
}
if (res.data.msdGraphEntity) {
this.chartVisible = true;
this.$nextTick(() => {
this.$refs.chart1Ref.initChartLine();
});
}else{
this.chartVisible = false;
this.$message({
message: "没有发现数据",
type: "warning",
});
}
})
.catch(() => {});
});
},
rawData() {
console.log("原始数据");
this.rawDataVisible = true;
this.$nextTick(() => {
this.$refs.rawDataRef.init();
});
},
},
};

View File

@@ -93,6 +93,7 @@ export default {
// 折线图
initChartLine() {
const rclUcl = this.rcl.ucl;
const xbarCL = this.xbarCL
var option = {
title: {
text: this.title,
@@ -178,7 +179,7 @@ export default {
},
splitLine: { show: false },
nameTextStyle: {
padding: 25,
padding: 38,
},
position: "left",
axisLine: {
@@ -198,15 +199,23 @@ export default {
type: "value",
gridIndex: 0,
name: this.yName1,
min: function(value) {
return value.min - 1;
max: function(value) {
if (xbarCL.ucl > value.max + 1) {
return xbarCL.ucl + 0.5;
} else {
return value.max + 1;
}
},
max: function(value) {
return value.max + 1;
min: function(value) {
if (xbarCL.lcl < value.min - 1) {
return xbarCL.lcl - 0.5;
} else {
return value.min - 1;
}
},
splitLine: { show: false },
nameTextStyle: {
padding: 25,
padding: 38,
},
nameLocation: "middle",
position: "left",
@@ -572,8 +581,6 @@ export default {
},
],
};
console.log(this.mrGraphEntity)
console.log(this.lowLine[this.lineIndex].rules)
this.mrGraphEntity.list?.forEach((item, index) => {
if (item[this.lowLine[this.lineIndex].rules].length) {
option.visualMap[1].pieces.push({

View File

@@ -0,0 +1,94 @@
<!--
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: zwq
* @LastEditTime: 2023-01-09 15:48:09
* @Description:
-->
<template>
<el-dialog title="原始数据" :visible.sync="visible">
<el-table
:data="dataList"
:stripe="true"
:header-cell-style="{
background: '#eef1f6',
color: '#606266',
height: '56px',
}"
height="500"
v-loading="dataListLoading"
style="width: 100%;"
>
<el-table-column type="index" header-align="center" align="center" label="序号" width="50">
</el-table-column>
<el-table-column prop="data" align="center" label="原始数据">
<template slot-scope="scope">
<span>{{ lineIndex === 2 ? scope.row.x : scope.row.data.toString() }}</span>
</template>
</el-table-column>
<!-- <el-table-column :prop="lowLine[lineIndex].rules" align="center" :label="'判读'+lowLine[lineIndex].name">
<template slot-scope="scope">
<span>{{ scope.row[lowLine[lineIndex].rules].toString() }}</span>
</template>
</el-table-column> -->
<el-table-column
:prop="lowLine[lineIndex].name"
align="center"
:label="lowLine[lineIndex].name"
>
</el-table-column>
<!-- <el-table-column :prop="upLine[lineIndex].rules" align="center" :label="'判读'+upLine[lineIndex].name">
<template slot-scope="scope">
<span>{{ scope.row[upLine[lineIndex].rules].toString() }}</span>
</template>
</el-table-column> -->
<el-table-column
:prop="upLine[lineIndex].name"
align="center"
:label="upLine[lineIndex].name"
>
</el-table-column>
</el-table>
</el-dialog>
</template>
<script>
export default {
props: {
dataList: {
type: Array,
default: () => {
[];
},
},
lineIndex: {
type: Number,
default: 0,
},
},
data() {
return {
dataListLoading: false,
visible: false,
upLine: [
{ name: "xbar", rules: "xbarUnsatisfiedRules" },
{ name: "xbar", rules: "xbarUnsatisfiedRules" },
{ name: "x", rules: "xUnsatisfiedRules" },
],
lowLine: [
{ name: "r", rules: "rUnsatisfiedRules" },
{ name: "s", rules: "sUnsatisfiedRules" },
{ name: "rs", rules: "rsUnsatisfiedRules" },
],
};
},
methods: {
init() {
console.log(this.dataList);
this.visible = true;
this.dataListLoading = false;
this.$nextTick(() => {});
},
},
};
</script>

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-09-15 10:44:29
* @LastEditors: zwq
* @LastEditTime: 2023-01-06 15:21:11
* @LastEditTime: 2023-01-09 14:10:26
* @Description:
-->
<template>
@@ -147,7 +147,7 @@
<svg class="icon-svg"><use xlink:href="#icon-sousuo"></use></svg>
查询
</el-button>
<el-button size="small" type="primary" @click="rawData()">
<el-button v-if="showRaw" size="small" type="primary" @click="rawData()">
<svg class="icon-svg"><use xlink:href="#历史记录"></use></svg>
原始数据
</el-button>
@@ -193,6 +193,14 @@ export default {
type: Boolean,
default: false,
},
fType: {
type: Number,
default: 1,
},
showRaw: {
type: Boolean,
default: false,
}
},
components: {
interpretationScheme,
@@ -218,6 +226,13 @@ export default {
trigger: "change",
},
],
workingProcedureId: [
{
required: true,
message: "请选择工序",
trigger: "change",
},
],
time: [
{
required: true,
@@ -231,8 +246,8 @@ export default {
created() {},
methods: {
getWorkingprocedureByProductId(val) {
this.dataForm.inspectionStage = "";
this.dataForm.workingProcedureId = "";
this.$set(this.dataForm, "inspectionStage", "");
this.$set(this.dataForm, "workingProcedureId", "");
this.getWorkingprocedureArr(val);
this.getFeaturesList();
},
@@ -286,7 +301,7 @@ export default {
});
},
getFeaturesList() {
this.$set(this.dataForm, 'productFeaturesId', '')
this.$set(this.dataForm, "productFeaturesId", "");
this.$http
.post(
`/processInspection/inspectionSheet/getInspectionSheetFeaturesList?productId=${
@@ -304,17 +319,20 @@ export default {
this.$set(this.optionArr, "arr2", []);
return this.$message.error(res.msg);
}
this.$set(this.optionArr, "arr2", res.data);
const arr = res.data.filter((item) => item.type === this.fType);
this.$set(this.optionArr, "arr2", arr);
})
.catch(() => {});
},
getDataList() {
console.log(this.dataForm)
(this.dataForm.begin =
this.dataForm.time && this.dataForm.time.length > 0 ? this.dataForm.time[0] : ""),
(this.dataForm.end =
this.dataForm.time && this.dataForm.time.length > 0 ? this.dataForm.time[1] : ""),
this.$emit("getDataList");
this.dataForm.procedureName = this.optionArr.arr4.find((item) => {
return item.workingProcedureId === this.dataForm.workingProcedureId;
})?.workingProcedureName;
this.dataForm.begin =
this.dataForm.time && this.dataForm.time.length > 0 ? this.dataForm.time[0] : "";
this.dataForm.end =
this.dataForm.time && this.dataForm.time.length > 0 ? this.dataForm.time[1] : "";
this.$emit("getDataList");
},
showScheme() {
this.SchemeVisible = true;