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

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 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: '/cs3', component: () => import('@/views/cs/index3.vue')},
{path: '/cs5', component: () => import('@/views/cs/index5.vue')}, {path: '/cs5', component: () => import('@/views/cs/index5.vue')},
{path: '/cs6', component: () => import('@/views/cs/index4.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: '/cs3_1', component: () => import('@/views/cs/index3_1.vue')},
{ {
path: '/redirect', path: '/redirect',

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

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

@ -1,7 +1,11 @@
<template> <template>
<div id="rose-chart"> <!-- <div id="rose-chart">-->
<div class="rose-chart-title">设备故障原因分布</div> <!-- <div class="rose-chart-title">设备故障原因分布</div>-->
<dv-charts :option="option" /> <!-- <dv-charts :option="option" />-->
<!-- </div>-->
<div id="ranking-board">
<div class="ranking-board-title">设备故障原因分布 TOP10</div>
<dv-scroll-ranking-board :config="config" />
</div> </div>
</template> </template>
@ -12,31 +16,35 @@ export default {
name: 'RoseChart', name: 'RoseChart',
data () { data () {
return { return {
option: { config: {
series: [ data: [],
{ rowNum: 10
type: 'pie', }
radius: '50%', // option: {
roseSort: false, // series: [
data: [], // {
insideLabel: { // type: 'pie',
show: false // radius: '50%',
}, // roseSort: false,
outsideLabel: { // data: [],
formatter: '{name} {percent}%', // insideLabel: {
labelLineEndLength: 20, // show: false
style: { // },
fill: '#fff' // outsideLabel: {
}, // formatter: '{name} {percent}%',
labelLineStyle: { // labelLineEndLength: 20,
stroke: '#fff' // style: {
} // fill: '#fff'
}, // },
roseType: true // labelLineStyle: {
} // stroke: '#fff'
], // }
color: ['#da2f00', '#fa3600', '#ff4411', '#ff724c', '#541200', '#801b00', '#a02200', '#5d1400', '#b72700'] // },
} // roseType: true
// }
// ],
// color: ['#da2f00', '#fa3600', '#ff4411', '#ff724c', '#541200', '#801b00', '#a02200', '#5d1400', '#b72700']
// }
} }
}, },
methods: { methods: {
@ -49,29 +57,32 @@ export default {
// 1 // 1
const processedData = response.data.map(item => ({ const processedData = response.data.map(item => ({
name: item.name || '未知故障', // name: item.name || '未知故障', //
value: Number(item.value) || 0 // value: Number(item.count_num) || 0 //
})); }));
this.config = {
// 2 ...this.config, //
this.option = { data: processedData //
...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
}]
}; };
// 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 // 3使 ECharts
// this.myChart.setOption(this.option, true); // this.myChart.setOption(this.option, true);
@ -114,4 +125,27 @@ export default {
height: calc(~"100% - 50px"); 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> </style>

@ -10,7 +10,7 @@
</template> </template>
<script> <script>
import { getRepairWorkOrder } from "@/api/kanban/equipment"; import { getRepairWorkOrderCostTime } from "@/api/kanban/equipment";
import moment from "moment"; import moment from "moment";
export default { export default {
@ -19,10 +19,10 @@ export default {
return { return {
loading: false, // loading: false, //
config: { config: {
header: ['序号', '设备', '故障信息', '计划维修时间'], // header: ['序号', '产线' , '设备', '故障信息','花费时间'], //
data: [], data: [],
index: false, // 使 index: false, // 使
columnWidth: [50, 120, 200, 200], // columnWidth: [50, 120,120, 300,120], //
align: ['center'], align: ['center'],
rowNum: 7, rowNum: 7,
headerBGC: '#1981f6', headerBGC: '#1981f6',
@ -36,7 +36,7 @@ export default {
async getdatalist() { async getdatalist() {
try { try {
this.loading = true; this.loading = true;
const response = await getRepairWorkOrder({ const response = await getRepairWorkOrderCostTime({
poolName: "ds_1000" poolName: "ds_1000"
}); });
@ -44,16 +44,13 @@ export default {
// //
const processedData = response.data.map((item, index) => { const processedData = response.data.map((item, index) => {
// //
const deviceName = item.equipmentName || '未知设备'; const lineName = item.lineName || '未知设备';
const faultInfo = item.workFaultDesc || '无故障描述'; 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>
<el-form-item label="设备类型" prop="attr1"> <el-form-item label="设备类型" prop="dictValues">
<el-select v-model="form.dictValues" multiple filterable placeholder="请选择设备类型"> <el-select v-model="form.dictValues" multiple filterable placeholder="请选择设备类型">
<el-option <el-option
v-for="dict in dict.type.equ_type" v-for="dict in dict.type.equ_type"
:key="dict.value" :key="dict.value"
@ -474,6 +474,7 @@ export default {
createTime: null, createTime: null,
updateBy: null, updateBy: null,
updateTime: null, updateTime: null,
dictValues: [],
}; };
this.resetForm("form"); this.resetForm("form");
}, },
@ -507,7 +508,8 @@ export default {
this.reset(); this.reset();
const faultId = row.faultId || this.ids; const faultId = row.faultId || this.ids;
getFaultDescription(faultId).then((response) => { getFaultDescription(faultId).then((response) => {
this.form = response.data; this.form = response.info;
this.form.dictValues = response.dictValues;
this.open = true; this.open = true;
this.title = "修改故障描述维护"; this.title = "修改故障描述维护";
}); });

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

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