master
吴普建 10 months ago
parent b5c803a700
commit c598af2734

@ -124,7 +124,8 @@ export default defineComponent({
data: line.data.map((value, idx) => ({
value,
itemStyle: { color: value >= 65 && value <= 75 ? '#00ff00' : '#ff0000' },
batchNumber: line.batchNumber && line.batchNumber[idx] || '未知批次'
batchNumber: line.batchNumber && line.batchNumber[idx] || '未知批次',
id: line.ids && line.ids[idx] || ''
})),
label: { show: false },
markLine: {
@ -181,21 +182,20 @@ export default defineComponent({
//
myChart.on('click', (params) => {
console.log("params", params)
if (params.componentType === 'series') {
//
const seriesName = params.seriesName; // 线
const value = params.value; //
const batchNumber = params.data.batchNumber; //
const id = params.data.id; //
console.log(`点击了 ${seriesName} 的数据点`);
console.log(`批次: ${batchNumber}, 转速: ${value} 转/秒`);
console.log(`id: ${id}, 转速: ${value} 转/秒`);
//
emit('pointClick', {
seriesName,
value,
batchNumber,
time: params.name || '未知时间'
id
});
}
});

@ -34,7 +34,8 @@
</div>
</div>
<div class="left_area left_bot_area" @click="jumpPage('produce_workRecords')">
<!-- <div class="left_area left_bot_area" @click="jumpPage('produce_workRecords')">-->
<div class="left_area left_bot_area" @click="handleParentClick">
<div class="top_title">
<span>在线质检</span>
</div>
@ -47,6 +48,7 @@
width="480px"
height="290px"
:real-data="leftBotData"
@pointClick="pointClick"
/>
</div>
</div>
@ -642,8 +644,22 @@ export default defineComponent({
app.setContentFull(this.fullScreen);
},
jumpPage(routerName){
console.log("fu")
this.router.push({name : routerName})
},
handleParentClick(event) {
console.log(event.target.tagName, "event.target")
//
if ('CANVAS' == event.target.tagName) {
console.log("zi")
return; //
}
this.jumpPage('produce_workRecords');
},
pointClick(e){
console.log(e)
this.router.push({name : 'produce_workRecords', query: { id: e.id, title: ' glasses' }})
},
//
debounce(func, wait = 100) {
let timeout;

@ -136,6 +136,7 @@
import { ref, onMounted } from 'vue';
import type { Ref } from 'vue';
import { hiprint } from 'vue-plugin-hiprint';
import { useRoute } from 'vue-router'
import type { DataTableColumns } from 'naive-ui';
import { getWorkbenchWiredrawingList } from '@/service/api/md/workbench/wiredrawing';
import { getWorkbenchEnamellingList, getMdPrintData } from '@/service/api/md/workbench/enamelling';
@ -151,6 +152,7 @@ import { useResetSearch } from '~/src/utils/common/searchReset';
const { loading, startLoading, endLoading } = useLoading();
const { searchForm, reset } = useResetSearch({
id: '',
taskSn: '', //
workstationId: null, //
taskType: 0, //
@ -541,6 +543,12 @@ function init() {
});
}
onMounted(() => {
const route = useRoute()
console.log("route", route)
if (route.query.id) {
console.log("route.query.id", route.query.id)
searchForm.value.id = route.query.id as string;
}
init();
// getList();
lsColumns.value = columns.value.filter((item: any) => !columnsFilterData.value.includes(item.key));

Loading…
Cancel
Save