projects/mesxc-zhp #255
@ -6,3 +6,12 @@ export function getLineAll() {
|
|||||||
method: 'get'
|
method: 'get'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 根据车间获得所有工厂产线列表
|
||||||
|
export function getLinelistByRoom(query) {
|
||||||
|
return request({
|
||||||
|
url: '/base/core-production-line/listFilter',
|
||||||
|
method: 'get',
|
||||||
|
params: query
|
||||||
|
})
|
||||||
|
}
|
||||||
|
@ -123,6 +123,7 @@
|
|||||||
filterable
|
filterable
|
||||||
clearable
|
clearable
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
|
@change="setLine"
|
||||||
placeholder="请选择车间名称">
|
placeholder="请选择车间名称">
|
||||||
<el-option
|
<el-option
|
||||||
v-for="(dict, index) in getDictDatas('workshop')"
|
v-for="(dict, index) in getDictDatas('workshop')"
|
||||||
@ -163,7 +164,7 @@
|
|||||||
import { getProductAll } from '@/api/base/product'
|
import { getProductAll } from '@/api/base/product'
|
||||||
import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
|
import { getProcessFlowList, workOrderList } from '@/api/base/orderManage'
|
||||||
import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
|
import { createCoreWO, updateCoreWO, getCode, getCoreWO } from '@/api/base/coreWorkOrder'
|
||||||
import { getLineAll } from '@/api/base/productionLine'
|
import { getLinelistByRoom, getLineAll } from '@/api/base/productionLine'
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -225,6 +226,14 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
setLine() {
|
||||||
|
// 产线
|
||||||
|
getLinelistByRoom({
|
||||||
|
room: this.dataForm.roomNameDict
|
||||||
|
}).then(res => {
|
||||||
|
this.productLineList = res.data || []
|
||||||
|
})
|
||||||
|
},
|
||||||
// 工艺变更
|
// 工艺变更
|
||||||
materialMethodChange(val) {
|
materialMethodChange(val) {
|
||||||
if (val === 2 && !this.dataForm.processFlowId) {
|
if (val === 2 && !this.dataForm.processFlowId) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 14:47:44
|
* @LastEditTime: 2024-03-15 15:34:58
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -17,30 +17,47 @@
|
|||||||
</small-title>
|
</small-title>
|
||||||
<div class="content">
|
<div class="content">
|
||||||
<div class="formContent">
|
<div class="formContent">
|
||||||
<el-row :gutter="20">
|
<el-form :model="dataForm" ref="dataForm" label-width="120px" label-position="top" class="demo-ruleForm" :rules="rules">
|
||||||
<el-col :span="8">
|
<el-row :gutter="20">
|
||||||
<div class="blodTip">工单名称</div>
|
<el-col :span="8">
|
||||||
<div class="lightTip">{{ dataForm.name }}</div>
|
<el-form-item label="工单名称" prop="name">
|
||||||
</el-col>
|
<!-- <el-input v-model="dataForm.name" autocomplete="off"></el-input> -->
|
||||||
<el-col :span="8">
|
<span>{{ dataForm.name }}</span>
|
||||||
<div class="blodTip">工单编码</div>
|
</el-form-item>
|
||||||
<div class="lightTip">{{ dataForm.code }}</div>
|
</el-col>
|
||||||
</el-col>
|
<el-col :span="8">
|
||||||
<el-col :span="8">
|
<el-form-item label="工单编码" prop="code">
|
||||||
<div class="blodTip">产品名称</div>
|
<span>{{ dataForm.code }}</span>
|
||||||
<div class="lightTip">{{ dataForm.productName }}</div>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
<el-col :span="8">
|
||||||
<el-row :gutter="20">
|
<el-form-item label="产品名称" prop="productName">
|
||||||
<el-col :span="8">
|
<span>{{ dataForm.productName }}</span>
|
||||||
<div class="blodTip">产品规格</div>
|
</el-form-item>
|
||||||
<div class="lightTip">{{ dataForm.specifications }}</div>
|
</el-col>
|
||||||
</el-col>
|
</el-row>
|
||||||
<el-col :span="8">
|
<el-row :gutter="20">
|
||||||
<div class="blodTip">实际生产数量</div>
|
<el-col :span="8">
|
||||||
<div class="lightTip">{{ dataForm.expectedTime }}</div>
|
<el-form-item label="产品规格" prop="specifications">
|
||||||
</el-col>
|
<span>{{ dataForm.specifications }}</span>
|
||||||
</el-row>
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际生产数量" prop="actualQuantity">
|
||||||
|
<el-input v-model.number="dataForm.actualQuantity" autocomplete="off" style="width: 80%" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<el-form-item label="实际生产完成时间" prop="finishProduceTime">
|
||||||
|
<el-date-picker
|
||||||
|
v-model="dataForm.finishProduceTime"
|
||||||
|
type="datetime"
|
||||||
|
value-format="yyyy-MM-dd HH:mm:ss"
|
||||||
|
placeholder="选择日期时间" />
|
||||||
|
</el-form-item>
|
||||||
|
</el-col>
|
||||||
|
</el-row>
|
||||||
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="attr-list">
|
<div class="attr-list">
|
||||||
@ -99,11 +116,11 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="drawer-body__footer">
|
<div class="drawer-body__footer">
|
||||||
<el-button style="" type="primary" @click="goback()">关闭</el-button>
|
<el-button style="" @click="goback()">取消</el-button>
|
||||||
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
<!-- <el-button v-if="isdetail" type="primary" @click="goEdit()">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button> -->
|
||||||
<el-button v-else type="primary" @click="dataFormSubmit()">确定</el-button> -->
|
<el-button type="primary" @click="dataFormSubmit()">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@ -117,7 +134,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import basicAdd from '../../core/mixins/basic-add';
|
import basicAdd from '../../core/mixins/basic-add';
|
||||||
import { getConOrderList, updateConCoreWOr, getCoreWO } from '@/api/base/coreWorkOrder';
|
import { getConOrderList, updateConCoreWOr, getCoreWO, statusChange } from '@/api/base/coreWorkOrder';
|
||||||
import SmallTitle from '../material/SmallTitle';
|
import SmallTitle from '../material/SmallTitle';
|
||||||
// import { parseTime } from '../../core/mixins/code-filter';
|
// import { parseTime } from '../../core/mixins/code-filter';
|
||||||
// import attrAdd from './attr-add';
|
// import attrAdd from './attr-add';
|
||||||
@ -148,11 +165,43 @@ export default {
|
|||||||
tableData: [],
|
tableData: [],
|
||||||
visible: false,
|
visible: false,
|
||||||
isdetail: false,
|
isdetail: false,
|
||||||
idAttrShow: false
|
idAttrShow: false,
|
||||||
|
rules: {
|
||||||
|
name: [{ required: true, message: "工单名称不能为空", trigger: "blur" }],
|
||||||
|
finishProduceTime: [{ required: true, message: "实际生产完成时间不能为空", trigger: "change" }]
|
||||||
|
},
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {},
|
mounted() {},
|
||||||
methods: {
|
methods: {
|
||||||
|
// 表单提交
|
||||||
|
dataFormSubmit() {
|
||||||
|
this.$refs["dataForm"].validate((valid) => {
|
||||||
|
if (!valid) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
// 修改的提交
|
||||||
|
if (this.dataForm.id) {
|
||||||
|
statusChange({
|
||||||
|
id: this.dataForm.id,
|
||||||
|
status: 4,
|
||||||
|
finishProduceTime: this.dataForm.finishProduceTime,
|
||||||
|
actualQuantity: this.dataForm.actualQuantity
|
||||||
|
}).then(response => {
|
||||||
|
this.$modal.msgSuccess("操作成功!工单状态稍后将会更新!");
|
||||||
|
this.visible = false;
|
||||||
|
this.$emit("refreshDataList");
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
// 添加的提交
|
||||||
|
// this.urlOptions.createURL(this.dataForm).then(response => {
|
||||||
|
// this.$modal.msgSuccess("新增成功");
|
||||||
|
// this.visible = false;
|
||||||
|
// this.$emit("refreshDataList");
|
||||||
|
// });
|
||||||
|
});
|
||||||
|
},
|
||||||
initData() {
|
initData() {
|
||||||
// this.materialAttrList.splice(0);
|
// this.materialAttrList.splice(0);
|
||||||
this.listQuery.total = 0;
|
this.listQuery.total = 0;
|
||||||
@ -255,6 +304,9 @@ export default {
|
|||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
|
/* .item .el-form-item__label {
|
||||||
|
color: red;
|
||||||
|
} */
|
||||||
.drawer >>> .el-drawer {
|
.drawer >>> .el-drawer {
|
||||||
border-radius: 8px 0 0 8px;
|
border-radius: 8px 0 0 8px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -263,6 +315,7 @@ export default {
|
|||||||
|
|
||||||
.drawer >>> .el-form-item__label {
|
.drawer >>> .el-form-item__label {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
.drawer >>> .el-drawer__header {
|
.drawer >>> .el-drawer__header {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 14:42:32
|
* @LastEditTime: 2024-03-15 15:40:24
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -97,6 +97,10 @@
|
|||||||
<div class="blodTip">关联工艺</div>
|
<div class="blodTip">关联工艺</div>
|
||||||
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
<div class="lightTip">{{ dataForm.processFlowName }}</div>
|
||||||
</el-col>
|
</el-col>
|
||||||
|
<el-col :span="3">
|
||||||
|
<div class="blodTip">车间名称</div>
|
||||||
|
<div class="lightTip">{{ (dataForm.roomNameDict || dataForm.roomNameDict === 0) ? getDictDataLabel('workshop', dataForm.roomNameDict) : '-' }}</div>
|
||||||
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -431,28 +431,33 @@ export default {
|
|||||||
opration = '终止'
|
opration = '终止'
|
||||||
}
|
}
|
||||||
console.log('22',val)
|
console.log('22',val)
|
||||||
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
if (param.status !== 4) {
|
||||||
confirmButtonText: "确定",
|
this.$confirm(`确定${opration}${'"工单' + val.data.name + '"'}?`, "提示", {
|
||||||
cancelButtonText: "取消",
|
confirmButtonText: "确定",
|
||||||
type: "warning",
|
cancelButtonText: "取消",
|
||||||
})
|
type: "warning",
|
||||||
.then(() => {
|
})
|
||||||
statusChange(param).then(({ data }) => {
|
.then(() => {
|
||||||
this.$message({
|
statusChange(param).then(({ data }) => {
|
||||||
message: '操作成功!工单状态稍后将会更新!',
|
this.$message({
|
||||||
type: 'success',
|
message: '操作成功!工单状态稍后将会更新!',
|
||||||
duration: 1500,
|
type: 'success',
|
||||||
onClose: () => {
|
duration: 1500,
|
||||||
this.getDataList();
|
onClose: () => {
|
||||||
// 分配产量
|
this.getDataList();
|
||||||
if (param.status === 4) {
|
// 分配产量
|
||||||
this.allocationOrder(param);
|
// if (param.status === 4) {
|
||||||
}
|
// this.allocationOrder(param);
|
||||||
},
|
// }
|
||||||
|
},
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
})
|
||||||
})
|
.catch(() => { });
|
||||||
.catch(() => { });
|
} else {
|
||||||
|
// 完成弹出分配框
|
||||||
|
this.allocationOrder(param);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
allocationOrder(val) {
|
allocationOrder(val) {
|
||||||
@ -460,20 +465,25 @@ export default {
|
|||||||
getConOrderList({
|
getConOrderList({
|
||||||
workOrderId: val.id,
|
workOrderId: val.id,
|
||||||
}).then((response) => {
|
}).then((response) => {
|
||||||
if (response.data.length > 0) {
|
|
||||||
this.$confirm('工单结束,可分配产量', "提示", {
|
this.$confirm('工单结束,可分配产量', "提示", {
|
||||||
confirmButtonText: "确定",
|
confirmButtonText: "确定",
|
||||||
cancelButtonText: "取消",
|
cancelButtonText: "取消",
|
||||||
type: "warning",
|
type: "warning",
|
||||||
})
|
})
|
||||||
.then(() => {
|
.then(() => {
|
||||||
this.allocationVisible = true;
|
this.allocationVisible = true;
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.allocation.init(val.id, true);
|
if (response.data.length > 0) {
|
||||||
});
|
// 有绑定订单带id
|
||||||
})
|
this.$refs.allocation.init(val.id);
|
||||||
.catch(() => { });
|
} else {
|
||||||
}
|
this.$refs.allocation.init();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
})
|
||||||
|
.catch(() => { });
|
||||||
|
|
||||||
// this.listQuery.total = response.data.total;
|
// this.listQuery.total = response.data.total;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -46,6 +46,7 @@
|
|||||||
import BalanceChart from '../balanceChart';
|
import BalanceChart from '../balanceChart';
|
||||||
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||||
import AnalysisChart from './chart.vue';
|
import AnalysisChart from './chart.vue';
|
||||||
|
import { parseTime } from '@/utils/ruoyi'
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
@ -82,7 +83,7 @@ export default {
|
|||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
dateType: 'monthrange',
|
dateType: 'month',
|
||||||
format: 'yyyy-MM',
|
format: 'yyyy-MM',
|
||||||
valueFormat: 'timestamp',
|
valueFormat: 'timestamp',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
@ -255,13 +256,13 @@ export default {
|
|||||||
const date = eq.dynamicName;
|
const date = eq.dynamicName;
|
||||||
eq.children.forEach((sub) => {
|
eq.children.forEach((sub) => {
|
||||||
if (sub.dynamicName == '设备CT')
|
if (sub.dynamicName == '设备CT')
|
||||||
row[date + '_eq_ct'] = sub.dynamicValue;
|
row[date + '_eq_ct'] = sub?.dynamicValue?.toFixed(2);
|
||||||
if (sub.dynamicName == '设备TT')
|
if (sub.dynamicName == '设备TT')
|
||||||
row[date + '_eq_tt'] = sub.dynamicValue;
|
row[date + '_eq_tt'] = sub?.dynamicValue?.toFixed(2);
|
||||||
if (sub.dynamicName == '产线CT')
|
if (sub.dynamicName == '产线CT')
|
||||||
row[date + '_pl_ct'] = sub.dynamicValue;
|
row[date + '_pl_ct'] = sub.dynamicValue?.toFixed(2);
|
||||||
if (sub.dynamicName == '产线TT')
|
if (sub.dynamicName == '产线TT')
|
||||||
row[date + '_pl_tt'] = sub.dynamicValue;
|
row[date + '_pl_tt'] = sub.dynamicValue?.toFixed(2);
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
this.tableData.push(row);
|
this.tableData.push(row);
|
||||||
@ -369,21 +370,63 @@ export default {
|
|||||||
// this.dataListLoading = false;
|
// this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
changeTime(val) {
|
||||||
|
console.log(val)
|
||||||
|
if(val) {
|
||||||
|
const timeStamp = new Date(val).getMonth(); //标准时间转为时间戳,毫秒级别
|
||||||
|
console.log('沃尔沃', timeStamp)
|
||||||
|
const fullyear = new Date(val).getFullYear()
|
||||||
|
let days = 0
|
||||||
|
switch (timeStamp) {
|
||||||
|
case 0:
|
||||||
|
case 2:
|
||||||
|
case 4:
|
||||||
|
case 6:
|
||||||
|
case 7:
|
||||||
|
case 9:
|
||||||
|
case 11:
|
||||||
|
days = 31
|
||||||
|
break
|
||||||
|
case 3:
|
||||||
|
case 4:
|
||||||
|
case 8:
|
||||||
|
case 10:
|
||||||
|
days = 30
|
||||||
|
break
|
||||||
|
case 1:
|
||||||
|
if ((fullyear % 400 === 0) || (fullyear % 4 === 0 && fullyear % 100 !== 0)) {
|
||||||
|
days = 29
|
||||||
|
} else {
|
||||||
|
days = 28
|
||||||
|
}
|
||||||
|
break
|
||||||
|
}
|
||||||
|
|
||||||
|
this.queryParams.startTime = new Date(fullyear, timeStamp, 1, 0, 0, 0).getTime() //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||||
|
this.queryParams.endTime = new Date(fullyear, timeStamp, days, 23, 59, 59).getTime() //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
|
||||||
|
} else {
|
||||||
|
this.queryParams.startTime = undefined
|
||||||
|
this.queryParams.endTime = undefined
|
||||||
|
}
|
||||||
|
},
|
||||||
|
|
||||||
handleSearchBarBtnClick(btn) {
|
handleSearchBarBtnClick(btn) {
|
||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.queryParams.lineId = btn.lineIds || null;
|
this.queryParams.lineId = btn.lineIds || null;
|
||||||
this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
|
console.log('2222', new Date(btn.timeArr).getFullYear())
|
||||||
this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
|
this.changeTime(btn.timeArr)
|
||||||
|
// this.queryParams.startTime = btn.timeArr ? btn.timeArr[0] : null;
|
||||||
|
// this.queryParams.endTime = btn.timeArr ? btn.timeArr[1] : null;
|
||||||
|
|
||||||
if (!btn.lineIds || !btn.timeArr.length) {
|
if (!btn.lineIds || !btn.timeArr) {
|
||||||
this.$message({
|
this.$message({
|
||||||
message: '请选择产线和时间',
|
message: '请选择产线和时间',
|
||||||
type: 'warning',
|
type: 'warning',
|
||||||
});
|
});
|
||||||
|
} else {
|
||||||
|
this.getList();
|
||||||
}
|
}
|
||||||
this.getList();
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -4,38 +4,23 @@
|
|||||||
<el-col :span='12'>
|
<el-col :span='12'>
|
||||||
<el-form-item label="能源类型" prop="energyTypeId">
|
<el-form-item label="能源类型" prop="energyTypeId">
|
||||||
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
<el-select v-model="form.energyTypeId" placeholder="请选择" style="width: 100%;" filterable>
|
||||||
<el-option
|
<el-option v-for="item in this.energyTypeList" :key="item.id" :label="item.name" :value="item.id">
|
||||||
v-for="item in this.energyTypeList"
|
|
||||||
:key="item.id"
|
|
||||||
:label="item.name"
|
|
||||||
:value="item.id">
|
|
||||||
</el-option>
|
</el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :span='12'>
|
<el-col :span='12'>
|
||||||
<el-form-item label="抄表日期" prop="recordTime">
|
<el-form-item label="抄表日期" prop="recordTime">
|
||||||
<el-date-picker
|
<el-date-picker v-model="form.recordTime" type="date" format="yyyy-MM-dd" value-format="timestamp"
|
||||||
v-model="form.recordTime"
|
placeholder="选择日期" style="width: 100%;">
|
||||||
type="date"
|
|
||||||
format="yyyy-MM-dd"
|
|
||||||
value-format="timestamp"
|
|
||||||
placeholder="选择日期"
|
|
||||||
style="width: 100%;">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-row :gutter="20">
|
<el-row :gutter="20">
|
||||||
<el-col :span='24'>
|
<el-col :span='24'>
|
||||||
<base-table
|
<base-table border :table-props="tableProps" :table-data="tableData" :add-button-show="addButtonShow"
|
||||||
border
|
@emitFun="inputChange" @emitButtonClick="emitButtonClick" />
|
||||||
:table-props="tableProps"
|
|
||||||
:table-data="tableData"
|
|
||||||
:add-button-show="addButtonShow"
|
|
||||||
@emitFun="inputChange"
|
|
||||||
@emitButtonClick="emitButtonClick"
|
|
||||||
/>
|
|
||||||
</el-col>
|
</el-col>
|
||||||
</el-row>
|
</el-row>
|
||||||
</el-form>
|
</el-form>
|
||||||
@ -46,17 +31,17 @@ import moment from 'moment'
|
|||||||
import InputArea from './InputArea'
|
import InputArea from './InputArea'
|
||||||
import SelectArea from './SelectArea'
|
import SelectArea from './SelectArea'
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'tableName',
|
prop: 'tableName',
|
||||||
label: '表名',
|
label: '表名*',
|
||||||
subcomponent: SelectArea
|
subcomponent: SelectArea
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'readingQuantity',
|
prop: 'readingQuantity',
|
||||||
label: '抄表数',
|
label: '抄表数*',
|
||||||
subcomponent: InputArea
|
subcomponent: InputArea
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
export default {
|
export default {
|
||||||
name: 'EnergyQuantityManualAdd',
|
name: 'EnergyQuantityManualAdd',
|
||||||
props: {
|
props: {
|
||||||
@ -72,7 +57,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
addButtonShow:'新增',
|
addButtonShow: '新增',
|
||||||
form: {
|
form: {
|
||||||
id: '',
|
id: '',
|
||||||
energyTypeId: '',
|
energyTypeId: '',
|
||||||
@ -98,16 +83,16 @@ export default {
|
|||||||
obj.tableName = params.tableName + ''
|
obj.tableName = params.tableName + ''
|
||||||
obj.readingQuantity = 0
|
obj.readingQuantity = 0
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
}else {
|
} else {
|
||||||
this.isEdit = true
|
this.isEdit = true
|
||||||
this.form.id = params.id
|
this.form.id = params.id
|
||||||
this.addButtonShow = ''
|
this.addButtonShow = ''
|
||||||
energyQuantityManualGet({id: this.form.id}).then(res => {
|
energyQuantityManualGet({ id: this.form.id }).then(res => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.form.energyTypeId = res.data.energyTypeId
|
this.form.energyTypeId = res.data.energyTypeId
|
||||||
this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
|
this.form.recordTime = res.data.recordTime ? res.data.recordTime : null
|
||||||
let obj = {}
|
let obj = {}
|
||||||
obj.tableName = res.data.tableName ? res.data.tableName+'' : ''
|
obj.tableName = res.data.tableName ? res.data.tableName + '' : ''
|
||||||
obj.readingQuantity = res.data.readingQuantity
|
obj.readingQuantity = res.data.readingQuantity
|
||||||
this.tableData.push(obj)
|
this.tableData.push(obj)
|
||||||
}
|
}
|
||||||
@ -130,10 +115,10 @@ export default {
|
|||||||
if (this.tableData.length === 0) {
|
if (this.tableData.length === 0) {
|
||||||
this.$modal.msgError("抄表数据不能为空");
|
this.$modal.msgError("抄表数据不能为空");
|
||||||
return false
|
return false
|
||||||
}else{
|
} else {
|
||||||
for (let item of this.tableData) {
|
for (let item of this.tableData) {
|
||||||
console.log(item)
|
console.log(item)
|
||||||
if (!item.tableName || (!item.readingQuantity && item.readingQuantity!==0)) {
|
if (!item.tableName || (!item.readingQuantity && item.readingQuantity !== 0)) {
|
||||||
this.$modal.msgError("抄表数据有空值,请检查");
|
this.$modal.msgError("抄表数据有空值,请检查");
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
@ -142,11 +127,11 @@ export default {
|
|||||||
if (this.isEdit) {
|
if (this.isEdit) {
|
||||||
// 编辑
|
// 编辑
|
||||||
energyQuantityManualUpdate({
|
energyQuantityManualUpdate({
|
||||||
id:this.form.id,
|
id: this.form.id,
|
||||||
energyTypeId:this.form.energyTypeId,
|
energyTypeId: this.form.energyTypeId,
|
||||||
recordTime:this.form.recordTime,
|
recordTime: this.form.recordTime,
|
||||||
tableName:this.tableData[0].tableName,
|
tableName: this.tableData[0].tableName,
|
||||||
readingQuantity:this.tableData[0].readingQuantity
|
readingQuantity: this.tableData[0].readingQuantity
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
@ -155,9 +140,9 @@ export default {
|
|||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
energyQuantityManualCreate({
|
energyQuantityManualCreate({
|
||||||
energyTypeId:this.form.energyTypeId,
|
energyTypeId: this.form.energyTypeId,
|
||||||
recordTime:this.form.recordTime,
|
recordTime: this.form.recordTime,
|
||||||
data:this.tableData
|
data: this.tableData
|
||||||
}).then((res) => {
|
}).then((res) => {
|
||||||
if (res.code === 0) {
|
if (res.code === 0) {
|
||||||
this.$modal.msgSuccess("操作成功");
|
this.$modal.msgSuccess("操作成功");
|
||||||
|
@ -185,7 +185,7 @@ export default {
|
|||||||
break
|
break
|
||||||
default:
|
default:
|
||||||
this.$modal.confirm('是否确认导出').then(() => {
|
this.$modal.confirm('是否确认导出').then(() => {
|
||||||
return energyQuantityManualExport({ ...this.queryParams });
|
return energyQuantityManualExport({ energyTypeId: this.queryParams.energyTypeId, recordTime: this.queryParams.recordTime });
|
||||||
}).then(response => {
|
}).then(response => {
|
||||||
this.$download.excel(response, '能源报表.xls');
|
this.$download.excel(response, '能源报表.xls');
|
||||||
}).catch(() => { })
|
}).catch(() => { })
|
||||||
|
@ -2,27 +2,12 @@
|
|||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
|
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<search-bar
|
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||||
:formConfigs="formConfig"
|
|
||||||
ref="searchBarForm"
|
|
||||||
@headBtnClick="buttonClick"
|
|
||||||
/>
|
|
||||||
<!-- 列表 -->
|
<!-- 列表 -->
|
||||||
<base-table
|
<base-table :page="queryParams.pageNo" :limit="queryParams.pageSize" :table-props="tableProps" :table-data="list"
|
||||||
:page="queryParams.pageNo"
|
:selectWidth="55" :max-height="tableH" @selection-change="selectChange" />
|
||||||
:limit="queryParams.pageSize"
|
<pagination :page.sync="queryParams.pageNo" :limit.sync="queryParams.pageSize" :total="total"
|
||||||
:table-props="tableProps"
|
@pagination="getList" />
|
||||||
:table-data="list"
|
|
||||||
:selectWidth="55"
|
|
||||||
:max-height="tableH"
|
|
||||||
@selection-change="selectChange"
|
|
||||||
/>
|
|
||||||
<pagination
|
|
||||||
:page.sync="queryParams.pageNo"
|
|
||||||
:limit.sync="queryParams.pageSize"
|
|
||||||
:total="total"
|
|
||||||
@pagination="getList"
|
|
||||||
/>
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -71,7 +56,8 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
label: '能源类型',
|
label: '能源类型',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'energyTypeId'
|
param: 'energyTypeId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
@ -129,7 +115,7 @@ export default {
|
|||||||
let arr = location.href.split('?')[1].split('&')
|
let arr = location.href.split('?')[1].split('&')
|
||||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
} else {
|
} else {
|
||||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
this.formConfig[1].defaultSelect = [Date.now() - 7 * 24 * 3600000, Date.now()]
|
||||||
}
|
}
|
||||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
@ -146,7 +132,7 @@ export default {
|
|||||||
let arr = location.href.split('?')[1].split('&')
|
let arr = location.href.split('?')[1].split('&')
|
||||||
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
this.formConfig[1].defaultSelect = [arr[0].split('=')[1], arr[1].split('=')[1]]
|
||||||
} else {
|
} else {
|
||||||
this.formConfig[1].defaultSelect = [Date.now() - 7*24*3600000, Date.now()]
|
this.formConfig[1].defaultSelect = [Date.now() - 7 * 24 * 3600000, Date.now()]
|
||||||
}
|
}
|
||||||
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
this.queryParams.startTime = this.formConfig[1].defaultSelect[0]
|
||||||
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
this.queryParams.endTime = this.formConfig[1].defaultSelect[1]
|
||||||
|
@ -127,9 +127,11 @@ export default {
|
|||||||
name: '',
|
name: '',
|
||||||
code: '',
|
code: '',
|
||||||
unit: '',
|
unit: '',
|
||||||
|
singlePrice: 0,
|
||||||
pricingMethod: 2,
|
pricingMethod: 2,
|
||||||
leaderName: '',
|
dim: '',
|
||||||
push: false
|
push: false,
|
||||||
|
description: ''
|
||||||
},
|
},
|
||||||
isEdit: false, //是否是编辑
|
isEdit: false, //是否是编辑
|
||||||
rules: {
|
rules: {
|
||||||
@ -162,14 +164,15 @@ export default {
|
|||||||
this.form.code = res.data.code
|
this.form.code = res.data.code
|
||||||
this.form.unit = res.data.unit
|
this.form.unit = res.data.unit
|
||||||
this.form.pricingMethod = res.data.pricingMethod
|
this.form.pricingMethod = res.data.pricingMethod
|
||||||
this.form.leaderName = res.data.leaderName
|
|
||||||
this.form.push = res.data.push ? true : false
|
this.form.push = res.data.push ? true : false
|
||||||
|
this.form.description = res.data.description
|
||||||
switch (this.form.pricingMethod) {
|
switch (this.form.pricingMethod) {
|
||||||
case 0:
|
case 0:
|
||||||
this.tableData1 = res.data.segPriceList || []
|
this.tableData1 = res.data.segPriceList || []
|
||||||
break;
|
break;
|
||||||
case 1:
|
case 1:
|
||||||
this.tableData2 = res.data.usedPriceList || []
|
this.tableData2 = res.data.usedPriceList || []
|
||||||
|
this.form.dim = res.data.dim
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
this.form.singlePrice = res.data.singlePrice || 0
|
this.form.singlePrice = res.data.singlePrice || 0
|
||||||
|
@ -35,20 +35,20 @@ import {
|
|||||||
} from '@/api/equipment/analysis/statistics';
|
} from '@/api/equipment/analysis/statistics';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
// {
|
||||||
prop: 'recordTime',
|
// prop: 'recordTime',
|
||||||
label: '时间段',
|
// label: '时间段',
|
||||||
filter: (val) => {
|
// filter: (val) => {
|
||||||
if (val && val.length > 0) {
|
// if (val && val.length > 0) {
|
||||||
return (
|
// return (
|
||||||
moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
|
// moment(val[0]).format('YYYY-MM-DD HH:mm:ss') +
|
||||||
' ~ ' +
|
// ' ~ ' +
|
||||||
moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
|
// moment(val[1]).format('YYYY-MM-DD HH:mm:ss')
|
||||||
);
|
// );
|
||||||
}
|
// }
|
||||||
return '-';
|
// return '-';
|
||||||
},
|
// },
|
||||||
},
|
// },
|
||||||
{
|
{
|
||||||
prop: 'lineName',
|
prop: 'lineName',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
@ -158,7 +158,7 @@ export default {
|
|||||||
: '',
|
: '',
|
||||||
btnName: '导出',
|
btnName: '导出',
|
||||||
name: 'export',
|
name: 'export',
|
||||||
color: 'warning',
|
color: 'primary',
|
||||||
plain: true,
|
plain: true,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
@ -19,6 +19,7 @@
|
|||||||
:page="queryParams.pageNo"
|
:page="queryParams.pageNo"
|
||||||
:limit="queryParams.pageSize"
|
:limit="queryParams.pageSize"
|
||||||
:table-data="list"
|
:table-data="list"
|
||||||
|
max-height="600"
|
||||||
@emitFun="handleEmitFun">
|
@emitFun="handleEmitFun">
|
||||||
<!-- <method-btn
|
<!-- <method-btn
|
||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
@ -93,17 +94,29 @@ export default {
|
|||||||
{ prop: 'downCount', label: '故障次数' },
|
{ prop: 'downCount', label: '故障次数' },
|
||||||
],
|
],
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
|
// {
|
||||||
|
// type: 'select',
|
||||||
|
// label: '请选择月份',
|
||||||
|
// placeholder: '请选择月份',
|
||||||
|
// param: 'month',
|
||||||
|
// selectOptions: Array(12)
|
||||||
|
// .fill(0)
|
||||||
|
// .map((v, i) => ({
|
||||||
|
// id: i + 1,
|
||||||
|
// name: `${i + 1}月`,
|
||||||
|
// })),
|
||||||
|
// },
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'datePicker',
|
||||||
label: '请选择月份',
|
label: '时间',
|
||||||
placeholder: '请选择月份',
|
dateType: 'month',
|
||||||
|
format: 'yyyy-MM',
|
||||||
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
|
rangeSeparator: '-',
|
||||||
|
startPlaceholder: '开始时间',
|
||||||
|
endPlaceholder: '结束时间',
|
||||||
|
width: 240,
|
||||||
param: 'month',
|
param: 'month',
|
||||||
selectOptions: Array(12)
|
|
||||||
.fill(0)
|
|
||||||
.map((v, i) => ({
|
|
||||||
id: i + 1,
|
|
||||||
name: `${i + 1}月`,
|
|
||||||
})),
|
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
__index: 'line',
|
__index: 'line',
|
||||||
@ -111,6 +124,7 @@ export default {
|
|||||||
label: '产线',
|
label: '产线',
|
||||||
placeholder: '请选择产线',
|
placeholder: '请选择产线',
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -164,7 +178,13 @@ export default {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (code === 0) {
|
if (code === 0) {
|
||||||
this.list = data;
|
this.list = data.map(item => {
|
||||||
|
item.mtbf = item.mtbf?.toFixed(2)
|
||||||
|
item.mttr = item.mttr?.toFixed(2)
|
||||||
|
item.workTime = item.workTime?.toFixed(2)
|
||||||
|
item.downTime = item.downTime?.toFixed(2)
|
||||||
|
return item
|
||||||
|
});
|
||||||
} else {
|
} else {
|
||||||
this.list.splice(0);
|
this.list.splice(0);
|
||||||
}
|
}
|
||||||
@ -174,12 +194,14 @@ export default {
|
|||||||
switch (btn.btnName) {
|
switch (btn.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
if (btn.month) {
|
if (btn.month) {
|
||||||
this.queryParams.recordTime = [
|
// this.queryParams.recordTime = [
|
||||||
moment()
|
// moment()
|
||||||
.month(btn.month - 1)
|
// .month(btn.month - 1)
|
||||||
.format('YYYY-MM') + '-01 00:00:00',
|
// .format('YYYY-MM') + '-01 00:00:00',
|
||||||
moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
|
// moment().month(btn.month).format('YYYY-MM') + '-01 00:00:00',
|
||||||
];
|
// ];
|
||||||
|
this.queryParams.recordTime = [btn.month, moment().month(new Date(btn.month).getMonth() + 1).format('YYYY-MM') + '-01 00:00:00']
|
||||||
|
console.log(btn.month, moment().month(new Date(btn.month).getMonth() + 1).format('YYYY-MM') + '-01 00:00:00')
|
||||||
} else {
|
} else {
|
||||||
this.queryParams.recordTime = null;
|
this.queryParams.recordTime = null;
|
||||||
}
|
}
|
||||||
|
@ -464,7 +464,9 @@ export default {
|
|||||||
this.reset();
|
this.reset();
|
||||||
this.open = true;
|
this.open = true;
|
||||||
this.title = '添加设备采集配置';
|
this.title = '添加设备采集配置';
|
||||||
this.$refs.addOrUpdate.init()
|
this.$nextTick(() => {
|
||||||
|
this.$refs.addOrUpdate.init()
|
||||||
|
})
|
||||||
},
|
},
|
||||||
/** 修改按钮操作 */
|
/** 修改按钮操作 */
|
||||||
handleUpdate(row) {
|
handleUpdate(row) {
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-13 16:47:02
|
* @LastEditTime: 2024-03-15 18:54:23
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
|
@ -99,7 +99,7 @@
|
|||||||
<el-option
|
<el-option
|
||||||
v-for="plc in plcList"
|
v-for="plc in plcList"
|
||||||
:key="plc.id"
|
:key="plc.id"
|
||||||
:label="plc.name"
|
:label="plc.plcTableName"
|
||||||
:value="plc.id"></el-option>
|
:value="plc.id"></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
@ -404,9 +404,9 @@ export default {
|
|||||||
this.eqList = data;
|
this.eqList = data;
|
||||||
});
|
});
|
||||||
this.$axios({
|
this.$axios({
|
||||||
url: '/base/equipment-plc/page',
|
url: '/base/equipment-plc/listAll',
|
||||||
}).then(({ code, data }) => {
|
}).then(({ code, data }) => {
|
||||||
this.plcList = data.list;
|
this.plcList = data;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
for (const section of this.sections) {
|
for (const section of this.sections) {
|
||||||
|
@ -2,14 +2,15 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-04 11:14:28
|
* @LastEditTime: 2024-03-18 15:47:20
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
<el-drawer
|
<el-drawer
|
||||||
:visible.sync="visible"
|
:visible.sync="visible"
|
||||||
:show-close="false"
|
:show-close="false"
|
||||||
:wrapper-closable="isdetail"
|
:wrapper-closable="true"
|
||||||
|
:before-close="beforeClose"
|
||||||
class="drawer"
|
class="drawer"
|
||||||
size="60%">
|
size="60%">
|
||||||
<small-title slot="title" :no-padding="true">
|
<small-title slot="title" :no-padding="true">
|
||||||
@ -269,6 +270,17 @@ export default {
|
|||||||
this.getDict()
|
this.getDict()
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
beforeClose(done) {
|
||||||
|
if (!this.isdetail) {
|
||||||
|
this.$confirm('确认关闭?')
|
||||||
|
.then(_ => {
|
||||||
|
done();
|
||||||
|
})
|
||||||
|
.catch(_ => {});
|
||||||
|
} else {
|
||||||
|
done()
|
||||||
|
}
|
||||||
|
},
|
||||||
async getDict() {
|
async getDict() {
|
||||||
// 班次列表
|
// 班次列表
|
||||||
const res = await groupClassesListAll();
|
const res = await groupClassesListAll();
|
||||||
@ -372,6 +384,7 @@ export default {
|
|||||||
if (id) {
|
if (id) {
|
||||||
this.idAttrShow = true
|
this.idAttrShow = true
|
||||||
} else {
|
} else {
|
||||||
|
this.dataForm.checkPerson = [this.$store.getters.nickname]
|
||||||
this.idAttrShow = false
|
this.idAttrShow = false
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: zwq
|
* @Author: zwq
|
||||||
* @Date: 2021-11-18 14:16:25
|
* @Date: 2021-11-18 14:16:25
|
||||||
* @LastEditors: DY
|
* @LastEditors: DY
|
||||||
* @LastEditTime: 2024-03-01 19:44:59
|
* @LastEditTime: 2024-03-15 18:38:52
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -27,7 +27,7 @@
|
|||||||
<el-form-item
|
<el-form-item
|
||||||
label="部门"
|
label="部门"
|
||||||
prop="departmentId"
|
prop="departmentId"
|
||||||
:rules="[{ required: true, message: '请选择部门', trigger: 'blur' }]">
|
:rules="[{ required: false, message: '请选择部门', trigger: 'blur' }]">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="dataForm.departmentId"
|
v-model="dataForm.departmentId"
|
||||||
:placeholder="`请选择部门`"
|
:placeholder="`请选择部门`"
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
v-if="tableBtn.length"
|
v-if="tableBtn.length"
|
||||||
slot="handleBtn"
|
slot="handleBtn"
|
||||||
label="操作"
|
label="操作"
|
||||||
:width="180"
|
:width="120"
|
||||||
:method-list="tableBtn"
|
:method-list="tableBtn"
|
||||||
@clickBtn="handleTableBtnClick" />
|
@clickBtn="handleTableBtnClick" />
|
||||||
</base-table>
|
</base-table>
|
||||||
@ -52,6 +52,7 @@ import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
|||||||
import addOrUpdata from './add-or-updata.vue';
|
import addOrUpdata from './add-or-updata.vue';
|
||||||
import add from './add.vue';
|
import add from './add.vue';
|
||||||
import { parseTime } from '../../../../core/mixins/code-filter';
|
import { parseTime } from '../../../../core/mixins/code-filter';
|
||||||
|
import { groupClassesListAll } from '@/api/monitoring/teamProduction';
|
||||||
// import { publicFormatter } from '@/utils/dict';
|
// import { publicFormatter } from '@/utils/dict';
|
||||||
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
// const timeFilter = (val) => moment(val).format('yyyy-MM-DD HH:mm:ss');
|
||||||
|
|
||||||
@ -111,6 +112,12 @@ export default {
|
|||||||
width: 150,
|
width: 150,
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
prop: 'checkPeriod',
|
||||||
|
label: '巡检频率(天/次)',
|
||||||
|
width: 150,
|
||||||
|
showOverflowtooltip: true,
|
||||||
|
},
|
||||||
{
|
{
|
||||||
prop: 'confirmTimeLimit',
|
prop: 'confirmTimeLimit',
|
||||||
label: '确认时限',
|
label: '确认时限',
|
||||||
|
@ -220,7 +220,7 @@
|
|||||||
label="维修工"
|
label="维修工"
|
||||||
prop="repairman"
|
prop="repairman"
|
||||||
:rules="[
|
:rules="[
|
||||||
{ required: true, message: '维修工不能为空', trigger: 'blur' },
|
{ required: false, message: '维修工不能为空', trigger: 'blur' },
|
||||||
]">
|
]">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="form.repairman"
|
v-model="form.repairman"
|
||||||
@ -262,7 +262,7 @@
|
|||||||
prop="repairMode"
|
prop="repairMode"
|
||||||
:rules="[
|
:rules="[
|
||||||
{
|
{
|
||||||
required: true,
|
required: false,
|
||||||
message: '维修方式不能为空',
|
message: '维修方式不能为空',
|
||||||
trigger: 'blur',
|
trigger: 'blur',
|
||||||
},
|
},
|
||||||
|
@ -83,33 +83,41 @@ export default {
|
|||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
tableProps: [
|
tableProps: [
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称', minWidth: 100, showOverflowtooltip: true },
|
||||||
{ prop: 'equipmentCode', label: '设备编码' },
|
{ prop: 'equipmentCode', label: '设备编码', minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'inQuantity', label: '投入数' },
|
{ prop: 'inQuantity', label: '投入数', minWidth: 80, showOverflowtooltip: true },
|
||||||
{ prop: 'outQuantity', label: '产出数' },
|
{ prop: 'outQuantity', label: '产出数', minWidth: 80, showOverflowtooltip: true },
|
||||||
{
|
{
|
||||||
prop: 'run',
|
prop: 'run',
|
||||||
label: '是否运行',
|
label: '是否运行',
|
||||||
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
||||||
|
minWidth: 100,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'status',
|
prop: 'status',
|
||||||
label: '状态',
|
label: '状态',
|
||||||
filter: (val) =>
|
filter: (val) =>
|
||||||
val != null ? ['正常', '计划停机', '故障'][val] : '',
|
val != null ? ['正常', '计划停机', '故障'][val] : '',
|
||||||
|
minWidth: 90,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'error',
|
prop: 'error',
|
||||||
label: '是否故障',
|
label: '是否故障',
|
||||||
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
filter: (val) => (val != null ? (val ? '是' : '否') : ''),
|
||||||
|
minWidth: 100,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'quantityRecordTime',
|
prop: 'quantityRecordTime',
|
||||||
label: '生产量记录时间',
|
label: '生产量记录时间',
|
||||||
filter: parseTime,
|
filter: parseTime,
|
||||||
|
minWidth: 150,
|
||||||
|
showOverflowtooltip: true
|
||||||
},
|
},
|
||||||
{ prop: 'statusRecordTime', label: '状态记录时间', filter: parseTime },
|
{ prop: 'statusRecordTime', label: '状态记录时间', filter: parseTime, minWidth: 150, showOverflowtooltip: true },
|
||||||
{ prop: 'opt1', label: '状态可视化', name: '查看', subcomponent: btn },
|
// { prop: 'opt1', label: '状态可视化', name: '查看', subcomponent: btn },
|
||||||
{ prop: 'opt2', label: '参数监控', name: '查看', subcomponent: btn },
|
{ prop: 'opt2', label: '参数监控', name: '查看', subcomponent: btn },
|
||||||
],
|
],
|
||||||
searchBarForm: {
|
searchBarForm: {
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
">
|
">
|
||||||
<div class="blue-title">生产节拍时序图</div>
|
<!-- <div class="blue-title">生产节拍时序图</div> -->
|
||||||
<!-- <h1>设备状态时序图</h1> -->
|
<!-- <h1>设备状态时序图</h1> -->
|
||||||
<!-- 搜索工作栏 -->
|
<!-- 搜索工作栏 -->
|
||||||
<SearchBar
|
<SearchBar
|
||||||
@ -76,6 +76,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import LineChart from './components/lineChart.vue';
|
import LineChart from './components/lineChart.vue';
|
||||||
|
import moment from 'moment';
|
||||||
// import response from './response.json';
|
// import response from './response.json';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
@ -84,6 +85,7 @@ export default {
|
|||||||
props: {},
|
props: {},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
moment,
|
||||||
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
|
startTime: null, // new Date(2023, 8, 26, 0, 0, 0, 0).getTime(),
|
||||||
accumulators: new Map(),
|
accumulators: new Map(),
|
||||||
searchBarFormConfig: [
|
searchBarFormConfig: [
|
||||||
@ -94,6 +96,7 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
onchange: true,
|
onchange: true,
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -101,11 +104,12 @@ export default {
|
|||||||
placeholder: '请选择工段',
|
placeholder: '请选择工段',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'sectionId',
|
param: 'sectionId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
// 时间段
|
// 时间段
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间段',
|
label: '日期',
|
||||||
dateType: 'date', // datetimerange
|
dateType: 'date', // datetimerange
|
||||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
@ -263,7 +267,11 @@ export default {
|
|||||||
this.initProductline();
|
this.initProductline();
|
||||||
this.initWorksection();
|
this.initWorksection();
|
||||||
this.initEquipment();
|
this.initEquipment();
|
||||||
// this.getList();
|
let end = moment().format('YYYY-MM-DD 23:59:59')
|
||||||
|
let start = moment().format('YYYY-MM-DD 00:00:00')
|
||||||
|
this.searchBarFormConfig[2].defaultSelect = start
|
||||||
|
this.queryParams.recordTime = [start, end]
|
||||||
|
this.getList();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
handleSearchBarBtnClick({ btnName, ...payload }) {
|
handleSearchBarBtnClick({ btnName, ...payload }) {
|
||||||
@ -293,8 +301,10 @@ export default {
|
|||||||
},
|
},
|
||||||
|
|
||||||
handleSearchBarChanged({ param, value }) {
|
handleSearchBarChanged({ param, value }) {
|
||||||
|
this.searchBarFormConfig[1].defaultSelect = null
|
||||||
if (!value) {
|
if (!value) {
|
||||||
this.searchBarFormConfig[1].selectOptions = [];
|
this.searchBarFormConfig[1].selectOptions = [];
|
||||||
|
// this.searchBarFormConfig[1].defaultSelect = null
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
switch (param) {
|
switch (param) {
|
||||||
@ -486,7 +496,10 @@ export default {
|
|||||||
const { code, data } = await this.$axios({
|
const { code, data } = await this.$axios({
|
||||||
url: '/monitoring/equipment-monitor/quantity-series',
|
url: '/monitoring/equipment-monitor/quantity-series',
|
||||||
method: 'get',
|
method: 'get',
|
||||||
params: this.queryParams,
|
params: {
|
||||||
|
equipmentId: this.queryParams.equipmentId,
|
||||||
|
recordTime: this.queryParams.recordTime
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
this.queryParams.equipmentId = null; // 清空一下
|
this.queryParams.equipmentId = null; // 清空一下
|
||||||
|
@ -17,7 +17,7 @@
|
|||||||
padding: 16px 16px 0;
|
padding: 16px 16px 0;
|
||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
">
|
">
|
||||||
<div class="blue-title">生产节拍时序图</div>
|
<!-- <div class="blue-title">生产节拍时序图</div> -->
|
||||||
<SearchBar
|
<SearchBar
|
||||||
:formConfigs="searchBarFormConfig"
|
:formConfigs="searchBarFormConfig"
|
||||||
ref="search-bar"
|
ref="search-bar"
|
||||||
@ -119,6 +119,7 @@ export default {
|
|||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineId',
|
param: 'lineId',
|
||||||
onchange: true,
|
onchange: true,
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
@ -126,6 +127,7 @@ export default {
|
|||||||
placeholder: '请选择工段',
|
placeholder: '请选择工段',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'sectionId',
|
param: 'sectionId',
|
||||||
|
filterable: true
|
||||||
},
|
},
|
||||||
// 时间段
|
// 时间段
|
||||||
{
|
{
|
||||||
|
@ -272,7 +272,7 @@ export default {
|
|||||||
{ prop: 'lineName', label: '产线' },
|
{ prop: 'lineName', label: '产线' },
|
||||||
{ prop: 'sectionName', label: '工段' },
|
{ prop: 'sectionName', label: '工段' },
|
||||||
// { prop: 'externalCode', label: '设备编码' },
|
// { prop: 'externalCode', label: '设备编码' },
|
||||||
{ prop: 'equipmentId', label: '设备编码' },
|
{ prop: 'equipmentCode', label: '设备编码' },
|
||||||
{ prop: 'equipmentName', label: '设备名称' },
|
{ prop: 'equipmentName', label: '设备名称' },
|
||||||
{ prop: 'totalQuantity', label: '加工数量' },
|
{ prop: 'totalQuantity', label: '加工数量' },
|
||||||
],
|
],
|
||||||
|
Loading…
Reference in New Issue
Block a user