1
0
mirror of https://github.com/PanJiaChen/vue-element-admin.git synced 2025-08-11 21:53:24 +08:00

resolve disabled error with element-ui tabs component (#282)

* creating structure for the service

* structure container info

* waiting for service

* service test

* Support record Log of container info

* style of the option Change Detail

* Text formats

* add color to event type

* Add Disable of textLong

* change style text long

* Add service the ListRecordChats and ListChatEntries

* Support Workflow

* changing translation

* resolve disabled error with element-ui tabs component
This commit is contained in:
elsiosanchez 2020-01-29 16:19:37 -04:00 committed by GitHub
parent 8d7c37839a
commit c0cb0dcf60
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -151,11 +151,9 @@
<transition name="slide-fade"> <transition name="slide-fade">
<p v-if="show"> <p v-if="show">
<el-card class="box-card"> <el-card class="box-card">
<el-tabs v-model="activeName" @tab-click="handleClick"> <el-tabs v-model="activeInfo" @tab-click="handleClick">
<el-tab-pane <el-tab-pane
:label="$t('window.containerInfo.changeLog')"
name="listRecordLogs" name="listRecordLogs"
style="overflow: auto;max-height: 74vh;"
> >
<span slot="label"><svg-icon icon-class="tree-table" /> {{ $t('window.containerInfo.changeLog') }} </span> <span slot="label"><svg-icon icon-class="tree-table" /> {{ $t('window.containerInfo.changeLog') }} </span>
<div <div
@ -165,32 +163,30 @@
v-for="(listLogs, index) in getTypeLogs" v-for="(listLogs, index) in getTypeLogs"
:key="index" :key="index"
> >
<el-timeline> <el-scrollbar wrap-class="scroll">
<el-timeline-item <el-timeline>
v-for="(evenType, key) in listLogs.logs" <el-timeline-item
:key="key" v-for="(evenType, key) in listLogs.logs"
:timestamp="translateDate(evenType.logDate)" :key="key"
placement="top" :timestamp="translateDate(evenType.logDate)"
:color="listLogs.eventType === 1 ? 'rgb(22, 130, 230)' : 'rgba(67, 147, 239, 1)'" placement="top"
> :color="listLogs.eventType === 1 ? 'rgb(22, 130, 230)' : 'rgba(67, 147, 239, 1)'"
<el-card shadow="hover" @click.native="changeField(evenType)"> >
<div> <el-card shadow="hover" @click.native="changeField(evenType)">
<span>{{ evenType.userName }}</span> <div>
<el-dropdown style="float: right;"> <span>{{ evenType.userName }}</span>
<span class="el-dropdown-link" style="color: #1682e6" @click="showkey(key)"> <el-link type="primary" style="float: right;" @click="showkey(key, index)"> {{ $t('window.containerInfo.changeDetail') }} </el-link>
{{ $t('window.containerInfo.changeDetail') }}
</span>
</el-dropdown>
</div>
<br>
<el-collapse-transition>
<div v-show="currentKey === key" :key="key" class="text item">
<span><p><b><i> {{ evenType.displayColumnName }}: </i></b> <strike>{{ evenType.oldDisplayValue }} </strike> {{ evenType.newDisplayValue }}</p></span>
</div> </div>
</el-collapse-transition> <br>
</el-card> <el-collapse-transition>
</el-timeline-item> <div v-show="(currentKey === key) && (typeAction === index)" :key="key" class="text item">
</el-timeline> <span><p><b><i> {{ evenType.displayColumnName }}: </i></b> <strike>{{ evenType.oldDisplayValue }} </strike> {{ evenType.newDisplayValue }}</p></span>
</div>
</el-collapse-transition>
</el-card>
</el-timeline-item>
</el-timeline>
</el-scrollbar>
</el-card> </el-card>
</div> </div>
<div <div
@ -337,11 +333,11 @@ export default {
panelType: 'window', panelType: 'window',
isLoaded: false, isLoaded: false,
isPanel: false, isPanel: false,
activeName: 'listRecordLogs', activeInfo: 'listRecordLogs',
show: false, show: false,
typeAction: 0,
isLoadingFromServer: false, isLoadingFromServer: false,
listRecordNavigation: 0, listRecordNavigation: 0,
show3: false,
currentKey: 100, currentKey: 100,
isShowedTabChildren: true, isShowedTabChildren: true,
isShowedRecordPanel: false, isShowedRecordPanel: false,
@ -472,21 +468,20 @@ export default {
} }
}, },
getTypeLogs() { getTypeLogs() {
const reducer = this.gettersListRecordLogs.reduce((reducer, item) => { const groupLog = this.gettersListRecordLogs.reduce((groupLog, item) => {
if (!reducer.includes(item.logId)) { if (!groupLog.includes(item.eventType)) {
reducer.push(item.logId) groupLog.push(item.eventType)
} }
return reducer return groupLog
}, []) }, [])
.map(i => { .map(i => {
// agrup for logId // agrup for logId
return { return {
logs: this.gettersListRecordLogs.filter(b => b.logId === i), logs: this.gettersListRecordLogs.filter(b => b.eventType === i),
logId: i eventType: i
} }
}) })
return reducer return groupLog
// }
}, },
gettersLischat() { gettersLischat() {
return this.$store.getters.getChatEntries.chatEntriesList return this.$store.getters.getChatEntries.chatEntriesList
@ -518,13 +513,13 @@ export default {
this.getWindow() this.getWindow()
}, },
methods: { methods: {
showkey(key) { showkey(key, index) {
if (key === this.currentKey) { if (key === this.currentKey && index === this.typeAction) {
this.currentKey = 1000 this.currentKey = 1000
} else { } else {
this.currentKey = key this.currentKey = key
this.typeAction = index
} }
this.show3 = !this.show3
}, },
changeField(log) { changeField(log) {
this.$store.dispatch('notifyPanelChange', { this.$store.dispatch('notifyPanelChange', {
@ -645,6 +640,9 @@ export default {
</script> </script>
<style scoped> <style scoped>
.scroll {
max-height: 60vh;
}
/* Enter and leave animations can use different */ /* Enter and leave animations can use different */
/* durations and timing functions. */ /* durations and timing functions. */
.slide-fade-enter-active { .slide-fade-enter-active {