推荐产品修复
This commit is contained in:
@@ -14,7 +14,7 @@
|
||||
@getList="getTableData" :col-configs="colConfigs" :dict="dict">
|
||||
<el-table-column slot="options" label="操作" fixed="right" align="center" width="200px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button type="text" @click="handleEdit(row.id)">编辑</el-button>
|
||||
<el-button type="text" @click="handleEdit(row)">编辑</el-button>
|
||||
<el-button type="text" @click="handleDelete(row.id)">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
@@ -79,7 +79,7 @@ export default {
|
||||
{required: true, message: "请输入推荐顺序"},
|
||||
{pattern: /^[1-7]$/, message: "请输入1~7之间的整数"}
|
||||
],
|
||||
productId: [{required: true, message: "请选择推荐产品",trigger:"blur"}],
|
||||
productId: [{required: true, message: "请选择推荐产品", trigger: "blur"}],
|
||||
organizationType: [{required: true, message: "请选择机构类型"}],
|
||||
},
|
||||
productList: []
|
||||
@@ -91,17 +91,15 @@ export default {
|
||||
params: {...this.page, ...this.search}
|
||||
}).then(res => {
|
||||
if (res?.data) {
|
||||
this.tableData = res.data?.records.map(e => {
|
||||
let guaranteeModeLabel = e.guaranteeMode.split(",").map(g => this.dict.getLabel("productGuaranteeMode", g))?.toString()
|
||||
return {...e, guaranteeModeLabel}
|
||||
})
|
||||
this.tableData = res.data?.records
|
||||
this.page.total = res.data.total
|
||||
}
|
||||
})
|
||||
},
|
||||
handleEdit(row) {
|
||||
this.dialog = false
|
||||
this.dialog = true
|
||||
this.form = JSON.parse(JSON.stringify(row))
|
||||
this.getProducts()
|
||||
},
|
||||
handleDelete(ids) {
|
||||
this.$confirm("是否要删除该推荐?").then(() => {
|
||||
@@ -122,6 +120,7 @@ export default {
|
||||
if (res?.code == 0) {
|
||||
this.$message.success("提交成功!")
|
||||
this.getTableData()
|
||||
this.dialog = false
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user