Commit 8caf4567 authored by Marcus's avatar Marcus
parent 68b1636d
<template> <template>
<div class="infoheader"> <div class="infoheader">
<el-collapse v-model="activeNames"> <el-collapse v-model="activeNames" @change="handleChange">
<div v-for="item in helpData" :key="item.id"> <div v-for="(item, index) in helpData" :key="item.id">
<el-collapse-item :title="item.titleZh" :name="item.id"> <el-collapse-item :title="(index + 1) + '. ' + (isChinese ? item.titleZh : item.titleEn)" :name="index">
<div v-html="item.contentZh" class="img">{{ item.contentZh }}</div> <div v-html="isChinese ? item.contentZh : item.contentEn" class="img"></div>
</el-collapse-item> </el-collapse-item>
</div> </div>
</el-collapse> </el-collapse>
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
</template> </template>
<script> <script>
import { getInternalHelpDocPage} from "@/api/system/internalHelpDoc"; import {getInternalHelpDoc, getInternalHelpDocPage} from "@/api/system/internalHelpDoc";
export default { export default {
data() { data() {
return { return {
...@@ -22,9 +22,23 @@ export default { ...@@ -22,9 +22,23 @@ export default {
created() { created() {
getInternalHelpDocPage({ pageNo: 1, pageSize: 100 }).then((r) => { getInternalHelpDocPage({ pageNo: 1, pageSize: 100 }).then((r) => {
this.helpData = r.data.list this.helpData = r.data.list
this.activeNames = this.helpData.map(m => { return m.id })
}) })
},
methods: {
handleChange(val) {
console.log(val)
if (val.length > 0 &&!this.helpData[val].contentZh && !this.helpData[val].contentEn){
getInternalHelpDoc(this.helpData[val].id).then(r => {
this.$set(this.helpData, val, r.data)
})
}
} }
},
computed:{
isChinese(){
return this.$i18n.locale === 'zh_CN'
}
},
} }
</script> </script>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment