Skip to content

Commit 438ae8d

Browse files
committed
product:优化商品属性项的代码
1 parent 6c4ffc8 commit 438ae8d

File tree

2 files changed

+1
-33
lines changed

2 files changed

+1
-33
lines changed

src/api/mall/product/property.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ export function getPropertyList(query) {
5757
// 获得属性项列表
5858
export function getPropertyListAndValue(query) {
5959
return request({
60-
url: '/product/property/listAndValue',
60+
url: '/product/property/get-value-list',
6161
method: 'get',
6262
params: query
6363
})

src/views/mall/product/property/index.vue

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -41,11 +41,6 @@
4141
</router-link>
4242
</template>
4343
</el-table-column>
44-
<el-table-column label="开启状态" align="center" prop="status">
45-
<template slot-scope="scope">
46-
<dict-tag :type="DICT_TYPE.COMMON_STATUS" :value="scope.row.status"/>
47-
</template>
48-
</el-table-column>
4944
<el-table-column label="创建时间" align="center" prop="createTime" width="180">
5045
<template slot-scope="scope">
5146
<span>{{ parseTime(scope.row.createTime) }}</span>
@@ -74,13 +69,6 @@
7469
<el-form-item label="名称" prop="name">
7570
<el-input v-model="form.name" placeholder="请输入名称" />
7671
</el-form-item>
77-
<el-form-item label="状态" prop="status">
78-
<el-radio-group v-model="form.status">
79-
<el-radio v-for="dict in this.getDictDatas(DICT_TYPE.COMMON_STATUS)"
80-
:key="dict.value" :label="parseInt(dict.value)">{{ dict.label }}
81-
</el-radio>
82-
</el-radio-group>
83-
</el-form-item>
8472
<el-form-item label="备注" prop="remark">
8573
<el-input v-model="form.remark" placeholder="备注" />
8674
</el-form-item>
@@ -121,7 +109,6 @@ export default {
121109
pageNo: 1,
122110
pageSize: 10,
123111
name: null,
124-
status: null,
125112
createTime: []
126113
},
127114
// 表单参数
@@ -135,9 +122,6 @@ export default {
135122
rules: {
136123
name: [
137124
{ required: true, message: "名称不能为空", trigger: "blur" }
138-
],
139-
status: [
140-
{ required: true, message: "状态不能为空", trigger: "blur" }
141125
]
142126
}
143127
};
@@ -165,7 +149,6 @@ export default {
165149
reset() {
166150
this.form = {
167151
name:'',
168-
status:'',
169152
remark:"",
170153
id: null,
171154
};
@@ -230,21 +213,6 @@ export default {
230213
this.$modal.msgSuccess("删除成功");
231214
}).catch(() => {});
232215
},
233-
/** 导出按钮操作 */
234-
handleExport() {
235-
// 处理查询参数
236-
let params = {...this.queryParams};
237-
params.pageNo = undefined;
238-
params.pageSize = undefined;
239-
// 执行导出
240-
this.$modal.confirm('是否确认导出所有名称数据项?').then(() => {
241-
this.exportLoading = true;
242-
return exportPropertyExcel(params);
243-
}).then(response => {
244-
this.$download.excel(response, '名称.xls');
245-
this.exportLoading = false;
246-
}).catch(() => {});
247-
},
248216
}
249217
};
250218
</script>

0 commit comments

Comments
 (0)