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

1

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