Commit 992ed4ec authored by 彭松's avatar 彭松

1

parent d3d00906
......@@ -2,6 +2,9 @@
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL;
// ----------ps-----------------
// 查询产品信息列表
export function getProduct(params) {
return http.post(`${baseURL}/zwfw/product/list`, params);
......@@ -13,5 +16,11 @@ export function saveProduct(params) {
}
// 产品信息
export function deleteProduct(params) {
return http.post(`${baseURL}/zwfw/product/delete`, params);
return http.get(`${baseURL}/zwfw/product/delete`, params);
}
//-------------xj: --------------------
......@@ -4,7 +4,7 @@
<h3>产品管理</h3>
<h4>
<a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" />
<button class="search_btn btn">
<button class="search_btn btn" @click="getList">
<span>查询</span>
</button>
</h4>
......@@ -24,9 +24,11 @@
</a-button>
</p>
<p>
<a-button type="link" size="small" style="color: #ff4d4f" @click="delModal(item)">
<a-popconfirm title="确定要删除此产品吗?" ok-text="Yes" cancel-text="No" @confirm="delModal(item)">
<a-button type="link" size="small" style="color: #ff4d4f">
删除
</a-button>
</a-popconfirm>
</p>
</div>
</template>
......@@ -41,6 +43,8 @@
<li @click="routerpush3(item)">文档资料<a-icon type="right" /></li>
</ul>
</li>
<div class="not-data" v-if="!listData.length">暂无数据</div>
</ul>
</div>
<AddEditAppName ref="AddEditAppName" />
......@@ -66,10 +70,16 @@ export default {
},
methods: {
delModal(item) {
getProduct({
deleteProduct({
id: item.id
}).then((res) => {
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
getList() {
......@@ -123,6 +133,13 @@ export default {
</script>
<style lang="less" scoped>
.not-data{
line-height: 100px;
text-align: center;
width: 100%;
color: #999;
font-size: 14px;
}
@headerH: 4.5rem;
.Container {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment