From 2ef2d01fc0380bb931e13b9af62f506fc9f4757c Mon Sep 17 00:00:00 2001 From: joylink_cuiweidong <364937672@qq.com> Date: Tue, 20 Apr 2021 16:35:42 +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/iscsDraw/index.vue | 33 ++- .../iscs_new/iscsDraw/statusCombineEdit.vue | 86 ++----- src/views/iscs_new/iscsDraw/statusList.vue | 229 ++++++++++++++++++ 3 files changed, 279 insertions(+), 69 deletions(-) create mode 100644 src/views/iscs_new/iscsDraw/statusList.vue diff --git a/src/views/iscs_new/iscsDraw/index.vue b/src/views/iscs_new/iscsDraw/index.vue index 2a942405f..3538a33ee 100644 --- a/src/views/iscs_new/iscsDraw/index.vue +++ b/src/views/iscs_new/iscsDraw/index.vue @@ -19,6 +19,12 @@ style="float: right; padding: 3px 0; margin-right: 5px;" @click="onPreview" >预览 + 状态编辑 @@ -43,12 +49,16 @@ 保存 - - - + + @@ -62,7 +72,8 @@ import orders from '@/iscs_new/utils/orders'; import * as utils from '@/iscs_new/utils/utils'; import Idb from '../utils/indexedDb.js'; import shapeType from '@/iscs_new/constant/shapeType.js'; -import StatusCombineEdit from './statusCombineEdit'; +// import StatusCombineEdit from './statusCombineEdit'; +import StatusList from './statusList'; import { EventBus } from '@/scripts/event-bus'; export default { @@ -71,7 +82,8 @@ export default { iscsCanvas, DataForm, TableForm, - StatusCombineEdit + StatusList + // StatusCombineEdit }, data() { return { @@ -233,8 +245,19 @@ export default { } }); }, + onEditStatusSave() { + this.$refs['editStatusForm'].$refs['form'].validate((valid) => { + if (valid) { + this.onSave(); + } + }); + }, onPreview() { this.$router.push({ path: `/iscs_new/design/compose/preview`, query:{id:this.$route.query.id} }); + }, + + onModifyStatus() { + this.$refs.statusList.doShow(); } } }; diff --git a/src/views/iscs_new/iscsDraw/statusCombineEdit.vue b/src/views/iscs_new/iscsDraw/statusCombineEdit.vue index 81371a12e..5b780ef2a 100644 --- a/src/views/iscs_new/iscsDraw/statusCombineEdit.vue +++ b/src/views/iscs_new/iscsDraw/statusCombineEdit.vue @@ -13,47 +13,7 @@ @expand-change="expandChange" > - - - - - + @@ -141,7 +102,9 @@ export default { }, addComposeStatus() { const length = this.formModel.stateList.length; - this.formModel.stateList.push({id:length + 1, status:'', description:'', weight:1, needDefault:false, covertStatusList:[], defaultLoop:false}); + this.formModel.stateList.push({id:length + 1, status:'', description:'', weight:1, needDefault:false, + covertStatusList:[]}); + // defaultLoop:false this.expandKeys.push(length + 1); }, deleteStatus(index, row) { @@ -149,28 +112,23 @@ export default { const key = this.expandKeys.findIndex(each=>{ return each == row.id; }); if (key > 0) { this.expandKeys.splice(key, 1); } }, - addCovertStatus(index) { - debugger; - // const covertStatusList = ; - if (this.formModel.stateList[index].defaultLoop) { - const covertStatusList = this.formModel.stateList[index].covertStatusList; - covertStatusList.push({loop:this.formModel.stateList[index].defaultLoop, - frameList:[], times:1, delay:2, animateTime:10}); - this.$set(this.formModel.stateList[index], 'covertStatusList', covertStatusList); - } else { - this.formModel.stateList[index].covertStatusList.push({loop:this.formModel.stateList[index].defaultLoop, - frameList:[] }); - } - // if (!covertStatusList) { - // this.$set(this.formModel.stateList[index], type, {}); - // } - // const data = this.formModel.stateList[index]; - // const dataName = 'default' + type.replace(type[0], type[0].toUpperCase()) + 'Select'; - // if (!data[type][data[dataName]] && data[dataName]) { - // const other = utils.deepClone(this.formModel[type][data[dataName]]); - // this.$set(this.formModel.stateList[index][type], data[dataName], other); - // } + modifyStatus(index, row) { + this.$refs.eachStatusTable.doShow(index, row); } + // addCovertStatus(index) { + // if (this.formModel.stateList[index].defaultLoop) { + // const covertStatusList = this.formModel.stateList[index].covertStatusList; + // const length = covertStatusList.length; + // covertStatusList.push({id:length + 1, loop:this.formModel.stateList[index].defaultLoop, + // delay:2, animateTime:10, frameList:[]}); + // // ,times:1, + // // this.formModel.stateList[index].covertStatusList = covertStatusList; + // this.$set(this.formModel.stateList[index], 'covertStatusList', covertStatusList); + // } else { + // this.formModel.stateList[index].covertStatusList.push({id:length + 1, loop:this.formModel.stateList[index].defaultLoop, + // frameList:[]}); + // } + // } } }; diff --git a/src/views/iscs_new/iscsDraw/statusList.vue b/src/views/iscs_new/iscsDraw/statusList.vue new file mode 100644 index 000000000..7aef966a4 --- /dev/null +++ b/src/views/iscs_new/iscsDraw/statusList.vue @@ -0,0 +1,229 @@ + + + +