1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
| <template>
| <div>
| <el-popover placement="bottom" :title="equipNo" width="200" trigger="click">
| <template #reference>
| <div :style="{
| color: equipNoFontColor,
| width: width,
| height: height,
| left: left,
| top: top,
| margin_top: marginTop
| }" style="position: absolute" @click="mouseClick">
| <img v-if="imgType == '1'" src="../../public/lines.png" style="width: 40px" />
| <img v-if="imgType == '2'" src="../../public/lines2.png" style="width: 40px" />
| <label v-if="equipNo != ''" style="position: relative; margin-left: 5px; top: -35px;font-size: 12px;">{{
| equipNo }}</label>
| </div>
| </template>
| <el-row>
| <el-col :span="12">是否有盘:</el-col>
| <el-col :span="12">{{ lineItemInfo.r_Line_HasPallet }}</el-col>
| </el-row>
| <el-row>
| <el-col :span="12">托盘条码</el-col>
| <el-col :span="12">{{ lineItemInfo.r_Line_Barcode }}</el-col>
| </el-row>
| <el-row>
| <el-col :span="12">目标位置</el-col>
| <el-col :span="12">{{ lineItemInfo.r_Line_Target }}</el-col>
| </el-row>
| <el-row>
| <el-col :span="12">任务号</el-col>
| <el-col :span="12">{{ lineItemInfo.r_Line_TaskNum }}</el-col>
| </el-row>
| <el-row>
| <el-col :span="12">报警代码</el-col>
| <el-col :span="12">{{ lineItemInfo.r_Line_ErrorCode }}</el-col>
| </el-row>
| </el-popover>
| </div>
| </template>
|
| <script>
| import { defineComponent } from "vue";
| export default defineComponent({
| props: {
| equipNoFontColor: {
| type: String,
| default: "blue",
| },
| width: {
| type: String,
| default: "40px",
| },
| height: {
| type: String,
| default: "40px",
| },
| equipNo: {
| type: String,
| default: "0",
| },
| imgType: {
| type: String,
| default: "1",
| },
| positionX: {
| type: Int32Array,
| default: 1,
| },
| positionY: {
| type: Int32Array,
| default: 1,
| },
| url: {
| type: String,
| default: "",
| },
| marginTop: {
| type: String,
| default: "10px",
| }
| // mouseClick: {
| // type: Function,
| // default: function () {
| // alert(this.equipNo);
| // },
| // },
| },
| data() {
| return {
| left: "20px",
| top: "260px",
| lineItemInfo: {
| r_Line_Barcode: "",
| r_Line_HasPallet: "",
| r_Line_TaskNum: "",
| r_Line_ErrorCode: "",
| r_Line_Target: "",
| },
| };
| },
| mounted: function () {
| var axisX = (this.positionX - 1) * 40 + 100;
| this.left = axisX + "px";
|
| var axisY = (this.positionY - 1) * 40 + 50;
| this.top = axisY + "px";
| },
| methods: {
| mouseClick() {
| if (this.url != "") {
| this.http
| .post(this.url + "?equipNo=" + this.equipNo, null, "")
| .then((x) => {
| if (x.status) {
| this.lineItemInfo = x.data;
| } else {
| this.$message({
| type: "error",
| message: x.message,
| });
| }
| });
| }
| },
| },
| });
| </script>
|
| <style scoped></style>
|
|