Commit 1d19e9fb authored by 彭松's avatar 彭松

1

parent c08f11df
......@@ -11,6 +11,3 @@ VUE_APP_API_PHP_URL=http://8.136.255.30:8090
#正式
VUE_APP_API_PRP_RUL=http://112.19.80.237:11007
#易政秀报表
VUE_APP_API_TEST_RUL=http://8.136.255.30
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_TEST_RUL
let baseURL = "http://8.136.255.30"
let proURL = process.env.VUE_APP_API_PRP_RUL;
// 查询客户管理列表
......
......@@ -191,3 +191,13 @@ export function getImpossibleInfo(params) {
export function getKqalert(params) {
return http.get(`${BASEURL}/admin/kqalert/list`, params);
}
// 查询产品信息列表
export function getProduct(params) {
return http.post(`${baseURL}/zwfw/product/list`, params);
}
// 查询产品信息列表
export function saveProduct(params) {
return http.post(`${baseURL}/zwfw/product/save`, params);
}
<template>
<a-modal
:title="VisibleTitle"
:centered="true"
:destroyOnClose="true"
:visible="Visible"
@cancel="Visible = false"
width="30%"
>
<a-form-model
:label-col="{
span: 5,
}"
:wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appInfoFome"
:model="appInfoFome"
:rules="appInfoRules"
>
<a-form-model-item label="产品名称" prop="appName">
<a-input
placeholder="请输入产品名称"
allowClear
v-model="appInfoFome.appName"
/>
<a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false"
width="30%">
<a-form-model :label-col="{
span: 5,
}" :wrapper-col="{
span: 19,
}" layout="horizontal" ref="appInfoFome" :model="appInfoFome" :rules="appInfoRules">
<a-form-model-item label="产品名称" prop="productName">
<a-input placeholder="请输入产品名称" allowClear v-model="appInfoFome.productName" />
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button @click="resetForm">重置</a-button>
</template>
</a-modal>
</template>
<script>
import { saveProduct } from "@/api/dataAdmin.js";
export default {
name: "PortalAdminVueAddEditAppName",
data() {
......@@ -42,14 +26,15 @@ export default {
Visible: false, //模态
VisibleTitle: "新增产品",
appInfoFome: {
appName: undefined,
productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId"))
}, //页面表单信息
appInfoRules: {
appName: [
productName: [
{
required: true, //是否必选
whitespace: true, //必选时,空格是否会被视为错误
message: "请输入用户名称",
message: "请输入产品名称",
trigger: "blur",
},
// {
......@@ -61,12 +46,22 @@ export default {
};
},
mounted() {},
mounted() { },
methods: {
Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => {
if (valid) {
console.log(this.appInfoFome);
saveProduct(this.appInfoFome).then(res => {
let { code, msg } = res
if (code == 1) {
this.$message.success('保存成功');
this.resetForm();
this.Visible = false
this.$parent.getList()
} else {
this.$message.error(msg);
}
})
} else {
this.$message.error(`请完善表单信息!`);
return false;
......@@ -75,7 +70,7 @@ export default {
},
resetForm() {
this.$nextTick(() => {
this.$refs.appInfoFome.resetFields();
this.appInfoFome.productName = ''
});
},
},
......
......@@ -10,16 +10,16 @@
</h4>
</div>
<div class="main">
<a-button type="primary" class="addclass add_btn" ghost @click="showModal(2)">
<a-button type="primary" class="addclass add_btn" ghost @click="showModal()">
新增产品
</a-button>
<ul class="content">
<li class="list" v-for="item of 5" :key="item">
<li class="list" v-for="item, index of listData" :key="index">
<a-popover placement="leftBottom">
<template slot="content">
<div class="popoverContent">
<p>
<a-button type="link" size="small" style="color: #0595fd" @click="showModal(1)">
<a-button type="link" size="small" style="color: #0595fd" @click="showModal(item)">
编辑
</a-button>
</p>
......@@ -34,7 +34,7 @@
</a-popover>
<img src="~@/assets/images/u52.png" alt="" class="app-img" />
<div class="app-name">排号系统</div>
<div class="app-name">{{ item.productName }}</div>
<ul class="app-option">
<li @click="routerpush1">接口管理<a-icon type="right" /></li>
<li @click="routerpush2">应用管理<a-icon type="right" /></li>
......@@ -48,29 +48,44 @@
</template>
<script>
import { getProduct } from "@/api/dataAdmin.js";
import AddEditAppName from "./components/addEditAppName.vue";
export default {
name: "PortalAdminVueProductManage",
data() {
return {
searchVal: undefined,
searchVal: '',
listData: []
};
},
components: {
AddEditAppName,
},
mounted() { },
mounted() {
this.getList()
},
methods: {
getList() {
getProduct({
page: 1,
size: -1,
productName: this.searchVal
}).then((res) => {
this.listData = res.data.data
})
},
pushroeuter() {
this.$router.push({
path: "/home/thePlatformIsSet/portDocument",
// query: { testoption: "test001" },
});
},
showModal(type) {
if (type == 1) {
showModal(item) {
if (item) {
this.$refs.AddEditAppName.VisibleTitle = "编辑";
} else if (type == 2) {
this.$refs.AddEditAppName.appInfoFome.id = item.id
this.$refs.AddEditAppName.appInfoFome.appName = item.productName
} else {
this.$refs.AddEditAppName.VisibleTitle = "新增产品";
}
this.$refs.AddEditAppName.Visible = true;
......@@ -319,4 +334,5 @@ export default {
rgba(108, 53, 247, 1) 85%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
}</style>
}
</style>
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