|
|
@ -330,108 +330,315 @@
|
|
|
|
/>
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 添加或修改保养计划对话框 -->
|
|
|
|
<!-- 添加或修改保养计划对话框 -->
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="500px" append-to-body>
|
|
|
|
<el-dialog :title="title" :visible.sync="open" width="900px" append-to-body>
|
|
|
|
<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="planCode">
|
|
|
|
<el-form-item v-if="false" label="计划编码" prop="planCode">
|
|
|
|
<el-input v-model="form.planCode" placeholder="请输入计划编码" />
|
|
|
|
<el-input v-model="form.planCode" placeholder="请输入计划编码" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="计划名称" prop="planName">
|
|
|
|
<div class="my-step-mar">
|
|
|
|
<el-input v-model="form.planName" placeholder="请输入计划名称" />
|
|
|
|
<el-steps :active="upkeepSteps" finish-status="success" align-center>
|
|
|
|
</el-form-item>
|
|
|
|
<el-step title="保养计划基本信息"></el-step>
|
|
|
|
<el-form-item label="车间" prop="planWorkshop">
|
|
|
|
<el-step title="选择设备、保养项"></el-step>
|
|
|
|
<el-input v-model="form.planWorkshop" placeholder="请输入车间" />
|
|
|
|
<el-step title="更换备件"></el-step>
|
|
|
|
</el-form-item>
|
|
|
|
<el-step title="人员"></el-step>
|
|
|
|
<el-form-item label="产线" prop="planProdLine">
|
|
|
|
</el-steps>
|
|
|
|
<el-input v-model="form.planProdLine" placeholder="请输入产线" />
|
|
|
|
<!-- 保养计划基本信息 -->
|
|
|
|
</el-form-item>
|
|
|
|
<div class="my-step-body" v-if="this.upkeepSteps==0">
|
|
|
|
<el-form-item label="设备名称" prop="equipmentName">
|
|
|
|
<el-row>
|
|
|
|
<el-input v-model="form.equipmentName" placeholder="请输入设备名称" />
|
|
|
|
<el-col :span="8">
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="保养名称:">
|
|
|
|
<el-form-item label="设备编码" prop="equipmentCode">
|
|
|
|
<el-input v-model="form.planName" placeholder="请输入保养名称"/>
|
|
|
|
<el-input v-model="form.equipmentCode" placeholder="请输入设备编码" />
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-form-item label="循环周期" prop="planLoop">
|
|
|
|
<el-col :span=12 :offset="1">
|
|
|
|
<el-input v-model="form.planLoop" placeholder="请输入循环周期" />
|
|
|
|
<el-form-item label="保养类型:">
|
|
|
|
</el-form-item>
|
|
|
|
<el-radio v-model="form.upkeep" label="0">单次</el-radio>
|
|
|
|
<el-form-item label="循环周期类型" prop="planLoopType">
|
|
|
|
<el-radio v-model="form.upkeep" label="1">多次</el-radio>
|
|
|
|
<el-select v-model="form.planLoopType" placeholder="请选择循环周期类型">
|
|
|
|
</el-form-item>
|
|
|
|
<el-option
|
|
|
|
</el-col>
|
|
|
|
v-for="dict in dict.type.device_loop_type"
|
|
|
|
</el-row>
|
|
|
|
:key="dict.value"
|
|
|
|
<el-row>
|
|
|
|
:label="dict.label"
|
|
|
|
<el-col :span="6">
|
|
|
|
:value="dict.value"
|
|
|
|
<el-form-item label="循环周期:">
|
|
|
|
></el-option>
|
|
|
|
<el-input v-model="form.planLoop" placeholder="请输入循环周期"/>
|
|
|
|
</el-select>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
<el-form-item label="循环执行时间开始" prop="planLoopStart">
|
|
|
|
<el-col :span="2">
|
|
|
|
<el-date-picker clearable
|
|
|
|
<el-select v-model="form.planLoopType" placeholder="周期" clearable>
|
|
|
|
v-model="form.planLoopStart"
|
|
|
|
<el-option
|
|
|
|
type="date"
|
|
|
|
v-for="dict in dict.type.device_loop_type"
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
:key="dict.value"
|
|
|
|
placeholder="请选择循环执行时间开始">
|
|
|
|
:label="dict.label"
|
|
|
|
</el-date-picker>
|
|
|
|
:value="dict.value"
|
|
|
|
</el-form-item>
|
|
|
|
/>
|
|
|
|
<el-form-item label="循环执行时间结束" prop="planLoopEnd">
|
|
|
|
</el-select>
|
|
|
|
<el-date-picker clearable
|
|
|
|
</el-col>
|
|
|
|
v-model="form.planLoopEnd"
|
|
|
|
<el-col :span="8" :offset="1">
|
|
|
|
type="date"
|
|
|
|
<el-form-item label="工作中心:">
|
|
|
|
value-format="yyyy-MM-dd"
|
|
|
|
<el-select v-model="form.planWorkshop" placeholder="工作中心" clearable>
|
|
|
|
placeholder="请选择循环执行时间结束">
|
|
|
|
<el-option
|
|
|
|
</el-date-picker>
|
|
|
|
v-for="item in workCenterList"
|
|
|
|
</el-form-item>
|
|
|
|
:key="item.factoryCode"
|
|
|
|
<el-form-item label="巡检人员" prop="planPerson">
|
|
|
|
:label="item.factoryName"
|
|
|
|
<el-input v-model="form.planPerson" placeholder="请输入巡检人员" />
|
|
|
|
:value="item.factoryCode">
|
|
|
|
</el-form-item>
|
|
|
|
</el-option>
|
|
|
|
<el-form-item label="计划状态" prop="planStatus">
|
|
|
|
</el-select>
|
|
|
|
<el-radio-group v-model="form.planStatus">
|
|
|
|
</el-form-item>
|
|
|
|
<el-radio
|
|
|
|
</el-col>
|
|
|
|
v-for="dict in dict.type.sys_normal_disable"
|
|
|
|
</el-row>
|
|
|
|
:key="dict.value"
|
|
|
|
<el-row>
|
|
|
|
:label="dict.value"
|
|
|
|
<el-col :span="20">
|
|
|
|
>{{dict.label}}</el-radio>
|
|
|
|
<el-form-item label-width="160px" label="计划保养时间计算规则:">
|
|
|
|
</el-radio-group>
|
|
|
|
<el-radio v-model="form.calculationRule" label="0">按固定周期</el-radio>
|
|
|
|
</el-form-item>
|
|
|
|
<el-radio v-model="form.calculationRule" label="1">按上次保养时间</el-radio>
|
|
|
|
<el-form-item label="是否可生产-限制" prop="planRestrict">
|
|
|
|
</el-form-item>
|
|
|
|
<el-input v-model="form.planRestrict" placeholder="请输入是否可生产-限制" />
|
|
|
|
</el-col>
|
|
|
|
</el-form-item>
|
|
|
|
</el-row>
|
|
|
|
<el-form-item label="是否委外" prop="planOutsource">
|
|
|
|
<el-row>
|
|
|
|
<el-input v-model="form.planOutsource" placeholder="请输入是否委外" />
|
|
|
|
<el-col :span="20">
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label-width="110px" label="是否停机保养:">
|
|
|
|
<el-form-item label="委外工单编码" prop="workCode">
|
|
|
|
<el-radio v-model="form.shutDown" label="0">停机保养</el-radio>
|
|
|
|
<el-input v-model="form.workCode" placeholder="请输入委外工单编码" />
|
|
|
|
<el-radio v-model="form.shutDown" label="1">开机保养</el-radio>
|
|
|
|
</el-form-item>
|
|
|
|
</el-form-item>
|
|
|
|
<el-form-item label="工厂" prop="factoryCode">
|
|
|
|
</el-col>
|
|
|
|
<el-input v-model="form.factoryCode" placeholder="请输入工厂" />
|
|
|
|
</el-row>
|
|
|
|
</el-form-item>
|
|
|
|
</div>
|
|
|
|
<el-form-item label="备用字段1" prop="attr1">
|
|
|
|
<!-- 选择设备、保养项 -->
|
|
|
|
<el-input v-model="form.attr1" placeholder="请输入备用字段1" />
|
|
|
|
<div class="my-step-body" v-if="this.upkeepSteps==1">
|
|
|
|
</el-form-item>
|
|
|
|
<el-row>
|
|
|
|
<el-form-item label="备用字段2" prop="attr2">
|
|
|
|
<el-col class="my-step-mar" :span="1.5">
|
|
|
|
<el-input v-model="form.attr2" placeholder="请输入备用字段2" />
|
|
|
|
<el-button
|
|
|
|
</el-form-item>
|
|
|
|
type="primary"
|
|
|
|
<el-form-item label="备用字段3" prop="attr3">
|
|
|
|
plain
|
|
|
|
<el-input v-model="form.attr3" placeholder="请输入备用字段3" />
|
|
|
|
size="mini"
|
|
|
|
</el-form-item>
|
|
|
|
@click="selectEquBtn">
|
|
|
|
<el-form-item label="删除标志" prop="delFlag">
|
|
|
|
选择设备
|
|
|
|
<el-input v-model="form.delFlag" placeholder="请输入删除标志" />
|
|
|
|
</el-button>
|
|
|
|
</el-form-item>
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="form.equipmentItem"
|
|
|
|
|
|
|
|
stripe
|
|
|
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="equipmentCode"
|
|
|
|
|
|
|
|
label="设备编码"
|
|
|
|
|
|
|
|
width="180">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="equipmentName"
|
|
|
|
|
|
|
|
label="设备名称"
|
|
|
|
|
|
|
|
width="180">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="itemTempName"
|
|
|
|
|
|
|
|
label="巡检项"
|
|
|
|
|
|
|
|
width="300">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
fixed="right"
|
|
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-button @click="editorTheItem(scope.row)" type="text" size="small">编辑</el-button>
|
|
|
|
|
|
|
|
<el-button @click="delTheEquItem(scope.row)" type="text" size="small">删除</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<!-- 编辑检查项弹窗 -->
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
title="编辑检查项"
|
|
|
|
|
|
|
|
:visible.sync="editorItem"
|
|
|
|
|
|
|
|
width="50%"
|
|
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<!-- 编辑检查标准 -->
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="itemDetailList"
|
|
|
|
|
|
|
|
v-loading="detailLoading"
|
|
|
|
|
|
|
|
stripe
|
|
|
|
|
|
|
|
@selection-change="selectChangeEqu"
|
|
|
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
|
|
|
<el-table-column width="55" align="center"/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="itemName"
|
|
|
|
|
|
|
|
label="检查项">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="standardName"
|
|
|
|
|
|
|
|
label="检查标准">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="standardTypeName"
|
|
|
|
|
|
|
|
label="标准类型">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
fixed="right"
|
|
|
|
|
|
|
|
label="操作"
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<template slot-scope="scope">
|
|
|
|
|
|
|
|
<el-button @click="delStandard(scope.row)" type="text" size="small">删除</el-button>
|
|
|
|
|
|
|
|
</template>
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button type="primary" @click="standardBtn">确 定</el-button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
<!-- 选择设备弹窗 -->
|
|
|
|
|
|
|
|
<el-dialog
|
|
|
|
|
|
|
|
title="选择设备"
|
|
|
|
|
|
|
|
:visible.sync="selectEqu"
|
|
|
|
|
|
|
|
width="50%"
|
|
|
|
|
|
|
|
append-to-body
|
|
|
|
|
|
|
|
>
|
|
|
|
|
|
|
|
<el-form :model="equipmentQuery" ref="queryBPForm" size="small" :inline="true" v-show="showSearch"
|
|
|
|
|
|
|
|
label-width="68px">
|
|
|
|
|
|
|
|
<el-form-item label="设备编码">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="equipmentQuery.equipmentCode"
|
|
|
|
|
|
|
|
placeholder="请输入设备编码"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item label="设备名称">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="equipmentQuery.equipmentName"
|
|
|
|
|
|
|
|
placeholder="请输入设备名称"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item v-if="false" label="设备类型">
|
|
|
|
|
|
|
|
<el-input
|
|
|
|
|
|
|
|
v-model="equipmentQuery.equipmentName"
|
|
|
|
|
|
|
|
placeholder="请输入设备类型"
|
|
|
|
|
|
|
|
clearable
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
<el-form-item>
|
|
|
|
|
|
|
|
<el-button type="primary" icon="el-icon-search" size="mini" @click="getEquList">搜索</el-button>
|
|
|
|
|
|
|
|
<el-button icon="el-icon-refresh" size="mini" @click="resetEqu">重置</el-button>
|
|
|
|
|
|
|
|
</el-form-item>
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
|
|
|
|
<!-- 搜索-设备列表 -->
|
|
|
|
|
|
|
|
<el-table
|
|
|
|
|
|
|
|
:data="queryEquipment"
|
|
|
|
|
|
|
|
v-loading="equLoading"
|
|
|
|
|
|
|
|
stripe
|
|
|
|
|
|
|
|
@selection-change="selectChangeEqu"
|
|
|
|
|
|
|
|
style="width: 100%">
|
|
|
|
|
|
|
|
<el-table-column type="selection" width="55" align="center"/>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="equipmentCode"
|
|
|
|
|
|
|
|
label="设备编码">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="equipmentName"
|
|
|
|
|
|
|
|
label="设备名称">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="equipmentTypeName"
|
|
|
|
|
|
|
|
label="设备类型">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
<el-table-column
|
|
|
|
|
|
|
|
prop="workshopName"
|
|
|
|
|
|
|
|
label="工作中心">
|
|
|
|
|
|
|
|
</el-table-column>
|
|
|
|
|
|
|
|
</el-table>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<pagination
|
|
|
|
|
|
|
|
v-show="equTotal>0"
|
|
|
|
|
|
|
|
:total="equTotal"
|
|
|
|
|
|
|
|
:page.sync="equipmentQuery.pageNum"
|
|
|
|
|
|
|
|
:limit.sync="equipmentQuery.pageSize"
|
|
|
|
|
|
|
|
@pagination="getEquList"
|
|
|
|
|
|
|
|
/>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<span slot="footer" class="dialog-footer">
|
|
|
|
|
|
|
|
<el-button @click="selectEqu = false">取 消</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" @click="confirmSelectEquBtn">确 定</el-button>
|
|
|
|
|
|
|
|
</span>
|
|
|
|
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 更换备件 -->
|
|
|
|
|
|
|
|
<div class="my-step-body" v-if="this.upkeepSteps==2">
|
|
|
|
|
|
|
|
更换备件
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<!-- 人员 -->
|
|
|
|
|
|
|
|
<div class="my-step-body" v-if="this.upkeepSteps==3">
|
|
|
|
|
|
|
|
<el-row>
|
|
|
|
|
|
|
|
<el-col :span="24" :offset="1">
|
|
|
|
|
|
|
|
<el-transfer
|
|
|
|
|
|
|
|
:titles="['人员','已选择人员']"
|
|
|
|
|
|
|
|
filterable
|
|
|
|
|
|
|
|
:filter-method="filterMethod"
|
|
|
|
|
|
|
|
filter-placeholder="请输入人员名称"
|
|
|
|
|
|
|
|
v-model="selectPersonList"
|
|
|
|
|
|
|
|
:data="personList">
|
|
|
|
|
|
|
|
</el-transfer>
|
|
|
|
|
|
|
|
</el-col>
|
|
|
|
|
|
|
|
</el-row>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
</el-form>
|
|
|
|
</el-form>
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<div slot="footer" class="dialog-footer">
|
|
|
|
<el-button type="primary" @click="submitForm">确 定</el-button>
|
|
|
|
<el-button style="margin-top: 12px;" v-if="this.upkeepSteps > 0" @click="stepLast">上一步</el-button>
|
|
|
|
<el-button @click="cancel">取 消</el-button>
|
|
|
|
<el-button style="margin-top: 12px;" v-if="this.upkeepSteps < 3" @click="stepNext">下一步</el-button>
|
|
|
|
|
|
|
|
<el-button type="primary" v-if="this.upkeepSteps == 3" @click="submitForm">提 交</el-button>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import { listUpkeepPlan, getUpkeepPlan, delUpkeepPlan, addUpkeepPlan, updateUpkeepPlan } from "@/api/device/upkeepPlan";
|
|
|
|
import {
|
|
|
|
|
|
|
|
listUpkeepPlan,
|
|
|
|
|
|
|
|
getUpkeepPlan,
|
|
|
|
|
|
|
|
delUpkeepPlan,
|
|
|
|
|
|
|
|
addUpkeepPlan,
|
|
|
|
|
|
|
|
updateUpkeepPlan,
|
|
|
|
|
|
|
|
formatEquItem
|
|
|
|
|
|
|
|
} from "@/api/device/upkeepPlan";
|
|
|
|
|
|
|
|
import {getEquList, getPersonList, getWorkCenter} from "@/api/device/plan";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
name: "UpkeepPlan",
|
|
|
|
name: "UpkeepPlan",
|
|
|
|
dicts: ['device_loop_type', 'sys_normal_disable'],
|
|
|
|
dicts: ['device_loop_type', 'sys_normal_disable'],
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
|
|
|
|
// 保养人员选择穿梭框
|
|
|
|
|
|
|
|
personList: [],
|
|
|
|
|
|
|
|
selectPersonList: [],
|
|
|
|
|
|
|
|
// 工作中心list
|
|
|
|
|
|
|
|
workCenterList: [],
|
|
|
|
|
|
|
|
// 编辑检查标准list
|
|
|
|
|
|
|
|
itemDetailList: [],
|
|
|
|
|
|
|
|
// 编辑检查标准loading
|
|
|
|
|
|
|
|
detailLoading: false,
|
|
|
|
|
|
|
|
// 选中的设备信息
|
|
|
|
|
|
|
|
selectEquList: [],
|
|
|
|
|
|
|
|
// 设备信息loading
|
|
|
|
|
|
|
|
equLoading: false,
|
|
|
|
|
|
|
|
// 搜索到的设备总数
|
|
|
|
|
|
|
|
equTotal: 0,
|
|
|
|
|
|
|
|
// 搜索到的设备list
|
|
|
|
|
|
|
|
queryEquipment: [],
|
|
|
|
|
|
|
|
// 设备弹窗搜索条件
|
|
|
|
|
|
|
|
equipmentQuery: {
|
|
|
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
|
|
|
equipmentName: null,
|
|
|
|
|
|
|
|
workshopCode: null,
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 选择设备弹窗
|
|
|
|
|
|
|
|
selectEqu: false,
|
|
|
|
|
|
|
|
// 编辑检查项弹窗
|
|
|
|
|
|
|
|
editorItem: false,
|
|
|
|
|
|
|
|
// 步骤
|
|
|
|
|
|
|
|
upkeepSteps: 0,
|
|
|
|
// 遮罩层
|
|
|
|
// 遮罩层
|
|
|
|
loading: true,
|
|
|
|
loading: true,
|
|
|
|
// 选中数组
|
|
|
|
// 选中数组
|
|
|
@ -481,76 +688,169 @@ export default {
|
|
|
|
updateTime: null
|
|
|
|
updateTime: null
|
|
|
|
},
|
|
|
|
},
|
|
|
|
// 表单参数
|
|
|
|
// 表单参数
|
|
|
|
form: {},
|
|
|
|
form: {
|
|
|
|
|
|
|
|
equipmentItem: [],
|
|
|
|
|
|
|
|
shutDown: '0',
|
|
|
|
|
|
|
|
calculationRule: '0',
|
|
|
|
|
|
|
|
planLoopType: 'day',
|
|
|
|
|
|
|
|
planLoop: null,
|
|
|
|
|
|
|
|
upkeep: '1',
|
|
|
|
|
|
|
|
planName: null,
|
|
|
|
|
|
|
|
planWorkshop: null,
|
|
|
|
|
|
|
|
},
|
|
|
|
// 表单校验
|
|
|
|
// 表单校验
|
|
|
|
rules: {
|
|
|
|
rules: {}
|
|
|
|
planCode: [
|
|
|
|
|
|
|
|
{ required: true, message: "计划编码不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planName: [
|
|
|
|
|
|
|
|
{ required: true, message: "计划名称不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planWorkshop: [
|
|
|
|
|
|
|
|
{ required: true, message: "车间不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planProdLine: [
|
|
|
|
|
|
|
|
{ required: true, message: "产线不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
equipmentName: [
|
|
|
|
|
|
|
|
{ required: true, message: "设备名称不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
equipmentCode: [
|
|
|
|
|
|
|
|
{ required: true, message: "设备编码不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planLoop: [
|
|
|
|
|
|
|
|
{ required: true, message: "循环周期不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planLoopType: [
|
|
|
|
|
|
|
|
{ required: true, message: "循环周期类型不能为空", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planLoopStart: [
|
|
|
|
|
|
|
|
{ required: true, message: "循环执行时间开始不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planLoopEnd: [
|
|
|
|
|
|
|
|
{ required: true, message: "循环执行时间结束不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planPerson: [
|
|
|
|
|
|
|
|
{ required: true, message: "巡检人员不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planStatus: [
|
|
|
|
|
|
|
|
{ required: true, message: "计划状态不能为空", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planType: [
|
|
|
|
|
|
|
|
{ required: true, message: "维护类型不能为空", trigger: "change" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
planOutsource: [
|
|
|
|
|
|
|
|
{ required: true, message: "是否委外不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
factoryCode: [
|
|
|
|
|
|
|
|
{ required: true, message: "工厂不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
delFlag: [
|
|
|
|
|
|
|
|
{ required: true, message: "删除标志不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
createBy: [
|
|
|
|
|
|
|
|
{ required: true, message: "创建人不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
createTime: [
|
|
|
|
|
|
|
|
{ required: true, message: "创建时间不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
updateBy: [
|
|
|
|
|
|
|
|
{ required: true, message: "更新人不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
],
|
|
|
|
|
|
|
|
updateTime: [
|
|
|
|
|
|
|
|
{ required: true, message: "更新时间不能为空", trigger: "blur" }
|
|
|
|
|
|
|
|
]
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
};
|
|
|
|
};
|
|
|
|
},
|
|
|
|
},
|
|
|
|
created() {
|
|
|
|
created() {
|
|
|
|
this.getList();
|
|
|
|
this.getList();
|
|
|
|
},
|
|
|
|
},
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
|
|
|
|
// 获取设备List-置入穿梭框信息
|
|
|
|
|
|
|
|
setPerson() {
|
|
|
|
|
|
|
|
getPersonList().then(response => {
|
|
|
|
|
|
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
|
|
|
|
|
|
this.personList.push({
|
|
|
|
|
|
|
|
label: response.data[i].nickName + '(' + response.data[i].userName + ')',
|
|
|
|
|
|
|
|
key: response.data[i].userId,
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 巡检人员穿梭框
|
|
|
|
|
|
|
|
filterMethod(query, item) {
|
|
|
|
|
|
|
|
return item.label.indexOf(query) > -1;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取工作中心
|
|
|
|
|
|
|
|
setWorkCenter() {
|
|
|
|
|
|
|
|
getWorkCenter().then(response => {
|
|
|
|
|
|
|
|
this.workCenterList = response.data;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 编辑标准确认按钮
|
|
|
|
|
|
|
|
standardBtn() {
|
|
|
|
|
|
|
|
this.editorItem = false;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 删除标准
|
|
|
|
|
|
|
|
delStandard(e) {
|
|
|
|
|
|
|
|
e.showFlag = false;
|
|
|
|
|
|
|
|
for (let i = 0; i < this.itemDetailList.length; i++) {
|
|
|
|
|
|
|
|
if (this.itemDetailList[i].detailCode == e.detailCode) {
|
|
|
|
|
|
|
|
this.itemDetailList[i].showFlag = false;
|
|
|
|
|
|
|
|
this.itemDetailList.splice(i, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 点击编辑设备-巡检项目
|
|
|
|
|
|
|
|
editorTheItem(e) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 清除缓存
|
|
|
|
|
|
|
|
this.itemDetailList = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理信息
|
|
|
|
|
|
|
|
if (e.equCheckItemList == null) {
|
|
|
|
|
|
|
|
// 编辑-返回信息
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < e.equPlanDetailList.length; i++) {
|
|
|
|
|
|
|
|
for (let j = 0; j < e.equPlanDetailList[i].equPlanStandardList.length; j++) {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 批量处理
|
|
|
|
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].itemName = e.equPlanDetailList[i].itemName;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 前端信息显示
|
|
|
|
|
|
|
|
if (e.equPlanDetailList[i].equPlanStandardList[j].standardType == "qualitative") {
|
|
|
|
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].standardTypeName = "定性";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
e.equPlanDetailList[i].equPlanStandardList[j].standardTypeName = "定量";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.itemDetailList.push(e.equPlanDetailList[i].equPlanStandardList[j]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
// 新增-信息
|
|
|
|
|
|
|
|
for (let i = 0; i < e.equCheckItemList.length; i++) {
|
|
|
|
|
|
|
|
for (let j = 0; j < e.equCheckItemList[i].equCheckItemDetailList.length; j++) {
|
|
|
|
|
|
|
|
// 批量处理
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].itemName = e.equCheckItemList[i].itemName;
|
|
|
|
|
|
|
|
// false不显示
|
|
|
|
|
|
|
|
if (e.equCheckItemList[i].equCheckItemDetailList[j].showFlag == false) {
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList.splice(j, 1);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 前端信息显示
|
|
|
|
|
|
|
|
if (e.equCheckItemList[i].equCheckItemDetailList[j].standardType == "qualitative") {
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定性";
|
|
|
|
|
|
|
|
} else {
|
|
|
|
|
|
|
|
e.equCheckItemList[i].equCheckItemDetailList[j].standardTypeName = "定量";
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.itemDetailList.push(e.equCheckItemList[i].equCheckItemDetailList[j]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.editorItem = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 删除设备-巡检项
|
|
|
|
|
|
|
|
delTheEquItem(e) {
|
|
|
|
|
|
|
|
this.form.equipmentItem.splice(e.equipmentCode, 1)
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 选择设备确认按钮
|
|
|
|
|
|
|
|
confirmSelectEquBtn() {
|
|
|
|
|
|
|
|
// 查询是否已经选择过
|
|
|
|
|
|
|
|
for (let i = 0; i < this.form.equipmentItem.length; i++) {
|
|
|
|
|
|
|
|
for (let j = 0; j < this.selectEquList.length; j++) {
|
|
|
|
|
|
|
|
if (this.form.equipmentItem[i].equipmentCode == this.selectEquList[j].equipmentCode) {
|
|
|
|
|
|
|
|
this.$message({
|
|
|
|
|
|
|
|
message: "存在已选择的设备!",
|
|
|
|
|
|
|
|
type: "warning"
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
return
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// 处理信息
|
|
|
|
|
|
|
|
formatEquItem(this.selectEquList).then(response => {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (let i = 0; i < response.data.length; i++) {
|
|
|
|
|
|
|
|
this.form.equipmentItem.push(response.data[i]);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.selectEqu = false;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 选择设备多选操作
|
|
|
|
|
|
|
|
selectChangeEqu(e) {
|
|
|
|
|
|
|
|
this.selectEquList = e;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 获取设备信息
|
|
|
|
|
|
|
|
getEquList() {
|
|
|
|
|
|
|
|
this.equLoading = true;
|
|
|
|
|
|
|
|
this.equipmentQuery.workshopCode = this.form.planWorkshop;
|
|
|
|
|
|
|
|
getEquList(this.equipmentQuery).then(response => {
|
|
|
|
|
|
|
|
this.equTotal = response.total;
|
|
|
|
|
|
|
|
this.queryEquipment = response.rows;
|
|
|
|
|
|
|
|
this.equLoading = false;
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 点击选择设备按钮
|
|
|
|
|
|
|
|
selectEquBtn() {
|
|
|
|
|
|
|
|
this.getEquList();
|
|
|
|
|
|
|
|
this.selectEqu = true;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 上一步
|
|
|
|
|
|
|
|
stepLast() {
|
|
|
|
|
|
|
|
this.upkeepSteps--;
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
// 下一步
|
|
|
|
|
|
|
|
stepNext() {
|
|
|
|
|
|
|
|
this.upkeepSteps++;
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 查询保养计划列表 */
|
|
|
|
/** 查询保养计划列表 */
|
|
|
|
getList() {
|
|
|
|
getList() {
|
|
|
|
this.loading = true;
|
|
|
|
this.loading = true;
|
|
|
@ -576,7 +876,7 @@ export default {
|
|
|
|
equipmentName: null,
|
|
|
|
equipmentName: null,
|
|
|
|
equipmentCode: null,
|
|
|
|
equipmentCode: null,
|
|
|
|
planLoop: null,
|
|
|
|
planLoop: null,
|
|
|
|
planLoopType: null,
|
|
|
|
planLoopType: 'day',
|
|
|
|
planLoopStart: null,
|
|
|
|
planLoopStart: null,
|
|
|
|
planLoopEnd: null,
|
|
|
|
planLoopEnd: null,
|
|
|
|
planPerson: null,
|
|
|
|
planPerson: null,
|
|
|
@ -593,10 +893,25 @@ export default {
|
|
|
|
createBy: null,
|
|
|
|
createBy: null,
|
|
|
|
createTime: null,
|
|
|
|
createTime: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateBy: null,
|
|
|
|
updateTime: null
|
|
|
|
updateTime: null,
|
|
|
|
|
|
|
|
upkeep: '1',
|
|
|
|
|
|
|
|
calculationRule: '0',
|
|
|
|
|
|
|
|
shutDown: '0',
|
|
|
|
|
|
|
|
equipmentItem: [],
|
|
|
|
};
|
|
|
|
};
|
|
|
|
this.resetForm("form");
|
|
|
|
this.resetForm("form");
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
// 重置设备搜索
|
|
|
|
|
|
|
|
resetEqu() {
|
|
|
|
|
|
|
|
this.equipmentQuery = {
|
|
|
|
|
|
|
|
equipmentCode: null,
|
|
|
|
|
|
|
|
equipmentName: null,
|
|
|
|
|
|
|
|
workshopCode: null,
|
|
|
|
|
|
|
|
pageNum: 1,
|
|
|
|
|
|
|
|
pageSize: 10,
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
this.getEquList();
|
|
|
|
|
|
|
|
},
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
/** 搜索按钮操作 */
|
|
|
|
handleQuery() {
|
|
|
|
handleQuery() {
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
|
this.queryParams.pageNum = 1;
|
|
|
@ -616,6 +931,15 @@ export default {
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
/** 新增按钮操作 */
|
|
|
|
handleAdd() {
|
|
|
|
handleAdd() {
|
|
|
|
this.reset();
|
|
|
|
this.reset();
|
|
|
|
|
|
|
|
// 清除缓存
|
|
|
|
|
|
|
|
this.resetQuery();
|
|
|
|
|
|
|
|
this.queryEquipment = [];
|
|
|
|
|
|
|
|
this.upkeepSteps = 0;
|
|
|
|
|
|
|
|
this.selectPersonList = [];
|
|
|
|
|
|
|
|
this.personList = [];
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
this.setPerson();
|
|
|
|
|
|
|
|
this.setWorkCenter();
|
|
|
|
this.open = true;
|
|
|
|
this.open = true;
|
|
|
|
this.title = "添加保养计划";
|
|
|
|
this.title = "添加保养计划";
|
|
|
|
},
|
|
|
|
},
|
|
|
@ -634,6 +958,7 @@ export default {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
this.$refs["form"].validate(valid => {
|
|
|
|
if (valid) {
|
|
|
|
if (valid) {
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
if (this.form.planId != null) {
|
|
|
|
|
|
|
|
this.form.personList = this.selectPersonList;
|
|
|
|
updateUpkeepPlan(this.form).then(response => {
|
|
|
|
updateUpkeepPlan(this.form).then(response => {
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.$modal.msgSuccess("修改成功");
|
|
|
|
this.open = false;
|
|
|
|
this.open = false;
|
|
|
@ -668,3 +993,17 @@ export default {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
};
|
|
|
|
};
|
|
|
|
</script>
|
|
|
|
</script>
|
|
|
|
|
|
|
|
<style>
|
|
|
|
|
|
|
|
.my-step-mar {
|
|
|
|
|
|
|
|
margin-left: 10px;
|
|
|
|
|
|
|
|
margin-right: 10px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.my-step-body {
|
|
|
|
|
|
|
|
margin-top: 15px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
.el-transfer-panel {
|
|
|
|
|
|
|
|
width: 270px;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
</style>
|
|
|
|