Commit 69b49b11 by 吴云建

fix

parent 1a36215f
Showing with 16 additions and 3 deletions
...@@ -2,9 +2,17 @@ ...@@ -2,9 +2,17 @@
<div class="h-100 pos-rel"> <div class="h-100 pos-rel">
<div class="scroll-wrap"> <div class="scroll-wrap">
<el-scrollbar class="h-100"> <el-scrollbar class="h-100">
<div class="top-actions">
<el-button v-for="action in actions"
:key="action.name"
@click="execute_action(action)"
type="text"
size="small"
>{{ action.label }}</el-button>
</div>
<div class="data-row" v-for="item in detailData" :key="item.label"> <div class="data-row" v-for="item in detailData" :key="item.label">
<span class="data-key">{{ item.label }}</span <span class="data-key">{{ item.label }}{{ item.label? ":" : "" }} </span
>: <span class="data-value" v-html="item.template"></span> ><span class="data-value" v-html="item.template"></span>
<span class="operation_field" v-if="item.actions && item.actions.length > 0"> <span class="operation_field" v-if="item.actions && item.actions.length > 0">
<el-button v-for="action in item.actions" <el-button v-for="action in item.actions"
:key="action.name" :key="action.name"
...@@ -55,6 +63,7 @@ export default class ChatModelDetail extends Vue { ...@@ -55,6 +63,7 @@ export default class ChatModelDetail extends Vue {
private detailData: DetailTypes.getDetailRequestResult["meta"]["header"]["field_groups"] | null = null private detailData: DetailTypes.getDetailRequestResult["meta"]["header"]["field_groups"] | null = null
private detailRow: DetailTypes.getDetailRequestResult["row"] | null = null private detailRow: DetailTypes.getDetailRequestResult["row"] | null = null
private keyField = "" private keyField = ""
private actions: DetailTypes.getDetailRequestResult["meta"]["actions"] | null = null
public async created() { public async created() {
await this.init(); await this.init();
...@@ -67,7 +76,8 @@ export default class ChatModelDetail extends Vue { ...@@ -67,7 +76,8 @@ export default class ChatModelDetail extends Vue {
.query(); .query();
this.detailData = data.meta.header.field_groups; this.detailData = data.meta.header.field_groups;
this.detailRow = data.row; this.detailRow = data.row;
this.keyField = data.meta.key_field this.keyField = data.meta.key_field;
this.actions = data.meta.actions;
} }
private goTodetail() { private goTodetail() {
...@@ -230,4 +240,7 @@ export default class ChatModelDetail extends Vue { ...@@ -230,4 +240,7 @@ export default class ChatModelDetail extends Vue {
padding: 0; padding: 0;
} }
} }
.top-actions {
padding: 0 20px;
}
</style> </style>
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 sign in to comment