From c9ec52a7c9c9bded442178be48aae1189cdbd429 Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Fri, 9 Apr 2021 17:02:08 +0800 Subject: [PATCH] =?UTF-8?q?iscs=20=E4=BB=A3=E7=A0=81=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iscs_new/components/dataForm.vue | 6 -- src/views/iscs_new/components/tableForm.vue | 97 +++++++++++++++++++++ src/views/iscs_new/iscsDraw/index.vue | 77 +++++++++++++--- 3 files changed, 163 insertions(+), 17 deletions(-) create mode 100644 src/views/iscs_new/components/tableForm.vue diff --git a/src/views/iscs_new/components/dataForm.vue b/src/views/iscs_new/components/dataForm.vue index a105268ff..961416cdc 100644 --- a/src/views/iscs_new/components/dataForm.vue +++ b/src/views/iscs_new/components/dataForm.vue @@ -142,12 +142,6 @@ export default { formModel: { type: Object, required: true - }, - rules: { - type: Object, - default() { - return {}; - } } }, data() { diff --git a/src/views/iscs_new/components/tableForm.vue b/src/views/iscs_new/components/tableForm.vue new file mode 100644 index 000000000..c30613d62 --- /dev/null +++ b/src/views/iscs_new/components/tableForm.vue @@ -0,0 +1,97 @@ + + + diff --git a/src/views/iscs_new/iscsDraw/index.vue b/src/views/iscs_new/iscsDraw/index.vue index 77c46f4b4..92dffb272 100644 --- a/src/views/iscs_new/iscsDraw/index.vue +++ b/src/views/iscs_new/iscsDraw/index.vue @@ -15,16 +15,27 @@ @click="onSave" >保存 - - - + + + + + + + +
+ 添加 + 修改 + 删除 +
+
+ + + + + +
-
- 添加 - 修改 - 删除 -
@@ -35,6 +46,7 @@ import localStore from 'storejs'; import iscsCanvas from './iscsCanvas'; import BuilderFactory from '@/iscs_new/core/form/builderFactory'; import DataForm from '../components/dataForm'; +import TableForm from '../components/tableForm'; import orders from '@/iscs_new/utils/orders'; import * as utils from '@/iscs_new/utils/utils'; import idb from '../utils/indexedDb.js'; @@ -44,7 +56,8 @@ export default { name: 'IscsView', components: { iscsCanvas, - DataForm + DataForm, + TableForm }, data() { return { @@ -56,8 +69,11 @@ export default { draftShow: false, selected: null, enabledTab:'', + cardTab:'first', + statusTab:'', showDeleteButton:false, - elementList:[] + elementList:[], + composeElemList:[] }; }, computed:{ @@ -74,6 +90,7 @@ export default { this.composeName = this.$route.query.composeName; this.elementList = new BuilderFactory().getFormList(); this.enabledTab = this.elementList[0].code; + this.getComposeElemList(); }, methods: { onIscsChange(mode, system, part) { @@ -103,6 +120,9 @@ export default { }, onSelectTab() { this.selected = null; + }, + onSelectCardTab() { + }, onSelected(em) { if (em.model) { @@ -126,9 +146,9 @@ export default { newModel.type = this.enabledTab; // newModel.name = '<名称>'; newModel.stateList = []; - debugger; this.$refs.iscsCanvas.doAction([{model: newModel, action: {shapeType: shapeType.Element, order: orders.ADD}}]); this.clear(this.enabledTab); + this.getComposeElemList(); } }); }, @@ -153,12 +173,22 @@ export default { model.name = this.selected.name; this.$refs.iscsCanvas.doAction([{model, action: {shapeType: shapeType.Element, order: orders.DELETE}}]); this.clear(this.enabledTab); + this.getComposeElemList(); } }); }, clear(enabledTab) { this.$refs['dataform' + enabledTab][0].init(); this.selected = null; + }, + getComposeElemList() { + const source = this.$iscs.getSource(); + if (source.elementList) { + this.composeElemList = source.elementList; + this.statusTab = this.composeElemList[0].code; + debugger; + } + } } }; @@ -175,6 +205,28 @@ export default { height: 100%; overflow: auto; padding-bottom:30px; + + &::-webkit-scrollbar { + width: 6px; + height: 6px; + // height: 110px; + background-color: #FFFFFF; + } + &::-webkit-scrollbar-track { + // box-shadow: inset 0 0 6px rgba(0,0,0,0.3); + border-radius: 10px; + background-color: #FFFFFF;; + } + &::-webkit-scrollbar-thumb { + border-radius: 10px; + // box-shadow: inset 0 0 6px rgba(0,0,0,.3); + background-color: #eaeaea; + } + &::-webkit-scrollbar-thumb:hover { + border-radius: 5px; + // box-shadow: inset 0 0 5px rgba(0,0,0,0.2); + background: rgba(0,0,0,0.4); + } } .map-view { @@ -259,4 +311,7 @@ export default { height: 100%; overflow: hidden; } + #cardTab .el-tabs__content{ + padding:0px; + }