Skip to content

Commit

Permalink
fix(cloudTest): 修复文档管理逻辑
Browse files Browse the repository at this point in the history
ISSUES CLOSED: 修复告警管理查询
  • Loading branch information
h7ml committed Jul 2, 2022
1 parent 47dd27d commit e0d7416
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 8 deletions.
5 changes: 1 addition & 4 deletions src/dgiot/components/DgiotVditor/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,7 @@
:model="Form"
>
<el-form-item>
<el-input :key="Form.name" v-model="Form.name" />
</el-form-item>
<el-form-item>
<el-button type="primary" @click="save">更新</el-button>
<el-button type="primary" @click="save">保存</el-button>
</el-form-item>
</el-form>
<div id="vditor" style="width: 400vh" :title="title" />
Expand Down
17 changes: 13 additions & 4 deletions src/views/CloudFunction/doc/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,11 @@
setTreeFlag: 'settings/setTreeFlag',
}),
async handleNodeClick(data) {
this.ruleForm = await getArticle(data.objectId)
this.$refs.vditor.flagType = 'editor'
// 根据类型显示文档
if (data.type == 'page') {
this.ruleForm = await getArticle(data.objectId)
this.$refs.vditor.flagType = 'editor'
}
// this.$refs.vditor.flagType == 'preview'
// ? (this.$refs.vditor.flagType = 'editor')
// : (this.$refs.vditor.flagType = 'preview')
Expand All @@ -62,7 +65,7 @@
const params = {
province: '',
class: 'Article',
filter: '{"keys":["parent","name"],"where":{}}',
filter: '{"keys":["parent","name","type"],"where":{}}',
parent: 'parent',
}
const { results = [] } = await post_tree(params)
Expand Down Expand Up @@ -227,7 +230,13 @@
@node-click="handleNodeClick"
>
<span slot-scope="{ node, data }" class="custom-tree-node">
<span>{{ data.name }}</span>
<span
:class="
data.type == 'subject' ? 'el-icon-files' : 'el-icon-document'
"
>
{{ data.name }}
</span>
<span v-show="type == 'editor'">
<el-dropdown trigger="click">
<span class="el-dropdown-link">
Expand Down

0 comments on commit e0d7416

Please sign in to comment.