Compare commits

..

No commits in common. "75970472200ccac40c586f602253fb2eb73ff512" and "d70887fef0dfb30f7af94975c3ae98bbb6bcfe12" have entirely different histories.

17 changed files with 210 additions and 252 deletions

View File

@ -1,7 +1,7 @@
### ###
# @Author: Do not edit # @Author: Do not edit
# @Date: 2023-08-29 09:40:39 # @Date: 2023-08-29 09:40:39
# @LastEditTime: 2024-03-21 14:45:52 # @LastEditTime: 2024-03-13 14:57:16
# @LastEditors: zhp # @LastEditors: zhp
# @Description: # @Description:
### ###
@ -25,7 +25,7 @@ VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.1.78: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地址 # socket地址
VUE_APP_Socket_API = 'ws://192.168.0.33:48082' VUE_APP_Socket_API = 'ws://192.168.0.30:8888'
VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081' VUE_APP_Socket_Dcs_API = 'ws://10.70.180.10:8081'
# 积木报表指向地址 # 积木报表指向地址

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-21 16:07:39 * @LastEditTime: 2024-03-12 09:34:06
* @Description: * @Description:
--> -->
<template> <template>
@ -633,7 +633,7 @@ export default {
this.eqConfig.data = eqArr this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr) this.$refs['eqScrollBoard'].updateRows(eqArr)
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321]) this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
// this.getList() this.getList()
this.initWebSocket() this.initWebSocket()
this.SJGInitWebSocket() this.SJGInitWebSocket()
this.getTimes() this.getTimes()
@ -671,21 +671,36 @@ export default {
// removeEventListener('resize', resizeFun) // removeEventListener('resize', resizeFun)
// }, // },
methods: { methods: {
// getList() { getList() {
// // this.$axios.get( this.$axios.get(
// // 'base/core-production-line/listAll', 'base/core-production-line/listAll',
// // 'get', 'get',
// // this.queryParams this.queryParams
// // ).then((res) => { ).then((res) => {
// // // console.log('11111', res); // console.log('11111', res);
// // this.productLineList = res.data this.productLineList = res.data
// // }) })
// this.$axios.get( this.$axios.get(
// 'base/quality-inspection-record/dayStatistics', 'base/quality-inspection-record/dayStatistics',
// 'get', 'get',
// ).then((res) => { ).then((res) => {
// // console.log('11111', res); // console.log('11111', res);
// let processArr = qualityMonthList.map((item, index) => [ let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
// if (res.data.length !==0) {
// let processArr = res.data.map((item, index) => [
// // console.log(item) // // console.log(item)
// `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''} // `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// </span>`, // </span>`,
@ -699,24 +714,9 @@ export default {
// ]) // ])
// this.processConfig.data = processArr // this.processConfig.data = processArr
// this.$refs['processScrollBoard'].updateRows(processArr) // this.$refs['processScrollBoard'].updateRows(processArr)
// // if (res.data.length !==0) { // }
// // let processArr = res.data.map((item, index) => [ })
// // // console.log(item) },
// // `<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
// // </span>`,
// // // formatDate(item.planStartTime) || '',
// // `
// // <span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
// // </span>`,
// // `<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
// // `<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
// // `<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
// // ])
// // this.processConfig.data = processArr
// // this.$refs['processScrollBoard'].updateRows(processArr)
// // }
// })
// },
getTimes() { getTimes() {
setInterval(this.getTimesInterval, 1000); setInterval(this.getTimesInterval, 1000);
}, },
@ -837,25 +837,24 @@ export default {
this.$refs['eqScrollBoard'].updateRows(eqArr) this.$refs['eqScrollBoard'].updateRows(eqArr)
// console.log(SJGWsData.orderList) // console.log(SJGWsData.orderList)
} else if (this.SJGWsData.type === 'productline') { } else if (this.SJGWsData.type === 'productline') {
console.log('aaaaaaaaaaaaaaaaaaa', this.SJGWsData);
// console.log(this.wsData.detData); // console.log(this.wsData.detData);
let nameList = [] let nameList = []
let passRateList = [] let passRateList = []
let outputNumList = [] let outputNumList = []
// console.log('2222222222', this.productLineList); // console.log('2222222222', this.productLineList);
// this.productLineList.forEach((item) => { this.productLineList.forEach((item) => {
this.SJGWsData.detData.forEach((ele) => { this.SJGWsData.detData.forEach((ele) => {
// if (item.id == ele.productionLineId) { if (item.id == ele.productionLineId) {
// if (item.name.substr(0, 1) == "D") { if (item.name.substr(0, 1) == "D") {
// console.log(ele) console.log(ele)
nameList.push(ele.lineName) nameList.push(item.name)
outputNumList.push(ele.outputNum) outputNumList.push(ele.outputNum)
passRateList.push(ele.passRate) passRateList.push(ele.passRate)
// } }
// } }
})
}) })
// })
// progressRateList = EnergyNameList // progressRateList = EnergyNameList
// let EnergyDataList = [] // let EnergyDataList = []
// this.SJGWsData.detData.forEach((ele) => { // this.SJGWsData.detData.forEach((ele) => {
@ -865,22 +864,7 @@ export default {
// console.log(this.EnergyMonitoringNameList) // console.log(this.EnergyMonitoringNameList)
// console.log(this.EnergyMonitoringList) // console.log(this.EnergyMonitoringList)
// this.$nextTick(() => { // this.$nextTick(() => {
this.$refs.productLineChart.initChart(nameList, passRateList, outputNumList) this.$refs.productLineChart.initChart(Array.from(new Set(nameList)), passRateList, outputNumList)
} else if (this.SJGInitWebSocket === 'inspection') {
let processArr = qualityMonthList.map((item, index) => [
// console.log(item)
`<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
</span>`,
// formatDate(item.planStartTime) || '',
`
<span style="color:rgba(255,255,255,0.5)" >${item.productionLineName || ''}
</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.sectionName || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.count || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)">${item.inspectionTypeName || ''}</span>`,
])
this.processConfig.data = processArr
this.$refs['processScrollBoard'].updateRows(processArr)
} }
}, },
// //

