branch_lyj
Liuyujie 7 months ago
parent d4508b8dae
commit aa13a6a04d

@ -1,9 +1,14 @@
<template>  <template>
<!-- 整个页面的容器 -->
<div class="app-container"> <div class="app-container">
<!-- 筛选搜索区域的卡片 -->
<el-card class="filter-container" shadow="never"> <el-card class="filter-container" shadow="never">
<div> <div>
<!-- 搜索图标 -->
<i class="el-icon-search"></i> <i class="el-icon-search"></i>
<!-- 显示筛选搜索文字 -->
<span>筛选搜索</span> <span>筛选搜索</span>
<!-- 查询搜索按钮点击触发handleSearchList方法按钮样式为小型主色调 -->
<el-button <el-button
style="float:right" style="float:right"
type="primary" type="primary"
@ -11,6 +16,7 @@
size="small"> size="small">
查询搜索 查询搜索
</el-button> </el-button>
<!-- 重置按钮点击触发handleResetSearch方法按钮样式为小型与查询搜索按钮有一定间隔 -->
<el-button <el-button
style="float:right;margin-right: 15px" style="float:right;margin-right: 15px"
@click="handleResetSearch()" @click="handleResetSearch()"
@ -19,12 +25,18 @@
</el-button> </el-button>
</div> </div>
<div style="margin-top: 15px"> <div style="margin-top: 15px">
<!-- 内联表单绑定数据模型为listQuery表单尺寸为小标签宽度为140px -->
<el-form :inline="true" :model="listQuery" size="small" label-width="140px"> <el-form :inline="true" :model="listQuery" size="small" label-width="140px">
<!-- 商品名称表单项 -->
<el-form-item label="商品名称:"> <el-form-item label="商品名称:">
<!-- 输入框双向绑定listQuery.productName设置了占位提示文字 -->
<el-input v-model="listQuery.productName" class="input-width" placeholder="商品名称"></el-input> <el-input v-model="listQuery.productName" class="input-width" placeholder="商品名称"></el-input>
</el-form-item> </el-form-item>
<!-- 推荐状态表单项 -->
<el-form-item label="推荐状态:"> <el-form-item label="推荐状态:">
<!-- 下拉选择框双向绑定listQuery.recommendStatus有清除功能设置了占位提示文字 -->
<el-select v-model="listQuery.recommendStatus" placeholder="全部" clearable class="input-width"> <el-select v-model="listQuery.recommendStatus" placeholder="全部" clearable class="input-width">
<!-- 循环生成下拉选项每个选项的keylabelvalue根据recommendOptions中的数据来设置 -->
<el-option v-for="item in recommendOptions" <el-option v-for="item in recommendOptions"
:key="item.value" :key="item.value"
:label="item.label" :label="item.label"
@ -35,26 +47,37 @@
</el-form> </el-form>
</div> </div>
</el-card> </el-card>
<!-- 操作区域的卡片 -->
<el-card class="operate-container" shadow="never"> <el-card class="operate-container" shadow="never">
<!-- 图标 -->
<i class="el-icon-tickets"></i> <i class="el-icon-tickets"></i>
<!-- 显示数据列表文字 -->
<span>数据列表</span> <span>数据列表</span>
<!-- 选择商品按钮点击触发handleSelectProduct方法按钮尺寸为迷你型 -->
<el-button size="mini" class="btn-add" @click="handleSelectProduct()"></el-button> <el-button size="mini" class="btn-add" @click="handleSelectProduct()"></el-button>
</el-card> </el-card>
<!-- 表格容器 -->
<div class="table-container"> <div class="table-container">
<!-- el-table组件绑定数据为list设置宽度为100%监听选择变化事件根据listLoading状态显示加载动画有边框 -->
<el-table ref="newProductTable" <el-table ref="newProductTable"
:data="list" :data="list"
style="width: 100%;" style="width: 100%;"
@selection-change="handleSelectionChange" @selection-change="handleSelectionChange"
v-loading="listLoading" border> v-loading="listLoading" border>
<!-- 选择列宽度为60px内容居中 -->
<el-table-column type="selection" width="60" align="center"></el-table-column> <el-table-column type="selection" width="60" align="center"></el-table-column>
<!-- 编号列宽度为120px内容居中通过插槽作用域展示对应行的id数据 -->
<el-table-column label="编号" width="120" align="center"> <el-table-column label="编号" width="120" align="center">
<template slot-scope="scope">{{scope.row.id}}</template> <template slot-scope="scope">{{scope.row.id}}</template>
</el-table-column> </el-table-column>
<!-- 商品名称列内容居中通过插槽作用域展示对应行的productName数据 -->
<el-table-column label="商品名称" align="center"> <el-table-column label="商品名称" align="center">
<template slot-scope="scope">{{scope.row.productName}}</template> <template slot-scope="scope">{{scope.row.productName}}</template>
</el-table-column> </el-table-column>
<!-- 是否推荐列宽度为200px内容居中包含一个开关组件 -->
<el-table-column label="是否推荐" width="200" align="center"> <el-table-column label="是否推荐" width="200" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 开关组件监听状态改变事件设置了激活和未激活的值双向绑定对应行的recommendStatus数据 -->
<el-switch <el-switch
@change="handleRecommendStatusStatusChange(scope.$index, scope.row)" @change="handleRecommendStatusStatusChange(scope.$index, scope.row)"
:active-value="1" :active-value="1"
@ -63,18 +86,23 @@
</el-switch> </el-switch>
</template> </template>
</el-table-column> </el-table-column>
<!-- 排序列宽度为160px内容居中通过插槽作用域展示对应行的sort数据 -->
<el-table-column label="排序" width="160" align="center"> <el-table-column label="排序" width="160" align="center">
<template slot-scope="scope">{{scope.row.sort}}</template> <template slot-scope="scope">{{scope.row.sort}}</template>
</el-table-column> </el-table-column>
<!-- 状态列宽度为160px内容居中通过管道formatRecommendStatus格式化对应行的recommendStatus数据来展示 -->
<el-table-column label="状态" width="160" align="center"> <el-table-column label="状态" width="160" align="center">
<template slot-scope="scope">{{scope.row.recommendStatus | formatRecommendStatus}}</template> <template slot-scope="scope">{{scope.row.recommendStatus | formatRecommendStatus}}</template>
</el-table-column> </el-table-column>
<!-- 操作列宽度为180px内容居中包含设置排序和删除两个按钮 -->
<el-table-column label="操作" width="180" align="center"> <el-table-column label="操作" width="180" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<!-- 设置排序按钮点击触发handleEditSort方法按钮尺寸为迷你型文本样式 -->
<el-button size="mini" <el-button size="mini"
type="text" type="text"
@click="handleEditSort(scope.$index, scope.row)">设置排序 @click="handleEditSort(scope.$index, scope.row)">设置排序
</el-button> </el-button>
<!-- 删除按钮点击触发handleDelete方法按钮尺寸为迷你型文本样式 -->
<el-button size="mini" <el-button size="mini"
type="text" type="text"
@click="handleDelete(scope.$index, scope.row)">删除 @click="handleDelete(scope.$index, scope.row)">删除
@ -83,10 +111,13 @@
</el-table-column> </el-table-column>
</el-table> </el-table>
</div> </div>
<!-- 批量操作容器 -->
<div class="batch-operate-container"> <div class="batch-operate-container">
<!-- 下拉选择框用于选择批量操作类型双向绑定operateType设置了占位提示文字 -->
<el-select <el-select
size="small" size="small"
v-model="operateType" placeholder="批量操作"> v-model="operateType" placeholder="批量操作">
<!-- 循环生成下拉选项每个选项的keylabelvalue根据operates中的数据来设置 -->
<el-option <el-option
v-for="item in operates" v-for="item in operates"
:key="item.value" :key="item.value"
@ -94,6 +125,7 @@
:value="item.value"> :value="item.value">
</el-option> </el-option>
</el-select> </el-select>
<!-- 确定按钮点击触发handleBatchOperate方法按钮样式为小型主色调与下拉选择框有一定间隔 -->
<el-button <el-button
style="margin-left: 20px" style="margin-left: 20px"
class="search-button" class="search-button"
@ -103,7 +135,9 @@
确定 确定
</el-button> </el-button>
</div> </div>
<!-- 分页容器 -->
<div class="pagination-container"> <div class="pagination-container">
<!-- el-pagination分页组件设置了背景色监听页面尺寸改变和当前页改变事件配置了布局页面尺寸可选页面尺寸列表当前页总数据量等属性 -->
<el-pagination <el-pagination
background background
@size-change="handleSizeChange" @size-change="handleSizeChange"
@ -115,27 +149,36 @@
:total="total"> :total="total">
</el-pagination> </el-pagination>
</div> </div>
<!-- 选择商品的对话框 -->
<el-dialog title="选择商品" :visible.sync="selectDialogVisible" width="50%"> <el-dialog title="选择商品" :visible.sync="selectDialogVisible" width="50%">
<!-- 输入框双向绑定dialogData.listQuery.keyword设置了宽度样式占位提示文字包含一个搜索按钮 -->
<el-input v-model="dialogData.listQuery.keyword" <el-input v-model="dialogData.listQuery.keyword"
style="width: 250px;margin-bottom: 20px" style="width: 250px;margin-bottom: 20px"
size="small" size="small"
placeholder="商品名称搜索"> placeholder="商品名称搜索">
<el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button> <el-button slot="append" icon="el-icon-search" @click="handleSelectSearch()"></el-button>
</el-input> </el-input>
<!-- el-table组件用于对话框内展示数据绑定数据为dialogData.list监听选择变化事件有边框 -->
<el-table :data="dialogData.list" <el-table :data="dialogData.list"
@selection-change="handleDialogSelectionChange" border> @selection-change="handleDialogSelectionChange" border>
<!-- 选择列宽度为60px内容居中 -->
<el-table-column type="selection" width="60" align="center"></el-table-column> <el-table-column type="selection" width="60" align="center"></el-table-column>
<!-- 商品名称列内容居中通过插槽作用域展示对应行的name数据 -->
<el-table-column label="商品名称" align="center"> <el-table-column label="商品名称" align="center">
<template slot-scope="scope">{{scope.row.name}}</template> <template slot-scope="scope">{{scope.row.name}}</template>
</el-table-column> </el-table-column>
<!-- 货号列宽度为160px内容居中通过插槽作用域展示对应行的productSn数据格式化展示格式 -->
<el-table-column label="货号" width="160" align="center"> <el-table-column label="货号" width="160" align="center">
<template slot-scope="scope">NO.{{scope.row.productSn}}</template> <template slot-scope="scope">NO.{{scope.row.productSn}}</template>
</el-table-column> </el-table-column>
<!-- 价格列宽度为120px内容居中通过插槽作用域展示对应行的price数据格式化展示格式 -->
<el-table-column label="价格" width="120" align="center"> <el-table-column label="价格" width="120" align="center">
<template slot-scope="scope">{{scope.row.price}}</template> <template slot-scope="scope">{{scope.row.price}}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- 对话框内的分页容器 -->
<div class="pagination-container"> <div class="pagination-container">
<!-- el-pagination分页组件设置了背景色监听对话框内页面尺寸改变和当前页改变事件配置了布局页面尺寸可选页面尺寸列表当前页总数据量等属性 -->
<el-pagination <el-pagination
background background
@size-change="handleDialogSizeChange" @size-change="handleDialogSizeChange"
@ -149,282 +192,334 @@
</div> </div>
<div style="clear: both;"></div> <div style="clear: both;"></div>
<div slot="footer"> <div slot="footer">
<!-- 取消按钮点击隐藏对话框按钮尺寸为小型 -->
<el-button size="small" @click="selectDialogVisible = false"> </el-button> <el-button size="small" @click="selectDialogVisible = false"> </el-button>
<!-- 确定按钮点击触发handleSelectDialogConfirm方法按钮尺寸为小型主色调 -->
<el-button size="small" type="primary" @click="handleSelectDialogConfirm()"> </el-button> <el-button size="small" type="primary" @click="handleSelectDialogConfirm()"> </el-button>
</div> </div>
</el-dialog> </el-dialog>
<!-- 设置排序的对话框 -->
<el-dialog title="设置排序" <el-dialog title="设置排序"
:visible.sync="sortDialogVisible" :visible.sync="sortDialogVisible"
width="40%"> width="40%">
<!-- el-form表单组件绑定数据模型为sortDialogData设置标签宽度 -->
<el-form :model="sortDialogData" <el-form :model="sortDialogData"
label-width="150px"> label-width="150px">
<!-- 排序表单项 -->
<el-form-item label="排序:"> <el-form-item label="排序:">
<!-- 输入框双向绑定sortDialogData.sort设置了宽度 -->
<el-input v-model="sortDialogData.sort" style="width: 200px"></el-input> <el-input v-model="sortDialogData.sort" style="width: 200px"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer"> <span slot="footer">
<!-- 取消按钮点击隐藏对话框按钮尺寸为小型 -->
<el-button @click="sortDialogVisible = false" size="small"> </el-button> <el-button @click="sortDialogVisible = false" size="small"> </el-button>
<!-- 确定按钮点击触发handleUpdateSort方法按钮尺寸为小型主色调 -->
<el-button type="primary" @click="handleUpdateSort" size="small"> </el-button> <el-button type="primary" @click="handleUpdateSort" size="small"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import {fetchList,updateRecommendStatus,deleteNewProduct,createNewProduct,updateNewProductSort} from '@/api/newProduct'; // '@/api/newProduct'
import {fetchList as fetchProductList} from '@/api/product'; import {fetchList,updateRecommendStatus,deleteNewProduct,createNewProduct,updateNewProductSort} from '@/api/newProduct';
// '@/api/product'fetchListfetchProductList
import {fetchList as fetchProductList} from '@/api/product';
const defaultListQuery = { //
pageNum: 1, const defaultListQuery = {
pageSize: 5, pageNum: 1,
productName: null, pageSize: 5,
recommendStatus: null productName: null,
}; recommendStatus: null
const defaultRecommendOptions = [ };
{ // ''0
label: '未推荐', const defaultRecommendOptions = [
value: 0 {
}, label: '未推荐',
{ value: 0
label: '推荐中', },
value: 1 {
} label: '推荐中',
]; value: 1
export default { }
name: 'newProductList', ];
data() {
return { export default {
listQuery: Object.assign({}, defaultListQuery), name: 'newProductList',
recommendOptions: Object.assign({}, defaultRecommendOptions), data() {
return {
// defaultListQuery
listQuery: Object.assign({}, defaultListQuery),
// defaultRecommendOptions
recommendOptions: Object.assign({}, defaultRecommendOptions),
// null
list: null,
// null
total: null,
// false
listLoading: false,
//
multipleSelection: [],
// ''0
operates: [
{
label: "设为推荐",
value: 0
},
{
label: "取消推荐",
value: 1
},
{
label: "删除",
value: 2
}
],
// null
operateType: null,
// false
selectDialogVisible:false,
dialogData:{
// null
list: null, list: null,
// null
total: null, total: null,
listLoading: false, //
multipleSelection: [], multipleSelection:[],
operates: [ listQuery:{
{ // null
label: "设为推荐", keyword: null,
value: 0 // 1
}, pageNum: 1,
{ // 5
label: "取消推荐", pageSize: 5
value: 1 }
}, },
{ // false
label: "删除", sortDialogVisible:false,
value: 2 // id
} sortDialogData:{sort:0,id:null}
], }
operateType: null, },
selectDialogVisible:false, created() {
dialogData:{ // getList
list: null, this.getList();
total: null, },
multipleSelection:[], filters:{
listQuery:{ // formatRecommendStatus
keyword: null, formatRecommendStatus(status){
pageNum: 1, if(status===1){ //10''''
pageSize: 5 return '推荐中';
} }else{
}, return '未推荐';
sortDialogVisible:false,
sortDialogData:{sort:0,id:null}
} }
}
},
methods: {
// defaultListQuery
handleResetSearch() {
this.listQuery = Object.assign({}, defaultListQuery);
}, },
created() { // 1getList
handleSearchList() {
this.listQuery.pageNum = 1;
this.getList(); this.getList();
}, },
filters:{ // multipleSelection
formatRecommendStatus(status){ handleSelectionChange(val){
if(status===1){ this.multipleSelection = val;
return '推荐中'; },
}else{ // 1getList
return '未推荐'; handleSizeChange(val) {
} this.listQuery.pageNum = 1;
this.listQuery.pageSize = val;
this.getList();
},
// getList
handleCurrentChange(val) {
this.listQuery.pageNum = val;
this.getList();
},
// updateRecommendStatusStatusid
handleRecommendStatusStatusChange(index,row){
this.updateRecommendStatusStatus(row.id,row.recommendStatus);
},
// deleteProductid
handleDelete(index,row){
this.deleteProduct(row.id);
},
//
handleBatchOperate(){
if (this.multipleSelection < 1) {
this.$message({
message: '请选择一条记录',
type: 'warning',
duration: 1000
});
return;
}
let ids = []; //
for (let i = 0; i < this.multipleSelection.length; i++) {
ids.push(this.multipleSelection[i].id);
}
if (this.operateType === 0) {
//
this.updateRecommendStatusStatus(ids,1);
} else if (this.operateType === 1) {
//
this.updateRecommendStatusStatus(ids,0);
} else if(this.operateType===2){
//
this.deleteProduct(ids);
}else {
this.$message({
message: '请选择批量操作类型',
type: 'warning',
duration: 1000
});
} }
}, },
methods: { // getDialogList
handleResetSearch() { handleSelectProduct(){
this.listQuery = Object.assign({}, defaultListQuery); this.selectDialogVisible=true;
}, this.getDialogList();
handleSearchList() { },
this.listQuery.pageNum = 1; // getDialogList
this.getList(); handleSelectSearch(){
}, this.getDialogList();
handleSelectionChange(val){ },
this.multipleSelection = val; // 1getDialogList
}, handleDialogSizeChange(val) {
handleSizeChange(val) { this.dialogData.listQuery.pageNum = 1;
this.listQuery.pageNum = 1; this.dialogData.listQuery.pageSize = val;
this.listQuery.pageSize = val; this.getDialogList();
this.getList(); },
}, // getDialogList
handleCurrentChange(val) { handleDialogCurrentChange(val) {
this.listQuery.pageNum = val; this.dialogData.listQuery.pageNum = val;
this.getList(); this.getDialogList();
}, },
handleRecommendStatusStatusChange(index,row){ // dialogData.multipleSelection
this.updateRecommendStatusStatus(row.id,row.recommendStatus); handleDialogSelectionChange(val){
}, this.dialogData.multipleSelection = val;
handleDelete(index,row){ },
this.deleteProduct(row.id); //
}, handleSelectDialogConfirm(){
handleBatchOperate(){ if (this.dialogData.multipleSelection < 1) {
if (this.multipleSelection < 1) { this.$message({
message: '请选择一条记录',
type: 'warning',
duration: 1000
});
return;
}
let selectProducts = []; //
for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
selectProducts.push({
productId:this.dialogData.multipleSelection[i].id,
productName:this.dialogData.multipleSelection[i].name
});
}
this.$confirm('使用要进行添加操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
createNewProduct(selectProducts).then(response=>{ //createNewProduct
this.selectDialogVisible=false;
this.dialogData.multipleSelection=[];
this.getList(); //
this.$message({ this.$message({
message: '请选择一条记录', type: 'success',
type: 'warning', message: '添加成功!'
duration: 1000
}); });
return; });
} });
let ids = []; },
for (let i = 0; i < this.multipleSelection.length; i++) { //
ids.push(this.multipleSelection[i].id); handleEditSort(index,row){
} this.sortDialogVisible=true;
if (this.operateType === 0) { this.sortDialogData.sort=row.sort;
// this.sortDialogData.id=row.id; //id便
this.updateRecommendStatusStatus(ids,1); },
} else if (this.operateType === 1) { //
// handleUpdateSort(){
this.updateRecommendStatusStatus(ids,0); this.$confirm('是否要修改排序?', '提示', { //
} else if(this.operateType===2){ confirmButtonText: '确定',
// cancelButtonText: '取消',
this.deleteProduct(ids); type: 'warning'
}else { }).then(() => {
updateNewProductSort(this.sortDialogData).then(response=>{ //updateNewProductSort
this.sortDialogVisible=false;
this.getList(); //
this.$message({ this.$message({
message: '请选择批量操作类型', type: 'success',
type: 'warning', message: '删除成功!'
duration: 1000
}); });
} });
}, })
handleSelectProduct(){ },
this.selectDialogVisible=true; //
this.getDialogList(); getList() {
}, this.listLoading = true; //true
handleSelectSearch(){ fetchList(this.listQuery).then(response => { //fetchList
this.getDialogList(); this.listLoading = false; //false
}, this.list = response.data.list; //
handleDialogSizeChange(val) { this.total = response.data.total;
this.dialogData.listQuery.pageNum = 1; })
this.dialogData.listQuery.pageSize = val; },
this.getDialogList(); //
}, updateRecommendStatusStatus(ids,status){
handleDialogCurrentChange(val) { this.$confirm('是否要修改推荐状态?', '提示', { //
this.dialogData.listQuery.pageNum = val; confirmButtonText: '确定',
this.getDialogList(); cancelButtonText: '取消',
}, type: 'warning'
handleDialogSelectionChange(val){ }).then(() => {
this.dialogData.multipleSelection = val; let params=new URLSearchParams(); //ididURLSearchParams
}, params.append("ids",ids);
handleSelectDialogConfirm(){ params.append("recommendStatus",status);
if (this.dialogData.multipleSelection < 1) { updateRecommendStatus(params).then(response=>{ //updateRecommendStatus
this.getList(); //
this.$message({ this.$message({
message: '请选择一条记录', type: 'success',
type: 'warning', message: '修改成功!'
duration: 1000
});
return;
}
let selectProducts = [];
for (let i = 0; i < this.dialogData.multipleSelection.length; i++) {
selectProducts.push({
productId:this.dialogData.multipleSelection[i].id,
productName:this.dialogData.multipleSelection[i].name
});
}
this.$confirm('使用要进行添加操作?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
createNewProduct(selectProducts).then(response=>{
this.selectDialogVisible=false;
this.dialogData.multipleSelection=[];
this.getList();
this.$message({
type: 'success',
message: '添加成功!'
});
}); });
}); });
}, }).catch(() => {
handleEditSort(index,row){ this.$message({ //
this.sortDialogVisible=true; type: 'success',
this.sortDialogData.sort=row.sort; message: '已取消操作!'
this.sortDialogData.id=row.id; });
}, this.getList();
handleUpdateSort(){ });
this.$confirm('是否要修改排序?', '提示', { },
confirmButtonText: '确定', //
cancelButtonText: '取消', deleteProduct(ids){
type: 'warning' this.$confirm('是否要删除该推荐?', '提示', { //
}).then(() => { confirmButtonText: '确定',
updateNewProductSort(this.sortDialogData).then(response=>{ cancelButtonText: '取消',
this.sortDialogVisible=false; type: 'warning'
this.getList(); }).then(() => {
this.$message({ let params=new URLSearchParams(); //ididURLSearchParams
type: 'success', params.append("ids",ids);
message: '删除成功!' deleteNewProduct(params).then(response=>{ //deleteNewProduct
}); this.getList(); //
});
})
},
getList() {
this.listLoading = true;
fetchList(this.listQuery).then(response => {
this.listLoading = false;
this.list = response.data.list;
this.total = response.data.total;
})
},
updateRecommendStatusStatus(ids,status){
this.$confirm('是否要修改推荐状态?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
let params=new URLSearchParams();
params.append("ids",ids);
params.append("recommendStatus",status);
updateRecommendStatus(params).then(response=>{
this.getList();
this.$message({
type: 'success',
message: '修改成功!'
});
});
}).catch(() => {
this.$message({ this.$message({
type: 'success', type: 'success',
message: '已取消操作!' message: '删除成功!'
}); });
this.getList();
}); });
}, })
deleteProduct(ids){ },
this.$confirm('是否要删除该推荐?', '提示', { //
confirmButtonText: '确定', getDialogList(){
cancelButtonText: '取消', fetchProductList(this.dialogData.listQuery).then(response=>{ //fetchProductList
type: 'warning' this.dialogData.list=response.data.list; //
}).then(() => { this.dialogData.total=response.data.total;
let params=new URLSearchParams(); })
params.append("ids",ids);
deleteNewProduct(params).then(response=>{
this.getList();
this.$message({
type: 'success',
message: '删除成功!'
});
});
})
},
getDialogList(){
fetchProductList(this.dialogData.listQuery).then(response=>{
this.dialogData.list=response.data.list;
this.dialogData.total=response.data.total;
})
}
} }
} }
}
</script> </script>
<style></style> <style></style>

Loading…
Cancel
Save