卧理一线二线新增页面显示接口,中空一线、二线新增历史任务,磨边时间戳转换
| | |
| | | finegrinding: '精磨', |
| | | }, |
| | | hellow: { |
| | | totalLayer: '总层数', |
| | | totalPairQuantity: '总配对数量', |
| | | pairQuantity: '已完成配对数量', |
| | | isForceList: '是否强制', |
| | | yesisForceList: '强制', |
| | | noisForceList: '非强制', |
| | | hollowCountOutOne: '中空一线玻璃数量', |
| | | hollowCountOutTwo: '中空二线玻璃数量', |
| | | hollowTotalAreaOutOne: '中空一线玻璃面积', |
| | |
| | | finegrinding: '精磨', |
| | | }, |
| | | hellow: { |
| | | totalLayer: '总层数', |
| | | totalPairQuantity: '总配对数量', |
| | | pairQuantity: '已完成配对数量', |
| | | isForceList: '是否强制', |
| | | yesisForceList: '强制', |
| | | noisForceList: '非强制', |
| | | hollowCountOutOne: '中空一线玻璃数量', |
| | | hollowCountOutTwo: '中空二线玻璃数量', |
| | | hollowTotalAreaOutOne: '中空一线玻璃面积', |
| | |
| | | finegrinding: '精磨', |
| | | }, |
| | | hellow: { |
| | | totalLayer: '总层数', |
| | | totalPairQuantity: '总配对数量', |
| | | pairQuantity: '已完成配对数量', |
| | | isForceList: '是否强制', |
| | | yesisForceList: '强制', |
| | | noisForceList: '非强制', |
| | | hollowCountOutOne: '中空一线玻璃数量', |
| | | hollowCountOutTwo: '中空二线玻璃数量', |
| | | hollowTotalAreaOutOne: '中空一线玻璃面积', |
| | |
| | | ] |
| | | }, |
| | | { |
| | | path: '/hellowquiphistory', |
| | | name: 'hellowquiphistory', |
| | | component: () => import('../views/hollow/hellowquiphistory.vue'), |
| | | children: [ |
| | | { |
| | | path: '/hollow/hellowquiphistory', |
| | | name: 'hellowquiphistory', |
| | | component: () => import('../views/hollow/hellowquiphistory.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '/hellowquiptwohistory', |
| | | name: 'hellowquiptwohistory', |
| | | component: () => import('../views/hollow/hellowquiptwohistory.vue'), |
| | | children: [ |
| | | { |
| | | path: '/hollow/hellowquiptwohistory', |
| | | name: 'hellowquiptwohistory', |
| | | component: () => import('../views/hollow/hellowquiptwohistory.vue') |
| | | }, |
| | | ] |
| | | }, |
| | | { |
| | | path: '/cachingbeforehistory', |
| | | name: 'cachingbeforehistory', |
| | | component: () => import('../views/Caching/cachingbeforehistory.vue'), |
| | |
| | | marginwidth="2000px" |
| | | marginheight="2000px" |
| | | width="100%" |
| | | height="700px" |
| | | height="750px" |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;"> |
| | | <el-form> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="4"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('hellow.countOutOne')" style="width: 14vw"> |
| | | {{ countOutOne }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('hellow.totalAreaOutOne')" style="width: 14vw"> |
| | | {{ totalAreaOutOne }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="glassIdIn" align="center" :label="$t('searchOrder.glassID')" min-width="80" /> |
| | | <el-table-column |
| | |
| | | const tableDatax = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const totalAreaOutOne = ref(0) |
| | | const countOutOne = ref(0) |
| | | const glassId = ref(''); |
| | | const startSlot = ref(''); |
| | | const targetSlot = ref(''); |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const Daily = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", { |
| | | deviceId: 1, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: '', |
| | | taskType: '', |
| | | startTime: startTime, |
| | | endTime: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutOne.value = response.data.countOutOne |
| | | totalAreaOutOne.value = response.data.totalAreaOutOne |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | Dailya(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const Dailya = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", { |
| | | deviceId: 1, |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutOne.value = response.data.countOutOne |
| | | totalAreaOutOne.value = response.data.totalAreaOutOne |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleClick = async () => { |
| | | await sethistorical(); |
| | | await Dailyhistorical(); |
| | | }; |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const Dailyhistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | console.log(page); |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", { |
| | | deviceId: 1, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutOne.value = response.data.countOutOne |
| | | totalAreaOutOne.value = response.data.totalAreaOutOne |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(); |
| | | Daily() |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | } |
| | | tableDataa.value = data.EdgStorageCageinfos[0] |
| | | tableDatab.value = data.taskMessage |
| | | // adjustedRects.value = data.EdgStorageCageinfos[0].map(rect => ({ |
| | | // ...rect, |
| | | // width: rect.width * 0.5 , |
| | | // id: rect.id * 10, |
| | | // })); |
| | | }; |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | |
| | | marginwidth="2000px" |
| | | marginheight="2000px" |
| | | width="100%" |
| | | height="700px" |
| | | height="750px" |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="handleClick()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <div style="margin-bottom: 10px;margin-top: 20px;margin-left: 20px;"> |
| | | <el-form> |
| | | <el-row style="margin-top: -15px;margin-bottom: -2px;"> |
| | | <el-col :span="4"> |
| | | <div id="dt" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('hellow.countOutTwo')" style="width: 14vw"> |
| | | {{ countOutTwo }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | <el-col :span="5"> |
| | | <div id="dta" style="font-size: 15px;"> |
| | | <el-form-item :label="$t('hellow.totalAreaOutTwo')" style="width: 14vw"> |
| | | {{ totalAreaOutTwo }} |
| | | </el-form-item> |
| | | </div> |
| | | </el-col> |
| | | </el-row> |
| | | </el-form> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="glassIdIn" align="center" :label="$t('searchOrder.glassID')" min-width="80" /> |
| | | <el-table-column |
| | |
| | | const tableDatax = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const countOutTwo = ref(0) |
| | | const totalAreaOutTwo = ref(0) |
| | | const glassId = ref(''); |
| | | const startSlot = ref(''); |
| | | const targetSlot = ref(''); |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const Daily = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", { |
| | | deviceId: 2, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: '', |
| | | taskType: '', |
| | | startTime: startTime, |
| | | endTime: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutTwo.value = response.data.countOutTwo |
| | | totalAreaOutTwo.value = response.data.totalAreaOutTwo |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | Dailya(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | |
| | | console.error(error); |
| | | } |
| | | } |
| | | const Dailya = async (page) => { |
| | | try { |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", { |
| | | deviceId: 2, |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutTwo.value = response.data.countOutTwo |
| | | totalAreaOutTwo.value = response.data.totalAreaOutTwo |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handleClick = async () => { |
| | | await sethistorical(); |
| | | await Dailyhistorical(); |
| | | }; |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | |
| | | ElMessage.success(response.message); |
| | | tableDatax.value = response.data.records; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const Dailyhistorical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/cacheGlass/edgStorageDeviceTaskHistory/queryEdgDailyProduction", { |
| | | deviceId: 2, |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | glassId: glassId.value, |
| | | taskState: taskState.value, |
| | | taskType: taskType.value, |
| | | startTime: (timeRange.value && timeRange.value[0]) || '', |
| | | endTime: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | countOutTwo.value = response.data.countOutTwo |
| | | totalAreaOutTwo.value = response.data.totalAreaOutTwo |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(); |
| | | Daily() |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | |
| | | let socket = null; |
| | | const socketUrl = `ws://${WebSocketHost}:${host}/api/cacheGlass/api/talk/edgTasks`; |
| | | const handleMessage = (data) => { |
| | | tableData.value = data.edgTasks[0] |
| | | const formattedTasks = data.edgTasks[0].map(cageInfo => { |
| | | if (cageInfo && cageInfo.createTime) { |
| | | cageInfo.formattedCreateTime = formatTimestamp(cageInfo.createTime); |
| | | } |
| | | return cageInfo; |
| | | }); |
| | | tableData.value = formattedTasks |
| | | }; |
| | | // 历史任务 |
| | | const iframeUrl = ref(''); |
| | |
| | | case 2: |
| | | return t('workOrder.finedging'); |
| | | } |
| | | } |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | onBeforeUnmount(() => { |
| | | console.log("关闭了") |
| | |
| | | <el-table-column prop="thickness" align="center" :label="$t('workOrder.thickness')" min-width="120" /> |
| | | <el-table-column prop="filmsid" align="center" :label="$t('workOrder.glasstype')" min-width="120" /> |
| | | <el-table-column prop="line" align="center" :label="$t('workOrder.line')" min-width="120" /> |
| | | <el-table-column prop="createTime" align="center" :label="$t('workOrder.time')" min-width="120" /> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('workOrder.time')" min-width="120" /> |
| | | <el-table-column prop="state" :label="$t('workOrder.status')" align="center" width="200"> |
| | | <!-- <template #default="scope"> |
| | | {{ scope.row.status==0?"未磨边":scope.row.status==1?"磨边中":"已磨边" }} |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="flowCardId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.processcards')" /> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('hellow.isForceList')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('hellow.noisForceList')" value="0"></el-option> |
| | | <el-option :label="$t('hellow.yesisForceList')" value="1"></el-option> |
| | | </el-select> |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('searchOrder.state')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('film.execution')" value="1"></el-option> |
| | | <el-option :label="$t('basicData.stop')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.endingtask')" value="3"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="80" /> |
| | | <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="80" /> |
| | | <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="80" /> |
| | | <el-table-column prop="pairQuantity" align="center" :label="$t('hellow.pairQuantity')" min-width="80" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('hellow.isForceList')" |
| | | min-width="80" |
| | | prop="isForce" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypea(scope.row.isForce)"> |
| | | {{ getStatusTexta(scope.row.isForce) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('searchOrder.state')" |
| | | min-width="80" |
| | | prop="state" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypeb(scope.row.state)"> |
| | | {{ getStatusTextb(scope.row.state) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | | v-model:current-page="currentPage2" |
| | | :page-size="pageSize" |
| | | :size="large" |
| | | :disabled="disabled" |
| | | layout="prev, pager, next, jumper" |
| | | :total="totalRecords" |
| | | @current-change="handlePageChange2" |
| | | style="margin-top: 10px;" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import {useI18n} from 'vue-i18n' |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue"; |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const router = useRouter() |
| | | const timeRange = ref([]) |
| | | const selectValuesa = reactive([]); |
| | | const tableDatax = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const rawGlassHeight = ref(''); |
| | | const rawGlassThickness = ref(''); |
| | | const flowCardId = ref(''); |
| | | const rawGlassfilmsId = ref(''); |
| | | const slot = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | cell: 930, |
| | | flowCardId: '', |
| | | isForceList: [], |
| | | stateList: [], |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | cell: 930, |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | cell: 930, |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(getglobalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | function getStatusTypeb(state: number) { |
| | | switch (state) { |
| | | case 1: |
| | | return 'primary'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'info'; |
| | | } |
| | | } |
| | | function getStatusTextb(state: number) { |
| | | switch (state) { |
| | | case 1: |
| | | return t('film.execution'); |
| | | case 2: |
| | | return t('basicData.stop'); |
| | | case 3: |
| | | return t('sorter.endingtask'); |
| | | } |
| | | } |
| | | function getStatusTypea(isForce: number) { |
| | | switch (isForce) { |
| | | case 0: |
| | | return 'primary'; |
| | | case 1: |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusTexta(isForce: number) { |
| | | switch (isForce) { |
| | | case 0: |
| | | return t('hellow.noisForceList'); |
| | | case 1: |
| | | return t('hellow.yesisForceList'); |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | | </style> |
New file |
| | |
| | | <template> |
| | | <div> |
| | | <div style="display: flex;width: 1770px;"> |
| | | <el-input v-model="flowCardId" clearable style="margin-left: 10px;margin-bottom: 10px;width: 200px;" :placeholder="$t('searchOrder.processcards')" /> |
| | | <el-select v-model="selectValuesa[0]" filterable :placeholder="$t('hellow.isForceList')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('hellow.noisForceList')" value="0"></el-option> |
| | | <el-option :label="$t('hellow.yesisForceList')" value="1"></el-option> |
| | | </el-select> |
| | | <el-select v-model="selectValuesa[1]" filterable :placeholder="$t('searchOrder.state')" clearable |
| | | style="width: 200px;margin-left: 10px;"> |
| | | <el-option :label="$t('film.execution')" value="1"></el-option> |
| | | <el-option :label="$t('basicData.stop')" value="2"></el-option> |
| | | <el-option :label="$t('sorter.endingtask')" value="3"></el-option> |
| | | </el-select> |
| | | <el-date-picker v-model="timeRange" type="datetimerange" range-separator="至" :start-placeholder="$t('reportmanage.starttime')" |
| | | style="margin-left: 15px;" value-format = "YYYY-MM-DD hh:mm:ss" |
| | | :end-placeholder="$t('reportmanage.endtime')"> |
| | | </el-date-picker> |
| | | <el-button type="primary" style="margin-left: 10px;margin-bottom: 10px;" @click="sethistorical()">{{$t('reportmanage.inquire')}}</el-button> |
| | | </div> |
| | | <el-table ref="table" style="margin-top: 20px;height: 580px;width: 1770px;" :data="tableDatax" :header-cell-style="{background:'#F2F3F5 ',color:'#1D2129'}"> |
| | | <el-table-column prop="flowCardId" align="center" :label="$t('searchOrder.processcards')" min-width="80" /> |
| | | <el-table-column prop="totalLayer" align="center" :label="$t('hellow.totalLayer')" min-width="80" /> |
| | | <el-table-column prop="totalPairQuantity" align="center" :label="$t('hellow.totalPairQuantity')" min-width="80" /> |
| | | <el-table-column prop="pairQuantity" align="center" :label="$t('hellow.pairQuantity')" min-width="80" /> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('hellow.isForceList')" |
| | | min-width="80" |
| | | prop="isForce" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypea(scope.row.isForce)"> |
| | | {{ getStatusTexta(scope.row.isForce) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column |
| | | align="center" |
| | | :label="$t('searchOrder.state')" |
| | | min-width="80" |
| | | prop="state" |
| | | > |
| | | <template #default="scope"> |
| | | <el-tag :type="getStatusTypeb(scope.row.state)"> |
| | | {{ getStatusTextb(scope.row.state) }} |
| | | </el-tag> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="formattedCreateTime" align="center" :label="$t('reportmanage.starttime')" min-width="100" /> |
| | | <el-table-column prop="formattedUpdateTime" align="center" :label="$t('reportmanage.endtime')" min-width="100" /> |
| | | </el-table> |
| | | <div style="margin-top: 20px;margin-left: 40%;"> |
| | | <el-pagination |
| | | v-model:current-page="currentPage2" |
| | | :page-size="pageSize" |
| | | :size="large" |
| | | :disabled="disabled" |
| | | layout="prev, pager, next, jumper" |
| | | :total="totalRecords" |
| | | @current-change="handlePageChange2" |
| | | style="margin-top: 10px;" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | <script lang="ts" setup> |
| | | import {useI18n} from 'vue-i18n' |
| | | import {useRouter} from "vue-router" |
| | | import request from "@/utils/request" |
| | | import {host, WebSocketHost} from '@/utils/constants' |
| | | import {onBeforeUnmount, onMounted, onUnmounted, reactive, ref} from "vue"; |
| | | import {closeWebSocket, initializeWebSocket} from '@/utils/WebSocketService'; |
| | | import {ElMessage, ElMessageBox} from 'element-plus' |
| | | const {t} = useI18n() |
| | | let language = ref(localStorage.getItem('lang') || 'zh') |
| | | import { inject } from 'vue'; |
| | | const globalDate = inject('globalDate'); |
| | | const router = useRouter() |
| | | const timeRange = ref([]) |
| | | const selectValuesa = reactive([]); |
| | | const tableDatax = ref([]) |
| | | const currentPage2 = ref(1) |
| | | const totalRecords = ref(0) |
| | | const rawGlassHeight = ref(''); |
| | | const rawGlassThickness = ref(''); |
| | | const flowCardId = ref(''); |
| | | const rawGlassfilmsId = ref(''); |
| | | const slot = ref(''); |
| | | let getglobalDate = window.localStorage.getItem('getglobalDate') |
| | | const historical = async () => { |
| | | try { |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | cell: 931, |
| | | flowCardId: '', |
| | | isForceList: [], |
| | | stateList: [], |
| | | beginDate: startTime, |
| | | endDate: getglobalDate |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableDatax.value = formattedData; |
| | | console.log(response.data.pages); |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | const handlePageChange2 = (newPage) => { |
| | | currentPage2.value = newPage; |
| | | console.log(currentPage2.value); |
| | | window.localStorage.setItem('pagenumber', currentPage2.value) |
| | | historicala(currentPage2.value); |
| | | }; |
| | | const historicala = async (page) => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", { |
| | | pageNo: page, |
| | | pageSize: 20, |
| | | cell: 931, |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 历史查询点击 |
| | | const sethistorical = async () => { |
| | | try { |
| | | let celllist=[] |
| | | let stateList=[] |
| | | if(selectValuesa[0]!=null&&selectValuesa[0]!='undefined'){ |
| | | if(selectValuesa[0]!=""){ |
| | | celllist=[selectValuesa[0]]; |
| | | } |
| | | } |
| | | if(selectValuesa[1]!=null&&selectValuesa[1]!='undefined'){ |
| | | if(selectValuesa[1]!=""){ |
| | | stateList=[selectValuesa[1]]; |
| | | } |
| | | } |
| | | let startTime = window.localStorage.getItem('startTime') |
| | | let page = window.localStorage.getItem('pagenumber') |
| | | const response = await request.post("/hollowGlass/hollowGlassOutRelationInfo/queryHollowHistoryTask", { |
| | | pageNo: 1, |
| | | pageSize: 20, |
| | | cell: 931, |
| | | flowCardId: flowCardId.value, |
| | | isForceList: celllist, |
| | | stateList: stateList, |
| | | beginDate: (timeRange.value && timeRange.value[0]) || '', |
| | | endDate: (timeRange.value && timeRange.value[1]) || '', |
| | | }) |
| | | if (response.code == 200) { |
| | | currentPage2.value = 1 |
| | | ElMessage.success(response.message); |
| | | const formattedData = response.data.records.map(record => ({ |
| | | ...record, |
| | | formattedCreateTime: formatTimestamp(record.createTime), |
| | | formattedUpdateTime: formatTimestamp(record.updateTime), |
| | | })); |
| | | // tableDatax.value = response.data.records; |
| | | tableDatax.value = formattedData; |
| | | totalRecords.value = response.data.total/2 || 0 |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } |
| | | catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 格式化时间戳为年月日时间字符串的函数 |
| | | function formatTimestamp(timestamp) { |
| | | const date = new Date(timestamp); |
| | | const year = date.getFullYear(); |
| | | const month = String(date.getMonth() + 1).padStart(2, '0'); // 月份从0开始,需要加1,并补零 |
| | | const day = String(date.getDate()).padStart(2, '0'); // 补零 |
| | | const hours = String(date.getHours()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const minutes = String(date.getMinutes()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | const seconds = String(date.getSeconds()).padStart(2, '0'); // 补零(如果需要显示时间) |
| | | return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`; |
| | | } |
| | | // 格式化后端时间并计算一周前的时间 |
| | | const defaultTime = ref<[Date, Date]>([new Date(), new Date()]); |
| | | function parseAndSetTime() { |
| | | const backendTime = new Date(getglobalDate); |
| | | const oneWeekAgo = new Date(backendTime.getTime() - 7 * 24 * 60 * 60 * 1000); // 减去7天 |
| | | console.log(formatTimestamp(oneWeekAgo)); |
| | | console.log(oneWeekAgo); |
| | | timeRange.value = [formatTimestamp(oneWeekAgo), formatTimestamp(backendTime)]; |
| | | window.localStorage.setItem('startTime', formatTimestamp(oneWeekAgo)) |
| | | } |
| | | function getStatusTypeb(state: number) { |
| | | switch (state) { |
| | | case 1: |
| | | return 'primary'; |
| | | case 2: |
| | | return 'success'; |
| | | case 3: |
| | | return 'info'; |
| | | } |
| | | } |
| | | function getStatusTextb(state: number) { |
| | | switch (state) { |
| | | case 1: |
| | | return t('film.execution'); |
| | | case 2: |
| | | return t('basicData.stop'); |
| | | case 3: |
| | | return t('sorter.endingtask'); |
| | | } |
| | | } |
| | | function getStatusTypea(isForce: number) { |
| | | switch (isForce) { |
| | | case 0: |
| | | return 'primary'; |
| | | case 1: |
| | | return 'success'; |
| | | } |
| | | } |
| | | function getStatusTexta(isForce: number) { |
| | | switch (isForce) { |
| | | case 0: |
| | | return t('hellow.noisForceList'); |
| | | case 1: |
| | | return t('hellow.yesisForceList'); |
| | | } |
| | | } |
| | | onMounted(() => { |
| | | parseAndSetTime(); |
| | | historical(); |
| | | }); |
| | | </script> |
| | | <style scoped> |
| | | </style> |
| | |
| | | <el-button type="primary" @click="selectproject"> |
| | | {{ $t('hellow.reviewproject') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="primary" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda"> |
| | | {{ $t('hellow.starttask') }} |
| | | </el-button> |
| | |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{ |
| | | $t('hellow.stopproject') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="danger" @click="handleBindb">{{ |
| | | $t('hellow.stoptask') |
| | | }} |
| | | </el-button> |
| | | <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('hellow.schedulingswitch')" @change="handleChange" /> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 停止任务 --> |
| | | <el-dialog v-model="blindb" top="30vh" width="25%" :title="$t('hellow.pstoptask')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleb"> |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="blindb = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 暂停任务 --> |
| | | <el-dialog v-model="blindc" top="30vh" width="25%" :title="$t('hellow.pstopproject')"> |
| | | <template #footer> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 历史任务 --> |
| | | <el-dialog v-model="blindb" top="10vh" width="90%"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | marginwidth="2000px" |
| | | marginheight="2000px" |
| | | width="100%" |
| | | height="750px" |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | const formulaNameid = ref({ id: null }); |
| | | const titleformulaName = ref({ formulaName: [] ,formulaId: []}); |
| | | const titleSelectJson = ref({ processType: [] }); |
| | | const iframeUrl = ref(''); |
| | | const handlehistorical = (row) => { |
| | | blindb.value = true; |
| | | iframeUrl.value = `${window.location.origin}/#/hollow/hellowquiphistory`; |
| | | }; |
| | | const options = [ |
| | | { |
| | | value: 930, |
| | |
| | | // 开始任务 |
| | | const handleBinda = (row) => { |
| | | blinda.value = true; |
| | | }; |
| | | // 停止任务 |
| | | const handleBindb = (row) => { |
| | | blindb.value = true; |
| | | }; |
| | | // 暂停任务 |
| | | const handleBindc = (row) => { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 结束任务 |
| | | const handleb = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/finishTask?flowCardId="+flowCardId + "&cell=" + 930; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindb.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | <el-button type="primary" @click="selectproject"> |
| | | {{ $t('hellow.reviewproject') }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="primary" @click="handlehistorical">{{ $t('searchOrder.historicaltasks') }}</el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="success" @click="handleBinda"> |
| | | {{ $t('hellow.starttask') }} |
| | | </el-button> |
| | |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="warning" @click="handleBindc">{{ |
| | | $t('hellow.stopproject') |
| | | }} |
| | | </el-button> |
| | | <el-button style="margin-left: 10px;" id="searchButton" type="danger" @click="handleBindb">{{ |
| | | $t('hellow.stoptask') |
| | | }} |
| | | </el-button> |
| | | <el-switch style="margin-top: 7px;margin-left: 10px;" v-model="ganghua" class="mb-2" :inactive-text="$t('hellow.schedulingswitch')" @change="handleChange" /> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 停止任务 --> |
| | | <el-dialog v-model="blindb" top="30vh" width="25%" :title="$t('hellow.pstoptask')"> |
| | | <template #footer> |
| | | <div id="dialog-footer"> |
| | | <el-button type="primary" @click="handleb"> |
| | | {{ $t('basicData.confirm') }} |
| | | </el-button> |
| | | <el-button @click="blindb = false">{{ $t('basicData.cancel') }}</el-button> |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 暂停任务 --> |
| | | <el-dialog v-model="blindc" top="30vh" width="25%" :title="$t('hellow.pstopproject')"> |
| | | <template #footer> |
| | |
| | | </div> |
| | | </template> |
| | | </el-dialog> |
| | | <!-- 历史任务 --> |
| | | <el-dialog v-model="blindb" top="10vh" width="90%"> |
| | | <iframe |
| | | :src="iframeUrl" |
| | | marginwidth="2000px" |
| | | marginheight="2000px" |
| | | width="100%" |
| | | height="750px" |
| | | frameborder="0" |
| | | ></iframe> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { ElMessage, ElMessageBox } from 'element-plus' |
| | |
| | | const formulaNameid = ref({ id: null }); |
| | | const titleformulaName = ref({ formulaName: [] ,formulaId: []}); |
| | | const titleSelectJson = ref({ processType: [] }); |
| | | const iframeUrl = ref(''); |
| | | const handlehistorical = (row) => { |
| | | blindb.value = true; |
| | | iframeUrl.value = `${window.location.origin}/#/hollow/hellowquiptwohistory`; |
| | | }; |
| | | const options = [ |
| | | { |
| | | value: 930, |
| | |
| | | // 开始任务 |
| | | const handleBinda = (row) => { |
| | | blinda.value = true; |
| | | }; |
| | | // 停止任务 |
| | | const handleBindb = (row) => { |
| | | blindb.value = true; |
| | | }; |
| | | // 暂停任务 |
| | | const handleBindc = (row) => { |
| | |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blinda.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | | } else { |
| | | ElMessage({ |
| | | type: 'info', |
| | | message: t('basicData.infonull'), |
| | | }) |
| | | } |
| | | } catch (error) { |
| | | console.error(error); |
| | | } |
| | | } |
| | | // 结束任务 |
| | | const handleb = async () => { |
| | | try { |
| | | let flowCardId = window.localStorage.getItem('flowCardId') |
| | | if (flowCardId !== '') { |
| | | var url="/hollowGlass/hollowGlassOutRelationInfo/finishTask?flowCardId="+flowCardId + "&cell=" + 931; |
| | | const response = await request.post(url) |
| | | if (response.code == 200) { |
| | | ElMessage.success(response.message); |
| | | blindb.value = false; |
| | | } else { |
| | | ElMessage.error(response.message); |
| | | } |
| | |
| | | } |
| | | function tableRowClassName({ row }) { |
| | | if (row.isSame === 1) { |
| | | return 'row-red-background'; // 设置红色背景 |
| | | return 'row-red-background'; |
| | | } |
| | | return ''; |
| | | } |