修改bug

This commit is contained in:
‘937886381’
2023-11-28 10:54:51 +08:00
parent afafbccc0c
commit 79c9f1ca66
22 changed files with 315 additions and 287 deletions

View File

@@ -315,7 +315,11 @@ export default {
data: arrYAxis,
type: 'bar',
showBackground: true,
barWidth:'20',
barWidth: '20',
label: {
show: true,
position: 'top'
},
backgroundStyle: {
color: 'rgba(180, 180, 180, 0.2)'
}

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-10 16:25:02
* @LastEditTime: 2023-11-24 10:55:54
* @Description:
-->
<template>
@@ -132,6 +132,9 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
// {
// type: 'separate',
// },

View File

@@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2023-11-10 16:32:28
* @LastEditTime: 2023-11-28 10:51:44
* @Description:
-->
<template>
@@ -26,10 +26,10 @@ import { parseTime } from '../mixins/code-filter';
import {
getProcessTraceabilityPage,
getWorkOrderList,
getCoreProduct
// exportEnergyPlcExcel
} from '@/api/quality/processTraceability';
import { publicFormatter } from '@/utils/dict';
const tableProps = [
{
prop: 'name',
@@ -46,7 +46,7 @@ const tableProps = [
{
prop: 'status',
label: '状态',
filter:publicFormatter('work_order_status')
filter: (val) => val == 1 ? '等待' : val == 2 ? '激活' : val == 3 ? '暂停' : val == 4 ? '完成' : '作废',
},
{
prop: 'startProduceTime',
@@ -63,7 +63,7 @@ const tableProps = [
label: '生产数量'
},
{
prop: 'unit',
prop: 'planProductUnit',
label: '单位',
filter: publicFormatter('unit_dict')
},
@@ -73,7 +73,7 @@ const tableProps = [
},
{
prop: 'yield',
label: '成品率'
label: '合格率'
}
];
@@ -116,21 +116,22 @@ export default {
selectOptions: [],
labelField: 'name',
valueField: 'id',
param: 'orderName'
param: 'orderName',
filterable: true,
},
{
type: 'datePicker',
label: '工单开始时间',
dateType: 'daterange',
format: 'yyyy-MM-dd',
valueFormat: "yyyy-MM-dd",
rangeSeparator: '-',
startPlaceholder: '开始时间',
endPlaceholder: '结束时间',
param: 'timeVal',
defaultSelect: [],
width: 250
},
// {
// type: 'datePicker',
// label: '时间段',
// dateType: 'daterange',
// format: 'yyyy-MM-dd',
// valueFormat: "yyyy-MM-dd",
// rangeSeparator: '-',
// startPlaceholder: '开始时间',
// endPlaceholder: '结束时间',
// param: 'timeVal',
// defaultSelect: [],
// width: 250
// },
{
type: 'button',
btnName: '搜索',
@@ -185,17 +186,25 @@ export default {
handleClick(val) {
if (val.type === "processDetail") {
console.log(val);
this.$router.push({
name: 'process-traceability-detail',
params: {
id: '1715180991838887938',
orderId: val.data.id,
name: val.data.name,
productName: val.data.planProductName,
processFlowName: val.data.processFlowName
// equipmentName,
},
});
let specificationsData =''
getCoreProduct(val.data.planProductId).then((res) => {
console.log(res)
this.$router.push({
path: 'process-traceability-detail',
query: {
id: val.data.processFlowId,
orderId: val.data.id,
name: val.data.name,
specifications: res.data.specifications,
productName: val.data.planProductName,
processFlowName: val.data.processFlowName,
// planProductId: val.data.planProductId
// equipmentName,
},
});
})
// this.deleteHandle(val.data.id, val.data.name, val.data._pageIndex)
}
},
@@ -241,13 +250,13 @@ export default {
if (val.btnName === 'search') {
this.listQuery.orderName = val.orderName ? val.orderName :undefined
// this.queryParams.status = val.status
// if (val.timeVal && val.timeVal.length != 0 ) {
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
// this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
// } else {
// this.listQuery.startTime = undefined
// this.listQuery.endTime = undefined
// }
if (val.timeVal && val.timeVal.length != 0 ) {
this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'
this.listQuery.endTime = val.timeVal[1] + ' 23:59:59'
} else {
this.listQuery.startTime = undefined
this.listQuery.endTime = undefined
}
this.getList()
} else {
// this.handleExport()

View File

@@ -117,11 +117,11 @@ export default {
// },
{ prop: 'name', label: '参数名' },
{
prop: 'name', label: '设定范围最小- 最大 / 标准',
prop: 'status', label: '设定范围最小- 最大 / 标准',
subcomponent: StatusBtn
},
{
prop: 'code', label: '最小值',
prop: '', label: '最小值',
children: [
{
prop: 'minValueSet',
@@ -134,7 +134,7 @@ export default {
]
},
{
prop: 'code', label: '最大值',
prop: '', label: '最大值',
children: [
{
prop: 'maxValueSet',
@@ -184,9 +184,9 @@ export default {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
// orderId: this.$route.query.orderId,
},).then((res) => {
console.log(res);
@@ -231,25 +231,29 @@ export default {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
// orderId: this.$route.query.orderId,
},).then((res) => {
this.materialList = res.data[0].data
this.name = res.data[0].name
if (res.data.length != []) {
this.materialList = res.data[0].data
this.name = res.data[0].name
}
})
} else {
getDetValue({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
// orderId: this.$route.params.orderId,
// orderId: this.$route.query.orderId,
}).then((res) => {
this.valueList = res.data[0].data
this.name = res.data[0].name
if (res.data.length != []) {
this.valueList = res.data[0].data
this.name = res.data[0].name
}
})
}
},
@@ -258,12 +262,14 @@ export default {
getDetMaterial({
pageNo: 1,
pageSize: 10,
orderId: this.$route.params.orderId,
orderId: this.$route.query.orderId,
flowDetId: [this.detId],
}).then((res) => {
console.log(res);
this.materialList = res.data[0].data
this.name = res.data[0].name
if (res.data.length != []) {
this.materialList = res.data[0].data
this.name = res.data[0].name
}
})
},
clearList() {

View File

@@ -123,7 +123,7 @@ export default {
}
},
mounted() {
console.log(this.$route.params.id)
console.log(this.$route.query.id)
this.loadLayout().then(json => {
this.initGraph(json)
})
@@ -260,7 +260,7 @@ export default {
},
async loadLayout() {
const flowId = this.$route.params.id;
const flowId = this.$route.query.id;
console.log(flowId)
if (!flowId) return { cells: [] }
const { code, data } = await this.info({ id: flowId });
@@ -288,12 +288,12 @@ export default {
async handleUpdateLayout() {
this.layout.content = JSON.stringify(this.graph.toJSON());
let code, data;
console.table([this.layout, this.$route.params.id])
console.table([this.layout, this.$route.query.id])
// 手动刷新布局
if (this.layout.id) {
({ code, data } = await this.http('/extend/process-flow-view/update', 'put', this.layout));
} else {
this.layout.flowId = this.$route.params.id;
this.layout.flowId = this.$route.query.id;
({ code, data } = await this.http('/extend/process-flow-view/create', 'post', this.layout));
}
@@ -410,7 +410,7 @@ export default {
},
createProcess() {
// const flowId = this.$route.params.id;
// const flowId = this.$route.query.id;
const flowId = this.getFlowId(); // it also works
if (!flowId) {
this.$modal.msgError('工艺ID不能为空');

View File

@@ -20,14 +20,13 @@
<InfoItem label="产品名称" :value="form.productName" />
</el-col>
<el-col :span="6">
<InfoItem label="产品规格" />
<InfoItem label="产品规格" :value="form.specifications" />
</el-col>
</el-row>
</section>
</template>
<script>
const InfoItem = {
name: 'InfoItem',
components: {},
@@ -62,6 +61,7 @@ export default {
id: null,
name: null,
productName: null,
specifications:null,
processFlowName: null,
// remark: null,
// enable: null,
@@ -70,7 +70,8 @@ export default {
};
},
mounted() {
this.getInfo()
this.getInfo()
console.log(this.$route.query)
},
computed: {},
methods: {
@@ -95,12 +96,14 @@ export default {
// info(payload) {
// return this.http(this.infoUrl, 'get', payload);
// },
async getInfo() {
this.form.name = this.$route.params.name
this.form.productName = this.$route.params.productName
this.form.processFlowName = this.$route.params.processFlowName
// this.form.name = this.$route.params.name
// const flowId = this.$route.params.id;
getInfo() {
// console.log(this.$route.query.planProductId);
this.form.name = this.$route.query.name
this.form.specifications = this.$route.query.specifications
this.form.productName = this.$route.query.productName
this.form.processFlowName = this.$route.query.processFlowName
// this.form.name = this.$route.query.name
// const flowId = this.$route.query.id;
// console.log(flowId);
// if (!flowId) this.$router.go(-1);
// const { code, data } = await this.info({ id: flowId });

View File

@@ -1,3 +1,10 @@
<!--
* @Author: zhp
* @Date: 2023-11-28 10:41:50
* @LastEditTime: 2023-11-28 10:49:43
* @LastEditors: zhp
* @Description:
-->
<!--
filename: index.vue
author: liubin
@@ -37,8 +44,8 @@ export default {
};
},
mounted() {
console.log('activated...', this.$route.params);
this.flowId = this.$route.params.id;
console.log('activated...', this.$route.query);
this.flowId = this.$route.query.id;
},
computed: {},
methods: {

View File

@@ -9,8 +9,8 @@
<!-- 列表 -->
<base-table
:table-props="tableProps"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:page="1"
:limit="10"
:table-data="list">
<!-- <method-btn
v-if="tableBtn.length"
@@ -109,9 +109,6 @@ export default {
name: 'search',
color: 'primary',
},
{
type: 'separate',
},
// {
// type: this.$auth.hasPermi(
// 'base:quality-inspection-record:create'