View File

@ -30,7 +30,6 @@ import {
} from '@/api/cost/costEneryAutoReport'; } from '@/api/cost/costEneryAutoReport';
import { getEnergyTypeListAll } from '@/api/base/energyType'; import { getEnergyTypeListAll } from '@/api/base/energyType';
import { publicFormatter } from '@/utils/dict'; import { publicFormatter } from '@/utils/dict';
import moment from 'moment';
const tableProps = [ const tableProps = [
{ {
@ -136,23 +135,15 @@ export default {
this.listQuery.pageSize = 10; this.listQuery.pageSize = 10;
this.listQuery.energyTypeId = val.energyTypeId; this.listQuery.energyTypeId = val.energyTypeId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
? moment(val.searchTime[0]).startOf('day').format('x') this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
: null;
this.listQuery.endTime = val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null;
this.getDataList(); this.getDataList();
break; break;
case 'export': case 'export':
const data = { const data = {
energyTypeId:val.energyTypeId, energyTypeId:val.energyTypeId,
startTime : val.searchTime startTime : val.searchTime ? val.searchTime[0] : null,
? moment(val.searchTime[0]).startOf('day').format('x') endTime : val.searchTime ? val.searchTime[1] : null,
: null,
endTime : val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null,
} }
this.handleExport(data); this.handleExport(data);
break; break;

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 13:52:10 * @Date: 2023-08-01 13:52:10
* @LastEditors: zwq * @LastEditors: zwq
* @LastEditTime: 2024-03-21 15:59:26 * @LastEditTime: 2024-02-19 09:36:50
* @Description: * @Description:
--> -->
<template> <template>
@ -44,7 +44,7 @@
v-for="item in urlOptions.dictList.dict0" v-for="item in urlOptions.dictList.dict0"
:key="item.id" :key="item.id"
:label="item.label" :label="item.label"
:value="parseInt(item.value)"></el-option> :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>

View File

@ -152,12 +152,8 @@ export default {
case 'export': case 'export':
this.listQuery.materialId = val.materialId; this.listQuery.materialId = val.materialId;
this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null; this.listQuery.searchTime = val.searchTime ? val.searchTime[0] : null;
this.listQuery.startTime = val.searchTime this.listQuery.startTime = val.searchTime ? val.searchTime[0] : null;
? moment(val.searchTime[0]).startOf('day').format('x') this.listQuery.endTime = val.searchTime ? val.searchTime[1] : null;
: null;
this.listQuery.endTime = val.searchTime
? moment(val.searchTime[1]).endOf('day').format('x')
: null;
this.handleExport(); this.handleExport();
break; break;
default: default:

View File

@ -112,7 +112,7 @@ export default class GanttGraph {
// top: 12 + 128 * this.gridIndex, // top: 12 + 128 * this.gridIndex,
top: 12 + 104 * this.gridIndex, top: 12 + 104 * this.gridIndex,
right: 48, right: 48,
left: 183, left: 88,
height: 56 height: 56
} }
} }

View File

@ -119,7 +119,7 @@ export default {
selectOptions: [], selectOptions: [],
param: 'lineId', param: 'lineId',
onchange: true, onchange: true,
filterable: true, filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -127,7 +127,7 @@ export default {
placeholder: '请选择工段', placeholder: '请选择工段',
selectOptions: [], selectOptions: [],
param: 'sectionId', param: 'sectionId',
filterable: true, filterable: true
}, },
// //
{ {
@ -174,20 +174,20 @@ export default {
// demo: [ // demo: [
// [ // [
// { // {
// equipmentName: '线2线', // equipmentName: '',
// duration: 30, // duration: 30,
// relativeDuration: 0.6, // relativeDuration: 0.6,
// status: 0, // status: 0,
// startPos: 0, // startPos: 0,
// startTime: 1711073203686, // startTime: 1691568181000,
// }, // },
// { // {
// equipmentName: '线2线', // equipmentName: '',
// duration: 20, // duration: 20,
// relativeDuration: 0.4, // relativeDuration: 0.4,
// status: 2, // status: 2,
// startPos: 30, // startPos: 30,
// startTime: 1711072203686, // startTime: 1691569981000
// }, // },
// ], // ],
// ], // ],
@ -259,10 +259,6 @@ export default {
(eq) => eq[0].equipmentId (eq) => eq[0].equipmentId
); );
this.graphList = this.objectToArray(data); this.graphList = this.objectToArray(data);
// this.graphList = this.demo.map(item => {
// item.key = item[0].equipmentName;
// return item;
// });
} }
}, },

View File

@ -1,12 +1,12 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-12-08 13:46:17 * @Date: 2023-12-08 13:46:17
* @LastEditTime: 2024-03-21 10:40:52 * @LastEditTime: 2024-03-15 14:54:38
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="true" class="drawer" size="50%"> <el-drawer :visible.sync="visible" :show-close="true" :wrapper-closable="false" class="drawer" size="50%">
<small-title slot="title" :no-padding="true" @close="handleClose"> <small-title slot="title" :no-padding="true" @close="handleClose">
{{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }} {{ isdetail ? '详情' : !dataForm.id ? '新增' : '编辑' }}
</small-title> </small-title>
@ -114,7 +114,7 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="原料等级" prop="materialGrade"> <el-form-item label="原料等级" prop="materialGrade">
<el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择"> <el-select :disabled="isdetail" v-model="dataForm.materialGrade" placeholder="请选择" style="width: 100%;">
<el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value"> <el-option v-for="item in gradeList" :key="item.value" :label="item.label" :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
@ -122,13 +122,13 @@
</el-col> </el-col>
</el-row> </el-row>
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input @input="onInput" :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注"> <el-input :disabled="isdetail" v-model="dataForm.remark" placeholder="请填写备注" style="width: 100%;">
</el-input> </el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<!-- </div> --> <!-- </div> -->
<!-- <div class="attr-list" v-if="idAttrShow"> --> <div class="attr-list" v-if="idAttrShow">
<!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true"> <!-- <small-title style="margin: 16px 0; padding-left: 8px" :no-padding="true">
设备物料明细 设备物料明细
</small-title> </small-title>
@ -147,9 +147,9 @@
</base-table> </base-table>
<pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo" <pagination v-show="listQuery.total > 0" :total="listQuery.total" :page.sync="listQuery.pageNo"
:limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" /> --> :limit.sync="listQuery.pageSize" :page-sizes="[5, 10, 15]" @pagination="getList" /> -->
<!-- </div> -->
</div> </div>
<div v-if="!isdetail" class="drawer-body__footer"> </div>
<div class="drawer-body__footer">
<el-button style="" @click="goback()">取消</el-button> <el-button style="" @click="goback()">取消</el-button>
<el-button type="primary" @click="dataFormSubmit()">确定</el-button> <el-button type="primary" @click="dataFormSubmit()">确定</el-button>
</div> </div>
@ -237,7 +237,7 @@ export default {
checkValueList: [], checkValueList: [],
checkResult: '', checkResult: '',
materialGrade: undefined, materialGrade: undefined,
remark:undefined, remark:null,
}, },
productAttrList: [], productAttrList: [],
visible: false, visible: false,
@ -257,9 +257,6 @@ export default {
mounted() { mounted() {
}, },
methods: { methods: {
onInput() {
this.$forceUpdate();
},
judgeValue(val, minValue, maxValue, index) { judgeValue(val, minValue, maxValue, index) {
if (val >= minValue && val <= maxValue) { if (val >= minValue && val <= maxValue) {
console.log(val) console.log(val)
@ -271,7 +268,7 @@ export default {
} }
}, },
handleClose() { handleClose() {
this.ingredientList = [] this.ingredientList = undefined
console.log(222222222); console.log(222222222);
}, },
dataFormSubmit() { dataFormSubmit() {
@ -457,17 +454,17 @@ export default {
// }); // });
// }, // },
init(id, isdetail) { init(id, isdetail) {
// this.initData() this.initData()
this.getDict() this.getDict()
this.ingredientList = [] this.ingredientList = []
this.isdetail = isdetail || false; this.isdetail = isdetail || false;
this.dataForm.id = id || undefined; this.dataForm.id = id || undefined;
this.visible = true; this.visible = true;
// if (id) { if (id) {
// this.idAttrShow = true this.idAttrShow = true
// } else { } else {
// this.idAttrShow = false this.idAttrShow = false
// } }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs['dataForm'].resetFields(); this.$refs['dataForm'].resetFields();
@ -540,9 +537,9 @@ export default {
// //
// this.getList(); // this.getList();
} else { } else {
// if (this.urlOptions.isGetCode) { if (this.urlOptions.isGetCode) {
// this.getCode() this.getCode()
// } }
} }
}); });
}, },
@ -556,12 +553,12 @@ export default {
this.isdetail = false; this.isdetail = false;
}, },
// / // /
// addNew(id) { addNew(id) {
// this.addOrUpdateVisible = true; this.addOrUpdateVisible = true;
// this.$nextTick(() => { this.$nextTick(() => {
// this.$refs.addOrUpdate.init(id,this.dataForm.id); this.$refs.addOrUpdate.init(id,this.dataForm.id);
// }); });
// } }
} }
}; };
</script> </script>

