Commit d5fd6361 authored by “yiyousong”'s avatar “yiyousong”
parents 020633d6 992ed4ec
...@@ -69,31 +69,12 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -69,31 +69,12 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
private DeviceBlackappService deviceBlackappService; private DeviceBlackappService deviceBlackappService;
/**
* @param params
* @param pageInfo
* @param context
* @return
* @throws AppException
*/
@Override
protected AppEntity findBefore(AppEntity params, PageInfo pageInfo, Context context) throws AppException {
return super.findBefore(params, pageInfo, context);
}
@Override @Override
protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException { protected void findAfter(AppEntity params, PageInfo pageInfo, Context context, List<AppEntity> list) throws AppException {
//判断是否存在设备编码。存在 查询设备编码应用黑名单 //判断是否存在设备编码。存在 查询设备编码应用黑名单
checkDeviceBlackApp(params, list); checkDeviceBlackApp(params, list);
//根据指定的idlist顺序进行排序 //根据指定的idlist顺序进行排序
sortAppByIdList(params, list); sortAppByIdList(params, list);
//统计站点
list.forEach(item -> {
List<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context);
item.setApplianceSiteScope(appEntityList.size());
item.setSiteIdList(appEntityList.stream().map(AppEntity::getSiteId).collect(Collectors.toList()));
//构建访问地址
SiteEntity siteEntity = siteService.getCache(item.getSiteId().toString());
String domainUrl = ""; String domainUrl = "";
if (!ObjectUtils.isEmpty(params.getServerName()) && Validator.isIpv4(params.getServerName())) { if (!ObjectUtils.isEmpty(params.getServerName()) && Validator.isIpv4(params.getServerName())) {
domainUrl = String.format("http://%s:%d", params.getServerName(), params.getServerPort() > 0 ? params.getServerPort() : 11078); domainUrl = String.format("http://%s:%d", params.getServerName(), params.getServerPort() > 0 ? params.getServerPort() : 11078);
...@@ -106,6 +87,13 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -106,6 +87,13 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
} }
} }
for (AppEntity item : list) {
List<AppEntity> appEntityList = this.find(new AppQuery().appCode(item.getAppCode()), context);
item.setApplianceSiteScope(appEntityList.size());
item.setSiteIdList(appEntityList.stream().map(AppEntity::getSiteId).collect(Collectors.toList()));
//构建访问地址
SiteEntity siteEntity = siteService.getCache(item.getSiteId().toString());
if (!ObjectUtils.isEmpty(siteEntity)) { if (!ObjectUtils.isEmpty(siteEntity)) {
//请求地址 http://domian/app/siteCode/appcode/html //请求地址 http://domian/app/siteCode/appcode/html
...@@ -127,7 +115,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L ...@@ -127,7 +115,7 @@ public class AppServiceImpl extends AbstractCRUDServiceImpl<AppDao, AppEntity, L
item.setAppIconUrl(item.getAppIconPath()); item.setAppIconUrl(item.getAppIconPath());
} }
}); };
super.findAfter(params, pageInfo, context, list); super.findAfter(params, pageInfo, context, list);
} }
......
...@@ -15,13 +15,17 @@ import java.util.List; ...@@ -15,13 +15,17 @@ import java.util.List;
@Data @Data
public class SkinBaseVo extends BaseEntityLong { public class SkinBaseVo extends BaseEntityLong {
/** 产品编码 */ /** 产品编码 */
private String productCode; private String productCode;
private String imageResolutionValue; private String imageResolutionValue;
private String serverName;
private Integer serverPort;
/** 属性列表 */ /** 属性列表 */
private List<SkinFieldEntity> skinFieldList; private List<SkinFieldEntity> skinFieldList;
......
package com.mortals.xhx.module.skin.service.impl; package com.mortals.xhx.module.skin.service.impl;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.net.URLDecoder; import cn.hutool.core.net.URLDecoder;
import cn.hutool.core.net.url.UrlBuilder; import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -78,31 +80,50 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk ...@@ -78,31 +80,50 @@ public class SkinBaseServiceImpl extends AbstractCRUDServiceImpl<SkinBaseDao, Sk
protected void findAfter(SkinBaseEntity entity, PageInfo pageInfo, Context context, List<SkinBaseEntity> list) throws AppException { protected void findAfter(SkinBaseEntity entity, PageInfo pageInfo, Context context, List<SkinBaseEntity> list) throws AppException {
Map<String, String> imageResolutionMap = paramService.getParamBySecondOrganize("SkinBase", "imageResolution"); Map<String, String> imageResolutionMap = paramService.getParamBySecondOrganize("SkinBase", "imageResolution");
list.stream().forEach(item -> {
String domainUrl = "";
if (!ObjectUtils.isEmpty(entity.getServerName()) && Validator.isIpv4(entity.getServerName())) {
domainUrl = String.format("http://%s:%d", entity.getServerName(), entity.getServerPort() > 0 ? entity.getServerPort() : 11078);
} else {
boolean isDomain = ReUtil.isMatch("^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})*\\.[a-zA-Z]{2,}$", entity.getServerName());
if (isDomain) {
domainUrl = String.format("https://%s", entity.getServerName());
} else {
domainUrl = "";
}
}
for (SkinBaseEntity item : list) {
List<SkinFieldEntity> skinFieldEntities = skinFieldService.find(new SkinFieldQuery().skinId(item.getId())); List<SkinFieldEntity> skinFieldEntities = skinFieldService.find(new SkinFieldQuery().skinId(item.getId()));
String domain = GlobalSysInfo.getParamValue(Constant.DOMAIN, "http://192.168.0.98:11071/"); // String domain = GlobalSysInfo.getParamValue(Constant.DOMAIN, "http://192.168.0.98:11071/");
skinFieldEntities.forEach(field -> { for (SkinFieldEntity field : skinFieldEntities) {
if ("2".equals(field.getFieldType())) { if ("2".equals(field.getFieldType())) {
UrlBuilder builder = UrlBuilder.ofHttp(domain, CharsetUtil.CHARSET_UTF_8).addPath(field.getFieldValue()); String fieldUrl = String.format("%s/%s", domainUrl, field.getFieldValue());
field.setFieldValueUrl(builder.build()); //UrlBuilder builder = UrlBuilder.ofHttp(domainUrl, CharsetUtil.CHARSET_UTF_8).addPath(field.getFieldValue());
field.setFieldValueUrl(fieldUrl);
}
} }
});
ProductEntity productEntity = productService.get(item.getProductId()); ProductEntity productEntity = productService.get(item.getProductId());
item.setProductCode(productEntity == null ? "" : productEntity.getProductCode()); item.setProductCode(productEntity == null ? "" : productEntity.getProductCode());
item.setImageResolutionValue(imageResolutionMap.get(entity.getImageResolution() == null ? "1" : entity.getImageResolution())); item.setImageResolutionValue(imageResolutionMap.get(entity.getImageResolution() == null ? "1" : entity.getImageResolution()));
item.setSkinFieldList(skinFieldEntities); item.setSkinFieldList(skinFieldEntities);
if (!ObjectUtils.isEmpty(item.getPreviewImagePath())) { if (!ObjectUtils.isEmpty(item.getPreviewImagePath())) {
UrlBuilder builder = UrlBuilder.ofHttp(domain, CharsetUtil.CHARSET_UTF_8).addPath(item.getPreviewImagePath()); // UrlBuilder builder = UrlBuilder.ofHttp(domainUrl, CharsetUtil.CHARSET_UTF_8).addPath(item.getPreviewImagePath());
item.setPreviewImagePath(builder.build()); String fieldUrl = String.format("%s/%s", domainUrl, item.getPreviewImagePath());
// item.setPreviewImagePath(builder.build());
item.setPreviewImagePath(fieldUrl);
//log.info("cssUrl:" + URLDecoder.decode(item.getPreviewImagePath(), CharsetUtil.CHARSET_UTF_8)); //log.info("cssUrl:" + URLDecoder.decode(item.getPreviewImagePath(), CharsetUtil.CHARSET_UTF_8));
} }
if (!ObjectUtils.isEmpty(item.getCssFilePath())) { if (!ObjectUtils.isEmpty(item.getCssFilePath())) {
UrlBuilder builder = UrlBuilder.ofHttp(domain, CharsetUtil.CHARSET_UTF_8).addPath(item.getCssFilePath()); //UrlBuilder builder = UrlBuilder.ofHttp(domainUrl, CharsetUtil.CHARSET_UTF_8).addPath(item.getCssFilePath());
item.setCssFilePath(builder.build()); //item.setCssFilePath(builder.build());
String fieldUrl = String.format("%s/%s", domainUrl, item.getCssFilePath());
item.setCssFilePath(fieldUrl);
//log.info("cssUrl:" + URLDecoder.decode(item.getCssFilePath(), CharsetUtil.CHARSET_UTF_8)); //log.info("cssUrl:" + URLDecoder.decode(item.getCssFilePath(), CharsetUtil.CHARSET_UTF_8));
} }
}); }
super.findAfter(entity, pageInfo, context, list); super.findAfter(entity, pageInfo, context, list);
} }
......
package com.mortals.xhx.module.skin.web; package com.mortals.xhx.module.skin.web;
import cn.hutool.core.lang.Validator;
import cn.hutool.core.net.url.UrlBuilder; import cn.hutool.core.net.url.UrlBuilder;
import cn.hutool.core.util.CharsetUtil; import cn.hutool.core.util.CharsetUtil;
import cn.hutool.core.util.ReUtil;
import cn.hutool.core.util.StrUtil; import cn.hutool.core.util.StrUtil;
import com.mortals.framework.ap.GlobalSysInfo; import com.mortals.framework.ap.GlobalSysInfo;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.base.system.param.service.ParamService; import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.common.key.Constant; import com.mortals.xhx.common.key.Constant;
...@@ -13,14 +17,17 @@ import com.mortals.xhx.module.product.service.ProductService; ...@@ -13,14 +17,17 @@ import com.mortals.xhx.module.product.service.ProductService;
import com.mortals.xhx.module.skin.model.SkinFieldEntity; import com.mortals.xhx.module.skin.model.SkinFieldEntity;
import com.mortals.xhx.module.skin.model.SkinFieldQuery; import com.mortals.xhx.module.skin.model.SkinFieldQuery;
import com.mortals.xhx.module.skin.service.SkinFieldService; import com.mortals.xhx.module.skin.service.SkinFieldService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController; import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
import com.mortals.xhx.module.skin.model.SkinBaseEntity; import com.mortals.xhx.module.skin.model.SkinBaseEntity;
import com.mortals.xhx.module.skin.model.SkinBaseQuery; import com.mortals.xhx.module.skin.model.SkinBaseQuery;
...@@ -33,21 +40,26 @@ import java.util.HashMap; ...@@ -33,21 +40,26 @@ import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import java.util.Arrays; import java.util.Arrays;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile; import org.springframework.web.multipart.MultipartFile;
import static com.mortals.framework.ap.SysConstains.*; import static com.mortals.framework.ap.SysConstains.*;
/** /**
* * 系统基础皮肤
* 系统基础皮肤 *
* * @author zxfei
* @author zxfei * @date 2022-05-24
* @date 2022-05-24 */
*/
@RestController @RestController
@RequestMapping("skin/base") @RequestMapping("skin/base")
public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBaseService,SkinBaseEntity,Long> { @Slf4j
public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBaseService, SkinBaseEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
...@@ -56,21 +68,27 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa ...@@ -56,21 +68,27 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa
@Autowired @Autowired
private SkinFieldService skinFieldService; private SkinFieldService skinFieldService;
public SkinBaseController(){ public SkinBaseController() {
super.setModuleDesc( "系统基础皮肤"); super.setModuleDesc("系统基础皮肤");
} }
@Override @Override
protected void doListBefore(SkinBaseEntity query, Map<String, Object> model, Context context) throws AppException { protected void doListBefore(SkinBaseEntity query, Map<String, Object> model, Context context) throws AppException {
if(!ObjectUtils.isEmpty(query.getProductCode())){ if (!ObjectUtils.isEmpty(query.getProductCode())) {
ProductEntity productEntity = productService.selectOne(new ProductQuery().productCode(query.getProductCode())); ProductEntity productEntity = productService.selectOne(new ProductQuery().productCode(query.getProductCode()));
if(!ObjectUtils.isEmpty(productEntity)){ if (!ObjectUtils.isEmpty(productEntity)) {
query.setProductId(productEntity.getId()); query.setProductId(productEntity.getId());
query.setProductCode(null); query.setProductCode(null);
} }
} }
String serverName = request.getHeader("server-name");
Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"), 0);
log.info("【应用请求】【请求体】-->serverName{} ,port:{}", serverName, serverPort);
query.setServerName(serverName);
query.setServerPort(serverPort);
super.doListBefore(query, model, context); super.doListBefore(query, model, context);
} }
...@@ -85,17 +103,37 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa ...@@ -85,17 +103,37 @@ public class SkinBaseController extends BaseCRUDJsonBodyMappingController<SkinBa
@Override @Override
protected int viewAfter(Long id, Map<String, Object> model, SkinBaseEntity entity, Context context) throws AppException { protected int viewAfter(Long id, Map<String, Object> model, SkinBaseEntity entity, Context context) throws AppException {
List<SkinFieldEntity> skinFieldEntities = skinFieldService.find(new SkinFieldQuery().skinId(entity.getId())); List<SkinFieldEntity> skinFieldEntities = skinFieldService.find(new SkinFieldQuery().skinId(entity.getId()));
skinFieldEntities.forEach(skinFieldEntity -> updateUrl(skinFieldEntity));
entity.setSkinFieldList(skinFieldEntities); String serverName = request.getHeader("server-name");
return super.viewAfter(id, model, entity, context); Integer serverPort = DataUtil.converStr2Int(request.getHeader("server-port"), 0);
String domainUrl = "";
if (!ObjectUtils.isEmpty(serverName) && Validator.isIpv4(serverName)) {
domainUrl = String.format("http://%s:%d",serverName, serverPort > 0 ? serverPort : 11078);
} else {
boolean isDomain = ReUtil.isMatch("^[a-zA-Z0-9][-a-zA-Z0-9]{0,62}(\\.[a-zA-Z0-9][-a-zA-Z0-9]{0,62})*\\.[a-zA-Z]{2,}$", entity.getServerName());
if (isDomain) {
domainUrl = String.format("https://%s", serverName);
} else {
serverName = "";
} }
private void updateUrl(SkinFieldEntity field) { }
for (SkinFieldEntity field : skinFieldEntities) {
if ("2".equals(field.getFieldType())) { if ("2".equals(field.getFieldType())) {
String domain = GlobalSysInfo.getParamValue(Constant.DOMAIN, "http://192.168.0.98:11071/"); // String domain = GlobalSysInfo.getParamValue(Constant.DOMAIN, "http://192.168.0.98:11071/");
UrlBuilder builder = UrlBuilder.ofHttp(domain, CharsetUtil.CHARSET_UTF_8).addPath(field.getFieldValue()); // UrlBuilder builder = UrlBuilder.ofHttp(domain, CharsetUtil.CHARSET_UTF_8).addPath(field.getFieldValue());
field.setFieldValue(builder.build()); // field.setFieldValue(builder.build());
String fieldUrl = String.format("%s/%s", domainUrl, field.getFieldValue());
field.setFieldValueUrl(fieldUrl);
} }
}
entity.setSkinFieldList(skinFieldEntities);
return super.viewAfter(id, model, entity, context);
} }
......
...@@ -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
This source diff could not be displayed because it is too large. You can view the blob instead.
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;
// 查询客户管理列表 // 查询客户管理列表
......
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);
}
// 产品信息
export function saveProduct(params) {
return http.post(`${baseURL}/zwfw/product/save`, params);
}
// 产品信息
export function deleteProduct(params) {
return http.get(`${baseURL}/zwfw/product/delete`, params);
}
//-------------xj: --------------------
...@@ -28,10 +28,14 @@ ...@@ -28,10 +28,14 @@
orderInfo.endtime orderInfo.endtime
}} }}
</p> </p>
<p>
<span>预约方式:</span>{{ orderInfo.up_type=='phone'?'微官网':orderInfo.up_type=='app'?'自助终端':orderInfo.up_type=='tftb'?'天府通办':'--' }}
</p>
</div> </div>
<div class="qrcode"> <div class="qrcode">
<!-- <img src="~@/assets/images/logo.png" alt="" /> <!-- <img src="~@/assets/images/logo.png" alt="" /> -->
<p>预约信息二维码</p> --> <img :src="baseurl + '/'+ orderInfo.qrcode" alt="" />
<p>预约信息二维码</p>
</div> </div>
</div> </div>
<ul class="bottom"> <ul class="bottom">
...@@ -145,6 +149,7 @@ export default { ...@@ -145,6 +149,7 @@ export default {
statusItem, statusItem,
style, style,
orderInfo: {}, // 预约信息 orderInfo: {}, // 预约信息
baseurl: process.env.VUE_APP_API_PHP_URL,
}; };
}, },
......
<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"
:visible="Visible"
@cancel="Visible = false"
width="30%"
>
<a-form-model
:label-col="{
span: 5, span: 5,
}" }" :wrapper-col="{
:wrapper-col="{
span: 19, span: 19,
}" }" layout="horizontal" ref="appInfoFome" :model="appInfoFome" :rules="appInfoRules">
layout="horizontal" <a-form-model-item label="产品名称" prop="productName">
ref="appInfoFome" <a-input placeholder="请输入产品名称" allowClear v-model="appInfoFome.productName" />
: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">
...@@ -35,6 +18,7 @@ ...@@ -35,6 +18,7 @@
</template> </template>
<script> <script>
import { saveProduct } from "@/api/thePlatformIsSet.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 = ''
}); });
}, },
}, },
......
...@@ -4,29 +4,31 @@ ...@@ -4,29 +4,31 @@
<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>
</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>
<p> <p>
<a-popconfirm title="确定要删除此产品吗?" ok-text="Yes" cancel-text="No" @confirm="delModal(item)">
<a-button type="link" size="small" style="color: #ff4d4f"> <a-button type="link" size="small" style="color: #ff4d4f">
删除 删除
</a-button> </a-button>
</a-popconfirm>
</p> </p>
</div> </div>
</template> </template>
...@@ -34,13 +36,15 @@ ...@@ -34,13 +36,15 @@
</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(item)">接口管理<a-icon type="right" /></li>
<li @click="routerpush2">应用管理<a-icon type="right" /></li> <li @click="routerpush2(item)">应用管理<a-icon type="right" /></li>
<li @click="routerpush3">文档资料<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" />
...@@ -48,52 +52,80 @@ ...@@ -48,52 +52,80 @@
</template> </template>
<script> <script>
import { getProduct, deleteProduct } from "@/api/thePlatformIsSet.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: {
delModal(item) {
deleteProduct({
id: item.id
}).then((res) => {
let { code, msg } = res
if (code == 1) {
this.$message.success('删除成功');
this.getList()
} else {
this.$message.error(msg);
}
})
},
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.productName = item.productName
} else {
this.$refs.AddEditAppName.VisibleTitle = "新增产品"; this.$refs.AddEditAppName.VisibleTitle = "新增产品";
} }
this.$refs.AddEditAppName.Visible = true; this.$refs.AddEditAppName.Visible = true;
}, },
routerpush1() { routerpush1(item) {
// 测试 // 测试
this.$router.push({ this.$router.push({
path: `/home/thePlatformIsSet/InterfaceManage/manage`, path: `/home/thePlatformIsSet/InterfaceManage/manage`,
// query: { testoption: "test001" }, query: { id: item.id },
}); });
}, },
routerpush2() { routerpush2(item) {
// 测试 // 测试
this.$router.push({ this.$router.push({
path: `/home/thePlatformIsSet/appManage/application`, path: `/home/thePlatformIsSet/appManage/application`,
// query: { testoption: "test001" }, query: { id: item.id },
}); });
}, },
routerpush3() { routerpush3(item) {
// 测试 // 测试
this.$router.push({ this.$router.push({
path: `/home/thePlatformIsSet/docData/fileData`, path: `/home/thePlatformIsSet/docData/fileData`,
// query: { testoption: "test001" }, query: { id: item.id },
}); });
}, },
}, },
...@@ -101,6 +133,13 @@ export default { ...@@ -101,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 {
...@@ -319,4 +358,5 @@ export default { ...@@ -319,4 +358,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>
This source diff could not be displayed because it is too large. You can view the blob instead.
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