Compare commits

..

No commits in common. "f685a65a1fda05ea40b0d4f1e01badc4a76593f0" and "bf90cc453dff9221318765574476820db0f79171" have entirely different histories.

55 changed files with 622 additions and 1145 deletions

View File

@ -1,8 +1,8 @@
###
# @Author: Do not edit
# @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-03-01 15:27:52
# @LastEditors: zhp
# @LastEditTime: 2024-02-26 08:45:43
# @LastEditors: DY
# @Description:
###
# 开发环境配置
@ -20,10 +20,10 @@ VUE_APP_TITLE = MES系统
# VUE_APP_BASE_API = 'http://192.168.1.8:48082'
# VUE_APP_BASE_API = 'http://192.168.4.159:48080'
# VUE_APP_BASE_API = 'http://192.168.1.104:48082'
VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.62:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78:48082'
# VUE_APP_BASE_API = 'http://192.168.1.47:48082'
VUE_APP_BASE_API = 'http://192.168.1.47:48082'
# socket地址
VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'

View File

@ -153,12 +153,3 @@ export function createConCoreWOr(data) {
data: data
})
}
// 修改分配产量
export function updateConCoreWOr(data) {
return request({
url: '/base/core-order-con-work-order/update',
method: 'put',
data: data
})
}

View File

