修改设备综合管理数据界面

Signed-off-by: Yangwl <1726150332@qq.com>
master
Yangwl 5 months ago
parent 38ba7fd896
commit a2d75e4084

@ -92,3 +92,11 @@ export function getWave(data) {
params: data
});
}
// 获取滚动图
export function getRepairWorkOrderCostTime(data) {
return request({
url: '/device/deviceInterface/getRepairWorkOrderCostTime',
method: 'get',
params: data,
});
}

@ -35,6 +35,7 @@ export const constantRoutes = [
{path: '/cs3', component: () => import('@/views/cs/index3.vue')},
{path: '/cs5', component: () => import('@/views/cs/index5.vue')},
{path: '/cs6', component: () => import('@/views/cs/index4.vue')},
{path: '/cs7', component: () => import('@/views/cs/index7.vue')},
{path: '/cs3_1', component: () => import('@/views/cs/index3_1.vue')},
{
path: '/redirect',

@ -8,18 +8,15 @@
<div class="block-left-right-content">
<ranking-board />
<rose-chart />
<water-level-chart />
<scroll-board />
<!-- <div class="block-top-bottom-content">-->
<!-- <div class="block-top-content">-->
<div class="block-top-bottom-content">
<div class="block-top-content">
<rose-chart />
<!-- </div>-->
<water-level-chart />
<scroll-board />
</div>
</div>
<!-- </div>-->
</div>
</div>
</dv-full-screen-container>
@ -80,21 +77,21 @@ export default {
margin-top: 20px;
}
.block-top-bottom-content {
flex: 1;
display: flex;
flex-direction: column;
box-sizing: border-box;
padding-left: 20px;
width:80%;
}
.block-top-content {
height: 100%;
display: flex;
flex-grow: 0;
box-sizing: border-box;
padding-bottom: 20px;
}
//.block-top-bottom-content {
// flex: 1;
// display: flex;
// flex-direction: column;
// box-sizing: border-box;
// padding-left: 20px;
// width:80%;
//}
//
//.block-top-content {
// height: 100%;
// display: flex;
// flex-grow: 0;
// box-sizing: border-box;
// padding-bottom: 20px;
//}
}
</style>

@ -1,6 +1,6 @@
<template>
<div id="ranking-board">
<div class="ranking-board-title">巡检上报问题数量 TOP8</div>
<div class="ranking-board-title">巡检上报问题数量 TOP10</div>
<dv-scroll-ranking-board :config="config" />
</div>
</template>
@ -15,7 +15,7 @@ export default {
return {
config: {
data: [],
rowNum: 9
rowNum: 10
}
}
},

@ -1,7 +1,11 @@
<template>
<div id="rose-chart">
<div class="rose-chart-title">设备故障原因分布</div>
<dv-charts :option="option" />
<!-- <div id="rose-chart">-->
<!-- <div class="rose-chart-title">设备故障原因分布</div>-->
<!-- <dv-charts :option="option" />-->
<!-- </div>-->
<div id="ranking-board">
<div class="ranking-board-title">设备故障原因分布 TOP10</div>
<dv-scroll-ranking-board :config="config" />
</div>
</template>
@ -12,31 +16,35 @@ export default {
name: 'RoseChart',
data () {
return {
option: {
series: [
{
type: 'pie',
radius: '50%',
roseSort: false,
data: [],
insideLabel: {
show: false
},
outsideLabel: {
formatter: '{name} {percent}%',
labelLineEndLength: 20,
style: {
fill: '#fff'
},
labelLineStyle: {
stroke: '#fff'
}
},
roseType: true
}
],
color: ['#da2f00', '#fa3600', '#ff4411', '#ff724c', '#541200', '#801b00', '#a02200', '#5d1400', '#b72700']
}
config: {
data: [],
rowNum: 10
}
// option: {
// series: [
// {
// type: 'pie',
// radius: '50%',
// roseSort: false,
// data: [],
// insideLabel: {
// show: false
// },
// outsideLabel: {
// formatter: '{name} {percent}%',
// labelLineEndLength: 20,
// style: {
// fill: '#fff'
// },
// labelLineStyle: {
// stroke: '#fff'
// }
// },
// roseType: true
// }
// ],
// color: ['#da2f00', '#fa3600', '#ff4411', '#ff724c', '#541200', '#801b00', '#a02200', '#5d1400', '#b72700']
// }
}
},
methods: {
@ -49,29 +57,32 @@ export default {
// 1
const processedData = response.data.map(item => ({
name: item.name || '未知故障', //
value: Number(item.value) || 0 //
value: Number(item.count_num) || 0 //
}));
// 2
this.option = {
...this.option, //
series: [{
...this.option.series, //
data: processedData, //
//
type: 'pie',
radius: '50%',
roseSort: false,
insideLabel: { show: false },
outsideLabel: {
formatter: '{name} {percent}%',
labelLineEndLength: 20,
style: { fill: '#fff' },
labelLineStyle: { stroke: '#fff' }
},
roseType: true
}]
this.config = {
...this.config, //
data: processedData //
};
// 2
// this.option = {
// ...this.option, //
// series: [{
// ...this.option.series, //
// data: processedData, //
// //
// type: 'pie',
// radius: '50%',
// roseSort: false,
// insideLabel: { show: false },
// outsideLabel: {
// formatter: '{name} {percent}%',
// labelLineEndLength: 20,
// style: { fill: '#fff' },
// labelLineStyle: { stroke: '#fff' }
// },
// roseType: true
// }]
// };
// 3使 ECharts
// this.myChart.setOption(this.option, true);
@ -114,4 +125,27 @@ export default {
height: calc(~"100% - 50px");
}
}
#ranking-board {
width: 20%;
box-shadow: 0 0 3px blue;
display: flex;
flex-direction: column;
background-color: rgba(6, 30, 93, 0.5);
border-top: 2px solid rgba(1, 153, 209, .5);
box-sizing: border-box;
padding: 0px 30px;
margin-left: 20px;
.ranking-board-title {
font-weight: bold;
height: 50px;
display: flex;
align-items: center;
font-size: 20px;
}
.dv-scroll-ranking-board {
flex: 1;
}
}
</style>

@ -10,7 +10,7 @@
</template>
<script>
import { getRepairWorkOrder } from "@/api/kanban/equipment";
import { getRepairWorkOrderCostTime } from "@/api/kanban/equipment";
import moment from "moment";
export default {
@ -19,10 +19,10 @@ export default {
return {
loading: false, //
config: {
header: ['序号', '设备', '故障信息', '计划维修时间'], //
header: ['序号', '产线' , '设备', '故障信息','花费时间'], //
data: [],
index: false, // 使
columnWidth: [50, 120, 200, 200], //
columnWidth: [50, 120,120, 300,120], //
align: ['center'],
rowNum: 7,
headerBGC: '#1981f6',
@ -36,7 +36,7 @@ export default {
async getdatalist() {
try {
this.loading = true;
const response = await getRepairWorkOrder({
const response = await getRepairWorkOrderCostTime({
poolName: "ds_1000"
});
@ -44,16 +44,13 @@ export default {
//
const processedData = response.data.map((item, index) => {
//
const deviceName = item.equipmentName || '未知设备';
const faultInfo = item.workFaultDesc || '无故障描述';
const lineName = item.lineName || '未知设备';
const equipmentName = item.equipment_name || '未知设备';
const faultInfo = item.work_fault_desc || '无故障描述';
const costTime = item.work_cost_time
//
const repairTime = item.workPlanTime ?
moment(item.workPlanTime).format("YYYY-MM-DD HH:mm:ss") :
'--';
//
return [`${index + 1}`, deviceName, faultInfo, repairTime];
return [`${index + 1}`, lineName, equipmentName, faultInfo,costTime];
});
//

@ -301,8 +301,8 @@
/>
</el-form-item>
<el-form-item label="设备类型" prop="attr1">
<el-select v-model="form.dictValues" multiple filterable placeholder="请选择设备类型">
<el-form-item label="设备类型" prop="dictValues">
<el-select v-model="form.dictValues" multiple filterable placeholder="请选择设备类型">
<el-option
v-for="dict in dict.type.equ_type"
:key="dict.value"
@ -474,6 +474,7 @@ export default {
createTime: null,
updateBy: null,
updateTime: null,
dictValues: [],
};
this.resetForm("form");
},
@ -507,7 +508,8 @@ export default {
this.reset();
const faultId = row.faultId || this.ids;
getFaultDescription(faultId).then((response) => {
this.form = response.data;
this.form = response.info;
this.form.dictValues = response.dictValues;
this.open = true;
this.title = "修改故障描述维护";
});

@ -249,7 +249,7 @@
</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%" >
<span v-if="workOrder" >{{ workOrder.equCode }}/{{ workOrder.equName }}</span>
<span v-if="workOrder" >{{ workOrder.equCode }}/{{ workOrder.equName }}</span>
</td>
</tr>
<tr style="height: 36px">
@ -264,7 +264,7 @@
</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">
<span v-if="workOrder" >{{ workOrder.productCode }}</span>
<span v-if="workOrder" >{{ workOrder.productCode }}</span>
</td>
</tr>
<tr style="height: 36px">
@ -279,7 +279,7 @@
</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">
<span v-if="workOrder" >{{ workOrder.productName }}</span>
<span v-if="workOrder" >{{ workOrder.productName }}</span>
</td>
</tr>
<tr style="height: 36px">
@ -294,7 +294,7 @@
</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">
<span v-if="workOrder" >{{ workOrder.workorderCodeSap }}</span>
<span v-if="workOrder" >{{ workOrder.workorderCodeSap }}</span>
</td>
</tr>
<tr style="height: 36px">
@ -309,7 +309,7 @@
</td>
<!-- <td style="width: 8%;">{{ n.orderNo }}</td> -->
<td style="width: 8%">
<span v-if="workOrder" >{{ workOrder.totalNum }}/{{ workOrder.unit }}</span>
<span v-if="workOrder" >{{ workOrder.totalNum }}/{{ workOrder.unit }}</span>
</td>
</tr>
</tbody>
@ -473,22 +473,36 @@ export default {
planProduction: [],
//
actProduction: [],
currentIndex: 0,
timer: null
};
},
created() {},
destroyed() {
clearInterval(this.time1);
clearInterval(this.timer)
this.time1 = null;
this.time = null;
},
mounted() {
// this.datetime = moment().subtract(2, "day").format("yyyy-MM-DD");
//console.log('zhuanhuahou',this.dateRangeone)
// this.getdatalist(this.selectxt)
this.selectfactoryCodelist();
this.gettime();
this.startRotation()
},
methods: {
startRotation() {
this.timer = setInterval(() => {
console.log(123456)
if(this.dictDatatype?.length > 0) {
this.currentIndex = (this.currentIndex + 1) % this.dictDatatype.length
this.selectxtclasses = this.dictDatatype[this.currentIndex].equCode
this.selectline2(this.selectxtclasses) // change
}
}, 3000)
},
back() {
this.$router.push({ path: "/index" });
},

@ -30,10 +30,10 @@
icon="el-icon-search"
size="mini"
@click="handleQuery"
>搜索</el-button
>搜索</el-button
>
<el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
>重置</el-button
>重置</el-button
>
</el-form-item>
</el-form>
@ -47,7 +47,7 @@
size="mini"
@click="handleAdd"
v-hasPermi="['wms:team:add']"
>新增</el-button
>新增</el-button
>
</el-col>
<el-col :span="1.5">
@ -59,7 +59,7 @@
:disabled="single"
@click="handleUpdate"
v-hasPermi="['wms:team:edit']"
>修改</el-button
>修改</el-button
>
</el-col>
<el-col :span="1.5">
@ -71,7 +71,7 @@
:disabled="multiple"
@click="handleDelete"
v-hasPermi="['wms:team:remove']"
>删除</el-button
>删除</el-button
>
</el-col>
<el-col :span="1.5">
@ -82,7 +82,7 @@
size="mini"
@click="handleExport"
v-hasPermi="['wms:team:export']"
>导出</el-button
>导出</el-button
>
</el-col>
<right-toolbar
@ -153,7 +153,7 @@
icon="el-icon-edit"
@click="handleUpdate(scope.row)"
v-hasPermi="['wms:team:edit']"
>修改</el-button
>修改</el-button
>
<el-button
size="mini"
@ -161,7 +161,7 @@
icon="el-icon-delete"
@click="handleDelete(scope.row)"
v-hasPermi="['wms:team:remove']"
>删除</el-button
>删除</el-button
>
</template>
</el-table-column>
@ -356,6 +356,15 @@
v-model="rightList"
style="text-align: left"
>
<template #left-footer>
<el-pagination
small
:current-page="teamQueryParams.pageNum"
:page-size="teamQueryParams.pageSize"
:total="teamQueryParams.total"
@current-change="handlePageChange"
/>
</template>
</el-transfer>
</template>
</div>
@ -437,6 +446,7 @@ export default {
teamQueryParams: {
pageNum: 1,
pageSize: 10,
total:0
},
options: [
{
@ -467,7 +477,6 @@ export default {
created() {
this.getList();
this.getTeamMembers();
},
methods: {
@ -476,25 +485,26 @@ export default {
return index + 1;
},
getTeamMembers() {
//
this.teamQueryParams.pageNum = 1;
this.teamQueryParams.pageSize = 10000;
// this.loading = true;
//
this.leftList = [];
listTeamMembers(this.teamQueryParams).then((response) => {
for (let i in response.rows) {
// 穿
response.rows.forEach((item) => {
this.leftList.push({
key: response.rows[i].userId,
label: response.rows[i].teamUserName,
key: item.userId,
label: item.teamUserName,
});
}
// for (let i in response.selected) {
// this.rightList.push(response.selected[i].key);
// this.form.rightData = this.rightList;
// }
this.loading = false;
});
this.teamQueryParams.total = response.total;
// this.loading = false;
});
},
/** 分页切换 */
//
handlePageChange(newPage) {
this.teamQueryParams.pageNum = newPage;
this.getTeamMembers(); //
},
/** 查询班组列表 */
getList() {
this.loading = true;
@ -570,18 +580,33 @@ export default {
/** 修改按钮操作 */
handleUpdate(row) {
this.open = true;
this.title = "修改班组";
this.rightList = [];
this.reset();
const teamId = row.teamId || this.ids;
//
this.teamQueryParams.pageNum = 1;
getTeam(teamId).then((response) => {
this.form = response.data;
for (let i in response.data.selectedData) {
// 穿
this.rightList.push(response.data.selectedData[i].userId);
}
});
this.title = "修改班组";
this.open = true;
this.rightList = response.data.selectedData.map(item => item.userId);
this.getTeamMembers(); //
})
// this.rightList = [];
// this.reset();
// this.getTeamMembers();
// const teamId = row.teamId || this.ids;
// getTeam(teamId).then((response) => {
// this.form = response.data;
// console.log(response.data.selectedData)
// for (let i in response.data.selectedData) {
// // 穿
// this.rightList.push(response.data.selectedData[i].userId);
// }
// });
// this.teamQueryParams.total=response.total
// this.title = "";
// this.open = true;
},
/** 提交按钮 */

Loading…
Cancel
Save