projects/mes-zhp #426

Merged
juzi merged 2 commits from projects/mes-zhp into projects/mes-test 2025-03-17 14:37:00 +08:00
35 changed files with 218 additions and 392 deletions
Showing only changes of commit 45e1fe4b47 - Show all commits
.env.dev
src
components
ButtonNav
utils
views
devConfig
energy
energyLimit
energyPlcConnect
energyStatistics
energyType
energy
analysis
contrastAnalysis
components
index.vue
trendAnalysis
components
group
base
groupTeamScheduling
schedulingPlanConfig
schedulingRuleConfig
monitoring
groupTeamView
teamProduction
produce
quality
currentData
monitoring
deviceParameters
system

@@ -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 VUE_CLI_BABEL_TRANSPILE_MODULES = true

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

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

@@ -92,7 +92,8 @@ export default {
type: 'select', type: 'select',
label: '能源类型', label: '能源类型',
selectOptions: [], selectOptions: [],
param: 'energyTypeId' param: 'energyTypeId',
clearable: false
}, },
{ {
type: 'select', type: 'select',
@@ -162,7 +163,6 @@ export default {
window.addEventListener('resize', () => { window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260) this.tableH = this.tableHeight(260)
}) })
this.getList();
this.getTypeList() this.getTypeList()
// 获取对象树形结构 // 获取对象树形结构
this.getObjTree() this.getObjTree()
@@ -171,7 +171,10 @@ export default {
getTypeList() { getTypeList() {
getEnergyTypeListAll().then((res) => { getEnergyTypeListAll().then((res) => {
this.formConfig[0].selectOptions = res.data || [] 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.energyTypeList = res.data || []
this.getList();
}) })
}, },
buttonClick(val) { buttonClick(val) {

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

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

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

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

@@ -3,7 +3,14 @@
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
<el-form-item label="能源类型" prop="name"> <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-form-item>
</el-col> </el-col>
<el-col :span="12"> <el-col :span="12">
@@ -213,10 +220,6 @@ export default {
// 增加 // 增加
emitButtonClick1() { emitButtonClick1() {
let n = this.tableData1.length let n = this.tableData1.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {} let obj = {}
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
obj.endTime = '' obj.endTime = ''
@@ -225,10 +228,6 @@ export default {
}, },
emitButtonClick2() { emitButtonClick2() {
let n = this.tableData2.length let n = this.tableData2.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {} let obj = {}
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
obj.endUsed = 0 obj.endUsed = 0

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

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

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

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

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

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

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

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

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

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

@@ -103,21 +103,6 @@
style="width: 100%"></el-input-number> style="width: 100%"></el-input-number>
</el-form-item> </el-form-item>
</el-col> </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-col :span="6">
<el-form-item label="工单类型" prop="type"> <el-form-item label="工单类型" prop="type">
<el-select <el-select
@@ -148,11 +133,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
@@ -293,10 +273,8 @@ export default {
deptId: undefined, deptId: undefined,
planQuantity: 0, planQuantity: 0,
materialMethod: 1, materialMethod: 1,
priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }], productLineIds: [{ lineId: null, processId: null, num: null }],
type: '', type: '',
workers: '',
planAssignmentQuantity: '', planAssignmentQuantity: '',
}, },
deptList: [], deptList: [],
@@ -304,6 +282,9 @@ export default {
name: [ name: [
{ required: true, message: '工单名称不能为空', trigger: 'blur' }, { required: true, message: '工单名称不能为空', trigger: 'blur' },
], ],
workOrderId:[
{ required: true, message: '工单名称不能为空', trigger: 'change' },
],
planProductId: [ planProductId: [
{ required: true, message: '产品名称不能为空', trigger: 'change' }, { required: true, message: '产品名称不能为空', trigger: 'change' },
], ],
@@ -476,9 +457,6 @@ export default {
? moment(res.data.planFinishTime) ? moment(res.data.planFinishTime)
.format('YYYY-MM-DD HH:mm:ss') .format('YYYY-MM-DD HH:mm:ss')
: null; : null;
this.form.priority = res.data.priority
? res.data.priority + ''
: '';
// 根据产线获取工艺 // 根据产线获取工艺
if (this.form.materialMethod === 2) { if (this.form.materialMethod === 2) {
this.form.productLineIds.forEach((item) => { this.form.productLineIds.forEach((item) => {

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

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

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

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

@@ -133,13 +133,6 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </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>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="12"> <el-col :span="12">
@@ -288,7 +281,6 @@ export default {
priority: '', priority: '',
productLineIds: [{ lineId: null, processId: null, num: null }], productLineIds: [{ lineId: null, processId: null, num: null }],
type: '', type: '',
workers: '',
status: 1, status: 1,
}, },
rules: { rules: {

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

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

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

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

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

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

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

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

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

@@ -68,7 +68,7 @@
</el-row> </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-form ref="form" :model="form" :rules="rules" label-width="100px">
<el-row> <el-row>
<el-col :span="12"> <el-col :span="12">
@@ -180,6 +180,7 @@
<base-dialog <base-dialog
:dialogTitle="upload.title" :dialogTitle="upload.title"
:dialogVisible="upload.open" :dialogVisible="upload.open"
:before-close="cancelImport"
width="400px"> width="400px">
<el-upload <el-upload
ref="upload" ref="upload"
@@ -219,7 +220,7 @@
</base-dialog> </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 :model="form" label-width="80px">
<el-form-item label="用户名称"> <el-form-item label="用户名称">
<el-input v-model="form.username" :disabled="true" /> <el-input v-model="form.username" :disabled="true" />
@@ -628,6 +629,9 @@ export default {
this.open = false; this.open = false;
this.reset(); this.reset();
}, },
cancelImport() {
this.upload.open = false;
},
// 取消按钮(角色权限) // 取消按钮(角色权限)
cancelRole() { cancelRole() {
this.openRole = false; this.openRole = false;