Commit 7d3d4c7c authored by “yiyousong”'s avatar “yiyousong”
parents 6e8a25cf 97863118
......@@ -5572,19 +5572,28 @@ deptAbb|String|部门简称|否|-
deptNumber|String|部门编号|否|-
filter|Integer|是否过滤没有事项的部门(0.否,1.是)|否|-
isBkb|Integer|背靠背展示 (0.否,1.是)|否|-
orderColList| arrays |否|排序列表字段
 | object |否|排序列表对象
  colName| String |否|排序列名
  sortKind| String |否|排序方式(asc:升序,desc:降序,默认升序)
**请求样例:**
```
{
"name":"8xbeej",
"deptAbb":"lk7pnx",
"deptNumber":"jjfxah",
"page":1,
"size":10
}
{
"siteId":1,
"isWorkGuide":1,
"filter":1,
"page":1,
"source":0,
"size":-1,
"orderColList":[
{
"colName":"sort",
"sortKind":"desc"
}
]
}
```
**响应参数:**
......@@ -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 {
SiteService siteService = SpringUtils.getBean(SiteService.class);
List<SiteTreeSelect> siteTreeSelects = siteService.siteTree(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;
import com.mortals.xhx.module.business.model.BusinessEntity;
import com.mortals.xhx.module.business.service.BusinessService;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -21,31 +22,30 @@ import java.util.HashMap;
import java.util.Map;
/**
*
* 站点业务
*
* @author zxfei
* @date 2022-01-13
*/
* 站点业务
*
* @author zxfei
* @date 2022-01-13
*/
@RestController
@RequestMapping("business")
public class BusinessController extends BaseCRUDJsonBodyMappingController<BusinessService,BusinessEntity,Long> {
public class BusinessController extends BaseCRUDJsonBodyMappingController<BusinessService, BusinessEntity, Long> {
@Autowired
private ParamService paramService;
public BusinessController(){
super.setModuleDesc( "站点业务");
public BusinessController() {
super.setModuleDesc("站点业务");
}
@Override
protected void init( Map<String, Object> model, Context context) {
this.addDict(model, "isBusiness", paramService.getParamBySecondOrganize("Business","isBusiness"));
this.addDict(model, "canorder", paramService.getParamBySecondOrganize("Business","canorder"));
this.addDict(model, "cantake", paramService.getParamBySecondOrganize("Business","cantake"));
this.addDict(model, "datashow", paramService.getParamBySecondOrganize("Business","datashow"));
this.addDict(model, "status", paramService.getParamBySecondOrganize("Business","status"));
this.addDict(model, "businessType", paramService.getParamBySecondOrganize("Business","businessType"));
protected void init(Map<String, Object> model, Context context) {
this.addDict(model, "isBusiness", paramService.getParamBySecondOrganize("Business", "isBusiness"));
this.addDict(model, "canorder", paramService.getParamBySecondOrganize("Business", "canorder"));
this.addDict(model, "cantake", paramService.getParamBySecondOrganize("Business", "cantake"));
this.addDict(model, "datashow", paramService.getParamBySecondOrganize("Business", "datashow"));
this.addDict(model, "status", paramService.getParamBySecondOrganize("Business", "status"));
this.addDict(model, "businessType", paramService.getParamBySecondOrganize("Business", "businessType"));
super.init(model, context);
}
......@@ -63,10 +63,10 @@ public class BusinessController extends BaseCRUDJsonBodyMappingController<Busine
public String addBusinessToSite(@RequestBody Map<String, Object> map) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String businessIds=(String)map.get("businessIds");
Long siteId= DataUtil.converObj2Long(map.get("siteId"));
String businessIds = (String) map.get("businessIds");
Long siteId = DataUtil.converObj2Long(map.get("siteId"));
try {
this.service.addBusinessToSite(businessIds,siteId,getContext());
this.service.addBusinessToSite(businessIds, siteId, getContext());
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "添加业务到站点成功!");
......@@ -79,7 +79,6 @@ 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());
model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!");
......
......@@ -57,12 +57,6 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
private MattersDeptService mattersDeptService;
@Autowired
private WindowService windowService;
@Autowired
private BusinessService businessService;
@Autowired
private SiteBusinessService siteBusinessService;
@Autowired
private WindowBusinessService windowBusinessService;
@Override
......@@ -70,22 +64,38 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
return data.getDeptNumber();
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void validData(DeptEntity entity, Context context) throws AppException {
super.validData(entity, context);
//校验部门编码是否重复
protected void saveBefore(DeptEntity entity, Context context) throws AppException {
super.saveBefore(entity, context);
//新增校验部门编码是否重复
DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache) && SourceEnum.自定义.getValue() == entity.getSource()) {
if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
}
}
/**
* @param entity
* @param context
* @throws AppException
*/
@Override
protected void updateBefore(DeptEntity entity, Context context) throws AppException {
super.updateBefore(entity, context);
DeptEntity beforeEntity = this.get(entity.getId(), context);
if(!beforeEntity.getDeptNumber().equals(entity.getDeptNumber())){
DeptEntity extCache = this.getExtCache(entity.getDeptNumber());
if (!ObjectUtils.isEmpty(extCache)) {
throw new AppException("部门编码重复!deptCode:" + extCache.getDeptNumber());
}
}
}
@Override
public void syncDept(String areaCode, Context context) {
List<MattersDeptEntity> deptList = mattersDeptService.find(new MattersDeptQuery());
......@@ -126,7 +136,7 @@ public class DeptServiceImpl extends AbstractCRUDCacheServiceImpl<DeptDao, DeptE
String deptCode = item.getKey();
String deptName = item.getValue();
DeptEntity deptEntity = deptService.getExtCache(deptCode);
// DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
// DeptEntity deptEntity = deptService.selectOne(new DeptQuery().siteId(siteId).deptNumber(deptCode), context);
if (ObjectUtils.isEmpty(deptEntity)) {
deptEntity = new DeptEntity();
deptEntity.initAttrValue();
......
......@@ -9,6 +9,7 @@ import com.mortals.framework.model.OrderCol;
import com.mortals.framework.util.DataUtil;
import com.mortals.framework.web.BaseCRUDJsonBodyMappingController;
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.module.business.model.BusinessEntity;
import com.mortals.xhx.module.dept.model.DeptEntity;
......@@ -53,14 +54,18 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
@Override
protected void doListBefore(DeptEntity query, Map<String, Object> model, Context context) throws AppException {
query.setOrderColList(new ArrayList<OrderCol>() {
{
add(new OrderCol("a.sort", OrderCol.ASCENDING));
add(new OrderCol("a.createTime", OrderCol.ASCENDING));
}
});
if(!ObjectUtils.isEmpty(query.getFilter())&& YesNoEnum.YES.getValue()==query.getFilter()){
if (ObjectUtils.isEmpty(query.getOrderColList())) {
query.setOrderColList(new ArrayList<OrderCol>() {
{
add(new OrderCol("a.sort", OrderCol.ASCENDING));
add(new OrderCol("a.createTime", OrderCol.DESCENDING));
}
});
} else {
query.getOrderColList().add(new OrderCol("a.createTime", OrderCol.DESCENDING));
}
if (!ObjectUtils.isEmpty(query.getFilter()) && YesNoEnum.YES.getValue() == query.getFilter()) {
//过滤部门事项数据为0的部门
query.setTotalStart(1);
}
......@@ -116,7 +121,9 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
throw new AppException("参数部门ids不能为空!");
}
Rest<Map<String, List<DeptVo>>> rest = this.service.getBusinessByDept(deptQuery, getContext());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, rest.getData());
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!");
......@@ -142,7 +149,9 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
throw new AppException("业务id不能为空!");
}
Rest<Map<String, List<DeptVo>>> rest = this.service.getDeptListByBusiness(deptQuery, getContext());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, rest.getData());
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, busiDesc + "成功!");
......@@ -163,11 +172,15 @@ public class DeptController extends BaseCRUDJsonBodyMappingController<DeptServic
*/
@Override
protected void saveBefore(DeptEntity entity, Map<String, Object> model, Context context) throws AppException {
DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber()));
if(!ObjectUtils.isEmpty(deptEntity)){
throw new AppException("部门编码已存在!");
// DeptEntity deptEntity = this.service.selectOne(new DeptQuery().deptNumber(entity.getDeptNumber()));
// if(!ObjectUtils.isEmpty(deptEntity)){
// throw new AppException("部门编码已存在!");
// }
if (entity.newEntity()) {
entity.setSource(SourceEnum.自定义.getValue());
}
entity.setSource(1);
super.saveBefore(entity, model, context);
}
}
\ No newline at end of file
......@@ -63,7 +63,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
*/
@Override
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<>();
notList.add("行政处罚");
query.setEventTypeShowNotList(notList);
......@@ -148,7 +148,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
jsonObject.put(KEY_RESULT_MSG, rest.getMsg());
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
this.recordSysLog(this.request, rest.getMsg());
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
this.recordSysLog(this.request, rest.getMsg());
}
} catch (Exception e) {
log.error("获取异常", e);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_FAILURE);
......@@ -165,7 +167,7 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
String busiDesc = "查询差集" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
int code = VALUE_RESULT_SUCCESS;
try {
PageInfo pageInfo = buildPageInfo(query);
Result<MatterEntity> result = this.getService().findSubList(query, pageInfo, context);
......@@ -173,7 +175,9 @@ public class MatterController extends BaseCRUDJsonBodyMappingController<MatterSe
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功");
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
......
......@@ -185,9 +185,11 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
protected void saveAfter(SiteEntity entity, Context context) throws AppException {
log.info("站点更新1");
//刷新站点树
//ThreadPool.getInstance().execute(new SyncTreeSiteThread(this,context));
Rest<String> rest = userFeign.synchSiteAuth();
log.info("站点更新2");
if (rest.getCode().equals(YesNoEnum.YES.getValue())) {
UserPdu userPdu = new UserPdu();
userPdu.setPage(1);
......@@ -195,8 +197,10 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
Rest<RespData<List<UserPdu>>> list = userFeign.list(userPdu);
userService.updateUserList(list.getData().getData());
}
log.info("站点更新3");
//更新同步部门相关
deptService.syncDeptBySiteId(entity, context);
log.info("站点更新4");
super.saveAfter(entity, context);
}
......@@ -439,9 +443,9 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
@Override
public Rest<List<SiteAreaVo>> getAreaSitesBySite(SiteQuery query, Context context) {
List<SiteAreaVo> list = new ArrayList<>();
SiteAreaVo siteAreaVo = new SiteAreaVo();
//获取当前节点的第一层子节点
if (ObjectUtils.isEmpty(query.getAreaName())) {
throw new AppException("区域名称查询参数不能为空!");
......@@ -465,7 +469,6 @@ public class SiteServiceImpl extends AbstractCRUDCacheServiceImpl<SiteDao, SiteE
List<AreaEntity> childList = areaService.find(areaQuery, context);
for (AreaEntity child : childList) {
siteAreaVo = new SiteAreaVo();
siteAreaVo.setAreaCode(child.getAreaCode());
siteAreaVo.setAreaName(child.getName());
String matchCode = child.getAreaCode().replaceAll("(0)+$", "");
......
......@@ -15,6 +15,7 @@ import com.mortals.xhx.module.site.model.SiteBusinessTreeSelect;
import com.mortals.xhx.module.site.service.SiteBusinessService;
import org.apache.commons.lang3.ArrayUtils;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -119,7 +120,9 @@ public class SiteBusinessController extends BaseCRUDJsonBodyMappingController<Si
Result<SiteBusinessEntity> result = this.service.flatList(query, pageInfo, getContext());
model.put(KEY_RESULT_DATA, result.getList());
parsePageInfo(model, result.getPageInfo());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点业务列表成功!");
......
......@@ -35,10 +35,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.ObjectUtils;
import org.springframework.web.bind.annotation.*;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.stream.Collectors;
/**
......@@ -108,7 +105,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
}
model.put("siteTree", siteTree);
this.init(model, getContext());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) {
......@@ -137,7 +136,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
List<SiteTreeSelect> siteTree = this.service.getSiteTree(context);
model.put("siteTree", siteTree);
this.init(model, getContext());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
} catch (Exception e) {
......@@ -158,25 +159,41 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String busiDesc = "根据区域编码查询站点列表" + this.getModuleDesc();
try {
if (!ObjectUtils.isEmpty(site.getSiteName())) {
SiteEntity siteEntity = this.service.selectOne(new SiteQuery().siteName(site.getSiteName()));
if (!ObjectUtils.isEmpty(siteEntity)) {
site.setAreaCode(siteEntity.getAreaCode());
// SiteEntity siteEntity = this.service.selectOne(new SiteQuery().siteName(site.getSiteName()));
List<SiteEntity> siteEntities = this.service.find(new SiteQuery().siteName(site.getSiteName()));
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())) {
AreaEntity areaEntity = areaService.selectOne(new AreaQuery().name(site.getAreaName()));
if (!ObjectUtils.isEmpty(areaEntity)) {
site.setAreaCode(areaEntity.getAreaCode());
//AreaEntity areaEntity = areaService.selectOne(new AreaQuery().name(site.getAreaName()));
List<AreaEntity> areaEntities = areaService.find(new AreaQuery().name(site.getAreaName()));
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())) {
siteEntityList = siteEntityList.stream().filter(item -> site.getSiteName().equals(item.getSiteName())).collect(Collectors.toList());
}
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, siteEntityList);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!");
......@@ -201,8 +218,9 @@ public class SiteController extends BaseCRUDJsonBodyMappingController<SiteServic
String siteIds = site.getAreaCodeList().stream().flatMap(areaId ->
this.service.getFlatSitesByAreaCode(areaId, getContext()).stream()
).map(item -> item.getId().toString()).distinct().collect(Collectors.joining(","));
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
jsonObject.put(KEY_RESULT_DATA, siteIds);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "查询站点列表成功!");
......
......@@ -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.site.model.*;
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.RestController;
import org.springframework.web.bind.annotation.*;
......@@ -71,7 +72,10 @@ public class SiteHallController extends BaseCRUDJsonBodyMappingController<SiteHa
int code = VALUE_RESULT_SUCCESS;
try {
Rest<List<BusinessEntity>> rest = this.service.getBusinessByHall(siteHall, getContext());
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
model.put(KEY_RESULT_DATA, rest.getData());
model.put("message_info", busiDesc + "成功");
} catch (Exception e) {
......
......@@ -55,7 +55,6 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
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()));
Iterator iterator = list.iterator();
while (iterator.hasNext()) {
WindowBusinessEntity item = (WindowBusinessEntity) iterator.next();
......@@ -68,6 +67,8 @@ public class WindowBusinessServiceImpl extends AbstractCRUDServiceImpl<WindowBus
if (!ObjectUtils.isEmpty(windowHallEntity)) {
item.setHallId(windowHallEntity.getHallId());
item.setHallName(windowHallEntity.getHallName());
}else {
log.info("windowhallEntity is null windowId:{}",item.getWindowId());
}
} else {
iterator.remove();
......
......@@ -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.WindowService;
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.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
......@@ -66,10 +67,10 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
public String addBusinessToSite(@RequestBody Map<String, Object> map) {
JSONObject jsonObject = new JSONObject();
Map<String, Object> model = new HashMap<>();
String businessIds=(String)map.get("businessIds");
Long windowId= DataUtil.converObj2Long(map.get("windowId"));
String businessIds = (String) map.get("businessIds");
Long windowId = DataUtil.converObj2Long(map.get("windowId"));
try {
this.service.addBusinessToWindow(businessIds,windowId,getContext());
this.service.addBusinessToWindow(businessIds, windowId, getContext());
jsonObject.put(KEY_RESULT_DATA, model);
jsonObject.put(KEY_RESULT_CODE, VALUE_RESULT_SUCCESS);
jsonObject.put(KEY_RESULT_MSG, "添加业务到窗口成功!");
......@@ -82,7 +83,6 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
}
@PostMapping(value = "subHalllist")
@UnAuth
public Rest<Object> subHalllist(@RequestBody WindowEntity query) {
......@@ -90,7 +90,7 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
Map<String, Object> model = new HashMap<>();
Context context = this.getContext();
String busiDesc = "查询差集" + this.getModuleDesc();
int code=VALUE_RESULT_SUCCESS;
int code = VALUE_RESULT_SUCCESS;
try {
PageInfo pageInfo = buildPageInfo(query);
Result<WindowEntity> result = this.getService().findSubHallList(query, pageInfo, context);
......@@ -98,7 +98,9 @@ public class WindowController extends BaseCRUDJsonBodyMappingController<WindowSe
model.put(PAGEINFO_KEY, result.getPageInfo());
parsePageInfo(model, result.getPageInfo());
model.put(MESSAGE_INFO, busiDesc + "成功");
recordSysLog(request, busiDesc + " 【成功】");
if (!ObjectUtils.isEmpty(getContext()) && !ObjectUtils.isEmpty(getContext().getUser())) {
recordSysLog(request, busiDesc + " 【成功】");
}
} catch (Exception e) {
code = VALUE_RESULT_FAILURE;
this.doException(request, busiDesc, model, e);
......
......@@ -3,14 +3,7 @@
POST {{baseUrl}}/dept/list
Content-Type: application/json
{
"siteId": 1,
"isWorkGuide":1 ,
"filter":1 ,
"page":1,
"source": 0,
"size":-1
}
{"isBkb":1,"siteId":1,"page":"1","size":"10","orderColList":[{"colName":"sort","sortKind":"desc"}]}
###部门更新与保存
......
......@@ -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
{
"page":1,
"size":10,
"hallId": 11
"size":10
}
......
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -8,6 +8,10 @@
</keep-alive> -->
</a-config-provider>
</a-spin>
<!-- 导出进度条 -->
<div class="export" v-if="progressFile.show">
<a-progress :percent="progressFile.percent" status="active" />
</div>
</div>
</template>
......@@ -22,6 +26,10 @@ export default {
loadingProps: {
spinning: false,
},
progressFile:{
show:false,
percent:1
}
};
},
beforeCreate() {
......@@ -62,4 +70,13 @@ export default {
display: flex;
// flex-direction: column;
}
.export{
position: fixed;
left: 50%;
top: 50%;
transform: translate(-50%);
z-index: 99;
width: 300px;
height: 150px;
}
</style>
......@@ -2,11 +2,11 @@ import http from "../request/http";
let baseURL = process.env.VUE_APP_API_BASE_URL
// 1.10.1. 查询应用服务列表
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. 查看应用服务
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. 保存更新应用服务
export function serviceSave(params) {
......
......@@ -70,6 +70,18 @@ export function getWLLZInfo(params) {
export function getSys12345(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) {
......@@ -112,7 +124,10 @@ export function getOrderList(params) {
export function getOrderinfo(params) {
return http.get(`${BASEURL}/wechat/order_data/orderinfo`, params);
}
// 部门列表
export function getDeptList(params) {
return http.post(`${baseURL}/base/dept/list`, params);
}
/**
* 取件记录报表
*/
......@@ -190,4 +205,12 @@ export function getImpossibleInfo(params) {
*/
export function getKqalert(params) {
return http.get(`${BASEURL}/admin/kqalert/list`, params);
}
\ No newline at end of file
}
/**
* 查询设备告警日志列表
*/
// 查询设备告警日志列表
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 @@
left: -16px;
background-color: rgba(5, 149, 253, 1);
}
::-webkit-scrollbar {
width: 6px;
height: 6px;
......@@ -335,24 +336,29 @@
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;
& > div {
&>div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -362,17 +368,20 @@
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;
}
.export_btn {
outline: none;
cursor: pointer;
......@@ -388,6 +397,7 @@
overflow: hidden;
background: #42dac8;
color: ghostwhite;
& span {
position: relative;
z-index: 10;
......@@ -423,29 +433,35 @@
}
}
& > span {
&>span {
display: flex;
justify-content: space-between;
align-items: center;
/deep/.ant-input-affix-wrapper {
width: 15rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
......@@ -477,26 +493,33 @@
}
}
}
.main {
.type0 {
color: #888888;
}
.type1 {
color: #f94545;
}
.type2 {
color: #04ca8f;
}
.ant-btn-link {
padding: 0 !important;
& + .ant-btn-link {
&+.ant-btn-link {
margin-left: 1rem !important;
}
}
.ant-table-pagination {
float: right !important;
}
}
.ant-btn-success {
background-color: #04ca8f;
border-color: #04ca8f;
......@@ -505,18 +528,22 @@
-webkit-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: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;
......@@ -526,4 +553,4 @@
.addclass {
background: linear-gradient(90deg, #5ab6ff 0%, #2e9aff 100%) !important;
color: #fff !important;
}
\ No newline at end of file
}
<template>
<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"
:defaultFileList="defaultInfo.defaultFileList" :file-list="defaultInfo.fileList" :disabled="defaultInfo.disabled"
:directory="defaultInfo.directory" :data="defaultInfo.objAttach" :headers="headers"
:beforeUpload="beforeImageUpload" :remove="uploadRemove" @change="uploadChange" @preview="handlePreview">
<slot></slot>
</a-upload>
<a-modal :visible="defaultInfo.previewVisible" :footer="null" @cancel="defaultInfo.previewVisible = false">
</a-upload> -->
<a-modal
:visible="defaultInfo.previewVisible"
:footer="null"
@cancel="defaultInfo.previewVisible = false"
>
<img alt="example" style="width: 100%" :src="defaultInfo.previewImage" />
</a-modal>
</div>
......@@ -68,18 +90,15 @@ export default {
"action"
] = `${this.fileCommonupload}?prePath=${this.defaultInfo["prePath"]}`;
} else {
this.defaultInfo[
"action"
] = `${this.fileCommonupload}`;
this.defaultInfo["action"] = `${this.fileCommonupload}`;
}
console.log(this.defaultInfo);
},
deep: true,
immediate: true,
},
},
created() { },
created() {},
methods: {
uploadRemove(file) {
if (file.id != undefined) {
......@@ -88,8 +107,8 @@ export default {
this.defaultInfo.fileList = this.defaultInfo.fileList.filter(
(item) => item.uid != file.uid
);
console.log(this.defaultInfo.fileList.length,"=--------")
if(!this.defaultInfo.fileList.length){
console.log(this.defaultInfo.fileList.length, "=--------");
if (!this.defaultInfo.fileList.length) {
this.$emit("input", ""); //相对地址
}
},
......@@ -117,7 +136,7 @@ export default {
return result;
},
uploadChange({ file, fileList }) {
console.log(fileList)
console.log(fileList);
if (file.status === "error") {
return;
this.$message.error(`${file.name} 上传失败.`);
......@@ -164,4 +183,4 @@ export default {
margin-top: 8px;
color: #666;
}
</style>
\ No newline at end of file
</style>
......@@ -414,6 +414,15 @@ const routes = [
),
meta: { title: "12345拨打记录报表" },
},
{
path: "letterRecordForm",
name: "letterRecordForm",
component: () =>
import(
/* webpackChunkName: "letterRecordForm" */ "@/views/dataAdmin/components/networkGovernance/letterRecordForm.vue"
),
meta: { title: "12345写信记录报表" },
},
],
},
],
......
<template>
<div>
<div :id="id" :style="{height: this.height+'px', width: this.width+'px'}"></div>
</div>
<div>
<div :id="id" :style="{ height: this.height + 'px', width: this.width + 'px' }"></div>
</div>
</template>
<script >
import * as echarts from 'echarts'
let myChart= null
let myChart = null
export default {
props: {
props: {
id: {
type: String
},
height:{
height: {
type: String | Number,
},
width:{
width: {
type: String | Number,
},
datas: Object
},
data() {
return {
},
data() {
return {
}
},
watch:{
datas: function(obj){
if(obj){
this.pieInit(obj.data)
},
watch: {
datas: function (obj) {
if (obj) {
this.pieInit(obj.data, obj.nameArr)
}
}
},
methods: {
pieInit(data) {
methods: {
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))
let option = {
radar: {
// shape: 'circle',
indicator: [
{ name: '在线预约', max: 100 },
{ name: '现场取号', max: 100 },
{ name: '个人申报', max: 100 },
{ name: '评价次数', max: 100 },
{ name: '意见建议', max: 100 },
{ name: '办不成事', max: 100 }
]
indicator: arr
},
series: [
{
......@@ -51,15 +61,14 @@ export default {
data: data
}
]
};
myChart.setOption(option)
// 让图表跟随屏幕自动的去适应
window.addEventListener('resize', function () {
myChart.resize()
})
}
}
};
myChart.setOption(option)
// 让图表跟随屏幕自动的去适应
window.addEventListener('resize', function () {
myChart.resize()
})
}
}
}
</script>
<style lang="less" scoped>
</style>
\ No newline at end of file
<style lang="less" scoped></style>
\ No newline at end of file
......@@ -153,6 +153,7 @@ export default {
font-size: 18px;
font-weight: bold;
padding-bottom: 10px;
text-align: center;
}
.remark {
font-size: 14px;
......@@ -168,4 +169,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<div class="Container">
<div class="main">
<div class="first_card">
<div class="breadMenu">
<Breadcrumb/>
<div class="main">
<div class="first_card">
<div class="breadMenu">
<Breadcrumb />
</div>
<div class="searchBox">
<a-select show-search placeholder="请输入群众名称搜索" style="width: 35.625rem"
:default-active-first-option="false" :show-arrow="false" :filter-option="false" allowClear
: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 class="searchBox">
<a-input v-model="peopleName" placeholder="请输入群众名称搜索" style="width: 35.625rem"></a-input>
<a-button type="primary" class="addclass" @click="startAnalysis()">开始分析</a-button>
<a-button type="primary" class="addclass" v-if="btnShow" @click="backBase()">返回</a-button>
<div class="content_view">
<router-view keep-alive />
</div>
</div>
<div class="content_view">
<router-view />
</div>
</div>
</div>
</template>
<script>
import Breadcrumb from "./breadcrumb/index.vue";
export default {
components:{
<script>
import Breadcrumb from "./breadcrumb/index.vue";
import { peopelList } from '@/api/userPortrait'
export default {
components: {
Breadcrumb
},
data() {
return {
// 搜索框
peopleName: '',
btnShow: false,
}
return {
// 搜索框
peopleId: '',
peopleArr: [],
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() {
this.peopleName= ''
this.$router.push({ path: 'portrayalAnalysis'})
this.btnShow= true
if (this.peopleId) {
this.$router.push({ path: 'portrayalAnalysis', query: { peopleid: this.peopleId } })
this.btnShow = true
} else {
this.$message.warning('请选择群众后搜索')
}
},
backBase() {
this.peopleName= ''
this.$router.push({ path: 'portrayalBase'})
this.btnShow= false
this.peopleArr = []
this.$router.push({ path: 'portrayalBase' })
this.btnShow = false
},
}
}
</script>
}
</script>
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
<style lang="less" scoped>
@headerH: 4.5rem;
.Container {
height: 100% !important;
// background: #fac;
background: #f5f5f5;
display: flex;
flex-direction: column;
.main {
// background: #afc;
border-radius: 6px;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
// background: #afc;
border-radius: 6px;
flex: 1;
overflow-y: auto;
overflow-x: hidden;
}
&::before {
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
content: "";
display: block;
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
/deep/.ant-tabs-nav {
.ant-tabs-tab {
margin: 0 !important;
}
.ant-tabs-tab {
margin: 0 !important;
}
}
/deep/.ant-tabs-tab {
font-size: 14px !important;
& + .ant-tabs-tab {
margin: 0 !important;
margin-left: 0.7rem !important;
}
font-size: 14px !important;
&+.ant-tabs-tab {
margin: 0 !important;
margin-left: 0.7rem !important;
}
}
/deep/.ant-tabs-bar{
/deep/.ant-tabs-bar {
margin: 0;
}
}
.first_card{
}
.first_card {
background: #FFF;
margin-bottom: .9375rem;
}
.breadMenu{
}
.breadMenu {
height: 2.8125rem;
line-height: 2.8125rem;
padding: 0 5rem;
border-bottom: 1px solid rgba(226, 226, 226, 1);
}
.searchBox{
}
.searchBox {
height: 6.25rem;
display: flex;
justify-content: center;
align-items: center;
}
.content_view{
}
.content_view {
padding: 0 5rem;
}
</style>
}
</style>
\ No newline at end of file
......@@ -10,63 +10,67 @@
<a-col :span="8">
<div class="inside_card">
<div class="head_title mb_15">用户信息</div>
<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="微信昵称:">{{ formState.name }}</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.ID }}</a-form-item>
<a-form-item label="注册时间:">{{ formState.registerTime }}</a-form-item>
<a-form-item label="注册来源:">{{ formState.source }}</a-form-item>
<a-form-item label="户籍地址:">{{ formState.address }}</a-form-item>
<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="姓名:">{{ formState.idcard_Name || '--' }}</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.idcard_IDCardNo || '--' }}</a-form-item>
<a-form-item label="注册时间:">{{ formState.update_time || '--' }}</a-form-item>
<a-form-item label="注册来源:">{{ regType[formState.register_type] || '--' }}</a-form-item>
<a-form-item label="户籍地址:">{{ formState.idcard_Address || '--' }}</a-form-item>
</a-form>
</div>
<div class="inside_card">
<div class="head_title mb_15">关键数据</div>
<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="取号最多:">{{ formState.appointment.name }}({{ formState.appointment.value }})</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 layout="horizontal" :model="formState" :label-col="{ span: 4 }" :wrapper-col="{ span: 20 }">
<a-form-item label="预约最多:" v-if="formState.yymax">{{ formState.yymax ? formState.yymax.name : ''
}}<span style="color: #FF5F5F;">({{ formState.yymax ? formState.yymax.count :
'' }})</span></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>
<div class="evaluate_box">
<div class="evaluate_box" v-if="formState.pjdata">
<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>
<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>
</div>
</div>
</a-col>
<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="info_name">
神奇小伙<a-tag color="green" class="info_tag">实名认证</a-tag>
{{ formState.idcard_Name }}<a-tag color="green" class="info_tag">实名认证</a-tag>
</div>
<a-row>
<a-col :span="8">年龄:18</a-col>
<a-col :span="8">性别:未知</a-col>
<a-col :span="8">民族:氪族</a-col>
<a-col :span="8">年龄:{{ formState.idcard_Name }}</a-col>
<a-col :span="8">性别:{{ formState.idcard_Sex || '--' }}</a-col>
<a-col :span="8">民族:{{ formState.idcard_Nation }}</a-col>
</a-row>
<div>点击查看区块链信息</div>
<div> </div>
</div>
</a-col>
<a-col :span="8">
<div class="inside_card">
<Radar
:id="`radar`"
:height="350"
:width="500"
:datas="radarData"
/>
<Radar :id="`radar`" :height="350" :width="500" :datas="radarData" />
</div>
<div>
</div>
</a-col>
</a-row>
......@@ -76,168 +80,212 @@
<script >
import Radar from "../../business/Component/radar/index.vue";
export default {
components: {
Radar
},
data(){
return{
options:[
{
value: '0',
label: '今天',
},
{
value: '1',
label: '近7日',
},
{
value: '2',
label: '近30日',
},
{
value: '3',
label: '近3个月',
},
{
value: '4',
label: '本年度',
},
],
radarData: {},
useNumber: '0',
formState: {
openId: '4568782121245',
name: '张张那个张',
city: '四川省成都市',
phone: '13088088888',
ID: '513822199302034567',
registerTime: '2023-03-01 10:00:00',
source: '排队叫号系统',
address: '四川省宜宾市叙州区林南路23号',
appointment: {name: '机动车违章业务办理', value: '25'},
good: {value: '36', percent: '20'},
bad: {value: '2', percent: '10'}
}
import { userAnalysis } from "@/api/userPortrait"
export default {
components: {
Radar
},
data() {
return {
options: [
{
value: '0',
label: '今天',
},
{
value: '1',
label: '近7日',
},
{
value: '2',
label: '近30日',
},
{
value: '3',
label: '近3个月',
},
{
value: '4',
label: '本年度',
},
],
radarData: {},
useNumber: '0',
formState: {
openId: '4568782121245',
name: '张张那个张',
city: '四川省成都市',
phone: '13088088888',
ID: '513822199302034567',
registerTime: '2023-03-01 10:00:00',
source: '排队叫号系统',
address: '四川省宜宾市叙州区林南路23号',
appointment: { name: '机动车违章业务办理', value: '25' },
good: { value: '36', percent: '20' },
bad: { value: '2', percent: '10' }
},
regType: {
Applets: '小程序',
wechat: '公众号',
app: '自助服务终端'
}
},
mounted(){
this.getRadarData()
},
methods: {
handleChange() {},
getRadarData() {
this.radarData= {
}
},
mounted() {
this.getRadarData()
this.userAnalysisFn(this.$route.query.peopleid)
},
methods: {
async userAnalysisFn(peopleid) {
let res = await userAnalysis({ siteid: localStorage.getItem('siteId'), peopleid })
// 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: [
{
value: [42, 30, 20, 35, 50, 18],
value: arr,
name: '偏好',
areaStyle: {
color: '#a6c5fc'
}
},
]
],
}
} else {
this.$message.error('查询失败')
this.$router.push({ path: 'portrayalBase' })
}
},
}
handleChange() { },
getRadarData() {
}
},
}
</script>
<style lang="less" scoped>
/deep/ .ant-form-item{
/deep/ .ant-form-item {
margin-bottom: 0
}
.head{
.head {
display: flex;
justify-content: flex-start;
align-items: center;
align-items: center;
}
.head_title{
.head_title {
font-weight: 700;
font-style: normal;
font-size: 1.125rem;
color: #0595FD;
margin-right: 1.25rem;
}
.head_desc{
.head_desc {
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #888888;
}
.inside_card{
.inside_card {
background: #f3faff;
margin: .9375rem;
padding: .9375rem;
}
.evaluate_box{
.evaluate_box {
display: flex;
justify-content: space-around;
align-items: center;
align-items: center;
margin-top: 1.25rem;
}
.good_box{
.good_box {
width: 10rem;
background: #d0f3ee;
text-align: center;
padding: .9375rem;
.good_title{
.good_title {
font-size: 1.25rem;
font-weight: 400;
font-style: normal;
color: #04CA8F;
margin-bottom: .625rem;
}
.good_desc{
.good_desc {
font-size: .875rem;
font-weight: 400;
font-style: normal;
color: #04CA8F;
}
}
.bad_box{
.bad_box {
width: 10rem;
background: #f5e3e7;
text-align: center;
padding: .9375rem;
.bad_title{
.bad_title {
font-size: 1.25rem;
font-weight: 400;
font-style: normal;
color: #FF5F5F;
margin-bottom: .625rem;
}
.bad_desc{
.bad_desc {
font-size: .875rem;
font-weight: 400;
font-style: normal;
color: #FF5F5F;
}
}
.information{
.information {
display: flex;
flex-direction: column;
flex-wrap: nowrap;
justify-content: space-around;
height: 200px;
flex-direction: column;
flex-wrap: nowrap;
justify-content: space-around;
height: 200px;
}
.info_name{
.info_name {
position: relative;
font-size: 2.5rem;
}
.info_tag{
.info_tag {
position: absolute;
top: .9375rem;
margin-left: .9375rem;
}
.mb_15{
.mb_15 {
margin-bottom: .9375rem;
}
.f_40{
.f_40 {
font-size: 2.5rem;
}
.f_center{
.f_center {
text-align: center;
}
</style>
\ No newline at end of file
......@@ -9,17 +9,12 @@
</template>
<a-row type="flex" align="middle">
<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 primary" @click="toTable">点击查看报表</div>
<!-- <div class="f_center primary" @click="toTable">点击查看报表</div> -->
</a-col>
<a-col :span="20">
<lineChart
:id="`one_line`"
:title="`近30日注册情况分析`"
:datas="oneLineData"
:height="200"
:width="1420"/>
<lineChart :id="`one_line`" :title="`近30日注册情况分析`" :datas="oneLineData" :height="200" :width="1420" />
</a-col>
</a-row>
</a-card>
......@@ -32,57 +27,27 @@
</template>
<a-row>
<a-col :span="8">
<map-chart
:id="`one_map`"
:datas="oneMapData"
:height="400"
:width="550"
/>
<map-chart :id="`one_map`" :datas="oneMapData" :height="400" :width="550" />
</a-col>
<a-col :span="8">
<a-table
:row-key="record => record.ranking" :dataSource="provinces" :columns="provincesColumns" :pagination="false">
<a-table :rowKey="(record, index) => { return index }" :dataSource="provinces"
:columns="provincesColumns" :scroll="{ y: 300 }" :pagination="false">
</a-table>
</a-col>
<a-col :span="8">
<pieChart
:id="`one_pie`"
:height="400"
:width="550"
:datas="onePieData"
/>
<pieChart :id="`one_pie`" :height="400" :width="550" :datas="onePieData" />
</a-col>
<a-col :span="12">
<doublePieChart
:id="`two_pie`"
:height="300"
:width="800"
:datas="twoPieData"
/>
<doublePieChart :id="`two_pie`" :height="300" :width="800" :datas="twoPieData" />
</a-col>
<a-col :span="12">
<barChart
:id="`one_bar`"
:height="300"
:width="800"
:datas="oneBarData"
/>
<barChart :id="`one_bar`" :height="300" :width="800" :datas="oneBarData" />
</a-col>
<a-col :span="12">
<barChart
:id="`two_bar`"
:height="300"
:width="800"
:datas="twoBarData"
/>
<barChart :id="`two_bar`" :height="300" :width="800" :datas="twoBarData" />
</a-col>
<a-col :span="12">
<pieChart
:id="`three_pie`"
:height="300"
:width="800"
:datas="threePieData"
/>
<pieChart :id="`three_pie`" :height="300" :width="800" :datas="threePieData" />
</a-col>
<a-col :span="12">
</a-col>
......@@ -100,57 +65,27 @@
<a-row type="flex" align="middle">
<a-row>
<a-col :span="8">
<map-chart
:id="`two_map`"
:datas="oneMapData"
:height="400"
:width="550"
/>
<map-chart :id="`two_map`" :datas="oneMapData2" :height="400" :width="550" />
</a-col>
<a-col :span="8">
<a-table
:row-key="record => record.ranking" :dataSource="provinces" :columns="provincesColumns" :pagination="false">
<a-table :rowKey="(record, index) => { return index }" :dataSource="provinces2"
:columns="provincesColumns2" :pagination="false" :scroll="{ y: 300 }">
</a-table>
</a-col>
<a-col :span="8">
<pieChart
:id="`four_pie`"
:height="400"
:width="550"
:datas="onePieData"
/>
<pieChart :id="`four_pie`" :height="400" :width="550" :datas="onePieData2" />
</a-col>
<a-col :span="12">
<doublePieChart
:id="`five_pie`"
:height="300"
:width="800"
:datas="twoPieData"
/>
<doublePieChart :id="`five_pie`" :height="300" :width="800" :datas="twoPieData2" />
</a-col>
<a-col :span="12">
<barChart
:id="`six_bar`"
:height="300"
:width="800"
:datas="oneBarData"
/>
<barChart :id="`six_bar`" :height="300" :width="800" :datas="oneBarData2" />
</a-col>
<a-col :span="12">
<barChart
:id="`three_bar`"
:height="300"
:width="800"
:datas="twoBarData"
/>
<barChart :id="`three_bar`" :height="300" :width="800" :datas="twoBarData2" />
</a-col>
<a-col :span="12">
<pieChart
:id="`six_pie`"
:height="300"
:width="800"
:datas="threePieData"
/>
<pieChart :id="`six_pie`" :height="300" :width="800" :datas="threePieData2" />
</a-col>
<a-col :span="12">
</a-col>
......@@ -169,214 +104,472 @@ import pieChart from "../../business/Component/pie/index.vue"
import lineChart from "../../business/Component/line/index.vue"
import mapChart from "../../business/Component/map/index.vue"
import moment from "moment"
export default {
components:{
mapChart, pieChart, lineChart, doublePieChart, barChart
},
data(){
return{
options:[
{
value: '0',
label: '今天',
},
{
value: '1',
label: '近7日',
},
{
value: '2',
label: '近30日',
},
{
value: '3',
label: '近3个月',
},
{
value: '4',
label: '本年度',
},
],
oneLineData: {},
oneMapData: {},
onePieData: {},
twoPieData: {},
oneBarData: {},
twoBarData: {},
threePieData: {},
provinces: [
{
ranking: 1,
province: '四川省',
people: '999',
percent: '2'
},
{
ranking: 2,
province: '四川省',
people: '999',
percent: '2'
},
],
provincesColumns: [
{
key:'ranking',
title: '序号',
dataIndex: 'ranking',
},
{
key:'province',
title: '省份',
dataIndex: 'province',
},
{
key:'people',
title: '注册人数',
dataIndex: 'people',
},
{
key:'percent',
title: '注册占比',
dataIndex: 'percent',
},
],
takeNumber: '0',
nowDate: ''
}
},
mounted(){
this.test()
import {
peopleQs, registerProvince, registerBwd, registerSex, registerAge, registerNation, provinceCase, bwdStatistic,
provinceStatistic, genderRateType, ageRate, TopNationStatistic,
} from "@/api/userPortrait.js"
export default {
components: {
mapChart, pieChart, lineChart, doublePieChart, barChart
},
data() {
return {
options: [
{
value: '0',
label: '今天',
},
{
value: '1',
label: '近7日',
},
{
value: '2',
label: '近30日',
},
{
value: '3',
label: '近3个月',
},
{
value: '4',
label: '本年度',
},
],
oneLineData: {},
oneMapData: {},
oneMapData2: {},
onePieData: {},
onePieData2: {},
twoPieData: {},
twoPieData2: {},
oneBarData: {},
oneBarData2: {},
twoBarData: {},
twoBarData2: {},
threePieData: {},
threePieData2: {},
provinces: [
{
ranking: 1,
province: '四川省',
people: '999',
percent: '2'
},
{
ranking: 2,
province: '四川省',
people: '999',
percent: '2'
},
],
provinces2: [
{
ranking: 1,
province: '四川省',
people: '999',
percent: '2'
},
{
ranking: 2,
province: '四川省',
people: '999',
percent: '2'
},
],
provincesColumns: [
{
key: 'ranking',
title: '序号',
dataIndex: 'id',
},
{
key: 'province',
title: '省份',
dataIndex: 'province',
},
{
key: 'value',
title: '注册人数',
dataIndex: 'value',
},
{
key: 'zb_lv',
title: '注册占比',
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',
nowDate: '',
massCount: '0',//群众总量
timeArr: [],//群众注册时间
doTotal: 0,
}
},
created() {
},
mounted() {
this.getPeopleQs()
this.getRegisterProvince()
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' })
},
methods:{
handleChange(){},
toTable(){
this.$router.push({path:'register'})
},
test(){
this.nowDate= moment(new Date()).format('YYYY-MM-DD h:mm:ss')
this.oneLineData= {
//整体情况
async getPeopleQs() {
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日注册情况分析:',
legend: ['自助服务系统注册人数','微官网注册人数','排队系统注册人数'],
xData: ['3-15', '3-16', '3-17', '3-18', '3-19', '3-20'],
legend: ['自助服务系统注册人数', '微官网注册人数', '排队系统注册人数'],
xData: time,
dataList: [
{name: '自助服务系统注册人数', data: [120, 132, 101, 134, 90, 230, 210]},
{name: '微官网注册人数', data: [220, 182, 191, 234, 290, 330, 310]},
{name: '排队系统注册人数', data: [150, 232, 201, 154, 190, 330, 410]},
]
}
this.oneMapData={
title: "注册用户地域分析",
data:[
{ name: '四川省', value: 20057.34 },
{ name: '广东省', value: 15477.48 },
{ name: '福建省', value: 31686.1 },
{ name: '河北省', value: 6992.6 },
{ name: '河南省', value: 44045.49 },
{ name: '江苏省', value: 40689.64 },
{ name: '自助服务系统注册人数', data: app },
{ name: '微官网注册人数', data: Applets },
{ name: '排队系统注册人数', data: take },
]
}
this.onePieData={
title: '',
type: 'scroll',
legend: ['四川省', '广东省', '福建省','河北省','河南省','江苏省',],
data: [
{ 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={
title: '本地人与外地人注册分布',
pieName: '分布详情',
firstName: '宜宾市本地人注册占比',
firstVal: '1',
firstTotal: '10',
secondName: '外地人注册占比',
secondVal: '1',
secondTotal: '10',
}
this.oneBarData={
}
},
//区域注册情况
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: "注册用户地域分析",
data: arr
}
this.provinces = arr
this.onePieData = {
title: '',
type: 'scroll',
legend: arr.forEach(i => { return i.province }),
data: arr
}
},
//注册分布情况
async getRegisterBwd() {
let res = await registerBwd({ siteid: localStorage.getItem('siteId') })
this.twoPieData = {
title: '本地人与外地人注册分布',
pieName: '分布详情',
firstName: '宜宾市本地人注册占比',
firstVal: res.data.bd_lv,
firstTotal: 1,
secondName: '外地人注册占比',
secondVal: res.data.wd_lv,
secondTotal: 1,
}
},
//注册性别分布情况
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: '性别分布',
xData: ['', ''],
data: [
{name: '自助服务系统注册人数', type: 'bar' ,data: [150, 232, 201, 154, 190, 330, 410]},
{name: '微官网注册人数', type: 'bar' ,data: [220, 182, 191, 234, 290, 330, 310]},
{name: '排队系统注册人数', type: 'bar' ,data: [120, 132, 101, 134, 90, 230, 210]},
{ name: '自助服务系统注册人数', type: 'bar', data: [man[1].count || 0, woman[1].count || 0] },
{ name: '微官网注册人数', type: 'bar', data: [man[2].count || 0, woman[2].count || 0] },
{ name: '排队系统注册人数', type: 'bar', data: [man[0].count || 0, woman[0].count || 0] },
]
}
this.twoBarData= {
title: '年龄分布',
xData: ['1-10', '10-20', '20-30', '30-40', '40-50'],
data: [
{name: '办理次数', type: 'bar' ,data: [150, 232, 201, 154, 190, 330, 410]},
{name: '占比', type: 'line' ,data: [220, 182, 191, 234, 290, 330, 310]},
]
}
this.threePieData={
title: '民族分布',
type: '',
legend: ['四川省', '广东省', '福建省','河北省','河南省','江苏省',],
}
},
//注册年龄分布情况
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: '年龄分布',
xData: age_area,
data: [
{ name: '办理次数', type: 'bar', data: count },
{ name: '占比', type: 'line', data: zb },
]
}
},
//注册民族分布情况
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: '民族分布',
type: '',
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: [
{ name: '四川省', value: 20057.34 },
{ name: '广东省', value: 15477.48 },
{ name: '福建省', value: 31686.1 },
{ name: '河北省', value: 6992.6 },
{ name: '河南省', value: 44045.49 },
{ name: '江苏省', value: 40689.64 },
{ name: '自助服务系统注册人数', type: 'bar', data: [man[1].nums || 0, woman[1].nums || 0] },
{ name: '微官网注册人数', type: 'bar', data: [man[2].nums || 0, woman[2].nums || 0] },
{ name: '排队系统注册人数', type: 'bar', data: [man[0].nums || 0, woman[0].nums || 0] },
]
}
}
}
},
//办件年龄分析
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>
<style scoped lang="less">
.head{
/deep/.ant-col {
margin-bottom: 20px;
}
.head {
display: flex;
justify-content: flex-start;
align-items: center;
.head_title{
align-items: center;
.head_title {
font-weight: 700;
font-style: normal;
font-size: 16px;
color: #333;
margin-right: 1.25rem;
}
.head_desc{
.head_desc {
font-weight: 400;
font-style: normal;
font-size: 14px;
color: #888888;
}
}
/deep/ .ant-table{
/deep/ .ant-table {
width: 100% !important;
}
.f_20{
.f_20 {
font-size: 1.25rem;
}
.f_40{
.f_40 {
font-size: 2.5rem;
}
.f_center{
.f_center {
text-align: center;
}
.warning{
.warning {
color: #FD6805
}
.primary{
.primary {
color: #0595FD
}
.success{
.success {
color: #04CA8F
}
.h_200{
.h_200 {
height: 12.5rem;
}
.mb_15{
.mb_15 {
margin-bottom: .9375rem;
}
</style>
\ No newline at end of file
<template>
<div class="reportForm-Container">
<div class="header_box">
<div>
<a-button type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
</div>
<span>
<a-checkbox-group :options="checkboxOptions" v-model="checkboxVALUE" @change="checkboxonChange" />
<a-input allowClear v-model="Query.workman_name" placeholder="请输入工作人员姓名查询 ">
<a-icon slot="prefix" type="search" />
</a-input>
<a-select v-model="Query.window_id" placeholder="请选择窗口">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option v-for="(item, index) of windowData" :key="index" :value="item.id">
{{ item.englishName }} - {{item.fromnum}}
</a-select-option>
</a-select>
<a-select v-model="Query.warn_alert" placeholder="请选择类型">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option v-for="(item,i) in warn_alert" :key="i" :value="i">
{{ item }}
</a-select-option>
</a-select>
<div class="reportForm-Container">
<div class="header_box">
<div>
<a-button type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
</div>
<span>
<a-checkbox-group
:options="checkboxOptions"
v-model="checkboxVALUE"
@change="checkboxonChange"
/>
<a-input
allowClear
v-model="Query.workman_name"
placeholder="请输入工作人员姓名查询 "
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-select v-model="Query.window_id" placeholder="请选择窗口">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option
v-for="(item, index) of windowData"
:key="index"
:value="item.id"
>
{{ item.englishName }} - {{ item.fromnum }}
</a-select-option>
</a-select>
<a-select v-model="Query.warn_alert" placeholder="请选择类型">
<a-select-option value=""> 全部 </a-select-option>
<a-select-option v-for="(item, i) in warn_alert" :key="i" :value="i">
{{ item }}
</a-select-option>
</a-select>
<a-range-picker format="YYYY年MM月DD日" valueFormat="yyyy-MM-DD" class="range_picker_style"
v-model="Query.time">
</a-range-picker>
<a-range-picker
format="YYYY年MM月DD日"
valueFormat="yyyy-MM-DD"
class="range_picker_style"
v-model="Query.time"
>
</a-range-picker>
<a-button type="primary" class="addclass" @click="onGetKqalert">搜索</a-button>
</span>
</div>
<div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :row-selection="{
<a-button type="primary" class="addclass" @click="onGetKqalert"
>搜索</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="changeTablePage" :loading="tableLoading"
:columns="tableHeaders" :dataSource="tableSourceData">
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails">查看详情{{ record.id }}</a-button>
</template>
</a-table>
</div>
</div>
}"
:scroll="{ y: 590 }"
:pagination="tablePagination"
@change="changeTablePage"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="operation" slot-scope="text, record">
<a-button type="link" @click="openDetails"
>查看详情{{ record.id }}</a-button
>
</template>
</a-table>
</div>
</div>
</template>
<script>
import table from "@/mixins/table";
import {
export2Excel
} from "@/utils/js/exportExcel";
import {
getKqalert
} from "@/api/dataAdmin"
import {
windowList
} from "@/api/customer"
import moment from "moment";
const warn_alert = {
1: '离岗',
2: '离开',
4: '玩手机',
5: '扶头',
6: '趴桌',
}
export default {
mixins: [table],
name: "PortalAdminVueReportForm",
data() {
return {
windowData: [],
warn_alert,
Query: {
have_process: "", //只看未处理 0
warn_alert: "", //1离岗,2离开 4:玩手机 5:扶头 6:趴桌
window_id: "", //窗口ID
workman_name: "", //工作人员姓名
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
}, //查询条件
checkboxVALUE: [],
BegindAndEndTime: [],
checkboxOptions: [{
label: "只看未处理",
value: "0",
}, ],
tableHeaders: [{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "报警类型",
dataIndex: "warn_alert",
customRender: (text, record) => warn_alert[text]
},
{
title: "发生窗口",
dataIndex: "window_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "工作人员",
dataIndex: "workman_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "所属部门",
dataIndex: "section_name",
customRender: (text, record) => text ? text : '--'
},
{
title: "手机号",
dataIndex: "workman_phone",
customRender: (text, record) => text ? text : '--'
},
{
title: "发生时间",
dataIndex: "out_time",
customRender: (text, record) => text ? text : '--'
},
{
title: "时长",
dataIndex: "duration",
customRender: (text, record) => text ? text : '--'
},
{
title: "是否准确",
dataIndex: "isaccuracy",
customRender: (text, record) => text == 1 ? '准确' : '--'
},
{
title: "是否处理",
dataIndex: "have_process_name",
customRender: (text, record) => text ? text : '--'
},
// {
// title: "操作",
// align: "center",
// width: "110px",
// dataIndex: "operation",
// scopedSlots: {
// customRender: "operation",
// },
// },
],
searchName: undefined,
};
},
components: {},
mounted() {
this.onGetKqalert()
this.setMoment();
this.getWindowList();
},
methods: {
// 导出
async handleExportTable() {
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
export2Excel(
this.tHeader,
this.filterVal,
this.tableSelectedRows,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
);
} else {
getKqalert({
...this.Query,
page: 1,
size: -1,
}).then(res => {
const {
code,
data
} = res;
if (code == 1) {
if (!data.data.length) return;
export2Excel(
this.tHeader,
this.filterVal,
data.data,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
})
}
},
// 报表接口
onGetKqalert() {
getKqalert({
...this.Query,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
}).then(res => {
const {
code,
data
} = res
if (code == 1) {
this.tableSourceData = data.data
this.tablePagination.total = data.total
}
console.log(res)
})
},
getWindowList() {
windowList({
page: 1,
size: -1,
siteId: JSON.parse(localStorage.getItem("siteId"))
}).then(res => {
const {
code,
data
} = res
if (code == 1) {
this.windowData = data.data
}
})
},
openDetails() {
console.log("跳转网页");
},
//分页
changeTablePage(page) {
this.pagTableChange(page);
this.onGetKqalert();
},
checkboxonChange(val) {
if (val.length == 0) {
this.Query.have_process = ""
} else {
this.Query.have_process = "0"
}
},
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
import table from "@/mixins/table";
import { export2Excel } from "@/utils/js/exportExcel";
import { getKqalert } from "@/api/dataAdmin";
import { windowList } from "@/api/customer";
import moment from "moment";
const warn_alert = {
1: "离岗",
2: "离开",
4: "玩手机",
5: "扶头",
6: "趴桌",
};
const tHeader = [
"序号",
"报警类型",
"发生窗口",
"工作人员",
"所属部门",
"手机号",
"发生时间",
"时长",
"是否准确",
];
const filterVal = [
"index",
"warn_alert",
"window_name",
"workman_name",
"section_name",
"workman_phone",
"out_time",
"duration",
"isaccuracy",
"have_process_name",
];
export default {
mixins: [table],
name: "PortalAdminVueReportForm",
data() {
return {
windowData: [],
warn_alert,
Query: {
have_process: "", //只看未处理 0
warn_alert: "", //1离岗,2离开 4:玩手机 5:扶头 6:趴桌
window_id: "", //窗口ID
workman_name: "", //工作人员姓名
time: [moment().format("YYYY-MM-DD"), moment().format("YYYY-MM-DD")], // 时间区间
}, //查询条件
checkboxVALUE: [],
BegindAndEndTime: [],
checkboxOptions: [
{
label: "只看未处理",
value: "0",
},
],
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "报警类型",
dataIndex: "warn_alert",
customRender: (text, record) => warn_alert[text],
},
{
title: "发生窗口",
dataIndex: "window_name",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "工作人员",
dataIndex: "workman_name",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "所属部门",
dataIndex: "section_name",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "手机号",
dataIndex: "workman_phone",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "发生时间",
dataIndex: "out_time",
customRender: (text, record) =>
text ? this.timestampToTime(text) : "--",
},
{
title: "时长",
dataIndex: "duration",
customRender: (text, record) => (text ? text : "--"),
},
{
title: "是否准确",
dataIndex: "isaccuracy",
customRender: (text, record) => (text == 1 ? "准确" : "--"),
},
{
title: "是否处理",
dataIndex: "have_process_name",
customRender: (text, record) => (text ? text : "--"),
},
// {
// title: "操作",
// align: "center",
// width: "110px",
// dataIndex: "operation",
// scopedSlots: {
// customRender: "operation",
// },
// },
],
searchName: undefined,
};
},
components: {},
mounted() {
this.onGetKqalert();
this.setMoment();
this.getWindowList();
},
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() {
let data = [];
if (this.tableSelectedKeys.length && this.tableSelectedRows.length) {
// 深度克隆避免影响页面表格展示
data = this.$_.cloneDeep(this.tableSelectedRows);
} else {
let datas = this.$_.cloneDeep(
await getKqalert({
...this.Query,
page: 1,
size: -1,
})
);
data = datas.data.data;
data.forEach((text, i) => {
text.index = i + 1;
text.isaccuracy = text.isaccuracy == 1 ? "准确" : "--";
text.out_time = text.out_time
? this.timestampToTime(text.out_time)
: "--";
});
if (!data.length) return;
default:
return "type0";
}
},
},
};
export2Excel(
tHeader,
filterVal,
data,
"AI效能监察异常行为数据报表" + this.$moment().format("YYYYMMDDHHmmss")
);
}
},
// 报表接口
onGetKqalert() {
getKqalert({
...this.Query,
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
}).then((res) => {
const { code, data } = res;
if (code == 1) {
this.tableSourceData = data.data;
this.tablePagination.total = data.total;
}
console.log(res);
});
},
getWindowList() {
windowList({
page: 1,
size: -1,
siteId: JSON.parse(localStorage.getItem("siteId")),
}).then((res) => {
const { code, data } = res;
if (code == 1) {
this.windowData = data.data;
}
});
},
openDetails() {
console.log("跳转网页");
},
//分页
changeTablePage(page) {
this.pagTableChange(page);
this.onGetKqalert();
},
checkboxonChange(val) {
if (val.length == 0) {
this.Query.have_process = "";
} else {
this.Query.have_process = "0";
}
},
QueueState(type) {
switch (type) {
case 0:
return "type1";
case 1:
return "type2";
default:
return "type0";
}
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
}
/deep/.ant-spin-container {
display: block;
}
/deep/.ant-checkbox-group {
width: 250px;
}
/deep/.ant-checkbox-group {
width: 250px;
}
.range_picker_style {
margin-right: 20px;
}
</style>
\ No newline at end of file
.range_picker_style {
margin-right: 20px;
}
</style>
......@@ -2,19 +2,23 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<a-button type="primary" class="addclass" @click="exportTable">
<a-button type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<span>告警次数:<i>256次</i></span>
<!-- <span>告警次数:<i>256次</i></span>
<span>危险:<i>200次</i></span>
<span>次要:<i>65次</i></span>
<span>一般:<i>0次</i></span>
<span>一般:<i>0次</i></span> -->
</div>
<span>
<a-input allowClear v-model="searchName" placeholder="请输入设备名称查询">
<a-input
allowClear
v-model="searchName"
placeholder="请输入设备名称查询"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-select default-value="001">
<a-select v-model="alarmType" style="margin: 0 10px">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
......@@ -23,10 +27,10 @@
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 内容001 </a-select-option>
<a-select-option value="002"> 内容002 </a-select-option>
<a-select-option value=""> 全部 </a-select-option>
<a-select-option value="0"> 离线 </a-select-option>
</a-select>
<a-select default-value="001">
<a-select v-model="status">
<!-- <a-select-option
v-for="(item, index) of selectOptions"
:key="index"
......@@ -35,31 +39,49 @@
{{ item.label }}
</a-select-option> -->
<a-select-option value="001"> 状态001 </a-select-option>
<a-select-option value="002"> 状态002 </a-select-option>
<a-select-option value="">全部状态</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-range-picker format="YYYY年MM月DD日" class="range_picker_style" @change="rangePickerChange"
v-model="BegindAndEndTime">
<a-range-picker
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
style="margin: 0 10px"
>
</a-range-picker>
<a-button type="primary" class="addclass" >搜索</a-button>
<a-button type="primary" class="addclass" @click="search"
>搜索</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="告警级别" slot-scope="text, record, index">
<a-table
size="small"
bordered
:row-key="(record) => record.id"
:row-selection="{
selectedRowKeys: tableSelectedKeys,
onChange: onSelectChange,
}"
:scroll="{ y: 490 }"
:pagination="tablePagination"
@change="pagTableChange"
:loading="tableLoading"
:columns="tableHeaders"
:dataSource="tableSourceData"
>
<template slot="alarmLevel" slot-scope="text, record, index">
<span class="levelState">{{ text }}</span>
</template>
<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>
</a-table>
<Details ref="Details" />
<Details ref="Details" :msg="detailInfo" />
</div>
</div>
</template>
......@@ -67,11 +89,16 @@
<script>
import table from "@/mixins/table";
import Details from "./components/Details.vue";
import { getInfoList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
export default {
mixins: [table],
name: "PortalAdminVuePoliticsShow",
data() {
return {
detailInfo: {},
status: "",
alarmType: "",
BegindAndEndTime: [],
tableHeaders: [
{
......@@ -85,42 +112,60 @@ export default {
{
title: "告警时间",
align: "center",
dataIndex: "告警时间",
customRender: (record) => {
return record.alarmTime
? this.timestampToTime(record.alarmTime)
: "--";
},
},
{
title: "设备名称",
align: "center",
dataIndex: "设备名称",
customRender: (record) => {
return record.deviceName ? record.deviceName : "--";
},
},
{
title: "告警内容",
align: "center",
dataIndex: "告警内容",
dataIndex: "alarmContent",
},
{
title: "告警级别",
align: "center",
dataIndex: "告警级别",
scopedSlots: {
customRender: "告警级别",
customRender: (record) => {
return record.alarmLevel == 0
? "危险"
: record.alarmLevel == 1
? "次要"
: record.alarmLevel == 2
? "一般"
: "--";
},
},
{
title: "接收人员",
align: "center",
dataIndex: "接收人员",
dataIndex: "alarmReceivePersonnel",
},
{
title: "告警状态",
align: "center",
dataIndex: "告警状态",
customRender: (record) => {
return record.alarmStatus == 0
? "未清除"
: record.alarmStatus == 1
? "清除未确认"
: record.alarmStatus == 1
? "清除已确认"
: "--";
},
},
{
title: "操作",
align: "center",
width: "110px",
dataIndex: "operation",
scopedSlots: {
customRender: "operation",
},
......@@ -133,22 +178,58 @@ export default {
Details,
},
mounted() {
console.log(this.tablePagination);
this.setMoment();
for (let key = 0; key < 20; key++) {
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}`,
});
}
this.getData();
},
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) {
switch (type) {
......@@ -161,9 +242,32 @@ export default {
return "type0";
}
},
openDetails() {
openDetails(val) {
this.$refs.Details.modalInfo.title = "告警详情";
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() {
......@@ -174,25 +278,98 @@ export default {
data = this.$_.cloneDeep(this.tableSelectedRows);
} else {
let datas = this.$_.cloneDeep(
await getImpossible({
...this.queryform,
await getInfoList({
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,
size: -1
size: -1,
})
);
this.btnLoading = false
data = datas.data.data
this.btnLoading = false;
data = datas.data.data;
if (!data.length) return;
}
const tHeader = []
const filterVal = []
this.tableHeaders.forEach(v=>{
if(v.dataIndex){
tHeader.push(v.title)
filterVal.push(v.dataIndex)
const tHeader = [];
const filterVal = [];
data.forEach((v, i) => {
v.index = i + 1;
v.alarmTime = this.timestampToTime(v.alarmTime);
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(
tHeader,
filterVal,
......@@ -216,15 +393,15 @@ export default {
justify-content: space-between;
align-items: center;
&>div {
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
&>span {
& > span {
margin-left: 10px;
&>i {
& > i {
margin: 0 5px;
font-style: normal;
}
......@@ -258,6 +435,3 @@ export default {
}
}
</style>
......@@ -8,43 +8,48 @@
>
<a-form-model
ref="ruleForm"
:model="detailsForm"
:model="msg"
:rules="detailsRules"
:label-col="{ span: 4 }"
:wrapper-col="{ span: 20 }"
>
<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 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 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 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 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 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 label="告警详情" prop="告警详情">
<a-textarea
v-model="detailsForm.告警详情"
v-model="msg.alarmContent"
placeholder="请输入"
:rows="4"
disabled
/>
</a-form-model-item>
<a-form-model-item label="清楚时间" prop="清楚时间">
<a-input v-model="detailsForm.清楚时间" placeholder="请输入" disabled />
<!-- <a-form-model-item label="清楚时间" prop="清楚时间">
<a-input v-model="msg.updateTime" placeholder="请输入" disabled />
</a-form-model-item>
<a-form-model-item label="清楚人员" prop="清楚人员">
<a-input v-model="detailsForm.清楚人员" placeholder="请输入" disabled />
</a-form-model-item>
<a-input v-model="msg.updateUserId" placeholder="请输入" disabled />
</a-form-model-item> -->
</a-form-model>
</a-drawer>
</template>
......@@ -54,7 +59,9 @@ import modal from "../mixins/modal";
export default {
mixins: [modal],
name: "PortalAdminVuePicWorks",
props: {
msg: Object,
},
data() {
return {
detailsForm: {
......@@ -84,5 +91,3 @@ export default {
overflow-x: hidden !important;
}
</style>
......@@ -2,7 +2,7 @@
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button type="primary" class="addclass" @click="handleExportTable">
<a-button type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<a-button type="danger" @click="delTable">
......@@ -32,7 +32,7 @@
<a-input style="width: 280px" v-model="searchName" placeholder="请输入评价人姓名或窗口编号搜索" @pressEnter="handleSearch">
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" class="addclass" @click="handleSearch">搜索</a-button>
<a-button type="primary" class="addclass" @click="handleSearch">搜索</a-button>
<a-button @click="clearnAllChoose">重置</a-button>
</a-space>
</span>
......@@ -45,7 +45,8 @@
:columns="tableHeaders" :dataSource="tableSourceData">
<template slot="评价人照片" slot-scope="text">
<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 slot="操作" slot-scope="text, record">
<a-button type="link" style="color: #ff7370" @click="handleDel(record.id)">删除</a-button>
......@@ -324,6 +325,7 @@ export default {
},
//详情模块
openHandlingDetails(record) {
console.log(record)
// 判断为窗口屏或者其他状况,调用不同接口
if (record.pjxt == 1) {
this.$refs.HandlingDetails.modalInfo.title = "办理明细";
......
......@@ -28,10 +28,22 @@
v-model="searchForm.time"
>
</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-option value=""> 全部 </a-select-option>
<a-select-option
v-for="(v, key) in statusItem"
:key="key"
:value="Number(key)"
>
......@@ -109,7 +121,7 @@
</template>
<script>
import { getOrderList } from "@/api/dataAdmin";
import { getOrderList,getDeptList } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
let tHeader = [
// 导出的表头名信息
......@@ -227,6 +239,14 @@ export default {
align: "center",
dataIndex: "business_name",
},
{
title: "部门名称",
align: "center",
dataIndex: "section_name",
customRender: (text) => {
return text || "--";
},
},
{
title: "创建时间",
align: "center",
......@@ -251,6 +271,7 @@ export default {
searchForm: {
status: "",
title: "",
sectionid:"",
time: [
this.$moment(new Date()).format("YYYY-MM-DD"),
this.$moment(new Date()).format("YYYY-MM-DD"),
......@@ -263,12 +284,23 @@ export default {
tableSelectedKeys: [],
tableSelectedRows: [],
tableSourceData: [],
depList:[]//部门列表
};
},
created() {
this.getOrderList();
this.getDeptList()
},
methods: {
// 部门列表
getDeptList(){
getDeptList({page:1,size:-1}).then(res=>{
const {data} = res.data
if(res.code == 1){
this.depList = data
}
})
},
// 获取报表数据
async getOrderList(search = {}) {
let res = await getOrderList({
......
<template>
<div>
<!-- 详情抽屉效果 -->
<a-drawer title="详情" placement="right" :visible="visible" closable @close="onClose" width="90%">
<div class="drawerMain">
<!-- 左侧建议内容 -->
<div class="drawerLeft">
<div class="leftTitle">
建议内容
</div>
<div class="card">
<div class="cardTitle">纠错标题 </div>
<div class="cardContent">{{fromData.title}}</div>
</div>
<div class="infoDetail">
<div class="card">
<div class="cardTitle">建议类型 </div>
<div class="cardContent">{{fromData.type==1?'部门建议':fromData.type==2?'办事建议':fromData.type==3?'网站建议':fromData.type==4?'我要就错':fromData.type==5?'我要投诉':'我要咨询'}}</div>
</div>
<div class="card">
<div class="cardTitle">真实姓名</div>
<div class="cardContent">{{fromData.upname}} </div>
</div>
<div class="card">
<div class="cardTitle"> 身份证号 </div>
<div class="cardContent">{{fromData.idcard}}</div>
</div>
<div class="card">
<div class="cardTitle"> 电子邮箱 </div>
<div class="cardContent">{{fromData.upmail}}</div>
</div>
</div>
<div class="card">
<div class="cardTitle"> 联系地址 </div>
<div class="cardContent">{{fromData.address}}</div>
</div>
<div class="card">
<div class="cardTitle"> 事件发生地 </div>
<div class="cardContent">{{fromData.thing_address}}</div>
</div>
<div class="card">
<div class="cardTitle"> 具体内容 </div>
<div class="cardContent">{{fromData.content}}</div>
</div>
<div class="card">
<div class="cardTitle"> 附件 </div>
<div class="cardContent" v-if="fromData.url">
<img v-for="(item,index) in fromData.url" :key="index"
:src="process.env.VUE_APP_API_BASE_URL+item">
</div>
<div v-else>--</div>
</div>
<div class="infoDetail">
<div class="card">
<div class="cardTitle"> 是否公开 </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}}</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 }}</div>
</div>
</div>
</div>
<!-- 底部按钮 -->
<div :style="{
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">
<div>
<!-- 详情抽屉效果 -->
<a-drawer
title="详情"
placement="right"
:visible="visible"
closable
@close="onClose"
width="90%"
>
<div class="drawerMain" v-if="title && title == '网络理政'">
<!-- 左侧建议内容 -->
<div class="drawerLeft">
<div class="leftTitle">建议内容</div>
<div class="card">
<div class="cardTitle">纠错标题</div>
<div class="cardContent">
{{ fromData.title ? fromData.title : "--" }}
</div>
</div>
<div class="infoDetail">
<div class="card">
<div class="cardTitle">建议类型</div>
<div class="cardContent">
{{
fromData.type == 1
? "部门建议"
: fromData.type == 2
? "办事建议"
: fromData.type == 3
? "网站建议"
: fromData.type == 4
? "我要就错"
: fromData.type == 5
? "我要投诉"
: "我要咨询"
}}
</div>
</div>
<div class="card">
<div class="cardTitle">真实姓名</div>
<div class="cardContent">
{{ fromData.upname ? fromData.upname : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">身份证号</div>
<div class="cardContent">
{{ fromData.idcard ? fromData.idcard : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">电子邮箱</div>
<div class="cardContent">
{{ fromData.upmail ? fromData.upmail : "--" }}
</div>
</div>
</div>
<div class="card">
<div class="cardTitle">联系地址</div>
<div class="cardContent">
{{ fromData.address ? fromData.address : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">事件发生地</div>
<div class="cardContent">
{{ fromData.thing_address ? fromData.thing_address : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">具体内容</div>
<div class="cardContent">
{{ fromData.content ? fromData.content : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">附件</div>
<div class="cardContent" v-if="fromData.url">
<img
v-for="(item, index) in fromData.url"
:key="index"
:src="process.env.VUE_APP_API_BASE_URL + item"
/>
</div>
<div v-else>--</div>
</div>
<div class="infoDetail">
<div class="card">
<div class="cardTitle">是否公开</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 class="card">
<div class="cardTitle">信件内容</div>
<div class="cardContent">
{{ fromData.strContent ? fromData.strContent : "--" }}
</div>
</div>
<div class="infoDetail">
<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">工单编号</div>
<div class="cardContent">
{{ fromData.LetterCode ? fromData.LetterCode : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">办理状态</div>
<div class="cardContent">
{{ fromData.status ? fromData.status : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">办理结果</div>
<div class="cardContent">
{{ fromData.Ccontent ? fromData.Ccontent : "--" }}
</div>
</div>
<div class="card">
<div class="cardTitle">办理部门</div>
<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>
</div>
<!-- 底部按钮 -->
<div
:style="{
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> -->
<a-button :style="{ marginRight: '8px' }" @click="onClose">
取消
</a-button>
</div>
</a-drawer>
</div>
<a-button :style="{ marginRight: '8px' }" @click="onClose">
取消
</a-button>
</div>
</a-drawer>
</div>
</template>
<script>
export default {
name: 'FormDetails',
props: {
visible: Boolean
name: "FormDetails",
props: {
visible: Boolean,
title: String,
},
data() {
return {
fromData: {},
};
},
methods: {
onClose() {
this.$emit("onClose");
},
data() {
return {
fromData:{}
};
},
methods: {
onClose() {
this.$emit('onClose')
}
}
}
},
};
</script>
<style lang="less" scoped>
/deep/.ant-drawer-content {
background-color: #F3F4F5;
background-color: #f3f4f5;
}
.drawerMain {
height: 83vh;
display: flex;
align-items: center;
justify-content: space-between;
.drawerLeft {
width: 49.5%;
height: 100%;
border-radius: 8px;
background-color: #FFF;
box-sizing: border-box;
padding: 15px;
overflow: hidden;
overflow-y: auto;
height: 83vh;
display: flex;
align-items: center;
justify-content: space-between;
.leftTitle {
font-weight: bold;
}
.drawerLeft {
width: 49.5%;
height: 100%;
border-radius: 8px;
background-color: #fff;
box-sizing: border-box;
padding: 15px;
overflow: hidden;
overflow-y: auto;
.card {
line-height: 25px;
.leftTitle {
font-weight: bold;
}
.cardTitle {
color: #0377FF;
font-weight: bold;
margin: 8px 0;
}
}
.card {
line-height: 25px;
.infoDetail {
display: flex;
align-items: center;
justify-content: space-between;
}
.cardTitle {
color: #0377ff;
font-weight: bold;
margin: 8px 0;
}
}
.drawerLeft::-webkit-scrollbar {
display: none;
.infoDetail {
display: flex;
align-items: center;
justify-content: space-between;
}
.infoDetailBox {
justify-content: flex-start;
.card {
width: 25%;
}
}
}
.drawerRight {
width: 49.5%;
height: 100%;
border-radius: 8px;
background-color: #FFF;
box-sizing: border-box;
padding: 15px;
.drawerLeft::-webkit-scrollbar {
display: none;
}
.rightTitle {
font-weight: bold;
color: #e30000;
}
.drawerRight {
width: 49.5%;
height: 100%;
border-radius: 8px;
background-color: #fff;
box-sizing: border-box;
padding: 15px;
.rightTitle {
font-weight: bold;
color: #e30000;
}
.card {
line-height: 25px;
.card {
line-height: 25px;
.cardTitle {
font-weight: bold;
margin: 8px 0;
.cardTitle {
font-weight: bold;
margin: 8px 0;
span {
color: #e30000;
}
}
span {
color: #e30000;
}
}
}
}
}
</style>
\ No newline at end of file
</style>
<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>
<template>
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button type="primary" class="addclass" @click="handleExportTable" :loading="btnLoading">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b>建议次数:<i>{{JYCount}}</i></b>
<b>回复次数:<i>{{HFCount}}</i></b>
<sub>统计时间段:{{this.timeList[0]}}~{{this.timeList[1]}}</sub>
</div>
<span>
<a-space>
<a-checkbox @change="changeReply" v-model="isReply">
只看未回复
</a-checkbox>
<a-select placeholder="全部类型" v-model="nowType" @change="changeType">
<a-select-option value="1"> 部门建议 </a-select-option>
<a-select-option value="2"> 办事建议 </a-select-option>
<a-select-option value="3"> 网站建议 </a-select-option>
<a-select-option value="4"> 我要就错 </a-select-option>
<a-select-option value="5"> 我要投诉 </a-select-option>
</a-select>
<a-select placeholder="全部来源" v-model="nowDevice" @change="changeDevice">
<a-select-option value="1"> 评价系统 </a-select-option>
<a-select-option value="2"> 导视系统 </a-select-option>
<a-select-option value="3"> 自助服务系统 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 数字填单系统 </a-select-option>
</a-select>
<a-range-picker style="width:250px;" format="YYYY-MM-DD" class="range_picker_style"
@change="rangePickerChange" v-model="timeList">
</a-range-picker>
<div class="callRecord-Container">
<div class="header_box">
<div>
<a-button
type="primary"
class="addclass"
@click="handleExportTable"
:loading="btnLoading"
>
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b
>建议次数:<i>{{ JYCount }}</i></b
>
<b
>回复次数:<i>{{ HFCount }}</i></b
>
<sub>统计时间段:{{ this.timeList[0] }}~{{ this.timeList[1] }}</sub>
</div>
<span>
<a-space>
<a-checkbox @change="changeReply" v-model="isReply">
只看未回复
</a-checkbox>
<a-select
placeholder="全部类型"
v-model="nowType"
@change="changeType"
>
<a-select-option value="1"> 部门建议 </a-select-option>
<a-select-option value="2"> 办事建议 </a-select-option>
<a-select-option value="3"> 网站建议 </a-select-option>
<a-select-option value="4"> 我要就错 </a-select-option>
<a-select-option value="5"> 我要投诉 </a-select-option>
</a-select>
<a-select
placeholder="全部来源"
v-model="nowDevice"
@change="changeDevice"
>
<a-select-option value="1"> 评价系统 </a-select-option>
<a-select-option value="2"> 导视系统 </a-select-option>
<a-select-option value="3"> 自助服务系统 </a-select-option>
<a-select-option value="4"> 微官网 </a-select-option>
<a-select-option value="5"> 数字填单系统 </a-select-option>
</a-select>
<a-range-picker
style="width: 250px"
format="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
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" @click="togetWLLZCount">搜索</a-button>
<a-button @click="resetting">重置</a-button>
</a-space>
</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="操作" 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"/>
<a-input
style="width: 250px"
v-model="searchName"
placeholder="请输入标题或姓名关键字搜索"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" class="addclass" @click="togetWLLZCount"
>搜索</a-button
>
<a-button @click="resetting">重置</a-button>
</a-space>
</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="操作" 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"
:title="'网络理政'"
:visible="visible"
/>
</div>
</template>
<script>
import table from "@/mixins/table";
import FormDetails from "./components/FormDetails.vue";
import {getWLLZList,getWLLZCount,getWLLZInfo} from "@/api/dataAdmin"
import {export2Excel} from "@/utils/js/exportExcel";
import { getWLLZList, getWLLZCount, getWLLZInfo } from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
const tHeader = [
// 导出的表头名信息
"建议标题",
"建议类型",
"真实姓名",
"联系电话",
"是否公开",
"是否保密",
"提交日期",
"是否回复",
"回复人",
"回复时间",
"所属部门",
]
// 导出的表头名信息
"建议标题",
"建议类型",
"真实姓名",
"联系电话",
"是否公开",
"是否保密",
"提交日期",
"是否回复",
"回复人",
"回复时间",
"所属部门",
];
const filterVal = [
// 导出的表头字段名,需要导出表格字段名
"title",
"type",
"upname",
"upphone",
"valid",
"secrecy",
"create_time",
"status",
"reply_name",
"update_time",
"deptName",
]
// 导出的表头字段名,需要导出表格字段名
"title",
"type",
"upname",
"upphone",
"valid",
"secrecy",
"create_time",
"status",
"reply_name",
"update_time",
"deptName",
];
export default {
mixins: [table],
name: "networkForm",
data() {
return {
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
{
title: "建议标题",
align: "center",
dataIndex: "title",
width: "300px"
},
{
title: "建议类型",
align: "center",
dataIndex: "type",
customRender: (text, record, index) => {
return text==1?'部门建议':text==2?'办事建议':text==3?'网站建议':text==4?'我要就错':text==5?'我要投诉':'我要咨询'
},
},
{
title: "真实姓名",
align: "center",
dataIndex: "upname",
},
{
title: "联系电话",
align: "center",
dataIndex: "upphone",
},
{
title: "是否公开",
align: "center",
dataIndex: "valid",
customRender: (text, record, index) => {
return text==1?'':''
},
},
{
title: "是否保密",
align: "center",
dataIndex: "secrecy",
customRender: (text, record, index) => {
return text==1?'':''
},
},
{
title: "提交日期",
align: "center",
dataIndex: "create_time",
},
{
title: "是否回复",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => {
return text==1?'':''
},
},
{
title: "回复人",
align: "center",
dataIndex: "reply_name",
},
{
title: "回复时间",
align: "center",
dataIndex: "update_time",
},
{
title: "所属部门",
align: "center",
dataIndex: "deptName",
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
},
],
searchName: undefined,
visible: false,
nowSite:null,//当前站点
isReply:false,//是否回复
nowType:undefined,//当前类型
nowDevice:undefined,// 来源
timeList:[],// 时间
JYCount:0,//建议次数
HFCount:0,//回复次数
btnLoading: false,
};
},
components: {
FormDetails
},
mounted() {
this.setMoment();
// 设置默认时间为今天
this.timeList=[this.$moment().format("YYYY-MM-DD"),this.$moment().format("YYYY-MM-DD")]
this.nowSite = localStorage.getItem('siteId');
this.togetWLLZCount()
},
watch:{
tablePagination(){
this.togetWLLZCount()
}
},
methods: {
//重置
resetting() {
this.timeList=[this.$moment().format("YYYY-MM-DD"),this.$moment().format("YYYY-MM-DD")]
this.nowType = undefined
this.nowDevice = undefined
this.searchName = undefined
this.isReply = false
this.togetWLLZCount()
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "部门建议",
2: "办事建议",
3: "网站建议",
4: "我要就错",
5: "我要投诉",
6: "我要咨询",
};
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];
}
});
item.valid == 1?item.valid = "":item.valid = ''
item.secrecy == 1?item.secrecy = "":item.secrecy = ''
item.status == 1?item.status = "":item.status = ''
});
} else {
let datas = this.$_.cloneDeep(
await getWLLZList({
page: 1,
size: -1,
status:this.isReply?0:"",
type:this.nowType,
device:this.nowDevice,
keyword:this.searchName,
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];
}
});
item.valid == 1?item.valid = "":item.valid = ''
item.secrecy == 1?item.secrecy = "":item.secrecy = ''
item.status == 1?item.status = "":item.status = ''
}
}
export2Excel(
tHeader,
filterVal,
data,
"网络理政报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
changeReply(e){
this.isReply = e.target.checked
mixins: [table],
name: "networkForm",
data() {
return {
tableHeaders: [
{
title: "序号",
dataIndex: "index",
width: "60px",
key: "index",
align: "center",
customRender: (text, record, index) => `${index + 1}`,
},
changeType(e){
this.nowType = e
{
title: "建议标题",
align: "center",
dataIndex: "title",
width: "300px",
customRender: (text, record, index) => `${record.title || "--"}`,
},
changeDevice(e){
this.nowDevice=e
{
title: "建议类型",
align: "center",
dataIndex: "type",
customRender: (text, record, index) => {
return text == 1
? "部门建议"
: text == 2
? "办事建议"
: text == 3
? "网站建议"
: text == 4
? "我要就错"
: text == 5
? "我要投诉"
: "我要咨询";
},
},
togetWLLZInfo(id){
getWLLZInfo({
id:id
}).then((res)=>{
console.log(res);
const{code,data}=res;
if(code==1){
this.$refs.FormDetails.fromData=data
}
})
{
title: "真实姓名",
align: "center",
dataIndex: "upname",
customRender: (text, record, index) => `${record.upname || "--"}`,
},
togetWLLZCount(){
let option = {
siteid:this.nowSite,
time:this.timeList,
keyword:this.searchName,
type:this.nowType,
device:this.nowDevice,
status:this.isReply?0:"",//0处理,空为不处理
}
getWLLZCount(option).then((res)=>{
const {code,data} = res;
if(code==1){
this.JYCount = data.all_count,
this.HFCount = data.hf_count
}
})
let params = {
page:this.tablePagination.current,
size:this.tablePagination.pageSize,
status:this.isReply?0:"",
type:this.nowType,
device:this.nowDevice,
keyword:this.searchName,
time:this.timeList,
}
getWLLZList(params).then((res)=>{
const {code,data} = res;
if(code==1){
this.tableSourceData = data.data
this.tablePagination.total = data.total
}
})
{
title: "联系电话",
align: "center",
dataIndex: "upphone",
customRender: (text, record, index) => `${record.upphone || "--"}`,
},
rangePickerChange(val) {
this.timeList = [this.$moment(val[0]).format("YYYY-MM-DD"),this.$moment(val[1]).format("YYYY-MM-DD")]
{
title: "是否公开",
align: "center",
dataIndex: "valid",
customRender: (text, record, index) => {
return record.valid == 1 ? "" : "";
},
},
showDrawer(record) {
this.visible = true;
this.togetWLLZInfo(record.id)
{
title: "是否保密",
align: "center",
dataIndex: "secrecy",
customRender: (text, record, index) => {
return record.secrecy == 1 ? "" : "";
},
},
onClose() {
this.visible = false;
{
title: "提交日期",
align: "center",
dataIndex: "create_time",
customRender: (text, record, index) =>
`${record.create_time || "--"}`,
},
{
title: "是否回复",
align: "center",
dataIndex: "status",
customRender: (text, record, index) => {
return record.status == 1 ? "" : "";
},
},
{
title: "回复人",
align: "center",
dataIndex: "reply_name",
customRender: (text, record, index) => `${record.reply_name || "--"}`,
},
{
title: "回复时间",
align: "center",
dataIndex: "update_time",
customRender: (text, record, index) =>
`${record.update_time || "--"}`,
},
{
title: "所属部门",
align: "center",
dataIndex: "deptName",
customRender: (text, record, index) => `${record.deptName || "--"}`,
},
{
title: "操作",
align: "center",
dataIndex: "操作",
scopedSlots: {
customRender: "操作",
},
},
],
searchName: undefined,
visible: false,
nowSite: null, //当前站点
isReply: false, //是否回复
nowType: undefined, //当前类型
nowDevice: undefined, // 来源
timeList: [], // 时间
JYCount: 0, //建议次数
HFCount: 0, //回复次数
btnLoading: false,
};
},
components: {
FormDetails,
},
mounted() {
this.setMoment();
// 设置默认时间为今天
this.timeList = [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
];
this.nowSite = localStorage.getItem("siteId");
this.togetWLLZCount();
},
watch: {
tablePagination() {
this.togetWLLZCount();
},
},
methods: {
//重置
resetting() {
this.timeList = [
this.$moment().format("YYYY-MM-DD"),
this.$moment().format("YYYY-MM-DD"),
];
this.nowType = undefined;
this.nowDevice = undefined;
this.searchName = undefined;
this.isReply = false;
this.togetWLLZCount();
},
// 导出
async handleExportTable() {
this.btnLoading = true;
let obj = {
1: "部门建议",
2: "办事建议",
3: "网站建议",
4: "我要就错",
5: "我要投诉",
6: "我要咨询",
};
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];
}
});
item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1 ? (item.status = "") : (item.status = "");
});
} else {
let datas = this.$_.cloneDeep(
await getWLLZList({
page: 1,
size: -1,
status: this.isReply ? 0 : "",
type: this.nowType,
device: this.nowDevice,
keyword: this.searchName,
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];
}
});
item.valid == 1 ? (item.valid = "") : (item.valid = "");
item.secrecy == 1 ? (item.secrecy = "") : (item.secrecy = "");
item.status == 1 ? (item.status = "") : (item.status = "");
}
}
export2Excel(
tHeader,
filterVal,
data,
"网络理政报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
changeReply(e) {
this.isReply = e.target.checked;
},
changeType(e) {
this.nowType = e;
},
changeDevice(e) {
this.nowDevice = e;
},
// 页面跳转
pagTableChange(pagination) {
this.tablePagination = pagination;
this.togetWLLZCount();
},
togetWLLZInfo(id) {
getWLLZInfo({
id: id,
}).then((res) => {
console.log(res);
const { code, data } = res;
if (code == 1) {
this.$refs.FormDetails.fromData = data;
}
});
},
togetWLLZCount() {
let option = {
siteid: this.nowSite,
time: this.timeList,
keyword: this.searchName,
type: this.nowType,
device: this.nowDevice,
status: this.isReply ? 0 : "", //0处理,空为不处理
};
getWLLZCount(option).then((res) => {
const { code, data } = res;
if (code == 1) {
(this.JYCount = data.all_count), (this.HFCount = data.hf_count);
}
});
let params = {
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
status: this.isReply ? 0 : "",
type: this.nowType,
device: this.nowDevice,
keyword: this.searchName,
time: this.timeList,
};
getWLLZList(params).then((res) => {
const { code, data } = res;
if (code == 1) {
this.tableSourceData = data.data;
this.tablePagination.total = data.total;
}
});
},
rangePickerChange(val) {
this.timeList = [
this.$moment(val[0]).format("YYYY-MM-DD"),
this.$moment(val[1]).format("YYYY-MM-DD"),
];
},
showDrawer(record) {
this.visible = true;
this.togetWLLZInfo(record.id);
},
onClose() {
this.visible = false;
},
},
};
</script>
<style lang="less" scoped>
/deep/.ant-spin-container {
display: block;
display: block;
}
.header_box {
padding-bottom: 1rem;
padding-bottom: 1rem;
display: flex;
justify-content: space-between;
align-items: center;
& > div {
display: flex;
justify-content: space-between;
justify-content: flex-start;
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;
b {
font-style: normal;
font-weight: unset;
font-size: 16px;
margin-left: 20px;
i {
color: #0595fd;
font-style: normal;
}
}
i {
color: #0595fd;
font-style: normal;
}
}
sub {
font-size: 14px;
font-style: normal;
bottom: unset;
margin-left: 20px;
}
sub {
font-size: 14px;
font-style: normal;
bottom: unset;
margin-left: 20px;
}
}
}
.tabFont {
font-size: 12px;
font-weight: 300;
font-size: 12px;
font-weight: 300;
}
</style>
......@@ -2,7 +2,7 @@
<div class="queueRecord-Container">
<div class="header_box">
<div>
<a-button :loading="btnLoading" type="primary" class="addclass" @click="handleExportTable">
<a-button :loading="btnLoading" type="primary" class="addclass" @click="handleExportTable">
<span>{{ tableSelectedRows.length ? "导出" : "导出全部" }}</span>
</a-button>
<b>取号次数:<i>{{ tablePagination.total }}</i></b>
......@@ -27,7 +27,7 @@
<a-input v-model="searchForm.flownum" placeholder="请输入排队编号搜索" @pressEnter="handleSearch">
<a-icon slot="prefix" type="search" />
</a-input>
<a-button type="primary" class="addclass" @click="handleSearch">搜索</a-button>
<a-button type="primary" class="addclass" @click="handleSearch">搜索</a-button>
<a-button @click="resetBtn">重置</a-button>
</a-space>
</span>
......@@ -125,6 +125,8 @@ import {
getWorkmananalyse,
} from "@/api/dataAdmin";
import { export2Excel } from "@/utils/js/exportExcel";
import { loading } from "@jiaminghi/data-view";
let ExcelDate = []
export default {
name: "PortalAdminVueQueueRecord",
mixins: [table],
......@@ -432,27 +434,76 @@ export default {
}
});
});
} else {
data = this.$_.cloneDeep(
await this.getQueueDataArr({ page: 1, size: -1 })
export2Excel(
this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
if (!data.length) return;
for (let item of data) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
this.btnLoading = false;
} else {
ExcelDate = []
await this.dataSection(1, 1000, () => {
if (!ExcelDate.length) return;
for (let item of ExcelDate) {
Object.keys(obj).forEach((key) => {
if (item.style == key) {
item.style = obj[key];
}
});
}
export2Excel(
this.tHeader,
this.filterVal,
ExcelDate,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
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];
// }
// });
// }
}
export2Excel(
this.tHeader,
this.filterVal,
data,
"排队记录报表" + this.$moment().format("YYYYMMDDHHmmss")
);
this.btnLoading = false;
},
// 数据切片
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>
......
......@@ -4,7 +4,7 @@
<script>
import { deepClone } from "@/utils/js/common.js";
import lodash from "lodash";
import{getStatisticAges} from '@/api/dataAdmin.js'
import { getStatisticAges } from "@/api/dataAdmin.js";
export default {
props: {
info: {
......@@ -12,7 +12,7 @@ export default {
default: () => [
{
value: 200,
name: "20",
name: "20",
},
{
value: 400,
......@@ -40,16 +40,30 @@ export default {
type: Object,
default: () => {},
},
day: {
type: String,
default: () => "0",
},
},
watch: {
day(newval, oldval) {
newval ? this.getData() : "";
},
},
async mounted() {
let res = await getStatisticAges()
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);
this.getData();
},
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 echarts = this.$echarts;
let option = {
......@@ -72,9 +86,9 @@ export default {
xAxis: {
type: "category",
data: label,
axisTick:{
show:false
}
axisTick: {
show: false,
},
},
yAxis: {
type: "value",
......@@ -105,4 +119,4 @@ export default {
},
},
};
</script>
\ No newline at end of file
</script>
......@@ -4,7 +4,7 @@
<script>
import { deepClone } from "@/utils/js/common.js";
import lodash from "lodash";
import{getStatisticSexual} from '@/api/dataAdmin.js'
import { getStatisticSexual } from "@/api/dataAdmin.js";
export default {
props: {
info: {
......@@ -24,14 +24,31 @@ export default {
type: Object,
default: () => {},
},
day: {
type: String,
default: () => "0",
},
},
watch: {
day(newval, oldval) {
newval ? this.getData() : "";
},
},
async mounted() {
let res = await getStatisticSexual()
if (res.code != 1) return
let value = res.data.map(({idcard_Sex,nums})=>({name:idcard_Sex,value:nums}))
this._initEcharts(value);
mounted() {
this.getData();
},
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) {
const myChart = this.$echarts.init(this.$el);
const echarts = this.$echarts;
......@@ -87,13 +104,13 @@ export default {
rich_green: {
color: "#50CCCB",
},
}
},
},
label: {
normal: {
formatter: "{d}%", //自定义显示格式(b:name, c:value, d:百分比)
},
},
label: {
normal: {
formatter: '{d}%' //自定义显示格式(b:name, c:value, d:百分比)
}
},
labelLine: {
length: 10,
length2: 60,
......@@ -119,4 +136,4 @@ export default {
},
},
};
</script>
\ No newline at end of file
</script>
<template>
<div class="CrowdPortrait-Container">
<div class="diyufenbu">
<Head :title="'地域分布'">
<template slot="operation">
<a-range-picker valueFormat="YYYY-MM-DD" class="range_picker_style" @change="rangePickerChange"
v-model="BegindAndEndTime" v-if="day == 5">
</a-range-picker>
<a-select v-model="day">
<a-select-option value="0"> 今天 </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="3"> 近90天 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option>
</a-select>
<div class="CrowdPortrait-Container">
<div class="diyufenbu">
<Head :title="'地域分布'">
<template slot="operation">
<a-range-picker
valueFormat="YYYY-MM-DD"
class="range_picker_style"
@change="rangePickerChange"
v-model="BegindAndEndTime"
v-if="day == 5"
>
</a-range-picker>
<a-select v-model="day">
<a-select-option value="0"> 今天 </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="3"> 近3月 </a-select-option>
<a-select-option value="4"> 本年度 </a-select-option>
<!-- <a-select-option value="5"> 自定义 </a-select-option> -->
</a-select>
<a-button type="primary" class="addclass" @click="searchData">搜索</a-button>
</template>
</Head>
<div class="diyufenbu_box">
<div class="_left">
<div ref="chart" style="width: 100%;height: 100%;"></div>
</div>
<ul class="_right">
<li class="list">
<span style="margin-right: 20px;">排名</span>
<i>地区</i>
<b>预约热度</b>
</li>
<li class="list" v-for="item,index in area" :key="index">
<span style="margin-right: 20px;">NO.{{ index+1 }}</span>
<i>{{item.area}}</i>
<b>
<a-progress :percent="item.nums" :show-info="false" status="active" /></b>
</li>
</ul>
</div>
</div>
<div class="center_box">
<div class="nianling">
<Head :title="'年龄分布'"> </Head>
<NianlingBar class="echarts" />
</div>
<div class="xingbie">
<Head :title="'性别分布'"> </Head>
<XingbiePie class="echarts" />
</div>
</div>
<div class="bottom_box">
<Head :title="'签到准时率'"> </Head>
<div class="echarts">
<QiandaoPie class="list" :info="item" v-for="item,index in sign" :key="index" />
</div>
</div>
</div>
<a-button type="primary" class="addclass" @click="searchData"
>搜索</a-button
>
</template>
</Head>
<div class="diyufenbu_box">
<div class="_left">
<div ref="chart" style="width: 100%; height: 100%"></div>
</div>
<ul class="_right">
<li class="list">
<span style="margin-right: 20px">排名</span>
<i>地区</i>
<b>预约热度</b>
</li>
<li class="list" v-for="(item, index) in area" :key="index">
<span style="margin-right: 20px">NO.{{ index + 1 }}</span>
<i>{{ item.area }}</i>
<b>
<a-progress
:percent="item.nums"
:show-info="false"
status="active"
/></b>
</li>
</ul>
</div>
</div>
<div class="center_box">
<div class="nianling">
<Head :title="'年龄分布'"> </Head>
<NianlingBar class="echarts" :day="dayValue" />
</div>
<div class="xingbie">
<Head :title="'性别分布'"> </Head>
<XingbiePie class="echarts" :day="dayValue" ref="ageChild" />
</div>
</div>
<div class="bottom_box">
<Head :title="'签到准时率'"> </Head>
<div class="echarts">
<QiandaoPie
class="list"
:info="item"
v-for="(item, index) in sign"
:key="index"
/>
</div>
</div>
</div>
</template>
<script>
import NianlingBar from "./components/bar.vue";
import XingbiePie from "./components/pie.vue";
import QiandaoPie from "./components/pie2.vue";
import Head from "./components/header.vue";
import {
getStatisticArea,
getStatisticSignin
} from '@/api/dataAdmin.js'
import axios from 'axios'
import * as echarts from 'echarts'
import china from "@/assets/json/china.json";
export default {
name: "PortalAdminVueCrowdPortrait",
data() {
return {
day: '0',
BegindAndEndTime: [],
area: [],
sign: [],
chart: null
};
},
components: {
Head,
NianlingBar,
XingbiePie,
QiandaoPie,
},
mounted() {
this.init(china)
this.getStatisticArea()
this.getStatisticSignin()
},
methods: {
// 搜索
searchData() {
this.getStatisticArea()
this.getStatisticSignin()
},
async getStatisticArea() {
let res = await getStatisticArea()
if (res.code != 1) return
this.area = res.data
},
async getStatisticSignin() {
let res = await getStatisticSignin()
if (res.code != 1) return
this.sign = res.data
},
//初始化
init(data) {
if (this.chart == null) {
this.chart = echarts.init(this.$refs.chart);
}
echarts.registerMap('china', data);
var geoGpsMap = [104.64, 28.75];
var geoCoordMap = {
'江苏': [118.8062, 31.9208],
'黑龙江': [127.9688, 45.368],
'内蒙古': [110.3467, 41.4899],
'吉林': [125.8154, 44.2584],
'北京': [116.4551, 40.2539],
'辽宁': [123.1238, 42.1216],
'河北': [114.4995, 38.1006],
'天津': [117.4219, 39.4189],
'山西': [112.3352, 37.9413],
'陕西': [109.1162, 34.2004],
'甘肃': [103.5901, 36.3043],
'宁夏': [106.3586, 38.1775],
'青海': [101.4038, 36.8207],
'新疆': [87.9236, 43.5883],
'四川': [103.9526, 30.7617],
'重庆': [108.384366, 30.439702],
'山东': [117.1582, 36.8701],
'河南': [113.4668, 34.6234],
'安徽': [117.29, 32.0581],
'湖北': [114.3896, 30.6628],
'浙江': [119.5313, 29.8773],
'福建': [119.4543, 25.9222],
'江西': [116.0046, 28.6633],
'湖南': [113.0823, 28.2568],
'贵州': [106.6992, 26.7682],
'云南': [102.9199, 25.4663],
'广东': [113.12244, 23.009505],
'广西': [108.479, 23.1152],
'海南': [110.3893, 19.8516],
'上海': [121.4648, 31.2891],
'西藏': [91.141017, 29.668461],
'台湾': [121.509062, 25.044332]
};
var data = [];
var mapData = [];
for (var key in geoCoordMap) {
if (name.includes(key)) {
geoGpsMap = geoCoordMap[key];
}
const keys = key;
const filters = data.filter(item => {
return item.name.includes(keys);
})[0];
import NianlingBar from "./components/bar.vue";
import XingbiePie from "./components/pie.vue";
import QiandaoPie from "./components/pie2.vue";
import Head from "./components/header.vue";
import { getStatisticArea, getStatisticSignin } from "@/api/dataAdmin.js";
import axios from "axios";
import * as echarts from "echarts";
import china from "@/assets/json/china.json";
export default {
name: "PortalAdminVueCrowdPortrait",
data() {
return {
day: "0",
BegindAndEndTime: [],
area: [],
sign: [],
chart: null,
dayValue: "",
};
},
components: {
Head,
NianlingBar,
XingbiePie,
QiandaoPie,
},
mounted() {
this.init(china);
this.getStatisticArea();
this.getStatisticSignin();
this.dayValue = this.day;
},
methods: {
// 搜索
searchData() {
this.getStatisticArea();
this.getStatisticSignin();
this.dayValue = this.day;
},
async getStatisticArea() {
let res = await getStatisticArea({
selected: this.day == 5 ? null : this.day,
});
if (res.code != 1) return;
this.area = res.data;
},
async getStatisticSignin() {
let res = await getStatisticSignin({
selected: this.day == 5 ? null : this.day,
});
if (res.code != 1) return;
this.sign = res.data;
},
//初始化
init(data) {
if (this.chart == null) {
this.chart = echarts.init(this.$refs.chart);
}
echarts.registerMap("china", data);
var geoGpsMap = [104.64, 28.75];
var geoCoordMap = {
江苏: [118.8062, 31.9208],
黑龙江: [127.9688, 45.368],
内蒙古: [110.3467, 41.4899],
吉林: [125.8154, 44.2584],
北京: [116.4551, 40.2539],
辽宁: [123.1238, 42.1216],
河北: [114.4995, 38.1006],
天津: [117.4219, 39.4189],
山西: [112.3352, 37.9413],
陕西: [109.1162, 34.2004],
甘肃: [103.5901, 36.3043],
宁夏: [106.3586, 38.1775],
青海: [101.4038, 36.8207],
新疆: [87.9236, 43.5883],
四川: [103.9526, 30.7617],
重庆: [108.384366, 30.439702],
山东: [117.1582, 36.8701],
河南: [113.4668, 34.6234],
安徽: [117.29, 32.0581],
湖北: [114.3896, 30.6628],
浙江: [119.5313, 29.8773],
福建: [119.4543, 25.9222],
江西: [116.0046, 28.6633],
湖南: [113.0823, 28.2568],
贵州: [106.6992, 26.7682],
云南: [102.9199, 25.4663],
广东: [113.12244, 23.009505],
广西: [108.479, 23.1152],
海南: [110.3893, 19.8516],
上海: [121.4648, 31.2891],
西藏: [91.141017, 29.668461],
台湾: [121.509062, 25.044332],
};
var data = [];
var mapData = [];
for (var key in geoCoordMap) {
if (name.includes(key)) {
geoGpsMap = geoCoordMap[key];
}
const keys = key;
const filters = data.filter((item) => {
return item.name.includes(keys);
})[0];
mapData.push({
name: key,
value: filters ? filters.value : 0
});
}
mapData.sort((a, b) => {
return a.value - b.value;
});
const colors = ['#4a99de', '#1890FF'];
mapData.push({
name: key,
value: filters ? filters.value : 0,
});
}
mapData.sort((a, b) => {
return a.value - b.value;
});
const colors = ["#4a99de", "#1890FF"];
var convertData = function (data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value),
});
}
}
return res;
};
var convertToLineData = function (data, gps) {
var res = [];
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
var fromCoord = geoCoordMap[dataItem.name];
var toCoord = gps; // gps:‘中心点’
if (fromCoord && toCoord) {
res.push({
fromName: gps,
toName: dataItem.name,
coords: [fromCoord, toCoord],
});
}
}
return res;
};
let option = {
// backgroundColor: '#01193f',
color: ["#3BD8FF"], //飞线的颜色
series: [
// 地图线的动画效果
{
type: "lines",
zlevel: 2,
effect: {
show: true,
period: 4,
trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
symbol: "circle", //箭头图标
symbolSize: 5, //图标大小
},
lineStyle: {
normal: {
width: 2,
opacity: 0.05, //尾迹线条透明度
curveness: 0.01, //尾迹线条曲直度
},
},
tooltip: {
show: false,
},
data: convertToLineData(mapData, geoGpsMap),
},
// 地图点的动画效果
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 2,
data: convertData(mapData).map((item) => {
return {
name: item.name,
value: item.value.splice(0, 2),
};
}),
// showEffectOn: 'render',
rippleEffect: {
period: 6, //动画时间,值越小速度越快
brushType: "fill", //波纹绘制方式 stroke, fill
scale: 4, //波纹圆环最大限制,值越大波纹越大
color: "#3BD8FF",
},
// hoverAnimation: true,
symbol: "circle",
symbolSize: 5,
itemStyle: {
normal: {
show: true,
color: "#3BD8FF",
// shadowBlur: 20,
// shadowColor: '#333'
},
},
},
var convertData = function(data) {
var res = [];
for (var i = 0; i < data.length; i++) {
var geoCoord = geoCoordMap[data[i].name];
if (geoCoord) {
res.push({
name: data[i].name,
value: geoCoord.concat(data[i].value)
});
}
}
return res;
};
var convertToLineData = function(data, gps) {
var res = [];
for (var i = 0; i < data.length; i++) {
var dataItem = data[i];
var fromCoord = geoCoordMap[dataItem.name];
var toCoord = gps; // gps:‘中心点’
if (fromCoord && toCoord) {
res.push({
fromName: gps,
toName: dataItem.name,
coords: [
fromCoord,
toCoord
]
});
}
}
return res;
};
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 2,
rippleEffect: {
period: 4,
brushType: "fill",
scale: 4,
color: "#ff0000",
},
label: {
normal: {
show: false,
position: "top",
// offset: [5, 0], //偏移设置
color: "#ff0000",
formatter: "宜宾市",
textStyle: {
color: "#fff",
fontSize: "16px",
},
},
emphasis: {
show: true,
},
},
symbol: "circle",
symbolSize: 5,
itemStyle: {
normal: {
show: true,
color: "#ff0000",
},
},
data: [
{
name: "宜宾市",
value: [104.64, 28.75],
},
],
},
let option = {
// backgroundColor: '#01193f',
color: ['#3BD8FF'], //飞线的颜色
series: [
// 地图线的动画效果
{
type: 'lines',
zlevel: 2,
effect: {
show: true,
period: 4,
trailLength: 0.02, //特效尾迹长度[0,1]值越大,尾迹越长重
symbol: 'circle', //箭头图标
symbolSize: 5, //图标大小
},
lineStyle: {
normal: {
width: 2,
opacity: 0.05, //尾迹线条透明度
curveness: 0.01 //尾迹线条曲直度
}
},
tooltip: {
show: false
},
data: convertToLineData(mapData, geoGpsMap)
},
// 地图点的动画效果
{
type: 'effectScatter',
coordinateSystem: 'geo',
zlevel: 2,
data: convertData(mapData).map(item => {
return {
name: item.name,
value: item.value.splice(0, 2)
};
}),
// showEffectOn: 'render',
rippleEffect: {
period: 6, //动画时间,值越小速度越快
brushType: 'fill', //波纹绘制方式 stroke, fill
scale: 4, //波纹圆环最大限制,值越大波纹越大
color: '#3BD8FF'
},
// hoverAnimation: true,
symbol: 'circle',
symbolSize: 5,
itemStyle: {
normal: {
show: true,
color: '#3BD8FF',
// shadowBlur: 20,
// shadowColor: '#333'
}
}
},
{
type: "effectScatter",
coordinateSystem: "geo",
zlevel: 2,
rippleEffect: {
period: 4,
brushType: "fill",
scale: 4,
color: '#ff0000'
},
label: {
normal: {
show: false,
position: "top",
// offset: [5, 0], //偏移设置
color: "#ff0000",
formatter: "宜宾市",
textStyle: {
color: "#fff",
fontSize: '16px'
}
},
emphasis: {
show: true
}
},
symbol: "circle",
symbolSize: 5,
itemStyle: {
normal: {
show: true,
color: "#ff0000"
}
},
data: [{
name: '宜宾市',
value: [104.64, 28.75]
}],
},
// 地图?
{
type: 'map',
mapType: 'china',
top: '30%',
left: '25%',
zoom: 1.7,
label: { // 地图上的文字
normal: {
show: false,
textStyle: {
color: '#ffffff'
}
}
},
itemStyle: {
normal: {
areaColor: {
image: require('@/assets/images/Banner.png'), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
repeat: 'repeat' // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat'
},
borderColor: '#76C6E7',
borderWidth: 1,
shadowColor: '#CCEAFD',
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 0,
},
},
emphasis: { // 高亮时区域颜色
itemStyle: {
areaColor: '#1890FF',
},
label: {
color: '#ffffff'
}
},
select: {
itemStyle: {
areaColor: '#1890FF'
},
label: {
color: '#ffffff'
}
},
data: data.map((item, index) => {
return {
name: item.name,
value: item.value,
itemStyle: {
areaColor: item.value > 10 ? colors[1] : colors[0]
}
};
})
}
],
geo: {
map: 'china',
top: '30%',
aspectScale: 0.75, // 长宽比
left: '25%',
zoom: 1.7,
roam: false,
itemStyle: {
normal: {
shadowColor: '#CCEAFD',
shadowOffsetX: 0,
shadowOffsetY: 0
}
},
regions: [{
name: '南海诸岛',
itemStyle: {
normal: {
opacity: 0,
label: {
show: false
}
}
}
}]
}
};
this.chart.setOption(option);
}
},
};
// 地图?
{
type: "map",
mapType: "china",
top: "30%",
left: "25%",
zoom: 1.7,
label: {
// 地图上的文字
normal: {
show: false,
textStyle: {
color: "#ffffff",
},
},
},
itemStyle: {
normal: {
areaColor: {
image: require("@/assets/images/Banner.png"), // 支持为 HTMLImageElement, HTMLCanvasElement,不支持路径字符串
repeat: "repeat", // 是否平铺,可以是 'repeat-x', 'repeat-y', 'no-repeat'
},
borderColor: "#76C6E7",
borderWidth: 1,
shadowColor: "#CCEAFD",
shadowOffsetX: 0,
shadowOffsetY: 0,
shadowBlur: 0,
},
},
emphasis: {
// 高亮时区域颜色
itemStyle: {
areaColor: "#1890FF",
},
label: {
color: "#ffffff",
},
},
select: {
itemStyle: {
areaColor: "#1890FF",
},
label: {
color: "#ffffff",
},
},
data: data.map((item, index) => {
return {
name: item.name,
value: item.value,
itemStyle: {
areaColor: item.value > 10 ? colors[1] : colors[0],
},
};
}),
},
],
geo: {
map: "china",
top: "30%",
aspectScale: 0.75, // 长宽比
left: "25%",
zoom: 1.7,
roam: false,
itemStyle: {
normal: {
shadowColor: "#CCEAFD",
shadowOffsetX: 0,
shadowOffsetY: 0,
},
},
regions: [
{
name: "南海诸岛",
itemStyle: {
normal: {
opacity: 0,
label: {
show: false,
},
},
},
},
],
},
};
this.chart.setOption(option);
},
},
};
</script>
<style lang="less" scoped>
.CrowdPortrait-Container {
background: #f0f2f5;
.CrowdPortrait-Container {
background: #f0f2f5;
& > .diyufenbu {
background: #fff;
&>.diyufenbu {
background: #fff;
.diyufenbu_box {
display: flex;
align-items: stretch;
justify-content: space-between;
.diyufenbu_box {
display: flex;
align-items: stretch;
justify-content: space-between;
& > ._left {
flex: 1;
height: 440px;
// background: #fac;
}
&>._left {
flex: 1;
height: 440px;
// background: #fac;
}
& > ._right {
width: 40%;
padding: 15px;
&>._right {
width: 40%;
padding: 15px;
.list {
& + .list {
margin-top: 15px;
}
.list {
&+.list {
margin-top: 15px;
}
&:last-child {
// padding-bottom: 20px;
// border-bottom: 1px solid #eee;
}
&:last-child {
// padding-bottom: 20px;
// border-bottom: 1px solid #eee;
}
display: flex;
justify-content: flex-start;
align-items: center;
display: flex;
justify-content: flex-start;
align-items: center;
span {
text-align: left;
width: 10%;
}
span {
text-align: left;
width: 10%;
}
i {
font-style: normal;
text-align: left;
width: 30%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
i {
font-style: normal;
text-align: left;
width: 30%;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
b {
font-weight: normal;
text-align: left;
width: 60%;
}
}
}
}
}
b {
font-weight: normal;
text-align: left;
width: 60%;
}
}
}
}
}
& > .center_box {
display: flex;
justify-content: space-between;
align-items: stretch;
margin-top: 20px;
&>.center_box {
display: flex;
justify-content: space-between;
align-items: stretch;
margin-top: 20px;
& > .nianling {
height: 430px;
width: 50%;
background: #fff;
margin-right: 20px;
display: flex;
flex-direction: column;
&>.nianling {
height: 430px;
width: 50%;
background: #fff;
margin-right: 20px;
display: flex;
flex-direction: column;
.echarts {
flex: 1;
}
}
.echarts {
flex: 1;
}
}
& > .xingbie {
width: 50%;
width: 50%;
background: #fff;
display: flex;
flex-direction: column;
&>.xingbie {
width: 50%;
width: 50%;
background: #fff;
display: flex;
flex-direction: column;
.echarts {
flex: 1;
}
}
}
.echarts {
flex: 1;
}
}
}
& > .bottom_box {
height: 480px;
margin-top: 20px;
width: 100%;
background: #fff;
display: flex;
flex-direction: column;
&>.bottom_box {
height: 480px;
margin-top: 20px;
width: 100%;
background: #fff;
display: flex;
flex-direction: column;
.echarts {
flex: 1;
display: flex;
flex-wrap: wrap;
.echarts {
flex: 1;
display: flex;
flex-wrap: wrap;
// align-items: stretch;
.list {
// background: #caf;
display: inline-block !important;
width: 20%;
height: 50%;
// margin: 10px;
// width: 333px;
// height: 216px;
}
}
}
.range_picker_style {
margin-right: 20px;
// color: #32a6fb !important;
.ant-calendar-picker-input {
// background: transparent !important;
// border-color: #32a6fb !important;
// color: #32a6fb !important;
}
.ant-calendar-range-picker-separator {
// color: #32a6fb !important;
}
::-webkit-input-placeholder {
/* WebKit browsers,webkit内核浏览器 */
// color: #32a6fb;
// font-size: 16px;
}
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
// color: #32a6fb;
// font-size: 16px;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
// color: #32a6fb;
// font-size: 16px;
}
:-ms-input-placeholder {
/* Internet Explorer 10+ */
// color: #32a6fb;
// font-size: 16px;
}
}
/deep/.ant-input-affix-wrapper {
width: 17rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
border-radius: 5px;
background: #1890ff;
box-shadow: rgb(0 0 0 / 5%) 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;
&:hover {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: rgb(93 24 220) 0px 2px 10px 0px;
}
// align-items: stretch;
.list {
// background: #caf;
display: inline-block !important;
width: 20%;
height: 50%;
// margin: 10px;
// width: 333px;
// height: 216px;
}
}
}
.range_picker_style {
margin-right: 20px;
// color: #32a6fb !important;
.ant-calendar-picker-input {
// background: transparent !important;
// border-color: #32a6fb !important;
// color: #32a6fb !important;
}
.ant-calendar-range-picker-separator {
// color: #32a6fb !important;
}
::-webkit-input-placeholder {
/* WebKit browsers,webkit内核浏览器 */
// color: #32a6fb;
// font-size: 16px;
}
:-moz-placeholder {
/* Mozilla Firefox 4 to 18 */
// color: #32a6fb;
// font-size: 16px;
}
::-moz-placeholder {
/* Mozilla Firefox 19+ */
// color: #32a6fb;
// font-size: 16px;
}
:-ms-input-placeholder {
/* Internet Explorer 10+ */
// color: #32a6fb;
// font-size: 16px;
}
}
/deep/.ant-input-affix-wrapper {
width: 17rem !important;
margin-right: 1rem !important;
}
/deep/.ant-input {
height: 2.3rem !important;
}
/deep/.ant-select-selection {
width: 170px !important;
height: 2.3rem !important;
margin-right: 1rem !important;
}
/deep/.ant-select-selection__rendered {
height: 100% !important;
}
/deep/.ant-select-selection-selected-value {
height: 100% !important;
line-height: 2.3rem !important;
}
.search_btn {
padding: 0.8rem 1.2rem;
border: 0;
border-radius: 5px;
background: #1890ff;
box-shadow: rgb(0 0 0 / 5%) 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;
&:hover {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: rgb(93 24 220) 0px 2px 10px 0px;
}
&:active {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: rgb(93 24 220) 0px 0px 0px 0px;
transform: translateY(2px);
transition: 100ms;
}
}
}
</style>
\ No newline at end of file
&:active {
letter-spacing: 3px;
background-color: #7d5cf9;
color: hsl(0, 0%, 100%);
box-shadow: rgb(93 24 220) 0px 0px 0px 0px;
transform: translateY(2px);
transition: 100ms;
}
}
}
</style>
......@@ -15,9 +15,9 @@
<a-select-option value="0"> 今天 </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="3">90天 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option>
<a-select-option value="3">3月 </a-select-option>
<a-select-option value="4"> 本年度 </a-select-option>
<!-- <a-select-option value="5"> 自定义 </a-select-option> -->
</a-select>
<a-button type="primary" class="addclass" @click="getData">搜索</a-button>
......
......@@ -8,23 +8,25 @@
class="range_picker_style"
@change="rangePickerChange"
v-model="BegindAndEndTime"
v-if="day == 5"
v-if="day == 5"
>
</a-range-picker>
<a-select v-model="day">
<a-select-option value="0"> 今天 </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="3"> 近90天 </a-select-option>
<a-select-option value="4"> 近180天 </a-select-option>
<a-select-option value="5"> 自定义 </a-select-option>
<a-select-option value="2"> 近30天 </a-select-option>
<a-select-option value="3"> 近3月 </a-select-option>
<a-select-option value="4"> 本年度 </a-select-option>
<!-- <a-select-option value="5"> 自定义 </a-select-option> -->
</a-select>
<a-button type="primary" class="addclass" @click="getData">搜索</a-button>
<a-button type="primary" class="addclass" @click="getData"
>搜索</a-button
>
</template>
</Head>
<div class="echarts">
<Brokenline :info="chartsData" v-if="chartsData"/>
<Brokenline :info="chartsData" v-if="chartsData" />
</div>
</div>
<div class="fx">
......@@ -36,11 +38,13 @@
:pagination="false"
:columns="tableHeaders"
:dataSource="tableSourceData"
:scroll="{ y: 590 }"
:scroll="{ y: 590 }"
>
</a-table>
<p class="updateTime">
<i class="fa fa-info-circle"></i>数据更新时间:{{date}},受数据波动影响,可能会有延迟。
<i class="fa fa-info-circle"></i>数据更新时间:{{
date
}},受数据波动影响,可能会有延迟。
</p>
</div>
</div>
......@@ -50,16 +54,16 @@
<script>
import Head from "./components/header.vue";
import Brokenline from "./components/line.vue";
import {getTrend} from '@/api/dataAdmin.js'
import moment from 'moment'
import { getTrend } from "@/api/dataAdmin.js";
import moment from "moment";
export default {
name: "PortalAdminVueMakeDataAnalyse",
data() {
return {
day:'0',
date:'',
day: "0",
date: "",
BegindAndEndTime: [],
chartsData:null,
chartsData: null,
tableSourceData: [],
tableHeaders: [
{
......@@ -99,33 +103,33 @@ export default {
Head,
Brokenline,
},
watch:{
day(val){
if (val != 5) this.BegindAndEndTime = []
}
watch: {
day(val) {
if (val != 5) this.BegindAndEndTime = [];
},
},
mounted() {
this.date = moment().format('yyyy-MM-DD hh:mm:ss')
this.getData()
this.date = moment().format("yyyy-MM-DD hh:mm:ss");
this.getData();
},
methods: {
getData(){
getTrend({
selected:this.day == 5 ? null : this.day,
time:this.BegindAndEndTime
}).then(res=>{
this.chartsData = res.data.list
this.tableSourceData.push({
研究对象: `预约次数`,
预约总量: res.data.orderAll,
开放预约天数: res.data.openday,
预约日均值: res.data.prev_num,
整体同比: res.data.tbi,
整体环比: res.data.hbi,
});
})
},
getData() {
getTrend({
selected: this.day == 5 ? null : this.day,
time: this.BegindAndEndTime,
}).then((res) => {
this.chartsData = res.data.list;
this.tableSourceData.push({
研究对象: `预约次数`,
预约总量: res.data.orderAll,
开放预约天数: res.data.openday,
预约日均值: res.data.prev_num,
整体同比: res.data.tbi,
整体环比: res.data.hbi,
});
});
},
rangePickerChange(val) {
console.log(val);
},
......@@ -234,4 +238,4 @@ export default {
}
}
}
</style>
\ No newline at end of file
</style>
<template>
<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-title">智慧政务一体化数据管理</div>
<div class="slogan-text">
......@@ -38,7 +56,16 @@
</li>
</template>
</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>
</ul>
......@@ -183,12 +210,11 @@ export default {
},
// 查看数据
handleCkeck(path) {
if(path.indexOf('http')>-1){
window.open(path)
}else{
if (path.indexOf("http") > -1) {
window.open(path);
} else {
this.$router.push(path);
}
},
// pushRouter1() {
// // 易政秀报表
......@@ -280,17 +306,38 @@ export default {
<style lang="less" scoped>
@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 {
height: 100%;
width: 100%;
// min-height: 960px;
// 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;
padding-top: @headerH;
display: flex;
flex-direction: column;
align-items: center;
overflow: hidden;
.search_box {
display: inline-block;
margin-top: 12.1rem;
......
......@@ -117,6 +117,7 @@ export default {
key: Storage.get(2, "siteId") ? Storage.get(2, "siteId") : "暂无站点", // 当前站点
},
userInfo: Storage.get(2, "userInfo"), // 用户信息
routeInfo: "",
};
},
created() {
......@@ -143,7 +144,9 @@ export default {
this.$bus.$emit("changeSite");
},
handelClick(item) {
this.routeInfo = "";
if (item.key !== this.$route.path) {
sessionStorage.setItem("routeInfo", item.key);
this.$router.push(item.key);
// this.showPage = true;
} else {
......@@ -161,16 +164,24 @@ export default {
});
},
Logout() {
LogoutInterface({}).then((res) => {
// this.$message.success(res.msg);
this.$Storage.remove(2, "Authorization");
this.$Storage.remove(2, "siteId");
this.$Storage.remove(2, "siteName");
this.$Storage.remove(2, "userInfo");
this.SET_USERDATA({});
setTimeout(() => {
this.$router.replace({ path: "/" });
}, 200);
let _this = this;
this.$confirm({
title: "您是否确定退出登录?",
onOk() {
LogoutInterface({}).then((res) => {
// this.$message.success(res.msg);
_this.$Storage.remove(2, "Authorization");
_this.$Storage.remove(2, "siteId");
_this.$Storage.remove(2, "siteName");
_this.$Storage.remove(2, "userInfo");
sessionStorage.removeItem("routeInfo");
_this.SET_USERDATA({});
setTimeout(() => {
_this.$router.replace({ path: "/" });
}, 200);
});
},
onCancel() {},
});
},
fnChangePassword() {
......@@ -178,7 +189,11 @@ export default {
},
// 返回门户
backHome() {
this.$router.push("/home/dataManagement/dataAdmin");
this.$router.push(
sessionStorage.getItem("routeInfo")
? sessionStorage.getItem("routeInfo")
: "/home/dataManagement/dataAdmin"
);
},
},
};
......@@ -309,4 +324,4 @@ export default {
border-color: transparent !important ;
}
}
</style>
\ No newline at end of file
</style>
<template>
<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">
<h3>以客户为中心,以奋斗者为本,永远坚持艰苦奋斗</h3>
<p>“互联网+政务服务”整体解决方案提供商和服务商</p>
<h3 style="text-align: center;font-size: 50px;">宜人·宜宾·宜办事</h3>
<!-- <p>“互联网+政务服务”整体解决方案提供商和服务商</p> -->
</div>
<div class="classification">
<div class="modules">
......@@ -12,7 +30,7 @@
:key="item.id"
@click="openWindow(item.modelUrl)"
>
<div class="picture">
<div class="picture" :style="{background: item.color}">
<img
width="40"
height="35"
......@@ -58,7 +76,13 @@ export default {
this.siteId = Storage.get(2, "siteId");
let res = await appsListInterface({ siteId: this.siteId });
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) {
let token = Storage.get(2, "Authorization");
......@@ -91,13 +115,34 @@ export default {
<style lang="less" scoped>
@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/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: url("~@/assets/images/bg.jpg") center no-repeat;
background-size: cover;
position: relative;
padding-top: @headerH;
overflow: hidden;
.title {
width: 650px;
......@@ -124,7 +169,7 @@ export default {
.classification {
width: 100%;
height: 300px;
height: 410px;
position: absolute;
bottom: 0;
background-color: rgba(3, 23, 24, 0.452);
......@@ -141,7 +186,6 @@ export default {
margin-top: 5px;
text-align: center;
cursor: pointer;
.picture {
width: 72px;
height: 72px;
......
......@@ -3,16 +3,26 @@
<div class="search_box" ref="search_box">
<h3>API服务</h3>
<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">
<span>{{ isSearch ? "重置" : "搜索" }}</span>
<span>搜索</span>
<!-- <span>{{ isSearch ? "重置" : "搜索" }}</span> -->
</button>
</h4>
</div>
<div class="stepbox" :style="{ height: contentHigh + 'px' }">
<div class="_left">
<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)">{{
item.productName
}}</span>
......@@ -25,10 +35,19 @@
<span class="list_title">{{ curApiInfo.name }}</span>
<span class="count primary">{{ curApiInfo.total }}</span>
</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>
<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>
</div>
......@@ -73,7 +92,7 @@ export default {
if (code == 1) {
if (data.data.length) {
this.stepsList = data.data;
this.getApiDetail(data.data[0])
this.getApiDetail(data.data[0]);
} else {
this.curApiInfo = {};
}
......@@ -82,33 +101,38 @@ export default {
},
getApiDetail(item) {
getInterfaceList({ page: 1, size: -1, productId: item.id }).then((res) => {
let { code, data } = res;
if (code == 1) {
this.curApiInfo = {
name: item.productName,
list: data.data,
total: data.total
getInterfaceList({ page: 1, size: -1, productId: item.id }).then(
(res) => {
let { code, data } = res;
if (code == 1) {
this.curApiInfo = {
name: item.productName,
list: data.data,
total: data.total,
};
}
}
});
);
},
handleSearch() {
this.isSearch = !this.isSearch;
if (this.isSearch) {
this.active = -1;
this.getServiceApiList();
} else {
this.searchVal = "";
this.active = 0;
this.getServiceApiList();
}
this.active = 0;
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) {
this.active = index;
this.searchVal = "";
this.getApiDetail(row)
this.getApiDetail(row);
},
pushroeuter(v) {
this.$router.push({
......@@ -138,7 +162,9 @@ export default {
align-items: center;
display: flex;
flex-flow: column;
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
h3 {
font-size: 2.4rem;
color: #fff;
......@@ -177,7 +203,7 @@ export default {
padding: 0;
border: none;
&>span {
& > span {
position: relative;
display: block;
width: 100%;
......@@ -221,8 +247,8 @@ export default {
width: 100%;
}
&>span:before,
&>span:after {
& > span:before,
& > span:after {
position: absolute;
content: "";
left: 0;
......@@ -235,21 +261,21 @@ export default {
transition: all 0.3s ease;
}
&>span:before {
& > span:before {
width: 2px;
height: 0%;
}
&>span:after {
& > span:after {
height: 2px;
width: 0%;
}
&>span:hover:before {
& > span:hover:before {
height: 100%;
}
&>span:hover:after {
& > span:hover:after {
width: 100%;
}
}
......@@ -350,16 +376,22 @@ export default {
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
}
</style>
\ No newline at end of file
</style>
......@@ -3,34 +3,71 @@
<div class="content">
<div class="top">
<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>
<a-card title="接口信息" :bordered="false" class="card_box">
<a-descriptions>
<a-descriptions-item label="接口名称">{{ detailsForm.interfaceName }}</a-descriptions-item>
<a-descriptions-item label="版本号">{{ detailsForm.versionNumber }}</a-descriptions-item>
<a-descriptions-item label="请求类型">{{ detailsForm.requestType == 1 ? 'GET' : 'POST' }}</a-descriptions-item>
<a-descriptions-item label="请求协议">{{ detailsForm.requestProtocol == 1 ? 'HTTP' : 'HTTPS'
<a-descriptions-item label="接口名称">{{
detailsForm.interfaceName
}}</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 }}
<a-descriptions-item label="版本号">{{
detailsForm.versionNumber
}}</a-descriptions-item>
<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 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>
</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 label="接口来源" v-if="dict.interfaceSource">{{
dict.interfaceSource[detailsForm.interfaceSource] }}</a-descriptions-item>
<a-descriptions-item label="请求路径">{{ detailsForm.requestUrl }}</a-descriptions-item>
<br>
<a-descriptions-item label="描述" span="{3}">{{ detailsForm.description }}</a-descriptions-item>
dict.interfaceSource[detailsForm.interfaceSource]
}}</a-descriptions-item>
<a-descriptions-item label="请求路径">{{
detailsForm.requestUrl
}}</a-descriptions-item>
<br />
<a-descriptions-item label="描述" span="{3}">{{
detailsForm.description
}}</a-descriptions-item>
</a-descriptions>
</a-card>
<a-card title="请求参数" :bordered="false" class="card_box">
<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="headers"> headers </a-radio-button>
<a-radio-button value="query"> query </a-radio-button>
......@@ -38,23 +75,37 @@
</a-radio-group>
<div class="flex aic">
<div class="mr10">入参是否加密</div>
<div>{{ detailsForm.inEncrypt == 1 ? '加密' : '不加密' }}</div>
<div>{{ detailsForm.inEncrypt == 1 ? "加密" : "不加密" }}</div>
</div>
</div>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }" :pagination="false"
:columns="table_columns" :dataSource="requestPam.table">
<a-table
size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns"
:dataSource="requestPam.table"
>
</a-table>
</a-card>
<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="mr10">出参是否加密</div>
<div>{{ detailsForm.outEncrypt == 1 ? '加密' : '不加密' }}</div>
<div>{{ detailsForm.outEncrypt == 1 ? "加密" : "不加密" }}</div>
</div>
</div>
<a-table size="middle" bordered :row-key="(record) => record.id" :locale="{ emptyText: '无' }" :pagination="false"
:columns="table_columns" :dataSource="responsePam.table">
<a-table
size="middle"
bordered
:row-key="(record) => record.id"
:locale="{ emptyText: '无' }"
:pagination="false"
:columns="table_columns"
:dataSource="responsePam.table"
>
</a-table>
</a-card>
......@@ -80,9 +131,7 @@
import Vue from "vue";
import hljs from "highlight.js";
import "highlight.js/styles/monokai-sublime.css";
import {
getInterfaceInfo
} from '@/api/thePlatformIsSet.js'
import { getInterfaceInfo } from "@/api/thePlatformIsSet.js";
Vue.directive("highlight", function (el) {
let blocks = el.querySelectorAll("pre code");
blocks.forEach((block) => {
......@@ -97,53 +146,54 @@ export default {
requestPam: {},
responsePam: {},
dict: {},
table_columns: [{
title: "参数名",
align: "center",
dataIndex: "name"
},
{
title: "参数值类型",
align: "center",
dataIndex: "type",
},
{
title: "默认值",
align: "center",
dataIndex: "default",
},
{
title: "是否必填",
align: "center",
dataIndex: "isMust",
customRender: (text, record, index) => `${text == 1 ? '' : ''}`,
},
{
title: "描述",
align: "center",
dataIndex: "describe",
width: 200
}
table_columns: [
{
title: "参数名",
align: "center",
dataIndex: "name",
},
{
title: "参数值类型",
align: "center",
dataIndex: "type",
},
{
title: "默认值",
align: "center",
dataIndex: "default",
},
{
title: "是否必填",
align: "center",
dataIndex: "isMust",
customRender: (text, record, index) => `${text == 1 ? "" : ""}`,
},
{
title: "描述",
align: "center",
dataIndex: "describe",
width: 200,
},
],
allResData: null,
errJson: { "msg": "请选择待查看产品接口信息", "code": -1 }
errJson: { msg: "请选择待查看产品接口信息", code: -1 },
};
},
mounted() {
this.getInfo()
this.getInfo();
},
methods: {
getInfo() {
getInterfaceInfo({ id: this.$route.query.id }).then(res => {
this.allResData = res
res.data.network = res.data.network.split(',')
this.detailsForm = res.data
this.requestPam = JSON.parse(res.data.requestParameters)
this.responsePam = JSON.parse(res.data.responseParameters)
this.dict = res.dict
})
getInterfaceInfo({ id: this.$route.query.id }).then((res) => {
this.allResData = res;
res.data.network = res.data.network.split(",");
this.detailsForm = res.data;
this.requestPam = JSON.parse(res.data.requestParameters);
this.responsePam = JSON.parse(res.data.responseParameters);
this.dict = res.dict;
});
},
toJson(res) {
return JSON.stringify(res);
......@@ -190,39 +240,39 @@ export default {
position: relative;
z-index: 1;
&:hover {
color: rgb(255, 255, 255);
}
// &:hover {
// color: rgb(255, 255, 255);
// }
&::before,
&::after {
content: "";
position: absolute;
top: 0%;
left: 0%;
width: 100%;
height: 100%;
background: rgba(128, 128, 128, 0.096);
backdrop-filter: blur(10px);
z-index: -1;
transition: all 0.4s;
}
// &::before,
// &::after {
// content: "";
// position: absolute;
// top: 0%;
// left: 0%;
// width: 100%;
// height: 100%;
// background: rgba(128, 128, 128, 0.096);
// backdrop-filter: blur(10px);
// z-index: -1;
// transition: all 0.4s;
// }
&::after {
z-index: -2;
transition: all 0.4s;
}
// &::after {
// z-index: -2;
// transition: all 0.4s;
// }
&:hover::before {
background: rgb(0, 0, 0, 0.315);
// border-radius: 10px;
}
// &:hover::before {
// background: rgb(0, 0, 0, 0.315);
// // border-radius: 10px;
// }
&:hover::after {
background: linear-gradient(to right, #cb6ce6, #38b6ff);
// border-radius: 10px;
transform: scale(1.07, 1.2) rotateX(180deg);
}
// &:hover::after {
// background: linear-gradient(to right, #cb6ce6, #38b6ff);
// // border-radius: 10px;
// transform: scale(1.07, 1.2) rotateX(180deg);
// }
}
}
......@@ -236,7 +286,7 @@ export default {
margin-bottom: 1rem;
}
&+.card_box {
& + .card_box {
margin-top: 1rem;
}
}
......@@ -248,16 +298,22 @@ export default {
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
}
</style>
\ No newline at end of file
</style>
......@@ -5,9 +5,10 @@
<h1>应用服务</h1>
<div class="search-box">
<a-input
placeholder="请输入API名称搜索"
placeholder="请输入应用名称搜索"
v-model="searchVal"
@pressEnter="handleSearch"
allow-clear
/>
<button class="search_btn btn" @click="handleSearch">
<span>{{ isSearch ? "重置" : "搜索" }}</span>
......@@ -20,12 +21,12 @@
<div class="_left">
<a-steps progress-dot direction="vertical">
<a-step
v-for="(item, index) in stepsList"
v-for="(item, index) in listArr"
:status="active === index ? 'process' : 'wait'"
:key="index"
>
<span slot="title" @click="handleChange(item, index)">{{
item.serviceName
item.productName
}}</span>
</a-step>
</a-steps>
......@@ -33,27 +34,62 @@
<div class="_right">
<div class="list_box step_sign">
<div class="title-box">
<span class="list_title">{{ curInfo.serviceName }}</span>
<span class="count primary">{{ curInfo.count }}</span>
<span class="list_title">{{
listArr[active] ? listArr[active].productName : "--"
}}</span>
<span class="count primary">{{
listArr[active].curInfo.length
}}</span>
</div>
<div
class="list flex aic jcb"
v-for="itm of curInfo.serviceList"
:key="itm.id"
>
<div class="app-name">{{ itm.packageName }}</div>
<img src="../../../assets/images/php.png" alt />
<div>{{ itm.packageVersion }}</div>
<div class="">{{ itm.packageRemark }}</div>
<div v-if="itm.lapseTime">
失效时间:{{ $moment(itm.lapseTime).format("YYYY-MM-DD") }}
</div>
<a-button
type="primary" class="addclass"
@click="handleDowload(itm.packagePath, itm.systemServiceName)"
<div v-if="listArr[active].curInfo.length > 0">
<div
class="list flex aic jcb"
v-for="(i, j) in listArr[active].curInfo"
>
<a-icon type="download" />下载
</a-button>
<div class="app-name">{{ i.appName }}</div>
<img
v-if="i.deveLanguage == 1"
src="@/assets/images/JAVA.png"
alt
/>
<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>
<a-button
type="primary"
class="addclass"
@click="handleDowload(api + i.appFileUrl, i.appName)"
>
<a-icon type="download" />下载
</a-button>
</div>
</div>
<div v-else>
<div class="list flex aic jcb">
<div class="app-name">暂无数据</div>
</div>
</div>
</div>
</div>
......@@ -63,13 +99,15 @@
<script>
import { serviceList } from "@/api/applService.js";
import { getProduct } from "@/api/thePlatformIsSet.js";
import common from "@/mixins/common";
export default {
name: "PortalAdminVueApplService",
mixins: [common],
data() {
return {
api: process.env.VUE_APP_API_BASE_URL + "/",
listArr: [],
api: process.env.VUE_APP_API_IMG_URL,
searchVal: "",
stepsList: [],
active: 0,
......@@ -78,65 +116,105 @@ export default {
};
},
created() {
this.getServiceList();
this.getList();
},
mounted() {
this.setContentHigh();
// this.setContentHigh();
},
methods: {
getServiceList() {
serviceList({
page: 1,
size: -1, //每页条数
packageName: `%${this.searchVal}%`,
appName: `%${this.searchVal}%`,
}).then((res) => {
let { code, data } = res;
let { code, data, dict } = res;
if (code == 1) {
if (data.data.length) {
this.stepsList = data.data;
this.curInfo = data.data[0];
} else {
this.curInfo = {};
this.listArr.forEach((i) => {
let arr = [];
data.data.forEach((k) => {
if (i.id == k.productId) {
arr.push(k);
}
});
i.curInfo = arr;
this.$nextTick();
});
}
}
});
},
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) {
this.active = index;
this.curInfo = row;
this.searchVal = "";
},
handleDowload(url, systemServiceName) {
console.log(systemServiceName);
const a = document.createElement("a");
a.href = url;
a.download = systemServiceName;
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>
<style lang="less" scoped>
@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 {
width: 100%;
height: 100vh;
display: flex;
flex-direction: column;
background: #f5f5f5;
.appl_search {
height: 300px;
text-align: center;
......@@ -145,16 +223,21 @@ export default {
background-size: cover;
display: flex;
flex-flow: column;
h1 {
font-size: 2.4rem;
color: #fff;
font-weight: bold;
padding: 4rem 0 2rem;
}
.search-box {
display: flex;
align-items: center;
}
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
/deep/.ant-input {
width: 30rem !important;
margin-right: 2rem;
......@@ -180,6 +263,7 @@ export default {
line-height: 42px;
padding: 0;
border: none;
& > span {
position: relative;
display: block;
......@@ -263,15 +347,18 @@ export default {
width: 90%;
margin-left: 5%;
display: flex;
/deep/.ant-steps-item-content {
cursor: pointer;
}
._left {
width: 300px;
height: 100%;
padding: 20px;
margin-right: 20px;
overflow: auto;
&::-webkit-scrollbar {
width: 3px;
height: 3px;
......@@ -294,6 +381,7 @@ export default {
height: 100%;
padding: 20px;
overflow-y: auto;
&::-webkit-scrollbar {
width: 3px;
height: 3px;
......@@ -309,16 +397,20 @@ export default {
border-radius: 3px;
background: #fff;
}
.title-box {
font-size: 24px;
.list_title {
margin-right: 10px;
font-weight: 600;
}
.count {
font-weight: 600;
}
}
.list {
width: 100%;
height: 80px;
......@@ -326,13 +418,16 @@ export default {
padding: 0px 20px;
background-color: #fff;
border-radius: 4px;
.app-name {
font-size: 16px;
font-weight: 600;
}
.service-name {
font-size: 14px;
}
img {
width: 40px;
height: 40px;
......@@ -340,6 +435,7 @@ export default {
}
}
}
&::before {
content: "";
display: block;
......@@ -361,7 +457,7 @@ export default {
rgba(59, 135, 255, 1) 24%,
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>
\ No newline at end of file
</style>
......@@ -164,7 +164,9 @@
</div>
</div>
<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>
</div>
</div>
......@@ -231,9 +233,54 @@ export default {
menu;
// this.menusList = res.data;
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;
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;
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;
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() {
......@@ -506,4 +553,4 @@ export default {
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff",endColorstr="#6c35f7",GradientType=1);
}
}
</style>
\ No newline at end of file
</style>
......@@ -2,39 +2,73 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn" @click="openDetails()">
<span>新增</span>
</button>
<a-button type="primary" @click="openDetails()" class="addclass"
>新增</a-button
>
</div>
<span>
<a-input allowClear v-model="query.interfaceName" placeholder="请输入接口名称查询">
<a-input
allowClear
v-model="query.interfaceName"
placeholder="请输入接口名称查询"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-select v-model="query.interfaceSource">
<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 }}
</a-select-option>
</a-select>
<a-select v-model="query.interfaceTag">
<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 }}
</a-select-option>
</a-select>
<button class="search_btn" @click="getList()">搜索</button>
<a-button type="primary" class="addclass" @click="getList()"
>搜索</a-button
>
</span>
</div>
<div class="main">
<a-table size="small" bordered :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>
<a-table
size="small"
bordered
: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 slot="operation" slot-scope="text, record, index">
<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-popconfirm>
</template>
......@@ -47,7 +81,10 @@
<script>
import table from "@/mixins/table";
import Details from "./components/Details.vue";
import { getInterfaceList, getInterfaceDelete } from '@/api/thePlatformIsSet.js'
import {
getInterfaceList,
getInterfaceDelete,
} from "@/api/thePlatformIsSet.js";
export default {
mixins: [table],
name: "PortalAdminVueAlerting",
......@@ -71,19 +108,21 @@ export default {
title: "请求类型",
align: "center",
dataIndex: "requestType",
customRender: (text, record, index) => `${record.requestType == 1 ? 'POST' : 'GET'}`,
customRender: (text, record, index) =>
`${record.requestType == 1 ? "POST" : "GET"}`,
},
{
title: "标签",
align: "center",
dataIndex: "interfaceTag",
customRender: (text, record, index) => this.dict.interfaceTag[text]
customRender: (text, record, index) => this.dict.interfaceTag[text],
},
{
title: "请求协议",
align: "center",
dataIndex: "requestProtocol",
customRender: (text, record, index) => this.dict.requestProtocol[text]
customRender: (text, record, index) =>
this.dict.requestProtocol[text],
},
{
title: "版本",
......@@ -94,13 +133,15 @@ export default {
title: "来源",
align: "center",
dataIndex: "interfaceSource",
customRender: (text, record, index) => this.dict.interfaceSource[text]
customRender: (text, record, index) =>
this.dict.interfaceSource[text],
},
{
title: "策略",
align: "center",
dataIndex: "limitStrategy",
customRender: (text, record, index) => `${record.limitStrategy == 1 ? '分钟' : '小时'}`,
customRender: (text, record, index) =>
`${record.limitStrategy == 1 ? "分钟" : "小时"}`,
},
{
title: "访问网络",
......@@ -108,7 +149,7 @@ export default {
dataIndex: "network",
scopedSlots: {
customRender: "network",
}
},
},
{
......@@ -129,12 +170,10 @@ export default {
},
tablePagination: {
current: 1,
pageSize: 10
},
dict: {
pageSize: 10,
},
total: 0
dict: {},
total: 0,
};
},
components: {
......@@ -148,20 +187,16 @@ export default {
getInterfaceList({
page: this.tablePagination.current,
size: this.tablePagination.pageSize,
...this.query
}).then(res => {
...this.query,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
let { data, total, dict } = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
return data;
}
})
});
},
QueueState(type) {
switch (type) {
......@@ -176,21 +211,21 @@ export default {
},
delRow(item) {
getInterfaceDelete({
id: item.id
id: item.id,
}).then((res) => {
let { code, msg } = res
let { code, msg } = res;
if (code == 1) {
this.$message.success('删除成功');
this.getList()
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(msg);
}
})
});
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑接口";
this.$refs.Details.getInfo(item.id)
this.$refs.Details.getInfo(item.id);
} else {
this.$refs.Details.modalInfo.title = "新增接口";
}
......@@ -199,8 +234,8 @@ export default {
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize;
this.getList();
},
},
......@@ -219,7 +254,7 @@ export default {
justify-content: space-between;
align-items: center;
&>div {
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -275,7 +310,7 @@ export default {
}
}
&>span {
& > span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -360,13 +395,10 @@ export default {
/deep/.ant-btn-link {
padding: 0 !important;
&+.ant-btn-link {
& + .ant-btn-link {
margin-left: 1rem !important;
}
}
}
}
</style>
<template>
<a-modal :title="VisibleTitle" :centered="true" :destroyOnClose="true" :visible="Visible" @cancel="Visible = false"
width="30%">
<a-form-model :label-col="{
span: 5,
}" :wrapper-col="{
span: 19,
}" layout="horizontal" ref="appInfoFome" :model="appInfoFome" :rules="appInfoRules">
<a-modal
:title="VisibleTitle"
:centered="true"
:destroyOnClose="true"
:visible="Visible"
@cancel="Visible = false"
width="30%"
>
<a-form-model
:label-col="{
span: 5,
}"
:wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appInfoFome"
:model="appInfoFome"
:rules="appInfoRules"
>
<a-form-model-item label="产品名称" prop="productName">
<a-input placeholder="请输入产品名称" allowClear v-model="appInfoFome.productName" />
<a-input
placeholder="请输入产品名称"
allowClear
v-model="appInfoFome.productName"
/>
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
<a-button @click="resetForm">重置</a-button>
</template>
</a-modal>
......@@ -27,7 +46,7 @@ export default {
VisibleTitle: "新增产品",
appInfoFome: {
productName: undefined,
siteId: JSON.parse(localStorage.getItem("siteId"))
siteId: JSON.parse(localStorage.getItem("siteId")),
}, //页面表单信息
appInfoRules: {
productName: [
......@@ -36,28 +55,28 @@ export default {
whitespace: true, //必选时,空格是否会被视为错误
message: "请输入产品名称",
trigger: "blur",
}
},
],
},
};
},
mounted() { },
mounted() {},
methods: {
Modal_Ok() {
this.$refs.appInfoFome.validate((valid) => {
if (valid) {
saveProduct(this.appInfoFome).then(res => {
let { code, msg } = res
saveProduct(this.appInfoFome).then((res) => {
let { code, msg } = res;
if (code == 1) {
this.$message.success('保存成功');
this.$message.success("保存成功");
this.resetForm();
this.Visible = false
this.$parent.getList()
this.Visible = false;
this.$parent.getList();
} else {
this.$message.error(msg);
}
})
});
} else {
this.$message.error(`请完善表单信息!`);
return false;
......@@ -66,7 +85,7 @@ export default {
},
resetForm() {
this.$nextTick(() => {
this.appInfoFome.productName = ''
this.appInfoFome.productName = "";
});
},
},
......@@ -82,4 +101,3 @@ export default {
}
}
</style>
......@@ -2,36 +2,70 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn" @click="openDetails()">
<a-button
type="primary"
class="addclass"
@click="openDetails()"
>
<span>新增</span>
</button>
</a-button>
</div>
<span>
<a-input allowClear v-model="searchForm.appName" placeholder="请输入应用名称查询">
<a-input
allowClear
v-model="searchForm.appName"
placeholder="请输入应用名称查询"
>
<a-icon slot="prefix" type="search" />
</a-input>
<a-select v-model="searchForm.deveLanguage">
<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 }}
</a-select-option>
</a-select>
<button class="search_btn" @click="getList()">搜索</button>
<a-button
type="primary"
class="addclass"
@click="getList()"
>搜索</a-button
>
</span>
</div>
<div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<a-table
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">
<a-button type="link" v-if="record.appFileUrl"
@click="handleDowload(record.appFileUrl)">下载应用</a-button>
<a-button
type="link"
v-if="record.appFileUrl"
@click="handleDowload(record.appFileUrl)"
>下载应用</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-popconfirm>
</template>
</a-table>
<Details ref="Details" :deveLanguage="dict.deveLanguage" />
......@@ -43,6 +77,7 @@
import { getApps, deleteApps } from "@/api/thePlatformIsSet.js";
import table from "@/mixins/table";
import Details from "./components/Details.vue";
let obj = {};
export default {
mixins: [table],
name: "PortalAdminVueAlerting",
......@@ -66,6 +101,7 @@ export default {
title: "开发语言",
align: "center",
dataIndex: "deveLanguage",
customRender: (text, record, index) => this.dict.deveLanguage[text],
},
{
title: "版本",
......@@ -81,13 +117,14 @@ export default {
title: "是否启用",
align: "center",
dataIndex: "isEnable",
customRender: (text, record, index) => text == 1 ? '' : "",
customRender: (text, record, index) => (text == 1 ? "" : ""),
},
{
title: "上传时间",
align: "center",
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: "操作",
......@@ -101,7 +138,7 @@ export default {
],
tablePagination: {
current: 1,
pageSize: 10
pageSize: 10,
},
searchForm: {
deveLanguage: "",
......@@ -109,8 +146,8 @@ export default {
},
dict: {
deveLanguage: {},
isEnable: {}
}
isEnable: {},
},
};
},
components: {
......@@ -129,55 +166,61 @@ export default {
...search,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
let { data, total, dict } = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
return data;
}
})
});
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize;
this.getList();
},
delRow(item) {
deleteApps({
id: item.id
id: item.id,
}).then((res) => {
console.log(res)
let { code, msg } = res
console.log(res);
let { code, msg } = res;
if (code == 1) {
this.$message.success('删除成功');
this.getList()
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(msg);
}
})
});
},
handleDowload(url) {
let arr = url.split('/')
let arr = url.split("/");
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.click();
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑应用";
this.$refs.Details.getInfo(item.id)
this.$refs.Details.getInfo(item.id);
} else {
this.$refs.Details.modalInfo.title = "新增应用";
}
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%";
},
},
};
......@@ -195,7 +238,7 @@ export default {
justify-content: space-between;
align-items: center;
&>div {
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -251,7 +294,7 @@ export default {
}
}
&>span {
& > span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -336,13 +379,10 @@ export default {
/deep/.ant-btn-link {
padding: 0 !important;
&+.ant-btn-link {
& + .ant-btn-link {
margin-left: 1rem !important;
}
}
}
}
</style>
<template>
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title"
@cancel="modalInfo.visible = false" centered destroyOnClose>
<a-form-model :label-col="{
span: 5,
}" :wrapper-col="{
span: 19,
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules">
<a-modal
:width="modalInfo.width"
:visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
centered
destroyOnClose
>
<a-form-model
:label-col="{
span: 5,
}"
:wrapper-col="{
span: 19,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="应用名称" prop="appName">
<a-input v-model="appForm.appName" placeholder="请输入" allowClear />
</a-form-model-item>
<a-form-model-item label="开发语言" prop="deveLanguage">
<a-select v-model="appForm.deveLanguage" placeholder="请选择" allowClear>
<a-select-option v-for="(item, index) of deveLanguage" :key="index" :value="index">
<a-select
v-model="appForm.deveLanguage"
placeholder="请选择"
allowClear
>
<a-select-option
v-for="(item, index) of deveLanguage"
:key="index"
:value="index"
>
{{ item }}
</a-select-option>
</a-select>
</a-form-model-item>
<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 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 label="应用包" prop="appFileUrl">
<MyUpload v-model="appForm.appFileUrl" :uploadInfo="uploadInfo">
......@@ -32,7 +61,10 @@
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button type="primary" class="addclass" @click="reset">重置</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
<a-button @click="resetForm">取消</a-button>
</template>
</a-modal>
......@@ -72,50 +104,86 @@ export default {
},
verload: 300, // 单位 M
limit: 1, //限制文件上传数量
whiteFileList: ["apk"],
whiteFileList: ["apk", "jpg", "jpeg", "png", "gif", "bmp"], //只允许上传apk包
},
appRules: {
appName: [{ required: true, message: "请输入应用名称", trigger: ['blur', 'change'] }],
deveLanguage: [{ required: true, message: "请选择开发语言", trigger: ['blur', 'change'] }],
appName: [
{
required: true,
message: "请输入应用名称",
trigger: ["blur", "change"],
},
],
deveLanguage: [
{
required: true,
message: "请选择开发语言",
trigger: ["blur", "change"],
},
],
},
};
},
mounted() {
},
mounted() {},
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) {
getAppsInfo({ id: id }).then(res => {
res.data.isEnable = res.data.isEnable == 1
this.appForm = res.data
getAppsInfo({ id: id }).then((res) => {
res.data.isEnable = res.data.isEnable == 1;
res.data.deveLanguage = this.deveLanguage[res.data.deveLanguage];
this.appForm = res.data;
if (res.data.appFileUrl) {
this.uploadInfo.fileList = [
{
uid: id,
name: res.data.appFileUrl,
url: res.data.appFileUrl,
}
]
},
];
}
})
});
},
Modal_Ok() {
this.$refs.appForm.validate((valid) => {
if (valid) {
let json = JSON.parse(JSON.stringify(this.appForm))
json.isEnable = json.isEnable ? 1 : 0
saveApps(json).then(res => {
let { code, msg } = res
let json = JSON.parse(JSON.stringify(this.appForm));
json.isEnable = json.isEnable ? 1 : 0;
for (let key in this.deveLanguage) {
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) {
this.$message.success('保存成功');
this.$message.success("保存成功");
this.resetForm();
this.modalInfo.visible = false
this.$parent.getList()
this.modalInfo.visible = false;
this.$parent.getList();
} else {
this.$message.error(msg);
}
})
});
} else {
this.$message.error(`请完善表单信息!`);
return false;
......
<template>
<a-modal :width="modalInfo.width" :visible="modalInfo.visible" :title="modalInfo.title"
@cancel="modalInfo.visible = false" centered destroyOnClose>
<a-form-model :label-col="{
span: 4,
}" :wrapper-col="{
span: 20,
}" layout="horizontal" ref="appForm" :model="appForm" :rules="appRules">
<a-modal
:width="modalInfo.width"
:visible="modalInfo.visible"
:title="modalInfo.title"
@cancel="modalInfo.visible = false"
centered
destroyOnClose
>
<a-form-model
:label-col="{
span: 4,
}"
:wrapper-col="{
span: 20,
}"
layout="horizontal"
ref="appForm"
:model="appForm"
:rules="appRules"
>
<a-form-model-item label="材料名称" prop="docName">
<a-input v-model="appForm.docName" placeholder="请输入" allowClear />
</a-form-model-item>
<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 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 label="材料文件" prop="docFileUrl">
<MyUpload v-model="appForm.docFileUrl" :uploadInfo="uploadInfo">
......@@ -23,7 +44,10 @@
</a-form-model-item>
</a-form-model>
<template slot="footer">
<a-button type="primary" class="addclass" @click="Modal_Ok">确定</a-button>
<a-button type="primary" class="addclass" @click="reset">重置</a-button>
<a-button type="primary" class="addclass" @click="Modal_Ok"
>确定</a-button
>
<a-button @click="resetForm">取消</a-button>
</template>
</a-modal>
......@@ -46,7 +70,7 @@ export default {
docName: "",
versionNumber: "",
versionInfo: "",
docFileUrl: ""
docFileUrl: "",
},
uploadInfo: {
removeFileList: [], //移除文件列表
......@@ -61,41 +85,62 @@ export default {
whiteFileList: ["doc", "docx", "pdf", "xlsx", "xls"],
},
appRules: {
docName: [{ required: true, message: "请输入材料名称", trigger: ['blur', 'change'] }],
docName: [
{
required: true,
message: "请输入材料名称",
trigger: ["blur", "change"],
},
],
},
};
},
mounted() { },
mounted() {},
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) {
getDocumentInfo({ id: id }).then(res => {
this.appForm = res.data
getDocumentInfo({ id: id }).then((res) => {
this.appForm = res.data;
if (res.data.docFileUrl) {
this.uploadInfo.fileList = [
{
uid: id,
name: res.data.docFileUrl,
url: res.data.docFileUrl,
}
]
},
];
}
})
});
},
Modal_Ok() {
this.$refs.appForm.validate((valid) => {
if (valid) {
saveDocument(this.appForm).then(res => {
let { code, msg } = res
saveDocument(this.appForm).then((res) => {
let { code, msg } = res;
if (code == 1) {
this.$message.success('保存成功');
this.$message.success("保存成功");
this.resetForm();
this.modalInfo.visible = false
this.$parent.getList()
this.modalInfo.visible = false;
this.$parent.getList();
} else {
this.$message.error(msg);
}
})
});
} else {
this.$message.error(`请完善表单信息!`);
return false;
......
......@@ -2,24 +2,49 @@
<div class="PoliticsShow-Container">
<div class="header_box">
<div>
<button class="add_btn" @click="openDetails()">
<a-button type="primary" class="addclass" @click="openDetails()">
<span>新增</span>
</button>
</a-button>
</div>
<span>
<a-input allowClear v-model="searchName" placeholder="请输入资料名称查询">
<a-input
allowClear
v-model="searchName"
placeholder="请输入资料名称查询"
>
<a-icon slot="prefix" type="search" />
</a-input>
<button class="search_btn" @click="getList()">搜索</button>
<a-button type="primary" class="addclass" @click="getList()"
>搜索</a-button
>
</span>
</div>
<div class="main">
<a-table size="small" bordered :row-key="(record) => record.id" :scroll="{ y: 590 }" :pagination="tablePagination"
@change="pagTableChange" :loading="tableLoading" :columns="tableHeaders" :dataSource="tableSourceData">
<a-table
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">
<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-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-popconfirm>
</template>
......@@ -68,7 +93,8 @@ export default {
title: "上传时间",
align: "center",
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 {
searchName: undefined,
tablePagination: {
current: 1,
pageSize: 10
pageSize: 10,
},
};
},
......@@ -105,49 +131,45 @@ export default {
...search,
}).then((res) => {
if (res.code == 1) {
let {
data,
total,
dict
} = res.data;
let { data, total, dict } = res.data;
this.dict = dict;
this.tableSourceData = data;
this.tablePagination.total = total;
return data
return data;
}
})
});
},
//分页
pagTableChange(page) {
this.tablePagination.current = page.current
this.tablePagination.pageSize = page.pageSize
this.tablePagination.current = page.current;
this.tablePagination.pageSize = page.pageSize;
this.getList();
},
delRow(item) {
deleteDocument({
id: item.id
id: item.id,
}).then((res) => {
console.log(res)
let { code, msg } = res
console.log(res);
let { code, msg } = res;
if (code == 1) {
this.$message.success('删除成功');
this.getList()
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(msg);
}
})
});
},
handleDowload(url) {
let arr = url.split('/')
let arr = url.split("/");
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.click();
},
openDetails(item) {
if (item) {
this.$refs.Details.modalInfo.title = "编辑材料";
this.$refs.Details.getInfo(item.id)
this.$refs.Details.getInfo(item.id);
} else {
this.$refs.Details.modalInfo.title = "新增材料";
}
......@@ -170,7 +192,7 @@ export default {
justify-content: space-between;
align-items: center;
&>div {
& > div {
display: flex;
justify-content: flex-start;
align-items: center;
......@@ -226,7 +248,7 @@ export default {
}
}
&>span {
& > span {
display: flex;
justify-content: space-between;
align-items: center;
......@@ -311,13 +333,10 @@ export default {
/deep/.ant-btn-link {
padding: 0 !important;
&+.ant-btn-link {
& + .ant-btn-link {
margin-left: 1rem !important;
}
}
}
}
</style>
......@@ -3,28 +3,47 @@
<div class="search_box" ref="search_box">
<h3>产品管理</h3>
<h4>
<a-input placeholder="请输入产品名称关键字查询" v-model="searchVal" />
<a-input
placeholder="请输入产品名称关键字查询"
allow-clear
v-model="searchVal"
/>
<button class="search_btn btn" @click="getList">
<span>查询</span>
</button>
</h4>
</div>
<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>
<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">
<template slot="content">
<div class="popoverContent">
<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>
</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>
......@@ -58,44 +77,44 @@ export default {
name: "PortalAdminVueProductManage",
data() {
return {
searchVal: '',
listData: []
searchVal: "",
listData: [],
};
},
components: {
AddEditAppName,
},
mounted() {
this.getList()
this.getList();
},
methods: {
delModal(item) {
deleteProduct({
id: item.id
id: item.id,
}).then((res) => {
let { code, msg } = res
let { code, msg } = res;
if (code == 1) {
this.$message.success('删除成功');
this.getList()
this.$message.success("删除成功");
this.getList();
} else {
this.$message.error(msg);
}
})
});
},
getList() {
getProduct({
page: 1,
size: -1,
productName: this.searchVal
productName: this.searchVal,
}).then((res) => {
this.listData = res.data.data
})
this.listData = res.data.data;
});
},
showModal(item) {
if (item) {
this.$refs.AddEditAppName.VisibleTitle = "编辑";
this.$refs.AddEditAppName.appInfoFome.id = item.id
this.$refs.AddEditAppName.appInfoFome.productName = item.productName
this.$refs.AddEditAppName.appInfoFome.id = item.id;
this.$refs.AddEditAppName.appInfoFome.productName = item.productName;
} else {
this.$refs.AddEditAppName.VisibleTitle = "新增产品";
}
......@@ -127,7 +146,7 @@ export default {
</script>
<style lang="less" scoped>
.not-data{
.not-data {
line-height: 100px;
text-align: center;
width: 100%;
......@@ -160,7 +179,9 @@ export default {
display: flex;
align-items: center;
}
/deep/.ant-input-affix-wrapper .ant-input-suffix {
right: 70px !important;
}
/deep/.ant-input {
width: 30rem !important;
margin-right: 2rem;
......@@ -187,7 +208,7 @@ export default {
padding: 0;
border: none;
&>span {
& > span {
position: relative;
display: block;
width: 100%;
......@@ -231,8 +252,8 @@ export default {
width: 100%;
}
&>span:before,
&>span:after {
& > span:before,
& > span:after {
position: absolute;
content: "";
left: 0;
......@@ -245,21 +266,21 @@ export default {
transition: all 0.3s ease;
}
&>span:before {
& > span:before {
width: 2px;
height: 0%;
}
&>span:after {
& > span:after {
height: 2px;
width: 0%;
}
&>span:hover:before {
& > span:hover:before {
height: 100%;
}
&>span:hover:after {
& > span:hover:after {
width: 100%;
}
}
......@@ -274,17 +295,17 @@ export default {
border: 1px solid #d7dae2;
overflow: hidden;
&>.add_btn {
& > .add_btn {
margin: 15px;
}
&>.content {
& > .content {
display: flex;
flex-wrap: wrap;
border-top: 1px solid #d7dae2;
border-bottom: 1px solid #d7dae2;
&>.list {
& > .list {
width: 25%;
padding: 15px;
display: flex;
......@@ -293,7 +314,7 @@ export default {
border-right: 1px solid #d7dae2;
border-bottom: 1px solid #d7dae2;
&>.app-operation {
& > .app-operation {
margin: 8px 0;
height: 25px;
width: 25px;
......@@ -304,7 +325,7 @@ export default {
cursor: pointer;
}
&>.app-img {
& > .app-img {
width: 108px;
height: 108px;
box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
......@@ -312,14 +333,14 @@ export default {
border-radius: 6px;
}
&>.app-name {
& > .app-name {
font-weight: bold;
font-size: 18px;
text-align: center;
margin: 8px 0;
}
&>.app-option {
& > .app-option {
margin: 8px 0;
color: #0595fd;
display: flex;
......@@ -327,7 +348,7 @@ export default {
align-items: center;
font-size: 14px;
&>li {
& > li {
cursor: pointer;
}
}
......@@ -341,15 +362,21 @@ export default {
width: 100%;
height: @headerH;
background: rgb(59, 135, 255);
background: -moz-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -webkit-linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: linear-gradient(174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%);
background: -moz-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: -webkit-linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
background: linear-gradient(
174deg,
rgba(59, 135, 255, 1) 24%,
rgba(108, 53, 247, 1) 85%
);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr="#3b87ff", endColorstr="#6c35f7", GradientType=1);
}
}
......
......@@ -1608,7 +1608,7 @@
"@vue/vue-loader-v15@npm:vue-loader@^15.9.7":
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==
dependencies:
"@vue/component-compiler-utils" "^3.1.0"
......@@ -6175,7 +6175,7 @@ vue-highlightjs@^1.3.3:
vue-hot-reload-api@^2.3.0:
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==
vue-loader@^17.0.0:
......
......@@ -84,3 +84,6 @@ CREATE TABLE `mortals_xhx_product_document` (
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) 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;
import com.mortals.xhx.module.product.model.vo.ProductInterfaceVo;
import lombok.Data;
/**
* 产品接口实体对象
*
* @author zxfei
* @date 2023-05-16
* @date 2023-05-29
*/
@Data
public class ProductInterfaceEntity extends ProductInterfaceVo {
private static final long serialVersionUID = 1L;
......@@ -83,266 +83,14 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
* 接口描述
*/
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(){
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;
}
private String normalResponse;
/**
* 设置 请求协议1:HTTP,2:HTTPS
* @param requestProtocol
* 异常返回示例
*/
public void setRequestProtocol(Integer requestProtocol){
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;
}
private String abnormalResponse;
@Override
public int hashCode() {
return this.getId().hashCode();
......@@ -359,32 +107,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
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(){
this.productId = null;
this.productId = -1L;
this.interfaceName = "";
......@@ -396,9 +121,9 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.requestUrl = "";
this.timeoutValue = null;
this.timeoutValue = -1L;
this.limitStrategy = null;
this.limitStrategy = -1;
this.network = "";
......@@ -406,18 +131,22 @@ public class ProductInterfaceEntity extends ProductInterfaceVo {
this.contentType = "";
this.interfaceTag = null;
this.interfaceTag = -1;
this.interfaceSource = 1;
this.inEncrypt = null;
this.inEncrypt = -1;
this.requestParameters = "";
this.outEncrypt = null;
this.outEncrypt = -1;
this.responseParameters = "";
this.remark = "";
this.normalResponse = "";
this.abnormalResponse = "";
}
}
\ No newline at end of file
......@@ -5,7 +5,7 @@ import java.util.List;
* 产品接口查询对象
*
* @author zxfei
* @date 2023-05-16
* @date 2023-05-29
*/
public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 开始 序号,主键,自增长 */
......@@ -245,6 +245,16 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
/** 结束 更新时间 */
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) */
private List<ProductInterfaceQuery> orConditionList;
......@@ -1577,6 +1587,70 @@ public class ProductInterfaceQuery extends ProductInterfaceEntity {
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
......@@ -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)
* @return orConditionList
......
package com.mortals.xhx.module.product.model.vo;
import com.mortals.framework.model.BaseEntityLong;
import com.mortals.xhx.module.product.model.ProductAppsEntity;
import java.util.ArrayList;
import java.util.List;
/**
* 协议管理视图对象
......@@ -10,5 +9,27 @@ import java.util.List;
* @date 2023-02-22
*/
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;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
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.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.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
* 产品应用 service实现
......@@ -15,5 +26,45 @@ import com.mortals.xhx.module.product.service.ProductAppsService;
*/
@Service("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;
import com.mortals.framework.util.StringUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -15,5 +16,14 @@ import com.mortals.xhx.module.product.service.ProductDocumentService;
*/
@Service("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;
import com.mortals.framework.util.StringUtils;
import org.springframework.stereotype.Service;
import com.mortals.framework.service.impl.AbstractCRUDServiceImpl;
import com.mortals.framework.exception.AppException;
......@@ -15,5 +16,17 @@ import com.mortals.xhx.module.product.service.ProductInterfaceService;
*/
@Service("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 @@
<result property="createTime" column="createTime" />
<result property="updateUserId" column="updateUserId" />
<result property="updateTime" column="updateTime" />
<result property="normalResponse" column="normalResponse" />
<result property="abnormalResponse" column="abnormalResponse" />
</resultMap>
......@@ -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')))">
a.updateTime,
</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>
</sql>
<!-- 新增 区分主键自增加还是业务插入 -->
<insert id="insert" parameterType="ProductInterfaceEntity" useGeneratedKeys="true" keyProperty="id">
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
(#{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 id="insertBatch" parameterType="paramDto">
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
<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>
</insert>
......@@ -229,6 +237,12 @@
<if test="(colPickMode==0 and data.containsKey('updateTime')) or (colPickMode==1 and !data.containsKey('updateTime'))">
a.updateTime=#{data.updateTime},
</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 suffixOverrides="where" suffix="">
where
......@@ -450,6 +464,20 @@
</if>
</foreach>
</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>
where id in
<foreach collection="data.dataList" item="item" index="index" open="(" separator="," close=")">
......@@ -1109,6 +1137,48 @@
<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')
</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 id="_orderCols_">
<if test="orderColList != null and !orderColList.isEmpty()">
......@@ -1237,6 +1307,16 @@
<if test='orderCol.updateTime != null and "DESC".equalsIgnoreCase(orderCol.updateTime)'>DESC</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>
</if>
</sql>
......
......@@ -8,6 +8,9 @@
"portal-test": {
"baseUrl": "http://192.168.0.98:11078/zwfw"
},
"portal-test1": {
"baseUrl": "http://8.136.255.30:11078/zwfw"
},
"portal-yibin": {
"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