@ -1,7 +1,7 @@
/*
* @Author: Do not edit
* @Date: 2023-11-08 15:56:52
* @LastEditTime: 2024-02-28 18:16:56
* @LastEditTime: 2024-02-26 09:29:53
* @LastEditors: DY
* @Description:
*/
@ -52,17 +52,6 @@ export function exportCheckLogExcel(query) {
})
}
// 导出设备巡检单记录
export function exportCheckOrderExcel(query) {
return request({
url: '/base/equipment-check-order/export-excel',
method: 'get',
params: query,
responseType: 'blob'
})
}
// 根据设备获得所有巡检配置列表
export function getcheckConfigByEqList(query) {
return request({

View File

@ -87,7 +87,6 @@ const user = {
// 获取用户信息
GetInfo({ commit, state }) {
return new Promise((resolve, reject) => {
console.log('GetInfo')
getInfo().then(res => {
// 没有 data 数据,赋予个默认值
if (!res) {
@ -97,7 +96,7 @@ const user = {
user: {
id: '',
avatar: '',
username: '',
userName: '',
nickname: ''
}
}
@ -114,7 +113,7 @@ const user = {
commit('SET_ROLES', ['ROLE_DEFAULT'])
}
commit('SET_ID', user.id)
// commit('SET_NAME', user.username) //无效调用接口未提供username值
commit('SET_NAME', user.userName)
commit('SET_NICKNAME', user.nickname)
commit('SET_AVATAR', avatar)
resolve(res)

View File

@ -1,4 +0,0 @@
import { getDictData } from './dict';
export const groupConnectWorkshop = (groupName, workshopValue) =>
`${groupName} - ${getDictData('workshop', workshopValue)?.label}`;

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-02-29 15:48:47
* @LastEditTime: 2024-02-23 16:11:33
* @Description:
-->
<template>
@ -715,7 +715,6 @@ export default {
qualityMonthTableProps,
modelMonth: '',
qualityList1,
// logoutTime: 43200000,
qualityTableProps2,
qualityList2,
dateType: '0',

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-29 16:50:26
* @LastEditTime: 2024-02-29 15:48:11
* @LastEditTime: 2024-02-23 16:11:40
* @LastEditors: zhp
* @Description:
-->
@ -341,9 +341,7 @@ export default {
// offsetWidth: null,
cxNameList,
cxDataList,
// time:12,
cutProps,
// logoutTime: 43200000,
cutTableDataList:[],
clientWidth: 0,
containerWidth: 111111,
@ -434,15 +432,36 @@ export default {
this.beilv2 = _this.clientWidth / 1920
})()
}
// logoutInterval = setInterval(() => {
// this.logoutTime -= 1000
// }, 1000)
// if (this.logoutTime === 0) {
// this.SJGInitWebSocket()
// this.CutInitWebSocket()
// this.funInitWebSocket()
// this.logoutTimeReset()
// let obj = {
// 'a': 11111,
// 'b': 22222,
// 'c': 33333,
// 'd': 44444,
// 'e': 55555,
// }
// let index = 0
// for (let i in obj) {
// index++,
// console.log(index);
// }
// this.getList()
// const _this = this;
// window.onresize = () => {
// return (() => {
// _this.clientWidth = `${document.documentElement.clientWidth}`
// this.beilv2 = _this.clientWidth / 1920
// })()
// }
// this.beilv2 = window.innerWidth / 1920
// addEventListener('resize', resizeFun = () => {
// this.beilv2 = window.innerWidth / 1920
// })
// erd.listenTo(document, (element) => {
// this.beilv2 = element.offsetWidth / 1920
// // var width = element.offsetWidth;
// // var height = element.offsetHeight;
// });
},
// beforeDestroy() {
// //
@ -450,16 +469,13 @@ export default {
// removeEventListener('resize', resizeFun)
// },
methods: {
// logoutTimeReset() {
// this.logoutTime = this.time * 60 * 60 * 1000
// },
CutWebsocketClose(e) {
console.log('WebSocket 断开连接', e)
},
SJGWebsocketClose(e) {
console.log('WebSocket 断开连接', e)
},
funWebSocketClose(e) {
funInitWebSocket(e) {
console.log('WebSocket 断开连接', e)
},
formatTime(time, option) {

View File

@ -83,14 +83,20 @@
<el-col :span="12">
<el-form-item
label="工段排序"
prop="sort">
<el-input-number
prop="sort"
:rules="[
{
type: 'number',
trigger: 'change',
message: '请输入正确的数字类型',
transform: (val) => Number(val),
},
]">
<el-input
v-model="dataForm.sort"
clearable
controls-position="right"
@change="$emit('update', dataForm)"
placeholder="请输入工段排序"
style="width: 100%" />
placeholder="请输入工段排序" />
</el-form-item>
</el-col>
</el-row>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 15:01:25
* @LastEditTime: 2024-02-27 15:38:04
* @Description:
-->
<template>
@ -325,7 +325,7 @@ export default {
init(row, isdetail) {
this.initData();
this.isdetail = isdetail || false;
this.dataForm.id = row?.id || undefined;
this.dataForm.id = row.id || undefined;
this.isedit = row?.id && row?.externalCode ? true : false;
console.log('你好', this.isedit)
this.visible = true;

View File

@ -253,9 +253,7 @@ export default {
if (this.dataForm.priority !== undefined) {
this.dataForm.priority = String(this.dataForm.priority)
}
if (this.dataForm.roomNameDict !== undefined) {
this.dataForm.roomNameDict = String(this.dataForm.roomNameDict)
}
this.dataForm.priority
});
} else {
if (this.urlOptions.isGetCode) {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 10:01:52
* @LastEditTime: 2023-11-16 09:14:35
* @Description:
-->
<template>
@ -41,12 +41,12 @@
<el-table-column prop="priority" label="优先级" />
<el-table-column prop="planAssignmentQuantity" label="计划分配数量" >
<template slot-scope="scope">
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
<el-input v-model="scope.row.planAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
</template>
</el-table-column>
<el-table-column prop="actualAssignmentQuantity" label="实际分配数量">
<template slot-scope="scope">
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.isallocation"></el-input>
<el-input v-model="scope.row.actualAssignmentQuantity" :disabled="scope.row.actualAssignmentQuantity"></el-input>
</template>
</el-table-column>
<el-table-column label="操作">
@ -104,7 +104,7 @@
<script>
import basicAdd from '../../core/mixins/basic-add';
import { getConOrderList, updateConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
import { getConOrderList, createConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
import SmallTitle from '../material/SmallTitle';
// import { parseTime } from '../../core/mixins/code-filter';
// import attrAdd from './attr-add';
@ -159,8 +159,8 @@ export default {
// });
// return;
}
//
updateConCoreWOr({
//
createConCoreWOr({
...row,
workOrderId: this.dataForm.id
}).then((response) => {
@ -173,17 +173,16 @@ export default {
}
},
getList() {
//
// Bom
getConOrderList({
...this.listQuery,
workOrderId: this.dataForm.id
}).then((response) => {
this.tableData = response.data.map(item => {
item.isEdit = false
item.isallocation = item.actualAssignmentQuantity ? true : false
return item
});
this.listQuery.total = response.data.length;
this.listQuery.total = response.data.total;
});
},
//

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 15:35:02
* @LastEditTime: 2023-12-26 16:59:25
* @Description:
-->
<template>
@ -45,7 +45,7 @@
</el-col>
<el-col :span="3">
<div class="blodTip">工单来源</div>
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES-手动' : dataForm.triggerOrigin === 2 ? 'MES-订单下发' : 'ERP'}}</div>
<div class="lightTip">{{ dataForm.triggerOrigin === 1 ? 'MES' : dataForm.triggerOrigin === 2 ? 'ERP' : ''}}</div>
</el-col>
<el-col :span="3">
<div class="blodTip">所属订单</div>
@ -218,7 +218,7 @@
<script>
// import basicAdd from '../../core/mixins/basic-add';
import { getCoreWO, getCoreWOMaPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
import { getCoreWO, getMaterialBomPage, getConOrderList, getCoreWOListById } from "@/api/base/coreWorkOrder";
// import { orderList } from "@/api/base/orderManage";
import { getProcessFlowList } from '@/api/base/orderManage'
import SmallTitle from './SmallTitle';
@ -261,9 +261,8 @@ const tableProps = [
const tableProps1 = [
{
prop: 'material',
label: '物料名称',
filter: publicFormatter('material')
prop: 'materialName',
label: '物料名称'
},
{
prop: 'unit',
@ -271,7 +270,7 @@ const tableProps1 = [
filter: publicFormatter('unit_dict')
},
{
prop: 'remaining',
prop: 'num',
label: '剩余生产预计消耗'
},
];
@ -432,17 +431,11 @@ export default {
// this.listQuery.total = response.data.total;
});
// 使
console.log()
if (this.dataForm.id) {
getCoreWOMaPage({
workOrderId: this.dataForm.id,
pageNo: 1,
pageSize: 100
if (this.dataForm.planProductId) {
getMaterialBomPage({
productId: this.dataForm.planProductId,
}).then((response) => {
this.materialList = response.data.records.map((item) => {
item.remaining = item?.num * this.dataForm.remainingQuantity || 0
return item
});
this.materialList = response.data;
// this.listQuery.total = response.data.length;
});
}

View File

@ -197,7 +197,17 @@ export default {
{
name: 'status',
type: 'equal',
value: 1
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
},
{
name: 'status',
type: 'equal',
value: 4
}
]
}
@ -231,11 +241,6 @@ export default {
name: 'status',
type: 'equal',
value: 2
},
{
name: 'status',
type: 'equal',
value: 3
}
]
}
@ -261,23 +266,23 @@ export default {
]
}
}
: undefined,
this.$auth.hasPermi(`base:core-work-order:delete`)
? {
type: 'delete',
btnName: '删除',
showParam: {
type: '|',
data: [
{
name: 'status',
type: 'equal',
value: 1
}
]
}
}
: undefined
// this.$auth.hasPermi(`base:core-work-order:delete`)
// ? {
// type: 'delete',
// btnName: '',
// showParam: {
// type: '|',
// data: [
// {
// name: 'status',
// type: 'equal',
// value: 1
// }
// ]
// }
// }
// : undefined
].filter((v)=>v),
tableData: [],
formConfig: [

View File

@ -233,6 +233,10 @@ export default {
//
emitButtonClick1() {
let n = this.tableData1.length
if (n >=3) {
this.$modal.msgWarning('最多可添加3档计价')
return false
}
let obj = {}
obj.startTime = n === 0 ? '' : this.tableData1[n-1].endTime
obj.endTime = ''
@ -241,6 +245,10 @@ export default {
},
emitButtonClick2() {
let n = this.tableData2.length
// if (n >=3) {
// this.$modal.msgWarning('3')
// return false
// }
let obj = {}
obj.startUsed = n === 0 ? 0 : this.tableData2[n-1].endUsed
obj.endUsed = 0

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 14:59:28
* @LastEditTime: 2024-02-27 09:41:00
* @Description:
-->
<template>
@ -27,14 +27,13 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检单名称" prop="name">
<el-input v-model="dataForm.name" :disabled="isdetail" placeholder="请输入巡检单名称" />
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="departmentId">
<el-select
v-model="dataForm.departmentId"
:disabled="isdetail"
:placeholder="`请选择部门`">
<el-option
v-for="opt in departmentOptions"
@ -51,14 +50,14 @@
filterable
clearable
multiple
:disabled="isdetail"
:disabled="isedit"
style="width: 100%"
placeholder="请选择班次">
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.label"
:value="d.label" />
:label="d.name"
:value="d.id" />
</el-select>
</el-form-item>
</el-col>
@ -71,9 +70,8 @@
:placeholder="`请选择巡检人`"
multiple
clearable
:disabled="isdetail"
filterable
style="width: 100%">
:disabled="isedit"
filterable>
<el-option
v-for="opt in inspectorOptions"
:key="opt.value"
@ -87,7 +85,7 @@
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
:disabled="isdetail"
:disabled="isedit"
placeholder="请选择巡检时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
@ -144,8 +142,7 @@
<div v-if="!isdetail" class="drawer-body__footer">
<el-button @click="goback()">取消</el-button>
<!-- <el-button :disabled="isdetail" @click="init(dataForm.id)">重置</el-button> -->
<el-button v-if="isshowConfirm" type="primary" @click="confirmIns()">保存</el-button>
<el-button v-else type="primary" @click="dataFormSubmit()">保存</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
<attr-add
@ -166,7 +163,6 @@ import attrAdd from './attr-add';
import {DICT_TYPE, getDictDatas} from "@/utils/dict";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
const tableBtn = [
{
@ -209,7 +205,6 @@ export default {
tableProps,
topBtnConfig,
addOrUpdateVisible: false,
isshowConfirm: false,
urlOptions: {
isGetCode: false,
createURL: createCheckOrder,
@ -247,8 +242,8 @@ export default {
id: undefined,
name: '',
departmentId: undefined,
groupClass: [],
checkPerson: [],
groupClass: undefined,
checkPerson: undefined,
planCheckTime: undefined
},
detList: [],
@ -272,10 +267,7 @@ export default {
async getDict() {
//
const res = await groupClassesListAll();
this.groupOptions = res.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
this.groupOptions = res.data || [];
//
const res1 = await getCoreDepartmentList();
this.departmentOptions = res1.data || []
@ -322,7 +314,6 @@ export default {
initData() {
this.detList.splice(0);
this.listQuery.total = 0;
this.isshowConfirm = false;
},
handleClick(raw) {
if (raw.type === 'delete') {
@ -382,16 +373,6 @@ export default {
//
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (this.dataForm.groupClass && this.dataForm.groupClass !== ''){
this.dataForm.groupClass = response.data?.groupClass.split(',')
} else {
this.dataForm.groupClass = []
}
if (this.dataForm.checkPerson && this.dataForm.checkPerson !== '') {
this.dataForm.checkPerson = response.data?.checkPerson.split(',')
} else {
this.dataForm.checkPerson = []
}
});
//
this.getList();
@ -417,41 +398,6 @@ export default {
this.$refs.addOrUpdate.init(id);
});
},
getConfirmed() {
return this.$confirm('是否直接确认巡检记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
async confirmIns() {
this.$refs['dataForm'].validate((valid) => {
if (!valid) {
return;
}
this.$nextTick(() => {
this.getConfirmed().then(confirm => {
this.$axios({
url:
'/base/equipment-check-order/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: [this.dataForm.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('已确认');
}
})
}).catch(() => {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('取消确认');
})
})
});
},
//
dataFormSubmit() {
this.$refs["dataForm"].validate((valid) => {
@ -483,7 +429,6 @@ export default {
}).then(response => {
this.$modal.msgSuccess("新增成功");
this.idAttrShow = true
this.isshowConfirm = true
this.dataForm.id = response.data
// this.visible = false;
this.$emit("refreshDataList");

View File

@ -172,27 +172,24 @@ export default {
async searchBarClicked(btn) {
switch (btn.btnName) {
case 'batchConfirm':
const ids = this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
)
if (this.$refs['waiting-list-table'].selectedPlan.length == 0) {
this.$message.warning('请选择待确认的设备巡检单');
return;
}
this.$modal
.confirm('是否确认所有选中巡检单"?')
.then(() => {
return this.$axios({
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId,
const res = await this.$axios({
url: '/base/equipment-check-order/confirm?confirmPerson=' + this.$store.getters.userId + '&ids=' + ids,
method: 'put',
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
// data: this.$refs['waiting-list-table'].selectedPlan.map(
// (item) => item.id
// ),
});
})
.then((res) => {
if (res.code == 0) {
this.$message.success('确认成功');
this.getList();
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
}
break;
}
},
@ -331,7 +328,7 @@ export default {
// },
getConfirmed() {
return this.$confirm('是否直接确认巡检记录', '提示', {
return this.$confirm('是否直接确认保养记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -391,16 +388,17 @@ export default {
},
/** 确认 */
async handleConfirm(row) {
console.log('111', this.$store.getters.userId)
this.$modal
.confirm('是否确认巡检单"' + row.name + '"?')
.then(() => {
return this.$axios({
url:
'/base/equipment-check-order/confirm?confirmPerson=' +
this.$store.getters.userId,
this.$store.getters.userId + '&ids=' + [row.id],
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
method: 'put',
data: [row.id],
// data: [row.id],
});
})
.then((res) => {

View File

@ -63,7 +63,7 @@ import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import addRecord from './addRecord.vue';
import AddContent from './addContent.vue';
import { exportCheckOrderExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import { exportCheckLogExcel, deleteEqCheckLog } from '@/api/equipment/base/inspection/record'
import { parseTime } from '../../../../core/mixins/code-filter';
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
@ -130,25 +130,19 @@ export default {
// { prop: 'responsible', label: '' },
],
searchBarFormConfig: [
// {
// type: 'select',
// label: '',
// placeholder: '',
// param: 'name',
// filterable: true
// },
{
type: 'input',
type: 'select',
label: '巡检单名称',
placeholder: '请输入巡检单',
param: 'name'
placeholder: '请选择巡检单',
param: 'name',
filterable: true
},
//
{
type: 'datePicker',
label: '巡检时间',
dateType: 'datetimerange', // datetimerange
format: 'yyyy-MM-dd HH:mm:ss',
dateType: 'daterange', // datetimerange
format: 'yyyy-MM-dd',
valueFormat: 'yyyy-MM-dd HH:mm:ss',
rangeSeparator: '-',
startPlaceholder: '开始日期',
@ -263,12 +257,7 @@ export default {
};
},
created() {
let end = moment().format('YYYY-MM-DD 08:00:00')
const current = new Date()
let start = parseTime(new Date(current.getFullYear(), current.getMonth(), current.getDate() - 3, 8, 0, 0))
this.searchBarFormConfig[1].defaultSelect = [start, end]
this.queryParams.actualCheckTime = [start, end]
// this.initSearchBar();
this.initSearchBar();
this.getList();
},
methods: {
@ -283,23 +272,22 @@ export default {
break;
}
},
// initSearchBar() {
// this.http('/base/equipment-check-order/page', 'get', {
// special: false,
// pageNo: 1,
// pageSize: 99,
// status: 2
// }).then(({ data }) => {
// this.$set(
// this.searchBarFormConfig[0],
// 'selectOptions',
// (data?.list || []).map((item) => ({
// name: item.name,
// id: item.id,
// }))
// );
// });
// },
initSearchBar() {
this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 99,
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
'selectOptions',
(data?.list || []).map((item) => ({
name: item.name,
id: item.id,
}))
);
});
},
/** 查询列表 */
getList() {
this.loading = true;
@ -431,7 +419,7 @@ export default {
.confirm('是否确认导出所有设备巡检记录?')
.then(() => {
this.exportLoading = true;
return exportCheckOrderExcel(params);
return exportCheckLogExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备巡检记录.xls');

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-29 14:58:37
* @LastEditTime: 2024-02-24 20:50:51
* @Description:
-->
<template>
@ -53,7 +53,6 @@
type="datetime"
:placeholder="`请选择计划巡检时间`"
value-format="timestamp"
:default-time="'8:00:00'"
style="width: 100%" />
</el-form-item>
</el-col>
@ -78,8 +77,8 @@
<el-option
v-for="d in groupOptions"
:key="d.id"
:label="d.label"
:value="d.label" />
:label="d.name"
:value="d.id" />
</el-select>
</el-form-item>
</el-col>
@ -99,7 +98,6 @@ import basicAdd from '../../../../core/mixins/basic-add';
import { getCheckOrder, getOrderCode, createCheckOrder, updateCheckOrder } from "@/api/equipment/base/inspection/settings";
import { getCoreDepartmentList } from "@/api/base/coreDepartment";
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
import { getDictDataLabel } from '@/utils/dict';
// import { getEquipmentAll } from '@/api/base/equipment'
export default {
@ -141,48 +139,16 @@ export default {
}
};
},
created() {
const currenttime = new Date()
this.dataForm.planCheckTime = new Date(currenttime.getFullYear(), currenttime.getMonth(), currenttime.getDate(), 8, 0, 0).getTime()
console.log('11', this.dataForm.planCheckTime, currenttime)
},
mounted() {
this.getDict()
},
methods: {
init(id) {
this.dataForm.id = id || "";
this.visible = true;
if (this.urlOptions.getOption) {
this.getArr()
}
this.$nextTick(() => {
this.$refs["dataForm"].resetFields();
if (this.dataForm.id) {
this.urlOptions.infoURL(id).then(response => {
this.dataForm = response.data
if (response.data.groupClass === '') {
this.dataForm.groupClass = []
} else {
this.dataForm.groupClass = response.data?.groupClass.split(',') || undefined
}
});
} else {
if (this.urlOptions.isGetCode) {
this.getCode()
}
}
});
},
async getDict() {
//
const res = await getCoreDepartmentList();
this.departmentOptions = res.data || [];
const res1 = await groupClassesListAll();
this.groupOptions = res1.data.map((item) => {
item.label = item.name + ' - ' + getDictDataLabel('workshop', item.roomNameDict)
return item
}) || [];
this.groupOptions = res1.data || [];
// const res = await getEquipmentAll()
// this.eqList = res.data
},

View File

@ -97,11 +97,11 @@ export default {
{ prop: 'name', label: '巡检单名称', width: 110, showOverflowtooltip: true },
{ prop: 'code', label: '巡检单编码', minWidth: 150, showOverflowtooltip: true },
{ prop: 'department', label: '部门', showOverflowtooltip: true },
{ prop: 'planCheckTime', label: '计划巡检时间', width: 150, filter: parseTime },
{ prop: 'planCheckTime', label: '计划巡检时间', filter: parseTime },
{ prop: 'confirmTimeLimit', label: '确认时限', showOverflowtooltip: true },
{ prop: 'groupClass', label: '班次', showOverflowtooltip: true },
{ prop: 'creator', label: '创建人', showOverflowtooltip: true },
{ prop: 'createTime', label: '创建时间', width: 150, filter: parseTime },
{ prop: 'checkPerson', label: '创建人', minWidth: 150, showOverflowtooltip: true },
{ prop: 'createTime', label: '创建时间', filter: parseTime },
// { prop: 'responsible', label: '' },
{ prop: 'remark', label: '备注' } // TODO:
],
@ -195,20 +195,17 @@ export default {
pageSize: 10,
equipmentId: null,
name: null,
special: false,
status: 0
special: false
},
//
form: {},
basePath: '/base/equipment-check-order',
mode: null,
groupList: []
};
},
created() {
this.initSearchBar();
this.getList();
this.getGroup();
},
methods: {
handleConfirm() {
@ -230,11 +227,6 @@ export default {
);
});
},
getGroup() {
groupClassesListAll().then(res => {
this.groupList = res.data || []
})
},
/** 查询列表 */
getList() {
this.loading = true;

View File

@ -15,10 +15,10 @@
<el-row :gutter="20">
<el-col :span="12">
<el-form-item
label="设备保养单号"
label="保养计划单号"
prop="maintainOrderNumber"
:rules="[
{ required: true, message: '请输入设备保养单号', trigger: 'blur' },
{ required: true, message: '请输入保养计划单号', trigger: 'blur' },
]">
<el-input
v-model="form.maintainOrderNumber"
@ -227,6 +227,11 @@ export default {
return {
form: {},
formLoading: true,
equipmentTypeOptions: [
{ label: '安全设备', value: 1 },
{ label: '消防设备', value: 2 },
{ label: '特种设备', value: 3 },
],
lineList: [],
maintainerList: [],
departmentList: [],
@ -263,7 +268,7 @@ export default {
},
},
mounted() {
// !this.edit && this.getCode('/base/equipment-maintain-log/getCode');
// !this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
@ -304,7 +309,7 @@ export default {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
this.form.code = response.data || '';
},
// initialize
async getEquipmentList() {

View File

@ -14,7 +14,7 @@
custom-class="mes-drawer"
size="60%"
@closed="$emit('destroy')">
<SmallTitle slot="title">{{ showTable ? '编辑' : '新增' }}</SmallTitle>
<SmallTitle slot="title">编辑</SmallTitle>
<div class="drawer-body flex">
<div class="drawer-body__content">
@ -184,7 +184,6 @@
</el-form>
</div>
<div v-if="showTable">
<SmallTitle>保养内容</SmallTitle>
<div style="margin-top: 12px; position: relative">
@ -224,13 +223,10 @@
@pagination="getAttrList" />
</div>
</div>
</div>
<div class="drawer-body__footer">
<el-button style="" @click="handleCancel">取消</el-button>
<!-- 新增可确认 -->
<el-button v-if="isAdd" type="primary" @click="addConfirm">保存</el-button>
<el-button v-else type="primary" @click="handleConfirm">保存</el-button>
<el-button type="primary" @click="handleConfirm">保存</el-button>
<!-- sections的第二项必须是 属性列表 -->
<!-- <el-button
v-if="sections[1].allowAdd"
@ -296,8 +292,6 @@ export default {
return {
visible: false,
btnLoading: false,
showTable: false,
isAdd: false,
form: {},
formLoading: false,
lineList: [],
@ -393,7 +387,7 @@ export default {
attrListLoading: false,
// syncFileListFlag: null,
tableBtn: [],
row: {},
row: null,
};
},
computed: {
@ -420,19 +414,11 @@ export default {
},
},
mounted() {
!this.edit && this.getCode('/base/equipment-maintain-plan/getCode');
this.getList('maintainer');
this.getList('department');
this.getList('line');
},
methods: {
// getCode
async getCode(url) {
this.formLoading = true;
const response = await this.$axios(url);
this.formLoading = false;
this.form.maintainOrderNumber = response.data || '';
},
handleSearchBarBtnClick(btn) {
console.log('btn', btn);
switch (btn.btnName) {
@ -452,107 +438,24 @@ export default {
break;
}
},
async addConfirm() {
console.log('11', this.showTable)
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
this.$nextTick(() => {
this.getConfirmed().then(confirm => {
console.log('111', confirm)
this.$axios({
url:
'/base/equipment-maintain-log/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: [this.form.id],
}).then(res =>{
if (res.code == 0) {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('已确认');
}
})
}).catch(() => {
this.visible = false;
this.$emit("refreshDataList");
this.$message.success('取消确认');
})
})
});
},
getConfirmed() {
return this.$confirm('是否直接确认保养记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
});
},
async handleConfirm() {
this.btnLoading = true;
// this.$nextTick(async () => {
// const { code, data } = await this.$axios({
// url: '/base/equipment-maintain-log/update',
// method: 'put',
// data: {
// ...this.form,
// maintainWorker: this.form.maintainWorker.join(',')
// },
// });
// if (code == 0) {
// this.$modal.msgSuccess('');
// }
// this.btnLoading = false;
// this.$emit('refreshDataList');
// this.handleCancel();
// });
this.$refs['form'].validate((valid) => {
if (!valid) {
return;
}
//
if (this.form.id != null) {
this.$axios({
this.$nextTick(async () => {
const { code, data } = await this.$axios({
url: '/base/equipment-maintain-log/update',
method: 'put',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2
maintainWorker: this.form.maintainWorker.join(',')
},
});
if (code == 0) {
this.$modal.msgSuccess('更新成功');
}
}).then((response) => {
this.$modal.msgSuccess('修改成功');
this.btnLoading = false;
this.$emit('refreshDataList');
this.handleCancel();
});
return;
}
//
this.$axios({
url: '/base/equipment-maintain-log/create',
method: 'post',
data: {
...this.form,
maintainWorker: this.form.maintainWorker.join(','),
special: false,
relatePlan: 2,
confirmed: false,
}
}).then((response) => {
this.$modal.msgSuccess('新增成功');
this.btnLoading = false;
this.form.id = response.data
this.row.id = response.data
this.showTable = true
this.isAdd = true
this.$emit('refreshDataList');
// this.handleCancel();
});
});
},
handleEmitFun(val) {
@ -561,22 +464,15 @@ export default {
init(row) {
this.visible = true;
if (row) {
this.row = row;
this.showTable = row ? true : false;
this.$nextTick(() => {
if (row.id) {
this.getInfo(row.id);
this.getAttrList(row.id);
}
})
}
this.getInfo(row);
this.getAttrList(row);
},
async getInfo(id) {
async getInfo(row) {
this.formLoading = true;
const res = await this.$axios(
'/base/equipment-maintain-log/get?id=' + id
'/base/equipment-maintain-log/get?id=' + row.id
);
if (res.code == 0) {
this.form = res.data;
@ -586,15 +482,15 @@ export default {
this.formLoading = false;
},
async getAttrList(id, condition = {}) {
if (!id) id = this.row.id;
async getAttrList(row, condition = {}) {
if (!row) row = this.row;
this.attrListLoading = true;
const res = await this.$axios({
url: '/base/equipment-maintain-log-det/page',
method: 'get',
params: {
...this.attrQuery.params,
logId: id,
logId: row.id,
...condition,
},
});

View File

@ -258,27 +258,17 @@ export default {
this.$message.warning('请选择待确认的设备保养记录');
return;
}
this.$modal
.confirm('是否确认所有选中保养单"?')
.then(() => {
return this.$axios({
const res = await this.$axios({
url: '/base/equipment-maintain-log/confirm',
method: 'put',
data: this.$refs['waiting-list-table'].selectedPlan.map(
(item) => item.id
),
});
// if (res.code == 0) {
// this.$message.success('');
// this.getList();
// }
})
.then((res) => {
if (res.code == 0) {
this.$message.success('确认成功');
this.getList();
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
}
break;
}
},
@ -422,13 +412,9 @@ export default {
},
/** 新增按钮操作 */
handleAdd() {
// this.reset();
// this.open = true;
// this.title = '';
this.openUnplannedDrawer = true;
this.$nextTick(() => {
this.$refs.unplanned.init();
});
this.reset();
this.open = true;
this.title = '添加待确认保养记录';
},
getConfirmed() {
@ -492,25 +478,15 @@ export default {
},
/** 确认 */
async handleConfirm(row) {
this.$modal
.confirm('是否确认保养单"' + row.maintainOrderNumber + '"?')
.then(() => {
return this.$axios({
const res = await this.$axios({
url: '/base/equipment-maintain-log/confirm',
method: 'put',
data: [row.id],
});
// if (res.code == 0) {
// this.$message.success('');
// this.getList();
// }
})
.then((res) => {
if (res.code == 0) {
this.$message.success('确认成功');
this.getList();
res.code == 0 && this.$modal.msgSuccess('确认成功');
res.code != 0 && this.$modal.msgError('确认失败');
})
.catch(() => {});
}
},
/** 编辑 */
async handleEdit(row) {

View File

@ -47,7 +47,6 @@
<add-content
v-if="addContent"
ref="addContent"
:plan="true"
@refreshDataList="addContent = false" />
</div>
</template>
@ -142,7 +141,7 @@ export default {
label: '上次实际保养时间',
filter: parseTime,
},
{ prop: 'nextPlanMaintainTime', label: '下次计划保养时间', filter: parseTime },
{ prop: 'nextMaintainTime', label: '下次计划保养时间', filter: parseTime },
{ prop: 'maintainer', label: '计划保养人员' },
// { prop: 'equipmentName', label: '' },
// { prop: 'equipmentCode', label: '' },
@ -220,13 +219,13 @@ export default {
params.pageNo = undefined;
params.pageSize = undefined;
this.$modal
.confirm('是否确认导出所有设备保养计划数据项?')
.confirm('是否确认导出所有设备保养监控数据项?')
.then(() => {
this.exportLoading = true;
return exportMaintainMonitorExcel(params);
})
.then((response) => {
this.$download.excel(response, '设备保养计划.xls');
this.$download.excel(response, '设备保养监控.xls');
this.exportLoading = false;
})
.catch(() => { });

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-28 19:52:13
* @LastEditTime: 2024-02-27 10:33:31
* @Description:
-->
<template>
@ -22,6 +22,7 @@
:rules="dataRule"
ref="dataForm"
@keyup.enter.native="dataFormSubmit()"
label-width="100px"
label-position="top">
<el-row :gutter="20">
<el-col :span="8">
@ -61,19 +62,19 @@
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="保养频率(天/次)" prop="maintenancePeriod">
<el-form-item label="保养频率" prop="maintenancePeriod">
<el-input-number v-model="dataForm.maintenancePeriod" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入保养频率" />
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认时限(h)" prop="confirmTimeLimit">
<el-form-item label="确认时限" prop="confirmTimeLimit">
<el-input-number v-model="dataForm.confirmTimeLimit" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入单位平方数" />
</el-form-item>
</el-col>
</el-row>
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="保养时长(h)" prop="maintainDuration">
<el-form-item label="保养时长" prop="maintainDuration">
<el-input-number v-model="dataForm.maintainDuration" :min="0" controls-position="right" style="width: 100%" :disabled="isdetail" clearable placeholder="请输入保养时长" />
</el-form-item>
</el-col>
@ -219,12 +220,6 @@ export default {
//
this.urlOptions.infoURL({ id: this.dataForm.id }).then(response => {
this.dataForm = response.data
if (response.data?.maintainer) {
this.dataForm.maintainer = response.data?.maintainer.split(',') || undefined
} else {
this.$set(this.dataForm, 'maintainer', undefined)
this.dataForm.maintainer = undefined
}
});
//
// this.getList();

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-11-18 14:16:25
* @LastEditors: DY
* @LastEditTime: 2024-02-28 19:37:19
* @LastEditTime: 2024-02-23 19:48:12
* @Description:
-->
<template>
@ -13,7 +13,7 @@
class="drawer"
size="60%">
<small-title slot="title" :no-padding="true">
{{ plan ? '详情' : '添加内容' }}
{{ '添加内容' }}
</small-title>
<div class="content">
<div class="visual-part">
@ -62,7 +62,7 @@
</template>
</div>
<base-table
:table-props="plan ? tableProps1 : tableProps"
:table-props="tableProps"
:page="listQuery.pageNo"
:limit="listQuery.pageSize"
:table-data="planList">
@ -85,7 +85,7 @@
<div v-if="!isdetail" class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="goback()">确定</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div>
</div>
@ -128,35 +128,13 @@ const tableProps = [
},
];
const tableProps1 = [
{
prop: 'equipmentName',
label: '设备名称',
},
{
prop: 'program',
label: '保养项目',
},
{
prop: 'maintenanceDes',
label: '保养描述',
},
];
export default {
mixins: [basicAdd],
components: { SmallTitle, attrAdd },
props: {
plan: {
type: Boolean,
default: false
}
},
data() {
return {
tableBtn,
tableProps,
tableProps1,
addOrUpdateVisible: false,
urlOptions: {
isGetCode: false,

View File

@ -160,7 +160,6 @@ export default {
label: '保养计划名称',
placeholder: '请选择计划名称',
param: 'maintainPlanId',
filterable: true
},
//
{
@ -340,7 +339,6 @@ export default {
startTime: null,
relatePlan: null,
equipmentId: null,
confirmed: true
},
//
form: {},
@ -351,20 +349,20 @@ export default {
created() {
this.initSearchBar();
if (this.$route.query) {
// this.queryParams.equipmentId =
// this.$route.query?.equipmentId ?? undefined;
this.queryParams.equipmentId =
this.$route.query?.equipmentId ?? undefined;
this.queryParams.maintainPlanId =
this.$route.query?.maintainPlanId ?? undefined;
// this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
this.queryParams.relatePlan = this.$route.query?.relatePlan ?? undefined;
this.queryParams.startTime = this.$route.query?.createTime ?? undefined;
// this.searchBarFormConfig[0].defaultSelect =
// this.$route.query.equipmentId ?? undefined;
this.searchBarFormConfig[0].defaultSelect =
this.$route.query.maintainPlanId ?? undefined;
this.$route.query.equipmentId ?? undefined;
this.searchBarFormConfig[1].defaultSelect =
this.$route.query.maintainPlanId ?? undefined;
this.searchBarFormConfig[2].defaultSelect =
this.$route.query?.createTime ?? undefined;
// this.searchBarFormConfig[3].defaultSelect =
// Number(this.$route.query.relatePlan) ?? undefined;
this.searchBarFormConfig[3].defaultSelect =
Number(this.$route.query.relatePlan) ?? undefined;
}
this.getList();
if (this.$route.query.addRecord) {
@ -385,24 +383,10 @@ export default {
}
},
initSearchBar() {
// this.http('/base/core-equipment/page', 'get', {
// special: false,
// pageNo: 1,
// pageSize: 99
// }).then(({ data }) => {
// this.$set(
// this.searchBarFormConfig[0],
// 'selectOptions',
// (data?.list || []).map((item) => ({
// name: item.name,
// id: item.id,
// }))
// );
// });
this.http('/base/equipment-maintain-plan/page', 'get', {
this.http('/base/core-equipment/page', 'get', {
special: false,
pageNo: 1,
pageSize: 100,
special: false
pageSize: 99
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[0],
@ -413,6 +397,19 @@ export default {
}))
);
});
this.http('/base/equipment-maintain-plan/page', 'get', {
pageNo: 1,
pageSize: 100,
}).then(({ data }) => {
this.$set(
this.searchBarFormConfig[1],
'selectOptions',
(data?.list || []).map((item) => ({
name: item.name,
id: item.id,
}))
);
});
},
/** 查询列表 */
getList() {
@ -547,7 +544,6 @@ export default {
let params = { ...this.queryParams };
params.pageNo = undefined;
params.pageSize = undefined;
params.confirmed = true;
this.$modal
.confirm('是否确认导出所有保养记录?')
.then(() => {

View File

@ -680,8 +680,7 @@ export default {
file.type === 'image/jpg';
return isJPG;
};
return checkFileSize();
// return checkFileSize() && checkFileType();
return checkFileSize() && checkFileType();
},
// handlers

View File

@ -17,7 +17,7 @@
v-if="tableBtn.length"
slot="handleBtn"
label="操作"
:width="90"
:width="180"
:method-list="tableBtn"
@clickBtn="handleTableBtnClick" />
</base-table>
@ -111,13 +111,11 @@ export default {
{
prop: 'maintenanceStartTime',
label: '维修开始时间',
width: 150,
filter: parseTime,
},
{
prop: 'maintenanceFinishTime',
label: '维修结束时间',
width: 150,
filter: parseTime,
},
// { prop: 'maintenanceStartTime', label: '', filter: parseTime },
@ -130,7 +128,7 @@ export default {
{ prop: 'maintenanceDetail', label: '维修描述', subcomponent: htmls }, //
// { prop: 'repairman', label: '', minWidth: 100, showOverflowtooltip: true },
// { prop: 'repairmanPhone', label: '', minWidth: 100, showOverflowtooltip: true },
{ prop: 'remark', label: '备注', minWidth: 90, showOverflowtooltip: true }
{ prop: 'remark', label: '备注', minWidth: 120, showOverflowtooltip: true }
],
searchBarFormConfig: [
{

View File

@ -136,11 +136,11 @@ export default {
params.teamId = val.data.id
params.teamName = val.data.name
this.workOrderList.map(item => {
if (val.data.workOrderId === item.id) {
if (this.queryParams.workOrderId === item.id) {
this.workOrderName = item.name
}
})
params.workOrderId = val.data.workOrderId
params.workOrderId = this.queryParams.workOrderId
params.workOrderName = this.workOrderName
params.roomNameDict = val.data.roomNameDict
this.$nextTick(() => {

View File

@ -1,97 +0,0 @@
<template>
<el-form :inline="true" class="demo-form-inline">
<span class="blue-block"></span>
<el-form-item label="班次信息">
<el-select v-model="queryParams.classesId" placeholder="班次信息" style="width: 200px;" size="small" clearable>
<el-option
v-for="item in classesArr"
:key="item.id"
:label="(item.roomName?item.roomName:'')+'-'+item.name"
:value="item.id">
<span>{{ item.roomName }}-{{item.name}}</span>
</el-option>
</el-select>
</el-form-item>
<el-form-item label="班组信息">
<el-input v-model="queryParams.teamName" placeholder="班组信息" style="width: 200px;" clearable></el-input>
</el-form-item>
<el-form-item label="上班时间">
<el-date-picker
v-model="queryParams.tiemStr"
type="daterange"
format='yyyy-MM-dd'
value-format='yyyy-MM-dd'
range-separator='-'
style="width: 250px;"
size="small">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button type="primary" size="small" @click="search">查询</el-button>
</el-form-item>
</el-form>
</template>
<script>
import { groupClassesListAll } from '@/api/monitoring/teamProduction'
export default {
name: 'searchArea',
data() {
return {
//
queryParams: {
classesId: '',
teamName: '',
tiemStr: ''
},
classesArr: [],
}
},
mounted() {
this.getGroupClass()
},
methods: {
getGroupClass() {
groupClassesListAll().then(res => {
this.classesArr = res.data || []
})
},
//
search() {
console.log(this.queryParams)
this.$emit('submit', this.queryParams)
}
}
}
</script>
<style lang="scss">
.demo-form-inline {
.el-date-editor .el-range__icon {
font-size: 16px;
color: #0B58FF;
}
.el-input__prefix .el-icon-date {
font-size: 16px;
color: #0B58FF;
}
}
</style>
<style lang="scss" scoped>
.separateStyle {
display: inline-block;
width: 1px;
height: 24px;
background: #E8E8E8;
vertical-align: middle;
}
.demo-form-inline {
.blue-block {
display: inline-block;
width: 4px;
height: 16px;
background-color: #0B58FF;
border-radius: 1px;
margin-right: 8px;
margin-top: 10px;
}
}
</style>

View File

@ -1,12 +1,11 @@
<template>
<div class="app-container">
<!-- 搜索工作栏 -->
<search-area @submit="buttonClick"/>
<!-- <search-bar
<search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick"
/> -->
/>
<!-- 列表 -->
<base-table
:page="queryParams.pageNo"
@ -35,11 +34,10 @@
</div>
</template>
<script>
import { groupTeamSchedulingPage } from '@/api/monitoring/teamProduction'
import { groupTeamSchedulingPage, groupClassesListAll } from '@/api/monitoring/teamProduction'
import { parseTime } from '@/utils/ruoyi'
import TeamProductionDetail from './components/teamProductionDetail'
import { publicFormatter } from '@/utils/dict'
import SearchArea from './components/searchArea'
const tableProps = [
{
prop: 'roomNameDict',
@ -141,11 +139,12 @@ export default {
paramVisible: false
}
},
components: { TeamProductionDetail, SearchArea },
components: { TeamProductionDetail },
mounted() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getGroupClass()
this.getList()
},
methods: {
@ -164,6 +163,11 @@ export default {
this.total = res.data.total || 0
})
},
getGroupClass() {
groupClassesListAll().then(res => {
this.formConfig[0].selectOptions = res.data || []
})
},
handleClick(val) {
console.log(val)
this.paramVisible = true

View File

@ -236,8 +236,13 @@ export default {
btnName: '终止',
showTip: '终止',
showParam: {
type: '&',
type: '|',
data: [
{
type: 'equal',
name: 'status',
value: 2
},
{
type: 'equal',
name: 'status',
@ -278,7 +283,7 @@ export default {
{
type: 'less',
name: 'status',
value: 2
value: 3
}
]
}
@ -378,9 +383,9 @@ export default {
},
// ,
handleEditStatus(val, tip, status) {
let _this = this
console.log(val)
if (val.orderIdNum > 0) {//
_this.$confirm('是否将"'+tip+'"操作同步至下级订单和工单?','确认信息', {
this.$confirm('是否将"'+tip+'"操作同步至下级订单和工单?','确认信息', {
type: 'warning',
distinguishCancelAndClose: true,
confirmButtonText: '同步',
@ -388,26 +393,26 @@ export default {
}).then(function() {
console.log('同步')
groupOrderStatusSet({ id: val.id, status: status, isSync: true}).then(() => {
_this.getList();
_this.$modal.msgSuccess("操作成功");
this.getList();
this.$modal.msgSuccess("操作成功");
})
}).catch(action => {
if (action === 'cancel') {
console.log('不同步')
groupOrderStatusSet({ id: val.id, status: status, isSync: false}).then(() => {
_this.getList();
_this.$modal.msgSuccess("操作成功");
this.getList();
this.$modal.msgSuccess("操作成功");
})
}else {
return console.log('关闭')
}
})
}else{//
_this.$modal.confirm('是否确认"'+tip+'"集团订单名称为"' + val.name + '"的数据项?').then(function() {
this.$modal.confirm('是否确认"'+tip+'"集团订单名称为"' + val.name + '"的数据项?').then(function() {
return groupOrderStatusSet({ id: val.id, status: status})
}).then(() => {
_this.getList();
_this.$modal.msgSuccess("操作成功");
this.getList();
this.$modal.msgSuccess("操作成功");
}).catch(() => {});
}
},

View File

@ -175,38 +175,16 @@ export default {
}
if (this.isEdit) {
//
orderUpdate({
code: this.form.code,
name: this.form.name,
planQuantity: this.form.planQuantity,
planProductId: this.form.planProductId,
priority: this.form.priority,
planStartTime: this.form.planStartTime,
planFinishTime: this.form.planFinishTime,
remark: this.form.remark,
id: this.form.id,
specifications: this.form.specifications
}).then((res) => {
orderUpdate({ ...this.form }).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit')
}
})
} else {
orderCreate({
code: this.form.code,
name: this.form.name,
planQuantity: this.form.planQuantity,
planProductId: this.form.planProductId,
priority: this.form.priority,
planStartTime: this.form.planStartTime,
planFinishTime: this.form.planFinishTime,
remark: this.form.remark,
id: this.form.id,
specifications: this.form.specifications,
status: 1,
triggerOrigin: 1
}).then((res) => {
this.form.status = 1
this.form.triggerOrigin = 1
orderCreate({ ...this.form }).then((res) => {
if (res.code === 0) {
this.$modal.msgSuccess("操作成功");
this.$emit('successSubmit')

View File

@ -244,8 +244,13 @@ export default {
btnName: '终止',
showTip: '终止',
showParam: {
type: '&',
type: '|',
data: [
{
type: 'equal',
name: 'status',
value: 2
},
{
type: 'equal',
name: 'status',
@ -288,7 +293,7 @@ export default {
{
type: 'less',
name: 'status',
value: 2
value: 3
}
]
}

View File

@ -51,16 +51,8 @@ export default {
label: '用户名称',
selectOptions: [],
labelField: 'name',
valueField: 'name',
valueField: 'id',
param: 'userName',
},
{
type: 'select',
label: '用户昵称',
selectOptions: [],
labelField: 'name',
valueField: 'name',
param: 'nickName',
},
{
type: 'button',
@ -151,16 +143,10 @@ export default {
}).then((res) => {
this.searchBarFormConfig[0].selectOptions = res.data.map((item) => {
return {
id: item.username,
id: item.id,
name:item.username
}
})
this.searchBarFormConfig[1].selectOptions = res.data.map((item) => {
return {
id: item.nickname,
name: item.nickname
}
})
})
},
getDataList() {
@ -220,9 +206,7 @@ export default {
case 'search':
this.listQuery.pageNo = 1;
this.listQuery.pageSize = 10;
this.listQuery.userName = val.userName ? val.userName : undefined;
this.listQuery.nickName = val.nickName ? val.nickName : undefined;
this.listQuery.inspectionDetContent = val.inspectionDetContent ? val.inspectionDetContent : undefined;
// this.listQuery.teamId = val.teamId ? val.teamId : undefined;
this.getDataList()
break;

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-03-01 15:22:06
* @LastEditTime: 2024-01-22 15:29:53
* @LastEditors: zhp
* @Description:
-->
@ -80,9 +80,8 @@
<el-col :span="8">
<el-form-item :prop="'checkValueList.' + index + '.checkValue'" label="成分含量"
:rules="[{ required: true, message: '成分含量不能为空', trigger: 'blur' }]">
<el-input oninput="value=value.replace(/[^\d]/g,'')" :disabled="isdetail"
style="width: 90%;margin-right: 10px;" :max="item.maxValue" :min='item.minValue'
v-model.number="dataForm.checkValueList[index].checkValue"
<el-input :disabled="isdetail" style="width: 90%;margin-right: 10px;" :max="item.maxValue"
:min='item.minValue' v-model="dataForm.checkValueList[index].checkValue"
@change="judgeValue(arguments[0],item.minValue,item.maxValue,index)"></el-input>
<span v-if="dataForm.checkValueList[index].showIcon">
<!-- <i class="el-icon-success"></i> -->
@ -92,12 +91,14 @@
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值">
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最小值"
>
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.minValue"></el-input>
</el-form-item>
</el-col>
<el-col :span="4">
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值">
<el-form-item :prop="'checkValueList.' + index + '.minValue'" label="最大值"
>
<el-input disabled style="width: 90%;margin-right: 10px;" v-model="item.maxValue"></el-input>
</el-form-item>
</el-col>

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-03-01 10:33:48
* @LastEditTime: 2024-02-28 09:58:34
* @LastEditors: zhp
* @Description:
-->
@ -130,7 +130,7 @@ export default {
mounted() {
this.getDict()
console.log('我看看', this.dataForm)
// this.getCurrentTime()
this.getCurrentTime()
this.getWorksectionById()
},
methods: {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-03-01 10:18:39
* @LastEditTime: 2024-02-28 10:13:10
* @LastEditors: zhp
* @Description:
-->
@ -75,7 +75,7 @@
</template>
<script>
import basicAdd from './basic-add';
import basicAdd from '../../../core/mixins/basic-add';
import {
createQualityScrapLog, updateQualityScrapLog, getQualityScrapLog, getWorkOrderList,
getTeamList, getDetList,getLineList } from "@/api/base/qualityScrapLog";
@ -182,15 +182,16 @@ export default {
getDetList().then((res) => {
console.log(res);
// console.log(response);
this.detList = res.data.map((item) => {
this.workOrderList = res.data.map((item) => {
return {
name: item.content,
name: item.name,
id: item.id
}
})
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
getTeamList().then((res) => {
console.log(res);
// console.log(response);
@ -200,12 +201,29 @@ export default {
id: item.id
}
})
this.$axios({
url: '/base/core-workshop-section/listAll',
method: 'get',
// params: {
// id: lineId,
// },
}).then((res) => {
// console.log(data)
this.sectionList = res.data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
})
// if (code == 0) {
// }
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
},
async getWorksectionById(lineId) {
if (lineId) {
const { code, data } = await this.$axios({
url: '/base/core-workshop-section/listByParentId',
method: 'get',
@ -222,24 +240,7 @@ export default {
};
});
}
} else {
this.$axios({
url: '/base/core-workshop-section/listAll',
method: 'get',
// params: {
// id: lineId,
// },
}).then((res) => {
// console.log(data)
this.sectionList = res.data.map((item) => {
return {
name: item.name,
id: item.id,
};
});
})
}
},
},
};
</script>

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2023-08-01 14:55:51
* @LastEditors: zhp
* @LastEditTime: 2024-03-01 10:27:29
* @LastEditTime: 2024-02-23 09:16:24
* @Description:
-->
<template>
@ -124,8 +124,8 @@ export default {
label: '工单',
selectOptions: [],
labelField: 'name',
valueField: 'name',
param: 'workOrderName'
valueField: 'id',
param: 'workOrderId'
},
// {
// type: 'datePicker',
@ -233,7 +233,7 @@ export default {
buttonClick(val) {
console.log(val)
if (val.btnName === 'search') {
this.listQuery.workOrderName = val.workOrderName ? val.workOrderName :undefined
this.listQuery.workOrderId = val.workOrderId ? val.workOrderId :undefined
// this.queryParams.status = val.status
// if (val.timeVal && val.timeVal.length != 0 ) {
// this.listQuery.startTime = val.timeVal[0] + ' 00:00:00'

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-01 15:26:38
* @LastEditTime: 2024-01-24 16:53:41
* @LastEditors: zhp
* @Description:
-->
@ -9,7 +9,7 @@
<div class="app-container">
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
<el-form-item label="日" prop="reportTime">
<el-date-picker v-model="dataForm.reportTime" @change="changeTime" type="date" placeholder="选择日期">
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
</el-date-picker>
</el-form-item>
<el-button type="primary" @click="getDataList()">查询</el-button>

View File

@ -51,7 +51,10 @@
{{ scope.row.planCheckTime | timeFilter }}
</template>
</el-table-column>
<el-table-column v-if="selectedBox[3]" label="班次" prop="groupClass">
<el-table-column
v-if="selectedBox[3]"
label="班次"
prop="groupClass">
<template slot-scope="scope">
{{ scope.row.groupClass || '---' }}
</template>
@ -126,7 +129,7 @@ import moment from 'moment';
export default {
name: 'CheckOrderListTable',
components: {},
props: ['tableData', 'page', 'limit', 'permissionGuard'],
props: ['tableData', 'page', 'limit'],
filters: {
timeFilter: (val) =>
val ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '---',
@ -167,7 +170,12 @@ export default {
},
methods: {
checkSelectable(row, index) {
return this.permissionGuard(row);
return true;
// return (
// row.relatePlan == 2 ||
// (row.relatePlan == 1 &&
// (!row.confirmDueTime || +row.confirmDueTime >= new Date().getTime()))
// );
},
handleSelectionChange(val) {
this.selectedOrder = val;

View File

@ -121,11 +121,6 @@ export default {
showOverflowtooltip: true,
filter: parseTime,
},
{
prop: 'checkPeriod',
label: '巡检频率(天/次)',
showOverflowtooltip: true,
},
{
width: 144,
prop: 'confirmTimeLimit',

View File

@ -50,31 +50,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="巡检人" prop="checkPerson">
<el-select
v-model="dataForm.checkPerson"
:placeholder="`请选择巡检人`"
multiple
clearable
filterable>
<el-option
v-for="opt in inspectorOptions"
:key="opt.value"
:label="opt.label"
:value="opt.value" />
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="巡检时间" prop="planCheckTime">
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
placeholder="请选择计划开始时间"
value-format="timestamp"></el-date-picker>
</el-form-item>
</el-col>
<!-- <el-col>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
@ -85,8 +60,6 @@
</template>
<script>
import { groupConnectWorkshop } from '@/utils/equipment-module';
export default {
name: 'ContentAdd',
data() {
@ -96,9 +69,7 @@ export default {
id: null,
name: null,
departmentId: null,
groupClass: [],
checkPerson: [],
planCheckTime: null,
groupClass: null,
// special: true,
},
dataRule: {
@ -109,7 +80,6 @@ export default {
equipmentOptions: [],
groupOptions: [],
departmentOptions: [],
inspectorOptions: [],
};
},
mounted() {
@ -121,9 +91,7 @@ export default {
id: null,
name: null,
departmentId: null,
groupClass: [],
checkPerson: [],
planCheckTime: null,
groupClass: null,
// special: true,
};
},
@ -146,35 +114,10 @@ export default {
}
if (grp.code == 0) {
this.groupOptions = grp.data.map((item) => ({
label: groupConnectWorkshop(item.name, item.roomNameDict),
label: item.name,
value: item.id,
}));
}
/** get user list and worker list */
let inspectorList = [];
const userlist = await this.$axios({
url: '/system/user/page',
params: { pageNo: 1, pageSize: 100 },
});
if (userlist.code == 0) {
inspectorList = inspectorList.concat(
(userlist.data?.list || []).map((item) => ({
label: item.nickname,
value: item.nickname,
}))
);
}
const workerlist = await this.$axios('/base/core-worker/listAll');
if (workerlist.code == 0) {
inspectorList = inspectorList.concat(
workerlist.data.map((item) => ({
label: item.name,
value: item.name,
}))
);
}
this.inspectorOptions = inspectorList;
/** endget */
this.formLoading = false;
} catch (err) {
this.formLoading = false;
@ -184,8 +127,6 @@ export default {
async init(row) {
if (!row || !row.id) {
/** 新增 */
this.dataForm.checkPerson = [this.$store.getters.nickname];
return;
}
const res = await this.$axios({
@ -232,8 +173,8 @@ export default {
special: true,
status: 1,
// status: confirmed ? 2 : 1,
groupClass: this.dataForm.groupClass?.join(','),
checkPerson: this.dataForm.checkPerson?.join(','),
groupClass: this.dataForm.groupClass.join(','),
checkPerson: this.$store.getters.userId,
},
});
if (res.code == 0) {

View File

@ -268,8 +268,8 @@ export default {
}
},
getConfirmed(message = '是否直接确认巡检记录') {
return this.$confirm(message, '提示', {
getConfirmed() {
return this.$confirm('是否直接确认巡检记录', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
@ -281,12 +281,14 @@ export default {
return this.$message.error('请添加巡检内容');
}
/** 询问 是否保存记录 */
let confirmed = false;
try {
if (await this.getConfirmed('是否保存记录')) {
/** 询问 是否直接确认 */
try {
if (await this.getConfirmed('是否直接确认巡检记录')) {
confirmed = await this.getConfirmed();
} catch (err) {
confirmed = false;
}
if (confirmed) {
const res = await this.$axios({
url:
'/base/equipment-check-order/confirm?confirmPerson=' +
@ -299,14 +301,6 @@ export default {
}
}
this.$emit('refreshDataList');
this.handleCancel();
} catch (err) {
this.handleCancel();
}
}
} catch (err) {}
// this.btnLoading = true;
// this.$nextTick(async () => {
// const { code, data } = await this.$axios({
@ -325,6 +319,8 @@ export default {
// this.$emit('refreshDataList');
// this.handleCancel();
// });
this.$emit('refreshDataList');
this.handleCancel();
},
handleEmitFun(val) {

View File

@ -29,16 +29,7 @@
v-loading="formLoading">
<el-row :gutter="20">
<el-col :span="8">
<el-form-item
label="巡检单名称"
prop="name"
:rules="[
{
required: true,
message: '巡检单名称不能为空',
trigger: 'blur',
},
]">
<el-form-item label="巡检单名称" prop="name">
<el-input
v-model="form.name"
:disabled="disableEdit"
@ -205,7 +196,6 @@
<script>
import DialogForm from '../../../components/DialogForm/index.vue';
import { groupConnectWorkshop } from '@/utils/equipment-module';
const SmallTitle = {
name: 'SmallTitle',
@ -240,15 +230,7 @@ export default {
return {
visible: false,
btnLoading: false,
form: {
id: null,
name: null,
departmentId: null,
groupClass: null,
checkPerson: null,
planCheckTime: null,
remark: null,
},
form: {},
formLoading: false,
departmentList: [],
inspectorOptions: [],
@ -429,30 +411,16 @@ export default {
break;
}
},
resetForm() {
this.form = {
id: null,
name: null,
departmentId: null,
groupClass: null,
checkPerson: null,
planCheckTime: null,
remark: null,
};
},
async handleConfirm() {
this.btnLoading = true;
this.$nextTick(async () => {
try {
const valid = await this.$refs['form'].validate();
if (!valid) return;
const { code, data } = await this.$axios({
url: '/base/equipment-check-order/update',
method: 'put',
data: {
...this.form,
groupClass: this.form.groupClass?.join(','),
checkPerson: this.form.checkPerson?.join(','),
groupClass: this.form.groupClass.join(','),
checkPerson: this.form.checkPerson.join(','),
},
});
if (code == 0) {
@ -461,9 +429,6 @@ export default {
this.btnLoading = false;
this.$emit('refreshDataList');
this.handleCancel();
} catch (err) {
this.btnLoading = false;
}
});
},
@ -480,25 +445,14 @@ export default {
},
async getInfo(row) {
this.resetForm();
console.log('row', row);
const res = await this.$axios(
'/base/equipment-check-order/get?id=' + row.id
);
if (res.code == 0) {
Object.keys(this.form).forEach((key) => {
if (key == 'groupClass' || key == 'checkPerson') {
this.form[key] =
(res.data[key] &&
res.data[key].trim() != '' &&
res.data[key].split(',')) ||
[];
} else {
this.form[key] = res.data[key];
}
});
if (!res.data.checkPerson || res.data.checkPerson.trim() == '') {
this.form.checkPerson = [this.$store.getters.nickname];
}
this.form = res.data;
this.form.groupClass = res.data.groupClass.split(',');
this.form.checkPerson = res.data.checkPerson?.split(',');
this.formLoading = false;
}
this.formLoading = false;
@ -543,8 +497,8 @@ export default {
if (userlist.code == 0) {
inspectorList = inspectorList.concat(
(userlist.data?.list || []).map((item) => ({
label: item.nickname,
value: item.nickname,
label: item.username,
value: item.id,
}))
);
}
@ -553,7 +507,7 @@ export default {
inspectorList = inspectorList.concat(
workerlist.data.map((item) => ({
label: item.name,
value: item.name,
value: item.id,
}))
);
}
@ -562,7 +516,7 @@ export default {
case 'groupClass':
res = await this.$axios(urls[1]);
this.groupOptions = (res.data || []).map((item) => ({
label: groupConnectWorkshop(item.name, item.roomNameDict),
label: item.name,
value: item.id,
}));
break;
@ -570,6 +524,22 @@ export default {
this.formLoading = false;
},
//
handleSave() {
this.$refs.form.validate(async (valid) => {
if (valid) {
await this.$axios({
url: '/urlupdate', // this.sections[0][isEdit ? 'urlUpdate' : 'urlCreate'],
method: 'post', // isEdit ? 'put' : 'post',
data: this.form,
});
this.$modal.msgSuccess(`${isEdit ? '更新' : '创建'}成功`);
this.visible = false;
this.$emit('refreshDataList');
}
});
},
handleCancel() {
this.visible = false;
},

View File

@ -18,7 +18,6 @@
:table-data="list"
:page="queryParams.pageNo"
:limit="queryParams.pageSize"
:permissionGuard="checkConfirmPermission"
@edit="handleEdit"
@detail="handleDetail"
@delete="handleDelete"
@ -178,7 +177,6 @@ export default {
pageSize: 10,
name: null,
status: 1,
special: true,
},
//
form: {},
@ -257,17 +255,10 @@ export default {
this.$message.warning('请选择待确认的巡检单');
return;
}
let checkPersonParam = '';
if (!row.checkPerson || row.checkPerson.trim() == '') {
/** 如有必要,更新巡检人 */
checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
}
const res = this.$axios({
const res = await this.$axios({
url:
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` +
checkPersonParam,
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
'/base/equipment-check-order/confirm?confirmPerson=' +
this.$store.getters.userId,
method: 'put',
data: this.$refs['check-order-list-table'].selectedOrder.map(
(item) => item.id
@ -305,16 +296,6 @@ export default {
});
},
/** 按钮、选择权限 */
checkConfirmPermission(row) {
const isAdmin = false; //
return (
!row.confirmDueTime ||
row.confirmDueTime >= new Date().getTime() ||
isAdmin
);
},
/** 编辑 */
handleEdit(row, detail) {
this.editOpen = true;
@ -329,16 +310,10 @@ export default {
this.$modal
.confirm('是否确认巡检单"' + row.name + '"?')
.then(() => {
let checkPersonParam = '';
if (!row.checkPerson || row.checkPerson.trim() == '') {
/** 如有必要,更新巡检人 */
checkPersonParam = `&checkPerson=${this.$store.getters.nickname}`;
}
return this.$axios({
url:
`/base/equipment-check-order/confirm?confirmPerson=${this.$store.getters.nickname}` +
checkPersonParam,
'/base/equipment-check-order/confirm?confirmPerson=' +
this.$store.getters.userId,
// '/base/equipment-check-order/confirm?ids=' + JSON.stringify([id]).replaceAll("\"", ''),
method: 'put',
data: [id],
@ -374,16 +349,16 @@ export default {
/** 导出按钮操作 */
handleExport() {
this.$modal
.confirm('是否确认导出所有巡检?')
.confirm('是否确认导出所有巡检设置?')
.then(() => {
this.exportLoading = true;
return this.$axios({
url: '/base/equipment-check-order/export-excel',
params: {
name: this.queryParams.name,
status: 1,
special: true,
},
// params: {
// name: this.queryParams.name,
// status: 1,
// special: true,
// },
responseType: 'blob',
});
})

View File

@ -30,37 +30,37 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="巡检单名称" prop="name">
<div style="">{{ form.name }}</div>
{{ form.name }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="部门" prop="department">
<div style="">{{ form.department }}</div>
{{ form.department }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="班次" prop="groupClass">
<div style="">{{ form.groupClass || '---' }}</div>
{{ form.groupClass }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="巡检人" prop="checkPerson">
<div style="">{{ form.checkPerson || '---' }}</div>
{{ form.checkPerson }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="巡检时间" prop="planCheckTime">
<div style="">{{ form.planCheckTime | parseTime }}</div>
{{ form.planCheckTime | parseTime }}
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="确认人" prop="confirmPerson">
<div style="">{{ form.confirmPerson || '---' }}</div>
{{ form.confirmPerson }}
</el-form-item>
</el-col>
</el-row>
@ -324,8 +324,8 @@ export default {
method: 'put',
data: {
...this.form,
groupClass: this.form.groupClass?.join(','),
checkPerson: this.form.checkPerson?.join(','),
groupClass: this.form.groupClass.join(','),
checkPerson: this.form.checkPerson.join(','),
},
});
if (code == 0) {
@ -401,8 +401,8 @@ export default {
if (userlist.code == 0) {
inspectorList = inspectorList.concat(
(userlist.data?.list || []).map((item) => ({
label: item.nickname,
value: item.nickname,
label: item.username,
value: item.id,
}))
);
}

View File

@ -15,35 +15,21 @@
v-loading="formLoading"
label-position="top">
<el-row :gutter="20">
<el-col :span="12">
<el-col>
<el-form-item label="巡检单名称" prop="name">
<el-input v-model="dataForm.name" placeholder="请输入巡检单名称" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-col>
<el-form-item label="巡检单编码" prop="code">
<el-input v-model="dataForm.code" placeholder="请输入巡检单编码" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="计划巡检时间" prop="planCheckTime">
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
:placeholder="`请选择计划巡检时间`"
value-format="timestamp" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="巡检频率(天/次)" prop="checkPeriod">
<el-input
v-model="dataForm.checkPeriod"
placeholder="请输入巡检频率(天/次)" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="部门" prop="departmentId">
<el-col>
<el-form-item
label="部门"
prop="departmentId"
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
<el-select
v-model="dataForm.departmentId"
:placeholder="`请选择部门`">
@ -55,6 +41,27 @@
</el-select>
</el-form-item>
</el-col>
<el-col>
<el-form-item label="计划巡检时间" prop="planCheckTime">
<el-date-picker
v-model="dataForm.planCheckTime"
type="datetime"
:placeholder="`请选择计划巡检时间`"
value-format="timestamp" />
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
<el-input
v-model="dataForm.confirmTimeLimit"
:placeholder="`请输入确认时限`" />
<!-- <el-date-picker
v-model="dataForm.confirmTimeLimit"
type="datetime"
:placeholder="`请选择确认时限`"
value-format="timestamp" /> -->
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="班次" prop="groupClass">
<el-select
@ -72,20 +79,6 @@
</el-select>
</el-form-item>
</el-col>
<el-col :span="12">
<el-form-item label="确认时限 (时)" prop="confirmTimeLimit">
<el-input
v-model="dataForm.confirmTimeLimit"
:placeholder="`请输入确认时限`" />
<!-- <el-date-picker
v-model="dataForm.confirmTimeLimit"
type="datetime"
:placeholder="`请选择确认时限`"
value-format="timestamp" /> -->
</el-form-item>
</el-col>
<el-col>
<el-form-item label="备注" prop="remark">
<el-input v-model="dataForm.remark" placeholder="请输入备注" />
@ -96,8 +89,6 @@
</template>
<script>
import { groupConnectWorkshop } from '@/utils/equipment-module';
export default {
data() {
return {
@ -116,12 +107,6 @@ export default {
dataRule: {
confirmTimeLimit: [
{ required: true, message: '确认时限不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字类型',
trigger: 'blur',
transform: (val) => Number(val),
},
],
code: [
{ required: true, message: '巡检单编码不能为空', trigger: 'blur' },
@ -132,15 +117,6 @@ export default {
planCheckTime: [
{ required: true, message: '计划巡检时间不能为空', trigger: 'blur' },
],
checkPeriod: [
{ required: true, message: '巡检频率不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字类型',
trigger: 'blur',
transform: (val) => Number(val),
},
],
},
equipmentOptions: [],
groupOptions: [],
@ -161,7 +137,6 @@ export default {
confirmTimeLimit: null,
groupClass: null,
remark: null,
checkPeriod: null
// special: true,
};
},
@ -185,7 +160,7 @@ export default {
}
if (grp.code == 0) {
this.groupOptions = grp.data.map((item) => ({
label: groupConnectWorkshop(item.name, item.roomNameDict),
label: item.name,
value: item.id,
}));
}
@ -211,10 +186,7 @@ export default {
Object.keys(this.dataForm).forEach((key) => {
this.dataForm[key] = res.data[key];
if (key == 'groupClass') {
this.dataForm.groupClass =
res.data.groupClass &&
res.data.groupClass.trim() != '' &&
res.data.groupClass.split(',');
this.dataForm.groupClass = res.data.groupClass.split(',')
}
});
}

View File

@ -23,7 +23,7 @@
<el-row :gutter="20">
<el-col :span="8">
<el-form-item label="故障发生时间" prop="faultTime">
<span style="color: #000a;">{{ parseTime(dataForm.faultTime) }}</span>
<span>{{ parseTime(dataForm.faultTime) }}</span>
</el-form-item>
</el-col>
@ -43,7 +43,7 @@
<el-col :span="8">
<el-form-item label="故障级别" prop="faultLevel">
<span style="color: #000a;">
<span>
{{ getDictDataLabel('fault-level', dataForm.faultLevel) }}
</span>
</el-form-item>
@ -51,7 +51,7 @@
<el-col :span="8">
<el-form-item label="故障类型" prop="faultType">
<span style="color: #000a;">
<span>
{{ getDictDataLabel('fault-type', dataForm.faultType) }}
</span>
</el-form-item>
@ -59,19 +59,19 @@
<el-col :span="8">
<el-form-item label="维修工" prop="repairman">
<span style="color: #000a;">{{ dataForm.repairman }}</span>
<span>{{ dataForm.repairman }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="联系方式" prop="repairmanPhone">
<span style="color: #000a;">{{ dataForm.repairmanPhone }}</span>
<span>{{ dataForm.repairmanPhone }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="维修方式" prop="repairMode">
<span style="color: #000a;">
<span>
{{ getDictDataLabel('repair-mode', dataForm.repairMode) }}
</span>
</el-form-item>
@ -88,25 +88,25 @@
:disabled="disabled"
@delete="!disabled && handleDeleteFile(file, col.prop)" />
</div>
<p v-else style="color: #000a;">暂无附件</p>
<p v-else>暂无附件</p>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建时间" prop="createTime">
<span style="color: #000a;">{{ parseTime(dataForm.createTime) }}</span>
<span>{{ parseTime(dataForm.createTime) }}</span>
</el-form-item>
</el-col>
<el-col :span="8">
<el-form-item label="创建人" prop="creator">
<span style="color: #000a;">{{ dataForm.creator }}</span>
<span>{{ dataForm.creator }}</span>
</el-form-item>
</el-col>
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<span style="color: #000a;">{{ dataForm.remark || '- 无 -' }}</span>
<span>{{ dataForm.remark }}</span>
</el-form-item>
</el-col>
</el-row>
@ -159,7 +159,8 @@ const uploadedFile = {
document.body.removeChild(link);
},
},
mounted() {},
mounted() {
},
render: function (h) {
return (
<div
@ -337,10 +338,6 @@ export default {
overflow-y: auto;
}
.drawer-body__content >>> .el-form-item__label {
font-weight: 700;
}
.drawer-body__footer {
display: flex;
justify-content: flex-end;

View File

@ -27,6 +27,7 @@
<div class="drawer-body flex">
<div class="drawer-body__content">
<section>
<SmallTitle>保养信息</SmallTitle>
<div class="form-part" style="margin-bottom: 32px">
<el-skeleton v-if="!showForm" animated />
<el-form

View File

@ -44,7 +44,10 @@
</el-col>
<el-col :span="12">
<el-form-item label="部门" prop="departmentId">
<el-form-item
label="部门"
prop="departmentId"
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
<el-select
v-model="form.departmentId"
:placeholder="`请选择部门`"
@ -81,7 +84,10 @@
</el-col>
<el-col :span="12">
<el-form-item label="产线" prop="lineId">
<el-form-item
label="产线"
prop="lineId"
:rules="[{ required: true, message: '请选择产线', trigger: 'blur' }]">
<el-select
v-model="form.lineId"
:placeholder="`请选择产线`"
@ -177,7 +183,6 @@
label="保养时长(h)"
prop="maintainDuration"
:rules="[
{ required: true, message: '保养时长不能为空', trigger: 'blur' },
{
type: 'number',
message: '请输入正确的数字',

View File

@ -27,6 +27,7 @@
<div class="drawer-body flex">
<div class="drawer-body__content">
<section>
<SmallTitle>保养信息</SmallTitle>
<div class="form-part" style="margin-bottom: 32px">
<el-skeleton v-if="!showForm" animated />
<el-form
@ -129,8 +130,8 @@
width="35%"
:append-to-body="true"
custom-class="baseDialog"
@close="detailAddVisible = false"
@cancel="detailAddVisible = false"
@close="closeDetailForm"
@cancel="closeDetailForm"
@confirm="submitDetailForm">
<DialogForm
v-if="detailAddVisible"
@ -237,7 +238,7 @@ export default {
detailTableProps: [
{ prop: 'equipmentName', label: '设备名称' },
{ prop: 'program', label: '保养项目' },
// { prop: 'remark', label: '' },
{ prop: 'remark', label: '备注' },
],
detailTableQuery: {
pageNo: 1,
@ -317,21 +318,9 @@ export default {
value: item.id,
}));
},
resetForm() {
this.detailForm = {
planId: null,
equipmentId: null,
program: '',
maintenanceDes: '',
remark: '',
};
},
closeDetailForm() {
this.detailAddVisible = false;
},
async submitDetailForm() {
// validation
this.$refs.detailForm.validate(async (valid) => {
@ -422,10 +411,7 @@ export default {
}
},
handleAddDetail() {
this.resetForm();
this.$nextTick(() => {
this.detailAddVisible = true;
});
},
},
};

View File

@ -63,6 +63,7 @@
import moment from 'moment';
import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { deleteEqMaintainPlan } from '@/api/equipment/base/maintain/record';
import { publicFormatter } from '@/utils/dict';
import PlanConfigAdd from './PlanConfig--add.vue';
import PlanConfigAddContent from './PlanConfig--addContent.vue';
@ -101,13 +102,8 @@ export default {
{ prop: 'name', label: '计划名称' },
{ prop: 'departmentName', label: '部门' },
{ width: 144, prop: 'lineName', label: '产线名' },
{ width: 132, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
{
width: 180,
prop: 'firstMaintenanceTime',
label: '首次保养时间',
filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
},
{ width: 144, prop: 'maintenancePeriod', label: '保养频率(天/次)' },
{ width: 144, prop: 'firstMaintenanceTime', label: '首次保养时间' },
{ width: 144, prop: 'maintainDuration', label: '保养时长' },
{ prop: 'maintainer', label: '计划保养人员' },
{

View File

@ -29,7 +29,7 @@
</el-col>
<!-- 产线名 -->
<!-- <el-col :span="8">
<el-col :span="8">
<el-form-item label="产线名" prop="lineId">
<el-select
v-model="formFilters.lineId"
@ -45,10 +45,10 @@
:value="opt.value" />
</el-select>
</el-form-item>
</el-col> -->
</el-col>
<!-- 工段名 -->
<!-- <el-col :span="8">
<el-col :span="8">
<el-form-item label="工段名" prop="sectionId">
<el-select
v-model="formFilters.sectionId"
@ -64,7 +64,7 @@
:value="opt.value" />
</el-select>
</el-form-item>
</el-col> -->
</el-col>
<!-- 设备名称 -->
<el-col :span="8">
@ -116,7 +116,16 @@
<!-- 故障级别 -->
<el-col :span="8">
<el-form-item label="故障级别" prop="faultLevel">
<el-form-item
label="故障级别"
prop="faultLevel"
:rules="[
{
required: true,
message: '故障级别不能为空',
trigger: 'blur',
},
]">
<el-select
v-model="form.faultLevel"
placeholder="故障级别"
@ -207,7 +216,12 @@
<!-- 维修工 -->
<el-col :span="8">
<el-form-item label="维修工" prop="repairman">
<el-form-item
label="维修工"
prop="repairman"
:rules="[
{ required: true, message: '维修工不能为空', trigger: 'blur' },
]">
<el-select
v-model="form.repairman"
@change="$emit('update', form)"
@ -227,7 +241,12 @@
<!-- 联系方式 -->
<el-col :span="8">
<el-form-item label="联系方式" prop="repairmanPhone">
<el-form-item
label="联系方式"
prop="repairmanPhone"
:rules="[
{ required: true, message: '联系方式不能为空', trigger: 'blur' },
]">
<el-input
v-model="form.repairmanPhone"
@change="$emit('update', form)"
@ -238,7 +257,16 @@
<!-- 维修方式 - 数据字典 -->
<el-col :span="8">
<el-form-item label="维修方式" prop="repairMode">
<el-form-item
label="维修方式"
prop="repairMode"
:rules="[
{
required: true,
message: '维修方式不能为空',
trigger: 'blur',
},
]">
<el-select
v-model="form.repairMode"
placeholder="维修方式"
@ -280,7 +308,7 @@
</el-col>
<!-- 备注 -->
<el-col :span="8">
<el-col :span="24">
<el-form-item label="备注" prop="remark">
<el-input
v-model="form.remark"
@ -516,16 +544,16 @@ export default {
dataForm: {
handler(val) {
this.form = JSON.parse(JSON.stringify(val));
// if (this.form.equipmentCategory != null) {
// setTimeout(() => {
// this.equipmentOptions = this.equipmentList
// .filter((item) => item.special)
// .filter(
// (item) => item.specialType === this.form.equipmentCategory
// )
// .map((item) => ({ label: item.name, value: item.id }));
// }, 1000);
// }
if (this.form.equipmentCategory != null) {
setTimeout(() => {
this.equipmentOptions = this.equipmentList
.filter((item) => item.special)
.filter(
(item) => item.specialType === this.form.equipmentCategory
)
.map((item) => ({ label: item.name, value: item.id }));
}, 1000);
}
if (this.hasFiles) {
if (typeof this.hasFiles == 'boolean' && this.hasFiles) {
this.form.files = this.form.files ?? [];
@ -563,9 +591,9 @@ export default {
this.formLoading = true;
await this.getCode();
await this.initEquipment();
// await this.initLines();
await this.initLines();
await this.initWorker();
// await this.initSections();
await this.initSections();
this.formLoading = false;
this.isInit = false;
this.setInitWorker();
@ -574,37 +602,36 @@ export default {
/** 设置默认维修工为用户自己 */
setInitWorker() {
/** 获取用户自身id */
const nickname = this.$store.getters.nickname;
const userId = this.$store.getters.userId;
this.$nextTick(() => {
this.form.repairman = [nickname];
this.form.repairman = [userId];
});
},
/** 获取产线 */
// async initLines() {
// const res = await this.$axios('/base/core-production-line/listAll');
// this.lineOptions = (res.data || []).map((item) => ({
// label: item.name,
// value: item.id,
// }));
// },
// /** */
// async initSections(byLineId) {
// this.formLoading = !this.isInit && true;
// const res = await this.$axios({
// url:
// byLineId && !this.isInit
// ? '/base/core-workshop-section/listByParentId?id=' + byLineId
// : '/base/core-workshop-section/listAll',
// });
// this.sectionOptions = (res.data || []).map((item) => ({
// label: item.name,
// value: item.id,
// }));
// this.formLoading = !this.isInit && false;
// },
async initLines() {
const res = await this.$axios('/base/core-production-line/listAll');
this.lineOptions = (res.data || []).map((item) => ({
label: item.name,
value: item.id,
}));
},
/** 获取工段 */
async initSections(byLineId) {
this.formLoading = !this.isInit && true;
const res = await this.$axios({
url:
byLineId && !this.isInit
? '/base/core-workshop-section/listByParentId?id=' + byLineId
: '/base/core-workshop-section/listAll',
});
this.sectionOptions = (res.data || []).map((item) => ({
label: item.name,
value: item.id,
}));
this.formLoading = !this.isInit && false;
},
/** 获取设备 */
async initEquipment(type = 'special-equipment') {
const response = await this.$axios('/base/core-equipment/listAll');
@ -615,8 +642,8 @@ export default {
label: item.name,
value: item.id,
}));
this.equipmentOptions = [...equipmentOptions];
this.allSpeicalEquipments = [...equipmentOptions];
this.equipmentOptions = equipmentOptions;
this.allSpeicalEquipments = equipmentOptions;
},
/** 获取维修工 - 同时从用户表和员工表拉取数据 */
async initWorker() {
@ -631,8 +658,8 @@ export default {
});
list = list.concat(
(userList.data?.list || []).map((item) => ({
label: item.nickname,
value: item.nickname,
label: item.username,
value: item.id,
}))
);
/** worker */
@ -642,7 +669,7 @@ export default {
list = list.concat(
(workerList.data || []).map((item) => ({
label: item.name,
value: item.name,
value: item.id,
}))
);
/** setting */

View File

@ -42,7 +42,6 @@
<base-dialog
:dialogTitle="title"
:dialogVisible="open"
width="60%"
@close="cancel"
@cancel="cancel"
@confirm="submitForm">
@ -147,7 +146,6 @@ export default {
label: '故障明细',
minWidth: 120,
showOverflowtooltip: true,
subcomponent: htmls,
},
{
prop: 'maintenanceStartTime',
@ -174,7 +172,6 @@ export default {
label: '维修描述',
showOverflowtooltip: true,
width: 110,
subcomponent: htmls,
},
{
prop: 'remark',