|
|
@@ -8,7 +8,16 @@ import { Clipboard } from '@antv/x6-plugin-clipboard'
|
|
|
import { History } from '@antv/x6-plugin-history'
|
|
|
import { Export } from '@antv/x6-plugin-export'
|
|
|
import { MiniMap } from '@antv/x6-plugin-minimap'
|
|
|
-import { getImg } from '../../../../libs/base/x6-utils'
|
|
|
+import climbKiln from '@/assets/icons/climbKiln.png'
|
|
|
+import finishCheck from '@/assets/icons/finishCheck.png'
|
|
|
+import halfCheck from '@/assets/icons/halfCheck.png'
|
|
|
+import inKiln from '@/assets/icons/inKiln.png'
|
|
|
+import outKiln from '@/assets/icons/outKiln.png'
|
|
|
+import recover from '@/assets/icons/recover.png'
|
|
|
+import register from '@/assets/icons/register.png'
|
|
|
+import shaping from '@/assets/icons/shaping.png'
|
|
|
+import uninstallKiln from '@/assets/icons/uninstallKiln.png'
|
|
|
+import dklogo from '@/assets/images/dklogo.png'
|
|
|
import router from '@/router'
|
|
|
import config from '@/config'
|
|
|
import { mapState, mapMutations } from 'vuex'
|
|
|
@@ -890,7 +899,7 @@ export default class Process {
|
|
|
left.className = 'custom-html-left'
|
|
|
right.className = 'custom-html-right'
|
|
|
let img = document.createElement('img')
|
|
|
- img.src = cell.getData().image
|
|
|
+ img.src = self.getCellImg(cell)
|
|
|
img.width = 32
|
|
|
img.height = 32
|
|
|
let title = document.createElement('div')
|
|
|
@@ -940,7 +949,6 @@ export default class Process {
|
|
|
const countImages = [
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.register)?.gradeKindDesc,
|
|
|
- image: getImg('登记.png'),
|
|
|
nodeKind: config.nodeKind.register,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.register)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -953,7 +961,6 @@ export default class Process {
|
|
|
},
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.climbKiln)?.gradeKindDesc,
|
|
|
- image: getImg('装卸.png'),
|
|
|
nodeKind: config.nodeKind.climbKiln,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.climbKiln)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -966,7 +973,6 @@ export default class Process {
|
|
|
},
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.inKiln)?.gradeKindDesc,
|
|
|
- image: getImg('火炉.png'),
|
|
|
nodeKind: config.nodeKind.inKiln,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.inKiln)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -979,7 +985,6 @@ export default class Process {
|
|
|
},
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.outKiln)?.gradeKindDesc,
|
|
|
- image: getImg('火炉1.png'),
|
|
|
nodeKind: config.nodeKind.outKiln,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.outKiln)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -992,7 +997,6 @@ export default class Process {
|
|
|
},
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.uninstallKiln)?.gradeKindDesc,
|
|
|
- image: getImg('装卸1.png'),
|
|
|
nodeKind: config.nodeKind.uninstallKiln,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.uninstallKiln)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -1011,7 +1015,6 @@ export default class Process {
|
|
|
data: {
|
|
|
nodeName: item.label,
|
|
|
nodeKind: item.nodeKind,
|
|
|
- image: item.image,
|
|
|
nodeKindName: item.nodeKindName,
|
|
|
flgJobDefect: item.flgJobDefect,
|
|
|
flowKind: item.flowKind,
|
|
|
@@ -1029,7 +1032,6 @@ export default class Process {
|
|
|
const testImages = [
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.halfCheck)?.gradeKindDesc,
|
|
|
- image: getImg('检查.png'),
|
|
|
nodeKind: config.nodeKind.halfCheck,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.halfCheck)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -1042,7 +1044,6 @@ export default class Process {
|
|
|
},
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.finishCheck)?.gradeKindDesc,
|
|
|
- image: getImg('检查.png'),
|
|
|
nodeKind: config.nodeKind.finishCheck,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.finishCheck)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -1061,7 +1062,6 @@ export default class Process {
|
|
|
data: {
|
|
|
nodeName: item.label,
|
|
|
nodeKind: item.nodeKind,
|
|
|
- image: item.image,
|
|
|
nodeKindName: item.nodeKindName,
|
|
|
flgJobDefect: item.flgJobDefect,
|
|
|
flowKind: item.flowKind,
|
|
|
@@ -1079,7 +1079,6 @@ export default class Process {
|
|
|
const specialImages = [
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.recover)?.gradeKindDesc,
|
|
|
- image: getImg('回收.png'),
|
|
|
nodeKind: config.nodeKind.recover,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.recover)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -1093,7 +1092,6 @@ export default class Process {
|
|
|
},
|
|
|
{
|
|
|
label: nodeKindList.find(it => it.kindCode == config.nodeKind.shaping)?.gradeKindDesc,
|
|
|
- image: getImg('马桶.png'),
|
|
|
nodeKind: config.nodeKind.shaping,
|
|
|
nodeKindName: nodeKindList.find(it => it.kindCode == config.nodeKind.shaping)?.kindName,
|
|
|
flgJobDefect: true,
|
|
|
@@ -1112,7 +1110,6 @@ export default class Process {
|
|
|
data: {
|
|
|
nodeName: item.label,
|
|
|
nodeKind: item.nodeKind,
|
|
|
- image: item.image,
|
|
|
nodeKindName: item.nodeKindName,
|
|
|
flgJobDefect: item.flgJobDefect,
|
|
|
flowKind: item.flowKind,
|
|
|
@@ -1180,4 +1177,22 @@ export default class Process {
|
|
|
}
|
|
|
|
|
|
// endregion
|
|
|
+ static imgList={
|
|
|
+ 'climbKiln':climbKiln,
|
|
|
+ 'finishCheck':finishCheck,
|
|
|
+ 'halfCheck':halfCheck,
|
|
|
+ 'inKiln':inKiln,
|
|
|
+ 'outKiln':outKiln,
|
|
|
+ 'recover':recover,
|
|
|
+ 'register':register,
|
|
|
+ 'shaping':shaping,
|
|
|
+ 'uninstallKiln':uninstallKiln,
|
|
|
+ }
|
|
|
+
|
|
|
+ static getCellImg(cell) {
|
|
|
+ let nodeKindValue=cell.getData().nodeKind
|
|
|
+ let nodeKindKey=Object.keys(config.nodeKind).find(key => config.nodeKind[key] === nodeKindValue);
|
|
|
+ // console.log('1',self.imgList[nodeKindKey])
|
|
|
+ return this.imgList[nodeKindKey]
|
|
|
+ }
|
|
|
}
|