View File

@ -118,7 +118,6 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'materialId', param: 'materialId',
filterable: true
}, },
{ {
type: 'datePicker', type: 'datePicker',

View File

@ -32,7 +32,7 @@
<!-- </span> --> <!-- </span> -->
<el-tabs style="margin-top: 10px;" v-model="activeName" type="card" @tab-click="handleClick"> <el-tabs style="margin-top: 10px;" v-model="activeName" type="card" @tab-click="handleClick">
<el-tab-pane label="天" name="day"> <el-tab-pane label="天" name="day">
<div id="mapDayMain" style="margin-bottom: 30px;height: 500px;width: 1000px;"></div> <div id="mapDayMain" style="height: 500px;width: 1000px;"></div>
<div id="listDayMain" style="height: 500px;width: 1000px;"></div> <div id="listDayMain" style="height: 500px;width: 1000px;"></div>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="周" name="week"> <el-tab-pane label="周" name="week">
@ -232,23 +232,18 @@ export default {
var option; var option;
option = { option = {
title: { title: {
text: '各类型缺陷对比图', text: '各类型缺陷对比图'
// top:'5px'
}, },
tooltip: { tooltip: {
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: mapLegendData, data: mapLegendData
top: "10%",
y: 'top',
x:'left'
}, },
grid: { grid: {
left: '3%', left: '3%',
right: '4%', right: '4%',
bottom: '3%', bottom: '3%',
top:'20%',
containLabel: true containLabel: true
}, },
// toolbox: { // toolbox: {
@ -304,7 +299,7 @@ export default {
trigger: 'axis' trigger: 'axis'
}, },
legend: { legend: {
data: ['缺陷数量', '缺陷率'], data: ['缺陷数量', '缺陷率']
}, },
grid: { grid: {
left: '3%', left: '3%',
@ -350,15 +345,15 @@ export default {
type: 'bar', type: 'bar',
barWidth: '3%', barWidth: '3%',
data: listNumArr, data: listNumArr,
// label: { label: {
// show: true, // show: true, //
// position: 'top', // position: 'top', //
// // formatter: '{c}%',// // formatter: '{c}%',//
// textStyle: { // textStyle: { //
// color: 'black',// color: 'black',//
// fontSize: 12// fontSize: 20//
// } }
// } }
}, },
{ {
name: '缺陷率', name: '缺陷率',
@ -469,7 +464,6 @@ export default {
this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined this.queryParams.endTime = val.checkTime ? val.checkTime[1] : undefined
this.getList() this.getList()
this.getData()
} }
console.log(val); console.log(val);
} }

View File

@ -101,7 +101,6 @@ export default {
label: '报废原因', label: '报废原因',
placeholder: '报废原因', placeholder: '报废原因',
param: 'content', param: 'content',
// filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -110,7 +109,6 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'typeId', param: 'typeId',
filterable: true
}, },
{ {
type: 'button', type: 'button',

View File

@ -107,7 +107,6 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'workOrderId', param: 'workOrderId',
filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -116,7 +115,6 @@ export default {
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
param: 'teamId', param: 'teamId',
filterable: true
}, },
{ {
type: 'button', type: 'button',

View File

@ -17,10 +17,10 @@
@mouseleave="factoryListOpen = false"> @mouseleave="factoryListOpen = false">
{{ currentFactory?.label || '点我选择设备' }} {{ currentFactory?.label || '点我选择设备' }}
<div class="factory-list__wrapper" :class="{ open: factoryListOpen }"> <div class="factory-list__wrapper" :class="{ open: factoryListOpen }">
<ul class="factory-list" v-if="sidebarContent.length" @click.capture="factoryChangeHandler"> <ul class="factory-list" v-if="sidebarContent.length" @click.prevent="factoryChangeHandler">
<li v-for="fc in sidebarContent" :key="fc.id" class="factory-list__item" <li v-for="fc in sidebarContent" :key="fc.id" :data-value="fc.id" class="factory-list__item"
:class="{ 'is-current': fc.id == currentFactory?.id }"> :class="{ 'is-current': fc.id == currentFactory?.id }">
<span :data-value="fc.id"> <span>
{{ fc.label }} {{ fc.label }}
</span> </span>
<svg-icon v-if="fc.id == currentFactory?.id" icon-class="Confirm" style="height: 14px; width: 14px" /> <svg-icon v-if="fc.id == currentFactory?.id" icon-class="Confirm" style="height: 14px; width: 14px" />
@ -95,12 +95,12 @@ export default {
factoryListOpen: false, factoryListOpen: false,
currentFactory: null, currentFactory: null,
factoryList: [ factoryList: [
// { name: '1', value: 1 }, { name: '1', value: 1 },
// { name: '2', value: 2 }, { name: '2', value: 2 },
// { name: '3', value: 3 }, { name: '3', value: 3 },
// { name: '4', value: 4 }, { name: '4', value: 4 },
// { name: '5', value: 5 }, { name: '5', value: 5 },
// { name: '6', value: 6 }, { name: '6', value: 6 },
], ],
sidebarContent: [ sidebarContent: [
// { // {
@ -486,12 +486,14 @@ export default {
}, },
async getTree(id) { async getTree(id) {
const res = await getTreeData({ id: id }) getTreeData({id:id}).then((res) => {
console.log(res.data) console.log(res.data);
this.buildTree(res.data);
this.sidebarContent = res.data; this.sidebarContent = res.data;
console.log('tree', this.sidebarContent) this.buildTree(res.data);
console.log(this.sidebarContent); console.log('tree', this.sidebarContent);
// console.log(this.formConfig[0].selectOptions);
// this.listQuery.total = response.data.total;
})
// const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder'); // const { data } = await this.$axios('/base/core-factory/getTreeByWorkOrder');
// console.log(data) // console.log(data)
@ -502,13 +504,10 @@ export default {
}, },
factoryChangeHandler(event) { factoryChangeHandler(event) {
this.currentFactory =undefined this.factoryListOpen = false;
this.factoryListOpen = false
console.log(event.target.dataset);
const fcId = event.target.dataset.value; const fcId = event.target.dataset.value;
this.handleSidebarItemClick({ id: fcId, type: '工厂' }); this.handleSidebarItemClick({ id: fcId, type: '工厂' });
this.currentFactory = this.sidebarContent.find((item) => item.id == fcId) this.currentFactory = this.sidebarContent.find((item) => item.id == fcId);
console.log(this.currentFactory);
}, },
handleSidebarItemClick({ label, id, type }) { handleSidebarItemClick({ label, id, type }) {

View File

@ -8,18 +8,35 @@
<template> <template>
<div class="app-container allow-overflow"> <div class="app-container allow-overflow">
<!-- 搜索工作栏 --> <!-- 搜索工作栏 -->
<SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> <SearchBar
:formConfigs="searchBarFormConfig"
ref="search-bar"
@headBtnClick="handleSearchBarBtnClick" />
<el-row> <el-row>
<el-col class="custom-tabs"> <el-col class="custom-tabs">
<el-tabs v-model="activeName" :stretch="true" @tab-click="handleTabClick"> <el-tabs
v-model="activeName"
:stretch="true"
@tab-click="handleTabClick">
<el-tab-pane :label="'\u2002数据列表\u2002'" name="table"> <el-tab-pane :label="'\u2002数据列表\u2002'" name="table">
<!-- 列表 --> <!-- 列表 -->
<base-table class="base-table__margin" :table-props="tableProps" :page="1" :limit="10" :max-height="tableH" <base-table
:table-data="list" @emitFun="handleEmitFun"></base-table> class="base-table__margin"
:table-props="tableProps"
:page="1"
:limit="10"
:table-data="list"
@emitFun="handleEmitFun"></base-table>
</el-tab-pane> </el-tab-pane>
<el-tab-pane :label="'\u3000可视化\u3000'" name="graph" style="overflow: inherit"> <el-tab-pane
<div v-if="activeName == 'graph'" class="graph" style=" :label="'\u3000可视化\u3000'"
name="graph"
style="overflow: inherit">
<div
v-if="activeName == 'graph'"
class="graph"
style="
overflow: inherit; overflow: inherit;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
@ -46,11 +63,17 @@
</div> </div>
<div class="graph-grid"> <div class="graph-grid">
<div class="bg-grid grid-line"> <div class="bg-grid grid-line">
<div class="grid-item" v-for="item in list.length" :key="item"></div> <div
class="grid-item"
v-for="item in list.length"
:key="item"></div>
</div> </div>
<div class="bg-grid grid-charts"> <div class="bg-grid grid-charts">
<pie-chart v-for="item in list" :key="item.id" :value="item" /> <pie-chart
v-for="item in list"
:key="item.id"
:value="item" />
<!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> --> <!-- <pie-chart v-for="item in 5" :key="item" :value="item" /> -->
</div> </div>
</div> </div>
@ -94,7 +117,6 @@ export default {
// } // }
// : undefined, // : undefined,
// ].filter((v) => v), // ].filter((v) => v),
tableH: this.tableHeight(260),
tableProps: [ tableProps: [
{ prop: 'factoryName', label: '工厂' }, { prop: 'factoryName', label: '工厂' },
{ prop: 'lineName', label: '产线' }, { prop: 'lineName', label: '产线' },
@ -310,9 +332,6 @@ export default {
}; };
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getWorkOrder() this.getWorkOrder()
// this.getLine(); // this.getLine();
this.getList(); this.getList();

View File

@ -2,14 +2,13 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-21 15:14:04 * @LastEditTime: 2023-12-01 16:41:40
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="list">
:table-data="list">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> --> @clickBtn="handleClick" /> -->
</base-table> </base-table>
@ -82,7 +81,6 @@ export default {
// // exportURL: exportPackingExcel, // // exportURL: exportPackingExcel,
// }, // },
tableProps, tableProps,
tableH: this.tableHeight(260),
tableBtn: [ tableBtn: [
this.$auth.hasPermi(`base:packaging-print-log:update`) this.$auth.hasPermi(`base:packaging-print-log:update`)
? { ? {
@ -174,9 +172,6 @@ export default {
// AddOrUpdate, // AddOrUpdate,
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getList() this.getList()
this.getDict() this.getDict()
}, },

View File

@ -2,14 +2,13 @@
* @Author: zwq * @Author: zwq
* @Date: 2023-08-01 14:55:51 * @Date: 2023-08-01 14:55:51
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-03-21 15:17:05 * @LastEditTime: 2024-03-01 10:27:29
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<base-table :max-height="tableH" :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" <base-table :table-props="tableProps" :page="listQuery.pageNo" :limit="listQuery.pageSize" :table-data="list">
:table-data="list">
<!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn" <!-- <method-btn v-if="tableBtn.length" slot="handleBtn" :width="120" label="操作" :method-list="tableBtn"
@clickBtn="handleClick" /> --> @clickBtn="handleClick" /> -->
</base-table> </base-table>
@ -119,7 +118,6 @@ export default {
startTime: undefined, startTime: undefined,
endTime:undefined, endTime:undefined,
}, },
tableH: this.tableHeight(260),
formConfig: [ formConfig: [
{ {
type: 'select', type: 'select',
@ -127,8 +125,7 @@ export default {
selectOptions: [], selectOptions: [],
labelField: 'name', labelField: 'name',
valueField: 'name', valueField: 'name',
param: 'workOrderName', param: 'workOrderName'
filterable: true
}, },
// { // {
// type: 'datePicker', // type: 'datePicker',
@ -184,9 +181,6 @@ export default {
// AddOrUpdate, // AddOrUpdate,
}, },
created() { created() {
window.addEventListener('resize', () => {
this.tableH = this.tableHeight(260)
})
this.getList() this.getList()
this.getDict() this.getDict()
}, },

View File

@ -74,8 +74,7 @@ export default {
multiple: true, multiple: true,
labelField: 'name', labelField: 'name',
valueField: 'id', valueField: 'id',
defaultSelect: [], defaultSelect: []
filterable: true
}, },
{ {
type: 'select', type: 'select',
@ -83,7 +82,6 @@ export default {
placeholder: '请选择产品', placeholder: '请选择产品',
param: 'productionId', param: 'productionId',
selectOptions: [], selectOptions: [],
filterable: true
}, },
// { // {
// type: 'input', // type: 'input',