工艺问题修改

dev-scheduling
zhangdi 3 weeks ago
parent 5a9a5cad9d
commit 13f838b288
  1. 31
      src/views/processManagement/bathRefine/workCenterDevice.vue
  2. 8
      src/views/processManagement/components/inPlantMaintenance.vue
  3. 20
      src/views/processManagement/components/processMainte/partDetails.vue
  4. 8
      src/views/processManagement/inPlantProcess.vue
  5. 2
      src/views/processManagement/procepssPlanning.vue
  6. 186
      src/views/processManagement/sinTer/index.vue
  7. 2
      src/views/processManagement/taskProcessing.vue

@ -82,7 +82,7 @@ export default {
searchSpan: 6,
searchMenuPosition: 'right',
align: 'center',
span:24,
span: 24,
column: [
{
label: '作业中心',
@ -109,19 +109,34 @@ export default {
value: 'id',
},
},
// craftManName
{
label: '工艺员',
prop: 'craftManName',
type: 'select',
filterable: true,
clearable: true,
span:24,
// multiple: true,
span: 24,
search: false,
sortable: true,
overHidden: true,
headerAlign: 'center',
align: 'center',
display: false,
},
{
label: '工艺员',
prop: 'craftManId',
type: 'select',
filterable: true,
clearable: true,
span: 24,
search: false,
sortable: true,
overHidden: true,
headerAlign: 'center',
hide: true,
align: 'center',
dicUrl: '/blade-system/user/page?current=1&&size=99999',
props: {
@ -129,6 +144,9 @@ export default {
value: 'id',
res: 'data.records',
},
change: (val, row) => {
this.onChangeData(val, row, 'craftManId');
},
rules: [
{
required: true,
@ -161,6 +179,11 @@ export default {
},
mounted() {},
methods: {
onChangeData(value, row, type) {
if (value.value && type == 'craftManId') {
this.form.craftManName = value.item.realName;
}
},
rowDel(row) {
this.$confirm('确定将选择数据删除?', {
confirmButtonText: '确定',

@ -262,7 +262,7 @@ export default {
},
{
label: '工艺员',
prop: 'proMan',
prop: 'proManName',
search: false,
sortable: true,
filter: true,
@ -272,12 +272,6 @@ export default {
type: 'select',
filterable: true,
clearable: true,
dicUrl: '/blade-system/user/page?current=1&&size=99999',
props: {
label: 'realName',
value: 'id',
res: 'data.records',
},
rules: [
{
required: true,

@ -35,8 +35,8 @@
<el-form
ref="testForm"
:model="formData"
label-width="120px"
label-position="right"
label-width="80px"
label-position="left"
:validate-on-rule-change="false"
class="vd-form-three"
>
@ -83,7 +83,7 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品应用领域:" prop="productApplicationArea">
<el-form-item label="产品应用领域:" prop="productApplicationArea" label-width="90px">
{{ formData.productApplicationArea }}
</el-form-item>
</el-col>
@ -186,12 +186,12 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="有效周期(天):" prop="expirationPeriod">
<el-form-item label="有效周期(天):" prop="expirationPeriod" label-width="100px">
{{ formData.expirationPeriod }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="到期提醒(天):" prop="advanceRemind">
<el-form-item label="到期提醒(天):" prop="advanceRemind" label-width="100px">
{{ formData.advanceRemind }}
</el-form-item>
</el-col>
@ -327,17 +327,17 @@
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="产品应用领域:" prop="productApplicationArea">
<el-form-item label="产品应用领域:" prop="productApplicationArea" label-width="90px">
{{ formData.productApplicationArea }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="玻璃饼直径">
<el-form-item label="玻璃饼直径" label-width="90px">
{{ formData.blbDiameter }}
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="壳体最大外径">
<el-form-item label="壳体最大外径" label-width="90px">
{{ formData.externalDiameter }}
</el-form-item>
</el-col>
@ -1194,4 +1194,8 @@ export default {
height: 36px !important; /* 设置你想要的高度 */
line-height: 36px !important;
}
:deep(.el-form-item__label) {
font-weight: 550 !important;
// color: #333;
}
</style>

@ -183,7 +183,7 @@ export default {
},
{
label: '工艺员',
prop: 'proMan',
prop: 'proManName',
search: false,
sortable: true,
filter: true,
@ -191,12 +191,6 @@ export default {
headerAlign: 'center',
align: 'center',
searchLabelWidth: 60,
dicUrl: '/blade-system/user/page?current=1&&size=99999',
props: {
label: 'name',
value: 'id',
res: 'data.records',
},
},
{
label: '备注',

@ -185,7 +185,7 @@ export default {
},
{
label: '热表零件',
value: '2',
value: '0',
},
],
},

@ -212,105 +212,129 @@ export default {
this.isSubOpen = false;
this.isComponentOpen = false;
},
getTextWidth(text, fontSize = 14) {
getTextWidth(text, fontSize = 12) {
// fontSizefontSize/2
const cnChar = text.replace(/[a-zA-Z0-9]/g, '').length;
const enChar = text.length - cnChar;
return cnChar * fontSize + enChar * (fontSize / 2) + 20; // +20
return cnChar * fontSize + enChar * (fontSize / 2) + 10; // +20
},
//
createBarChart(value) {
const mapBoxEchart = this.$echarts.init(this.$refs.lineChart);
const option = {
series: [
{
roam: true,
type: 'tree',
data: value || [],
top: '20%',
left: '7%',
bottom: '20%',
right: '20%',
expandAndCollapse: false,
animationDuration: 550,
animationDurationUpdate: 750,
orient: 'vertical',
symbol: 'roundRect',
itemStyle: {
color: '#284c89',
borderWidth: 2,
borderColor: '#fff',
borderRadius: 4, //
paddingLeft: 10,
},
// ==*+
symbolSize: (val, params) => {
// params/name
const nodeName = params?.name || '未知节点';
const childCount = params?.children?.length || 0;
const childText = `${childCount}个子件`;
const nodeQuota = nodeData?.quota !== undefined ? nodeData.quota : '';
// ECharts
if (this.mapBoxEchart) {
this.mapBoxEchart.dispose();
this.mapBoxEchart = null;
}
//
const textWidth = Math.max(nodeName.length * 12, childText.length * 12) + 30;
//
let lineCount = 2; // 2 partCode + name
if (nodeQuota !== '' && nodeQuota !== null) {
lineCount = 3; // quota 3
}
// 20px + 20px
const height = lineCount * 20 + 10;
return [Math.max(textWidth, 100), height]; // 60px
},
this.$nextTick(() => {
if (!this.$refs.lineChart) return;
const mapBoxEchart = this.$echarts.init(this.$refs.lineChart);
this.mapBoxEchart = mapBoxEchart;
const option = {
tooltip: {
trigger: 'item',
triggerOn: 'mousemove',
},
series: [
{
roam: true,
type: 'tree',
data: value || [],
top: '10%',
left: '5%',
bottom: '10%',
right: '10%',
expandAndCollapse: false, //
initialTreeDepth: 2, //
animationDuration: 550,
animationDurationUpdate: 750,
orient: 'vertical',
symbol: 'roundRect',
itemStyle: {
color: '#284c89',
borderWidth: 2,
borderColor: '#fff',
borderRadius: 2,
},
//
// nodePadding: [30, 100], // []
// layerPadding: 80, //
//
symbolSize: (val, params) => {
const nodeData = params?.data || params;
const nodeName = nodeData?.name || '未知节点';
const nodePartCode = nodeData?.partCode || '';
const nodeQuota = nodeData?.quota !== undefined ? nodeData.quota : '';
//
const nameWidth = this.getTextWidth(nodeName);
const codeWidth = this.getTextWidth(nodePartCode);
const quotaWidth = nodeQuota ? this.getTextWidth(`${nodeQuota}`) : 0;
const maxWidth = Math.max(nameWidth, codeWidth, quotaWidth, 60);
//
let lineCount = 2;
if (nodeQuota !== '' && nodeQuota !== null) {
lineCount = 3;
}
const height = lineCount * 20 + 10;
label: {
position: 'inside',
show: true,
align: 'center',
verticalAlign: 'middle',
fontSize: 12,
lineHeight: 20,
color: '#fff',
formatter: params => {
const childText = params.data.quota >= 0 ? `${params.data.quota}` : '';
// \n
return `${params.data.partCode}\n${params.name}${
childText ? '\n' + childText : ''
}`;
return [Math.max(maxWidth, 60), height];
},
label: {
position: 'inside',
show: true,
align: 'center',
verticalAlign: 'middle',
fontSize: 12,
lineHeight: 18,
color: '#fff',
formatter: params => {
const nodeData = params.data || params;
const quotaText = nodeData.quota >= 0 ? `${nodeData.quota}` : '';
let result = `${nodeData.partCode}\n${nodeData.name}`;
if (quotaText) {
result += '\n' + quotaText;
}
return result;
},
},
// 线
lineStyle: {
color: '#ccc',
width: 1.5,
curveness: 0.5,
},
},
},
],
};
// 使
mapBoxEchart.setOption(option, true);
// //
window.addEventListener(
'resize',
function () {
mapBoxEchart.resize();
},
200
);
// 4. label
mapBoxEchart.on('click', params => {
// label/text线
if (params.componentType === 'series' && params.seriesType === 'tree' && params.data) {
window.open(`${params.data.docLink}`, '_blank');
}
],
};
mapBoxEchart.setOption(option, true);
window.addEventListener('resize', () => {
if (this.mapBoxEchart) {
this.mapBoxEchart.resize();
}
});
mapBoxEchart.on('dblclick', params => {
if (params.componentType === 'series' && params.seriesType === 'tree' && params.data) {
window.open(`${params.data.docLink}`, '_blank');
}
});
});
},
},
};
</script>
<style lang="scss" scoped>
.form-box {
// height: 700px;
height: calc(100vh - 60px - 40px - 10px - 90px - 31px);
}
.form-bom {
height: calc(100vh - 60px - 40px - 10px - 90px - 31px);
width: '100%';
min-width: 100%;
background: #f0f2f5;
overflow: visible; // ECharts
}
</style>

@ -284,7 +284,7 @@ export default {
},
{
label: '返工原因',
prop: 'craftMan',
prop: 'reworkReason',
sortable: true,
search: false,
overHidden: true,

Loading…
Cancel
Save