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