Merge branch 'projects/mes-test' into projects/mes-zhp

This commit is contained in:
‘937886381’ 2025-03-17 14:19:01 +08:00
commit 45e1fe4b47
35 changed files with 218 additions and 392 deletions

View File

@ -18,7 +18,7 @@ VUE_APP_BASE_API = 'http://mes2.kszny.picaiba.com'
# 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.0.33:48082'
VUE_APP_JIMU_API = 'http://mes2.kszny.picaiba.com'
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true

View File

@ -1,10 +1,3 @@
<!--
filename: index.vue
author: liubin
date: 2024-04-02 09:49:36
description:
-->
<template>
<!-- 按钮切换 -->
<div v-if="buttonMode" class="button-nav">
@ -12,9 +5,8 @@
v-for="m in menus"
:key="m"
@click="currentMenu = m"
:data-text="m"
:class="[m === currentMenu ? 'active' : '']"
></button>
>{{m}}</button>
</div>
<!-- 标签切换 -->
<div v-else class="custom-tabs" style="height: 100%; width: 100%">
@ -75,33 +67,24 @@ export default {
}
button {
height: 48px;
line-height: 48px;
cursor: pointer;
appearance: none;
outline: none;
border: none;
background: #fff;
border-radius: 8px;
padding: 15px;
color: #888;
font-size: 16px;
font-weight: 500;
color: rgba(22, 22, 22, 0.65);
letter-spacing: 2px;
flex: 1;
box-sizing: padding-box;
position: relative;
&::after {
content: attr(data-text);
position: absolute;
top: 5px;
left: 50%;
font-size: 16px;
font-weight: 500;
transform: translate(-50%);
}
&.active {
color: #111;
//border-bottom: 2px solid #0b58ff;
box-shadow: 0px 2px 1px 1px #0b58ff;
color: rgba(22, 22, 22, 1);
border-bottom: 4px solid #0b58ff;
}
}
}

View File

