|
|
@@ -174,23 +174,34 @@ export default {
|
|
|
lockUserList: [],
|
|
|
colockUserList: [],
|
|
|
ticketPointsList: [],
|
|
|
+ ticketId:null
|
|
|
};
|
|
|
},
|
|
|
// mounted() {
|
|
|
// localStorage.setItem('ticketId',this.$route.query.ticketId);
|
|
|
// this.getJobPlayInfo();
|
|
|
// },
|
|
|
+ created() {
|
|
|
+ // 检查路由参数
|
|
|
+ if (this.$route.query.ticketId) {
|
|
|
+ this.ticketId = this.$route.query.ticketId;
|
|
|
+ // 将 ticketId 存储到 localStorage
|
|
|
+ localStorage.setItem('ticketId', this.ticketId);
|
|
|
+ } else {
|
|
|
+ // 从 localStorage 获取 ticketId
|
|
|
+ this.ticketId = localStorage.getItem('ticketId');
|
|
|
+ }
|
|
|
+ },
|
|
|
+
|
|
|
mounted() {
|
|
|
- const ticketId=this.$route.query.ticketId
|
|
|
- localStorage.setItem('ticketId',ticketId);
|
|
|
+ this.getJobPlayInfo();
|
|
|
setInterval(() => {
|
|
|
this.getJobPlayInfo();
|
|
|
}, 5000);
|
|
|
},
|
|
|
methods: {
|
|
|
getJobPlayInfo() {
|
|
|
- const ticketId = this.$route.query.ticketId?this.$route.query.ticketId:localStorage.getItem('ticketId')
|
|
|
- getJobPlayTicketInfo(ticketId).then((res) => {
|
|
|
+ getJobPlayTicketInfo(this.ticketId).then((res) => {
|
|
|
console.log(res, "作业执行详细信息");
|
|
|
this.jobTicket = [res.data.jobTicket].map((item) => ({
|
|
|
...item,
|