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

1

parent d3d00906
...@@ -2,6 +2,9 @@ ...@@ -2,6 +2,9 @@
import http from "../request/http"; import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL; let baseURL = process.env.VUE_APP_API_BASE_URL;
// ----------ps-----------------
// 查询产品信息列表 // 查询产品信息列表
export function getProduct(params) { export function getProduct(params) {
return http.post(`${baseURL}/zwfw/product/list`, params); return http.post(`${baseURL}/zwfw/product/list`, params);
...@@ -13,5 +16,11 @@ export function saveProduct(params) { ...@@ -13,5 +16,11 @@ export function saveProduct(params) {
} }
// 产品信息 // 产品信息
export function deleteProduct(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 @@ ...@@ -4,7 +4,7 @@
<h3>产品管理</h3> <h3>产品管理</h3>
<h4> <h4>
<a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" /> <a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" />
<button class="search_btn btn"> <button class="search_btn btn" @click="getList">
<span>查询</span> <span>查询</span>
</button> </button>
</h4> </h4>
...@@ -24,9 +24,11 @@ ...@@ -24,9 +24,11 @@
</a-button> </a-button>
</p> </p>
<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-button>
</a-popconfirm>
</p> </p>
</div> </div>
</template> </template>
...@@ -41,6 +43,8 @@ ...@@ -41,6 +43,8 @@
<li @click="routerpush3(item)">文档资料<a-icon type="right" /></li> <li @click="routerpush3(item)">文档资料<a-icon type="right" /></li>
</ul> </ul>
</li> </li>
<div class="not-data" v-if="!listData.length">暂无数据</div>
</ul> </ul>
</div> </div>
<AddEditAppName ref="AddEditAppName" /> <AddEditAppName ref="AddEditAppName" />
...@@ -66,10 +70,16 @@ export default { ...@@ -66,10 +70,16 @@ export default {
}, },
methods: { methods: {
delModal(item) { delModal(item) {
getProduct({ deleteProduct({
id: item.id id: item.id
}).then((res) => { }).then((res) => {
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
}) })
}, },
getList() { getList() {
...@@ -123,6 +133,13 @@ export default { ...@@ -123,6 +133,13 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.not-data{
line-height: 100px;
text-align: center;
width: 100%;
color: #999;
font-size: 14px;
}
@headerH: 4.5rem; @headerH: 4.5rem;
.Container { .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