123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194 |
- export default {
- namespaced: true,
- state: {
- // 网格
- showGrid: false,
- type: 'mesh',
- size: 10,
- color: '#e5e5e5',
- thickness: 1,
- colorSecond: '#d0d0d0',
- thicknessSecond: 1,
- factor: 4,
- bgColor: '#e5e5e5',
- showImage: false,
- repeat: 'watermark',
- angle: 30,
- position: 'center',
- bgSize: JSON.stringify({ width: 150, height: 150 }),
- opacity: 0.9,
- // 线条
- strokeWidth: 1,
- outStrokeWidth: 1,
- stroke: '#cfe7f2',
- outStroke: '#456d89',
- strokeDasharray: 1,
- animation: 0,
- connector: 'normal',
- edgeRouter: 'metro',
- edgeOffset: 32,
- edgeDirection: 'H',
- label:'',
- endArrow: true,
-
- // 节点属性
- nodeStroke: '#5F95FF',
- nodeStrokeWidth: 1,
- nodeFill: '#ffffff',
- // nodeImageWidth: 60,
- // nodeImageHeight: 60,
- portId: '',
- portX: 0,
- portY: 0,
- portColor: '#5F95FF',
- portFill: '#FFF',
- ZIndex: 0,
- nodeFontSize: 12,
- nodeColor: '#080808',
- // 业务数据
- nodeStatus: 0,
- nodePointCode: '52',
- nodeFieldName: 'fieldName1',
- nodeType: '' // 节点类型(text、image)
- },
- mutations: {
- updateshowGrid(state, showGrid) {
- state.showGrid = showGrid
- },
- updatetype(state, type) {
- state.type = type
- },
- updatesize(state, size) {
- state.size = size
- },
- updatecolor(state, color) {
- state.color = color
- },
- updatethickness(state, thickness) {
- state.thickness = thickness
- },
- updatecolorSecond(state, colorSecond) {
- state.colorSecond = colorSecond
- },
- updatethicknessSecond(state, thicknessSecond) {
- state.thicknessSecond = thicknessSecond
- },
- updatefactor(state, factor) {
- state.factor = factor
- },
- updatebgColor(state, bgColor) {
- state.bgColor = bgColor
- },
- updateshowImage(state, showImage) {
- state.showImage = showImage
- },
- updaterepeat(state, repeat) {
- state.repeat = repeat
- },
- updateangle(state, angle) {
- state.angle = angle
- },
- updateposition(state, position) {
- state.position = position
- },
- updatebgSize(state, bgSize) {
- state.bgSize = bgSize
- },
- updateopacity(state, opacity) {
- state.opacity = opacity
- },
- updatestrokeWidth(state, strokeWidth) {
- state.strokeWidth = strokeWidth
- },
- updateoutStrokeWidth(state, outStrokeWidth) {
- state.outStrokeWidth = outStrokeWidth
- },
- updatestroke(state, stroke) {
- state.stroke = stroke
- },
- updateoutStroke(state, outStroke) {
- state.outStroke = outStroke
- },
- updatestrokeDasharray(state, strokeDasharray) {
- state.strokeDasharray = strokeDasharray
- },
- updateanimation(state, animation) {
- state.animation = animation
- },
- updateconnector(state, connector) {
- state.connector = connector
- },
- updateedgeRouter(state, edgeRouter) {
- state.edgeRouter = edgeRouter
- },
- updateedgeOffset(state, edgeOffset) {
- state.edgeOffset = edgeOffset
- },
- updateedgeDirection(state, edgeDirection) {
- state.edgeDirection = edgeDirection
- },
- updatelabel(state, label) {
- state.label = label
- },
-
- updatenodeStroke(state, nodeStroke) {
- state.nodeStroke = nodeStroke
- },
- updatenodeStrokeWidth(state, nodeStrokeWidth) {
- state.nodeStrokeWidth = nodeStrokeWidth
- },
- updatenodeFill(state, nodeFill) {
- state.nodeFill = nodeFill
- },
- // updatenodeImageWidth(state, nodeImageWidth) {
- // state.nodeImageWidth = nodeImageWidth
- // },
- // updatenodeImageHeight(state, nodeImageHeight) {
- // state.nodeImageHeight = nodeImageHeight
- // },
- updateportId(state, portId) {
- state.portId = portId
- },
- updateportX(state, portX) {
- state.portX = portX
- },
- updateportY(state, portY) {
- state.portY = portY
- },
- updateportColor(state, portColor) {
- state.portColor = portColor
- },
- updateportFill(state, portFill) {
- state.portFill = portFill
- },
- updateZIndex(state, ZIndex) {
- state.ZIndex = ZIndex
- },
- updatenodeFontSize(state, nodeFontSize) {
- state.nodeFontSize = nodeFontSize
- },
- updatenodeColor(state, nodeColor) {
- state.nodeColor = nodeColor
- },
- updatenodeStatus(state, nodeStatus) {
- state.nodeStatus = nodeStatus
- },
- updatenodePointCode(state, nodePointCode) {
- state.nodePointCode = nodePointCode
- },
- updatenodeFieldName(state, nodeFieldName) {
- state.nodeFieldName = nodeFieldName
- },
- updatenodeType(state, nodeType) {
- state.nodeType = nodeType
- }
- }
- }
|