Commit 7d3d4c7c authored by “yiyousong”'s avatar “yiyousong”
parents 6e8a25cf 97863118
...@@ -5572,19 +5572,28 @@ deptAbb|String|部门简称|否|- ...@@ -5572,19 +5572,28 @@ deptAbb|String|部门简称|否|-
deptNumber|String|部门编号|否|- deptNumber|String|部门编号|否|-
filter|Integer|是否过滤没有事项的部门(0.否,1.是)|否|- filter|Integer|是否过滤没有事项的部门(0.否,1.是)|否|-
isBkb|Integer|背靠背展示 (0.否,1.是)|否|- isBkb|Integer|背靠背展示 (0.否,1.是)|否|-
orderColList| arrays |否|排序列表字段
 | object |否|排序列表对象
  colName| String |否|排序列名
  sortKind| String |否|排序方式(asc:升序,desc:降序,默认升序)
**请求样例:** **请求样例:**
``` ```
{
{ "siteId":1,
"name":"8xbeej", "isWorkGuide":1,
"deptAbb":"lk7pnx", "filter":1,
"deptNumber":"jjfxah",
"page":1, "page":1,
"size":10 "source":0,
"size":-1,
"orderColList":[
{
"colName":"sort",
"sortKind":"desc"
} }
]
}
``` ```
**响应参数:** **响应参数:**
...@@ -13218,6 +13227,128 @@ data|object|数据对象 ...@@ -13218,6 +13227,128 @@ data|object|数据对象
``` ```
### 查看设备告警日志统计列表
**请求URL:** m/device/alarm/info/statlist
**请求方式:** POST
**内容类型:** application/json;charset=utf-8
**简要描述:** 查看告警统计信息列表
**请求参数:**
参数名称|类型|必填|描述
:---|:---|:---|:------
siteId|Long|是|站点ID
**请求样例:**
```
{
"siteId": 1
}
```
**响应参数:**
参数名称 |参数类型|描述
:---|:---|:-------
code|Integer|结果码(-1.失败,1.成功)
msg|String|消息
data|arrays|数据列表对象
 todayAlarmInfoCount|Integer|今日告警次数
 todayAlarmDeviceCount|Integer|今日告警设备数量
 alarmTypeStr|String|告警类型
 alarmStatus|Integer|告警状态
 alarmTime|Long|告警时间
 device|object|设备详细信息
**响应消息样例:**
```
{
"data": [
{
"todayAlarmInfoCount": 2,
"todayAlarmDeviceCount": 0,
"device": {
"id": 826,
"createUserId": 1,
"createTime": 1685069567000,
"updateUserId": 1,
"updateTime": 1685369203000,
"deleted": 0,
"productCode": "dzmp",
"switchSend": true,
"deviceName": "电子门牌-多人",
"deviceCode": "18-93-7f-b7-f9-4a",
"deviceMac": "18-93-7f-b7-f9-4a",
"siteId": 1,
"siteCode": "511500000000-0001",
"siteName": "宜宾市民中心",
"platformId": 9,
"platformName": "智慧办公",
"productId": 19,
"productName": "电子门牌",
"skinName": "",
"homeUrl": "",
"deviceFirmname": "",
"deviceSrc": 2,
"deviceDataSourceWay": 0,
"lon": "",
"lati": "",
"leadingOfficial": "周杨",
"leadingOfficialTelephone": "15108243162",
"isReceiveMess": 0,
"devicePhotoPath": "",
"ip": "",
"centernum": "",
"port": "",
"deviceTopic": "",
"deviceStatus": 1,
"enabled": 1,
"deviceAuthCode": "",
"deviceRemark": "",
"onlineTime": 1685369203000,
"offlineTime": 1685072125000,
"source": 1,
"deviceSN": "",
"deviceVersion": "19",
"hallName": "",
"showSms": 1,
"showPrint": 1,
"showWechatQrCode": 1
},
"alarmTypeStr": "离线",
"alarmTime": 1685455603000,
"alarmReceivePersonnel": "",
"receivePersonnelTelephone": "",
"alarmStatus": 0,
"alarmContent": "",
"deviceCode": "",
"deviceName": ""
},
{
"todayAlarmInfoCount": 1,
"todayAlarmDeviceCount": 0,
"device": {
"id": 828,
},
"alarmTypeStr": "离线",
"alarmTime": 1685455637000,
"alarmReceivePersonnel": "",
"receivePersonnelTelephone": "",
"alarmStatus": 0,
"alarmContent": "",
"deviceCode": "",
"deviceName": ""
}
],
"code": 1,
"msg": "操作成功"
}
```
## 设备 ## 设备
### 查询设备列表 ### 查询设备列表
......
...@@ -28,7 +28,7 @@ public class SyncTreeSiteThread implements Runnable { ...@@ -28,7 +28,7 @@ public class SyncTreeSiteThread implements Runnable {
SiteService siteService = SpringUtils.getBean(SiteService.class); SiteService siteService = SpringUtils.getBean(SiteService.class);
List<SiteTreeSelect> siteTreeSelects = siteService.siteTree(context); List<SiteTreeSelect> siteTreeSelects = siteService.siteTree(context);
siteService.setSiteTree(siteTreeSelects, context); siteService.setSiteTree(siteTreeSelects, context);
log.info("刷新用户站点树=》userID:{} siteIds:{} siteTree:{}",context.getUser().getId(),context.getUser().getSiteIds(), JSON.toJSONString(siteService.getSiteTree(context))); // log.info("刷新用户站点树=》userID:{} siteIds:{} siteTree:{}",context.getUser().getId(),context.getUser().getSiteIds(), JSON.toJSONString(siteService.getSiteTree(context)));
} }
} }
...@@ -12,6 +12,7 @@ import com.mortals.xhx.common.code.IsBusinessEnum; ...@@ -12,6 +12,7 @@ import com.mortals.xhx.common.code.IsBusinessEnum;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.business.service.BusinessService; import com.mortals.xhx.module.business.service.BusinessService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -21,31 +22,30 @@ import java.util.HashMap; ...@@ -21,31 +22,30 @@ import java.util.HashMap;
import java.util.Map; import java.util.Map;
/** /**
* * 站点业务
* 站点业务 *
* * @author zxfei
* @author zxfei * @date 2022-01-13
* @date 2022-01-13 */
*/
@RestController @RestController
@RequestMapping("business") @RequestMapping("business")
public class BusinessController extends BaseCRUDJsonBodyMappingController<BusinessService,BusinessEntity,Long> { public class BusinessController extends BaseCRUDJsonBodyMappingController<BusinessService, BusinessEntity, Long> {
@Autowired @Autowired
private ParamService paramService; private ParamService paramService;
public BusinessController(){ public BusinessController() {
super.setModuleDesc( "站点业务"); super.setModuleDesc("站点业务");
} }
@Override @Override
protected void init( Map<String, Object> model, Context context) { protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "isBusiness", paramService.getParamBySecondOrganize("Business","isBusiness")); this.addDict(model, "isBusiness", paramService.getParamBySecondOrganize("Business", "isBusiness"));
this.addDict(model, "canorder", paramService.getParamBySecondOrganize("Business","canorder")); this.addDict(model, "canorder", paramService.getParamBySecondOrganize("Business", "canorder"));
this.addDict(model, "cantake", paramService.getParamBySecondOrganize("Business","cantake")); this.addDict(model, "cantake", paramService.getParamBySecondOrganize("Business", "cantake"));
this.addDict(model, "datashow", paramService.getParamBySecondOrganize("Business","datashow")); this.addDict(model, "datashow", paramService.getParamBySecondOrganize("Business", "datashow"));
this.addDict(model, "status", paramService.getParamBySecondOrganize("Business","status")); this.addDict(model, "status", paramService.getParamBySecondOrganize("Business", "status"));
this.addDict(model, "businessType", paramService.getParamBySecondOrganize("Business","businessType")); this.addDict(model, "businessType", paramService.getParamBySecondOrganize("Business", "businessType"));
super.init(model, context); super.init(model, context);
} }
...@@ -63,10 +63,10 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine ...@@ -63,10 +63,10 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine
public String addBusinessToSite(@RequestBody Map<String, Object> map) { public String addBusinessToSite(@RequestBody Map<String, Object> map) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
String businessIds=(String)map.get("businessIds"); String businessIds = (String) map.get("businessIds");
Long siteId= DataUtil.converObj2Long(map.get("siteId")); Long siteId = DataUtil.converObj2Long(map.get("siteId"));
try { try {
this.service.addBusinessToSite(businessIds,siteId,getContext()); this.service.addBusinessToSite(businessIds, siteId, getContext());
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "添加业务到站点成功!"); jsonObject.put(KEY_RESULT_MSG, "添加业务到站点成功!");
...@@ -79,7 +79,6 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine ...@@ -79,7 +79,6 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine
} }
/** /**
* 查询业务扁平结构 * 查询业务扁平结构
*/ */
...@@ -93,7 +92,9 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine ...@@ -93,7 +92,9 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine
Result<BusinessEntity> result = this.service.flatList(query, pageInfo, getContext()); Result<BusinessEntity> result = this.service.flatList(query, pageInfo, getContext());
model.put(KEY_RESULT_DATA, result.getList()); model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo()); parsePageInfo(model, result.getPageInfo());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!"); jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!");
......
...@@ -57,12 +57,6 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -57,12 +57,6 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
private MattersDeptService mattersDeptService; private MattersDeptService mattersDeptService;
@Autowired @Autowired
private WindowService windowService; private WindowService windowService;
@Autowired
private BusinessService businessService;
@Autowired
private SiteBusinessService siteBusinessService;
@Autowired
private WindowBusinessService windowBusinessService;
@Override @Override
...@@ -70,6 +64,20 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -70,6 +64,20 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return data.getDeptNumber(); return data.getDeptNumber();
} }
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void saveBefore(DeptEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
//新增校验部门编码是否重复
DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
}
}
/** /**
* @param entity * @param entity
...@@ -77,14 +85,16 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE ...@@ -77,14 +85,16 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
* @throws AppException * @throws AppException
*/ */
@Override @Override
protected void validData(DeptEntity entity, Context context) throws AppException { protected void updateBefore(DeptEntity entity, Context context) throws AppException {
super.validData(entity, context); super.updateBefore(entity, context);
//校验部门编码是否重复 DeptEntity beforeEntity = this.get(entity.getId(), context);
if(!beforeEntity.getDeptNumber().equals(entity.getDeptNumber())){
DeptEntity extCache = this.getExtCache(entity.getDeptNumber()); DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache) && SourceEnum.自定义.getValue() == entity.getSource()) { if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber()); throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
} }
} }
}
@Override @Override
public void syncDept(String areaCode, Context context) { public void syncDept(String areaCode, Context context) {
......
...@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol; ...@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.DataUtil; 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.code.SourceEnum;
import com.mortals.xhx.common.code.YesNoEnum; import com.mortals.xhx.common.code.YesNoEnum;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.dept.model.DeptEntity; import com.mortals.xhx.module.dept.model.DeptEntity;
...@@ -53,14 +54,18 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -53,14 +54,18 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
@Override @Override
protected void doListBefore(DeptEntity query, Map<String, Object> model, Context context) throws AppException { protected void doListBefore(DeptEntity query, Map<String, Object> model, Context context) throws AppException {
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(new ArrayList<OrderCol>() { query.setOrderColList(new ArrayList<OrderCol>() {
{ {
add(new OrderCol("a.sort", OrderCol.ASCENDING)); add(new OrderCol("a.sort", OrderCol.ASCENDING));
add(new OrderCol("a.createTime", OrderCol.ASCENDING)); add(new OrderCol("a.createTime", OrderCol.DESCENDING));
} }
}); });
} else {
if(!ObjectUtils.isEmpty(query.getFilter())&& YesNoEnum.YES.getValue()==query.getFilter()){ query.getOrderColList().add(new OrderCol("a.createTime", OrderCol.DESCENDING));
}
if (!ObjectUtils.isEmpty(query.getFilter()) && YesNoEnum.YES.getValue() == query.getFilter()) {
//过滤部门事项数据为0的部门 //过滤部门事项数据为0的部门
query.setTotalStart(1); query.setTotalStart(1);
} }
...@@ -116,7 +121,9 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -116,7 +121,9 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
throw new AppException("参数部门ids不能为空!"); throw new AppException("参数部门ids不能为空!");
} }
Rest<Map<String, List<DeptVo>>> rest = this.service.getBusinessByDept(deptQuery, getContext()); Rest<Map<String, List<DeptVo>>> rest = this.service.getBusinessByDept(deptQuery, getContext());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, rest.getData()); jsonObject.put(KEY_RESULT_DATA, rest.getData());
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!"); jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!");
...@@ -142,7 +149,9 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -142,7 +149,9 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
throw new AppException("业务id不能为空!"); throw new AppException("业务id不能为空!");
} }
Rest<Map<String, List<DeptVo>>> rest = this.service.getDeptListByBusiness(deptQuery, getContext()); Rest<Map<String, List<DeptVo>>> rest = this.service.getDeptListByBusiness(deptQuery, getContext());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, rest.getData()); jsonObject.put(KEY_RESULT_DATA, rest.getData());
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!"); jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!");
...@@ -163,11 +172,15 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic ...@@ -163,11 +172,15 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
*/ */
@Override @Override
protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException { protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException {
DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber())); // DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber()));
if(!ObjectUtils.isEmpty(deptEntity)){ // if(!ObjectUtils.isEmpty(deptEntity)){
throw new AppException("部门编码已存在!"); // throw new AppException("部门编码已存在!");
// }
if (entity.newEntity()) {
entity.setSource(SourceEnum.自定义.getValue());
} }
entity.setSource(1);
super.saveBefore(entity, model, context); super.saveBefore(entity, model, context);
} }
} }
\ No newline at end of file
...@@ -63,7 +63,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe ...@@ -63,7 +63,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
*/ */
@Override @Override
protected void doListBefore(MatterEntity query, Map<String, Object> model, Context context) throws AppException { protected void doListBefore(MatterEntity query, Map<String, Object> model, Context context) throws AppException {
if(ObjectUtils.isEmpty(query.getEventTypeShowNotList())){ if (ObjectUtils.isEmpty(query.getEventTypeShowNotList())) {
ArrayList<String> notList = new ArrayList<>(); ArrayList<String> notList = new ArrayList<>();
notList.add("行政处罚"); notList.add("行政处罚");
query.setEventTypeShowNotList(notList); query.setEventTypeShowNotList(notList);
...@@ -148,7 +148,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe ...@@ -148,7 +148,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
jsonObject.put(KEY_RESULT_MSG, rest.getMsg()); jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
this.recordSysLog(this.request, rest.getMsg()); this.recordSysLog(this.request, rest.getMsg());
}
} catch (Exception e) { } catch (Exception e) {
log.error("获取异常", e); log.error("获取异常", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
...@@ -165,7 +167,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe ...@@ -165,7 +167,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
Context context = this.getContext(); Context context = this.getContext();
String busiDesc = "查询差集" + this.getModuleDesc(); String busiDesc = "查询差集" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS; int code = VALUE_RESULT_SUCCESS;
try { try {
PageInfo pageInfo = buildPageInfo(query); PageInfo pageInfo = buildPageInfo(query);
Result<MatterEntity> result = this.getService().findSubList(query, pageInfo, context); Result<MatterEntity> result = this.getService().findSubList(query, pageInfo, context);
...@@ -173,7 +175,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe ...@@ -173,7 +175,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
model.put(PAGEINFO_KEY, result.getPageInfo()); model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo()); parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功"); model.put(MESSAGE_INFO, busiDesc + "成功");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
} catch (Exception e) { } catch (Exception e) {
code = VALUE_RESULT_FAILURE; code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e); this.doException(request, busiDesc, model, e);
......
...@@ -185,9 +185,11 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -185,9 +185,11 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override @Override
protected void saveAfter(SiteEntity entity, Context context) throws AppException { protected void saveAfter(SiteEntity entity, Context context) throws AppException {
log.info("站点更新1");
//刷新站点树 //刷新站点树
//ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context)); //ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context));
Rest<String> rest = userFeign.synchSiteAuth(); Rest<String> rest = userFeign.synchSiteAuth();
log.info("站点更新2");
if (rest.getCode().equals(YesNoEnum.YES.getValue())) { if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
UserPdu userPdu = new UserPdu(); UserPdu userPdu = new UserPdu();
userPdu.setPage(1); userPdu.setPage(1);
...@@ -195,8 +197,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -195,8 +197,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu); Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
userService.updateUserList(list.getData().getData()); userService.updateUserList(list.getData().getData());
} }
log.info("站点更新3");
//更新同步部门相关 //更新同步部门相关
deptService.syncDeptBySiteId(entity, context); deptService.syncDeptBySiteId(entity, context);
log.info("站点更新4");
super.saveAfter(entity, context); super.saveAfter(entity, context);
} }
...@@ -439,9 +443,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -439,9 +443,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override @Override
public Rest<List<SiteAreaVo>> getAreaSitesBySite(SiteQuery query, Context context) { public Rest<List<SiteAreaVo>> getAreaSitesBySite(SiteQuery query, Context context) {
List<SiteAreaVo> list = new ArrayList<>(); List<SiteAreaVo> list = new ArrayList<>();
SiteAreaVo siteAreaVo = new SiteAreaVo(); SiteAreaVo siteAreaVo = new SiteAreaVo();
//获取当前节点的第一层子节点 //获取当前节点的第一层子节点
if (ObjectUtils.isEmpty(query.getAreaName())) { if (ObjectUtils.isEmpty(query.getAreaName())) {
throw new AppException("区域名称查询参数不能为空!"); throw new AppException("区域名称查询参数不能为空!");
...@@ -465,7 +469,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE ...@@ -465,7 +469,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
List<AreaEntity> childList = areaService.find(areaQuery, context); List<AreaEntity> childList = areaService.find(areaQuery, context);
for (AreaEntity child : childList) { for (AreaEntity child : childList) {
siteAreaVo = new SiteAreaVo(); siteAreaVo = new SiteAreaVo();
siteAreaVo.setAreaCode(child.getAreaCode()); siteAreaVo.setAreaCode(child.getAreaCode());
siteAreaVo.setAreaName(child.getName()); siteAreaVo.setAreaName(child.getName());
String matchCode = child.getAreaCode().replaceAll("(0)+$", ""); String matchCode = child.getAreaCode().replaceAll("(0)+$", "");
......
...@@ -15,6 +15,7 @@ import com.mortals.xhx.module.site.model.SiteBusinessTreeSelect; ...@@ -15,6 +15,7 @@ import com.mortals.xhx.module.site.model.SiteBusinessTreeSelect;
import com.mortals.xhx.module.site.service.SiteBusinessService; import com.mortals.xhx.module.site.service.SiteBusinessService;
import org.apache.commons.lang3.ArrayUtils; import org.apache.commons.lang3.ArrayUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -119,7 +120,9 @@ public class SiteBusinessController extends BaseCRUDJsonBodyMappingController<Si ...@@ -119,7 +120,9 @@ public class SiteBusinessController extends BaseCRUDJsonBodyMappingController<Si
Result<SiteBusinessEntity> result = this.service.flatList(query, pageInfo, getContext()); Result<SiteBusinessEntity> result = this.service.flatList(query, pageInfo, getContext());
model.put(KEY_RESULT_DATA, result.getList()); model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo()); parsePageInfo(model, result.getPageInfo());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点业务列表成功!"); jsonObject.put(KEY_RESULT_MSG, "查询站点业务列表成功!");
......
...@@ -35,10 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -35,10 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils; import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.ArrayList; import java.util.*;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors; import java.util.stream.Collectors;
/** /**
...@@ -108,7 +105,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -108,7 +105,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
} }
model.put("siteTree", siteTree); model.put("siteTree", siteTree);
this.init(model, getContext()); this.init(model, getContext());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) { } catch (Exception e) {
...@@ -137,7 +136,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -137,7 +136,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
List<SiteTreeSelect> siteTree = this.service.getSiteTree(context); List<SiteTreeSelect> siteTree = this.service.getSiteTree(context);
model.put("siteTree", siteTree); model.put("siteTree", siteTree);
this.init(model, getContext()); this.init(model, getContext());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) { } catch (Exception e) {
...@@ -158,25 +159,41 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -158,25 +159,41 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String busiDesc = "根据区域编码查询站点列表" + this.getModuleDesc(); String busiDesc = "根据区域编码查询站点列表" + this.getModuleDesc();
try { try {
if (!ObjectUtils.isEmpty(site.getSiteName())) { if (!ObjectUtils.isEmpty(site.getSiteName())) {
SiteEntity siteEntity = this.service.selectOne(new SiteQuery().siteName(site.getSiteName())); // SiteEntity siteEntity = this.service.selectOne(new SiteQuery().siteName(site.getSiteName()));
if (!ObjectUtils.isEmpty(siteEntity)) { List<SiteEntity> siteEntities = this.service.find(new SiteQuery().siteName(site.getSiteName()));
site.setAreaCode(siteEntity.getAreaCode());
if (!ObjectUtils.isEmpty(siteEntities)) {
site.setAreaCodeList(siteEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList()));
} }
/* if (!ObjectUtils.isEmpty(siteEntity)) {
site.setAreaCode(siteEntity.getAreaCode());
}*/
} }
if (!ObjectUtils.isEmpty(site.getAreaName())) { if (!ObjectUtils.isEmpty(site.getAreaName())) {
AreaEntity areaEntity = areaService.selectOne(new AreaQuery().name(site.getAreaName())); //AreaEntity areaEntity = areaService.selectOne(new AreaQuery().name(site.getAreaName()));
if (!ObjectUtils.isEmpty(areaEntity)) { List<AreaEntity> areaEntities = areaService.find(new AreaQuery().name(site.getAreaName()));
site.setAreaCode(areaEntity.getAreaCode()); if (!ObjectUtils.isEmpty(areaEntities)) {
// site.setAreaCode(areaEntity.getAreaCode());
site.setAreaCodeList(areaEntities.stream().map(i -> i.getAreaCode()).collect(Collectors.toList()));
} }
} }
List<SiteEntity> siteEntityList = this.service.getFlatSitesByAreaCode(site.getAreaCode(), getContext());
if (ObjectUtils.isEmpty(site.getAreaCodeList())) {
site.setAreaCodeList(Arrays.asList(site.getAreaCode()));
}
List<SiteEntity> siteEntityList = site.getAreaCodeList().stream().flatMap(areaCode -> {
return this.service.getFlatSitesByAreaCode(areaCode, getContext()).stream();
}).distinct().collect(Collectors.toList());
//List<SiteEntity> siteEntityList = this.service.getFlatSitesByAreaCode(site.getAreaCode(), getContext());
if (!ObjectUtils.isEmpty(site.getSiteName())) { if (!ObjectUtils.isEmpty(site.getSiteName())) {
siteEntityList = siteEntityList.stream().filter(item -> site.getSiteName().equals(item.getSiteName())).collect(Collectors.toList()); siteEntityList = siteEntityList.stream().filter(item -> site.getSiteName().equals(item.getSiteName())).collect(Collectors.toList());
} }
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, siteEntityList); jsonObject.put(KEY_RESULT_DATA, siteEntityList);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!"); jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!");
...@@ -201,8 +218,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic ...@@ -201,8 +218,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String siteIds = site.getAreaCodeList().stream().flatMap(areaId -> String siteIds = site.getAreaCodeList().stream().flatMap(areaId ->
this.service.getFlatSitesByAreaCode(areaId, getContext()).stream() this.service.getFlatSitesByAreaCode(areaId, getContext()).stream()
).map(item -> item.getId().toString()).distinct().collect(Collectors.joining(",")); ).map(item -> item.getId().toString()).distinct().collect(Collectors.joining(","));
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, siteIds); jsonObject.put(KEY_RESULT_DATA, siteIds);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!"); jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!");
......
...@@ -7,6 +7,7 @@ import com.mortals.xhx.base.system.param.service.ParamService; ...@@ -7,6 +7,7 @@ import com.mortals.xhx.base.system.param.service.ParamService;
import com.mortals.xhx.module.business.model.BusinessEntity; import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.site.model.*; import com.mortals.xhx.module.site.model.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
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.*;
...@@ -71,7 +72,10 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa ...@@ -71,7 +72,10 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa
int code = VALUE_RESULT_SUCCESS; int code = VALUE_RESULT_SUCCESS;
try { try {
Rest<List<BusinessEntity>> rest = this.service.getBusinessByHall(siteHall, getContext()); Rest<List<BusinessEntity>> rest = this.service.getBusinessByHall(siteHall, getContext());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
model.put(KEY_RESULT_DATA, rest.getData()); model.put(KEY_RESULT_DATA, rest.getData());
model.put("message_info", busiDesc + "成功"); model.put("message_info", busiDesc + "成功");
} catch (Exception e) { } catch (Exception e) {
......
...@@ -55,7 +55,6 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -55,7 +55,6 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
Map<Long, WindowEntity> collect = windowService.findToMap(new WindowQuery(), context); Map<Long, WindowEntity> collect = windowService.findToMap(new WindowQuery(), context);
Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.find(new WindowHallQuery(), context).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), Function.identity())); Map<Long, WindowHallEntity> windowHallEntityMap = windowHallService.find(new WindowHallQuery(), context).parallelStream().collect(Collectors.toMap(x -> x.getWindowId(), Function.identity()));
Iterator iterator = list.iterator(); Iterator iterator = list.iterator();
while (iterator.hasNext()) { while (iterator.hasNext()) {
WindowBusinessEntity item = (WindowBusinessEntity) iterator.next(); WindowBusinessEntity item = (WindowBusinessEntity) iterator.next();
...@@ -68,6 +67,8 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus ...@@ -68,6 +67,8 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
if (!ObjectUtils.isEmpty(windowHallEntity)) { if (!ObjectUtils.isEmpty(windowHallEntity)) {
item.setHallId(windowHallEntity.getHallId()); item.setHallId(windowHallEntity.getHallId());
item.setHallName(windowHallEntity.getHallName()); item.setHallName(windowHallEntity.getHallName());
}else {
log.info("windowhallEntity is null windowId:{}",item.getWindowId());
} }
} else { } else {
iterator.remove(); iterator.remove();
......
...@@ -16,6 +16,7 @@ import com.mortals.xhx.module.window.model.WindowEntity; ...@@ -16,6 +16,7 @@ import com.mortals.xhx.module.window.model.WindowEntity;
import com.mortals.xhx.module.window.service.WindowBusinessService; import com.mortals.xhx.module.window.service.WindowBusinessService;
import com.mortals.xhx.module.window.service.WindowService; import com.mortals.xhx.module.window.service.WindowService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
...@@ -66,10 +67,10 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe ...@@ -66,10 +67,10 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
public String addBusinessToSite(@RequestBody Map<String, Object> map) { public String addBusinessToSite(@RequestBody Map<String, Object> map) {
JSONObject jsonObject = new JSONObject(); JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
String businessIds=(String)map.get("businessIds"); String businessIds = (String) map.get("businessIds");
Long windowId= DataUtil.converObj2Long(map.get("windowId")); Long windowId = DataUtil.converObj2Long(map.get("windowId"));
try { try {
this.service.addBusinessToWindow(businessIds,windowId,getContext()); this.service.addBusinessToWindow(businessIds, windowId, getContext());
jsonObject.put(KEY_RESULT_DATA, model); jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS); jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "添加业务到窗口成功!"); jsonObject.put(KEY_RESULT_MSG, "添加业务到窗口成功!");
...@@ -82,7 +83,6 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe ...@@ -82,7 +83,6 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
} }
@PostMapping(value = "subHalllist") @PostMapping(value = "subHalllist")
@UnAuth @UnAuth
public Rest<Object> subHalllist(@RequestBody WindowEntity query) { public Rest<Object> subHalllist(@RequestBody WindowEntity query) {
...@@ -90,7 +90,7 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe ...@@ -90,7 +90,7 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
Map<String, Object> model = new HashMap<>(); Map<String, Object> model = new HashMap<>();
Context context = this.getContext(); Context context = this.getContext();
String busiDesc = "查询差集" + this.getModuleDesc(); String busiDesc = "查询差集" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS; int code = VALUE_RESULT_SUCCESS;
try { try {
PageInfo pageInfo = buildPageInfo(query); PageInfo pageInfo = buildPageInfo(query);
Result<WindowEntity> result = this.getService().findSubHallList(query, pageInfo, context); Result<WindowEntity> result = this.getService().findSubHallList(query, pageInfo, context);
...@@ -98,7 +98,9 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe ...@@ -98,7 +98,9 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
model.put(PAGEINFO_KEY, result.getPageInfo()); model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo()); parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功"); model.put(MESSAGE_INFO, busiDesc + "成功");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】"); recordSysLog(request, busiDesc + " 【成功】");
}
} catch (Exception e) { } catch (Exception e) {
code = VALUE_RESULT_FAILURE; code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e); this.doException(request, busiDesc, model, e);
......
...@@ -3,14 +3,7 @@ ...@@ -3,14 +3,7 @@
POST {{baseUrl}}/dept/list POST {{baseUrl}}/dept/list
Content-Type: application/json Content-Type: application/json
{ {"isBkb":1,"siteId":1,"page":"1","size":"10","orderColList":[{"colName":"sort","sortKind":"desc"}]}
"siteId": 1,
"isWorkGuide":1 ,
"filter":1 ,
"page":1,
"source": 0,
"size":-1
}
###部门更新与保存 ###部门更新与保存
......
...@@ -108,4 +108,12 @@ Content-Type: application/json ...@@ -108,4 +108,12 @@ Content-Type: application/json
} }
###根据站点获取子站点列表
POST {{baseUrl}}/site/getFlatSitesBySiteId
Content-Type: application/json
{
"id":1
}
...@@ -5,8 +5,7 @@ Content-Type: application/json ...@@ -5,8 +5,7 @@ Content-Type: application/json
{ {
"page":1, "page":1,
"size":10, "size":10
"hallId": 11
} }
......
This source diff could not be displayed because it is too large. You can view the blob instead.
...@@ -8,6 +8,10 @@ ...@@ -8,6 +8,10 @@
</keep-alive> --> </keep-alive> -->
</a-config-provider> </a-config-provider>
</a-spin> </a-spin>
<!-- 导出进度条 -->
<div class="export" v-if="progressFile.show">
<a-progress :percent="progressFile.percent" status="active" />
</div>
</div> </div>
</template> </template>
...@@ -22,6 +26,10 @@ export default { ...@@ -22,6 +26,10 @@ export default {
loadingProps: { loadingProps: {
spinning: false, spinning: false,
}, },
progressFile:{
show:false,
percent:1
}
}; };
}, },
beforeCreate() { beforeCreate() {
...@@ -62,4 +70,13 @@ export default { ...@@ -62,4 +70,13 @@ export default {
display: flex; display: flex;
// flex-direction: column; // flex-direction: column;
} }
.export{
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%);
z-index: 99;
width: 300px;
height: 150px;
}
</style> </style>
...@@ -2,11 +2,11 @@ import http from "../request/http"; ...@@ -2,11 +2,11 @@ import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.10.1. 查询应用服务列表 // 1.10.1. 查询应用服务列表
export function serviceList(params) { export function serviceList(params) {
return http.post(`${baseURL}/zwfw/system/service/list`, params); return http.post(`${baseURL}/zwfw/product/apps/list`, params);
} }
// 1.10.2. 查看应用服务 // 1.10.2. 查看应用服务
export function serviceInfo(params) { export function serviceInfo(params) {
return http.get(`${baseURL}/zwfw/system/service/info`, params); return http.get(`${baseURL}/zwfw/product/document/list`, params);
} }
// 1.10.3. 保存更新应用服务 // 1.10.3. 保存更新应用服务
export function serviceSave(params) { export function serviceSave(params) {
......
...@@ -70,6 +70,18 @@ export function getWLLZInfo(params) { ...@@ -70,6 +70,18 @@ export function getWLLZInfo(params) {
export function getSys12345(params) { export function getSys12345(params) {
return http.get(`${BASEURL}/wllz/complainapi/sys12345`, params); return http.get(`${BASEURL}/wllz/complainapi/sys12345`, params);
} }
// 12345查询受理类型
export function getType(params) {
return http.get(`${BASEURL}/inter/sys12345/getType`, params);
}
// 12345查询写信详情
export function letterInfo(params) {
return http.get(`${BASEURL}/inter/sys12345/letterInfo`, params);
}
// 12345写信报表
export function adminList(params) {
return http.post(`${BASEURL}/inter/sys12345/adminList`, params);
}
// 样表列表 // 样表列表
export function getBillList(params) { export function getBillList(params) {
...@@ -112,7 +124,10 @@ export function getOrderList(params) { ...@@ -112,7 +124,10 @@ export function getOrderList(params) {
export function getOrderinfo(params) { export function getOrderinfo(params) {
return http.get(`${BASEURL}/wechat/order_data/orderinfo`, params); return http.get(`${BASEURL}/wechat/order_data/orderinfo`, params);
} }
// 部门列表
export function getDeptList(params) {
return http.post(`${baseURL}/base/dept/list`, params);
}
/** /**
* 取件记录报表 * 取件记录报表
*/ */
...@@ -191,3 +206,11 @@ export function getImpossibleInfo(params) { ...@@ -191,3 +206,11 @@ 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 getInfoList(params) {
return http.post(`${baseURL}/m/device/alarm/info/list`, params);
}
import http from "../request/http";
let baseURL = process.env.VUE_APP_API_PHP_URL;
//群众画像-整体情况
export function peopleQs(params) {
return http.get(`${baseURL}/inter/Personas/peopleQs`, params);
}
//注册区域分析
export function registerProvince(params) {
return http.get(`${baseURL}/inter/Personas/registerProvince`, params);
}
//本外地注册区域分析
export function registerBwd(params) {
return http.get(`${baseURL}/inter/Personas/registerBwd`, params);
}
//注册性别分析
export function registerSex(params) {
return http.get(`${baseURL}/inter/Personas/registerSex`, params);
}
//注册年龄分析
export function registerAge(params) {
return http.get(`${baseURL}/inter/Personas/registerAge`, params);
}
//注册民族分析
export function registerNation(params) {
return http.get(`${baseURL}/inter/Personas/registerNation`, params);
}
//办件用户地域分析
export function provinceCase(params) {
return http.get(`${baseURL}/inter/statistic/provinceCase`, params);
}
//办件省份下地域分析
export function provinceStatistic(params) {
return http.get(`${baseURL}/inter/statistic/provinceStatistic`, params);
}
//本外地分析
export function bwdStatistic(params) {
return http.get(`${baseURL}/inter/statistic/bwdStatistic`, params);
}
//性别办件分析
export function genderRateType(params) {
return http.get(`${baseURL}/inter/Personas/genderRateType`, params);
}
//办件年龄分析
export function ageRate(params) {
return http.get(`${baseURL}/inter/statistic/ageRate`, params);
}
//民族办件次数分析
export function TopNationStatistic(params) {
return http.get(`${baseURL}/inter/statistic/TopNationStatistic`, params);
}
//用户列表
export function peopelList(params) {
return http.get(`${baseURL}/inter/Personas/peopelList`, params);
}
//用户分析
export function userAnalysis(params) {
return http.get(`${baseURL}/inter/Personas/userAnalysis`, params);
}
/* 颜色 */
.primary {
color: #1890ff;
}
.delete {
color: #ff4d4f;
}
.green {
color: #1bbc9b;
}
.clofff {
color: #fff;
}
.orange {
color: orange;
}
.bgdel {
background-color: #ff4d4f;
}
.bgpr {
background-color: #1890ff;
}
.bgg {
background-color: #1bbc9b;
}
/* 版心 */
.container {
width: 1200px;
}
/* 弹性布局 */
.flex {
display: flex;
}
.flex1 {
flex: 1;
}
.flexc {
flex-direction: column;
}
.flexwrap {
flex-wrap: wrap;
}
.jcc {
justify-content: center;
}
.jca {
justify-content: space-around;
}
.jcb {
justify-content: space-between;
}
.jce {
justify-content: space-evenly;
}
.aic {
align-items: center;
}
.aca {
align-content: space-around;
}
.acb {
align-content: space-between;
}
.ace {
align-content: space-evenly;
}
/* margin */
.m10 {
margin: 10px;
}
.m15 {
margin: 15px;
}
.m20 {
margin: 20px;
}
.mt10 {
margin-top: 10px;
}
.mt15 {
margin-top: 15px;
}
.mt20 {
margin-top: 20px;
}
.mt50 {
margin-top: 50px;
}
.ml10 {
margin-left: 10px;
}
.ml15 {
margin-left: 15px;
}
.ml20 {
margin-left: 20px;
}
.ml25 {
margin-left: 25px;
}
.mr10 {
margin-right: 10px;
}
.mr15 {
margin-right: 15px;
}
.mr20 {
margin-right: 20px;
}
.mr25 {
margin-right: 25px;
}
.mr50 {
margin-right: 50px;
}
.mb10 {
margin-bottom: 10px;
}
.mb15 {
margin-bottom: 15px;
}
.mb20 {
margin-bottom: 20px;
}
.mb25 {
margin-bottom: 25px;
}
/* padding */
.pd10 {
padding: 10px;
}
.pd15 {
padding: 15px;
}
.pd20 {
padding: 20px;
}
.pdt10 {
padding-top: 10px;
}
.pdt15 {
padding-top: 15px;
}
.pdt20 {
padding-top: 20px;
}
.pdt30 {
padding-top: 30px;
}
.pdl8 {
padding-left: 8px;
}
.pdl10 {
padding-left: 10px;
}
.pdl15 {
padding-left: 15px;
}
.pdl20 {
padding-left: 20px;
}
.pdr10 {
padding-right: 10px;
}
.pdr15 {
padding-right: 15px;
}
.pdr20 {
padding-right: 20px;
}
.pdb10 {
padding-bottom: 10px;
}
.pdb15 {
padding-bottom: 15px;
}
.pdb20 {
padding-bottom: 20px;
}
/* 字体大小 */
.font16 {
font-size: 16px;
}
.font18 {
font-size: 18px;
}
.font20 {
font-size: 20px;
}
.font22 {
font-size: 22px;
}
.font24 {
font-size: 24px;
}
.font26 {
font-size: 26px;
}
.font28 {
font-size: 28px;
}
.font30 {
font-size: 30px;
}
/* 字体位置 */
.tac {
text-align: center;
}
.tal {
text-align: left;
}
.tar {
text-align: right;
}
/* 加粗 */
.fontw600 {
font-weight: 600;
}
.fontw700 {
font-weight: 700;
}
.fontw800 {
font-weight: 800;
}
/* 手型鼠标 */
.pointer {
cursor: pointer;
}
.pagination {
margin-top: 10px;
text-align: right;
}
.color_title {
margin-left: 15px;
position: relative;
margin-bottom: 15px;
color: #1890ff;
}
.color_title::before {
content: "";
width: 4px;
height: 20px;
position: absolute;
top: 0px;
left: -16px;
background-color: #0595fd;
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
overflow-y: auto;
}
::-webkit-scrollbar-thumb {
border-radius: 6px;
background-color: rgba(144, 147, 153, 0.5);
}
::-webkit-scrollbar-track {
border-radius: 6px;
background: #fff;
}
.ant-modal-close {
color: #188fff !important;
}
.ant-modal-close svg {
font-size: 26px !important;
}
.ant-modal-title {
color: #1890ff !important;
font-size: 18px;
font-weight: bold;
}
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
flex-wrap: wrap;
}
.header_box > div {
display: flex;
justify-content: flex-start;
align-items: center;
}
.header_box > div b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
}
.header_box > div b i {
color: #0595fd;
font-style: normal;
}
.header_box > div sub {
font-size: 14px;
font-style: normal;
bottom: unset;
margin-left: 20px;
}
.header_box > div .export_btn {
outline: none;
cursor: pointer;
border: none;
padding: 0.8rem 1.2rem;
margin: 0;
font-family: inherit;
font-size: inherit;
position: relative;
display: inline-block;
font-size: 0.8rem;
border-radius: 6px;
overflow: hidden;
background: #42dac8;
color: ghostwhite;
}
.header_box > div .export_btn span {
position: relative;
z-index: 10;
transition: color 0.4s;
}
.header_box > div .export_btn:hover span {
color: #fef2f2;
}
.header_box > div .export_btn::before,
.header_box > div .export_btn::after {
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 100%;
z-index: 0;
}
.header_box > div .export_btn::before {
content: "";
background: #08cfb8;
width: 120%;
left: -10%;
transform: skew(30deg);
transition: transform 0.4s cubic-bezier(0.3, 1, 0.8, 1);
}
.header_box > div .export_btn:hover::before {
transform: translate3d(100%, 0, 0);
}
.header_box > span {
display: flex;
justify-content: space-between;
align-items: center;
}
.header_box > span /deep/ .ant-input-affix-wrapper {
width: 15rem !important;
margin-right: 1rem !important;
}
.header_box > span /deep/ .ant-input {
height: 2.3rem !important;
}
.header_box > span /deep/ .ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
.header_box > span /deep/ .ant-select-selection__rendered {
height: 100% !important;
}
.header_box > span /deep/ .ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.header_box > span .search_btn {
padding: 0.8rem 1.2rem;
border: 0;
border-radius: 5px;
background: #1890ff;
box-shadow: rgba(0, 0, 0, 0.05) 0 0 8px;
letter-spacing: 1.5px;
text-transform: uppercase;
font-size: 0.8rem;
color: hsl(0, 0%, 100%);
transition: all 0.5s ease;
cursor: pointer;
}
.header_box > span .search_btn:hover {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: #5d18dc 0px 2px 10px 0px;
}
.header_box > span .search_btn:active {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: #5d18dc 0px 0px 0px 0px;
transform: translateY(2px);
transition: 100ms;
}
.main .type0 {
color: #888888;
}
.main .type1 {
color: #f94545;
}
.main .type2 {
color: #04ca8f;
}
.main .ant-btn-link {
padding: 0 !important;
}
.main .ant-btn-link + .ant-btn-link {
margin-left: 1rem !important;
}
.main .ant-table-pagination {
float: right !important;
}
.ant-btn-success {
background-color: #04ca8f;
border-color: #04ca8f;
color: #fff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.12);
-webkit-box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
box-shadow: 0 2px 0 rgba(0, 0, 0, 0.05);
}
.ant-btn-success:hover,
.ant-btn-success:focus {
color: #fff;
background-color: #42dac8;
border-color: #42dac8;
}
.ant-select {
min-width: 120px;
}
.ant-calendar-picker {
min-width: 270px;
}
.ellipsis {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
}
...@@ -320,6 +320,7 @@ ...@@ -320,6 +320,7 @@
left: -16px; left: -16px;
background-color: rgba(5, 149, 253, 1); background-color: rgba(5, 149, 253, 1);
} }
::-webkit-scrollbar { ::-webkit-scrollbar {
width: 6px; width: 6px;
height: 6px; height: 6px;
...@@ -335,24 +336,29 @@ ...@@ -335,24 +336,29 @@
border-radius: 6px; border-radius: 6px;
background: #fff; background: #fff;
} }
.ant-modal-close { .ant-modal-close {
color: #188fff !important; color: #188fff !important;
} }
.ant-modal-close svg { .ant-modal-close svg {
font-size: 26px !important; font-size: 26px !important;
} }
.ant-modal-title { .ant-modal-title {
color: #1890ff !important; color: #1890ff !important;
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
} }
.header_box { .header_box {
padding-bottom: 1rem; padding-bottom: 1rem;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
flex-wrap: wrap; flex-wrap: wrap;
& > div {
&>div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -362,17 +368,20 @@ ...@@ -362,17 +368,20 @@
font-weight: unset; font-weight: unset;
font-size: 16px; font-size: 16px;
margin-left: 20px; margin-left: 20px;
i { i {
color: #0595fd; color: #0595fd;
font-style: normal; font-style: normal;
} }
} }
sub { sub {
font-size: 14px; font-size: 14px;
font-style: normal; font-style: normal;
bottom: unset; bottom: unset;
margin-left: 20px; margin-left: 20px;
} }
.export_btn { .export_btn {
outline: none; outline: none;
cursor: pointer; cursor: pointer;
...@@ -388,6 +397,7 @@ ...@@ -388,6 +397,7 @@
overflow: hidden; overflow: hidden;
background: #42dac8; background: #42dac8;
color: ghostwhite; color: ghostwhite;
& span { & span {
position: relative; position: relative;
z-index: 10; z-index: 10;
...@@ -423,29 +433,35 @@ ...@@ -423,29 +433,35 @@
} }
} }
& > span { &>span {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
/deep/.ant-input-affix-wrapper { /deep/.ant-input-affix-wrapper {
width: 15rem !important; width: 15rem !important;
margin-right: 1rem !important; margin-right: 1rem !important;
} }
/deep/.ant-input { /deep/.ant-input {
height: 2.3rem !important; height: 2.3rem !important;
} }
/deep/.ant-select-selection { /deep/.ant-select-selection {
width: 170px !important; width: 170px !important;
height: 2.3rem !important; height: 2.3rem !important;
margin-right: 1rem !important; margin-right: 1rem !important;
} }
/deep/.ant-select-selection__rendered { /deep/.ant-select-selection__rendered {
height: 100% !important; height: 100% !important;
} }
/deep/.ant-select-selection-selected-value { /deep/.ant-select-selection-selected-value {
height: 100% !important; height: 100% !important;
line-height: 2.3rem !important; line-height: 2.3rem !important;
} }
.search_btn { .search_btn {
padding: 0.8rem 1.2rem; padding: 0.8rem 1.2rem;
border: 0; border: 0;
...@@ -477,26 +493,33 @@ ...@@ -477,26 +493,33 @@
} }
} }
} }
.main { .main {
.type0 { .type0 {
color: #888888; color: #888888;
} }
.type1 { .type1 {
color: #f94545; color: #f94545;
} }
.type2 { .type2 {
color: #04ca8f; color: #04ca8f;
} }
.ant-btn-link { .ant-btn-link {
padding: 0 !important; padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
.ant-table-pagination { .ant-table-pagination {
float: right !important; float: right !important;
} }
} }
.ant-btn-success { .ant-btn-success {
background-color: #04ca8f; background-color: #04ca8f;
border-color: #04ca8f; border-color: #04ca8f;
...@@ -505,18 +528,22 @@ ...@@ -505,18 +528,22 @@
-webkit-box-shadow: 0 2px 0 rgb(0 0 0 / 5%); -webkit-box-shadow: 0 2px 0 rgb(0 0 0 / 5%);
box-shadow: 0 2px 0 rgb(0 0 0 / 5%); box-shadow: 0 2px 0 rgb(0 0 0 / 5%);
} }
.ant-btn-success:hover, .ant-btn-success:hover,
.ant-btn-success:focus { .ant-btn-success:focus {
color: #fff; color: #fff;
background-color: #42dac8; background-color: #42dac8;
border-color: #42dac8; border-color: #42dac8;
} }
.ant-select { .ant-select {
min-width: 120px; min-width: 120px;
} }
.ant-calendar-picker { .ant-calendar-picker {
min-width: 270px; min-width: 270px;
} }
.ellipsis { .ellipsis {
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
......
<template> <template>
<div class="myUploadFile"> <div class="myUploadFile">
<a-upload :name="defaultInfo.name" :action="defaultInfo.action" :listType="defaultInfo.listType" <a-upload
:name="defaultInfo.name"
:action="defaultInfo.action"
:listType="defaultInfo.listType"
:multiple="defaultInfo.multiple"
:showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.defaultFileList"
:file-list="defaultInfo.fileList"
:disabled="defaultInfo.disabled"
:directory="defaultInfo.directory"
:data="defaultInfo.objAttach"
:headers="headers"
:remove="uploadRemove"
@change="uploadChange"
@preview="handlePreview"
>
<slot></slot>
</a-upload>
<!-- <a-upload :name="defaultInfo.name" :action="defaultInfo.action" :listType="defaultInfo.listType"
:multiple="defaultInfo.multiple" :showUploadList="defaultInfo.showUploadList" :multiple="defaultInfo.multiple" :showUploadList="defaultInfo.showUploadList"
:defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled" :defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled"
:directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers" :directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers"
:beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview"> :beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview">
<slot></slot> <slot></slot>
</a-upload> </a-upload> -->
<a-modal :visible="defaultInfo.previewVisible" :footer="null" @cancel="defaultInfo.previewVisible = false"> <a-modal
:visible="defaultInfo.previewVisible"
:footer="null"
@cancel="defaultInfo.previewVisible = false"
>
<img alt="example" style="width: 100%" :src="defaultInfo.previewImage" /> <img alt="example" style="width: 100%" :src="defaultInfo.previewImage" />
</a-modal> </a-modal>
</div> </div>
...@@ -68,18 +90,15 @@ export default { ...@@ -68,18 +90,15 @@ export default {
"action" "action"
] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`; ] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`;
} else { } else {
this.defaultInfo[ this.defaultInfo["action"] = `${this.fileCommonupload}`;
"action"
] = `${this.fileCommonupload}`;
} }
console.log(this.defaultInfo);
}, },
deep: true, deep: true,
immediate: true, immediate: true,
}, },
}, },
created() { }, created() {},
methods: { methods: {
uploadRemove(file) { uploadRemove(file) {
if (file.id != undefined) { if (file.id != undefined) {
...@@ -88,8 +107,8 @@ export default { ...@@ -88,8 +107,8 @@ export default {
this.defaultInfo.fileList = this.defaultInfo.fileList.filter( this.defaultInfo.fileList = this.defaultInfo.fileList.filter(
(item) => item.uid != file.uid (item) => item.uid != file.uid
); );
console.log(this.defaultInfo.fileList.length,"=--------") console.log(this.defaultInfo.fileList.length, "=--------");
if(!this.defaultInfo.fileList.length){ if (!this.defaultInfo.fileList.length) {
this.$emit("input", ""); //相对地址 this.$emit("input", ""); //相对地址
} }
}, },
...@@ -117,7 +136,7 @@ export default { ...@@ -117,7 +136,7 @@ export default {
return result; return result;
}, },
uploadChange({ file, fileList }) { uploadChange({ file, fileList }) {
console.log(fileList) console.log(fileList);
if (file.status === "error") { if (file.status === "error") {
return; return;
this.$message.error(`${file.name} 上传失败.`); this.$message.error(`${file.name} 上传失败.`);
......
...@@ -414,6 +414,15 @@ const routes = [ ...@@ -414,6 +414,15 @@ const routes = [
), ),
meta: { title: "12345拨打记录报表" }, meta: { title: "12345拨打记录报表" },
}, },
{
path: "letterRecordForm",
name: "letterRecordForm",
component: () =>
import(
/* webpackChunkName: "letterRecordForm" */ "@/views/dataAdmin/components/networkGovernance/letterRecordForm.vue"
),
meta: { title: "12345写信记录报表" },
},
], ],
}, },
], ],
......
<template> <template>
<div> <div>
<div :id="id" :style="{height: this.height+'px', width: this.width+'px'}"></div> <div :id="id" :style="{ height: this.height + 'px', width: this.width + 'px' }"></div>
</div> </div>
</template> </template>
<script > <script >
import * as echarts from 'echarts' import * as echarts from 'echarts'
let myChart= null let myChart = null
export default { export default {
props: { props: {
id: { id: {
type: String type: String
}, },
height:{ height: {
type: String | Number, type: String | Number,
}, },
width:{ width: {
type: String | Number, type: String | Number,
}, },
datas: Object datas: Object
...@@ -23,27 +23,37 @@ export default { ...@@ -23,27 +23,37 @@ export default {
return { return {
} }
}, },
watch:{ watch: {
datas: function(obj){ datas: function (obj) {
if(obj){ if (obj) {
this.pieInit(obj.data) this.pieInit(obj.data, obj.nameArr)
} }
} }
}, },
methods: { methods: {
pieInit(data) { pieInit(data, nameArr) {
console.log(data)
let total = 0
data[0].value.forEach(i => {
total += parseInt(i)
})
console.log(total)
let arrType = {
yycount: '在线预约',
qhcount: '现场取号',
pjcount: '评价次数',
comcount: '意见建议',
imcount: '办不成事',
}
let arr = nameArr.map(i => {
return { name: arrType[i], max: total }
})
console.log(arr)
myChart = echarts.init(document.getElementById(this.id)) myChart = echarts.init(document.getElementById(this.id))
let option = { let option = {
radar: { radar: {
// shape: 'circle', // shape: 'circle',
indicator: [ indicator: arr
{ name: '在线预约', max: 100 },
{ name: '现场取号', max: 100 },
{ name: '个人申报', max: 100 },
{ name: '评价次数', max: 100 },
{ name: '意见建议', max: 100 },
{ name: '办不成事', max: 100 }
]
}, },
series: [ series: [
{ {
...@@ -61,5 +71,4 @@ export default { ...@@ -61,5 +71,4 @@ export default {
} }
} }
</script> </script>
<style lang="less" scoped> <style lang="less" scoped></style>
</style> \ No newline at end of file
\ No newline at end of file
...@@ -153,6 +153,7 @@ export default { ...@@ -153,6 +153,7 @@ export default {
font-size: 18px; font-size: 18px;
font-weight: bold; font-weight: bold;
padding-bottom: 10px; padding-bottom: 10px;
text-align: center;
} }
.remark { .remark {
font-size: 14px; font-size: 14px;
......
...@@ -3,58 +3,88 @@ ...@@ -3,58 +3,88 @@
<div class="main"> <div class="main">
<div class="first_card"> <div class="first_card">
<div class="breadMenu"> <div class="breadMenu">
<Breadcrumb/> <Breadcrumb />
</div> </div>
<div class="searchBox"> <div class="searchBox">
<a-input v-model="peopleName" placeholder="请输入群众名称搜索" style="width: 35.625rem"></a-input> <a-select show-search placeholder="请输入群众名称搜索" style="width: 35.625rem"
<a-button type="primary" class="addclass" @click="startAnalysis()">开始分析</a-button> :default-active-first-option="false" :show-arrow="false" :filter-option="false" allowClear
<a-button type="primary" class="addclass" v-if="btnShow" @click="backBase()">返回</a-button> :not-found-content="null" :options="peopleArr" @search="peopelListFn"
@change="handleChange"></a-select>
<!-- <a-input v-model="peopleName" placeholder="请输入群众名称搜索" style="width: 35.625rem"></a-input> -->
<a-button type="primary" class="addclass" v-if="!btnShow" @click="startAnalysis()">开始分析</a-button>
<a-button type="primary" class="addclass" v-else @click="backBase()">返回</a-button>
</div> </div>
</div> </div>
<div class="content_view"> <div class="content_view">
<router-view /> <router-view keep-alive />
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import Breadcrumb from "./breadcrumb/index.vue"; import Breadcrumb from "./breadcrumb/index.vue";
export default { import { peopelList } from '@/api/userPortrait'
components:{ export default {
components: {
Breadcrumb Breadcrumb
}, },
data() { data() {
return { return {
// 搜索框 // 搜索框
peopleName: '', peopleId: '',
peopleArr: [],
btnShow: false, btnShow: false,
} }
}, },
methods:{ methods: {
//输入框回显
peopelListFn(val) {
this.peopleArr = []
peopelList({ siteid: localStorage.getItem('siteId'), name: val }).then(res => {
if (res.code == 1) {
res.data.forEach(r => {
this.peopleArr.push({
value: r.id,
label: r.idcard_Name + '    ' + r.idcard_IDCardNo,
});
});
}
})
},
handleChange(val) {
this.peopleId = val;
},
startAnalysis() { startAnalysis() {
this.peopleName= '' if (this.peopleId) {
this.$router.push({ path: 'portrayalAnalysis'}) this.$router.push({ path: 'portrayalAnalysis', query: { peopleid: this.peopleId } })
this.btnShow= true this.btnShow = true
} else {
this.$message.warning('请选择群众后搜索')
}
}, },
backBase() { backBase() {
this.peopleName= '' this.peopleArr = []
this.$router.push({ path: 'portrayalBase'}) this.$router.push({ path: 'portrayalBase' })
this.btnShow= false this.btnShow = false
}, },
} }
} }
</script> </script>
<style lang="less" scoped>
@headerH: 4.5rem;
<style lang="less" scoped> .Container {
@headerH: 4.5rem;
.Container {
height: 100% !important; height: 100% !important;
// background: #fac; // background: #fac;
background: #f5f5f5; background: #f5f5f5;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
.main { .main {
// background: #afc; // background: #afc;
border-radius: 6px; border-radius: 6px;
...@@ -62,28 +92,23 @@ ...@@ -62,28 +92,23 @@
overflow-y: auto; overflow-y: auto;
overflow-x: hidden; overflow-x: hidden;
} }
&::before { &::before {
content: ""; content: "";
display: block; display: block;
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient( background: -moz-linear-gradient(174deg,
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); background: -webkit-linear-gradient(174deg,
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85% rgba(108, 53, 247, 1) 85%);
); background: linear-gradient(174deg,
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
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);
} }
/deep/.ant-tabs-nav { /deep/.ant-tabs-nav {
...@@ -91,36 +116,43 @@ ...@@ -91,36 +116,43 @@
margin: 0 !important; margin: 0 !important;
} }
} }
/deep/.ant-tabs-tab { /deep/.ant-tabs-tab {
font-size: 14px !important; font-size: 14px !important;
& + .ant-tabs-tab {
&+.ant-tabs-tab {
margin: 0 !important; margin: 0 !important;
margin-left: 0.7rem !important; margin-left: 0.7rem !important;
} }
} }
/deep/.ant-tabs-bar{
/deep/.ant-tabs-bar {
margin: 0; margin: 0;
} }
} }
.first_card{
.first_card {
background: #FFF; background: #FFF;
margin-bottom: .9375rem; margin-bottom: .9375rem;
} }
.breadMenu{
.breadMenu {
height: 2.8125rem; height: 2.8125rem;
line-height: 2.8125rem; line-height: 2.8125rem;
padding: 0 5rem; padding: 0 5rem;
border-bottom: 1px solid rgba(226, 226, 226, 1); border-bottom: 1px solid rgba(226, 226, 226, 1);
} }
.searchBox{
.searchBox {
height: 6.25rem; height: 6.25rem;
display: flex; display: flex;
justify-content: center; justify-content: center;
align-items: center; align-items: center;
} }
.content_view{
.content_view {
padding: 0 5rem; padding: 0 5rem;
} }
</style> </style>
\ No newline at end of file
...@@ -10,60 +10,64 @@ ...@@ -10,60 +10,64 @@
<a-col :span="8"> <a-col :span="8">
<div class="inside_card"> <div class="inside_card">
<div class="head_title mb_15">用户信息</div> <div class="head_title mb_15">用户信息</div>
<a-form layout="horizontal" :model="formState" :label-col="{span: 4}" :wrapper-col="{span: 20}"> <a-form layout="horizontal" :model="formState" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
<a-form-item label="openID:">{{ formState.openId }}</a-form-item> <a-form-item label="openID:">{{ formState.openid || '--' }}</a-form-item>
<a-form-item label="微信昵称:">{{ formState.name }}</a-form-item> <a-form-item label="姓名:">{{ formState.idcard_Name || '--' }}</a-form-item>
<a-form-item label="城市:">{{ formState.city }}</a-form-item> <a-form-item label="城市:">{{ formState.city || '--' }}</a-form-item>
<a-form-item label="联系电话:">{{ formState.phone }}</a-form-item> <a-form-item label="联系电话:">{{ formState.phone || '--' }}</a-form-item>
<a-form-item label="身份证号:">{{ formState.ID }}</a-form-item> <a-form-item label="身份证号:">{{ formState.idcard_IDCardNo || '--' }}</a-form-item>
<a-form-item label="注册时间:">{{ formState.registerTime }}</a-form-item> <a-form-item label="注册时间:">{{ formState.update_time || '--' }}</a-form-item>
<a-form-item label="注册来源:">{{ formState.source }}</a-form-item> <a-form-item label="注册来源:">{{ regType[formState.register_type] || '--' }}</a-form-item>
<a-form-item label="户籍地址:">{{ formState.address }}</a-form-item> <a-form-item label="户籍地址:">{{ formState.idcard_Address || '--' }}</a-form-item>
</a-form> </a-form>
</div> </div>
<div class="inside_card"> <div class="inside_card">
<div class="head_title mb_15">关键数据</div> <div class="head_title mb_15">关键数据</div>
<a-form layout="horizontal" :model="formState" :label-col="{span: 4}" :wrapper-col="{span: 20}"> <a-form layout="horizontal" :model="formState" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
<a-form-item label="预约最多:">{{ formState.appointment.name }}({{ formState.appointment.value }})</a-form-item> <a-form-item label="预约最多:" v-if="formState.yymax">{{ formState.yymax ? formState.yymax.name : ''
<a-form-item label="取号最多:">{{ formState.appointment.name }}({{ formState.appointment.value }})</a-form-item> }}<span style="color: #FF5F5F;">({{ formState.yymax ? formState.yymax.count :
<a-form-item label="申报最多:">{{ formState.appointment.name }}({{ formState.appointment.value }})</a-form-item> '' }})</span></a-form-item>
<a-form-item label="小程序最多:">{{ formState.appointment.name }}({{ formState.appointment.value }})</a-form-item> <a-form-item label="取号最多:" v-if="formState.qhmax">{{ formState.qhmax ? formState.qhmax.name : ''
}} <span style="color: #FF5F5F;">({{ formState.qhmax ? formState.qhmax.count : '' }})</span>
</a-form-item>
<!-- <a-form-item label="申报最多:">{{ formState.appointment.name }}({{ formState.appointment.value
}})</a-form-item>
<a-form-item label="小程序最多:">{{ formState.appointment.name }}({{ formState.appointment.value
}})</a-form-item> -->
</a-form> </a-form>
<div class="evaluate_box"> <div class="evaluate_box" v-if="formState.pjdata">
<div class="good_box"> <div class="good_box">
<div class="good_title">{{ formState.good.value }}({{ formState.good.percent }}%)</div> <div class="good_title">{{ formState.pjdata.good_count }}({{ formState.pjdata.good_lv }}%)
</div>
<div class="good_desc">好评次数</div> <div class="good_desc">好评次数</div>
</div> </div>
<div class="bad_box"> <div class="bad_box">
<div class="bad_title">{{ formState.bad.value }}({{ formState.bad.percent }}%)</div> <div class="bad_title">{{ formState.pjdata.bad_count }}({{ formState.pjdata.bad_lv }}%)
</div>
<div class="bad_desc">差评次数</div> <div class="bad_desc">差评次数</div>
</div> </div>
</div> </div>
</div> </div>
</a-col> </a-col>
<a-col :span="8" class="f_center"> <a-col :span="8" class="f_center">
<img src="http://sy.scsmile.cn/YX-4.0/03-02YHHXTP/images/%E7%BE%A4%E4%BC%97%E5%88%86%E6%9E%90/u1433.png" alt="" style="height: 31.25rem"> <img src="@/assets/images/man.png" alt="" style="height: 31.25rem" v-if="formState.idcard_Sex == '男'">
<img src="@/assets/images/woman.png" alt="" style="height: 31.25rem" v-else>
<div class="information"> <div class="information">
<div class="info_name"> <div class="info_name">
神奇小伙<a-tag color="green" class="info_tag">实名认证</a-tag> {{ formState.idcard_Name }}<a-tag color="green" class="info_tag">实名认证</a-tag>
</div> </div>
<a-row> <a-row>
<a-col :span="8">年龄:18</a-col> <a-col :span="8">年龄:{{ formState.idcard_Name }}</a-col>
<a-col :span="8">性别:未知</a-col> <a-col :span="8">性别:{{ formState.idcard_Sex || '--' }}</a-col>
<a-col :span="8">民族:氪族</a-col> <a-col :span="8">民族:{{ formState.idcard_Nation }}</a-col>
</a-row> </a-row>
<div>点击查看区块链信息</div> <div> </div>
</div> </div>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<div class="inside_card"> <div class="inside_card">
<Radar <Radar :id="`radar`" :height="350" :width="500" :datas="radarData" />
:id="`radar`"
:height="350"
:width="500"
:datas="radarData"
/>
</div> </div>
<div> <div>
...@@ -76,13 +80,14 @@ ...@@ -76,13 +80,14 @@
<script > <script >
import Radar from "../../business/Component/radar/index.vue"; import Radar from "../../business/Component/radar/index.vue";
export default { import { userAnalysis } from "@/api/userPortrait"
export default {
components: { components: {
Radar Radar
}, },
data(){ data() {
return{ return {
options:[ options: [
{ {
value: '0', value: '0',
label: '今天', label: '今天',
...@@ -115,129 +120,172 @@ import Radar from "../../business/Component/radar/index.vue"; ...@@ -115,129 +120,172 @@ import Radar from "../../business/Component/radar/index.vue";
registerTime: '2023-03-01 10:00:00', registerTime: '2023-03-01 10:00:00',
source: '排队叫号系统', source: '排队叫号系统',
address: '四川省宜宾市叙州区林南路23号', address: '四川省宜宾市叙州区林南路23号',
appointment: {name: '机动车违章业务办理', value: '25'}, appointment: { name: '机动车违章业务办理', value: '25' },
good: {value: '36', percent: '20'}, good: { value: '36', percent: '20' },
bad: {value: '2', percent: '10'} bad: { value: '2', percent: '10' }
},
regType: {
Applets: '小程序',
wechat: '公众号',
app: '自助服务终端'
} }
} }
}, },
mounted(){ mounted() {
this.getRadarData() this.getRadarData()
this.userAnalysisFn(this.$route.query.peopleid)
}, },
methods: { methods: {
handleChange() {}, async userAnalysisFn(peopleid) {
getRadarData() { let res = await userAnalysis({ siteid: localStorage.getItem('siteId'), peopleid })
this.radarData= { // console.log(res)
if (res.code == 1) {
this.formState = res.data
// console.log(this.formState.xwph)
let arr = Object.values(this.formState.xwph)
let nameArr = Object.keys(this.formState.xwph)
// console.log(arr, nameArr)
// console.log(arr)
this.radarData = {
nameArr,
data: [ data: [
{ {
value: [42, 30, 20, 35, 50, 18], value: arr,
name: '偏好', name: '偏好',
areaStyle: { areaStyle: {
color: '#a6c5fc' color: '#a6c5fc'
} }
}, },
] ],
} }
} else {
this.$message.error('查询失败')
this.$router.push({ path: 'portrayalBase' })
} }
}, },
handleChange() { },
getRadarData() {
} }
},
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/ .ant-form-item{ /deep/ .ant-form-item {
margin-bottom: 0 margin-bottom: 0
} }
.head{
.head {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
} }
.head_title{
.head_title {
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-size: 1.125rem; font-size: 1.125rem;
color: #0595FD; color: #0595FD;
margin-right: 1.25rem; margin-right: 1.25rem;
} }
.head_desc{
.head_desc {
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
font-size: 14px; font-size: 14px;
color: #888888; color: #888888;
} }
.inside_card{
.inside_card {
background: #f3faff; background: #f3faff;
margin: .9375rem; margin: .9375rem;
padding: .9375rem; padding: .9375rem;
} }
.evaluate_box{
.evaluate_box {
display: flex; display: flex;
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
margin-top: 1.25rem; margin-top: 1.25rem;
} }
.good_box{
.good_box {
width: 10rem; width: 10rem;
background: #d0f3ee; background: #d0f3ee;
text-align: center; text-align: center;
padding: .9375rem; padding: .9375rem;
.good_title{
.good_title {
font-size: 1.25rem; font-size: 1.25rem;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
color: #04CA8F; color: #04CA8F;
margin-bottom: .625rem; margin-bottom: .625rem;
} }
.good_desc{
.good_desc {
font-size: .875rem; font-size: .875rem;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
color: #04CA8F; color: #04CA8F;
} }
} }
.bad_box{
.bad_box {
width: 10rem; width: 10rem;
background: #f5e3e7; background: #f5e3e7;
text-align: center; text-align: center;
padding: .9375rem; padding: .9375rem;
.bad_title{
.bad_title {
font-size: 1.25rem; font-size: 1.25rem;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
color: #FF5F5F; color: #FF5F5F;
margin-bottom: .625rem; margin-bottom: .625rem;
} }
.bad_desc{
.bad_desc {
font-size: .875rem; font-size: .875rem;
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
color: #FF5F5F; color: #FF5F5F;
} }
} }
.information{
.information {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
flex-wrap: nowrap; flex-wrap: nowrap;
justify-content: space-around; justify-content: space-around;
height: 200px; height: 200px;
} }
.info_name{
.info_name {
position: relative; position: relative;
font-size: 2.5rem; font-size: 2.5rem;
} }
.info_tag{
.info_tag {
position: absolute; position: absolute;
top: .9375rem; top: .9375rem;
margin-left: .9375rem; margin-left: .9375rem;
} }
.mb_15{
.mb_15 {
margin-bottom: .9375rem; margin-bottom: .9375rem;
} }
.f_40{
.f_40 {
font-size: 2.5rem; font-size: 2.5rem;
} }
.f_center{
.f_center {
text-align: center; text-align: center;
} }
</style> </style>
\ No newline at end of file
...@@ -9,17 +9,12 @@ ...@@ -9,17 +9,12 @@
</template> </template>
<a-row type="flex" align="middle"> <a-row type="flex" align="middle">
<a-col :span="4"> <a-col :span="4">
<div class="f_40 f_center warning">111</div> <div class="f_40 f_center warning">{{ massCount }}</div>
<div class="f_center">群众注册总量</div> <div class="f_center">群众注册总量</div>
<div class="f_center primary" @click="toTable">点击查看报表</div> <!-- <div class="f_center primary" @click="toTable">点击查看报表</div> -->
</a-col> </a-col>
<a-col :span="20"> <a-col :span="20">
<lineChart <lineChart :id="`one_line`" :title="`近30日注册情况分析`" :datas="oneLineData" :height="200" :width="1420" />
:id="`one_line`"
:title="`近30日注册情况分析`"
:datas="oneLineData"
:height="200"
:width="1420"/>
</a-col> </a-col>
</a-row> </a-row>
</a-card> </a-card>
...@@ -32,57 +27,27 @@ ...@@ -32,57 +27,27 @@
</template> </template>
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<map-chart <map-chart :id="`one_map`" :datas="oneMapData" :height="400" :width="550" />
:id="`one_map`"
:datas="oneMapData"
:height="400"
:width="550"
/>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-table <a-table :rowKey="(record, index) => { return index }" :dataSource="provinces"
:row-key="record => record.ranking" :dataSource="provinces" :columns="provincesColumns" :pagination="false"> :columns="provincesColumns" :scroll="{ y: 300 }" :pagination="false">
</a-table> </a-table>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<pieChart <pieChart :id="`one_pie`" :height="400" :width="550" :datas="onePieData" />
:id="`one_pie`"
:height="400"
:width="550"
:datas="onePieData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<doublePieChart <doublePieChart :id="`two_pie`" :height="300" :width="800" :datas="twoPieData" />
:id="`two_pie`"
:height="300"
:width="800"
:datas="twoPieData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<barChart <barChart :id="`one_bar`" :height="300" :width="800" :datas="oneBarData" />
:id="`one_bar`"
:height="300"
:width="800"
:datas="oneBarData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<barChart <barChart :id="`two_bar`" :height="300" :width="800" :datas="twoBarData" />
:id="`two_bar`"
:height="300"
:width="800"
:datas="twoBarData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<pieChart <pieChart :id="`three_pie`" :height="300" :width="800" :datas="threePieData" />
:id="`three_pie`"
:height="300"
:width="800"
:datas="threePieData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
</a-col> </a-col>
...@@ -100,57 +65,27 @@ ...@@ -100,57 +65,27 @@
<a-row type="flex" align="middle"> <a-row type="flex" align="middle">
<a-row> <a-row>
<a-col :span="8"> <a-col :span="8">
<map-chart <map-chart :id="`two_map`" :datas="oneMapData2" :height="400" :width="550" />
:id="`two_map`"
:datas="oneMapData"
:height="400"
:width="550"
/>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<a-table <a-table :rowKey="(record, index) => { return index }" :dataSource="provinces2"
:row-key="record => record.ranking" :dataSource="provinces" :columns="provincesColumns" :pagination="false"> :columns="provincesColumns2" :pagination="false" :scroll="{ y: 300 }">
</a-table> </a-table>
</a-col> </a-col>
<a-col :span="8"> <a-col :span="8">
<pieChart <pieChart :id="`four_pie`" :height="400" :width="550" :datas="onePieData2" />
:id="`four_pie`"
:height="400"
:width="550"
:datas="onePieData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<doublePieChart <doublePieChart :id="`five_pie`" :height="300" :width="800" :datas="twoPieData2" />
:id="`five_pie`"
:height="300"
:width="800"
:datas="twoPieData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<barChart <barChart :id="`six_bar`" :height="300" :width="800" :datas="oneBarData2" />
:id="`six_bar`"
:height="300"
:width="800"
:datas="oneBarData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<barChart <barChart :id="`three_bar`" :height="300" :width="800" :datas="twoBarData2" />
:id="`three_bar`"
:height="300"
:width="800"
:datas="twoBarData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
<pieChart <pieChart :id="`six_pie`" :height="300" :width="800" :datas="threePieData2" />
:id="`six_pie`"
:height="300"
:width="800"
:datas="threePieData"
/>
</a-col> </a-col>
<a-col :span="12"> <a-col :span="12">
</a-col> </a-col>
...@@ -169,13 +104,17 @@ import pieChart from "../../business/Component/pie/index.vue" ...@@ -169,13 +104,17 @@ import pieChart from "../../business/Component/pie/index.vue"
import lineChart from "../../business/Component/line/index.vue" import lineChart from "../../business/Component/line/index.vue"
import mapChart from "../../business/Component/map/index.vue" import mapChart from "../../business/Component/map/index.vue"
import moment from "moment" import moment from "moment"
export default { import {
components:{ peopleQs, registerProvince, registerBwd, registerSex, registerAge, registerNation, provinceCase, bwdStatistic,
provinceStatistic, genderRateType, ageRate, TopNationStatistic,
} from "@/api/userPortrait.js"
export default {
components: {
mapChart, pieChart, lineChart, doublePieChart, barChart mapChart, pieChart, lineChart, doublePieChart, barChart
}, },
data(){ data() {
return{ return {
options:[ options: [
{ {
value: '0', value: '0',
label: '今天', label: '今天',
...@@ -199,11 +138,17 @@ import moment from "moment" ...@@ -199,11 +138,17 @@ import moment from "moment"
], ],
oneLineData: {}, oneLineData: {},
oneMapData: {}, oneMapData: {},
oneMapData2: {},
onePieData: {}, onePieData: {},
onePieData2: {},
twoPieData: {}, twoPieData: {},
twoPieData2: {},
oneBarData: {}, oneBarData: {},
oneBarData2: {},
twoBarData: {}, twoBarData: {},
twoBarData2: {},
threePieData: {}, threePieData: {},
threePieData2: {},
provinces: [ provinces: [
{ {
ranking: 1, ranking: 1,
...@@ -218,165 +163,413 @@ import moment from "moment" ...@@ -218,165 +163,413 @@ import moment from "moment"
percent: '2' percent: '2'
}, },
], ],
provinces2: [
{
ranking: 1,
province: '四川省',
people: '999',
percent: '2'
},
{
ranking: 2,
province: '四川省',
people: '999',
percent: '2'
},
],
provincesColumns: [ provincesColumns: [
{ {
key:'ranking', key: 'ranking',
title: '序号', title: '序号',
dataIndex: 'ranking', dataIndex: 'id',
}, },
{ {
key:'province', key: 'province',
title: '省份', title: '省份',
dataIndex: 'province', dataIndex: 'province',
}, },
{ {
key:'people', key: 'value',
title: '注册人数', title: '注册人数',
dataIndex: 'people', dataIndex: 'value',
}, },
{ {
key:'percent', key: 'zb_lv',
title: '注册占比', title: '注册占比',
dataIndex: 'percent', dataIndex: 'zb_lv',
customRender(text, record, index) {
return parseFloat((text * 100).toFixed(2)) + "%"
}
},
],
provincesColumns2: [
{
key: 'ranking',
title: '序号',
dataIndex: 'id',
},
{
key: 'province',
title: '省份',
dataIndex: 'province',
},
{
key: 'value',
title: '办件人数',
dataIndex: 'value',
},
{
key: 'nums_val',
title: '办件占比',
dataIndex: 'nums_val',
customRender(text, record, index) {
return parseFloat((text * 100).toFixed(2)) + "%"
}
}, },
], ],
takeNumber: '0', takeNumber: '0',
nowDate: '' nowDate: '',
massCount: '0',//群众总量
timeArr: [],//群众注册时间
doTotal: 0,
} }
}, },
mounted(){ created() {
this.test()
}, },
methods:{ mounted() {
handleChange(){}, this.getPeopleQs()
toTable(){ this.getRegisterProvince()
this.$router.push({path:'register'}) this.getRegisterBwd()
this.getRegisterSex()
this.getRegisterAge()
this.getRegisterNation()
this.getProvinceCase()
this.getProvinceStatistic()
this.getBwdStatistic()
this.getGenderRateType()
this.getAgeRate()
this.getTopNationStatistic()
this.nowDate = moment(new Date()).format('YYYY-MM-DD h:mm:ss')
},
methods: {
toTable() {
this.$router.push({ path: 'register' })
}, },
test(){ //整体情况
this.nowDate= moment(new Date()).format('YYYY-MM-DD h:mm:ss') async getPeopleQs() {
this.oneLineData= { let res = await peopleQs({ siteid: localStorage.getItem('siteId') })
if (res.code == 1) {
this.massCount = res.data.count
let time = res.data.list?.map(i => { //循环获取时间
return moment(i.datetime).format('MM-DD')
})
let take = []
let app = []
let Applets = []
res.data.list?.forEach(i => {
i.row.forEach(j => {
if (j.register_type == 'take') {//循环获取排号机注册情况
return take.push(j.count)
}
if (j.register_type == 'app') {//循环获取自助终端注册情况
return app.push(j.count)
}
if (j.register_type == 'Applets') {//循环获取微官网注册情况
return Applets.push(j.count)
}
})
})
this.oneLineData = {
title: '近30日注册情况分析:', title: '近30日注册情况分析:',
legend: ['自助服务系统注册人数','微官网注册人数','排队系统注册人数'], legend: ['自助服务系统注册人数', '微官网注册人数', '排队系统注册人数'],
xData: ['3-15', '3-16', '3-17', '3-18', '3-19', '3-20'], xData: time,
dataList: [ dataList: [
{name: '自助服务系统注册人数', data: [120, 132, 101, 134, 90, 230, 210]}, { name: '自助服务系统注册人数', data: app },
{name: '微官网注册人数', data: [220, 182, 191, 234, 290, 330, 310]}, { name: '微官网注册人数', data: Applets },
{name: '排队系统注册人数', data: [150, 232, 201, 154, 190, 330, 410]}, { name: '排队系统注册人数', data: take },
] ]
} }
this.oneMapData={ }
},
//区域注册情况
async getRegisterProvince() {
let res = await registerProvince({ siteid: localStorage.getItem('siteId') })
let arr2 = res.data.sort(function (a, b) {
return b.count - a.count;
})
let arr = arr2.map((i, j) => {
i.id = j + 1
i.name = i.province
i.value = i.count
return i
})
// console.log(arr)
this.oneMapData = {
title: "注册用户地域分析", title: "注册用户地域分析",
data:[ data: arr
{ name: '四川省', value: 20057.34 },
{ name: '广东省', value: 15477.48 },
{ name: '福建省', value: 31686.1 },
{ name: '河北省', value: 6992.6 },
{ name: '河南省', value: 44045.49 },
{ name: '江苏省', value: 40689.64 },
]
} }
this.onePieData={ this.provinces = arr
this.onePieData = {
title: '', title: '',
type: 'scroll', type: 'scroll',
legend: ['四川省', '广东省', '福建省','河北省','河南省','江苏省',], legend: arr.forEach(i => { return i.province }),
data: [ data: arr
{ name: '四川省', value: 20057.34 },
{ name: '广东省', value: 15477.48 },
{ name: '福建省', value: 31686.1 },
{ name: '河北省', value: 6992.6 },
{ name: '河南省', value: 44045.49 },
{ name: '江苏省', value: 40689.64 },
]
} }
this.twoPieData={ },
//注册分布情况
async getRegisterBwd() {
let res = await registerBwd({ siteid: localStorage.getItem('siteId') })
this.twoPieData = {
title: '本地人与外地人注册分布', title: '本地人与外地人注册分布',
pieName: '分布详情', pieName: '分布详情',
firstName: '宜宾市本地人注册占比', firstName: '宜宾市本地人注册占比',
firstVal: '1', firstVal: res.data.bd_lv,
firstTotal: '10', firstTotal: 1,
secondName: '外地人注册占比', secondName: '外地人注册占比',
secondVal: '1', secondVal: res.data.wd_lv,
secondTotal: '10', secondTotal: 1,
} }
this.oneBarData={
},
//注册性别分布情况
async getRegisterSex() {
let res = await registerSex({ siteid: localStorage.getItem('siteId') })
// console.log(res)
if (res.data ? res.data.length > 0 : '') {
let man = res.data[0].row
let woman = res.data[1].row
this.oneBarData = {
title: '性别分布', title: '性别分布',
xData: ['', ''], xData: ['', ''],
data: [ data: [
{name: '自助服务系统注册人数', type: 'bar' ,data: [150, 232, 201, 154, 190, 330, 410]}, { name: '自助服务系统注册人数', type: 'bar', data: [man[1].count || 0, woman[1].count || 0] },
{name: '微官网注册人数', type: 'bar' ,data: [220, 182, 191, 234, 290, 330, 310]}, { name: '微官网注册人数', type: 'bar', data: [man[2].count || 0, woman[2].count || 0] },
{name: '排队系统注册人数', type: 'bar' ,data: [120, 132, 101, 134, 90, 230, 210]}, { name: '排队系统注册人数', type: 'bar', data: [man[0].count || 0, woman[0].count || 0] },
] ]
} }
this.twoBarData= { }
},
//注册年龄分布情况
async getRegisterAge() {
let res = await registerAge({ siteid: localStorage.getItem('siteId') })
// console.log(res)
let age_area = res.data.map(i => {
return i.age_area
})
let total = 0
let count = res.data.map(i => {
total += i.nums
return i.nums
})
// console.log(total)
let zb = count.map(i => {
return parseFloat((i / total * 10000).toFixed(2))
})
// console.log(zb)
this.twoBarData = {
title: '年龄分布', title: '年龄分布',
xData: ['1-10', '10-20', '20-30', '30-40', '40-50'], xData: age_area,
data: [ data: [
{name: '办理次数', type: 'bar' ,data: [150, 232, 201, 154, 190, 330, 410]}, { name: '办理次数', type: 'bar', data: count },
{name: '占比', type: 'line' ,data: [220, 182, 191, 234, 290, 330, 310]}, { name: '占比', type: 'line', data: zb },
] ]
} }
this.threePieData={ },
//注册民族分布情况
async getRegisterNation() {
let res = await registerNation({ siteid: localStorage.getItem('siteId') })
// console.log(res)
res.data.forEach(i => {
i.name = i.idcard_Nation
i.value = i.count
})
// console.log(res.data)
this.threePieData = {
title: '民族分布', title: '民族分布',
type: '', type: '',
legend: ['四川省', '广东省', '福建省','河北省','河南省','江苏省',], legend: res.data,
data: res.data
}
},
//办件用户地域分析
async getProvinceCase() {
let res = await provinceCase({ siteid: localStorage.getItem('siteId'), selected: 2 })
// console.log(res)
let arr2 = res.data.sort(function (a, b) {
return b.nums - a.nums;
})
let arr = arr2.map((i, j) => {
i.id = j + 1
i.province = i.name
i.value = i.nums
this.doTotal += i.nums
return i
})
arr.forEach(i => {
i.nums_val = i.nums / this.doTotal
})
// console.log(arr)
this.oneMapData2 = {
title: "办件用户地域分析",
data: arr
}
this.provinces2 = arr
},
//办件用户地域分析
async getProvinceStatistic() {
let res = await provinceStatistic({ siteid: localStorage.getItem('siteId'), selected: 2, province: '四川省' })
// console.log(res)
res.data.forEach(i => {
i.value = i.count
})
this.onePieData2 = {
title: '',
type: 'scroll',
legend: res.data,
data: res.data
}
},
//本外地分析
async getBwdStatistic() {
let res = await bwdStatistic({ siteid: localStorage.getItem('siteId'), selected: 2 })
// console.log(res)
this.twoPieData2 = {
title: '本地人与外地人办件分布',
pieName: '分布详情',
firstName: '宜宾市本地人办件占比',
firstVal: res.data.bd_lv,
firstTotal: 1,
secondName: '外地人办件占比',
secondVal: res.data.wd_lv,
secondTotal: 1,
}
},
//性别办件分析
async getGenderRateType() {
let res = await genderRateType({ siteid: localStorage.getItem('siteId'), selected: 2 })
if (res.data ? res.data.length > 0 : '') {
let man = res.data[0].row
let woman = res.data[1].row
this.oneBarData2 = {
title: '性别分布',
xData: ['', ''],
data: [ data: [
{ name: '四川省', value: 20057.34 }, { name: '自助服务系统注册人数', type: 'bar', data: [man[1].nums || 0, woman[1].nums || 0] },
{ name: '广东省', value: 15477.48 }, { name: '微官网注册人数', type: 'bar', data: [man[2].nums || 0, woman[2].nums || 0] },
{ name: '福建省', value: 31686.1 }, { name: '排队系统注册人数', type: 'bar', data: [man[0].nums || 0, woman[0].nums || 0] },
{ name: '河北省', value: 6992.6 },
{ name: '河南省', value: 44045.49 },
{ name: '江苏省', value: 40689.64 },
] ]
} }
} }
},
//办件年龄分析
async getAgeRate() {
let res = await ageRate({ siteid: localStorage.getItem('siteId'), selected: 2 })
let age_area = res.data.list.map(i => {
return i.age_area
})
let total = 0
let count = res.data.list.map(i => {
total += i.nums
return i.nums
})
// console.log(total)
let zb = count.map(i => {
return parseFloat((i / total * 10000).toFixed(2))
})
// console.log(zb)
this.twoBarData2 = {
title: '年龄分布',
xData: age_area,
data: [
{ name: '办理次数', type: 'bar', data: count },
{ name: '占比', type: 'line', data: zb },
]
}
},
async getTopNationStatistic() {
let res = await TopNationStatistic({ siteid: localStorage.getItem('siteId'), selected: 2 })
// console.log(res)
res.data.forEach(i => {
i.name = i.idcard_Nation
i.value = i.count
})
// console.log(res.data)
this.threePieData2 = {
title: '民族分布',
type: '',
legend: res.data,
data: res.data
} }
},
} }
}
</script> </script>
<style scoped lang="less"> <style scoped lang="less">
.head{ /deep/.ant-col {
margin-bottom: 20px;
}
.head {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
.head_title{
.head_title {
font-weight: 700; font-weight: 700;
font-style: normal; font-style: normal;
font-size: 16px; font-size: 16px;
color: #333; color: #333;
margin-right: 1.25rem; margin-right: 1.25rem;
} }
.head_desc{
.head_desc {
font-weight: 400; font-weight: 400;
font-style: normal; font-style: normal;
font-size: 14px; font-size: 14px;
color: #888888; color: #888888;
} }
} }
/deep/ .ant-table{
/deep/ .ant-table {
width: 100% !important; width: 100% !important;
} }
.f_20{
.f_20 {
font-size: 1.25rem; font-size: 1.25rem;
} }
.f_40{
.f_40 {
font-size: 2.5rem; font-size: 2.5rem;
} }
.f_center{
.f_center {
text-align: center; text-align: center;
} }
.warning{
.warning {
color: #FD6805 color: #FD6805
} }
.primary{
.primary {
color: #0595FD color: #0595FD
} }
.success{
.success {
color: #04CA8F color: #04CA8F
} }
.h_200{
.h_200 {
height: 12.5rem; height: 12.5rem;
} }
.mb_15{
.mb_15 {
margin-bottom: .9375rem; margin-bottom: .9375rem;
} }
</style> </style>
\ No newline at end of file
...@@ -7,38 +7,68 @@ ...@@ -7,38 +7,68 @@
</a-button> </a-button>
</div> </div>
<span> <span>
<a-checkbox-group :options="checkboxOptions" v-model="checkboxVALUE" @change="checkboxonChange" /> <a-checkbox-group
<a-input allowClear v-model="Query.workman_name" placeholder="请输入工作人员姓名查询 "> :options="checkboxOptions"
v-model="checkboxVALUE"
@change="checkboxonChange"
/>
<a-input
allowClear
v-model="Query.workman_name"
placeholder="请输入工作人员姓名查询 "
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-select v-model="Query.window_id" placeholder="请选择窗口"> <a-select v-model="Query.window_id" placeholder="请选择窗口">
<a-select-option value=""> 全部 </a-select-option> <a-select-option value=""> 全部 </a-select-option>
<a-select-option v-for="(item, index) of windowData" :key="index" :value="item.id"> <a-select-option
{{ item.englishName }} - {{item.fromnum}} v-for="(item, index) of windowData"
:key="index"
:value="item.id"
>
{{ item.englishName }} - {{ item.fromnum }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-select v-model="Query.warn_alert" placeholder="请选择类型"> <a-select v-model="Query.warn_alert" placeholder="请选择类型">
<a-select-option value=""> 全部 </a-select-option> <a-select-option value=""> 全部 </a-select-option>
<a-select-option v-for="(item,i) in warn_alert" :key="i" :value="i"> <a-select-option v-for="(item, i) in warn_alert" :key="i" :value="i">
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-range-picker format="YYYY年MM月DD日" valueFormat="yyyy-MM-DD" class="range_picker_style" <a-range-picker
v-model="Query.time"> format="YYYY年MM月DD日"
valueFormat="yyyy-MM-DD"
class="range_picker_style"
v-model="Query.time"
>
</a-range-picker> </a-range-picker>
<a-button type="primary" class="addclass" @click="onGetKqalert">搜索</a-button> <a-button type="primary" class="addclass" @click="onGetKqalert"
>搜索</a-button
>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="changeTablePage" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record"> <template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails">查看详情{{ record.id }}</a-button> <a-button type="link" @click="openDetails"
>查看详情{{ record.id }}</a-button
>
</template> </template>
</a-table> </a-table>
</div> </div>
...@@ -46,25 +76,42 @@ ...@@ -46,25 +76,42 @@
</template> </template>
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import { import { export2Excel } from "@/utils/js/exportExcel";
export2Excel import { getKqalert } from "@/api/dataAdmin";
} from "@/utils/js/exportExcel"; import { windowList } from "@/api/customer";
import { import moment from "moment";
getKqalert const warn_alert = {
} from "@/api/dataAdmin" 1: "离岗",
import { 2: "离开",
windowList 4: "玩手机",
} from "@/api/customer" 5: "扶头",
import moment from "moment"; 6: "趴桌",
const warn_alert = { };
1: '离岗', const tHeader = [
2: '离开', "序号",
4: '玩手机', "报警类型",
5: '扶头', "发生窗口",
6: '趴桌', "工作人员",
} "所属部门",
export default { "手机号",
"发生时间",
"时长",
"是否准确",
];
const filterVal = [
"index",
"warn_alert",
"window_name",
"workman_name",
"section_name",
"workman_phone",
"out_time",
"duration",
"isaccuracy",
"have_process_name",
];
export default {
mixins: [table], mixins: [table],
name: "PortalAdminVueReportForm", name: "PortalAdminVueReportForm",
data() { data() {
...@@ -80,11 +127,14 @@ ...@@ -80,11 +127,14 @@
}, //查询条件 }, //查询条件
checkboxVALUE: [], checkboxVALUE: [],
BegindAndEndTime: [], BegindAndEndTime: [],
checkboxOptions: [{ checkboxOptions: [
{
label: "只看未处理", label: "只看未处理",
value: "0", value: "0",
}, ], },
tableHeaders: [{ ],
tableHeaders: [
{
title: "序号", title: "序号",
dataIndex: "index", dataIndex: "index",
width: "60px", width: "60px",
...@@ -95,47 +145,48 @@ ...@@ -95,47 +145,48 @@
{ {
title: "报警类型", title: "报警类型",
dataIndex: "warn_alert", dataIndex: "warn_alert",
customRender: (text, record) => warn_alert[text] customRender: (text, record) => warn_alert[text],
}, },
{ {
title: "发生窗口", title: "发生窗口",
dataIndex: "window_name", dataIndex: "window_name",
customRender: (text, record) => text ? text : '--' customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "工作人员", title: "工作人员",
dataIndex: "workman_name", dataIndex: "workman_name",
customRender: (text, record) => text ? text : '--' customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "所属部门", title: "所属部门",
dataIndex: "section_name", dataIndex: "section_name",
customRender: (text, record) => text ? text : '--' customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "手机号", title: "手机号",
dataIndex: "workman_phone", dataIndex: "workman_phone",
customRender: (text, record) => text ? text : '--' customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "发生时间", title: "发生时间",
dataIndex: "out_time", dataIndex: "out_time",
customRender: (text, record) => text ? text : '--' customRender: (text, record) =>
text ? this.timestampToTime(text) : "--",
}, },
{ {
title: "时长", title: "时长",
dataIndex: "duration", dataIndex: "duration",
customRender: (text, record) => text ? text : '--' customRender: (text, record) => (text ? text : "--"),
}, },
{ {
title: "是否准确", title: "是否准确",
dataIndex: "isaccuracy", dataIndex: "isaccuracy",
customRender: (text, record) => text == 1 ? '准确' : '--' customRender: (text, record) => (text == 1 ? "准确" : "--"),
}, },
{ {
title: "是否处理", title: "是否处理",
dataIndex: "have_process_name", dataIndex: "have_process_name",
customRender: (text, record) => text ? text : '--' customRender: (text, record) => (text ? text : "--"),
}, },
// { // {
// title: "操作", // title: "操作",
...@@ -152,41 +203,57 @@ ...@@ -152,41 +203,57 @@
}, },
components: {}, components: {},
mounted() { mounted() {
this.onGetKqalert() this.onGetKqalert();
this.setMoment(); this.setMoment();
this.getWindowList(); this.getWindowList();
}, },
methods: { methods: {
// 时间戳转换为日期
timestampToTime(timestamp) {
var date = new Date(timestamp*1000);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var D =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var h = date.getHours() + ":";
var m = date.getMinutes() + ":";
var s = date.getSeconds();
return Y + M + D + h + m + s;
},
// 导出 // 导出
async handleExportTable() { async handleExportTable() {
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) { if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel( // 深度克隆避免影响页面表格展示
this.tHeader, data = this.$_.cloneDeep(this.tableSelectedRows);
this.filterVal,
this.tableSelectedRows,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else { } else {
getKqalert({ let datas = this.$_.cloneDeep(
await getKqalert({
...this.Query, ...this.Query,
page: 1, page: 1,
size: -1, size: -1,
}).then(res => { })
const { );
code, data = datas.data.data;
data data.forEach((text, i) => {
} = res; text.index = i + 1;
if (code == 1) { text.isaccuracy = text.isaccuracy == 1 ? "准确" : "--";
if (!data.data.length) return; text.out_time = text.out_time
? this.timestampToTime(text.out_time)
: "--";
});
if (!data.length) return;
export2Excel( export2Excel(
this.tHeader, tHeader,
this.filterVal, filterVal,
data.data, data,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss") "AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
} }
})
}
}, },
// 报表接口 // 报表接口
onGetKqalert() { onGetKqalert() {
...@@ -194,32 +261,26 @@ ...@@ -194,32 +261,26 @@
...this.Query, ...this.Query,
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
}).then(res => { }).then((res) => {
const { const { code, data } = res;
code,
data
} = res
if (code == 1) { if (code == 1) {
this.tableSourceData = data.data this.tableSourceData = data.data;
this.tablePagination.total = data.total this.tablePagination.total = data.total;
} }
console.log(res) console.log(res);
}) });
}, },
getWindowList() { getWindowList() {
windowList({ windowList({
page: 1, page: 1,
size: -1, size: -1,
siteId: JSON.parse(localStorage.getItem("siteId")) siteId: JSON.parse(localStorage.getItem("siteId")),
}).then(res => { }).then((res) => {
const { const { code, data } = res;
code,
data
} = res
if (code == 1) { if (code == 1) {
this.windowData = data.data this.windowData = data.data;
} }
}) });
}, },
openDetails() { openDetails() {
console.log("跳转网页"); console.log("跳转网页");
...@@ -231,9 +292,9 @@ ...@@ -231,9 +292,9 @@
}, },
checkboxonChange(val) { checkboxonChange(val) {
if (val.length == 0) { if (val.length == 0) {
this.Query.have_process = "" this.Query.have_process = "";
} else { } else {
this.Query.have_process = "0" this.Query.have_process = "0";
} }
}, },
QueueState(type) { QueueState(type) {
...@@ -248,19 +309,19 @@ ...@@ -248,19 +309,19 @@
} }
}, },
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-spin-container { /deep/.ant-spin-container {
display: block; display: block;
} }
/deep/.ant-checkbox-group { /deep/.ant-checkbox-group {
width: 250px; width: 250px;
} }
.range_picker_style { .range_picker_style {
margin-right: 20px; margin-right: 20px;
} }
</style> </style>
...@@ -2,19 +2,23 @@ ...@@ -2,19 +2,23 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="primary" class="addclass" @click="exportTable"> <a-button type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<span>告警次数:<i>256次</i></span> <!-- <span>告警次数:<i>256次</i></span>
<span>危险:<i>200次</i></span> <span>危险:<i>200次</i></span>
<span>次要:<i>65次</i></span> <span>次要:<i>65次</i></span>
<span>一般:<i>0次</i></span> <span>一般:<i>0次</i></span> -->
</div> </div>
<span> <span>
<a-input allowClear v-model="searchName" placeholder="请输入设备名称查询"> <a-input
allowClear
v-model="searchName"
placeholder="请输入设备名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-select default-value="001"> <a-select v-model="alarmType" style="margin: 0 10px">
<!-- <a-select-option <!-- <a-select-option
v-for="(item, index) of selectOptions" v-for="(item, index) of selectOptions"
:key="index" :key="index"
...@@ -23,10 +27,10 @@ ...@@ -23,10 +27,10 @@
{{ item.label }} {{ item.label }}
</a-select-option> --> </a-select-option> -->
<a-select-option value="001"> 内容001 </a-select-option> <a-select-option value=""> 全部 </a-select-option>
<a-select-option value="002"> 内容002 </a-select-option> <a-select-option value="0"> 离线 </a-select-option>
</a-select> </a-select>
<a-select default-value="001"> <a-select v-model="status">
<!-- <a-select-option <!-- <a-select-option
v-for="(item, index) of selectOptions" v-for="(item, index) of selectOptions"
:key="index" :key="index"
...@@ -35,31 +39,49 @@ ...@@ -35,31 +39,49 @@
{{ item.label }} {{ item.label }}
</a-select-option> --> </a-select-option> -->
<a-select-option value="001"> 状态001 </a-select-option> <a-select-option value="">全部状态</a-select-option>
<a-select-option value="002"> 状态002 </a-select-option> <a-select-option value="0"> 未清除 </a-select-option>
<a-select-option value="1"> 清除未确认 </a-select-option>
<a-select-option value="2"> 清除已确认 </a-select-option>
</a-select> </a-select>
<a-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime"> format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
style="margin: 0 10px"
>
</a-range-picker> </a-range-picker>
<a-button type="primary" class="addclass" >搜索</a-button> <a-button type="primary" class="addclass" @click="search"
>搜索</a-button
>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 490 }"
<template slot="告警级别" slot-scope="text, record, index"> :pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="alarmLevel" slot-scope="text, record, index">
<span class="levelState">{{ text }}</span> <span class="levelState">{{ text }}</span>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="openDetails">查看详情{{ record.id }}</a-button> <a-button type="link" @click="openDetails(record)">查看详情</a-button>
</template> </template>
</a-table> </a-table>
<Details ref="Details" /> <Details ref="Details" :msg="detailInfo" />
</div> </div>
</div> </div>
</template> </template>
...@@ -67,11 +89,16 @@ ...@@ -67,11 +89,16 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import Details from "./components/Details.vue"; import Details from "./components/Details.vue";
import { getInfoList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVuePoliticsShow", name: "PortalAdminVuePoliticsShow",
data() { data() {
return { return {
detailInfo: {},
status: "",
alarmType: "",
BegindAndEndTime: [], BegindAndEndTime: [],
tableHeaders: [ tableHeaders: [
{ {
...@@ -85,42 +112,60 @@ export default { ...@@ -85,42 +112,60 @@ export default {
{ {
title: "告警时间", title: "告警时间",
align: "center", align: "center",
dataIndex: "告警时间", customRender: (record) => {
return record.alarmTime
? this.timestampToTime(record.alarmTime)
: "--";
},
}, },
{ {
title: "设备名称", title: "设备名称",
align: "center", align: "center",
dataIndex: "设备名称", customRender: (record) => {
return record.deviceName ? record.deviceName : "--";
},
}, },
{ {
title: "告警内容", title: "告警内容",
align: "center", align: "center",
dataIndex: "告警内容", dataIndex: "alarmContent",
}, },
{ {
title: "告警级别", title: "告警级别",
align: "center", align: "center",
dataIndex: "告警级别", customRender: (record) => {
scopedSlots: { return record.alarmLevel == 0
customRender: "告警级别", ? "危险"
: record.alarmLevel == 1
? "次要"
: record.alarmLevel == 2
? "一般"
: "--";
}, },
}, },
{ {
title: "接收人员", title: "接收人员",
align: "center", align: "center",
dataIndex: "接收人员", dataIndex: "alarmReceivePersonnel",
}, },
{ {
title: "告警状态", title: "告警状态",
align: "center", align: "center",
dataIndex: "告警状态", customRender: (record) => {
return record.alarmStatus == 0
? "未清除"
: record.alarmStatus == 1
? "清除未确认"
: record.alarmStatus == 1
? "清除已确认"
: "--";
},
}, },
{ {
title: "操作", title: "操作",
align: "center", align: "center",
width: "110px", width: "110px",
dataIndex: "operation",
scopedSlots: { scopedSlots: {
customRender: "operation", customRender: "operation",
}, },
...@@ -133,22 +178,58 @@ export default { ...@@ -133,22 +178,58 @@ export default {
Details, Details,
}, },
mounted() { mounted() {
console.log(this.tablePagination);
this.setMoment(); this.setMoment();
for (let key = 0; key < 20; key++) { this.getData();
this.tableSourceData.push({
id: `00${key + 1}`,
告警时间: `2022-06-16 10:00:00${key + 1}`,
设备名称: `一楼排队机${key + 1}`,
告警内容: `离线${key + 1}`,
告警级别: `危险${key + 1}`,
接收人员: `刘德华${key + 1}`,
告警状态: `清楚已确认${key + 1}`,
});
}
}, },
methods: { methods: {
rangePickerChange(val) { // 时间戳转换为日期
console.log(val); timestampToTime(timestamp) {
var date = new Date(timestamp);
var Y = date.getFullYear() + "-";
var M =
(date.getMonth() + 1 < 10
? "0" + (date.getMonth() + 1)
: date.getMonth() + 1) + "-";
var D =
(date.getDate() < 10 ? "0" + date.getDate() : date.getDate()) + " ";
var h = date.getHours() + ":";
var m = date.getMinutes() + ":";
var s = date.getSeconds();
return Y + M + D + h + m + s;
},
// 获取数据源
getData() {
let data = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
deviceName: this.searchName,
alarmTimeStart: this.BegindAndEndTime[0],
alarmTimeEnd: this.BegindAndEndTime[1],
alarmStatus: this.status ? Number(this.status) : "",
alarmType: this.alarmType ? Number(this.alarmType) : "",
};
getInfoList(data).then((res) => {
if (res.code == 1) {
this.tableSourceData = res.data.data;
this.tablePagination.total = res.data.total;
}
});
},
// 搜索
search() {
this.tablePagination.current = 1;
this.getData();
},
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.getData();
},
rangePickerChange(date, dateString) {
this.BegindAndEndTime = dateString;
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -161,9 +242,32 @@ export default { ...@@ -161,9 +242,32 @@ export default {
return "type0"; return "type0";
} }
}, },
openDetails() { openDetails(val) {
this.$refs.Details.modalInfo.title = "告警详情"; this.$refs.Details.modalInfo.title = "告警详情";
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
let obj = JSON.parse(JSON.stringify(val));
obj.alarmStatus =
obj.alarmStatus == 0
? "未清除"
: obj.alarmStatus == 1
? "清除未确认"
: obj.alarmStatus == 1
? "清除已确认"
: "--";
obj.alarmLevel =
obj.alarmLevel == 0
? "危险"
: obj.alarmLevel == 1
? "次要"
: obj.alarmLevel == 2
? "一般"
: "--";
obj.alarmTime = this.timestampToTime(obj.alarmTime);
obj.updateTime = obj.updateTime
? this.timestampToTime(obj.updateTime)
: "--";
obj.updateUserId = obj.updateUserId ? obj.updateUserId : "--";
this.detailInfo = obj;
}, },
// 导出 // 导出
async handleExportTable() { async handleExportTable() {
...@@ -174,25 +278,98 @@ export default { ...@@ -174,25 +278,98 @@ export default {
data = this.$_.cloneDeep(this.tableSelectedRows); data = this.$_.cloneDeep(this.tableSelectedRows);
} else { } else {
let datas = this.$_.cloneDeep( let datas = this.$_.cloneDeep(
await getImpossible({ await getInfoList({
...this.queryform, deviceName: this.searchName,
alarmTimeStart: this.BegindAndEndTime[0],
alarmTimeEnd: this.BegindAndEndTime[1],
alarmStatus: this.status ? Number(this.status) : "",
alarmType: this.alarmType ? Number(this.alarmType) : "",
page: 1, page: 1,
size: -1 size: -1,
}) })
); );
this.btnLoading = false this.btnLoading = false;
data = datas.data.data data = datas.data.data;
if (!data.length) return; if (!data.length) return;
} }
const tHeader = [] const tHeader = [];
const filterVal = [] const filterVal = [];
this.tableHeaders.forEach(v=>{ data.forEach((v, i) => {
if(v.dataIndex){ v.index = i + 1;
tHeader.push(v.title) v.alarmTime = this.timestampToTime(v.alarmTime);
filterVal.push(v.dataIndex) v.alarmStatus =
v.alarmStatus == 0
? "未清除"
: v.alarmStatus == 1
? "清除未确认"
: v.alarmStatus == 1
? "清除已确认"
: "--";
v.alarmLevel =
v.alarmLevel == 0
? "危险"
: v.alarmLevel == 1
? "次要"
: v.alarmLevel == 2
? "一般"
: "--";
});
let tableHeaders = [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "告警时间",
align: "center",
dataIndex: "alarmTime",
},
{
title: "设备名称",
align: "center",
dataIndex: "deviceName",
},
{
title: "告警内容",
align: "center",
dataIndex: "alarmContent",
},
{
title: "告警级别",
align: "center",
dataIndex: "alarmLevel",
},
{
title: "接收人员",
align: "center",
dataIndex: "alarmReceivePersonnel",
},
{
title: "告警状态",
align: "center",
dataIndex: "alarmStatus",
},
{
title: "操作",
align: "center",
width: "110px",
scopedSlots: {
customRender: "operation",
},
},
];
tableHeaders.forEach((v) => {
if (v.dataIndex) {
tHeader.push(v.title);
filterVal.push(v.dataIndex);
} }
}) });
export2Excel( export2Excel(
tHeader, tHeader,
filterVal, filterVal,
...@@ -216,15 +393,15 @@ export default { ...@@ -216,15 +393,15 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
&>span { & > span {
margin-left: 10px; margin-left: 10px;
&>i { & > i {
margin: 0 5px; margin: 0 5px;
font-style: normal; font-style: normal;
} }
...@@ -258,6 +435,3 @@ export default { ...@@ -258,6 +435,3 @@ export default {
} }
} }
</style> </style>
...@@ -8,43 +8,48 @@ ...@@ -8,43 +8,48 @@
> >
<a-form-model <a-form-model
ref="ruleForm" ref="ruleForm"
:model="detailsForm" :model="msg"
:rules="detailsRules" :rules="detailsRules"
:label-col="{ span: 4 }" :label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }" :wrapper-col="{ span: 20 }"
> >
<a-form-model-item label="告警设备" prop="告警设备"> <a-form-model-item label="告警设备" prop="告警设备">
<a-input v-model="detailsForm.告警设备" placeholder="请输入" disabled /> <a-input v-model="msg.deviceName" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警时间" prop="告警时间"> <a-form-model-item label="告警时间" prop="告警时间">
<a-input v-model="detailsForm.告警时间" placeholder="请输入" disabled /> <a-input v-model="msg.alarmTime" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警内容" prop="告警内容"> <a-form-model-item label="告警内容" prop="告警内容">
<a-input v-model="detailsForm.告警内容" placeholder="请输入" disabled /> <a-input v-model="msg.alarmContent" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警程度" prop="告警程度"> <a-form-model-item label="告警程度" prop="告警程度">
<a-input v-model="detailsForm.告警程度" placeholder="请输入" disabled /> <a-input v-model="msg.alarmLevel" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警状态" prop="告警状态"> <a-form-model-item label="告警状态" prop="告警状态">
<a-input v-model="detailsForm.告警状态" placeholder="请输入" disabled /> <a-input v-model="msg.alarmStatus" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="接收人员" prop="接收人员"> <a-form-model-item label="接收人员" prop="接收人员">
<a-input v-model="detailsForm.接收人员" placeholder="请输入" disabled /> <a-input
v-model="msg.alarmReceivePersonnel"
placeholder="请输入"
disabled
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="告警详情" prop="告警详情"> <a-form-model-item label="告警详情" prop="告警详情">
<a-textarea <a-textarea
v-model="detailsForm.告警详情" v-model="msg.alarmContent"
placeholder="请输入" placeholder="请输入"
:rows="4" :rows="4"
disabled
/> />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="清楚时间" prop="清楚时间"> <!-- <a-form-model-item label="清楚时间" prop="清楚时间">
<a-input v-model="detailsForm.清楚时间" placeholder="请输入" disabled /> <a-input v-model="msg.updateTime" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="清楚人员" prop="清楚人员"> <a-form-model-item label="清楚人员" prop="清楚人员">
<a-input v-model="detailsForm.清楚人员" placeholder="请输入" disabled /> <a-input v-model="msg.updateUserId" placeholder="请输入" disabled />
</a-form-model-item> </a-form-model-item> -->
</a-form-model> </a-form-model>
</a-drawer> </a-drawer>
</template> </template>
...@@ -54,7 +59,9 @@ import modal from "../mixins/modal"; ...@@ -54,7 +59,9 @@ import modal from "../mixins/modal";
export default { export default {
mixins: [modal], mixins: [modal],
name: "PortalAdminVuePicWorks", name: "PortalAdminVuePicWorks",
props: {
msg: Object,
},
data() { data() {
return { return {
detailsForm: { detailsForm: {
...@@ -84,5 +91,3 @@ export default { ...@@ -84,5 +91,3 @@ export default {
overflow-x: hidden !important; overflow-x: hidden !important;
} }
</style> </style>
...@@ -45,7 +45,8 @@ ...@@ -45,7 +45,8 @@
:columns="tableHeaders" :dataSource="tableSourceData"> :columns="tableHeaders" :dataSource="tableSourceData">
<template slot="评价人照片" slot-scope="text"> <template slot="评价人照片" slot-scope="text">
<a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" /> <a-avatar v-if="!text || !baseurl" shape="square" :size="40" icon="user" />
<img v-else :src="baseurl + '/' + text" style="max-width: 100px; max-height: 100px" @click="$viewerApi({images:[baseurl + '/' + text]})"/> <img v-else :src="baseurl + '/' + text" style="max-width: 100px; max-height: 100px"
@click="$viewerApi({ images: [baseurl + '/' + text] })" />
</template> </template>
<template slot="操作" slot-scope="text, record"> <template slot="操作" slot-scope="text, record">
<a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button> <a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button>
...@@ -324,6 +325,7 @@ export default { ...@@ -324,6 +325,7 @@ export default {
}, },
//详情模块 //详情模块
openHandlingDetails(record) { openHandlingDetails(record) {
console.log(record)
// 判断为窗口屏或者其他状况,调用不同接口 // 判断为窗口屏或者其他状况,调用不同接口
if (record.pjxt == 1) { if (record.pjxt == 1) {
this.$refs.HandlingDetails.modalInfo.title = "办理明细"; this.$refs.HandlingDetails.modalInfo.title = "办理明细";
......
...@@ -28,10 +28,22 @@ ...@@ -28,10 +28,22 @@
v-model="searchForm.time" v-model="searchForm.time"
> >
</a-range-picker> </a-range-picker>
<a-select v-model="searchForm.sectionid" showSearch :option-filter-prop="'label'">
<a-select-option value="" label="全部"> 全部部门 </a-select-option>
<a-select-option
v-for="(v, key) in depList"
:key="key"
:value="v.id"
:label="v.name"
>
{{ v.name }}
</a-select-option>
</a-select>
<a-select v-model="searchForm.status"> <a-select v-model="searchForm.status">
<a-select-option value=""> 全部 </a-select-option> <a-select-option value=""> 全部 </a-select-option>
<a-select-option <a-select-option
v-for="(v, key) in statusItem" v-for="(v, key) in statusItem"
:key="key" :key="key"
:value="Number(key)" :value="Number(key)"
> >
...@@ -109,7 +121,7 @@ ...@@ -109,7 +121,7 @@
</template> </template>
<script> <script>
import { getOrderList } from "@/api/dataAdmin"; import { getOrderList,getDeptList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
let tHeader = [ let tHeader = [
// 导出的表头名信息 // 导出的表头名信息
...@@ -227,6 +239,14 @@ export default { ...@@ -227,6 +239,14 @@ export default {
align: "center", align: "center",
dataIndex: "business_name", dataIndex: "business_name",
}, },
{
title: "部门名称",
align: "center",
dataIndex: "section_name",
customRender: (text) => {
return text || "--";
},
},
{ {
title: "创建时间", title: "创建时间",
align: "center", align: "center",
...@@ -251,6 +271,7 @@ export default { ...@@ -251,6 +271,7 @@ export default {
searchForm: { searchForm: {
status: "", status: "",
title: "", title: "",
sectionid:"",
time: [ time: [
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"), this.$moment(new Date()).format("YYYY-MM-DD"),
...@@ -263,12 +284,23 @@ export default { ...@@ -263,12 +284,23 @@ export default {
tableSelectedKeys: [], tableSelectedKeys: [],
tableSelectedRows: [], tableSelectedRows: [],
tableSourceData: [], tableSourceData: [],
depList:[]//部门列表
}; };
}, },
created() { created() {
this.getOrderList(); this.getOrderList();
this.getDeptList()
}, },
methods: { methods: {
// 部门列表
getDeptList(){
getDeptList({page:1,size:-1}).then(res=>{
const {data} = res.data
if(res.code == 1){
this.depList = data
}
})
},
// 获取报表数据 // 获取报表数据
async getOrderList(search = {}) { async getOrderList(search = {}) {
let res = await getOrderList({ let res = await getOrderList({
......
<template> <template>
<div> <div>
<!-- 详情抽屉效果 --> <!-- 详情抽屉效果 -->
<a-drawer title="详情" placement="right" :visible="visible" closable @close="onClose" width="90%"> <a-drawer
<div class="drawerMain"> title="详情"
placement="right"
:visible="visible"
closable
@close="onClose"
width="90%"
>
<div class="drawerMain" v-if="title && title == '网络理政'">
<!-- 左侧建议内容 --> <!-- 左侧建议内容 -->
<div class="drawerLeft"> <div class="drawerLeft">
<div class="leftTitle"> <div class="leftTitle">建议内容</div>
建议内容
</div>
<div class="card"> <div class="card">
<div class="cardTitle">纠错标题 </div> <div class="cardTitle">纠错标题</div>
<div class="cardContent">{{fromData.title}}</div> <div class="cardContent">
{{ fromData.title ? fromData.title : "--" }}
</div>
</div> </div>
<div class="infoDetail"> <div class="infoDetail">
<div class="card"> <div class="card">
<div class="cardTitle">建议类型 </div> <div class="cardTitle">建议类型</div>
<div class="cardContent">{{fromData.type==1?'部门建议':fromData.type==2?'办事建议':fromData.type==3?'网站建议':fromData.type==4?'我要就错':fromData.type==5?'我要投诉':'我要咨询'}}</div> <div class="cardContent">
{{
fromData.type == 1
? "部门建议"
: fromData.type == 2
? "办事建议"
: fromData.type == 3
? "网站建议"
: fromData.type == 4
? "我要就错"
: fromData.type == 5
? "我要投诉"
: "我要咨询"
}}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle">真实姓名</div> <div class="cardTitle">真实姓名</div>
<div class="cardContent">{{fromData.upname}} </div> <div class="cardContent">
{{ fromData.upname ? fromData.upname : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 身份证号 </div> <div class="cardTitle">身份证号</div>
<div class="cardContent">{{fromData.idcard}}</div> <div class="cardContent">
{{ fromData.idcard ? fromData.idcard : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 电子邮箱 </div> <div class="cardTitle">电子邮箱</div>
<div class="cardContent">{{fromData.upmail}}</div> <div class="cardContent">
{{ fromData.upmail ? fromData.upmail : "--" }}
</div>
</div> </div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 联系地址 </div> <div class="cardTitle">联系地址</div>
<div class="cardContent">{{fromData.address}}</div> <div class="cardContent">
{{ fromData.address ? fromData.address : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 事件发生地 </div> <div class="cardTitle">事件发生地</div>
<div class="cardContent">{{fromData.thing_address}}</div> <div class="cardContent">
{{ fromData.thing_address ? fromData.thing_address : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 具体内容 </div> <div class="cardTitle">具体内容</div>
<div class="cardContent">{{fromData.content}}</div> <div class="cardContent">
{{ fromData.content ? fromData.content : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 附件 </div> <div class="cardTitle">附件</div>
<div class="cardContent" v-if="fromData.url"> <div class="cardContent" v-if="fromData.url">
<img v-for="(item,index) in fromData.url" :key="index" <img
:src="process.env.VUE_APP_API_BASE_URL+item"> v-for="(item, index) in fromData.url"
:key="index"
:src="process.env.VUE_APP_API_BASE_URL + item"
/>
</div> </div>
<div v-else>--</div> <div v-else>--</div>
</div> </div>
<div class="infoDetail"> <div class="infoDetail">
<div class="card"> <div class="card">
<div class="cardTitle"> 是否公开 </div> <div class="cardTitle">是否公开</div>
<div class="cardContent">{{fromData.valid==1?'':''}}</div> <div class="cardContent">
{{ fromData.valid == 1 ? "" : "" }}
</div>
</div>
<div class="card">
<div class="cardTitle">是否保密</div>
<div class="cardContent">
{{ fromData.secrecy == 1 ? "" : "" }}
</div>
</div>
<div class="card">
<div class="cardTitle">提交日期</div>
<div class="cardContent">
{{ fromData.create_time ? fromData.create_time : "--" }}
</div>
</div>
</div>
</div>
<!-- 右侧回复内容 -->
<div class="drawerRight">
<div class="rightTitle">建议答复</div>
<div class="card">
<div class="cardTitle">所属部门<span>(非必选)</span></div>
<div class="cardContent">
{{ fromData.deptName ? fromData.deptName : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">回复内容<span>(必填)</span></div>
<div class="cardContent">
{{ fromData.recontent ? fromData.recontent : "--" }}
</div>
</div>
</div>
</div>
<div class="drawerMain" v-else>
<!-- 左侧建议内容 -->
<div class="drawerLeft">
<div class="leftTitle">写信内容</div>
<div class="card">
<div class="cardTitle">信件标题</div>
<div class="cardContent">
{{ fromData.strTitle ? fromData.strTitle : "--" }}
</div>
</div>
<div class="infoDetail infoDetailBox" style="flex-wrap: wrap">
<div class="card">
<div class="cardTitle">信件类型</div>
<div class="cardContent">
{{ fromData.strType ? fromData.strType : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">姓名</div>
<div class="cardContent">
{{ fromData.strUserName ? fromData.strUserName : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">性别</div>
<div class="cardContent">
{{
fromData.strGender == 0
? ""
: fromData.strGender == 1
? ""
: fromData.strGender == 2
? ""
: "--"
}}
</div>
</div>
<div class="card">
<div class="cardTitle">联系电话</div>
<div class="cardContent">
{{ fromData.strPhone ? fromData.strPhone : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">电子邮箱</div>
<div class="cardContent">
{{ fromData.strEmail ? fromData.strEmail : "--" }}
</div>
</div>
<!-- <div class="card">
<div class="cardTitle">信件来源</div>
<div class="cardContent">
{{ fromData.address ? fromData.address : "--" }}
</div>
</div> -->
</div>
<div class="card">
<div class="cardTitle">住址</div>
<div class="cardContent">
{{ fromData.strAddress ? fromData.strAddress : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> 是否保密 </div> <div class="cardTitle">信件内容</div>
<div class="cardContent">{{fromData.secrecy==1?'':''}}</div> <div class="cardContent">
{{ fromData.strContent ? fromData.strContent : "--" }}
</div>
</div> </div>
<div class="infoDetail">
<div class="card"> <div class="card">
<div class="cardTitle"> 提交日期 </div> <div class="cardTitle">提交日期</div>
<div class="cardContent">{{fromData.create_time}}</div> <div class="cardContent">
{{ fromData.create_time ? fromData.create_time : "--" }}
</div>
</div> </div>
</div> </div>
</div> </div>
<!-- 右侧回复内容 --> <!-- 右侧回复内容 -->
<div class="drawerRight"> <div class="drawerRight">
<div class="rightTitle"> <div class="rightTitle">办理结果</div>
建议答复 <div class="card">
<div class="cardTitle">工单编号</div>
<div class="cardContent">
{{ fromData.LetterCode ? fromData.LetterCode : "--" }}
</div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> <div class="cardTitle">办理状态</div>
所属部门<span>(非必选)</span> <div class="cardContent">
{{ fromData.status ? fromData.status : "--" }}
</div> </div>
</div>
<div class="card">
<div class="cardTitle">办理结果</div>
<div class="cardContent"> <div class="cardContent">
{{fromData.deptName?fromData.deptName:"--"}} {{ fromData.Ccontent ? fromData.Ccontent : "--" }}
</div> </div>
</div> </div>
<div class="card"> <div class="card">
<div class="cardTitle"> <div class="cardTitle">办理部门</div>
回复内容<span>(必填)</span> <div class="cardContent">
{{ fromData.AcceptName ? fromData.AcceptName : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">办理时间</div>
<div class="cardContent">
{{ fromData.AcceptDate ? fromData.AcceptDate : "--" }}
</div> </div>
<div class="cardContent">{{ fromData.recontent }}</div>
</div> </div>
</div> </div>
</div> </div>
<!-- 底部按钮 --> <!-- 底部按钮 -->
<div :style="{ <div
position: 'absolute', right: 0, bottom: 0, width: '100%', borderTop: '1px solid #e9e9e9', :style="{
padding: '10px 16px', background: '#fff', textAlign: 'right', zIndex: 1, position: 'absolute',
}"> right: 0,
bottom: 0,
width: '100%',
borderTop: '1px solid #e9e9e9',
padding: '10px 16px',
background: '#fff',
textAlign: 'right',
zIndex: 1,
}"
>
<!-- <a-button type="primary" class="addclass" @click="onClose"> <!-- <a-button type="primary" class="addclass" @click="onClose">
确定 确定
</a-button> --> </a-button> -->
...@@ -104,26 +265,27 @@ ...@@ -104,26 +265,27 @@
<script> <script>
export default { export default {
name: 'FormDetails', name: "FormDetails",
props: { props: {
visible: Boolean visible: Boolean,
title: String,
}, },
data() { data() {
return { return {
fromData:{} fromData: {},
}; };
}, },
methods: { methods: {
onClose() { onClose() {
this.$emit('onClose') this.$emit("onClose");
} },
} },
} };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
/deep/.ant-drawer-content { /deep/.ant-drawer-content {
background-color: #F3F4F5; background-color: #f3f4f5;
} }
.drawerMain { .drawerMain {
height: 83vh; height: 83vh;
...@@ -135,7 +297,7 @@ export default { ...@@ -135,7 +297,7 @@ export default {
width: 49.5%; width: 49.5%;
height: 100%; height: 100%;
border-radius: 8px; border-radius: 8px;
background-color: #FFF; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 15px; padding: 15px;
overflow: hidden; overflow: hidden;
...@@ -149,7 +311,7 @@ export default { ...@@ -149,7 +311,7 @@ export default {
line-height: 25px; line-height: 25px;
.cardTitle { .cardTitle {
color: #0377FF; color: #0377ff;
font-weight: bold; font-weight: bold;
margin: 8px 0; margin: 8px 0;
} }
...@@ -160,6 +322,12 @@ export default { ...@@ -160,6 +322,12 @@ export default {
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
} }
.infoDetailBox {
justify-content: flex-start;
.card {
width: 25%;
}
}
} }
.drawerLeft::-webkit-scrollbar { .drawerLeft::-webkit-scrollbar {
...@@ -170,7 +338,7 @@ export default { ...@@ -170,7 +338,7 @@ export default {
width: 49.5%; width: 49.5%;
height: 100%; height: 100%;
border-radius: 8px; border-radius: 8px;
background-color: #FFF; background-color: #fff;
box-sizing: border-box; box-sizing: border-box;
padding: 15px; padding: 15px;
......
<template>
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button
:loading="btnLoading"
type="primary"
class="addclass"
@click="handleExportTable"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b
>写信次数:<i>{{ total }}</i></b
>
</div>
<span>
<a-select v-model="status" style="margin: 0 10px">
<a-select-option value=""> 全部类型 </a-select-option>
<a-select-option
v-for="val in typeList"
:key="val.value"
:value="val.value"
>
{{ val.name }}
</a-select-option>
</a-select>
<a-select v-model="source">
<a-select-option value=""> 全部来源 </a-select-option>
<a-select-option value="1"> 微官网 </a-select-option>
<a-select-option value="2"> 自助服务系统 </a-select-option>
<a-select-option value="1"> 数字填单系统 </a-select-option>
</a-select>
<a-range-picker
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
style="margin: 0 10px"
v-model="timeList"
>
</a-range-picker>
<a-input
style="width: 250px"
v-model="searchName"
placeholder="请输入标题或姓名关键字搜索"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button
type="primary"
class="addclass"
style="margin: 0 0 0 10px"
@click="getList"
>搜索</a-button
>
</span>
</div>
<div class="main">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="showDrawer(record)">详情</a-button>
</template>
</a-table>
</div>
<FormDetails
ref="FormDetails"
@onClose="onClose"
@showDrawer="showDrawer"
:visible="visible"
:title="'12345写信记录'"
/>
</div>
</template>
<script>
import table from "@/mixins/table";
import { adminList, getType, letterInfo } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
import FormDetails from "./components/FormDetails.vue";
const tHeader = [
"序号",
"工单编号",
"信件标题",
"信件类别",
"姓名",
"性别",
"联系电话",
"信件来源",
"提交时间",
"办理状态",
"办理时间",
"办理部门",
];
const filterVal = [
"index",
"LetterCode",
"strTitle",
"strType",
"strUserName",
"strGender",
"strPhone",
"source",
"create_time",
"status",
"update_time",
"AcceptName",
];
export default {
mixins: [table],
name: "callRecordForm",
data() {
return {
timeList: [],
status: "",
source: "",
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "工单编号",
align: "center",
dataIndex: "LetterCode",
customRender: (text, record, index) => `${record.LetterCode || "--"}`,
},
{
title: "信件标题",
align: "center",
dataIndex: "strTitle",
customRender: (text, record, index) => `${record.strTitle || "--"}`,
},
{
title: "信件类别",
align: "center",
dataIndex: "strType",
customRender: (text, record, index) => `${record.strType || "--"}`,
},
{
title: "姓名",
align: "center",
dataIndex: "strUserName",
customRender: (text, record, index) =>
`${record.strUserName || "--"}`,
},
{
title: "性别",
align: "center",
dataIndex: "strGender",
customRender: (text, record, index) =>
`${
record.strGender
? record.strGender == 0
? ""
: record.strGender == 1
? ""
: record.strGender == 2
? ""
: "--"
: "--"
}`,
},
{
title: "联系电话",
align: "center",
dataIndex: "strPhone",
customRender: (text, record, index) => `${record.strPhone || "--"}`,
},
{
title: "信件来源",
align: "center",
dataIndex: "source",
customRender: (text, record, index) =>
`${
record.source
? record.source == 1
? "微官网"
: record.source == 2
? "自助服务系统"
: record.source == 3
? "数字填单系统"
: "--"
: "--"
}`,
},
{
title: "提交时间",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "办理状态",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => `${record.status || "--"}`,
},
{
title: "办理时间",
align: "center",
dataIndex: "update_time",
customRender: (text, record, index) =>
`${record.update_time || "--"}`,
},
{
title: "办理部门",
align: "center",
dataIndex: "AcceptName",
customRender: (text, record, index) => `${record.AcceptName || "--"}`,
},
{
title: "操作",
align: "center",
width: "110px",
scopedSlots: {
customRender: "operation",
},
},
],
btnLoading: false,
tableSelectedKeys: [],
tableSelectedRows: [],
BegindAndEndTime: [],
searchName: undefined,
visible: false,
total: 0,
typeList: [],
};
},
components: {},
mounted() {
this.getList();
this.timeList = [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
];
getType().then((res) => {
console.log(res);
res.data ? (this.typeList = res.data) : (this.typeList = []);
});
},
components: {
FormDetails,
},
methods: {
getList() {
adminList({
keyword: this.searchName,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
strTypeID: this.status,
source: this.source,
time: this.timeList,
}).then((res) => {
this.tableSourceData = res.data.data;
this.tablePagination.total = res.data.total;
this.total = res.data.total;
});
},
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.getList();
},
rangePickerChange(val) {
this.timeList = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
},
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
// 选中
onSelectChange(keys, rows) {
this.tableSelectedKeys = keys;
const res = new Map();
this.tableSelectedRows = [...this.tableSelectedRows, ...rows]
.filter((v) => {
return !res.has(v.id) && res.set(v.id, 1);
})
.filter((v) => {
return this.tableSelectedKeys.some((val) => v.id == val);
});
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "本地打印",
2: "在线提交",
};
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
data.forEach((item) => {
Object.keys(obj).forEach((keys) => {
if (item.type == keys) {
item.type = obj[keys];
}
});
});
} else {
let datas = this.$_.cloneDeep(
await adminList({
keyword: this.searchName,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
strTypeID: this.status,
source: this.source,
time: this.timeList,
})
);
data = datas.data.data;
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.type == key) {
item.type = obj[key];
}
});
}
}
data.forEach((record, i) => {
record.index = i + 1;
record.source = record.source
? record.source == 1
? "微官网"
: record.source == 2
? "自助服务系统"
: record.source == 3
? "数字填单系统"
: "--"
: "--";
record.strGender = record.strGender
? record.strGender == 0
? ""
: record.strGender == 1
? ""
: record.strGender == 2
? ""
: "--"
: "--";
});
export2Excel(
tHeader,
filterVal,
data,
"填单记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
showDrawer(val) {
letterInfo({ id: val.id }).then((res) => {
console.log(res);
res.data ? (this.$refs.FormDetails.fromData = res.data) : "";
});
this.visible = true;
},
onClose() {
this.visible = false;
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
.header_box {
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i {
color: #0595fd;
font-style: normal;
}
}
sub {
font-size: 14px;
font-style: normal;
bottom: unset;
margin-left: 20px;
}
}
}
.tabFont {
font-size: 12px;
font-weight: 300;
}
/deep/.ant-drawer-content {
background-color: #f3f4f5;
}
</style>
...@@ -2,56 +2,100 @@ ...@@ -2,56 +2,100 @@
<div class="callRecord-Container"> <div class="callRecord-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<a-button type="primary" class="addclass" @click="handleExportTable" :loading="btnLoading"> <a-button
type="primary"
class="addclass"
@click="handleExportTable"
:loading="btnLoading"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span> <span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button> </a-button>
<b>建议次数:<i>{{JYCount}}</i></b> <b
<b>回复次数:<i>{{HFCount}}</i></b> >建议次数:<i>{{ JYCount }}</i></b
<sub>统计时间段:{{this.timeList[0]}}~{{this.timeList[1]}}</sub> >
<b
>回复次数:<i>{{ HFCount }}</i></b
>
<sub>统计时间段:{{ this.timeList[0] }}~{{ this.timeList[1] }}</sub>
</div> </div>
<span> <span>
<a-space> <a-space>
<a-checkbox @change="changeReply" v-model="isReply"> <a-checkbox @change="changeReply" v-model="isReply">
只看未回复 只看未回复
</a-checkbox> </a-checkbox>
<a-select placeholder="全部类型" v-model="nowType" @change="changeType"> <a-select
placeholder="全部类型"
v-model="nowType"
@change="changeType"
>
<a-select-option value="1"> 部门建议 </a-select-option> <a-select-option value="1"> 部门建议 </a-select-option>
<a-select-option value="2"> 办事建议 </a-select-option> <a-select-option value="2"> 办事建议 </a-select-option>
<a-select-option value="3"> 网站建议 </a-select-option> <a-select-option value="3"> 网站建议 </a-select-option>
<a-select-option value="4"> 我要就错 </a-select-option> <a-select-option value="4"> 我要就错 </a-select-option>
<a-select-option value="5"> 我要投诉 </a-select-option> <a-select-option value="5"> 我要投诉 </a-select-option>
</a-select> </a-select>
<a-select placeholder="全部来源" v-model="nowDevice" @change="changeDevice"> <a-select
placeholder="全部来源"
v-model="nowDevice"
@change="changeDevice"
>
<a-select-option value="1"> 评价系统 </a-select-option> <a-select-option value="1"> 评价系统 </a-select-option>
<a-select-option value="2"> 导视系统 </a-select-option> <a-select-option value="2"> 导视系统 </a-select-option>
<a-select-option value="3"> 自助服务系统 </a-select-option> <a-select-option value="3"> 自助服务系统 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option> <a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 数字填单系统 </a-select-option> <a-select-option value="5"> 数字填单系统 </a-select-option>
</a-select> </a-select>
<a-range-picker style="width:250px;" format="YYYY-MM-DD" class="range_picker_style" <a-range-picker
@change="rangePickerChange" v-model="timeList"> style="width: 250px"
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
v-model="timeList"
>
</a-range-picker> </a-range-picker>
<a-input style="width:250px;" v-model="searchName" placeholder="请输入标题或姓名关键字搜索"> <a-input
style="width: 250px"
v-model="searchName"
placeholder="请输入标题或姓名关键字搜索"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-button type="primary" class="addclass" @click="togetWLLZCount">搜索</a-button> <a-button type="primary" class="addclass" @click="togetWLLZCount"
>搜索</a-button
>
<a-button @click="resetting">重置</a-button> <a-button @click="resetting">重置</a-button>
</a-space> </a-space>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{ <a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys, selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange, onChange: onSelectChange,
}" :scroll="{ y: 590 }" :pagination="tablePagination" @change="pagTableChange" :loading="tableLoading" }"
:columns="tableHeaders" :dataSource="tableSourceData"> :scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="操作" slot-scope="text, record, index"> <template slot="操作" slot-scope="text, record, index">
<a-button type="link" @click="showDrawer(record)">详情</a-button> <a-button type="link" @click="showDrawer(record)">详情</a-button>
</template> </template>
</a-table> </a-table>
</div> </div>
<FormDetails ref="FormDetails" @onClose="onClose" @showDrawer="showDrawer" :visible="visible"/> <FormDetails
ref="FormDetails"
@onClose="onClose"
@showDrawer="showDrawer"
:title="'网络理政'"
:visible="visible"
/>
</div> </div>
</template> </template>
...@@ -59,8 +103,8 @@ ...@@ -59,8 +103,8 @@
import table from "@/mixins/table"; import table from "@/mixins/table";
import FormDetails from "./components/FormDetails.vue"; import FormDetails from "./components/FormDetails.vue";
import {getWLLZList,getWLLZCount,getWLLZInfo} from "@/api/dataAdmin" import { getWLLZList, getWLLZCount, getWLLZInfo } from "@/api/dataAdmin";
import {export2Excel} from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
const tHeader = [ const tHeader = [
// 导出的表头名信息 // 导出的表头名信息
"建议标题", "建议标题",
...@@ -74,7 +118,7 @@ const tHeader = [ ...@@ -74,7 +118,7 @@ const tHeader = [
"回复人", "回复人",
"回复时间", "回复时间",
"所属部门", "所属部门",
] ];
const filterVal = [ const filterVal = [
// 导出的表头字段名,需要导出表格字段名 // 导出的表头字段名,需要导出表格字段名
"title", "title",
...@@ -88,7 +132,7 @@ const filterVal = [ ...@@ -88,7 +132,7 @@ const filterVal = [
"reply_name", "reply_name",
"update_time", "update_time",
"deptName", "deptName",
] ];
export default { export default {
mixins: [table], mixins: [table],
name: "networkForm", name: "networkForm",
...@@ -107,32 +151,45 @@ export default { ...@@ -107,32 +151,45 @@ export default {
title: "建议标题", title: "建议标题",
align: "center", align: "center",
dataIndex: "title", dataIndex: "title",
width: "300px" width: "300px",
customRender: (text, record, index) => `${record.title || "--"}`,
}, },
{ {
title: "建议类型", title: "建议类型",
align: "center", align: "center",
dataIndex: "type", dataIndex: "type",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text==1?'部门建议':text==2?'办事建议':text==3?'网站建议':text==4?'我要就错':text==5?'我要投诉':'我要咨询' return text == 1
? "部门建议"
: text == 2
? "办事建议"
: text == 3
? "网站建议"
: text == 4
? "我要就错"
: text == 5
? "我要投诉"
: "我要咨询";
}, },
}, },
{ {
title: "真实姓名", title: "真实姓名",
align: "center", align: "center",
dataIndex: "upname", dataIndex: "upname",
customRender: (text, record, index) => `${record.upname || "--"}`,
}, },
{ {
title: "联系电话", title: "联系电话",
align: "center", align: "center",
dataIndex: "upphone", dataIndex: "upphone",
customRender: (text, record, index) => `${record.upphone || "--"}`,
}, },
{ {
title: "是否公开", title: "是否公开",
align: "center", align: "center",
dataIndex: "valid", dataIndex: "valid",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text==1?'':'' return record.valid == 1 ? "" : "";
}, },
}, },
{ {
...@@ -140,36 +197,42 @@ export default { ...@@ -140,36 +197,42 @@ export default {
align: "center", align: "center",
dataIndex: "secrecy", dataIndex: "secrecy",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text==1?'':'' return record.secrecy == 1 ? "" : "";
}, },
}, },
{ {
title: "提交日期", title: "提交日期",
align: "center", align: "center",
dataIndex: "create_time", dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
}, },
{ {
title: "是否回复", title: "是否回复",
align: "center", align: "center",
dataIndex: "status", dataIndex: "status",
customRender: (text, record, index) => { customRender: (text, record, index) => {
return text==1?'':'' return record.status == 1 ? "" : "";
}, },
}, },
{ {
title: "回复人", title: "回复人",
align: "center", align: "center",
dataIndex: "reply_name", dataIndex: "reply_name",
customRender: (text, record, index) => `${record.reply_name || "--"}`,
}, },
{ {
title: "回复时间", title: "回复时间",
align: "center", align: "center",
dataIndex: "update_time", dataIndex: "update_time",
customRender: (text, record, index) =>
`${record.update_time || "--"}`,
}, },
{ {
title: "所属部门", title: "所属部门",
align: "center", align: "center",
dataIndex: "deptName", dataIndex: "deptName",
customRender: (text, record, index) => `${record.deptName || "--"}`,
}, },
{ {
title: "操作", title: "操作",
...@@ -182,40 +245,46 @@ export default { ...@@ -182,40 +245,46 @@ export default {
], ],
searchName: undefined, searchName: undefined,
visible: false, visible: false,
nowSite:null,//当前站点 nowSite: null, //当前站点
isReply:false,//是否回复 isReply: false, //是否回复
nowType:undefined,//当前类型 nowType: undefined, //当前类型
nowDevice:undefined,// 来源 nowDevice: undefined, // 来源
timeList:[],// 时间 timeList: [], // 时间
JYCount:0,//建议次数 JYCount: 0, //建议次数
HFCount:0,//回复次数 HFCount: 0, //回复次数
btnLoading: false, btnLoading: false,
}; };
}, },
components: { components: {
FormDetails FormDetails,
}, },
mounted() { mounted() {
this.setMoment(); this.setMoment();
// 设置默认时间为今天 // 设置默认时间为今天
this.timeList=[this.$moment().format("YYYY-MM-DD"),this.$moment().format("YYYY-MM-DD")] this.timeList = [
this.nowSite = localStorage.getItem('siteId'); this.$moment().format("YYYY-MM-DD"),
this.togetWLLZCount() this.$moment().format("YYYY-MM-DD"),
];
this.nowSite = localStorage.getItem("siteId");
this.togetWLLZCount();
},
watch: {
tablePagination() {
this.togetWLLZCount();
}, },
watch:{
tablePagination(){
this.togetWLLZCount()
}
}, },
methods: { methods: {
//重置 //重置
resetting() { resetting() {
this.timeList=[this.$moment().format("YYYY-MM-DD"),this.$moment().format("YYYY-MM-DD")] this.timeList = [
this.nowType = undefined this.$moment().format("YYYY-MM-DD"),
this.nowDevice = undefined this.$moment().format("YYYY-MM-DD"),
this.searchName = undefined ];
this.isReply = false this.nowType = undefined;
this.togetWLLZCount() this.nowDevice = undefined;
this.searchName = undefined;
this.isReply = false;
this.togetWLLZCount();
}, },
// 导出 // 导出
async handleExportTable() { async handleExportTable() {
...@@ -238,23 +307,23 @@ export default { ...@@ -238,23 +307,23 @@ export default {
item.type = obj[keys]; item.type = obj[keys];
} }
}); });
item.valid == 1?item.valid = "":item.valid = '' item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1?item.secrecy = "":item.secrecy = '' item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1?item.status = "":item.status = '' item.status == 1 ? (item.status = "") : (item.status = "");
}); });
} else { } else {
let datas = this.$_.cloneDeep( let datas = this.$_.cloneDeep(
await getWLLZList({ await getWLLZList({
page: 1, page: 1,
size: -1, size: -1,
status:this.isReply?0:"", status: this.isReply ? 0 : "",
type:this.nowType, type: this.nowType,
device:this.nowDevice, device: this.nowDevice,
keyword:this.searchName, keyword: this.searchName,
time:this.timeList, time: this.timeList,
}) })
); );
data = datas.data.data data = datas.data.data;
if (!data.length) return; if (!data.length) return;
for (let item of data) { for (let item of data) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
...@@ -262,9 +331,9 @@ export default { ...@@ -262,9 +331,9 @@ export default {
item.type = obj[key]; item.type = obj[key];
} }
}); });
item.valid == 1?item.valid = "":item.valid = '' item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1?item.secrecy = "":item.secrecy = '' item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1?item.status = "":item.status = '' item.status == 1 ? (item.status = "") : (item.status = "");
} }
} }
export2Excel( export2Excel(
...@@ -275,69 +344,75 @@ export default { ...@@ -275,69 +344,75 @@ export default {
); );
this.btnLoading = false; this.btnLoading = false;
}, },
changeReply(e){ changeReply(e) {
this.isReply = e.target.checked this.isReply = e.target.checked;
}, },
changeType(e){ changeType(e) {
this.nowType = e this.nowType = e;
}, },
changeDevice(e){ changeDevice(e) {
this.nowDevice=e this.nowDevice = e;
}, },
// 页面跳转
togetWLLZInfo(id){ pagTableChange(pagination) {
this.tablePagination = pagination;
this.togetWLLZCount();
},
togetWLLZInfo(id) {
getWLLZInfo({ getWLLZInfo({
id:id id: id,
}).then((res)=>{ }).then((res) => {
console.log(res); console.log(res);
const{code,data}=res; const { code, data } = res;
if(code==1){ if (code == 1) {
this.$refs.FormDetails.fromData=data this.$refs.FormDetails.fromData = data;
} }
}) });
}, },
togetWLLZCount(){ togetWLLZCount() {
let option = { let option = {
siteid:this.nowSite, siteid: this.nowSite,
time:this.timeList, time: this.timeList,
keyword:this.searchName, keyword: this.searchName,
type:this.nowType, type: this.nowType,
device:this.nowDevice, device: this.nowDevice,
status:this.isReply?0:"",//0处理,空为不处理 status: this.isReply ? 0 : "", //0处理,空为不处理
} };
getWLLZCount(option).then((res)=>{ getWLLZCount(option).then((res) => {
const {code,data} = res; const { code, data } = res;
if(code==1){ if (code == 1) {
this.JYCount = data.all_count, (this.JYCount = data.all_count), (this.HFCount = data.hf_count);
this.HFCount = data.hf_count
} }
}) });
let params = { let params = {
page:this.tablePagination.current, page: this.tablePagination.current,
size:this.tablePagination.pageSize, size: this.tablePagination.pageSize,
status:this.isReply?0:"", status: this.isReply ? 0 : "",
type:this.nowType, type: this.nowType,
device:this.nowDevice, device: this.nowDevice,
keyword:this.searchName, keyword: this.searchName,
time:this.timeList, time: this.timeList,
} };
getWLLZList(params).then((res)=>{ getWLLZList(params).then((res) => {
const {code,data} = res; const { code, data } = res;
if(code==1){ if (code == 1) {
this.tableSourceData = data.data this.tableSourceData = data.data;
this.tablePagination.total = data.total this.tablePagination.total = data.total;
} }
}) });
}, },
rangePickerChange(val) { rangePickerChange(val) {
this.timeList = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")] this.timeList = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
}, },
showDrawer(record) { showDrawer(record) {
this.visible = true; this.visible = true;
this.togetWLLZInfo(record.id) this.togetWLLZInfo(record.id);
}, },
onClose() { onClose() {
this.visible = false; this.visible = false;
...@@ -356,7 +431,7 @@ export default { ...@@ -356,7 +431,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -386,5 +461,3 @@ export default { ...@@ -386,5 +461,3 @@ export default {
font-weight: 300; font-weight: 300;
} }
</style> </style>
...@@ -125,6 +125,8 @@ import { ...@@ -125,6 +125,8 @@ import {
getWorkmananalyse, getWorkmananalyse,
} from "@/api/dataAdmin"; } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel"; import { export2Excel } from "@/utils/js/exportExcel";
import { loading } from "@jiaminghi/data-view";
let ExcelDate = []
export default { export default {
name: "PortalAdminVueQueueRecord", name: "PortalAdminVueQueueRecord",
mixins: [table], mixins: [table],
...@@ -432,27 +434,76 @@ export default { ...@@ -432,27 +434,76 @@ export default {
} }
}); });
}); });
} else {
data = this.$_.cloneDeep( export2Excel(
await this.getQueueDataArr({ page: 1, size: -1 }) this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
if (!data.length) return; this.btnLoading = false;
for (let item of data) { } else {
ExcelDate = []
await this.dataSection(1, 1000, () => {
if (!ExcelDate.length) return;
for (let item of ExcelDate) {
Object.keys(obj).forEach((key) => { Object.keys(obj).forEach((key) => {
if (item.style == key) { if (item.style == key) {
item.style = obj[key]; item.style = obj[key];
} }
}); });
} }
}
export2Excel( export2Excel(
this.tHeader, this.tHeader,
this.filterVal, this.filterVal,
data, ExcelDate,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss") "排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
); );
this.btnLoading = false; this.btnLoading = false;
// alert(11)
})
// return
// data = this.$_.cloneDeep(
// await this.getQueueDataArr({ page: 1, size: -1 })
// );
// if (!data.length) return;
// for (let item of data) {
// Object.keys(obj).forEach((key) => {
// if (item.style == key) {
// item.style = obj[key];
// }
// });
// }
}
}, },
// 数据切片
async dataSection(page, size = 100, fn) {
let res = await getQueueData({
page: page || 1,
size: size,
...this.searchForm,
});
if (res.code == 1) {
let { data, total } = res.data;
ExcelDate = ExcelDate.concat(data || [])
// app.vue loading
this.$app.progressFile.show = true
this.$app.progressFile.percent = parseInt((ExcelDate.length / total) * 100)
if (ExcelDate.length >= total || data.length == 0) {
fn()
this.$app.progressFile.show = false
this.$app.progressFile.percent = 1
return
}
setTimeout(() => {
let index = parseInt(page || 1) + 1
this.dataSection(index, size, fn)
});
}
}
}, },
}; };
</script> </script>
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<script> <script>
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
import lodash from "lodash"; import lodash from "lodash";
import{getStatisticAges} from '@/api/dataAdmin.js' import { getStatisticAges } from "@/api/dataAdmin.js";
export default { export default {
props: { props: {
info: { info: {
...@@ -12,7 +12,7 @@ export default { ...@@ -12,7 +12,7 @@ export default {
default: () => [ default: () => [
{ {
value: 200, value: 200,
name: "20", name: "20",
}, },
{ {
value: 400, value: 400,
...@@ -40,16 +40,30 @@ export default { ...@@ -40,16 +40,30 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
day: {
type: String,
default: () => "0",
},
},
watch: {
day(newval, oldval) {
newval ? this.getData() : "";
},
}, },
async mounted() { async mounted() {
let res = await getStatisticAges() this.getData();
if (res.code != 1) return
let label = res.data.map(item=> item.age_area)
let value = res.data.map(item=> item.nums)
this._initEcharts(label,value);
}, },
methods: { methods: {
_initEcharts(label,value) { async getData() {
let res = await getStatisticAges({
selected: this.day == 5 ? null : this.day,
});
if (res.code != 1) return;
let label = res.data.map((item) => item.age_area);
let value = res.data.map((item) => item.nums);
this._initEcharts(label, value);
},
_initEcharts(label, value) {
const myChart = this.$echarts.init(this.$el); const myChart = this.$echarts.init(this.$el);
const echarts = this.$echarts; const echarts = this.$echarts;
let option = { let option = {
...@@ -72,9 +86,9 @@ export default { ...@@ -72,9 +86,9 @@ export default {
xAxis: { xAxis: {
type: "category", type: "category",
data: label, data: label,
axisTick:{ axisTick: {
show:false show: false,
} },
}, },
yAxis: { yAxis: {
type: "value", type: "value",
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<script> <script>
import { deepClone } from "@/utils/js/common.js"; import { deepClone } from "@/utils/js/common.js";
import lodash from "lodash"; import lodash from "lodash";
import{getStatisticSexual} from '@/api/dataAdmin.js' import { getStatisticSexual } from "@/api/dataAdmin.js";
export default { export default {
props: { props: {
info: { info: {
...@@ -24,14 +24,31 @@ export default { ...@@ -24,14 +24,31 @@ export default {
type: Object, type: Object,
default: () => {}, default: () => {},
}, },
day: {
type: String,
default: () => "0",
},
},
watch: {
day(newval, oldval) {
newval ? this.getData() : "";
}, },
async mounted() { },
let res = await getStatisticSexual() mounted() {
if (res.code != 1) return this.getData();
let value = res.data.map(({idcard_Sex,nums})=>({name:idcard_Sex,value:nums}))
this._initEcharts(value);
}, },
methods: { methods: {
async getData() {
let res = await getStatisticSexual({
selected: this.day == 5 ? null : this.day,
});
if (res.code != 1) return;
let value = res.data.map(({ idcard_Sex, nums }) => ({
name: idcard_Sex,
value: nums,
}));
this._initEcharts(value);
},
_initEcharts(value) { _initEcharts(value) {
const myChart = this.$echarts.init(this.$el); const myChart = this.$echarts.init(this.$el);
const echarts = this.$echarts; const echarts = this.$echarts;
...@@ -87,12 +104,12 @@ export default { ...@@ -87,12 +104,12 @@ export default {
rich_green: { rich_green: {
color: "#50CCCB", color: "#50CCCB",
}, },
} },
}, },
label: { label: {
normal: { normal: {
formatter: '{d}%' //自定义显示格式(b:name, c:value, d:百分比) formatter: "{d}%", //自定义显示格式(b:name, c:value, d:百分比)
} },
}, },
labelLine: { labelLine: {
length: 10, length: 10,
......
...@@ -3,36 +3,47 @@ ...@@ -3,36 +3,47 @@
<div class="diyufenbu"> <div class="diyufenbu">
<Head :title="'地域分布'"> <Head :title="'地域分布'">
<template slot="operation"> <template slot="operation">
<a-range-picker valueFormat="YYYY-MM-DD" class="range_picker_style" @change="rangePickerChange" <a-range-picker
v-model="BegindAndEndTime" v-if="day == 5"> valueFormat="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
v-model="BegindAndEndTime"
v-if="day == 5"
>
</a-range-picker> </a-range-picker>
<a-select v-model="day"> <a-select v-model="day">
<a-select-option value="0"> 今天 </a-select-option> <a-select-option value="0"> 今天 </a-select-option>
<a-select-option value="1"> 近7天 </a-select-option> <a-select-option value="1"> 近7天 </a-select-option>
<a-select-option value="2"> 近30天 </a-select-option> <a-select-option value="2"> 近30天 </a-select-option>
<a-select-option value="3"> 近90天 </a-select-option> <a-select-option value="3"> 近3月 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option> <a-select-option value="4"> 本年度 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option> <!-- <a-select-option value="5"> 自定义 </a-select-option> -->
</a-select> </a-select>
<a-button type="primary" class="addclass" @click="searchData">搜索</a-button> <a-button type="primary" class="addclass" @click="searchData"
>搜索</a-button
>
</template> </template>
</Head> </Head>
<div class="diyufenbu_box"> <div class="diyufenbu_box">
<div class="_left"> <div class="_left">
<div ref="chart" style="width: 100%;height: 100%;"></div> <div ref="chart" style="width: 100%; height: 100%"></div>
</div> </div>
<ul class="_right"> <ul class="_right">
<li class="list"> <li class="list">
<span style="margin-right: 20px;">排名</span> <span style="margin-right: 20px">排名</span>
<i>地区</i> <i>地区</i>
<b>预约热度</b> <b>预约热度</b>
</li> </li>
<li class="list" v-for="item,index in area" :key="index"> <li class="list" v-for="(item, index) in area" :key="index">
<span style="margin-right: 20px;">NO.{{ index+1 }}</span> <span style="margin-right: 20px">NO.{{ index + 1 }}</span>
<i>{{item.area}}</i> <i>{{ item.area }}</i>
<b> <b>
<a-progress :percent="item.nums" :show-info="false" status="active" /></b> <a-progress
:percent="item.nums"
:show-info="false"
status="active"
/></b>
</li> </li>
</ul> </ul>
</div> </div>
...@@ -40,43 +51,46 @@ ...@@ -40,43 +51,46 @@
<div class="center_box"> <div class="center_box">
<div class="nianling"> <div class="nianling">
<Head :title="'年龄分布'"> </Head> <Head :title="'年龄分布'"> </Head>
<NianlingBar class="echarts" /> <NianlingBar class="echarts" :day="dayValue" />
</div> </div>
<div class="xingbie"> <div class="xingbie">
<Head :title="'性别分布'"> </Head> <Head :title="'性别分布'"> </Head>
<XingbiePie class="echarts" /> <XingbiePie class="echarts" :day="dayValue" ref="ageChild" />
</div> </div>
</div> </div>
<div class="bottom_box"> <div class="bottom_box">
<Head :title="'签到准时率'"> </Head> <Head :title="'签到准时率'"> </Head>
<div class="echarts"> <div class="echarts">
<QiandaoPie class="list" :info="item" v-for="item,index in sign" :key="index" /> <QiandaoPie
class="list"
:info="item"
v-for="(item, index) in sign"
:key="index"
/>
</div> </div>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import NianlingBar from "./components/bar.vue"; import NianlingBar from "./components/bar.vue";
import XingbiePie from "./components/pie.vue"; import XingbiePie from "./components/pie.vue";
import QiandaoPie from "./components/pie2.vue"; import QiandaoPie from "./components/pie2.vue";
import Head from "./components/header.vue"; import Head from "./components/header.vue";
import { import { getStatisticArea, getStatisticSignin } from "@/api/dataAdmin.js";
getStatisticArea, import axios from "axios";
getStatisticSignin import * as echarts from "echarts";
} from '@/api/dataAdmin.js' import china from "@/assets/json/china.json";
import axios from 'axios' export default {
import * as echarts from 'echarts'
import china from "@/assets/json/china.json";
export default {
name: "PortalAdminVueCrowdPortrait", name: "PortalAdminVueCrowdPortrait",
data() { data() {
return { return {
day: '0', day: "0",
BegindAndEndTime: [], BegindAndEndTime: [],
area: [], area: [],
sign: [], sign: [],
chart: null chart: null,
dayValue: "",
}; };
}, },
components: { components: {
...@@ -86,66 +100,72 @@ ...@@ -86,66 +100,72 @@
QiandaoPie, QiandaoPie,
}, },
mounted() { mounted() {
this.init(china) this.init(china);
this.getStatisticArea() this.getStatisticArea();
this.getStatisticSignin() this.getStatisticSignin();
this.dayValue = this.day;
}, },
methods: { methods: {
// 搜索 // 搜索
searchData() { searchData() {
this.getStatisticArea() this.getStatisticArea();
this.getStatisticSignin() this.getStatisticSignin();
this.dayValue = this.day;
}, },
async getStatisticArea() { async getStatisticArea() {
let res = await getStatisticArea() let res = await getStatisticArea({
if (res.code != 1) return selected: this.day == 5 ? null : this.day,
this.area = res.data });
if (res.code != 1) return;
this.area = res.data;
}, },
async getStatisticSignin() { async getStatisticSignin() {
let res = await getStatisticSignin() let res = await getStatisticSignin({
if (res.code != 1) return selected: this.day == 5 ? null : this.day,
this.sign = res.data });
if (res.code != 1) return;
this.sign = res.data;
}, },
//初始化 //初始化
init(data) { init(data) {
if (this.chart == null) { if (this.chart == null) {
this.chart = echarts.init(this.$refs.chart); this.chart = echarts.init(this.$refs.chart);
} }
echarts.registerMap('china', data); echarts.registerMap("china", data);
var geoGpsMap = [104.64, 28.75]; var geoGpsMap = [104.64, 28.75];
var geoCoordMap = { var geoCoordMap = {
'江苏': [118.8062, 31.9208], 江苏: [118.8062, 31.9208],
'黑龙江': [127.9688, 45.368], 黑龙江: [127.9688, 45.368],
'内蒙古': [110.3467, 41.4899], 内蒙古: [110.3467, 41.4899],
'吉林': [125.8154, 44.2584], 吉林: [125.8154, 44.2584],
'北京': [116.4551, 40.2539], 北京: [116.4551, 40.2539],
'辽宁': [123.1238, 42.1216], 辽宁: [123.1238, 42.1216],
'河北': [114.4995, 38.1006], 河北: [114.4995, 38.1006],
'天津': [117.4219, 39.4189], 天津: [117.4219, 39.4189],
'山西': [112.3352, 37.9413], 山西: [112.3352, 37.9413],
'陕西': [109.1162, 34.2004], 陕西: [109.1162, 34.2004],
'甘肃': [103.5901, 36.3043], 甘肃: [103.5901, 36.3043],
'宁夏': [106.3586, 38.1775], 宁夏: [106.3586, 38.1775],
'青海': [101.4038, 36.8207], 青海: [101.4038, 36.8207],
'新疆': [87.9236, 43.5883], 新疆: [87.9236, 43.5883],
'四川': [103.9526, 30.7617], 四川: [103.9526, 30.7617],
'重庆': [108.384366, 30.439702], 重庆: [108.384366, 30.439702],
'山东': [117.1582, 36.8701], 山东: [117.1582, 36.8701],
'河南': [113.4668, 34.6234], 河南: [113.4668, 34.6234],
'安徽': [117.29, 32.0581], 安徽: [117.29, 32.0581],
'湖北': [114.3896, 30.6628], 湖北: [114.3896, 30.6628],
'浙江': [119.5313, 29.8773], 浙江: [119.5313, 29.8773],
'福建': [119.4543, 25.9222], 福建: [119.4543, 25.9222],
'江西': [116.0046, 28.6633], 江西: [116.0046, 28.6633],
'湖南': [113.0823, 28.2568], 湖南: [113.0823, 28.2568],
'贵州': [106.6992, 26.7682], 贵州: [106.6992, 26.7682],
'云南': [102.9199, 25.4663], 云南: [102.9199, 25.4663],
'广东': [113.12244, 23.009505], 广东: [113.12244, 23.009505],
'广西': [108.479, 23.1152], 广西: [108.479, 23.1152],
'海南': [110.3893, 19.8516], 海南: [110.3893, 19.8516],
'上海': [121.4648, 31.2891], 上海: [121.4648, 31.2891],
'西藏': [91.141017, 29.668461], 西藏: [91.141017, 29.668461],
'台湾': [121.509062, 25.044332] 台湾: [121.509062, 25.044332],
}; };
var data = []; var data = [];
var mapData = []; var mapData = [];
...@@ -154,36 +174,34 @@ ...@@ -154,36 +174,34 @@
geoGpsMap = geoCoordMap[key]; geoGpsMap = geoCoordMap[key];
} }
const keys = key; const keys = key;
const filters = data.filter(item => { const filters = data.filter((item) => {
return item.name.includes(keys); return item.name.includes(keys);
})[0]; })[0];
mapData.push({ mapData.push({
name: key, name: key,
value: filters ? filters.value : 0 value: filters ? filters.value : 0,
}); });
} }
mapData.sort((a, b) => { mapData.sort((a, b) => {
return a.value - b.value; return a.value - b.value;
}); });
const colors = ['#4a99de', '#1890FF']; const colors = ["#4a99de", "#1890FF"];
var convertData = function(data) { var convertData = function (data) {
var res = []; var res = [];
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name]; var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) { if (geoCoord) {
res.push({ res.push({
name: data[i].name, name: data[i].name,
value: geoCoord.concat(data[i].value) value: geoCoord.concat(data[i].value),
}); });
} }
} }
return res; return res;
}; };
var convertToLineData = function(data, gps) { var convertToLineData = function (data, gps) {
var res = []; var res = [];
for (var i = 0; i < data.length; i++) { for (var i = 0; i < data.length; i++) {
var dataItem = data[i]; var dataItem = data[i];
...@@ -193,10 +211,7 @@ ...@@ -193,10 +211,7 @@
res.push({ res.push({
fromName: gps, fromName: gps,
toName: dataItem.name, toName: dataItem.name,
coords: [ coords: [fromCoord, toCoord],
fromCoord,
toCoord
]
}); });
} }
} }
...@@ -205,60 +220,60 @@ ...@@ -205,60 +220,60 @@
let option = { let option = {
// backgroundColor: '#01193f', // backgroundColor: '#01193f',
color: ['#3BD8FF'], //飞线的颜色 color: ["#3BD8FF"], //飞线的颜色
series: [ series: [
// 地图线的动画效果 // 地图线的动画效果
{ {
type: 'lines', type: "lines",
zlevel: 2, zlevel: 2,
effect: { effect: {
show: true, show: true,
period: 4, period: 4,
trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重 trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
symbol: 'circle', //箭头图标 symbol: "circle", //箭头图标
symbolSize: 5, //图标大小 symbolSize: 5, //图标大小
}, },
lineStyle: { lineStyle: {
normal: { normal: {
width: 2, width: 2,
opacity: 0.05, //尾迹线条透明度 opacity: 0.05, //尾迹线条透明度
curveness: 0.01 //尾迹线条曲直度 curveness: 0.01, //尾迹线条曲直度
} },
}, },
tooltip: { tooltip: {
show: false show: false,
}, },
data: convertToLineData(mapData, geoGpsMap) data: convertToLineData(mapData, geoGpsMap),
}, },
// 地图点的动画效果 // 地图点的动画效果
{ {
type: 'effectScatter', type: "effectScatter",
coordinateSystem: 'geo', coordinateSystem: "geo",
zlevel: 2, zlevel: 2,
data: convertData(mapData).map(item => { data: convertData(mapData).map((item) => {
return { return {
name: item.name, name: item.name,
value: item.value.splice(0, 2) value: item.value.splice(0, 2),
}; };
}), }),
// showEffectOn: 'render', // showEffectOn: 'render',
rippleEffect: { rippleEffect: {
period: 6, //动画时间,值越小速度越快 period: 6, //动画时间,值越小速度越快
brushType: 'fill', //波纹绘制方式 stroke, fill brushType: "fill", //波纹绘制方式 stroke, fill
scale: 4, //波纹圆环最大限制,值越大波纹越大 scale: 4, //波纹圆环最大限制,值越大波纹越大
color: '#3BD8FF' color: "#3BD8FF",
}, },
// hoverAnimation: true, // hoverAnimation: true,
symbol: 'circle', symbol: "circle",
symbolSize: 5, symbolSize: 5,
itemStyle: { itemStyle: {
normal: { normal: {
show: true, show: true,
color: '#3BD8FF', color: "#3BD8FF",
// shadowBlur: 20, // shadowBlur: 20,
// shadowColor: '#333' // shadowColor: '#333'
} },
} },
}, },
{ {
...@@ -269,7 +284,7 @@ ...@@ -269,7 +284,7 @@
period: 4, period: 4,
brushType: "fill", brushType: "fill",
scale: 4, scale: 4,
color: '#ff0000' color: "#ff0000",
}, },
label: { label: {
normal: { normal: {
...@@ -280,122 +295,127 @@ ...@@ -280,122 +295,127 @@
formatter: "宜宾市", formatter: "宜宾市",
textStyle: { textStyle: {
color: "#fff", color: "#fff",
fontSize: '16px' fontSize: "16px",
} },
}, },
emphasis: { emphasis: {
show: true show: true,
} },
}, },
symbol: "circle", symbol: "circle",
symbolSize: 5, symbolSize: 5,
itemStyle: { itemStyle: {
normal: { normal: {
show: true, show: true,
color: "#ff0000" color: "#ff0000",
}
}, },
data: [{ },
name: '宜宾市', data: [
value: [104.64, 28.75] {
}], name: "宜宾市",
value: [104.64, 28.75],
},
],
}, },
// 地图? // 地图?
{ {
type: 'map', type: "map",
mapType: 'china', mapType: "china",
top: '30%', top: "30%",
left: '25%', left: "25%",
zoom: 1.7, zoom: 1.7,
label: { // 地图上的文字 label: {
// 地图上的文字
normal: { normal: {
show: false, show: false,
textStyle: { textStyle: {
color: '#ffffff' color: "#ffffff",
} },
} },
}, },
itemStyle: { itemStyle: {
normal: { normal: {
areaColor: { areaColor: {
image: require('@/assets/images/Banner.png'), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串 image: require("@/assets/images/Banner.png"), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
repeat: 'repeat' // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat' repeat: "repeat", // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat'
}, },
borderColor: '#76C6E7', borderColor: "#76C6E7",
borderWidth: 1, borderWidth: 1,
shadowColor: '#CCEAFD', shadowColor: "#CCEAFD",
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 0, shadowOffsetY: 0,
shadowBlur: 0, shadowBlur: 0,
}, },
}, },
emphasis: { // 高亮时区域颜色 emphasis: {
// 高亮时区域颜色
itemStyle: { itemStyle: {
areaColor: '#1890FF', areaColor: "#1890FF",
}, },
label: { label: {
color: '#ffffff' color: "#ffffff",
} },
}, },
select: { select: {
itemStyle: { itemStyle: {
areaColor: '#1890FF' areaColor: "#1890FF",
}, },
label: { label: {
color: '#ffffff' color: "#ffffff",
} },
}, },
data: data.map((item, index) => { data: data.map((item, index) => {
return { return {
name: item.name, name: item.name,
value: item.value, value: item.value,
itemStyle: { itemStyle: {
areaColor: item.value > 10 ? colors[1] : colors[0] areaColor: item.value > 10 ? colors[1] : colors[0],
} },
}; };
}),
}) },
}
], ],
geo: { geo: {
map: 'china', map: "china",
top: '30%', top: "30%",
aspectScale: 0.75, // 长宽比 aspectScale: 0.75, // 长宽比
left: '25%', left: "25%",
zoom: 1.7, zoom: 1.7,
roam: false, roam: false,
itemStyle: { itemStyle: {
normal: { normal: {
shadowColor: '#CCEAFD', shadowColor: "#CCEAFD",
shadowOffsetX: 0, shadowOffsetX: 0,
shadowOffsetY: 0 shadowOffsetY: 0,
} },
}, },
regions: [{ regions: [
name: '南海诸岛', {
name: "南海诸岛",
itemStyle: { itemStyle: {
normal: { normal: {
opacity: 0, opacity: 0,
label: { label: {
show: false show: false,
} },
} },
} },
}] },
} ],
},
}; };
this.chart.setOption(option); this.chart.setOption(option);
}
}, },
}; },
};
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.CrowdPortrait-Container { .CrowdPortrait-Container {
background: #f0f2f5; background: #f0f2f5;
&>.diyufenbu { & > .diyufenbu {
background: #fff; background: #fff;
.diyufenbu_box { .diyufenbu_box {
...@@ -403,18 +423,18 @@ ...@@ -403,18 +423,18 @@
align-items: stretch; align-items: stretch;
justify-content: space-between; justify-content: space-between;
&>._left { & > ._left {
flex: 1; flex: 1;
height: 440px; height: 440px;
// background: #fac; // background: #fac;
} }
&>._right { & > ._right {
width: 40%; width: 40%;
padding: 15px; padding: 15px;
.list { .list {
&+.list { & + .list {
margin-top: 15px; margin-top: 15px;
} }
...@@ -451,13 +471,13 @@ ...@@ -451,13 +471,13 @@
} }
} }
&>.center_box { & > .center_box {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: stretch; align-items: stretch;
margin-top: 20px; margin-top: 20px;
&>.nianling { & > .nianling {
height: 430px; height: 430px;
width: 50%; width: 50%;
background: #fff; background: #fff;
...@@ -470,7 +490,7 @@ ...@@ -470,7 +490,7 @@
} }
} }
&>.xingbie { & > .xingbie {
width: 50%; width: 50%;
width: 50%; width: 50%;
background: #fff; background: #fff;
...@@ -483,7 +503,7 @@ ...@@ -483,7 +503,7 @@
} }
} }
&>.bottom_box { & > .bottom_box {
height: 480px; height: 480px;
margin-top: 20px; margin-top: 20px;
width: 100%; width: 100%;
...@@ -587,5 +607,5 @@ ...@@ -587,5 +607,5 @@
transition: 100ms; transition: 100ms;
} }
} }
} }
</style> </style>
...@@ -15,9 +15,9 @@ ...@@ -15,9 +15,9 @@
<a-select-option value="0"> 今天 </a-select-option> <a-select-option value="0"> 今天 </a-select-option>
<a-select-option value="1"> 近7天 </a-select-option> <a-select-option value="1"> 近7天 </a-select-option>
<a-select-option value="2"> 近30天 </a-select-option> <a-select-option value="2"> 近30天 </a-select-option>
<a-select-option value="3">90天 </a-select-option> <a-select-option value="3">3月 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option> <a-select-option value="4"> 本年度 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option> <!-- <a-select-option value="5"> 自定义 </a-select-option> -->
</a-select> </a-select>
<a-button type="primary" class="addclass" @click="getData">搜索</a-button> <a-button type="primary" class="addclass" @click="getData">搜索</a-button>
......
...@@ -15,16 +15,18 @@ ...@@ -15,16 +15,18 @@
<a-select-option value="0"> 今天 </a-select-option> <a-select-option value="0"> 今天 </a-select-option>
<a-select-option value="1"> 近7天 </a-select-option> <a-select-option value="1"> 近7天 </a-select-option>
<a-select-option value="2"> 近30天 </a-select-option> <a-select-option value="2"> 近30天 </a-select-option>
<a-select-option value="3"> 近90天 </a-select-option> <a-select-option value="3"> 近3月 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option> <a-select-option value="4"> 本年度 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option> <!-- <a-select-option value="5"> 自定义 </a-select-option> -->
</a-select> </a-select>
<a-button type="primary" class="addclass" @click="getData">搜索</a-button> <a-button type="primary" class="addclass" @click="getData"
>搜索</a-button
>
</template> </template>
</Head> </Head>
<div class="echarts"> <div class="echarts">
<Brokenline :info="chartsData" v-if="chartsData"/> <Brokenline :info="chartsData" v-if="chartsData" />
</div> </div>
</div> </div>
<div class="fx"> <div class="fx">
...@@ -40,7 +42,9 @@ ...@@ -40,7 +42,9 @@
> >
</a-table> </a-table>
<p class="updateTime"> <p class="updateTime">
<i class="fa fa-info-circle"></i>数据更新时间:{{date}},受数据波动影响,可能会有延迟。 <i class="fa fa-info-circle"></i>数据更新时间:{{
date
}},受数据波动影响,可能会有延迟。
</p> </p>
</div> </div>
</div> </div>
...@@ -50,16 +54,16 @@ ...@@ -50,16 +54,16 @@
<script> <script>
import Head from "./components/header.vue"; import Head from "./components/header.vue";
import Brokenline from "./components/line.vue"; import Brokenline from "./components/line.vue";
import {getTrend} from '@/api/dataAdmin.js' import { getTrend } from "@/api/dataAdmin.js";
import moment from 'moment' import moment from "moment";
export default { export default {
name: "PortalAdminVueMakeDataAnalyse", name: "PortalAdminVueMakeDataAnalyse",
data() { data() {
return { return {
day:'0', day: "0",
date:'', date: "",
BegindAndEndTime: [], BegindAndEndTime: [],
chartsData:null, chartsData: null,
tableSourceData: [], tableSourceData: [],
tableHeaders: [ tableHeaders: [
{ {
...@@ -99,23 +103,23 @@ export default { ...@@ -99,23 +103,23 @@ export default {
Head, Head,
Brokenline, Brokenline,
}, },
watch:{ watch: {
day(val){ day(val) {
if (val != 5) this.BegindAndEndTime = [] if (val != 5) this.BegindAndEndTime = [];
} },
}, },
mounted() { mounted() {
this.date = moment().format('yyyy-MM-DD hh:mm:ss') this.date = moment().format("yyyy-MM-DD hh:mm:ss");
this.getData() this.getData();
}, },
methods: { methods: {
getData(){ getData() {
getTrend({ getTrend({
selected:this.day == 5 ? null : this.day, selected: this.day == 5 ? null : this.day,
time:this.BegindAndEndTime time: this.BegindAndEndTime,
}).then(res=>{ }).then((res) => {
this.chartsData = res.data.list this.chartsData = res.data.list;
this.tableSourceData.push({ this.tableSourceData.push({
研究对象: `预约次数`, 研究对象: `预约次数`,
预约总量: res.data.orderAll, 预约总量: res.data.orderAll,
...@@ -124,7 +128,7 @@ export default { ...@@ -124,7 +128,7 @@ export default {
整体同比: res.data.tbi, 整体同比: res.data.tbi,
整体环比: res.data.hbi, 整体环比: res.data.hbi,
}); });
}) });
}, },
rangePickerChange(val) { rangePickerChange(val) {
console.log(val); console.log(val);
......
<template> <template>
<div class="Container"> <div class="Container">
<a-carousel
effect="fade"
autoplay
:autoplaySpeed="2400"
:dots="false"
style="width: 100%; overflow: hidden; position: absolute; left: 0"
>
<div class="img_box img1"></div>
<!-- style="
height: 100vh;
width: 100%;
background: url('@/assets/images/bg.jpg') center no-repeat;
overflow: hidden;
background-size: cover;
" -->
<div class="img_box img2"></div>
<div class="img_box img3"></div>
</a-carousel>
<div class="slogan-box"> <div class="slogan-box">
<div class="slogan-title">智慧政务一体化数据管理</div> <div class="slogan-title">智慧政务一体化数据管理</div>
<div class="slogan-text"> <div class="slogan-text">
...@@ -38,7 +56,16 @@ ...@@ -38,7 +56,16 @@
</li> </li>
</template> </template>
</ul> </ul>
<p class="bottom" @click="handleCkeck('/home/dataManagement/serviceDataAnalyse/makeTrendResearch')">服务类数据分析<a-icon type="swap-right" /></p> <p
class="bottom"
@click="
handleCkeck(
'/home/dataManagement/serviceDataAnalyse/makeTrendResearch'
)
"
>
服务类数据分析<a-icon type="swap-right" />
</p>
</li> </li>
</ul> </ul>
...@@ -183,12 +210,11 @@ export default { ...@@ -183,12 +210,11 @@ export default {
}, },
// 查看数据 // 查看数据
handleCkeck(path) { handleCkeck(path) {
if(path.indexOf('http')>-1){ if (path.indexOf("http") > -1) {
window.open(path) window.open(path);
}else{ } else {
this.$router.push(path); this.$router.push(path);
} }
}, },
// pushRouter1() { // pushRouter1() {
// // 易政秀报表 // // 易政秀报表
...@@ -280,17 +306,38 @@ export default { ...@@ -280,17 +306,38 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.ant-carousel :deep(.slick-slide) {
width: 100%;
height: 100%;
overflow: hidden;
.img_box {
width: 100%;
height: 92.1vh;
overflow: hidden;
background-size: cover;
}
.img1 {
background: url("~@/assets/images/bg2.jpg") center no-repeat;
}
.img2 {
background: url("~@/assets/images/bgg3.jpg") center no-repeat;
}
.img3 {
background: url("~@/assets/images/bgg4.jpg") center no-repeat;
}
}
.Container { .Container {
height: 100%; height: 100%;
width: 100%; width: 100%;
// min-height: 960px; // min-height: 960px;
// background: url("~@/assets/images/zhandian.jpg") center no-repeat; // background: url("~@/assets/images/zhandian.jpg") center no-repeat;
background: url("../../assets/images/bg2.jpg") center no-repeat; // background: url("../../assets/images/bg2.jpg") center no-repeat;
background-size: cover; background-size: cover;
padding-top: @headerH; padding-top: @headerH;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
align-items: center; align-items: center;
overflow: hidden;
.search_box { .search_box {
display: inline-block; display: inline-block;
margin-top: 12.1rem; margin-top: 12.1rem;
......
...@@ -117,6 +117,7 @@ export default { ...@@ -117,6 +117,7 @@ export default {
key: Storage.get(2, "siteId") ? Storage.get(2, "siteId") : "暂无站点", // 当前站点 key: Storage.get(2, "siteId") ? Storage.get(2, "siteId") : "暂无站点", // 当前站点
}, },
userInfo: Storage.get(2, "userInfo"), // 用户信息 userInfo: Storage.get(2, "userInfo"), // 用户信息
routeInfo: "",
}; };
}, },
created() { created() {
...@@ -143,7 +144,9 @@ export default { ...@@ -143,7 +144,9 @@ export default {
this.$bus.$emit("changeSite"); this.$bus.$emit("changeSite");
}, },
handelClick(item) { handelClick(item) {
this.routeInfo = "";
if (item.key !== this.$route.path) { if (item.key !== this.$route.path) {
sessionStorage.setItem("routeInfo", item.key);
this.$router.push(item.key); this.$router.push(item.key);
// this.showPage = true; // this.showPage = true;
} else { } else {
...@@ -161,24 +164,36 @@ export default { ...@@ -161,24 +164,36 @@ export default {
}); });
}, },
Logout() { Logout() {
let _this = this;
this.$confirm({
title: "您是否确定退出登录?",
onOk() {
LogoutInterface({}).then((res) => { LogoutInterface({}).then((res) => {
// this.$message.success(res.msg); // this.$message.success(res.msg);
this.$Storage.remove(2, "Authorization"); _this.$Storage.remove(2, "Authorization");
this.$Storage.remove(2, "siteId"); _this.$Storage.remove(2, "siteId");
this.$Storage.remove(2, "siteName"); _this.$Storage.remove(2, "siteName");
this.$Storage.remove(2, "userInfo"); _this.$Storage.remove(2, "userInfo");
this.SET_USERDATA({}); sessionStorage.removeItem("routeInfo");
_this.SET_USERDATA({});
setTimeout(() => { setTimeout(() => {
this.$router.replace({ path: "/" }); _this.$router.replace({ path: "/" });
}, 200); }, 200);
}); });
}, },
onCancel() {},
});
},
fnChangePassword() { fnChangePassword() {
this.visibleEditPwd = true; this.visibleEditPwd = true;
}, },
// 返回门户 // 返回门户
backHome() { backHome() {
this.$router.push("/home/dataManagement/dataAdmin"); this.$router.push(
sessionStorage.getItem("routeInfo")
? sessionStorage.getItem("routeInfo")
: "/home/dataManagement/dataAdmin"
);
}, },
}, },
}; };
......
<template> <template>
<div class="station"> <div class="station">
<a-carousel
effect="fade"
autoplay
:autoplaySpeed="2000"
:dots="false"
style="width: 100%; height: 100%; overflow: hidden"
>
<div class="img_box img1"></div>
<!-- style="
height: 100vh;
width: 100%;
background: url('@/assets/images/bg.jpg') center no-repeat;
overflow: hidden;
background-size: cover;
" -->
<div class="img_box img2"></div>
<div class="img_box img3"></div>
</a-carousel>
<div class="title"> <div class="title">
<h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3> <h3 style="text-align: center;font-size: 50px;">宜人·宜宾·宜办事</h3>
<p>“互联网+政务服务”整体解决方案提供商和服务商</p> <!-- <p>“互联网+政务服务”整体解决方案提供商和服务商</p> -->
</div> </div>
<div class="classification"> <div class="classification">
<div class="modules"> <div class="modules">
...@@ -12,7 +30,7 @@ ...@@ -12,7 +30,7 @@
:key="item.id" :key="item.id"
@click="openWindow(item.modelUrl)" @click="openWindow(item.modelUrl)"
> >
<div class="picture"> <div class="picture" :style="{background: item.color}">
<img <img
width="40" width="40"
height="35" height="35"
...@@ -58,7 +76,13 @@ export default { ...@@ -58,7 +76,13 @@ export default {
this.siteId = Storage.get(2, "siteId"); this.siteId = Storage.get(2, "siteId");
let res = await appsListInterface({ siteId: this.siteId }); let res = await appsListInterface({ siteId: this.siteId });
let { data } = res.data; let { data } = res.data;
this.siteModelList = data; let color = []
let colorArr = ['#546DFF','#1E6FFF','#3CBFFF','#00AA5B','#FFAB00']
color = colorArr.concat(colorArr,colorArr,colorArr,colorArr,colorArr,colorArr)
this.siteModelList = data.map((v,i)=>{
v['color'] = color[i]
return v
});
}, },
openWindow(href) { openWindow(href) {
let token = Storage.get(2, "Authorization"); let token = Storage.get(2, "Authorization");
...@@ -91,13 +115,34 @@ export default { ...@@ -91,13 +115,34 @@ export default {
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.station { .ant-carousel :deep(.slick-slide) {
width: 100%; width: 100%;
height: 100%; height: 100%;
overflow: hidden;
.img_box {
width: 100%;
height: 92.1vh;
overflow: hidden;
background-size: cover;
}
.img1 {
background: url("~@/assets/images/bg.jpg") center no-repeat; background: url("~@/assets/images/bg.jpg") center no-repeat;
}
.img2 {
background: url("~@/assets/images/bgg1.jpg") center no-repeat;
}
.img3 {
background: url("~@/assets/images/bgg2.jpg") center no-repeat;
}
}
.station {
width: 100%;
height: 100%;
// background: url("~@/assets/images/bg.jpg") center no-repeat;
background-size: cover; background-size: cover;
position: relative; position: relative;
padding-top: @headerH; padding-top: @headerH;
overflow: hidden;
.title { .title {
width: 650px; width: 650px;
...@@ -124,7 +169,7 @@ export default { ...@@ -124,7 +169,7 @@ export default {
.classification { .classification {
width: 100%; width: 100%;
height: 300px; height: 410px;
position: absolute; position: absolute;
bottom: 0; bottom: 0;
background-color: rgba(3, 23, 24, 0.452); background-color: rgba(3, 23, 24, 0.452);
...@@ -141,7 +186,6 @@ export default { ...@@ -141,7 +186,6 @@ export default {
margin-top: 5px; margin-top: 5px;
text-align: center; text-align: center;
cursor: pointer; cursor: pointer;
.picture { .picture {
width: 72px; width: 72px;
height: 72px; height: 72px;
......
...@@ -3,16 +3,26 @@ ...@@ -3,16 +3,26 @@
<div class="search_box" ref="search_box"> <div class="search_box" ref="search_box">
<h3>API服务</h3> <h3>API服务</h3>
<h4> <h4>
<a-input placeholder="请输入API名称搜索" v-model="searchVal" @pressEnter="getServiceApiList" /> <a-input
placeholder="请输入API名称搜索"
v-model="searchVal"
@pressEnter="getServiceApiList"
allow-clear
/>
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>搜索</span>
<!-- <span>{{ isSearch ? "重置" : "搜索" }}</span> -->
</button> </button>
</h4> </h4>
</div> </div>
<div class="stepbox" :style="{ height: contentHigh + 'px' }"> <div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left"> <div class="_left">
<a-steps progress-dot direction="vertical"> <a-steps progress-dot direction="vertical">
<a-step v-for="(item, index) in stepsList" :status="active === index ? 'process' : 'wait'" :key="index"> <a-step
v-for="(item, index) in stepsList"
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{ <span slot="title" @click="handleChange(item, index)">{{
item.productName item.productName
}}</span> }}</span>
...@@ -25,10 +35,19 @@ ...@@ -25,10 +35,19 @@
<span class="list_title">{{ curApiInfo.name }}</span> <span class="list_title">{{ curApiInfo.name }}</span>
<span class="count primary">{{ curApiInfo.total }}</span> <span class="count primary">{{ curApiInfo.total }}</span>
</div> </div>
<div class="list flex aic jcb" v-for="v in curApiInfo.list" :key="v.id"> <div
class="list flex aic jcb"
v-for="v in curApiInfo.list"
:key="v.id"
>
<div class="api-name">{{ v.interfaceName }}</div> <div class="api-name">{{ v.interfaceName }}</div>
<span class="service-name">{{ v.description }}</span> <span class="service-name">{{ v.description }}</span>
<a-button icon="read" type="primary" class="addclass" @click="pushroeuter(v)"> <a-button
icon="read"
type="primary"
class="addclass"
@click="pushroeuter(v)"
>
查看文档 查看文档
</a-button> </a-button>
</div> </div>
...@@ -73,7 +92,7 @@ export default { ...@@ -73,7 +92,7 @@ export default {
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.stepsList = data.data;
this.getApiDetail(data.data[0]) this.getApiDetail(data.data[0]);
} else { } else {
this.curApiInfo = {}; this.curApiInfo = {};
} }
...@@ -82,33 +101,38 @@ export default { ...@@ -82,33 +101,38 @@ export default {
}, },
getApiDetail(item) { getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then((res) => { getInterfaceList({ page: 1, size: -1, productId: item.id }).then(
(res) => {
let { code, data } = res; let { code, data } = res;
if (code == 1) { if (code == 1) {
this.curApiInfo = { this.curApiInfo = {
name: item.productName, name: item.productName,
list: data.data, list: data.data,
total: data.total total: data.total,
};
} }
} }
}); );
}, },
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch;
if (this.isSearch) {
this.active = -1;
this.getServiceApiList();
} else {
this.searchVal = "";
this.active = 0; this.active = 0;
this.getServiceApiList(); this.getServiceApiList();
}
// this.isSearch = !this.isSearch;
// if (this.isSearch) {
// this.active = -1;
// this.getServiceApiList();
// } else {
// this.searchVal = "";
// this.active = 0;
// this.getServiceApiList();
// }
}, },
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.searchVal = ""; this.searchVal = "";
this.getApiDetail(row) this.getApiDetail(row);
}, },
pushroeuter(v) { pushroeuter(v) {
this.$router.push({ this.$router.push({
...@@ -138,7 +162,9 @@ export default { ...@@ -138,7 +162,9 @@ export default {
align-items: center; align-items: center;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
h3 { h3 {
font-size: 2.4rem; font-size: 2.4rem;
color: #fff; color: #fff;
...@@ -177,7 +203,7 @@ export default { ...@@ -177,7 +203,7 @@ export default {
padding: 0; padding: 0;
border: none; border: none;
&>span { & > span {
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
...@@ -221,8 +247,8 @@ export default { ...@@ -221,8 +247,8 @@ export default {
width: 100%; width: 100%;
} }
&>span:before, & > span:before,
&>span:after { & > span:after {
position: absolute; position: absolute;
content: ""; content: "";
left: 0; left: 0;
...@@ -235,21 +261,21 @@ export default { ...@@ -235,21 +261,21 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
&>span:before { & > span:before {
width: 2px; width: 2px;
height: 0%; height: 0%;
} }
&>span:after { & > span:after {
height: 2px; height: 2px;
width: 0%; width: 0%;
} }
&>span:hover:before { & > span:hover:before {
height: 100%; height: 100%;
} }
&>span:hover:after { & > span:hover:after {
width: 100%; width: 100%;
} }
} }
...@@ -350,15 +376,21 @@ export default { ...@@ -350,15 +376,21 @@ export default {
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg, background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
background: -webkit-linear-gradient(174deg, );
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
background: linear-gradient(174deg, );
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
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);
} }
} }
......
...@@ -3,34 +3,71 @@ ...@@ -3,34 +3,71 @@
<div class="content"> <div class="content">
<div class="top"> <div class="top">
<h1 class="title_text">{{ detailsForm.interfaceName }}</h1> <h1 class="title_text">{{ detailsForm.interfaceName }}</h1>
<button class="go_back" @click="$router.go(-1)">返回上一级</button> <a-button
type="primary"
class="addclass"
@click="$router.go(-1)"
style="margin-bottom: 1rem"
>返回上一级</a-button
>
</div> </div>
<a-card title="接口信息" :bordered="false" class="card_box"> <a-card title="接口信息" :bordered="false" class="card_box">
<a-descriptions> <a-descriptions>
<a-descriptions-item label="接口名称">{{ detailsForm.interfaceName }}</a-descriptions-item> <a-descriptions-item label="接口名称">{{
<a-descriptions-item label="版本号">{{ detailsForm.versionNumber }}</a-descriptions-item> detailsForm.interfaceName
<a-descriptions-item label="请求类型">{{ detailsForm.requestType == 1 ? 'GET' : 'POST' }}</a-descriptions-item>
<a-descriptions-item label="请求协议">{{ detailsForm.requestProtocol == 1 ? 'HTTP' : 'HTTPS'
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="content-type">{{ detailsForm.contentType }}</a-descriptions-item> <a-descriptions-item label="版本号">{{
<a-descriptions-item label="超时时长">{{ detailsForm.timeoutValue }}</a-descriptions-item> detailsForm.versionNumber
<a-descriptions-item label="限流策略">{{ detailsForm.limitStrategy == 1 ? '分钟' : '小时' }}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="访问网络" v-if="detailsForm && detailsForm.network"> <a-descriptions-item label="请求类型">{{
<span v-for="item, idx of dict.network" v-show="detailsForm.network.indexOf(idx) != -1" :key="idx"> {{ item }} detailsForm.requestType == 1 ? "GET" : "POST"
}}</a-descriptions-item>
<a-descriptions-item label="请求协议">{{
detailsForm.requestProtocol == 1 ? "HTTP" : "HTTPS"
}}</a-descriptions-item>
<a-descriptions-item label="content-type">{{
detailsForm.contentType
}}</a-descriptions-item>
<a-descriptions-item label="超时时长"
>{{ detailsForm.timeoutValue }}</a-descriptions-item
>
<a-descriptions-item label="限流策略">{{
detailsForm.limitStrategy == 1 ? "分钟" : "小时"
}}</a-descriptions-item>
<a-descriptions-item
label="访问网络"
v-if="detailsForm && detailsForm.network"
>
<span
v-for="(item, idx) of dict.network"
v-show="detailsForm.network.indexOf(idx) != -1"
:key="idx"
>
{{ item }}
</span> </span>
</a-descriptions-item> </a-descriptions-item>
<a-descriptions-item label="接口标签" v-if="dict.interfaceTag">{{ dict.interfaceTag[detailsForm.interfaceTag] <a-descriptions-item label="接口标签" v-if="dict.interfaceTag">{{
dict.interfaceTag[detailsForm.interfaceTag]
}}</a-descriptions-item> }}</a-descriptions-item>
<a-descriptions-item label="接口来源" v-if="dict.interfaceSource">{{ <a-descriptions-item label="接口来源" v-if="dict.interfaceSource">{{
dict.interfaceSource[detailsForm.interfaceSource] }}</a-descriptions-item> dict.interfaceSource[detailsForm.interfaceSource]
<a-descriptions-item label="请求路径">{{ detailsForm.requestUrl }}</a-descriptions-item> }}</a-descriptions-item>
<br> <a-descriptions-item label="请求路径">{{
<a-descriptions-item label="描述" span="{3}">{{ detailsForm.description }}</a-descriptions-item> detailsForm.requestUrl
}}</a-descriptions-item>
<br />
<a-descriptions-item label="描述" span="{3}">{{
detailsForm.description
}}</a-descriptions-item>
</a-descriptions> </a-descriptions>
</a-card> </a-card>
<a-card title="请求参数" :bordered="false" class="card_box"> <a-card title="请求参数" :bordered="false" class="card_box">
<div class="flex aic jcb mb10"> <div class="flex aic jcb mb10">
<a-radio-group v-model="requestPam.type" button-style="solid" disabled> <a-radio-group
v-model="requestPam.type"
button-style="solid"
disabled
>
<a-radio-button value="path"> 路径参数 </a-radio-button> <a-radio-button value="path"> 路径参数 </a-radio-button>
<a-radio-button value="headers"> headers </a-radio-button> <a-radio-button value="headers"> headers </a-radio-button>
<a-radio-button value="query"> query </a-radio-button> <a-radio-button value="query"> query </a-radio-button>
...@@ -38,23 +75,37 @@ ...@@ -38,23 +75,37 @@
</a-radio-group> </a-radio-group>
<div class="flex aic"> <div class="flex aic">
<div class="mr10">入参是否加密</div> <div class="mr10">入参是否加密</div>
<div>{{ detailsForm.inEncrypt == 1 ? '加密' : '不加密' }}</div> <div>{{ detailsForm.inEncrypt == 1 ? "加密" : "不加密" }}</div>
</div> </div>
</div> </div>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }" :pagination="false" <a-table
:columns="table_columns" :dataSource="requestPam.table"> size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns"
:dataSource="requestPam.table"
>
</a-table> </a-table>
</a-card> </a-card>
<a-card title="响应数据" :bordered="false" class="card_box"> <a-card title="响应数据" :bordered="false" class="card_box">
<div class="flex aic mb10" style="justify-content: flex-end;"> <div class="flex aic mb10" style="justify-content: flex-end">
<div class="flex aic"> <div class="flex aic">
<div class="mr10">出参是否加密</div> <div class="mr10">出参是否加密</div>
<div>{{ detailsForm.outEncrypt == 1 ? '加密' : '不加密' }}</div> <div>{{ detailsForm.outEncrypt == 1 ? "加密" : "不加密" }}</div>
</div> </div>
</div> </div>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }" :pagination="false" <a-table
:columns="table_columns" :dataSource="responsePam.table"> size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns"
:dataSource="responsePam.table"
>
</a-table> </a-table>
</a-card> </a-card>
...@@ -80,9 +131,7 @@ ...@@ -80,9 +131,7 @@
import Vue from "vue"; import Vue from "vue";
import hljs from "highlight.js"; import hljs from "highlight.js";
import "highlight.js/styles/monokai-sublime.css"; import "highlight.js/styles/monokai-sublime.css";
import { import { getInterfaceInfo } from "@/api/thePlatformIsSet.js";
getInterfaceInfo
} from '@/api/thePlatformIsSet.js'
Vue.directive("highlight", function (el) { Vue.directive("highlight", function (el) {
let blocks = el.querySelectorAll("pre code"); let blocks = el.querySelectorAll("pre code");
blocks.forEach((block) => { blocks.forEach((block) => {
...@@ -97,10 +146,11 @@ export default { ...@@ -97,10 +146,11 @@ export default {
requestPam: {}, requestPam: {},
responsePam: {}, responsePam: {},
dict: {}, dict: {},
table_columns: [{ table_columns: [
{
title: "参数名", title: "参数名",
align: "center", align: "center",
dataIndex: "name" dataIndex: "name",
}, },
{ {
title: "参数值类型", title: "参数值类型",
...@@ -116,34 +166,34 @@ export default { ...@@ -116,34 +166,34 @@ export default {
title: "是否必填", title: "是否必填",
align: "center", align: "center",
dataIndex: "isMust", dataIndex: "isMust",
customRender: (text, record, index) => `${text == 1 ? '' : ''}`, customRender: (text, record, index) => `${text == 1 ? "" : ""}`,
}, },
{ {
title: "描述", title: "描述",
align: "center", align: "center",
dataIndex: "describe", dataIndex: "describe",
width: 200 width: 200,
} },
], ],
allResData: null, allResData: null,
errJson: { "msg": "请选择待查看产品接口信息", "code": -1 } errJson: { msg: "请选择待查看产品接口信息", code: -1 },
}; };
}, },
mounted() { mounted() {
this.getInfo() this.getInfo();
}, },
methods: { methods: {
getInfo() { getInfo() {
getInterfaceInfo({ id: this.$route.query.id }).then(res => { getInterfaceInfo({ id: this.$route.query.id }).then((res) => {
this.allResData = res this.allResData = res;
res.data.network = res.data.network.split(',') res.data.network = res.data.network.split(",");
this.detailsForm = res.data this.detailsForm = res.data;
this.requestPam = JSON.parse(res.data.requestParameters) this.requestPam = JSON.parse(res.data.requestParameters);
this.responsePam = JSON.parse(res.data.responseParameters) this.responsePam = JSON.parse(res.data.responseParameters);
this.dict = res.dict this.dict = res.dict;
}) });
}, },
toJson(res) { toJson(res) {
return JSON.stringify(res); return JSON.stringify(res);
...@@ -190,39 +240,39 @@ export default { ...@@ -190,39 +240,39 @@ export default {
position: relative; position: relative;
z-index: 1; z-index: 1;
&:hover { // &:hover {
color: rgb(255, 255, 255); // color: rgb(255, 255, 255);
} // }
&::before, // &::before,
&::after { // &::after {
content: ""; // content: "";
position: absolute; // position: absolute;
top: 0%; // top: 0%;
left: 0%; // left: 0%;
width: 100%; // width: 100%;
height: 100%; // height: 100%;
background: rgba(128, 128, 128, 0.096); // background: rgba(128, 128, 128, 0.096);
backdrop-filter: blur(10px); // backdrop-filter: blur(10px);
z-index: -1; // z-index: -1;
transition: all 0.4s; // transition: all 0.4s;
} // }
&::after { // &::after {
z-index: -2; // z-index: -2;
transition: all 0.4s; // transition: all 0.4s;
} // }
&:hover::before { // &:hover::before {
background: rgb(0, 0, 0, 0.315); // background: rgb(0, 0, 0, 0.315);
// border-radius: 10px; // // border-radius: 10px;
} // }
&:hover::after { // &:hover::after {
background: linear-gradient(to right, #cb6ce6, #38b6ff); // background: linear-gradient(to right, #cb6ce6, #38b6ff);
// border-radius: 10px; // // border-radius: 10px;
transform: scale(1.07, 1.2) rotateX(180deg); // transform: scale(1.07, 1.2) rotateX(180deg);
} // }
} }
} }
...@@ -236,7 +286,7 @@ export default { ...@@ -236,7 +286,7 @@ export default {
margin-bottom: 1rem; margin-bottom: 1rem;
} }
&+.card_box { & + .card_box {
margin-top: 1rem; margin-top: 1rem;
} }
} }
...@@ -248,15 +298,21 @@ export default { ...@@ -248,15 +298,21 @@ export default {
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg, background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
background: -webkit-linear-gradient(174deg, );
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
background: linear-gradient(174deg, );
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
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);
} }
} }
......
...@@ -5,9 +5,10 @@ ...@@ -5,9 +5,10 @@
<h1>应用服务</h1> <h1>应用服务</h1>
<div class="search-box"> <div class="search-box">
<a-input <a-input
placeholder="请输入API名称搜索" placeholder="请输入应用名称搜索"
v-model="searchVal" v-model="searchVal"
@pressEnter="handleSearch" @pressEnter="handleSearch"
allow-clear
/> />
<button class="search_btn btn" @click="handleSearch"> <button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span> <span>{{ isSearch ? "重置" : "搜索" }}</span>
...@@ -20,12 +21,12 @@ ...@@ -20,12 +21,12 @@
<div class="_left"> <div class="_left">
<a-steps progress-dot direction="vertical"> <a-steps progress-dot direction="vertical">
<a-step <a-step
v-for="(item, index) in stepsList" v-for="(item, index) in listArr"
:status="active === index ? 'process' : 'wait'" :status="active === index ? 'process' : 'wait'"
:key="index" :key="index"
> >
<span slot="title" @click="handleChange(item, index)">{{ <span slot="title" @click="handleChange(item, index)">{{
item.serviceName item.productName
}}</span> }}</span>
</a-step> </a-step>
</a-steps> </a-steps>
...@@ -33,29 +34,64 @@ ...@@ -33,29 +34,64 @@
<div class="_right"> <div class="_right">
<div class="list_box step_sign"> <div class="list_box step_sign">
<div class="title-box"> <div class="title-box">
<span class="list_title">{{ curInfo.serviceName }}</span> <span class="list_title">{{
<span class="count primary">{{ curInfo.count }}</span> listArr[active] ? listArr[active].productName : "--"
}}</span>
<span class="count primary">{{
listArr[active].curInfo.length
}}</span>
</div> </div>
<div v-if="listArr[active].curInfo.length > 0">
<div <div
class="list flex aic jcb" class="list flex aic jcb"
v-for="itm of curInfo.serviceList" v-for="(i, j) in listArr[active].curInfo"
:key="itm.id"
> >
<div class="app-name">{{ itm.packageName }}</div> <div class="app-name">{{ i.appName }}</div>
<img src="../../../assets/images/php.png" alt /> <img
<div>{{ itm.packageVersion }}</div> v-if="i.deveLanguage == 1"
<div class="">{{ itm.packageRemark }}</div> src="@/assets/images/JAVA.png"
<div v-if="itm.lapseTime"> alt
失效时间:{{ $moment(itm.lapseTime).format("YYYY-MM-DD") }} />
<img
v-if="i.deveLanguage == 2"
src="@/assets/images/php.png"
alt
/>
<img
v-if="i.deveLanguage == 3"
src="@/assets/images/Android.png"
alt
/>
<img
v-if="i.deveLanguage == 4"
src="@/assets/images/Cshape.png"
alt
/>
<img
v-if="i.deveLanguage == 5"
src="@/assets/images/Cjj.jpg"
alt
/>
<div>V{{ i.versionNumber }}</div>
<div>{{ i.versionInfo }}</div>
<div v-if="i.createTime">
{{ $moment(i.createTime).format("YYYY-MM-DD") }}
</div> </div>
<a-button <a-button
type="primary" class="addclass" type="primary"
@click="handleDowload(itm.packagePath, itm.systemServiceName)" class="addclass"
@click="handleDowload(api + i.appFileUrl, i.appName)"
> >
<a-icon type="download" />下载 <a-icon type="download" />下载
</a-button> </a-button>
</div> </div>
</div> </div>
<div v-else>
<div class="list flex aic jcb">
<div class="app-name">暂无数据</div>
</div>
</div>
</div>
</div> </div>
</div> </div>
</div> </div>
...@@ -63,13 +99,15 @@ ...@@ -63,13 +99,15 @@
<script> <script>
import { serviceList } from "@/api/applService.js"; import { serviceList } from "@/api/applService.js";
import { getProduct } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common"; import common from "@/mixins/common";
export default { export default {
name: "PortalAdminVueApplService", name: "PortalAdminVueApplService",
mixins: [common], mixins: [common],
data() { data() {
return { return {
api: process.env.VUE_APP_API_BASE_URL + "/", listArr: [],
api: process.env.VUE_APP_API_IMG_URL,
searchVal: "", searchVal: "",
stepsList: [], stepsList: [],
active: 0, active: 0,
...@@ -78,65 +116,105 @@ export default { ...@@ -78,65 +116,105 @@ export default {
}; };
}, },
created() { created() {
this.getServiceList(); this.getList();
}, },
mounted() { mounted() {
this.setContentHigh(); // this.setContentHigh();
}, },
methods: { methods: {
getServiceList() { getServiceList() {
serviceList({ serviceList({
page: 1, page: 1,
size: -1, //每页条数 size: -1, //每页条数
packageName: `%${this.searchVal}%`, appName: `%${this.searchVal}%`,
}).then((res) => { }).then((res) => {
let { code, data } = res; let { code, data, dict } = res;
if (code == 1) { if (code == 1) {
if (data.data.length) { if (data.data.length) {
this.stepsList = data.data; this.listArr.forEach((i) => {
this.curInfo = data.data[0]; let arr = [];
} else { data.data.forEach((k) => {
this.curInfo = {}; if (i.id == k.productId) {
arr.push(k);
}
});
i.curInfo = arr;
this.$nextTick();
});
} }
} }
}); });
}, },
handleSearch() { handleSearch() {
this.isSearch = !this.isSearch;
if (this.isSearch) {
this.active = -1;
this.getServiceList();
} else {
this.searchVal = "";
this.active = 0;
this.getServiceList(); this.getServiceList();
} // this.isSearch = !this.isSearch;
// if (this.isSearch) {
// this.getServiceList();
// } else {
// this.searchVal = "";
// this.active = 0;
// this.getServiceList();
// }
}, },
// 切换设备 // 切换设备
handleChange(row, index) { handleChange(row, index) {
this.active = index; this.active = index;
this.curInfo = row;
this.searchVal = ""; this.searchVal = "";
}, },
handleDowload(url, systemServiceName) { handleDowload(url, systemServiceName) {
console.log(systemServiceName);
const a = document.createElement("a"); const a = document.createElement("a");
a.href = url; a.href = url;
a.download = systemServiceName; a.download = systemServiceName;
a.click(); a.click();
}, },
//获取列表
getList() {
getProduct({ page: 1, size: -1 }).then((res) => {
res.data.data.forEach((i) => {
i.curInfo = [];
});
this.listArr = [...res.data.data];
console.log(this.listArr);
this.getServiceList();
});
},
}, },
}; };
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
@headerH: 4.5rem; @headerH: 4.5rem;
.application .stepbox ._right .list > div {
width: 15%;
text-align: center;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.application .stepbox ._right .list .app-name {
width: 15%;
text-align: left;
}
/deep/.ant-steps-dot .ant-steps-item-content,
.ant-steps-dot.ant-steps-small .ant-steps-item-content {
width: 200px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.application { .application {
width: 100%; width: 100%;
height: 100vh; height: 100vh;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
background: #f5f5f5; background: #f5f5f5;
.appl_search { .appl_search {
height: 300px; height: 300px;
text-align: center; text-align: center;
...@@ -145,16 +223,21 @@ export default { ...@@ -145,16 +223,21 @@ export default {
background-size: cover; background-size: cover;
display: flex; display: flex;
flex-flow: column; flex-flow: column;
h1 { h1 {
font-size: 2.4rem; font-size: 2.4rem;
color: #fff; color: #fff;
font-weight: bold; font-weight: bold;
padding: 4rem 0 2rem; padding: 4rem 0 2rem;
} }
.search-box { .search-box {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
/deep/.ant-input { /deep/.ant-input {
width: 30rem !important; width: 30rem !important;
margin-right: 2rem; margin-right: 2rem;
...@@ -180,6 +263,7 @@ export default { ...@@ -180,6 +263,7 @@ export default {
line-height: 42px; line-height: 42px;
padding: 0; padding: 0;
border: none; border: none;
& > span { & > span {
position: relative; position: relative;
display: block; display: block;
...@@ -263,15 +347,18 @@ export default { ...@@ -263,15 +347,18 @@ export default {
width: 90%; width: 90%;
margin-left: 5%; margin-left: 5%;
display: flex; display: flex;
/deep/.ant-steps-item-content { /deep/.ant-steps-item-content {
cursor: pointer; cursor: pointer;
} }
._left { ._left {
width: 300px; width: 300px;
height: 100%; height: 100%;
padding: 20px; padding: 20px;
margin-right: 20px; margin-right: 20px;
overflow: auto; overflow: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -294,6 +381,7 @@ export default { ...@@ -294,6 +381,7 @@ export default {
height: 100%; height: 100%;
padding: 20px; padding: 20px;
overflow-y: auto; overflow-y: auto;
&::-webkit-scrollbar { &::-webkit-scrollbar {
width: 3px; width: 3px;
height: 3px; height: 3px;
...@@ -309,16 +397,20 @@ export default { ...@@ -309,16 +397,20 @@ export default {
border-radius: 3px; border-radius: 3px;
background: #fff; background: #fff;
} }
.title-box { .title-box {
font-size: 24px; font-size: 24px;
.list_title { .list_title {
margin-right: 10px; margin-right: 10px;
font-weight: 600; font-weight: 600;
} }
.count { .count {
font-weight: 600; font-weight: 600;
} }
} }
.list { .list {
width: 100%; width: 100%;
height: 80px; height: 80px;
...@@ -326,13 +418,16 @@ export default { ...@@ -326,13 +418,16 @@ export default {
padding: 0px 20px; padding: 0px 20px;
background-color: #fff; background-color: #fff;
border-radius: 4px; border-radius: 4px;
.app-name { .app-name {
font-size: 16px; font-size: 16px;
font-weight: 600; font-weight: 600;
} }
.service-name { .service-name {
font-size: 14px; font-size: 14px;
} }
img { img {
width: 40px; width: 40px;
height: 40px; height: 40px;
...@@ -340,6 +435,7 @@ export default { ...@@ -340,6 +435,7 @@ export default {
} }
} }
} }
&::before { &::before {
content: ""; content: "";
display: block; display: block;
...@@ -361,7 +457,7 @@ export default { ...@@ -361,7 +457,7 @@ export default {
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
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>
...@@ -164,7 +164,9 @@ ...@@ -164,7 +164,9 @@
</div> </div>
</div> </div>
<div class="bottom_"> <div class="bottom_">
<a-button type="primary" class="addclass" @click="save">保存</a-button> <a-button type="primary" class="addclass" @click="save"
>保存</a-button
>
<a-button @click="resetForm">重置</a-button> <a-button @click="resetForm">重置</a-button>
</div> </div>
</div> </div>
...@@ -231,9 +233,54 @@ export default { ...@@ -231,9 +233,54 @@ export default {
menu; menu;
// this.menusList = res.data; // this.menusList = res.data;
if (sjgl && sjgl.length) this.permsForm.seleteDataManage = sjgl; if (sjgl && sjgl.length) this.permsForm.seleteDataManage = sjgl;
this.dataManage.childList &&
this.dataManage.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataManage &&
this.permsForm.seleteDataManage.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllManage = this.dataManage.childList.every(
(v) => v.checked
);
if (zdbp && zdbp.length) this.permsForm.seleteDataArrange = zdbp; if (zdbp && zdbp.length) this.permsForm.seleteDataArrange = zdbp;
this.dataArrange.childList &&
this.dataArrange.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataArrange &&
this.permsForm.seleteDataArrange.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllArrange = this.dataArrange.childList.every(
(v) => v.checked
);
if (sjjs && sjjs.length) this.permsForm.seleteDataCalculate = sjjs; if (sjjs && sjjs.length) this.permsForm.seleteDataCalculate = sjjs;
this.dataCalculate.childList &&
this.dataCalculate.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataCalculate &&
this.permsForm.seleteDataCalculate.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllCalculate = this.dataCalculate.childList.every(
(v) => v.checked
);
if (ptsz && ptsz.length) this.permsForm.seleteDataSet = ptsz; if (ptsz && ptsz.length) this.permsForm.seleteDataSet = ptsz;
this.dataSet.childList &&
this.dataSet.childList.forEach((v) => {
v.checked = false;
this.permsForm.seleteDataSet &&
this.permsForm.seleteDataSet.forEach((val) => {
v.nodeId == val ? (v.checked = true) : "";
});
});
this.permsForm.checkAllSet = this.dataSet.childList.every(
(v) => v.checked
);
}, },
// 获取角色菜单列表 // 获取角色菜单列表
getRoleInfo() { getRoleInfo() {
......
...@@ -2,39 +2,73 @@ ...@@ -2,39 +2,73 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<button class="add_btn" @click="openDetails()"> <a-button type="primary" @click="openDetails()" class="addclass"
<span>新增</span> >新增</a-button
</button> >
</div> </div>
<span> <span>
<a-input allowClear v-model="query.interfaceName" placeholder="请输入接口名称查询"> <a-input
allowClear
v-model="query.interfaceName"
placeholder="请输入接口名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-select v-model="query.interfaceSource"> <a-select v-model="query.interfaceSource">
<a-select-option value="">所有来源</a-select-option> <a-select-option value="">所有来源</a-select-option>
<a-select-option v-for="(item, index) of dict.interfaceSource" :key="index" :value="index"> <a-select-option
v-for="(item, index) of dict.interfaceSource"
:key="index"
:value="index"
>
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<a-select v-model="query.interfaceTag"> <a-select v-model="query.interfaceTag">
<a-select-option value="">所有标签</a-select-option> <a-select-option value="">所有标签</a-select-option>
<a-select-option v-for="(item, index) of dict.interfaceTag" :key="index" :value="index"> <a-select-option
v-for="(item, index) of dict.interfaceTag"
:key="index"
:value="index"
>
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<button class="search_btn" @click="getList()">搜索</button> <a-button type="primary" class="addclass" @click="getList()"
>搜索</a-button
>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination" <a-table
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData"> size="small"
<template slot="network" slot-scope="text, record,index"> bordered
<span v-for="item, idx of dict.network" v-show="text.indexOf(idx) != -1" :key="idx"> {{ item }} </span> :row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="network" slot-scope="text, record, index">
<span
v-for="(item, idx) of dict.network"
v-show="text.indexOf(idx) != -1"
:key="idx"
>
{{ item }}
</span>
</template> </template>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" @click="openDetails(record)">编辑</a-button> <a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)"> <a-popconfirm
title="确定要删除此应用吗?"
ok-text="确定"
cancel-text="取消"
@confirm="delRow(record)"
>
<a-button type="link" style="color: #ff4420">删除</a-button> <a-button type="link" style="color: #ff4420">删除</a-button>
</a-popconfirm> </a-popconfirm>
</template> </template>
...@@ -47,7 +81,10 @@ ...@@ -47,7 +81,10 @@
<script> <script>
import table from "@/mixins/table"; import table from "@/mixins/table";
import Details from "./components/Details.vue"; import Details from "./components/Details.vue";
import { getInterfaceList, getInterfaceDelete } from '@/api/thePlatformIsSet.js' import {
getInterfaceList,
getInterfaceDelete,
} from "@/api/thePlatformIsSet.js";
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVueAlerting", name: "PortalAdminVueAlerting",
...@@ -71,19 +108,21 @@ export default { ...@@ -71,19 +108,21 @@ export default {
title: "请求类型", title: "请求类型",
align: "center", align: "center",
dataIndex: "requestType", dataIndex: "requestType",
customRender: (text, record, index) => `${record.requestType == 1 ? 'POST' : 'GET'}`, customRender: (text, record, index) =>
`${record.requestType == 1 ? "POST" : "GET"}`,
}, },
{ {
title: "标签", title: "标签",
align: "center", align: "center",
dataIndex: "interfaceTag", dataIndex: "interfaceTag",
customRender: (text, record, index) => this.dict.interfaceTag[text] customRender: (text, record, index) => this.dict.interfaceTag[text],
}, },
{ {
title: "请求协议", title: "请求协议",
align: "center", align: "center",
dataIndex: "requestProtocol", dataIndex: "requestProtocol",
customRender: (text, record, index) => this.dict.requestProtocol[text] customRender: (text, record, index) =>
this.dict.requestProtocol[text],
}, },
{ {
title: "版本", title: "版本",
...@@ -94,13 +133,15 @@ export default { ...@@ -94,13 +133,15 @@ export default {
title: "来源", title: "来源",
align: "center", align: "center",
dataIndex: "interfaceSource", dataIndex: "interfaceSource",
customRender: (text, record, index) => this.dict.interfaceSource[text] customRender: (text, record, index) =>
this.dict.interfaceSource[text],
}, },
{ {
title: "策略", title: "策略",
align: "center", align: "center",
dataIndex: "limitStrategy", dataIndex: "limitStrategy",
customRender: (text, record, index) => `${record.limitStrategy == 1 ? '分钟' : '小时'}`, customRender: (text, record, index) =>
`${record.limitStrategy == 1 ? "分钟" : "小时"}`,
}, },
{ {
title: "访问网络", title: "访问网络",
...@@ -108,7 +149,7 @@ export default { ...@@ -108,7 +149,7 @@ export default {
dataIndex: "network", dataIndex: "network",
scopedSlots: { scopedSlots: {
customRender: "network", customRender: "network",
} },
}, },
{ {
...@@ -129,12 +170,10 @@ export default { ...@@ -129,12 +170,10 @@ export default {
}, },
tablePagination: { tablePagination: {
current: 1, current: 1,
pageSize: 10 pageSize: 10,
},
dict: {
}, },
total: 0 dict: {},
total: 0,
}; };
}, },
components: { components: {
...@@ -148,20 +187,16 @@ export default { ...@@ -148,20 +187,16 @@ export default {
getInterfaceList({ getInterfaceList({
page: this.tablePagination.current, page: this.tablePagination.current,
size: this.tablePagination.pageSize, size: this.tablePagination.pageSize,
...this.query ...this.query,
}).then(res => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
let { let { data, total, dict } = res.data;
data,
total,
dict
} = res.data;
this.dict = dict; this.dict = dict;
this.tableSourceData = data; this.tableSourceData = data;
this.tablePagination.total = total; this.tablePagination.total = total;
return data return data;
} }
}) });
}, },
QueueState(type) { QueueState(type) {
switch (type) { switch (type) {
...@@ -176,21 +211,21 @@ export default { ...@@ -176,21 +211,21 @@ export default {
}, },
delRow(item) { delRow(item) {
getInterfaceDelete({ getInterfaceDelete({
id: item.id id: item.id,
}).then((res) => { }).then((res) => {
let { code, msg } = res let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('删除成功'); this.$message.success("删除成功");
this.getList() this.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
}, },
openDetails(item) { openDetails(item) {
if (item) { if (item) {
this.$refs.Details.modalInfo.title = "编辑接口"; this.$refs.Details.modalInfo.title = "编辑接口";
this.$refs.Details.getInfo(item.id) this.$refs.Details.getInfo(item.id);
} else { } else {
this.$refs.Details.modalInfo.title = "新增接口"; this.$refs.Details.modalInfo.title = "新增接口";
} }
...@@ -199,8 +234,8 @@ export default { ...@@ -199,8 +234,8 @@ export default {
}, },
//分页 //分页
pagTableChange(page) { pagTableChange(page) {
this.tablePagination.current = page.current this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize this.tablePagination.pageSize = page.pageSize;
this.getList(); this.getList();
}, },
}, },
...@@ -219,7 +254,7 @@ export default { ...@@ -219,7 +254,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -275,7 +310,7 @@ export default { ...@@ -275,7 +310,7 @@ export default {
} }
} }
&>span { & > span {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -360,13 +395,10 @@ export default { ...@@ -360,13 +395,10 @@ export default {
/deep/.ant-btn-link { /deep/.ant-btn-link {
padding: 0 !important; padding: 0 !important;
&+.ant-btn-link { & + .ant-btn-link {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
} }
} }
</style> </style>
...@@ -114,4 +114,3 @@ export default { ...@@ -114,4 +114,3 @@ export default {
} }
} }
</style> </style>
<template> <template>
<a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false" <a-modal
width="30%"> :title="VisibleTitle"
<a-form-model :label-col="{ :centered="true"
: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"
ref="appInfoFome"
:model="appInfoFome"
:rules="appInfoRules"
>
<a-form-model-item label="产品名称" prop="productName"> <a-form-model-item label="产品名称" prop="productName">
<a-input placeholder="请输入产品名称" allowClear v-model="appInfoFome.productName" /> <a-input
placeholder="请输入产品名称"
allowClear
v-model="appInfoFome.productName"
/>
</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>
...@@ -27,7 +46,7 @@ export default { ...@@ -27,7 +46,7 @@ export default {
VisibleTitle: "新增产品", VisibleTitle: "新增产品",
appInfoFome: { appInfoFome: {
productName: undefined, productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId")) siteId: JSON.parse(localStorage.getItem("siteId")),
}, //页面表单信息 }, //页面表单信息
appInfoRules: { appInfoRules: {
productName: [ productName: [
...@@ -36,28 +55,28 @@ export default { ...@@ -36,28 +55,28 @@ export default {
whitespace: true, //必选时,空格是否会被视为错误 whitespace: true, //必选时,空格是否会被视为错误
message: "请输入产品名称", message: "请输入产品名称",
trigger: "blur", trigger: "blur",
} },
], ],
}, },
}; };
}, },
mounted() { }, mounted() {},
methods: { methods: {
Modal_Ok() { Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => { this.$refs.appInfoFome.validate((valid) => {
if (valid) { if (valid) {
saveProduct(this.appInfoFome).then(res => { saveProduct(this.appInfoFome).then((res) => {
let { code, msg } = res let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('保存成功'); this.$message.success("保存成功");
this.resetForm(); this.resetForm();
this.Visible = false this.Visible = false;
this.$parent.getList() this.$parent.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
...@@ -66,7 +85,7 @@ export default { ...@@ -66,7 +85,7 @@ export default {
}, },
resetForm() { resetForm() {
this.$nextTick(() => { this.$nextTick(() => {
this.appInfoFome.productName = '' this.appInfoFome.productName = "";
}); });
}, },
}, },
...@@ -82,4 +101,3 @@ export default { ...@@ -82,4 +101,3 @@ export default {
} }
} }
</style> </style>
...@@ -2,36 +2,70 @@ ...@@ -2,36 +2,70 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<button class="add_btn" @click="openDetails()"> <a-button
type="primary"
class="addclass"
@click="openDetails()"
>
<span>新增</span> <span>新增</span>
</button> </a-button>
</div> </div>
<span> <span>
<a-input allowClear v-model="searchForm.appName" placeholder="请输入应用名称查询"> <a-input
allowClear
v-model="searchForm.appName"
placeholder="请输入应用名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<a-select v-model="searchForm.deveLanguage"> <a-select v-model="searchForm.deveLanguage">
<a-select-option value="">全部</a-select-option> <a-select-option value="">全部</a-select-option>
<a-select-option v-for="(item, index) of dict.deveLanguage" :key="index" :value="index"> <a-select-option
v-for="(item, index) of dict.deveLanguage"
:key="index"
:value="index"
>
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select>
<button class="search_btn" @click="getList()">搜索</button> <a-button
type="primary"
class="addclass"
@click="getList()"
>搜索</a-button
>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination" <a-table
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData"> size="small"
bordered
:row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" v-if="record.appFileUrl" <a-button
@click="handleDowload(record.appFileUrl)">下载应用</a-button> type="link"
v-if="record.appFileUrl"
@click="handleDowload(record.appFileUrl)"
>下载应用</a-button
>
<a-button type="link" @click="openDetails(record)">编辑</a-button> <a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)"> <a-popconfirm
title="确定要删除此应用吗?"
ok-text="确定"
cancel-text="取消"
@confirm="delRow(record)"
>
<a-button type="link" style="color: #ff4420">删除</a-button> <a-button type="link" style="color: #ff4420">删除</a-button>
</a-popconfirm> </a-popconfirm>
</template> </template>
</a-table> </a-table>
<Details ref="Details" :deveLanguage="dict.deveLanguage" /> <Details ref="Details" :deveLanguage="dict.deveLanguage" />
...@@ -43,6 +77,7 @@ ...@@ -43,6 +77,7 @@
import { getApps, deleteApps } from "@/api/thePlatformIsSet.js"; import { getApps, deleteApps } from "@/api/thePlatformIsSet.js";
import table from "@/mixins/table"; import table from "@/mixins/table";
import Details from "./components/Details.vue"; import Details from "./components/Details.vue";
let obj = {};
export default { export default {
mixins: [table], mixins: [table],
name: "PortalAdminVueAlerting", name: "PortalAdminVueAlerting",
...@@ -66,6 +101,7 @@ export default { ...@@ -66,6 +101,7 @@ export default {
title: "开发语言", title: "开发语言",
align: "center", align: "center",
dataIndex: "deveLanguage", dataIndex: "deveLanguage",
customRender: (text, record, index) => this.dict.deveLanguage[text],
}, },
{ {
title: "版本", title: "版本",
...@@ -81,13 +117,14 @@ export default { ...@@ -81,13 +117,14 @@ export default {
title: "是否启用", title: "是否启用",
align: "center", align: "center",
dataIndex: "isEnable", dataIndex: "isEnable",
customRender: (text, record, index) => text == 1 ? '' : "", customRender: (text, record, index) => (text == 1 ? "" : ""),
}, },
{ {
title: "上传时间", title: "上传时间",
align: "center", align: "center",
dataIndex: "createTime", dataIndex: "createTime",
customRender: (text, record, index) => this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"), customRender: (text, record, index) =>
this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"),
}, },
{ {
title: "操作", title: "操作",
...@@ -101,7 +138,7 @@ export default { ...@@ -101,7 +138,7 @@ export default {
], ],
tablePagination: { tablePagination: {
current: 1, current: 1,
pageSize: 10 pageSize: 10,
}, },
searchForm: { searchForm: {
deveLanguage: "", deveLanguage: "",
...@@ -109,8 +146,8 @@ export default { ...@@ -109,8 +146,8 @@ export default {
}, },
dict: { dict: {
deveLanguage: {}, deveLanguage: {},
isEnable: {} isEnable: {},
} },
}; };
}, },
components: { components: {
...@@ -129,55 +166,61 @@ export default { ...@@ -129,55 +166,61 @@ export default {
...search, ...search,
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
let { let { data, total, dict } = res.data;
data,
total,
dict
} = res.data;
this.dict = dict; this.dict = dict;
this.tableSourceData = data; this.tableSourceData = data;
this.tablePagination.total = total; this.tablePagination.total = total;
return data return data;
} }
}) });
}, },
//分页 //分页
pagTableChange(page) { pagTableChange(page) {
this.tablePagination.current = page.current this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize this.tablePagination.pageSize = page.pageSize;
this.getList(); this.getList();
}, },
delRow(item) { delRow(item) {
deleteApps({ deleteApps({
id: item.id id: item.id,
}).then((res) => { }).then((res) => {
console.log(res) console.log(res);
let { code, msg } = res let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('删除成功'); this.$message.success("删除成功");
this.getList() this.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
}, },
handleDowload(url) { handleDowload(url) {
let arr = url.split('/') let arr = url.split("/");
const a = document.createElement("a"); const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL+'/' + url; a.href = process.env.VUE_APP_API_BASE_URL + "/" + url;
a.download = arr[arr.length - 1]; a.download = arr[arr.length - 1];
a.click(); a.click();
}, },
openDetails(item) { openDetails(item) {
if (item) { if (item) {
this.$refs.Details.modalInfo.title = "编辑应用"; this.$refs.Details.modalInfo.title = "编辑应用";
this.$refs.Details.getInfo(item.id) this.$refs.Details.getInfo(item.id);
} else { } else {
this.$refs.Details.modalInfo.title = "新增应用"; this.$refs.Details.modalInfo.title = "新增应用";
} }
this.$refs.Details.modalInfo.visible = true; this.$refs.Details.modalInfo.visible = true;
//重置数据
this.$refs.Details.appForm = {
appName: "",
deveLanguage: undefined,
versionNumber: "",
versionInfo: "",
appFileUrl: "",
isEnable: false,
};
this.$refs.Details.uploadInfo.fileList = [];
// this.$refs.Details.appForm.resetFields()
this.$refs.Details.modalInfo.width = "30%"; this.$refs.Details.modalInfo.width = "30%";
}, },
}, },
}; };
...@@ -195,7 +238,7 @@ export default { ...@@ -195,7 +238,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -251,7 +294,7 @@ export default { ...@@ -251,7 +294,7 @@ export default {
} }
} }
&>span { & > span {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -336,13 +379,10 @@ export default { ...@@ -336,13 +379,10 @@ export default {
/deep/.ant-btn-link { /deep/.ant-btn-link {
padding: 0 !important; padding: 0 !important;
&+.ant-btn-link { & + .ant-btn-link {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
} }
} }
</style> </style>
<template> <template>
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title" <a-modal
@cancel="modalInfo.visible = false" centered destroyOnClose> :width="modalInfo.width"
<a-form-model :label-col="{ :visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
centered
destroyOnClose
>
<a-form-model
:label-col="{
span: 5, span: 5,
}" :wrapper-col="{ }"
:wrapper-col="{
span: 19, span: 19,
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules"> }"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="应用名称" prop="appName"> <a-form-model-item label="应用名称" prop="appName">
<a-input v-model="appForm.appName" placeholder="请输入" allowClear /> <a-input v-model="appForm.appName" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="开发语言" prop="deveLanguage"> <a-form-model-item label="开发语言" prop="deveLanguage">
<a-select v-model="appForm.deveLanguage" placeholder="请选择" allowClear> <a-select
<a-select-option v-for="(item, index) of deveLanguage" :key="index" :value="index"> v-model="appForm.deveLanguage"
placeholder="请选择"
allowClear
>
<a-select-option
v-for="(item, index) of deveLanguage"
:key="index"
:value="index"
>
{{ item }} {{ item }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本号" prop="versionNumber"> <a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear /> <a-input
v-model="appForm.versionNumber"
placeholder="请输入"
allowClear
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本信息" prop="versionInfo"> <a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" /> <a-textarea
v-model="appForm.versionInfo"
placeholder="请输入"
:rows="4"
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="应用包" prop="appFileUrl"> <a-form-model-item label="应用包" prop="appFileUrl">
<MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo"> <MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo">
...@@ -32,7 +61,10 @@ ...@@ -32,7 +61,10 @@
</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="reset">重置</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>
...@@ -72,50 +104,86 @@ export default { ...@@ -72,50 +104,86 @@ export default {
}, },
verload: 300, // 单位 M verload: 300, // 单位 M
limit: 1, //限制文件上传数量 limit: 1, //限制文件上传数量
whiteFileList: ["apk"], whiteFileList: ["apk", "jpg", "jpeg", "png", "gif", "bmp"], //只允许上传apk包
}, },
appRules: { appRules: {
appName: [{ required: true, message: "请输入应用名称", trigger: ['blur', 'change'] }], appName: [
deveLanguage: [{ required: true, message: "请选择开发语言", trigger: ['blur', 'change'] }], {
required: true,
message: "请输入应用名称",
trigger: ["blur", "change"],
},
],
deveLanguage: [
{
required: true,
message: "请选择开发语言",
trigger: ["blur", "change"],
},
],
}, },
}; };
}, },
mounted() { mounted() {},
},
methods: { methods: {
reset() {
this.$refs.appForm.resetFields();
this.uploadInfo = {
removeFileList: [], //移除文件列表
fileList: [], //文件列表
multiple: false, //多文件
listType: "text", //text, picture 和 picture-card
prePath: "file/fileupload", //附件存放相对路径 否 不填时候默认为 file/fileupload
objAttach: {
// 其他参数 data
// test: "001",
},
verload: 300, // 单位 M
limit: 1, //限制文件上传数量
whiteFileList: ["apk", "jpg", "jpeg", "png", "gif", "bmp"], //只允许上传apk包
};
},
getInfo(id) { getInfo(id) {
getAppsInfo({ id: id }).then(res => { getAppsInfo({ id: id }).then((res) => {
res.data.isEnable = res.data.isEnable == 1 res.data.isEnable = res.data.isEnable == 1;
this.appForm = res.data res.data.deveLanguage = this.deveLanguage[res.data.deveLanguage];
this.appForm = res.data;
if (res.data.appFileUrl) { if (res.data.appFileUrl) {
this.uploadInfo.fileList = [ this.uploadInfo.fileList = [
{ {
uid: id, uid: id,
name: res.data.appFileUrl, name: res.data.appFileUrl,
url: res.data.appFileUrl, url: res.data.appFileUrl,
},
];
} }
] });
}
})
}, },
Modal_Ok() { Modal_Ok() {
this.$refs.appForm.validate((valid) => { this.$refs.appForm.validate((valid) => {
if (valid) { if (valid) {
let json = JSON.parse(JSON.stringify(this.appForm)) let json = JSON.parse(JSON.stringify(this.appForm));
json.isEnable = json.isEnable ? 1 : 0 json.isEnable = json.isEnable ? 1 : 0;
saveApps(json).then(res => { for (let key in this.deveLanguage) {
let { code, msg } = res this.deveLanguage[key] == json.deveLanguage
? Number((json.deveLanguage = key))
: "";
}
json.productId
? json.productId
: (json.productId = this.$route.query.id);
saveApps(json).then((res) => {
let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('保存成功'); this.$message.success("保存成功");
this.resetForm(); this.resetForm();
this.modalInfo.visible = false this.modalInfo.visible = false;
this.$parent.getList() this.$parent.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
......
...@@ -110,4 +110,3 @@ export default { ...@@ -110,4 +110,3 @@ export default {
} }
} }
</style> </style>
<template> <template>
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title" <a-modal
@cancel="modalInfo.visible = false" centered destroyOnClose> :width="modalInfo.width"
<a-form-model :label-col="{ :visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
centered
destroyOnClose
>
<a-form-model
:label-col="{
span: 4, span: 4,
}" :wrapper-col="{ }"
:wrapper-col="{
span: 20, span: 20,
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules"> }"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="材料名称" prop="docName"> <a-form-model-item label="材料名称" prop="docName">
<a-input v-model="appForm.docName" placeholder="请输入" allowClear /> <a-input v-model="appForm.docName" placeholder="请输入" allowClear />
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本号" prop="versionNumber"> <a-form-model-item label="版本号" prop="versionNumber">
<a-input v-model="appForm.versionNumber" placeholder="请输入" allowClear /> <a-input
v-model="appForm.versionNumber"
placeholder="请输入"
allowClear
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="版本信息" prop="versionInfo"> <a-form-model-item label="版本信息" prop="versionInfo">
<a-textarea v-model="appForm.versionInfo" placeholder="请输入" :rows="4" /> <a-textarea
v-model="appForm.versionInfo"
placeholder="请输入"
:rows="4"
/>
</a-form-model-item> </a-form-model-item>
<a-form-model-item label="材料文件" prop="docFileUrl"> <a-form-model-item label="材料文件" prop="docFileUrl">
<MyUpload v-model="appForm.docFileUrl" :uploadInfo="uploadInfo"> <MyUpload v-model="appForm.docFileUrl" :uploadInfo="uploadInfo">
...@@ -23,7 +44,10 @@ ...@@ -23,7 +44,10 @@
</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="reset">重置</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>
...@@ -46,7 +70,7 @@ export default { ...@@ -46,7 +70,7 @@ export default {
docName: "", docName: "",
versionNumber: "", versionNumber: "",
versionInfo: "", versionInfo: "",
docFileUrl: "" docFileUrl: "",
}, },
uploadInfo: { uploadInfo: {
removeFileList: [], //移除文件列表 removeFileList: [], //移除文件列表
...@@ -61,41 +85,62 @@ export default { ...@@ -61,41 +85,62 @@ export default {
whiteFileList: ["doc", "docx", "pdf", "xlsx", "xls"], whiteFileList: ["doc", "docx", "pdf", "xlsx", "xls"],
}, },
appRules: { appRules: {
docName: [{ required: true, message: "请输入材料名称", trigger: ['blur', 'change'] }], docName: [
{
required: true,
message: "请输入材料名称",
trigger: ["blur", "change"],
},
],
}, },
}; };
}, },
mounted() { }, mounted() {},
methods: { methods: {
reset() {
this.$refs.appForm.resetFields();
this.uploadInfo = {
removeFileList: [], //移除文件列表
fileList: [], //文件列表
defaultFileList: [],
multiple: false, //多文件
listType: "text", //text, picture 和 picture-card
prePath: "file/fileupload", //附件存放相对路径 否 不填时候默认为 file/fileupload
objAttach: {},
verload: 300, // 单位 M
limit: 1, //限制文件上传数量
whiteFileList: ["doc", "docx", "pdf", "xlsx", "xls"],
};
},
getInfo(id) { getInfo(id) {
getDocumentInfo({ id: id }).then(res => { getDocumentInfo({ id: id }).then((res) => {
this.appForm = res.data this.appForm = res.data;
if (res.data.docFileUrl) { if (res.data.docFileUrl) {
this.uploadInfo.fileList = [ this.uploadInfo.fileList = [
{ {
uid: id, uid: id,
name: res.data.docFileUrl, name: res.data.docFileUrl,
url: res.data.docFileUrl, url: res.data.docFileUrl,
},
];
} }
] });
}
})
}, },
Modal_Ok() { Modal_Ok() {
this.$refs.appForm.validate((valid) => { this.$refs.appForm.validate((valid) => {
if (valid) { if (valid) {
saveDocument(this.appForm).then(res => { saveDocument(this.appForm).then((res) => {
let { code, msg } = res let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('保存成功'); this.$message.success("保存成功");
this.resetForm(); this.resetForm();
this.modalInfo.visible = false this.modalInfo.visible = false;
this.$parent.getList() this.$parent.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
} else { } else {
this.$message.error(`请完善表单信息!`); this.$message.error(`请完善表单信息!`);
return false; return false;
......
...@@ -2,24 +2,49 @@ ...@@ -2,24 +2,49 @@
<div class="PoliticsShow-Container"> <div class="PoliticsShow-Container">
<div class="header_box"> <div class="header_box">
<div> <div>
<button class="add_btn" @click="openDetails()"> <a-button type="primary" class="addclass" @click="openDetails()">
<span>新增</span> <span>新增</span>
</button> </a-button>
</div> </div>
<span> <span>
<a-input allowClear v-model="searchName" placeholder="请输入资料名称查询"> <a-input
allowClear
v-model="searchName"
placeholder="请输入资料名称查询"
>
<a-icon slot="prefix" type="search" /> <a-icon slot="prefix" type="search" />
</a-input> </a-input>
<button class="search_btn" @click="getList()">搜索</button> <a-button type="primary" class="addclass" @click="getList()"
>搜索</a-button
>
</span> </span>
</div> </div>
<div class="main"> <div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination" <a-table
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData"> size="small"
bordered
:row-key="(record) => record.id"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record, index"> <template slot="operation" slot-scope="text, record, index">
<a-button type="link" v-if="record.docFileUrl" @click="handleDowload(record.docFileUrl)">下载</a-button> <a-button
type="link"
v-if="record.docFileUrl"
@click="handleDowload(record.docFileUrl)"
>下载</a-button
>
<a-button type="link" @click="openDetails(record)">编辑</a-button> <a-button type="link" @click="openDetails(record)">编辑</a-button>
<a-popconfirm title="确定要删除此应用吗?" ok-text="确定" cancel-text="取消" @confirm="delRow(record)"> <a-popconfirm
title="确定要删除此应用吗?"
ok-text="确定"
cancel-text="取消"
@confirm="delRow(record)"
>
<a-button type="link" style="color: #ff4420">删除</a-button> <a-button type="link" style="color: #ff4420">删除</a-button>
</a-popconfirm> </a-popconfirm>
</template> </template>
...@@ -68,7 +93,8 @@ export default { ...@@ -68,7 +93,8 @@ export default {
title: "上传时间", title: "上传时间",
align: "center", align: "center",
dataIndex: "createTime", dataIndex: "createTime",
customRender: (text, record, index) => this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"), customRender: (text, record, index) =>
this.$moment(text).format("YYYY年MM月DD日 HH:mm:ss"),
}, },
{ {
...@@ -84,7 +110,7 @@ export default { ...@@ -84,7 +110,7 @@ export default {
searchName: undefined, searchName: undefined,
tablePagination: { tablePagination: {
current: 1, current: 1,
pageSize: 10 pageSize: 10,
}, },
}; };
}, },
...@@ -105,49 +131,45 @@ export default { ...@@ -105,49 +131,45 @@ export default {
...search, ...search,
}).then((res) => { }).then((res) => {
if (res.code == 1) { if (res.code == 1) {
let { let { data, total, dict } = res.data;
data,
total,
dict
} = res.data;
this.dict = dict; this.dict = dict;
this.tableSourceData = data; this.tableSourceData = data;
this.tablePagination.total = total; this.tablePagination.total = total;
return data return data;
} }
}) });
}, },
//分页 //分页
pagTableChange(page) { pagTableChange(page) {
this.tablePagination.current = page.current this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize this.tablePagination.pageSize = page.pageSize;
this.getList(); this.getList();
}, },
delRow(item) { delRow(item) {
deleteDocument({ deleteDocument({
id: item.id id: item.id,
}).then((res) => { }).then((res) => {
console.log(res) console.log(res);
let { code, msg } = res let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('删除成功'); this.$message.success("删除成功");
this.getList() this.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
}, },
handleDowload(url) { handleDowload(url) {
let arr = url.split('/') let arr = url.split("/");
const a = document.createElement("a"); const a = document.createElement("a");
a.href = process.env.VUE_APP_API_BASE_URL + '/' + url; a.href = process.env.VUE_APP_API_BASE_URL + "/" + url;
a.download = arr[arr.length - 1]; a.download = arr[arr.length - 1];
a.click(); a.click();
}, },
openDetails(item) { openDetails(item) {
if (item) { if (item) {
this.$refs.Details.modalInfo.title = "编辑材料"; this.$refs.Details.modalInfo.title = "编辑材料";
this.$refs.Details.getInfo(item.id) this.$refs.Details.getInfo(item.id);
} else { } else {
this.$refs.Details.modalInfo.title = "新增材料"; this.$refs.Details.modalInfo.title = "新增材料";
} }
...@@ -170,7 +192,7 @@ export default { ...@@ -170,7 +192,7 @@ export default {
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
&>div { & > div {
display: flex; display: flex;
justify-content: flex-start; justify-content: flex-start;
align-items: center; align-items: center;
...@@ -226,7 +248,7 @@ export default { ...@@ -226,7 +248,7 @@ export default {
} }
} }
&>span { & > span {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
align-items: center; align-items: center;
...@@ -311,13 +333,10 @@ export default { ...@@ -311,13 +333,10 @@ export default {
/deep/.ant-btn-link { /deep/.ant-btn-link {
padding: 0 !important; padding: 0 !important;
&+.ant-btn-link { & + .ant-btn-link {
margin-left: 1rem !important; margin-left: 1rem !important;
} }
} }
} }
} }
</style> </style>
...@@ -110,4 +110,3 @@ export default { ...@@ -110,4 +110,3 @@ export default {
} }
} }
</style> </style>
...@@ -3,28 +3,47 @@ ...@@ -3,28 +3,47 @@
<div class="search_box" ref="search_box"> <div class="search_box" ref="search_box">
<h3>产品管理</h3> <h3>产品管理</h3>
<h4> <h4>
<a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" /> <a-input
placeholder="请输入产品名称关键字查询"
allow-clear
v-model="searchVal"
/>
<button class="search_btn btn" @click="getList"> <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()"> <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, index of listData" :key="index"> <li class="list" v-for="(item, index) of listData" :key="index">
<a-popover placement="leftBottom" trigger="click"> <a-popover placement="leftBottom" trigger="click">
<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(item)"> <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="确定" cancel-text="取消" @confirm="delModal(item)"> <a-popconfirm
title="确定要删除此产品吗?"
ok-text="确定"
cancel-text="取消"
@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>
...@@ -58,44 +77,44 @@ export default { ...@@ -58,44 +77,44 @@ export default {
name: "PortalAdminVueProductManage", name: "PortalAdminVueProductManage",
data() { data() {
return { return {
searchVal: '', searchVal: "",
listData: [] listData: [],
}; };
}, },
components: { components: {
AddEditAppName, AddEditAppName,
}, },
mounted() { mounted() {
this.getList() this.getList();
}, },
methods: { methods: {
delModal(item) { delModal(item) {
deleteProduct({ deleteProduct({
id: item.id id: item.id,
}).then((res) => { }).then((res) => {
let { code, msg } = res let { code, msg } = res;
if (code == 1) { if (code == 1) {
this.$message.success('删除成功'); this.$message.success("删除成功");
this.getList() this.getList();
} else { } else {
this.$message.error(msg); this.$message.error(msg);
} }
}) });
}, },
getList() { getList() {
getProduct({ getProduct({
page: 1, page: 1,
size: -1, size: -1,
productName: this.searchVal productName: this.searchVal,
}).then((res) => { }).then((res) => {
this.listData = res.data.data this.listData = res.data.data;
}) });
}, },
showModal(item) { showModal(item) {
if (item) { if (item) {
this.$refs.AddEditAppName.VisibleTitle = "编辑"; this.$refs.AddEditAppName.VisibleTitle = "编辑";
this.$refs.AddEditAppName.appInfoFome.id = item.id this.$refs.AddEditAppName.appInfoFome.id = item.id;
this.$refs.AddEditAppName.appInfoFome.productName = item.productName this.$refs.AddEditAppName.appInfoFome.productName = item.productName;
} else { } else {
this.$refs.AddEditAppName.VisibleTitle = "新增产品"; this.$refs.AddEditAppName.VisibleTitle = "新增产品";
} }
...@@ -127,7 +146,7 @@ export default { ...@@ -127,7 +146,7 @@ export default {
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.not-data{ .not-data {
line-height: 100px; line-height: 100px;
text-align: center; text-align: center;
width: 100%; width: 100%;
...@@ -160,7 +179,9 @@ export default { ...@@ -160,7 +179,9 @@ export default {
display: flex; display: flex;
align-items: center; align-items: center;
} }
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
/deep/.ant-input { /deep/.ant-input {
width: 30rem !important; width: 30rem !important;
margin-right: 2rem; margin-right: 2rem;
...@@ -187,7 +208,7 @@ export default { ...@@ -187,7 +208,7 @@ export default {
padding: 0; padding: 0;
border: none; border: none;
&>span { & > span {
position: relative; position: relative;
display: block; display: block;
width: 100%; width: 100%;
...@@ -231,8 +252,8 @@ export default { ...@@ -231,8 +252,8 @@ export default {
width: 100%; width: 100%;
} }
&>span:before, & > span:before,
&>span:after { & > span:after {
position: absolute; position: absolute;
content: ""; content: "";
left: 0; left: 0;
...@@ -245,21 +266,21 @@ export default { ...@@ -245,21 +266,21 @@ export default {
transition: all 0.3s ease; transition: all 0.3s ease;
} }
&>span:before { & > span:before {
width: 2px; width: 2px;
height: 0%; height: 0%;
} }
&>span:after { & > span:after {
height: 2px; height: 2px;
width: 0%; width: 0%;
} }
&>span:hover:before { & > span:hover:before {
height: 100%; height: 100%;
} }
&>span:hover:after { & > span:hover:after {
width: 100%; width: 100%;
} }
} }
...@@ -274,17 +295,17 @@ export default { ...@@ -274,17 +295,17 @@ export default {
border: 1px solid #d7dae2; border: 1px solid #d7dae2;
overflow: hidden; overflow: hidden;
&>.add_btn { & > .add_btn {
margin: 15px; margin: 15px;
} }
&>.content { & > .content {
display: flex; display: flex;
flex-wrap: wrap; flex-wrap: wrap;
border-top: 1px solid #d7dae2; border-top: 1px solid #d7dae2;
border-bottom: 1px solid #d7dae2; border-bottom: 1px solid #d7dae2;
&>.list { & > .list {
width: 25%; width: 25%;
padding: 15px; padding: 15px;
display: flex; display: flex;
...@@ -293,7 +314,7 @@ export default { ...@@ -293,7 +314,7 @@ export default {
border-right: 1px solid #d7dae2; border-right: 1px solid #d7dae2;
border-bottom: 1px solid #d7dae2; border-bottom: 1px solid #d7dae2;
&>.app-operation { & > .app-operation {
margin: 8px 0; margin: 8px 0;
height: 25px; height: 25px;
width: 25px; width: 25px;
...@@ -304,7 +325,7 @@ export default { ...@@ -304,7 +325,7 @@ export default {
cursor: pointer; cursor: pointer;
} }
&>.app-img { & > .app-img {
width: 108px; width: 108px;
height: 108px; height: 108px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1); box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
...@@ -312,14 +333,14 @@ export default { ...@@ -312,14 +333,14 @@ export default {
border-radius: 6px; border-radius: 6px;
} }
&>.app-name { & > .app-name {
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
text-align: center; text-align: center;
margin: 8px 0; margin: 8px 0;
} }
&>.app-option { & > .app-option {
margin: 8px 0; margin: 8px 0;
color: #0595fd; color: #0595fd;
display: flex; display: flex;
...@@ -327,7 +348,7 @@ export default { ...@@ -327,7 +348,7 @@ export default {
align-items: center; align-items: center;
font-size: 14px; font-size: 14px;
&>li { & > li {
cursor: pointer; cursor: pointer;
} }
} }
...@@ -341,15 +362,21 @@ export default { ...@@ -341,15 +362,21 @@ export default {
width: 100%; width: 100%;
height: @headerH; height: @headerH;
background: rgb(59, 135, 255); background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg, background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
background: -webkit-linear-gradient(174deg, );
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%); rgba(108, 53, 247, 1) 85%
background: linear-gradient(174deg, );
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%, rgba(59, 135, 255, 1) 24%,
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);
} }
} }
......
...@@ -1608,7 +1608,7 @@ ...@@ -1608,7 +1608,7 @@
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7": "@vue/vue-loader-v15@npm:vue-loader@^15.9.7":
version "15.10.1" version "15.10.1"
resolved "https://registry.npmmirror.com/vue-loader/-/vue-loader-15.10.1.tgz" resolved "https://registry.npmjs.org/vue-loader/-/vue-loader-15.10.1.tgz"
integrity sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA== integrity sha512-SaPHK1A01VrNthlix6h1hq4uJu7S/z0kdLUb6klubo738NeQoLbS6V9/d8Pv19tU0XdQKju3D1HSKuI8wJ5wMA==
dependencies: dependencies:
"@vue/component-compiler-utils" "^3.1.0" "@vue/component-compiler-utils" "^3.1.0"
...@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3: ...@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3:
vue-hot-reload-api@^2.3.0: vue-hot-reload-api@^2.3.0:
version "2.3.4" version "2.3.4"
resolved "https://registry.npmmirror.com/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz" resolved "https://registry.npmjs.org/vue-hot-reload-api/-/vue-hot-reload-api-2.3.4.tgz"
integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog== integrity sha512-BXq3jwIagosjgNVae6tkHzzIk6a8MHFtzAdwhnV5VlvPTFxDCvIttgSiHWjdGoTJvXtmRu5HacExfdarRcFhog==
vue-loader@^17.0.0: vue-loader@^17.0.0:
......
...@@ -84,3 +84,6 @@ CREATE TABLE `mortals_xhx_product_document` ( ...@@ -84,3 +84,6 @@ CREATE TABLE `mortals_xhx_product_document` (
`updateTime` datetime DEFAULT NULL COMMENT '更新时间', `updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`) PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品资料表'; ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='产品资料表';
ALTER TABLE `mortals_xhx_product_interface` ADD COLUMN `normalResponse` text DEFAULT NULL COMMENT '正常返回示例' AFTER `remark`,
ADD COLUMN `abnormalResponse` text DEFAULT NULL COMMENT '异常返回示例' AFTER `normalResponse`;
package com.mortals.xhx.module.product.model; package com.mortals.xhx.module.product.model;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo; import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
import lombok.Data;
/** /**
* 产品接口实体对象 * 产品接口实体对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-05-29
*/ */
@Data
public class ProductInterfaceEntity extends ProductInterfaceVo { public class ProductInterfaceEntity extends ProductInterfaceVo {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
...@@ -83,266 +83,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -83,266 +83,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 接口描述 * 接口描述
*/ */
private String remark; private String remark;
public ProductInterfaceEntity(){}
/**
* 获取 产品id
* @return Long
*/
public Long getProductId(){
return productId;
}
/**
* 设置 产品id
* @param productId
*/
public void setProductId(Long productId){
this.productId = productId;
}
/**
* 获取 接口名称
* @return String
*/
public String getInterfaceName(){
return interfaceName;
}
/**
* 设置 接口名称
* @param interfaceName
*/
public void setInterfaceName(String interfaceName){
this.interfaceName = interfaceName;
}
/**
* 获取 版本号
* @return String
*/
public String getVersionNumber(){
return versionNumber;
}
/**
* 设置 版本号
* @param versionNumber
*/
public void setVersionNumber(String versionNumber){
this.versionNumber = versionNumber;
}
/** /**
* 获取 请求类型1:POST,2:GET * 正常返回示例
* @return Integer
*/ */
public Integer getRequestType(){ private String normalResponse;
return requestType;
}
/**
* 设置 请求类型1:POST,2:GET
* @param requestType
*/
public void setRequestType(Integer requestType){
this.requestType = requestType;
}
/**
* 获取 请求协议1:HTTP,2:HTTPS
* @return Integer
*/
public Integer getRequestProtocol(){
return requestProtocol;
}
/** /**
* 设置 请求协议1:HTTP,2:HTTPS * 异常返回示例
* @param requestProtocol
*/ */
public void setRequestProtocol(Integer requestProtocol){ private String abnormalResponse;
this.requestProtocol = requestProtocol;
}
/**
* 获取 请求路径
* @return String
*/
public String getRequestUrl(){
return requestUrl;
}
/**
* 设置 请求路径
* @param requestUrl
*/
public void setRequestUrl(String requestUrl){
this.requestUrl = requestUrl;
}
/**
* 获取 超时时间(秒)
* @return Long
*/
public Long getTimeoutValue(){
return timeoutValue;
}
/**
* 设置 超时时间(秒)
* @param timeoutValue
*/
public void setTimeoutValue(Long timeoutValue){
this.timeoutValue = timeoutValue;
}
/**
* 获取 限流策略1:分钟,2:小时
* @return Integer
*/
public Integer getLimitStrategy(){
return limitStrategy;
}
/**
* 设置 限流策略1:分钟,2:小时
* @param limitStrategy
*/
public void setLimitStrategy(Integer limitStrategy){
this.limitStrategy = limitStrategy;
}
/**
* 获取 访问网络1互联网2政务网
* @return String
*/
public String getNetwork(){
return network;
}
/**
* 设置 访问网络1互联网2政务网
* @param network
*/
public void setNetwork(String network){
this.network = network;
}
/**
* 获取 接口描述
* @return String
*/
public String getDescription(){
return description;
}
/**
* 设置 接口描述
* @param description
*/
public void setDescription(String description){
this.description = description;
}
/**
* 获取 内容类型
* @return String
*/
public String getContentType(){
return contentType;
}
/**
* 设置 内容类型
* @param contentType
*/
public void setContentType(String contentType){
this.contentType = contentType;
}
/**
* 获取 标签
* @return Integer
*/
public Integer getInterfaceTag(){
return interfaceTag;
}
/**
* 设置 标签
* @param interfaceTag
*/
public void setInterfaceTag(Integer interfaceTag){
this.interfaceTag = interfaceTag;
}
/**
* 获取 来源1自有2非自有
* @return Integer
*/
public Integer getInterfaceSource(){
return interfaceSource;
}
/**
* 设置 来源1自有2非自有
* @param interfaceSource
*/
public void setInterfaceSource(Integer interfaceSource){
this.interfaceSource = interfaceSource;
}
/**
* 获取 入参是否加密
* @return Integer
*/
public Integer getInEncrypt(){
return inEncrypt;
}
/**
* 设置 入参是否加密
* @param inEncrypt
*/
public void setInEncrypt(Integer inEncrypt){
this.inEncrypt = inEncrypt;
}
/**
* 获取 请求参数
* @return String
*/
public String getRequestParameters(){
return requestParameters;
}
/**
* 设置 请求参数
* @param requestParameters
*/
public void setRequestParameters(String requestParameters){
this.requestParameters = requestParameters;
}
/**
* 获取 出参是否加密
* @return Integer
*/
public Integer getOutEncrypt(){
return outEncrypt;
}
/**
* 设置 出参是否加密
* @param outEncrypt
*/
public void setOutEncrypt(Integer outEncrypt){
this.outEncrypt = outEncrypt;
}
/**
* 获取 响应数据
* @return String
*/
public String getResponseParameters(){
return responseParameters;
}
/**
* 设置 响应数据
* @param responseParameters
*/
public void setResponseParameters(String responseParameters){
this.responseParameters = responseParameters;
}
/**
* 获取 接口描述
* @return String
*/
public String getRemark(){
return remark;
}
/**
* 设置 接口描述
* @param remark
*/
public void setRemark(String remark){
this.remark = remark;
}
@Override @Override
public int hashCode() { public int hashCode() {
return this.getId().hashCode(); return this.getId().hashCode();
...@@ -359,32 +107,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -359,32 +107,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
return false; return false;
} }
public String toString(){
StringBuilder sb = new StringBuilder("");
sb.append(",productId:").append(getProductId());
sb.append(",interfaceName:").append(getInterfaceName());
sb.append(",versionNumber:").append(getVersionNumber());
sb.append(",requestType:").append(getRequestType());
sb.append(",requestProtocol:").append(getRequestProtocol());
sb.append(",requestUrl:").append(getRequestUrl());
sb.append(",timeoutValue:").append(getTimeoutValue());
sb.append(",limitStrategy:").append(getLimitStrategy());
sb.append(",network:").append(getNetwork());
sb.append(",description:").append(getDescription());
sb.append(",contentType:").append(getContentType());
sb.append(",interfaceTag:").append(getInterfaceTag());
sb.append(",interfaceSource:").append(getInterfaceSource());
sb.append(",inEncrypt:").append(getInEncrypt());
sb.append(",requestParameters:").append(getRequestParameters());
sb.append(",outEncrypt:").append(getOutEncrypt());
sb.append(",responseParameters:").append(getResponseParameters());
sb.append(",remark:").append(getRemark());
return sb.toString();
}
public void initAttrValue(){ public void initAttrValue(){
this.productId = null; this.productId = -1L;
this.interfaceName = ""; this.interfaceName = "";
...@@ -396,9 +121,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -396,9 +121,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.requestUrl = ""; this.requestUrl = "";
this.timeoutValue = null; this.timeoutValue = -1L;
this.limitStrategy = null; this.limitStrategy = -1;
this.network = ""; this.network = "";
...@@ -406,18 +131,22 @@ public class ProductInterfaceEntity extends ProductInterfaceVo { ...@@ -406,18 +131,22 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.contentType = ""; this.contentType = "";
this.interfaceTag = null; this.interfaceTag = -1;
this.interfaceSource = 1; this.interfaceSource = 1;
this.inEncrypt = null; this.inEncrypt = -1;
this.requestParameters = ""; this.requestParameters = "";
this.outEncrypt = null; this.outEncrypt = -1;
this.responseParameters = ""; this.responseParameters = "";
this.remark = ""; this.remark = "";
this.normalResponse = "";
this.abnormalResponse = "";
} }
} }
\ No newline at end of file
...@@ -5,7 +5,7 @@ import java.util.List; ...@@ -5,7 +5,7 @@ import java.util.List;
* 产品接口查询对象 * 产品接口查询对象
* *
* @author zxfei * @author zxfei
* @date 2023-05-16 * @date 2023-05-29
*/ */
public class ProductInterfaceQuery extends ProductInterfaceEntity { public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */ /** 开始 序号,主键,自增长 */
...@@ -245,6 +245,16 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -245,6 +245,16 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 结束 更新时间 */ /** 结束 更新时间 */
private String updateTimeEnd; private String updateTimeEnd;
/** 正常返回示例 */
private List<String> normalResponseList;
/** 正常返回示例排除列表 */
private List <String> normalResponseNotList;
/** 异常返回示例 */
private List<String> abnormalResponseList;
/** 异常返回示例排除列表 */
private List <String> abnormalResponseNotList;
/** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */ /** OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) */
private List<ProductInterfaceQuery> orConditionList; private List<ProductInterfaceQuery> orConditionList;
...@@ -1577,6 +1587,70 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -1577,6 +1587,70 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
this.updateTimeEnd = updateTimeEnd; this.updateTimeEnd = updateTimeEnd;
} }
/**
* 获取 正常返回示例
* @return normalResponseList
*/
public List<String> getNormalResponseList(){
return this.normalResponseList;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public void setNormalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
}
/**
* 获取 正常返回示例
* @return normalResponseNotList
*/
public List<String> getNormalResponseNotList(){
return this.normalResponseNotList;
}
/**
* 设置 正常返回示例
* @param normalResponseNotList
*/
public void setNormalResponseNotList(List<String> normalResponseNotList){
this.normalResponseNotList = normalResponseNotList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseList
*/
public List<String> getAbnormalResponseList(){
return this.abnormalResponseList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public void setAbnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
}
/**
* 获取 异常返回示例
* @return abnormalResponseNotList
*/
public List<String> getAbnormalResponseNotList(){
return this.abnormalResponseNotList;
}
/**
* 设置 异常返回示例
* @param abnormalResponseNotList
*/
public void setAbnormalResponseNotList(List<String> abnormalResponseNotList){
this.abnormalResponseNotList = abnormalResponseNotList;
}
/** /**
* 设置 序号,主键,自增长 * 设置 序号,主键,自增长
* @param id * @param id
...@@ -2398,6 +2472,44 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity { ...@@ -2398,6 +2472,44 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
} }
/**
* 设置 正常返回示例
* @param normalResponse
*/
public ProductInterfaceQuery normalResponse(String normalResponse){
setNormalResponse(normalResponse);
return this;
}
/**
* 设置 正常返回示例
* @param normalResponseList
*/
public ProductInterfaceQuery normalResponseList(List<String> normalResponseList){
this.normalResponseList = normalResponseList;
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponse
*/
public ProductInterfaceQuery abnormalResponse(String abnormalResponse){
setAbnormalResponse(abnormalResponse);
return this;
}
/**
* 设置 异常返回示例
* @param abnormalResponseList
*/
public ProductInterfaceQuery abnormalResponseList(List<String> abnormalResponseList){
this.abnormalResponseList = abnormalResponseList;
return this;
}
/** /**
* 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4) * 获取 OR条件集合,列表项之间是OR,项内容之间是AND,如:(list[0].1 and list[0].2) or (list[1].3 and list[1].4)
* @return orConditionList * @return orConditionList
......
package com.mortals.xhx.module.product.model.vo; package com.mortals.xhx.module.product.model.vo;
import com.mortals.framework.model.BaseEntityLong; import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.ProductAppsEntity;
import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* 协议管理视图对象 * 协议管理视图对象
...@@ -10,5 +9,27 @@ import java.util.List; ...@@ -10,5 +9,27 @@ import java.util.List;
* @date 2023-02-22 * @date 2023-02-22
*/ */
public class ProductAppsVo extends BaseEntityLong { public class ProductAppsVo extends BaseEntityLong {
/**
* 产品名称
*/
private String productName;
/** 产品id列表 */
private List <Long> productIdList;
public String getProductName() {
return productName;
}
public void setProductName(String productName) {
this.productName = productName;
}
public List<Long> getProductIdList() {
return productIdList;
}
public void setProductIdList(List<Long> productIdList) {
this.productIdList = productIdList;
}
} }
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl; package com.mortals.xhx.module.product.service.impl;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
import com.mortals.framework.model.Context; import com.mortals.framework.model.Context;
import com.mortals.framework.model.PageInfo;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.util.StringUtils;
import com.mortals.xhx.module.product.dao.ProductAppsDao; import com.mortals.xhx.module.product.dao.ProductAppsDao;
import com.mortals.xhx.module.product.model.ProductAppsEntity; import com.mortals.xhx.module.product.model.ProductAppsEntity;
import com.mortals.xhx.module.product.model.ProductEntity;
import com.mortals.xhx.module.product.model.ProductQuery;
import com.mortals.xhx.module.product.service.ProductAppsService; import com.mortals.xhx.module.product.service.ProductAppsService;
import com.mortals.xhx.module.product.service.ProductService;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.ArrayList;
import java.util.List;
/** /**
* ProductAppsService * ProductAppsService
* 产品应用 service实现 * 产品应用 service实现
...@@ -16,4 +27,44 @@ import com.mortals.xhx.module.product.service.ProductAppsService; ...@@ -16,4 +27,44 @@ import com.mortals.xhx.module.product.service.ProductAppsService;
@Service("productAppsService") @Service("productAppsService")
public class ProductAppsServiceImpl extends AbstractCRUDServiceImpl<ProductAppsDao, ProductAppsEntity, Long> implements ProductAppsService { public class ProductAppsServiceImpl extends AbstractCRUDServiceImpl<ProductAppsDao, ProductAppsEntity, Long> implements ProductAppsService {
@Autowired
private ProductService productService;
@Override
protected void validData(ProductAppsEntity entity, Context context) throws AppException {
if(entity.getProductId()==null){
throw new AppException("产品id不能为空");
}
if(StringUtils.isEmpty(entity.getAppName())){
throw new AppException("应用名称不能为空");
}
if(entity.getDeveLanguage()==null){
throw new AppException("开发语言不能为空");
}
}
@Override
protected ProductAppsEntity findBefore(ProductAppsEntity params, PageInfo pageInfo, Context context) throws AppException {
if(params.getProductId()==null) {
List<ProductEntity> productList = productService.find(new ProductQuery());
List<Long> productIdList = new ArrayList<>();
for (ProductEntity item : productList) {
productIdList.add(item.getId());
}
params.setProductIdList(productIdList);
}
return params;
}
@Override
protected void findAfter(ProductAppsEntity params, PageInfo pageInfo, Context context, List<ProductAppsEntity> list) throws AppException {
if(CollectionUtils.isNotEmpty(list)){
for(ProductAppsEntity item:list){
ProductEntity productEntity = productService.get(item.getProductId());
if(productEntity!=null){
item.setProductName(productEntity.getProductName());
}
}
}
}
} }
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl; package com.mortals.xhx.module.product.service.impl;
import com.mortals.framework.util.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -16,4 +17,13 @@ import com.mortals.xhx.module.product.service.ProductDocumentService; ...@@ -16,4 +17,13 @@ import com.mortals.xhx.module.product.service.ProductDocumentService;
@Service("productDocumentService") @Service("productDocumentService")
public class ProductDocumentServiceImpl extends AbstractCRUDServiceImpl<ProductDocumentDao, ProductDocumentEntity, Long> implements ProductDocumentService { public class ProductDocumentServiceImpl extends AbstractCRUDServiceImpl<ProductDocumentDao, ProductDocumentEntity, Long> implements ProductDocumentService {
@Override
protected void validData(ProductDocumentEntity entity, Context context) throws AppException {
if(entity.getProductId()==null){
throw new AppException("产品id不能为空");
}
if(StringUtils.isEmpty(entity.getDocName())){
throw new AppException("文档名称不能为空");
}
}
} }
\ No newline at end of file
package com.mortals.xhx.module.product.service.impl; package com.mortals.xhx.module.product.service.impl;
import com.mortals.framework.util.StringUtils;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl; import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException; import com.mortals.framework.exception.AppException;
...@@ -16,4 +17,16 @@ import com.mortals.xhx.module.product.service.ProductInterfaceService; ...@@ -16,4 +17,16 @@ import com.mortals.xhx.module.product.service.ProductInterfaceService;
@Service("productInterfaceService") @Service("productInterfaceService")
public class ProductInterfaceServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceDao, ProductInterfaceEntity, Long> implements ProductInterfaceService { public class ProductInterfaceServiceImpl extends AbstractCRUDServiceImpl<ProductInterfaceDao, ProductInterfaceEntity, Long> implements ProductInterfaceService {
@Override
protected void validData(ProductInterfaceEntity entity, Context context) throws AppException {
if(entity.getProductId()==null){
throw new AppException("产品id不能为空");
}
if(StringUtils.isEmpty(entity.getInterfaceName())){
throw new AppException("接口名称不能为空");
}
if(StringUtils.isEmpty(entity.getVersionNumber())){
throw new AppException("版本号不能为空");
}
}
} }
\ No newline at end of file
...@@ -28,6 +28,8 @@ ...@@ -28,6 +28,8 @@
<result property="createTime" column="createTime" /> <result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" /> <result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" /> <result property="updateTime" column="updateTime" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
</resultMap> </resultMap>
...@@ -104,23 +106,29 @@ ...@@ -104,23 +106,29 @@
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))"> <if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('updateTime') or colPickMode == 1 and data.containsKey('updateTime')))">
a.updateTime, a.updateTime,
</if> </if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('normalResponse') or colPickMode == 1 and data.containsKey('normalResponse')))">
a.normalResponse,
</if>
<if test="(data == null) or (data != null and ( colPickMode == 0 and !data.containsKey('abnormalResponse') or colPickMode == 1 and data.containsKey('abnormalResponse')))">
a.abnormalResponse,
</if>
</trim> </trim>
</sql> </sql>
<!-- 新增 区分主键自增加还是业务插入 --> <!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id"> <insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id">
insert into mortals_xhx_product_interface insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime) (productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse)
VALUES VALUES
(#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime}) (#{productId},#{interfaceName},#{versionNumber},#{requestType},#{requestProtocol},#{requestUrl},#{timeoutValue},#{limitStrategy},#{network},#{description},#{contentType},#{interfaceTag},#{interfaceSource},#{inEncrypt},#{requestParameters},#{outEncrypt},#{responseParameters},#{remark},#{createUserId},#{createTime},#{updateUserId},#{updateTime},#{normalResponse},#{abnormalResponse})
</insert> </insert>
<!-- 批量新增 --> <!-- 批量新增 -->
<insert id="insertBatch" parameterType="paramDto"> <insert id="insertBatch" parameterType="paramDto">
insert into mortals_xhx_product_interface insert into mortals_xhx_product_interface
(productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime) (productId,interfaceName,versionNumber,requestType,requestProtocol,requestUrl,timeoutValue,limitStrategy,network,description,contentType,interfaceTag,interfaceSource,inEncrypt,requestParameters,outEncrypt,responseParameters,remark,createUserId,createTime,updateUserId,updateTime,normalResponse,abnormalResponse)
VALUES VALUES
<foreach collection="data.dataList" item="item" index="index" separator="," > <foreach collection="data.dataList" item="item" index="index" separator="," >
(#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime}) (#{item.productId},#{item.interfaceName},#{item.versionNumber},#{item.requestType},#{item.requestProtocol},#{item.requestUrl},#{item.timeoutValue},#{item.limitStrategy},#{item.network},#{item.description},#{item.contentType},#{item.interfaceTag},#{item.interfaceSource},#{item.inEncrypt},#{item.requestParameters},#{item.outEncrypt},#{item.responseParameters},#{item.remark},#{item.createUserId},#{item.createTime},#{item.updateUserId},#{item.updateTime},#{item.normalResponse},#{item.abnormalResponse})
</foreach> </foreach>
</insert> </insert>
...@@ -229,6 +237,12 @@ ...@@ -229,6 +237,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))"> <if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime}, a.updateTime=#{data.updateTime},
</if> </if>
<if test="(colPickMode==0 and data.containsKey('normalResponse')) or (colPickMode==1 and !data.containsKey('normalResponse'))">
a.normalResponse=#{data.normalResponse},
</if>
<if test="(colPickMode==0 and data.containsKey('abnormalResponse')) or (colPickMode==1 and !data.containsKey('abnormalResponse'))">
a.abnormalResponse=#{data.abnormalResponse},
</if>
</trim> </trim>
<trim suffixOverrides="where" suffix=""> <trim suffixOverrides="where" suffix="">
where where
...@@ -450,6 +464,20 @@ ...@@ -450,6 +464,20 @@
</if> </if>
</foreach> </foreach>
</trim> </trim>
<trim prefix="normalResponse=(case" suffix="ELSE normalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('normalResponse')) or (colPickMode==1 and !item.containsKey('normalResponse'))">
when a.id=#{item.id} then #{item.normalResponse}
</if>
</foreach>
</trim>
<trim prefix="abnormalResponse=(case" suffix="ELSE abnormalResponse end),">
<foreach collection="data.dataList" item="item" index="index" separator="" >
<if test="(colPickMode==0 and item.containsKey('abnormalResponse')) or (colPickMode==1 and !item.containsKey('abnormalResponse'))">
when a.id=#{item.id} then #{item.abnormalResponse}
</if>
</foreach>
</trim>
</trim> </trim>
where id in where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")"> <foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
...@@ -1109,6 +1137,48 @@ ...@@ -1109,6 +1137,48 @@
<if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''"> <if test="conditionParamRef.containsKey('updateTimeEnd') and conditionParamRef.updateTimeEnd != null and conditionParamRef.updateTimeEnd!=''">
${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s') ${_conditionType_} a.updateTime <![CDATA[ <= ]]> STR_TO_DATE(left(concat(#{${_conditionParam_}.updateTimeEnd},' 23:59:59'),19),'%Y-%m-%d %k:%i:%s')
</if> </if>
<if test="conditionParamRef.containsKey('normalResponse')">
<if test="conditionParamRef.normalResponse != null and conditionParamRef.normalResponse != ''">
${_conditionType_} a.normalResponse like #{${_conditionParam_}.normalResponse}
</if>
<if test="conditionParamRef.normalResponse == null">
${_conditionType_} a.normalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('normalResponseList') and conditionParamRef.normalResponseList.size() > 0">
${_conditionType_} a.normalResponse in
<foreach collection="conditionParamRef.normalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('normalResponseNotList') and conditionParamRef.normalResponseNotList.size() > 0">
${_conditionType_} a.normalResponse not in
<foreach collection="conditionParamRef.normalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponse')">
<if test="conditionParamRef.abnormalResponse != null and conditionParamRef.abnormalResponse != ''">
${_conditionType_} a.abnormalResponse like #{${_conditionParam_}.abnormalResponse}
</if>
<if test="conditionParamRef.abnormalResponse == null">
${_conditionType_} a.abnormalResponse is null
</if>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseList') and conditionParamRef.abnormalResponseList.size() > 0">
${_conditionType_} a.abnormalResponse in
<foreach collection="conditionParamRef.abnormalResponseList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
<if test="conditionParamRef.containsKey('abnormalResponseNotList') and conditionParamRef.abnormalResponseNotList.size() > 0">
${_conditionType_} a.abnormalResponse not in
<foreach collection="conditionParamRef.abnormalResponseNotList" open="(" close=")" index="index" item="item" separator=",">
#{item}
</foreach>
</if>
</sql> </sql>
<sql id="_orderCols_"> <sql id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()"> <if test="orderColList != null and !orderColList.isEmpty()">
...@@ -1237,6 +1307,16 @@ ...@@ -1237,6 +1307,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if> <if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</if>
, ,
</if> </if>
<if test="orderCol.containsKey('normalResponse')">
a.normalResponse
<if test='orderCol.normalResponse != null and "DESC".equalsIgnoreCase(orderCol.normalResponse)'>DESC</if>
,
</if>
<if test="orderCol.containsKey('abnormalResponse')">
a.abnormalResponse
<if test='orderCol.abnormalResponse != null and "DESC".equalsIgnoreCase(orderCol.abnormalResponse)'>DESC</if>
,
</if>
</trim> </trim>
</if> </if>
</sql> </sql>
......
...@@ -8,6 +8,9 @@ ...@@ -8,6 +8,9 @@
"portal-test": { "portal-test": {
"baseUrl": "http://192.168.0.98:11078/zwfw" "baseUrl": "http://192.168.0.98:11078/zwfw"
}, },
"portal-test1": {
"baseUrl": "http://8.136.255.30:11078/zwfw"
},
"portal-yibin": { "portal-yibin": {
"baseUrl": "http://10.12.185.213:11078/zwfw" "baseUrl": "http://10.12.185.213:11078/zwfw"
}, },
......
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