设备
这个提交包含在:
父节点
35da704bb4
当前提交
0abf628377
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: Do not edit
|
||||
* @Date: 2023-11-08 15:56:52
|
||||
* @LastEditTime: 2023-11-25 16:22:49
|
||||
* @LastEditTime: 2024-02-25 22:23:54
|
||||
* @LastEditors: DY
|
||||
* @Description:
|
||||
*/
|
||||
@ -100,3 +100,63 @@ export function updateCheckConfig(data) {
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 创建巡检单
|
||||
export function createCheckOrder(data) {
|
||||
return request({
|
||||
url: '/base/equipment-check-order/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新巡检单
|
||||
export function updateCheckOrder(data) {
|
||||
return request({
|
||||
url: '/base/equipment-check-order/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 获得设备巡检单code
|
||||
export function getOrderCode() {
|
||||
return request({
|
||||
url: '/base/equipment-check-order/getCode',
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得巡检单
|
||||
export function getCheckOrder(id) {
|
||||
return request({
|
||||
url: '/base/equipment-check-order/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 获得巡检单详细
|
||||
export function getCheckOrderDet(id) {
|
||||
return request({
|
||||
url: '/base/equipment-check-order-det/get?id=' + id,
|
||||
method: 'get'
|
||||
})
|
||||
}
|
||||
|
||||
// 创建巡检单详情
|
||||
export function createCheckOrderDet(data) {
|
||||
return request({
|
||||
url: '/base/equipment-check-order-det/create',
|
||||
method: 'post',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
||||
// 更新巡检单详情
|
||||
export function updateCheckOrderDet(data) {
|
||||
return request({
|
||||
url: '/base/equipment-check-order-det/update',
|
||||
method: 'put',
|
||||
data: data
|
||||
})
|
||||
}
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-12-01 11:02:43
|
||||
* @LastEditTime: 2024-02-26 08:40:22
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -13,34 +13,25 @@
|
||||
class="drawer"
|
||||
size="50%">
|
||||
<small-title slot="title" :no-padding="true">
|
||||
{{ isdetail ? '详情' : '添加巡检' }}
|
||||
<!-- {{ isdetail ? '详情' : '添加巡检' }} -->
|
||||
{{ '添加内容' }}
|
||||
</small-title>
|
||||
<div class="content">
|
||||
<div class="visual-part">
|
||||
<el-form
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="100px"
|
||||
label-position="top">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="equipmentName">
|
||||
<el-input v-model="dataForm.equipmentName" disabled clearable placeholder="请输入设备名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编码" prop="equipmentCode">
|
||||
<el-input
|
||||
v-model="dataForm.equipmentCode"
|
||||
clearable
|
||||
disabled
|
||||
placeholder="请输入设备编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">巡检单名称</div>
|
||||
<div class="lightTip">{{ dataForm.name }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">部门</div>
|
||||
<div class="lightTip">{{ dataForm.department }}</div>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<div class="blodTip">巡检时间</div>
|
||||
<div class="lightTip">{{ parseTime(dataForm.planCheckTime) }}</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
|
||||
<el-divider />
|
||||
@ -49,7 +40,7 @@
|
||||
<small-title
|
||||
style="margin: 16px 0; padding-left: 8px"
|
||||
:no-padding="true">
|
||||
巡检项目
|
||||
巡检内容
|
||||
</small-title>
|
||||
|
||||
<div v-if="!isdetail" class="action_btn">
|
||||
@ -90,16 +81,18 @@
|
||||
<attr-add
|
||||
v-if="addOrUpdateVisible"
|
||||
ref="addOrUpdate"
|
||||
:config-id="dataForm.id"
|
||||
:order-id="dataForm.id"
|
||||
@refreshDataList="getList" />
|
||||
</el-drawer>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getEqCheck, getCheckDetPage, deleteCheckDet } from "@/api/equipment/base/inspection/settings";
|
||||
import { getCheckOrder } from "@/api/equipment/base/inspection/settings";
|
||||
import { deleteCheckOrderDet, getCheckOrderDetPage } from '@/api/equipment/base/inspection/record';
|
||||
import SmallTitle from './SmallTitle';
|
||||
import attrAdd from './attr-add';
|
||||
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
|
||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||
|
||||
const tableBtn = [
|
||||
{
|
||||
@ -112,22 +105,14 @@ const tableBtn = [
|
||||
},
|
||||
];
|
||||
const tableProps = [
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
label: '设备名称',
|
||||
},
|
||||
{
|
||||
prop: 'program',
|
||||
label: '巡检项目',
|
||||
},
|
||||
{
|
||||
prop: 'content',
|
||||
label: '巡检内容',
|
||||
},
|
||||
{
|
||||
prop: 'code',
|
||||
label: '巡检内容编码',
|
||||
},
|
||||
{
|
||||
prop: 'description',
|
||||
label: '备注',
|
||||
},
|
||||
label: '检查项目',
|
||||
}
|
||||
];
|
||||
|
||||
export default {
|
||||
@ -138,7 +123,7 @@ export default {
|
||||
tableProps,
|
||||
addOrUpdateVisible: false,
|
||||
urlOptions: {
|
||||
infoURL: getEqCheck,
|
||||
infoURL: getCheckOrder,
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
@ -147,26 +132,13 @@ export default {
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
name: '',
|
||||
materialType: undefined,
|
||||
productType: undefined,
|
||||
area: undefined,
|
||||
specifications: undefined,
|
||||
processTime: 0,
|
||||
remark: undefined,
|
||||
unit: undefined
|
||||
name: undefined,
|
||||
department: undefined,
|
||||
planCheckTime: undefined
|
||||
},
|
||||
checkDetList: [],
|
||||
visible: false,
|
||||
isdetail: false,
|
||||
dataRule: {
|
||||
code: [{ required: true, message: "物料编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "物料名称不能为空", trigger: "blur" }],
|
||||
materialType: [{ required: true, message: "物料类型不能为空", trigger: "change" }],
|
||||
productType: [{ required: true, message: "产品类型不能为空", trigger: "change" }],
|
||||
processTime: [{ required: true, message: "产线生产单位用时不能为空", trigger: "blur" }]
|
||||
}
|
||||
isdetail: false
|
||||
};
|
||||
},
|
||||
mounted() {},
|
||||
@ -187,7 +159,7 @@ export default {
|
||||
}
|
||||
)
|
||||
.then(() => {
|
||||
deleteCheckDet(raw.data.id).then(({ data }) => {
|
||||
deleteCheckOrderDet(raw.data.id).then(({ data }) => {
|
||||
this.$message({
|
||||
message: '操作成功',
|
||||
type: 'success',
|
||||
@ -205,9 +177,9 @@ export default {
|
||||
},
|
||||
getList() {
|
||||
// 获取巡检项目分页
|
||||
getCheckDetPage({
|
||||
getCheckOrderDetPage({
|
||||
...this.listQuery,
|
||||
configId: this.dataForm.id,
|
||||
orderId: this.dataForm.id,
|
||||
}).then((response) => {
|
||||
this.checkDetList = response.data.list;
|
||||
this.listQuery.total = response.data.total;
|
||||
@ -220,7 +192,7 @@ export default {
|
||||
this.visible = true;
|
||||
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
// this.$refs['dataForm'].resetFields();
|
||||
|
||||
if (this.dataForm.id) {
|
||||
// 获取设备巡检详情
|
||||
@ -287,7 +259,7 @@ export default {
|
||||
|
||||
.drawer >>> .visual-part {
|
||||
flex: 1 auto;
|
||||
max-height: 16vh;
|
||||
max-height: 10vh;
|
||||
overflow: hidden;
|
||||
overflow-y: scroll;
|
||||
padding-right: 10px; /* 调整滚动条样式 */
|
||||
@ -311,4 +283,18 @@ export default {
|
||||
.add {
|
||||
color: #0b58ff;
|
||||
}
|
||||
.blodTip {
|
||||
height: 16px;
|
||||
font-size: 14px;
|
||||
font-weight: 600;
|
||||
color: rgba(0,0,0,0.85);
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
.lightTip {
|
||||
/* height: 16px; */
|
||||
font-size: 14px;
|
||||
font-weight: 400;
|
||||
color: rgba(102,102,102,0.75);
|
||||
margin-bottom: 12px;
|
||||
}
|
||||
</style>
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-11-18 14:16:25
|
||||
* @LastEditors: DY
|
||||
* @LastEditTime: 2023-11-25 16:23:13
|
||||
* @LastEditTime: 2024-02-24 20:50:51
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -11,44 +11,83 @@
|
||||
:rules="dataRule"
|
||||
ref="dataForm"
|
||||
@keyup.enter.native="dataFormSubmit()"
|
||||
label-width="80px">
|
||||
label-width="120px">
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="配置名称" prop="name">
|
||||
<el-form-item label="巡检单名称" prop="name">
|
||||
<el-input
|
||||
v-model="dataForm.name"
|
||||
placeholder="请输入配置名称" />
|
||||
placeholder="请输入巡检单名称" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="配置编码" prop="code">
|
||||
<el-form-item label="巡检单编码" prop="code">
|
||||
<el-input
|
||||
v-model="dataForm.code"
|
||||
placeholder="请输入配置编码" />
|
||||
placeholder="请输入巡检单编码" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备名称" prop="equipmentId">
|
||||
<el-form-item
|
||||
label="部门"
|
||||
prop="departmentId"
|
||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
||||
<el-select
|
||||
v-model="dataForm.equipmentId"
|
||||
filterable
|
||||
style="width: 100%"
|
||||
placeholder="请选择设备名称"
|
||||
@change="setCode">
|
||||
v-model="dataForm.departmentId"
|
||||
:placeholder="`请选择部门`"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in eqList"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id" />
|
||||
v-for="opt in departmentOptions"
|
||||
:key="opt.id"
|
||||
:label="opt.name"
|
||||
:value="opt.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="设备编码" prop="equipmentCode">
|
||||
<el-input v-model="dataForm.equipmentCode" disabled placeholder="请输入设备编码" />
|
||||
</el-form-item>
|
||||
<el-form-item label="计划巡检时间" prop="planCheckTime">
|
||||
<el-date-picker
|
||||
v-model="dataForm.planCheckTime"
|
||||
type="datetime"
|
||||
:placeholder="`请选择计划巡检时间`"
|
||||
value-format="timestamp"
|
||||
style="width: 100%" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
|
||||
<el-input
|
||||
v-model="dataForm.confirmTimeLimit"
|
||||
:placeholder="`请输入确认时限`" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span="12">
|
||||
<el-form-item label="班次" prop="groupClass">
|
||||
<el-select
|
||||
v-model="dataForm.groupClass"
|
||||
filterable
|
||||
clearable
|
||||
multiple
|
||||
style="width: 100%"
|
||||
placeholder="请选择班次">
|
||||
<el-option
|
||||
v-for="d in groupOptions"
|
||||
:key="d.id"
|
||||
:label="d.name"
|
||||
:value="d.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="20">
|
||||
<el-col :span="12">
|
||||
<el-form-item label="备注" prop="remark">
|
||||
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
@ -56,8 +95,10 @@
|
||||
|
||||
<script>
|
||||
import basicAdd from '../../../../core/mixins/basic-add';
|
||||
import { getEqCheck, getCode, createCheckConfig, updateCheckConfig } from "@/api/equipment/base/inspection/settings";
|
||||
import { getEquipmentAll } from '@/api/base/equipment'
|
||||
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
|
||||
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
|
||||
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
|
||||
// import { getEquipmentAll } from '@/api/base/equipment'
|
||||
|
||||
export default {
|
||||
mixins: [basicAdd],
|
||||
@ -65,23 +106,36 @@ export default {
|
||||
return {
|
||||
urlOptions: {
|
||||
isGetCode: true,
|
||||
codeURL: getCode,
|
||||
createURL: createCheckConfig,
|
||||
updateURL: updateCheckConfig,
|
||||
infoURL: getEqCheck,
|
||||
codeURL: getOrderCode,
|
||||
createURL: createCheckOrder,
|
||||
updateURL: updateCheckOrder,
|
||||
infoURL: getCheckOrder,
|
||||
},
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
code: undefined,
|
||||
name: undefined,
|
||||
equipmentId: undefined,
|
||||
equipmentCode: undefined
|
||||
id: null,
|
||||
code: null,
|
||||
name: null,
|
||||
departmentId: null,
|
||||
planCheckTime: null,
|
||||
confirmTimeLimit: null,
|
||||
groupClass: null,
|
||||
remark: null
|
||||
},
|
||||
eqList: [],
|
||||
groupOptions: [],
|
||||
departmentOptions: [],
|
||||
dataRule: {
|
||||
equipmentId: [{ required: true, message: "设备不能为空", trigger: "blur" }],
|
||||
code: [{ required: true, message: "配置编码不能为空", trigger: "blur" }],
|
||||
name: [{ required: true, message: "配置名称不能为空", trigger: "blur" }],
|
||||
confirmTimeLimit: [
|
||||
{ required: true, message: '确认时限不能为空', trigger: 'blur' }
|
||||
],
|
||||
code: [
|
||||
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' }
|
||||
],
|
||||
name: [
|
||||
{ required: true, message: '巡检单名称不能为空', trigger: 'blur' }
|
||||
],
|
||||
planCheckTime: [
|
||||
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
};
|
||||
},
|
||||
@ -90,16 +144,47 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
// 设备列表
|
||||
const res = await getEquipmentAll()
|
||||
this.eqList = res.data
|
||||
// 部门列表
|
||||
const res = await getCoreDepartmentList();
|
||||
this.departmentOptions = res.data || [];
|
||||
const res1 = await groupClassesListAll();
|
||||
this.groupOptions = res1.data || [];
|
||||
// const res = await getEquipmentAll()
|
||||
// this.eqList = res.data
|
||||
},
|
||||
setCode() {
|
||||
const chooseM = this.eqList.filter(item => {
|
||||
return item.id === this.dataForm.equipmentId
|
||||
})
|
||||
this.dataForm.equipmentCode = chooseM[0].code
|
||||
}
|
||||
// 表单提交
|
||||
dataFormSubmit() {
|
||||
this.$refs["dataForm"].validate((valid) => {
|
||||
if (!valid) {
|
||||
return false;
|
||||
}
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
this.urlOptions.updateURL({
|
||||
...this.dataForm,
|
||||
special: false,
|
||||
status: 0,
|
||||
groupClass: this.dataForm.groupClass.join(',')
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("修改成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
this.urlOptions.createURL({
|
||||
...this.dataForm,
|
||||
special: false,
|
||||
status: 0,
|
||||
groupClass: this.dataForm.groupClass.join(',')
|
||||
}).then(response => {
|
||||
this.$modal.msgSuccess("新增成功");
|
||||
this.visible = false;
|
||||
this.$emit("refreshDataList");
|
||||
});
|
||||
});
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
@ -17,18 +17,32 @@
|
||||
ref="dataForm"
|
||||
:model="dataForm"
|
||||
:rules="dataRule"
|
||||
label-width="60px"
|
||||
label-width="90px"
|
||||
@keyup.enter.native="dataFormSubmit()">
|
||||
<el-form-item label="巡检" prop="checkId">
|
||||
<el-select v-model="dataForm.checkId" filterable placeholder="请选择巡检" style="width: 100%">
|
||||
<el-option v-for="dict in checkList" :key="dict.id" :label="dict.content"
|
||||
<el-form-item label="设备名称" prop="equipmentId">
|
||||
<el-select
|
||||
v-model="dataForm.equipmentId"
|
||||
filterable
|
||||
clearable
|
||||
placeholder="请选择设备名称"
|
||||
style="width: 100%">
|
||||
<el-option
|
||||
v-for="dict in equipmentOptions"
|
||||
:key="dict.id"
|
||||
:label="dict.name"
|
||||
:value="dict.id" />
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="备注" prop="description">
|
||||
<el-form-item label="巡检项目" prop="program">
|
||||
<el-input
|
||||
v-model="dataForm.description"
|
||||
placeholder="请输入备注"
|
||||
v-model="dataForm.program"
|
||||
placeholder="请输入巡检项目"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
<el-form-item label="巡检结果" prop="checkResult">
|
||||
<el-input
|
||||
v-model="dataForm.checkResult"
|
||||
placeholder="请输入巡检结果"
|
||||
clearable />
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
@ -41,11 +55,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { getCheckDet, createCheckDet, updateCheckDet, getcheckList } from "@/api/equipment/base/inspection/settings";
|
||||
import { getCheckOrderDet, createCheckOrderDet, updateCheckOrderDet } from "@/api/equipment/base/inspection/settings";
|
||||
import { getEquipmentPage } from '@/api/base/equipment'
|
||||
|
||||
export default {
|
||||
props: {
|
||||
configId: {
|
||||
orderId: {
|
||||
type: String,
|
||||
default: '',
|
||||
},
|
||||
@ -54,14 +69,22 @@ export default {
|
||||
return {
|
||||
visible: false,
|
||||
dataForm: {
|
||||
id: undefined,
|
||||
checkId: undefined,
|
||||
configId: undefined,
|
||||
description: ''
|
||||
id: null,
|
||||
equipmentId: null,
|
||||
program: null,
|
||||
checkResult: null
|
||||
},
|
||||
checkList: [],
|
||||
equipmentOptions: [],
|
||||
dataRule: {
|
||||
checkId: [{ required: true, message: '巡检不能为空', trigger: 'blur' }],
|
||||
equipmentId: [
|
||||
{ required: true, message: '设备不能为空', trigger: 'blur' }
|
||||
],
|
||||
program: [
|
||||
{ required: true, message: '巡检项目不能为空', trigger: 'blur' }
|
||||
],
|
||||
checkResult: [
|
||||
{ required: true, message: '巡检结果不能为空', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
};
|
||||
},
|
||||
@ -70,8 +93,12 @@ export default {
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
const res = await getcheckList()
|
||||
this.checkList = res.data
|
||||
const res = await getEquipmentPage({
|
||||
pageNo: 1,
|
||||
pageSize: 100,
|
||||
special: false
|
||||
})
|
||||
this.equipmentOptions = res.data.list
|
||||
},
|
||||
init(id) {
|
||||
this.dataForm.id = id || '';
|
||||
@ -79,7 +106,7 @@ export default {
|
||||
this.$nextTick(() => {
|
||||
this.$refs['dataForm'].resetFields();
|
||||
if (this.dataForm.id) {
|
||||
getCheckDet(this.dataForm.id).then((res) => {
|
||||
getCheckOrderDet(this.dataForm.id).then((res) => {
|
||||
// const { name, value } = res.data;
|
||||
// this.dataForm.name = name;
|
||||
// this.dataForm.value = value;
|
||||
@ -94,9 +121,9 @@ export default {
|
||||
if (valid) {
|
||||
// 修改的提交
|
||||
if (this.dataForm.id) {
|
||||
updateCheckDet({
|
||||
updateCheckOrderDet({
|
||||
...this.dataForm,
|
||||
configId: this.configId
|
||||
orderId: this.orderId
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('修改成功');
|
||||
this.visible = false;
|
||||
@ -105,9 +132,9 @@ export default {
|
||||
return;
|
||||
}
|
||||
// 添加的提交
|
||||
createCheckDet({
|
||||
createCheckOrderDet({
|
||||
...this.dataForm,
|
||||
configId: this.configId,
|
||||
orderId: this.orderId,
|
||||
}).then((response) => {
|
||||
this.$modal.msgSuccess('新增成功');
|
||||
this.visible = false;
|
||||
|
@ -53,6 +53,7 @@
|
||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
import addOrUpdata from './add-or-updata.vue';
|
||||
import add from './add.vue'
|
||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||
// import { publicFormatter } from '@/utils/dict';
|
||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||
|
||||
@ -79,12 +80,12 @@ export default {
|
||||
btnName: '修改',
|
||||
}
|
||||
: undefined,
|
||||
this.$auth.hasPermi('equipment:check-setting:update')
|
||||
? {
|
||||
type: 'detail',
|
||||
btnName: '查看详情',
|
||||
}
|
||||
: undefined,
|
||||
// this.$auth.hasPermi('equipment:check-setting:update')
|
||||
// ? {
|
||||
// type: 'detail',
|
||||
// btnName: '查看详情',
|
||||
// }
|
||||
// : undefined,
|
||||
this.$auth.hasPermi('equipment:check-setting:delete')
|
||||
? {
|
||||
type: 'delete',
|
||||
@ -93,29 +94,31 @@ export default {
|
||||
: undefined,
|
||||
].filter((v) => v),
|
||||
tableProps: [
|
||||
{ prop: 'name', label: '配置名', width: 110, showOverflowtooltip: true },
|
||||
{ prop: 'code', label: '编码', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'lineName', label: '产线', showOverflowtooltip: true },
|
||||
{ prop: 'sectionName', label: '工段', showOverflowtooltip: true },
|
||||
{ prop: 'equipmentName', label: '设备', showOverflowtooltip: true },
|
||||
{ prop: 'equipmentCode', label: '设备编码', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
|
||||
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'department', label: '部门', showOverflowtooltip: true },
|
||||
{ prop: 'planCheckTime', label: '计划巡检时间', filter: parseTime },
|
||||
{ prop: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
|
||||
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
|
||||
{ prop: 'checkPerson', label: '创建人', minWidth: 150, showOverflowtooltip: true },
|
||||
{ prop: 'createTime', label: '创建时间', filter: parseTime },
|
||||
// { prop: 'responsible', label: '负责人' },
|
||||
{ prop: 'checkNumber', label: '巡检条数' }, // TODO: 操作 选项,四个,群里询问
|
||||
{ prop: 'remark', label: '备注' } // TODO: 操作 选项,四个,群里询问
|
||||
],
|
||||
searchBarFormConfig: [
|
||||
{
|
||||
type: 'input',
|
||||
label: '配置名称',
|
||||
placeholder: '请输入配置名称',
|
||||
label: '巡检单名称',
|
||||
placeholder: '请输入巡检单名称',
|
||||
param: 'name',
|
||||
},
|
||||
{
|
||||
type: 'select',
|
||||
label: '设备名称',
|
||||
placeholder: '请选择设备',
|
||||
param: 'equipmentId',
|
||||
filterable: true,
|
||||
},
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '设备名称',
|
||||
// placeholder: '请选择设备',
|
||||
// param: 'equipmentId',
|
||||
// filterable: true,
|
||||
// },
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
@ -133,7 +136,7 @@ export default {
|
||||
name: 'add',
|
||||
plain: true,
|
||||
color: 'success',
|
||||
},
|
||||
}
|
||||
// {
|
||||
// type: this.$auth.hasPermi('equipment:check-setting:export')
|
||||
// ? 'button'
|
||||
@ -192,10 +195,11 @@ export default {
|
||||
pageSize: 10,
|
||||
equipmentId: null,
|
||||
name: null,
|
||||
special: false
|
||||
},
|
||||
// 表单参数
|
||||
form: {},
|
||||
basePath: '/base/equipment-check-config',
|
||||
basePath: '/base/equipment-check-order',
|
||||
mode: null,
|
||||
};
|
||||
},
|
||||
|
正在加载...
在新工单中引用
屏蔽一个用户