定制方案提供应用名称更换

This commit is contained in:
aixianling
2022-11-11 17:13:36 +08:00
parent 874851f6ee
commit 31d7c5b75d
2 changed files with 20 additions and 1 deletions

View File

@@ -19,6 +19,11 @@
<el-checkbox v-model="row.checked" @change="handleCheck(row)"/> <el-checkbox v-model="row.checked" @change="handleCheck(row)"/>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="$scopedSlots.options" slot="options" label="操作" align="center">
<template slot-scope="scope">
<slot name="options" v-bind="scope"/>
</template>
</el-table-column>
</ai-table> </ai-table>
</section> </section>
</template> </template>

View File

@@ -186,7 +186,17 @@
</el-form> </el-form>
</el-tab-pane> </el-tab-pane>
<el-tab-pane label="方案应用" lazy> <el-tab-pane label="方案应用" lazy>
<ai-lib-table :meta="appList" :isShowPagination="false" v-bind="$props" disabled :colConfigs="appListConfigs"/> <ai-lib-table :meta="appList" :isShowPagination="false" v-bind="$props" disabled :colConfigs="appListConfigs">
<template slot="options" slot-scope="{row}">
<ai-dialog-btn text="编辑" :customFooter="false" dialogTitle="应用配置" width="500px" @onConfirm="handleAppEdit(row)">
<el-form size="small" label-width="80px">
<el-form-item label="应用名称">
<el-input v-model="row.label" clearable placeholder="请输入应用名称"/>
</el-form-item>
</el-form>
</ai-dialog-btn>
</template>
</ai-lib-table>
</el-tab-pane> </el-tab-pane>
</el-tabs> </el-tabs>
</template> </template>
@@ -318,6 +328,10 @@ export default {
}, },
handleTabbarDelete(i) { handleTabbarDelete(i) {
this.tabBar.list?.splice(i, 1) this.tabBar.list?.splice(i, 1)
},
handleAppEdit(row) {
const i = this.form.appList.findIndex(e => e.id == row.id)
this.form.appList.splice(i, 1, row)
} }
}, },
created() { created() {