@ -89,6 +89,7 @@ export const DICT_TYPE = {
// ============== ENERGY - 能源模块 =============
ENERGY_UNIT: 'energy_unit',
ENERGY_TYPE: 'energy_type',
EQU_ALARM_LEVEL: 'equ_alarm_level',
MONITOR_INDEX_TYPE: 'monitor_index_type',
OBJECT_TYPE: 'object_type',

View File

@ -92,7 +92,8 @@ export default {
type: 'select',
label: '能源类型',
selectOptions: [],
param: 'energyTypeId'
param: 'energyTypeId',
clearable: false
},
{
type: 'select',
@ -162,7 +163,6 @@ export default {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getList();
this.getTypeList()
//
this.getObjTree()
@ -171,7 +171,10 @@ export default {
getTypeList() {
getEnergyTypeListAll().then((res) => {
this.formConfig[0].selectOptions = res.data || []
this.formConfig[0].defaultSelect = res.data[0].id
this.queryParams.energyTypeId = res.data[0].id
this.energyTypeList = res.data || []
this.getList();
})
},
buttonClick(val) {

View File

@ -89,6 +89,7 @@ export default {
init(param) {
this.form.connectId = param.connectId
getEnergyTypeListAll().then((res) => {
console.log(res)
this.energyListType = res.data || []
})
if (param.id) {

View File

@ -37,7 +37,7 @@
@cancel="handleCancel"
@confirm="handleConfirm"
:before-close="handleCancel"
width='30%'
width='50%'
>
<energy-plc-connect-add ref="energyPlcConnect" :objList="objList" @successSubmit="successSubmit" />
</base-dialog>
@ -60,7 +60,8 @@ const tableProps = [
},
{
prop: 'objCode',
label: '对象编码'
label: '对象编码',
minWidth: 160,
},
{
prop: 'plcTableName',
@ -69,7 +70,8 @@ const tableProps = [
{
prop: 'plcTableCode',
label: '关联表编码',
showOverflowtooltip: true
showOverflowtooltip: true,
minWidth: 160,
},
{
prop: 'cnName',

View File

@ -60,7 +60,8 @@ export default {
name: '',
code: '',
type: '',
energyTypeId: ''
energyTypeId: '',
remark: ''
},
plcList: [],
objList: [],

View File

@ -16,7 +16,7 @@
type="text"
class="tableInnerButton"
@click="showInnerTable(injectData)"
>详情</el-button
>价格详情</el-button
>
</el-popover>
</template>

View File

@ -3,7 +3,14 @@
<el-row>
<el-col :span="12">
<el-form-item label="能源类型" prop="name">
<el-input v-model="form.name"></el-input>
<el-select v-model="form.name" placeholder="请选择" style="width: 100%;">
<el-option
v-for="item in getDictDatas(DICT_TYPE.ENERGY_TYPE)"
:key="item.value"
:label="item.label"
:value="item.label">
</el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
@ -213,10 +220,6 @@ export default {
//
emitButtonClick1() {
let n = this.tableData1.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {}
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
obj.endTime = ''
@ -225,10 +228,6 @@ export default {
},
emitButtonClick2() {
let n = this.tableData2.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {}
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
obj.endUsed = 0

View File

@ -80,10 +80,14 @@ export default {
return {
formConfig: [
{
type: 'input',
type: 'select',
label: '能源类型',
selectOptions: this.getDictDatas(this.DICT_TYPE.ENERGY_TYPE),
placeholder: '能源类型',
param: 'name'
labelField: 'label',
valueField: 'label',
param: 'name',
flilterable: true
},
{
type: 'button',

View File

@ -219,6 +219,7 @@ export default {
getTypeList() {
getEnergyTypeListAll().then((res) => {
this.energyTypeList = res.data || []
this.queryParams.energyTypeId = res.data[0].id
})
},
//

View File

@ -7,7 +7,7 @@
-->
<template>
<div>
<div style="background: #f2f4f9; height: 40px; width: 100%">
<div style="background: #f2f4f9; height: 56px; width: 100%">
<ButtonNav
:menus="['走势分析', '对比分析', '同比分析', '环比分析']"
@change="currentMenu">

View File

@ -205,6 +205,7 @@ export default {
getTypeList() {
getEnergyTypeListAll().then((res) => {
this.energyTypeList = res.data || [];
this.queryParams.energyTypeId = res.data[0].id
});
},
getObjTree() {

View File

@ -288,7 +288,7 @@ export default {
if (
moment(this.startDay).format('YYYY-MM') === moment().format('YYYY-MM')
) {
num = Number(moment().format('DD'));
num = Number(moment().format('DD'))-1;
} else {
num = 0;
}

View File

@ -177,7 +177,9 @@ export default {
res.data.list.forEach(item => {
if(item.isProduction){
item.str = item.strList?item.strList.join(''):'-'
}
}else{
item.str = '-'
}
});
this.list = res.data.list;
this.total = res.data.total;

View File

@ -46,6 +46,7 @@ import {
getGroupRule,
disableGroupRule
} from '@/api/base/groupSchedulingRule';
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
import schedulingRuleConfigAdd from './components/schedulingRuleConfigAdd.vue';
import { formatDate } from '@/utils';
import tableHeightMixin from '@/mixins/tableHeightMixin';
@ -77,11 +78,13 @@ export default {
data() {
return {
formConfig: [
{
type: 'input',
{
type: 'select',
label: '班次',
placeholder: '班次',
param: 'name',
selectOptions: [],
param: 'id',
defaultSelect: '',
filterable: true,
},
{
type: 'button',
@ -155,19 +158,35 @@ export default {
queryParams: {
pageNo: 1,
pageSize: 20,
name: null,
id: null,
},
classNameList:[]
};
},
created() {
this.getClassNameList();
this.getList();
},
methods: {
getClassNameList() {
groupClassesListAll().then((res) => {
this.formConfig[0].selectOptions = res.data;
this.classNameList = res.data;
})
},
buttonClick(val) {
switch (val.btnName) {
case 'search':
this.queryParams.pageNo = 1;
this.queryParams.classesName = val.name || undefined;
if (val.id) {
this.classNameList.map((item) => {
if (val.id === item.id) {
this.queryParams.classesName = item.name
}
})
}else{
this.queryParams.classesName = ''
}
this.getList();
break;
default:
@ -187,7 +206,7 @@ export default {
formatDate(item.startDay) +
'至' +
(item.endDay ? formatDate(item.endDay) : '永久');
item.str = item.strList.join(',');
item.str = item.strList.join('');
});
this.list = res.data.list;
this.total = res.data.total;

View File

@ -13,6 +13,8 @@
</el-col>
</el-row>
<base-table
:page="1"
:limit="5000"
:table-props="tableProps"
:table-data="tableData"
:max-height="tableH"
@ -43,7 +45,7 @@ const tableProps = [
},
{
prop: 'workTime',
label: '工作时长'
label: '工作时长(h)'
}
]
export default {

View File

@ -62,7 +62,8 @@ export default {
selectOptions: [],
param: 'workOrderId',
clearable: false,
filterable: true
filterable: true,
required: true
},
{
type: 'button',

View File

@ -38,6 +38,7 @@ import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/t
import { parseTime } from '@/utils/ruoyi'
import TeamProductionDetail from './components/teamProductionDetail'
import tableHeightMixin from '@/mixins/tableHeightMixin';
import moment from 'moment'
const tableProps = [
{
prop: 'createTime',
@ -53,14 +54,12 @@ const tableProps = [
{
prop: 'startTime',
label: '上班时间',
filter: parseTime,
minWidth: 160
filter: (val) => moment(val).format('HH:mm')
},
{
prop: 'endTime',
label: '下班时间',
filter: parseTime,
minWidth: 160
filter: (val) => moment(val).format('HH:mm')
},
{
prop: 'classesName',
@ -70,7 +69,8 @@ const tableProps = [
{
prop: 'teamName',
label: '班组名称',
showOverflowtooltip: true
showOverflowtooltip: true,
minWidth: 100
}
]
export default {

View File

@ -103,21 +103,6 @@
style="width: 100%"></el-input-number>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="优先级" prop="priority">
<el-select
v-model="form.priority"
placeholder="请选择"
style="width: 100%"
:disabled="isBind">
<el-option
v-for="item in getDictDatas(DICT_TYPE.ORDER_PRIORITY)"
:key="item.value"
:label="item.label"
:value="item.value"></el-option>
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="工单类型" prop="type">
<el-select
@ -148,11 +133,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="6">
<el-form-item label="负责人" prop="workers">
<el-input v-model="form.workers" :disabled="isBind"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="24">
@ -293,10 +273,8 @@ export default {
deptId: undefined,
planQuantity: 0,
materialMethod: 1,
priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }],
type: '',
workers: '',
planAssignmentQuantity: '',
},
deptList: [],
@ -304,6 +282,9 @@ export default {
name: [
{ required: true, message: '工单名称不能为空', trigger: 'blur' },
],
workOrderId:[
{ required: true, message: '工单名称不能为空', trigger: 'change' },
],
planProductId: [
{ required: true, message: '产品名称不能为空', trigger: 'change' },
],
@ -476,9 +457,6 @@ export default {
? moment(res.data.planFinishTime)
.format('YYYY-MM-DD HH:mm:ss')
: null;
this.form.priority = res.data.priority
? res.data.priority + ''
: '';
// 线
if (this.form.materialMethod === 2) {
this.form.productLineIds.forEach((item) => {

View File

@ -56,16 +56,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span='6'>
<el-form-item label="单价" prop="price">
<el-input-number v-model="form.price" :min="0" :max="9999999999999" :precision='2' style="width: 100%;">
</el-input-number>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
</el-row>
<el-row :gutter="20">
<el-col :span='6'>
<el-form-item label="包装规格" prop="packSpec">
<el-select v-model="form.packSpec" placeholder="请选择" style="width: 100%;" clearable>
@ -75,7 +65,9 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span='12'>
</el-row>
<el-row :gutter="20">
<el-col :span='24'>
<el-form-item label="备注" prop="remark">
<el-input v-model="form.remark"></el-input>
</el-form-item>
@ -99,9 +91,7 @@ export default {
planQuantity: '',
planProductId: '',
specifications:undefined,
price: '',
customerId: '',
priority: '',
packSpec: '',
workers: '',
materialMethod: 1,
@ -114,7 +104,8 @@ export default {
name: [{ required: true, message: "订单名称不能为空", trigger: "blur" }],
code: [{ required: true, message: "订单号不能为空", trigger: "blur" }],
planQuantity: [{ required: true, message: "计划加工数量不能为空", trigger: "blur" }],
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }]
planProductId: [{ required: true, message: "产品名称不能为空", trigger: "change" }],
deliveTime: [{ required: true, message: "交货日期不能为空", trigger: "change" }]
},
productList: [],
customerList: [],
@ -142,9 +133,7 @@ export default {
this.form.code = res.data.code
this.form.planQuantity = res.data.planQuantity
this.form.planProductId = res.data.planProductId
this.form.price = res.data.price
this.form.customerId = res.data.customerId
this.form.priority = res.data.priority ? res.data.priority + '' : ''
this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
this.form.workers = res.data.workers
@ -235,7 +224,6 @@ export default {
formClear() {
this.$refs.orderAddForm.resetFields()
this.form.materialMethod = 1
this.form.price = 0.00
this.form.planQuantity = 0
this.isEdit = false
}

View File

@ -73,11 +73,6 @@ const tableProps = [
label: '产品规格',
showOverflowtooltip: true,
},
// {
// prop: 'priority',
// label: '',
// filter: publicFormatter('order_priority')
// },
{
prop: 'planQuantity',
label: '计划加工量',
@ -97,12 +92,6 @@ const tableProps = [
showOverflowtooltip: true,
// subcomponent: selectMember,
},
{
prop: 'price',
label: '单价',
width: 100,
// subcomponent: inputArea,
},
{
prop: 'packSpec',
label: '包装规格',
@ -130,10 +119,8 @@ export default {
code: '',
planQuantity: '',
planProductId: '',
price: '',
customerId: '',
attr3: undefined,
priority: '',
packSpec: '',
workers: '',
materialMethod: 1,
@ -190,9 +177,7 @@ export default {
// this.form.code = res.data.code
// this.form.planQuantity = res.data.planQuantity
// this.form.planProductId = res.data.planProductId
// this.form.price = res.data.price
// this.form.customerId = res.data.customerId
// this.form.priority = res.data.priority ? res.data.priority + '' : ''
// this.form.planStartTime = res.data.planStartTime ? res.data.planStartTime : null
// this.form.packSpec = res.data.packSpec ? res.data.packSpec+'' : ''
// this.form.workers = res.data.workers

View File

@ -62,14 +62,14 @@
label="产品"
show-overflow-tooltip
min-width="120" />
<el-table-column prop="deliveTime" label="交货时间" width="160">
<el-table-column prop="deliveTime" label="交货日期" width="160">
<template v-slot="scope">
<span>{{ parseTime(scope.row.deliveTime) }}</span>
</template>
</el-table-column>
<el-table-column prop="workOrderNum" label="工单数量" width="140">
<template v-slot="scope">
<el-button @click="handleRoute(scope.row)" type="text">
<el-button @click="handleRoute(scope.row)" type="text" style='padding: 0px;'>
{{ scope.row.workOrderNum }}
</el-button>
</template>
@ -78,6 +78,7 @@
<template v-slot="scope">
<el-button
type="text"
style='padding: 0px;'
:disabled="!(scope.row.status != 5 && scope.row.workOrderNum === 0)"
@click="handleClick({ data: scope.row, type: 'split' })"
v-hasPermi="['base:order-manage:split']">
@ -86,6 +87,7 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
:disabled="
!(
scope.row.status === 1 ||
@ -95,12 +97,22 @@
"
@click="handleClick({ data: scope.row, type: 'bind' })"
v-hasPermi="['base:order-manage:bindWorkOrder']">
绑定工单
下发工单
</el-button>
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
@click="handleClick({ data: scope.row, type: 'stop' })"
v-hasPermi="['base:order-manage:stop']">
终止
</el-button>
<!-- addWorkOrder -->
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
:disabled="!(scope.row.status === 2 || scope.row.status === 3)"
@click="handleClick({ data: scope.row, type: 'complete' })"
v-hasPermi="['base:order-manage:bindWorkOrder']">
@ -109,6 +121,7 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
@click="handleClick({ data: scope.row, type: 'detail' })"
v-hasPermi="['base:order-manage:detail']">
<span class="iconfont icon-detail primary-color" />
@ -116,6 +129,7 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
:disabled="
!(scope.row.status === 1)
"
@ -132,18 +146,12 @@
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
style='padding: 0px;'
:disabled="scope.row.status != 1"
@click="handleClick({ data: scope.row, type: 'void' })"
v-hasPermi="['base:order-manage:delete']">
作废
</el-button>
<span style="margin: 0 4px; font-size: 18px; color: #e5e7eb">|</span>
<el-button
type="text"
@click="handleClick({ data: scope.row, type: 'stop' })"
v-hasPermi="['base:order-manage:stop']">
终止
</el-button>
</template>
</el-table-column>
</el-table>
@ -546,3 +554,9 @@ export default {
background-color: unset !important;
}
</style>
<style>
.orderTable .el-table__cell {
padding: 0 !important;
height: 35px !important;
}
</style>

View File

@ -116,10 +116,6 @@
<div class="blodTip">备注</div>
<div class="lightTip">{{ orderMsg.remark }}</div>
</el-col>
<!-- <el-col :span="3">
<div class="blodTip">负责人</div>
<div class="lightTip">{{ orderMsg.workers }}</div>
</el-col> -->
<!-- <el-col :span='3'>
<div class="blodTip">关联工艺</div>
<div class="lightTip">{{processFlowName}}</div>
@ -249,10 +245,6 @@ const tableProps1 = [
filter: (val) => (val ? val.join(',') : ''),
showOverflowtooltip: true,
},
{
prop: 'workers',
label: '负责人',
},
{
prop: 'remark',
label: '备注',

View File

@ -133,13 +133,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="负责人" prop="workers">
<el-input
v-model="dataForm.workers"
placeholder="请输入负责人"></el-input>
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="12">
@ -288,7 +281,6 @@ export default {
priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }],
type: '',
workers: '',
status: 1,
},
rules: {

View File

@ -9,11 +9,12 @@
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:max-height="tableH"
:table-data="tableData">
<method-btn
v-if="tableBtn.length"
slot="handleBtn"
:width="350"
:width="300"
label="操作"
:method-list="tableBtn"
@clickBtn="handleClick" />
@ -61,10 +62,11 @@ import {
getCoreWOList
} from '@/api/base/coreWorkOrder';
import { listDept } from '@/api/system/dept';
import tableHeightMixin from '@/mixins/tableHeightMixin';
export default {
mixins: [basicPage],
mixins: [basicPage,tableHeightMixin],
components: {
AddWorkOrder,
AddOrUpdate,
@ -88,25 +90,25 @@ export default {
// btnName: '',
// }
// : undefined,
// {
// type: 'active',
// btnName: '',
// showParam: {
// type: '|',
// data: [
// {
// name: 'status',
// type: 'equal',
// value: 1
// },
// {
// name: 'status',
// type: 'equal',
// value: 3
// }
// ]
// }
// },
{
type: 'active',
btnName: '开始',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
},
{
name: 'status',
type: 'equal',
value: 3
}
]
}
},
{
type: 'pause',
btnName: '暂停',
@ -122,15 +124,20 @@ export default {
}
},
{
type: 'nullify',
btnName: '作废',
type: 'terminate',
btnName: '终止',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
}
]
}
@ -176,22 +183,36 @@ export default {
}
}
: undefined,
this.$auth.hasPermi(`base:core-work-order:delete`)
? {
type: 'delete',
btnName: '删除',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
}
]
}
}
: undefined
{
type: 'nullify',
btnName: '作废',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
}
]
}
},
// this.$auth.hasPermi(`base:core-work-order:delete`)
// ? {
// type: 'delete',
// btnName: '',
// showParam: {
// type: '|',
// data: [
// {
// name: 'status',
// type: 'equal',
// value: 1
// }
// ]
// }
// }
// : undefined
].filter((v)=>v),
tableData: [],
formConfig: [
@ -220,7 +241,8 @@ export default {
{ id: 2, name: '激活' },
{ id: 3, name: '暂停' },
{ id: 4, name: '完成' },
{ id: 9, name: '作废' }
{ id: 5, name: '作废' },
{ id: 6, name: '终止' }
],
param: 'status',
clearable: true
@ -269,7 +291,7 @@ export default {
{
prop: 'name',
label: '工单名称',
minWidth: 120,
minWidth: 150,
showOverflowtooltip: true
},
{
@ -300,6 +322,7 @@ export default {
{
prop: 'triggerOrigin',
label: '来源',
width: 120,
filter: (val) => ['', 'MES-手动', 'MES-订单下发', 'ERP'][val]
},
{
@ -413,15 +436,18 @@ export default {
param.status = 3
opration = '暂停'
}
if (val.type === 'terminate') {
param.status = 6
opration = '终止'
}
if (val.type === 'nullify') {
param.status = 5
opration = '报废'
opration = '废'
}
if (val.type === 'finish') {
param.status = 4
opration = '完成'
}
console.log('22',val)
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
@ -434,7 +460,9 @@ export default {
type: 'success',
duration: 1500,
onClose: () => {
this.getDataList();
setTimeout(() => {
this.getDataList();
}, 1000);
//
if (param.status === 4) {
this.allocationOrder(param);

View File

@ -50,6 +50,11 @@ export default {
label: '工单名称',
showOverflowtooltip: true,
},
{
prop: 'productionName',
label: '产品名称',
showOverflowtooltip: true,
},
...this.dynamicProps,
{
prop: 'sumInput',
@ -105,7 +110,7 @@ export default {
},
{
prop: 'scrapRatio',
label: '报废比例',
label: '报废比例(%)',
},
];
this.downList.push(obj);
@ -142,6 +147,7 @@ export default {
return {
inspectionContent: item.inspectionContent,
workOrderName: item.workOrderName,
productionName: item.productionName,
...keyValuePairs,
sumInput: item.sumInput,
sumOutput: item.sumOutput,

View File

@ -1,10 +1,3 @@
<!--
filename: index.vue
author: liubin
date: 2023-08-30 14:02:49
description: 设备加工数量
-->
<template>
<div style="flex: 1; display: flex; background: #f2f4f9">
<div
@ -21,7 +14,7 @@
title="点击切换工厂"
@mouseenter="factoryListOpen = true"
@mouseleave="factoryListOpen = false">
{{ currentFactory?.label || '点我选择设备' }}
{{ currentFactory?.label || '点我选择工厂' }}
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
<ul
class="factory-list"
@ -33,7 +26,7 @@
:data-value="fc.id"
class="factory-list__item"
:class="{ 'is-current': fc.id == currentFactory?.id }">
<span>
<span :data-value="fc.id">
{{ fc.label }}
</span>
<svg-icon
@ -56,10 +49,6 @@
:empty-text="''"
icon-class="custom-icon-class"
@node-click="handleSidebarItemClick">
<!-- <div class="custom-tree-node" slot-scope="{ node, data }">
<span class="icon"></span>
<span>{{ node.label }}</span>
</div> -->
</el-tree>
</div>
</div>
@ -106,20 +95,16 @@
<div v-else class="no-data-bg"></div>
</el-col>
</el-row>
<!-- <transition appear name="vvv" mode="out-in"></transition> -->
</div>
</div>
</div>
</template>
<script>
// import Graph from './graph.vue';
import { getWorkOrderList, getTreeData } from '@/api/quality/deviceParameters';
import tableHeightMixin from '@/mixins/tableHeightMixin';
export default {
name: 'EquipmentProcessAmount',
// components: { Graph },
mixins: [tableHeightMixin],
props: {},
data() {
@ -139,92 +124,7 @@ export default {
{ name: '5', value: 5 },
{ name: '6', value: 6 },
],
sidebarContent: [
// {
// id: 'fc1',
// name: '',
// lines: [
// {
// name: '线1',
// id: 'pl1',
// sections: [
// {
// name: '1',
// id: 'pl1ws1',
// equipments: [
// {
// name: '1',
// id: 'pl1ws1--eq1',
// },
// {
// name: '2',
// id: 'pl1ws1--eq2',
// },
// {
// name: '3',
// id: 'pl1ws1--eq3',
// },
// ],
// },
// {
// name: '2',
// id: 'pl1ws2',
// equipments: [
// {
// name: '1',
// id: 'pl2ws1--eq1',
// },
// {
// name: '2',
// id: 'pl2ws1--eq2',
// },
// {
// name: '3',
// id: 'pl2ws1--eq3',
// },
// ],
// },
// {
// name: '3',
// id: 'pl1ws3',
// equipments: [
// {
// name: '1',
// id: 'pl3ws1--eq1',
// },
// {
// name: '2',
// id: 'pl3ws1--eq2',
// },
// {
// name: '3',
// id: 'pl3ws1--eq3',
// },
// ],
// },
// ],
// },
// {
// name: '线2',
// id: 'pl2',
// sections: [
// {
// name: '1',
// id: 'pl2ws1',
// },
// {
// name: '2',
// id: 'pl2ws2',
// },
// {
// name: '3',
// id: 'pl2ws3',
// },
// ],
// },
// ],
// },
],
sidebarContent: [],
tableList: [],
queryParams: {
id: null,
@ -241,6 +141,7 @@ export default {
param: 'workOrderId',
onchange: true,
filterable: true,
clearable: false
},
{
type: 'datePicker',
@ -264,20 +165,6 @@ export default {
{
type: 'separate',
},
// {
// type: 'button',
// btnName: '',
// name: 'table',
// plain: true,
// color: 'success',
// },
// {
// type: 'button',
// btnName: '',
// name: 'graph',
// plain: true,
// color: 'warning',
// },
{
type: this.$auth.hasPermi('base:equipment-group:export')
? 'button'
@ -291,15 +178,12 @@ export default {
tableProps: [
{ prop: 'lineName', label: '产线' },
{ prop: 'sectionName', label: '工段' },
// { prop: 'externalCode', label: '' },
{ prop: 'equipmentId', label: '设备编码' },
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'totalQuantity', label: '加工数量' },
],
mode: 'table', // table | graph
queryParams: {
// pageNo: 1,
// pageSize: 999,
recordTime: [],
equipmentId: null,
lineId: null,
@ -313,28 +197,10 @@ export default {
},
};
},
// mounted() {
// },
computed: {
// id() {
// return this.$route.params.equipmentId;
// },
// code() {
// return this.$route.params.equipmentCode;
// },
// name() {
// return this.$route.params.equipmentName;
// },
},
mounted() {
this.getDict();
// if (this.id) this.$set(this.queryParams, 'id', this.id);
// if (this.code)
// this.$set(this.searchBarFormConfig[0], 'defaultSelect', this.code);
// if (this.name)
// this.$set(this.searchBarFormConfig[1], 'defaultSelect', this.name);
// this.handleResponse();
},
methods: {
handleSearchBarChanged({ param, value }) {
@ -349,28 +215,14 @@ export default {
}
},
getDict() {
//
// getCustomerList().then((response) => {
// console.log(response);
// this.customerList = response.data
// // this.listQuery.total = response.data.total;
// })
// getModelList().then((response) => {
// console.log(response);
// this.modelList = response.data
// // this.listQuery.total = response.data.total;
// })
getWorkOrderList().then((res) => {
console.log(res);
// console.log(response);
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
});
},
buildProps(table) {
@ -532,12 +384,9 @@ export default {
console.log(res.data);
this.sidebarContent = res.data;
this.buildTree(res.data);
this.currentFactory = null
console.log('tree', this.sidebarContent);
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
});
// const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder');
// console.log(data)
},
handleTabClick(tab, event) {
@ -549,6 +398,7 @@ export default {
const fcId = event.target.dataset.value;
this.handleSidebarItemClick({ id: fcId, type: '工厂' });
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
console.log('factory change', this.currentFactory);
},
handleSidebarItemClick({ label, id, type }) {

View File

@ -83,13 +83,7 @@
</el-table>
<!-- 添加或修改菜单对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<base-dialog :dialogVisible="open" :dialogTitle="title" width="800px" class="dialog" :before-close='cancel'>
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-row>
<el-col :span="24">
@ -163,7 +157,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div>
</el-dialog>
</base-dialog>
</div>
</template>

View File

@ -57,13 +57,7 @@
@pagination="getList"/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<base-dialog :dialogTitle="title" :dialogVisible="open" :before-close="cancel" width="800px" class="dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="90px">
<el-form-item label="字典类型">
<el-input v-model="form.dictType" :disabled="true" />
@ -98,7 +92,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div>
</el-dialog>
</base-dialog>
</div>
</template>
@ -132,7 +126,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
dictName: undefined,
dictType: undefined,
status: undefined

View File

@ -60,13 +60,7 @@
@pagination="getList"/>
<!-- 添加或修改参数配置对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<base-dialog :dialogTitle="title" :dialogVisible="open" :before-close="cancel" width="800px" class="dialog">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="字典名称" prop="name">
<el-input v-model="form.name" placeholder="请输入字典名称" />
@ -87,7 +81,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div>
</el-dialog>
</base-dialog>
</div>
</template>
@ -118,7 +112,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
name: undefined,
type: undefined,
status: undefined,

View File

@ -88,13 +88,7 @@
</el-table>
<!-- 添加或修改菜单对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<base-dialog :dialogTitle="title" :dialogVisible="open" width="800px" class="dialog" :before-close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="24">
@ -276,7 +270,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div>
</el-dialog>
</base-dialog>
</div>
</template>

View File

@ -54,13 +54,7 @@
@pagination="getList"/>
<!-- 添加或修改岗位对话框 -->
<el-dialog :visible.sync="open" width="800px" append-to-body class="dialog">
<template #title>
<slot name="title">
<div class="titleStyle">{{ title }}</div>
</slot>
</template>
<slot />
<base-dialog :dialogTitle="title" :dialogVisible="open" width="800px" class="dialog" :before-close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="80px">
<el-form-item label="岗位名称" prop="name">
<el-input v-model="form.name" placeholder="请输入岗位名称" />
@ -85,7 +79,7 @@
<el-button class="btnTextStyle" @click="cancel"> </el-button>
<el-button type="primary" class="btnTextStyle" @click="submitForm"> </el-button>
</div>
</el-dialog>
</base-dialog>
</div>
</template>
@ -116,7 +110,7 @@ export default {
//
queryParams: {
pageNo: 1,
pageSize: 10,
pageSize: 20,
code: undefined,
name: undefined,
status: undefined

View File

@ -151,7 +151,6 @@ export default {
? {
type: 'dataAuth',
btnName: '数据权限',
// showTip: "",
}
: undefined,
this.$auth.hasPermi('system:role:update')

View File

@ -68,7 +68,7 @@
</el-row>
<!-- 添加或修改参数配置对话框 -->
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%">
<base-dialog :dialogTitle="title" :dialogVisible="open" width="50%" :before-close="cancel">
<el-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row>
<el-col :span="12">
@ -180,6 +180,7 @@
<base-dialog
:dialogTitle="upload.title"
:dialogVisible="upload.open"
:before-close="cancelImport"
width="400px">
<el-upload
ref="upload"
@ -219,7 +220,7 @@
</base-dialog>
<!-- 分配角色 -->
<base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px">
<base-dialog dialogTitle="分配角色" :dialogVisible="openRole" width="500px" :before-close='cancelRole'>
<el-form :model="form" label-width="80px">
<el-form-item label="用户名称">
<el-input v-model="form.username" :disabled="true" />
@ -628,6 +629,9 @@ export default {
this.open = false;
this.reset();
},
cancelImport() {
this.upload.open = false;
},
//
cancelRole() {
this.openRole = false;