-
+
- 状态编辑
+ 状态预览
+
+ 重置状态
-
-
-
-
-
-
+
+
+
状态属性:{{ state.status }}
+
状态描述:{{ state.description }}
+
状态权重:{{ state.weight }}
+
状态是否可以初始化:{{ state.needDefault?'是':'否' }}
+
预览
+
+
+
+
+
+
+
+
@@ -25,8 +40,10 @@
+
diff --git a/src/views/iscs_new/iscsPreview/iscsCanvas.vue b/src/views/iscs_new/iscsPreview/iscsCanvas.vue
index 107658edc..23b9bb0c0 100644
--- a/src/views/iscs_new/iscsPreview/iscsCanvas.vue
+++ b/src/views/iscs_new/iscsPreview/iscsCanvas.vue
@@ -63,7 +63,7 @@ export default {
this.destroy();
},
methods: {
- // 初始化窗口
+ // 初始化窗口
init() {
document.getElementById(this.iscsId).oncontextmenu = function (e) {
return false;
@@ -82,55 +82,55 @@ export default {
offsetX: 0,
offsetY: 0
},
- plugins: [
- // ShapeBuilder,
- // ShapeProperty,
- // ShapeContextMenu
- ]
+ plugins: [
+ // ShapeBuilder,
+ // ShapeProperty,
+ // ShapeContextMenu
+ ]
});
- const option = {
- panEnable: true,
- zoomEnable: true,
- keyEnable: true,
- draggle: false,
- selecting: false,
- selectable: false,
- reflect: true
- }
- if (this.$route.query.id) {
- setTimeout(_ => {
- Idb.select('composeList', this.$route.query.id).then(resp => {
- this.$iscs.setMap([], {
- elementList: resp.elementList||[],
- composeList: resp.composeList||[]
- }, option);
- EventBus.$emit('getComposeElemList');
- }).catch(error => {
- this.$iscs.setMap([], {
- elementList: [],
- composeList: []
- }, option);
- })
- }, 1000)
- } else {
- this.$iscs.setMap([], {
- elementList: [],
- composeList: []
- }, option);
- }
+ const option = {
+ panEnable: true,
+ zoomEnable: true,
+ keyEnable: true,
+ draggle: false,
+ selecting: false,
+ selectable: false,
+ reflect: true
+ };
+ if (this.$route.query.id) {
+ setTimeout(_ => {
+ Idb.select('composeTemplateList', this.$route.query.id).then(resp => {
+ this.$iscs.setMap([], {
+ elementList: resp.shapeList || [],
+ composeList: resp.composeList || []
+ }, option);
+ this.$emit('setData', resp);
+ }).catch(error => {
+ this.$iscs.setMap([], {
+ elementList: [],
+ composeList: []
+ }, option);
+ });
+ }, 1000);
+ } else {
+ this.$iscs.setMap([], {
+ elementList: [],
+ composeList: []
+ }, option);
+ }
Vue.prototype.$iscs = this.$iscs;
this.$iscs.on('viewLoaded', this.onViewLoaded, this);
this.$iscs.on('contextmenu', this.onContextMenu, this);
// this.$iscs.on('click', this.onClick, this);
- this.$iscs.on('reflect', this.onReflect, this);
+ this.$iscs.on('reflect', this.onReflect, this);
this.$iscs.on('keyboard', this.onKeyboard, this);
window.document.oncontextmenu = function () {
return false;
};
},
- // 视图加载完成
+ // 视图加载完成
onViewLoaded(e) {
},
// 键盘快捷键事件
@@ -138,38 +138,38 @@ export default {
console.log(hook);
},
// 点击选择事件
- onClick(em={}) {
- this.$emit('selected', em);
+ onClick(em = {}) {
+ this.$emit('selected', em);
+ },
+ onReflect(em = {}) {
+ this.$emit('selected', this.$iscs.getShapeByCode(em.code));
},
- onReflect(em={}) {
- this.$emit('selected', this.$iscs.getShapeByCode(em.code));
- },
// 右键点击事件
- onContextMenu(em={}) {
- this.$emit('contextMenu', em.model);
+ onContextMenu(em = {}) {
+ this.$emit('contextMenu', em.model);
},
- // 执行操作
- doAction(list) {
- this.$iscs && this.$iscs.render(list);
- },
- // 消息处理
- stateMessage(val) {
+ // 执行操作
+ doAction(list) {
+ this.$iscs && this.$iscs.render(list);
+ },
+ // 消息处理
+ stateMessage(val) {
this.$iscs && this.$iscs.setDeviceStatus(val);
},
- // 充值窗口大小
+ // 充值窗口大小
resize() {
this.$nextTick(() => {
this.$iscs && this.$iscs.resize({ width: this.width, height: this.height });
});
},
- // 销毁
+ // 销毁
destroy() {
if (this.$iscs) {
this.$iscs.destroy();
this.$iscs = null;
Vue.prototype.$iscs = null;
}
- },
+ }
}
};