修改bug

This commit is contained in:
‘937886381’
2024-03-21 16:34:34 +08:00
parent aa582495de
commit f7aa5375d0
12 changed files with 220 additions and 195 deletions

View File

@@ -1,12 +1,12 @@
<!--
* @Author: zhp
* @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-03-15 14:54:38
* @LastEditTime: 2024-03-21 10:40:52
* @LastEditors: zhp
* @Description:
-->
<template>
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="false" class="drawer" size="50%">
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="true" class="drawer" size="50%">
<small-title slot="title" :no-padding="true" @close="handleClose">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title>
@@ -114,7 +114,7 @@
</el-col>
<el-col :span="8">
<el-form-item label="原料等级" prop="materialGrade">
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择" style="width: 100%;">
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择">
<el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@@ -122,14 +122,14 @@
</el-col>
</el-row>
<el-form-item label="备注" prop="remark">
<el-input :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注" style="width: 100%;">
<el-input @input="onInput" :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注">
</el-input>
</el-form-item>
</el-form>
<!-- </div> -->
<div class="attr-list" v-if="idAttrShow">
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
<!-- <div class="attr-list" v-if="idAttrShow"> -->
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
设备物料明细
</small-title>
@@ -147,9 +147,9 @@
</base-table>
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" /> -->
</div>
<!-- </div> -->
</div>
<div class="drawer-body__footer">
<div v-if="!isdetail" class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
@@ -237,7 +237,7 @@ export default {
checkValueList: [],
checkResult: '',
materialGrade: undefined,
remark:null,
remark:undefined,
},
productAttrList: [],
visible: false,
@@ -257,6 +257,9 @@ export default {
mounted() {
},
methods: {
onInput() {
this.$forceUpdate();
},
judgeValue(val, minValue, maxValue, index) {
if (val >= minValue && val <= maxValue) {
console.log(val)
@@ -268,7 +271,7 @@ export default {
}
},
handleClose() {
this.ingredientList = undefined
this.ingredientList = []
console.log(222222222);
},
dataFormSubmit() {
@@ -454,17 +457,17 @@ export default {
// });
// },
init(id, isdetail) {
this.initData()
// this.initData()
this.getDict()
this.ingredientList = []
this.isdetail = isdetail || false;
this.dataForm.id = id || undefined;
this.visible = true;
if (id) {
this.idAttrShow = true
} else {
this.idAttrShow = false
}
// if (id) {
// this.idAttrShow = true
// } else {
// this.idAttrShow = false
// }
this.$nextTick(() => {
this.$refs['dataForm'].resetFields();
@@ -537,9 +540,9 @@ export default {
// 获取产品属性列表
// this.getList();
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
// if (this.urlOptions.isGetCode) {
// this.getCode()
// }
}
});
},
@@ -553,12 +556,12 @@ export default {
this.isdetail = false;
},
// 新增 / 修改
addNew(id) {
this.addOrUpdateVisible = true;
this.$nextTick(() => {
this.$refs.addOrUpdate.init(id,this.dataForm.id);
});
}
// addNew(id) {
// this.addOrUpdateVisible = true;
// this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id,this.dataForm.id);
// });
// }
}
};
</script>

View File

@@ -118,6 +118,7 @@ export default {
labelField: 'name',
valueField: 'id',
param: 'materialId',
filterable: true
},
{
type: 'datePicker',

View File

@@ -32,7 +32,7 @@
<!-- </span> -->
<el-tabs style="margin-top: 10px;" v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="天" name="day">
<div id="mapDayMain" style="height: 500px;width: 1000px;"></div>
<div id="mapDayMain" style="margin-bottom: 30px;height: 500px;width: 1000px;"></div>
<div id="listDayMain" style="height: 500px;width: 1000px;"></div>
</el-tab-pane>
<el-tab-pane label="周" name="week">
@@ -232,18 +232,23 @@ export default {
var option;
option = {
title: {
text: '各类型缺陷对比图'
text: '各类型缺陷对比图',
// top:'5px'
},
tooltip: {
trigger: 'axis'
},
legend: {
data: mapLegendData
data: mapLegendData,
top: "10%",
y: 'top',
x:'left'
},
grid: {
left: '3%',
right: '4%',
bottom: '3%',
top:'20%',
containLabel: true
},
// toolbox: {
@@ -299,7 +304,7 @@ export default {
trigger: 'axis'
},
legend: {
data: ['缺陷数量', '缺陷率']
data: ['缺陷数量', '缺陷率'],
},
grid: {
left: '3%',
@@ -345,15 +350,15 @@ export default {
type: 'bar',
barWidth: '3%',
data: listNumArr,
label: {
show: true, //开启显示
position: 'top', //在上方显示
// formatter: '{c}%',//显示百分号
textStyle: { //数值样式
color: 'black',//字体颜色
fontSize: 20//字体大小
}
}
// label: {
// show: true, //开启显示
// position: 'top', //在上方显示
// // formatter: '{c}%',//显示百分号
// textStyle: { //数值样式
// color: 'black',//字体颜色
// fontSize: 12//字体大小
// }
// }
},
{
name: '缺陷率',
@@ -464,6 +469,7 @@ export default {
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
this.getList()
this.getData()
}
console.log(val);
}

View File

@@ -101,6 +101,7 @@ export default {
label: '报废原因',
placeholder: '报废原因',
param: 'content',
// filterable: true
},
{
type: 'select',
@@ -109,6 +110,7 @@ export default {
labelField: 'name',
valueField: 'id',
param: 'typeId',
filterable: true
},
{
type: 'button',

View File

@@ -107,6 +107,7 @@ export default {
labelField: 'name',
valueField: 'id',
param: 'workOrderId',
filterable: true
},
{
type: 'select',
@@ -115,6 +116,7 @@ export default {
labelField: 'name',
valueField: 'id',
param: 'teamId',
filterable: true
},
{
type: 'button',