Commit 57fe5473 by 王志慧

feat

1 parent e07e865d
<template> <template>
<div class="w-textarea" ref="wTextarea"> <div class="w-textarea" ref="wTextarea">
<div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @keydown="textareaKeydown($event)" @click="inputClick($event)" @focus="onFocus" @blur="onBlur" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div> <div contenteditable="true" class="w-textarea_input" ref="wTextareaContent" :id="contentId" @click="inputClick($event)" @focus="onFocus" @blur="onBlur" @keydown.delete="handleDelete($event)" @input="handleInput($event.target)"></div>
</div> </div>
</template> </template>
<script> <script>
......
...@@ -224,6 +224,7 @@ export default { ...@@ -224,6 +224,7 @@ export default {
handlePreview(params) { handlePreview(params) {
let { key, data } = params let { key, data } = params
this.switchList[key] = data this.switchList[key] = data
console.log(this.switchList[key])
}, },
openConfigDialog(componentName) { openConfigDialog(componentName) {
this.dialogComponent = componentName this.dialogComponent = componentName
...@@ -265,7 +266,12 @@ export default { ...@@ -265,7 +266,12 @@ export default {
switchList.forEach(item => { switchList.forEach(item => {
this.groupToType.find(v => { this.groupToType.find(v => {
if (v.type == item.actionReportType) { if (v.type == item.actionReportType) {
this.switchList[v.attr].push(item) this.switchList[v.attr].push({
actionReportType: item.actionReportType,
switchStatus: item.switchStatus,
switchText: item.switchText,
switchType: item.switchType
})
} }
}) })
}) })
......
...@@ -64,12 +64,7 @@ export default { ...@@ -64,12 +64,7 @@ export default {
this.switchList.saReport.forEach(i => { this.switchList.saReport.forEach(i => {
this.params.find(data => { this.params.find(data => {
if (this[data].switchType == i.switchType) { if (this[data].switchType == i.switchType) {
this[data] = { this[data] = i
actionReportType: i.actionReportType,
switchStatus: i.switchStatus,
switchText: i.switchText,
switchType: i.switchType
}
this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false
} }
}) })
......
...@@ -104,12 +104,7 @@ export default { ...@@ -104,12 +104,7 @@ export default {
this.switchList.wordReport.forEach(i => { this.switchList.wordReport.forEach(i => {
this.params.find(data => { this.params.find(data => {
if (this[data].switchType == i.switchType) { if (this[data].switchType == i.switchType) {
this[data] = { this[data] = i
actionReportType: i.actionReportType,
switchStatus: i.switchStatus,
switchText: i.switchText,
switchType: i.switchType
}
} }
}) })
}) })
......
...@@ -54,12 +54,7 @@ export default { ...@@ -54,12 +54,7 @@ export default {
this.switchList.zhanReport.forEach(i => { this.switchList.zhanReport.forEach(i => {
this.params.find(data => { this.params.find(data => {
if (this[data].switchType == i.switchType) { if (this[data].switchType == i.switchType) {
this[data] = { this[data] = i
actionReportType: i.actionReportType,
switchStatus: i.switchStatus,
switchText: i.switchText,
switchType: i.switchType
}
this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false
} }
}) })
......
...@@ -79,7 +79,7 @@ export default { ...@@ -79,7 +79,7 @@ export default {
isDialogVisible(val) { isDialogVisible(val) {
if (val) { if (val) {
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.verbalRef && this.$refs.verbalRef.update(this.verbalType.switchText) this.$refs.verbalRef&&this.$refs.verbalRef.update(this.verbalType.switchText)
}) })
} }
} }
...@@ -92,12 +92,7 @@ export default { ...@@ -92,12 +92,7 @@ export default {
this.switchList.saPerReport.forEach(i => { this.switchList.saPerReport.forEach(i => {
this.params.find(data => { this.params.find(data => {
if (this[data].switchType == i.switchType) { if (this[data].switchType == i.switchType) {
this[data] = { this[data] = i
actionReportType: i.actionReportType,
switchStatus: i.switchStatus,
switchText: i.switchText,
switchType: i.switchType
}
this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false
} }
}) })
...@@ -107,7 +102,7 @@ export default { ...@@ -107,7 +102,7 @@ export default {
this.isDialogVisible = false this.isDialogVisible = false
let switchList = [] let switchList = []
this.params.forEach(data => { this.params.forEach(data => {
if (data == 'verbalType') this[data].switchText = this.$refs.verbalRef.getTextValue() if(data =='verbalType') this[data].switchText = this.$refs.verbalRef.getTextValue()
switchList.push(this[data]) switchList.push(this[data])
}) })
console.log(switchList) console.log(switchList)
...@@ -195,6 +190,7 @@ export default { ...@@ -195,6 +190,7 @@ export default {
/deep/ .el-form-item__content { /deep/ .el-form-item__content {
width: 448px; width: 448px;
} }
} }
} }
</style> </style>
...@@ -54,12 +54,7 @@ export default { ...@@ -54,12 +54,7 @@ export default {
this.switchList.scheduleReport.forEach(i => { this.switchList.scheduleReport.forEach(i => {
this.params.find(data => { this.params.find(data => {
if (this[data].switchType == i.switchType) { if (this[data].switchType == i.switchType) {
this[data] = { this[data] = i
actionReportType: i.actionReportType,
switchStatus: i.switchStatus,
switchText: i.switchText,
switchType: i.switchType
}
this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false this[data].switchStatus = this[data].switchStatus == 'Y' ? true : false
} }
}) })
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!