Merge remote-tracking branch 'origin/master'
¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.vci.dto; |
| | | |
| | | |
| | | import com.vci.common.qt.object.QueryTemplate; |
| | | import lombok.Data; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿åè¡¨ä¼ è¾å¯¹è±¡ |
| | | * @author yuxc |
| | | * @date 2024/8/7 |
| | | */ |
| | | @Data |
| | | public class QTInfoDTO { |
| | | //æ¥è¯¢æ¨¡æ¿å |
| | | private String qtName; |
| | | //ç±»åå |
| | | private String btmName; |
| | | //å建人 |
| | | private String creator; |
| | | //å建æ¶é´ |
| | | private long createTime; |
| | | private String createTimeText; |
| | | //"0:æ®éæ¥è¯¢æ¨¡æ¿; 1:é«çº§æ¥è¯¢æ¨¡æ¿" |
| | | private short levelFlag; |
| | | //æ¥è¯¢æ¨¡æ¿çé¢ï¼è¿æ¯é«çº§æ¥è¯¢ç |
| | | private String qtUIText; |
| | | //æ¥è¯¢æ¨¡æ¿å |
| | | private String qtText; |
| | | //æ¥è¯¢æ¨¡æ¿ä¿¡æ¯ |
| | | private QueryTemplate queryTemplate; |
| | | //æ¥è¯¢æ¡ä»¶ï¼å端è¿è¡ç¸å
³è§£æ |
| | | private List<HashMap<String,String>> condition; |
| | | private HashMap<String,Object> tree = new HashMap<>(); |
| | | } |
| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTD; |
| | | import com.vci.dto.QTInfoDTO; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsBtmTypeVO; |
| | | import com.vci.pagemodel.OsLinkTypeAttributeVO; |
| | |
| | | import com.vci.web.service.OsLinkTypeServiceI; |
| | | import com.vci.web.service.OsQuereyTemplateServiceI; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.dom4j.DocumentException; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Arrays; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¡ä»¶çæ¥è¯¢æé®æ¥è¯¢liså表 |
| | | * @param dataMap ä¼ è¾çæ°æ®å¯¹è±¡ï¼ |
| | | * linkTypeName 龿¥ç±»ååç§°ã |
| | | * rdPositive æ¹åï¼trueæ£åï¼falseåå |
| | | * btmName ä¸å¡ç±»ååç§° |
| | | * combRelaType ä¸å¡ç±»åéæ©å¼ |
| | | * versionValue çæ¬çæ¬¡å¼ |
| | | * isQueryIsLeaf æ¯å¦éæ©ä¸çº§ |
| | | * level åèç¹å±æ° |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping("/getCriteria") |
| | | public BaseResult getCriteria(@RequestBody HashMap<String,Object> dataMap){ |
| | | try { |
| | | return quereyTemplateServiceI.getCriteria(dataMap); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿å表 |
| | | * @param btName ç±»ååç§° |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping("/getObjTypeQTs") |
| | | public BaseResult getObjTypeQTs(String btName){ |
| | | try { |
| | | return quereyTemplateServiceI.getObjTypeQTs(btName); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } catch (DocumentException e) { |
| | | e.printStackTrace(); |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(500); |
| | | objectBaseResult.setMsg(Arrays.toString(e.getMessage().toCharArray())); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * æ£æ¥æ¥è¯¢æ¨¡æ¿å忝å¦åå¨ |
| | | * @param name æ¥è¯¢æ¨¡æ¿åå |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @GetMapping("/isExistsQT") |
| | | public BaseResult isExistsQT(String name){ |
| | | try { |
| | | return quereyTemplateServiceI.isExistsQT(name); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 龿¥ç±»åæ¥è¯¢æ¨¡æ¿ä¿å |
| | | * @param qtInfoDTO ä¿åä¼ è¾å¯¹è±¡ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @PostMapping("/linkSave") |
| | | public BaseResult linkSave(@RequestBody QTInfoDTO qtInfoDTO){ |
| | | try { |
| | | return quereyTemplateServiceI.linkSave(qtInfoDTO); |
| | | } catch (PLException e) { |
| | | BaseResult objectBaseResult = new BaseResult<>(); |
| | | objectBaseResult.setCode(Integer.parseInt(e.code)); |
| | | objectBaseResult.setMsg(Arrays.toString(e.messages)); |
| | | return objectBaseResult; |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.qtm.QTD; |
| | | import com.vci.dto.QTInfoDTO; |
| | | import com.vci.pagemodel.OsBtmTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeAttributeVO; |
| | | import com.vci.pagemodel.OsLinkTypeVO; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import org.dom4j.DocumentException; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.util.Collection; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | * @return ä¿åç»æ |
| | | */ |
| | | BaseResult deleteTemplate(String name) throws PLException; |
| | | /** |
| | | * |
| | | * @param dataMap ä¼ è¾çæ°æ®å¯¹è±¡ï¼ |
| | | * linkTypeName 龿¥ç±»åã |
| | | * rdPositive æ¹åï¼trueæ£åï¼falseåå |
| | | * btmName ä¸å¡ç±»ååç§° |
| | | * combRelaType ä¸å¡ç±»åéæ©å¼ |
| | | * versionValue çæ¬çæ¬¡å¼ |
| | | * isQueryIsLeaf æ¯å¦éæ©ä¸çº§ |
| | | * level åèç¹å±æ° |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | BaseResult getCriteria(HashMap<String,Object> dataMap) throws PLException; |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿å表 |
| | | * @param btName ç±»ååç§° |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | BaseResult getObjTypeQTs(String btName) throws PLException, DocumentException; |
| | | /** |
| | | * æ£æ¥æ¥è¯¢æ¨¡æ¿å忝å¦åå¨ |
| | | * @param name æ¥è¯¢æ¨¡æ¿åå |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | BaseResult isExistsQT(String name) throws PLException; |
| | | |
| | | /** |
| | | * 龿¥ç±»åæ¥è¯¢æ¨¡æ¿ä¿å |
| | | * @param qtInfoDTO ä¿åä¼ è¾å¯¹è±¡ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | BaseResult linkSave(QTInfoDTO qtInfoDTO) throws PLException; |
| | | } |
| | |
| | | package com.vci.web.service.impl; |
| | | |
| | | import cn.hutool.core.io.FileUtil; |
| | | import cn.hutool.core.util.ZipUtil; |
| | | import com.fasterxml.jackson.core.type.TypeReference; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.vci.client.common.oq.OQTool; |
| | | import com.vci.common.qt.object.*; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.omd.atm.AttributeDef; |
| | | import com.vci.corba.omd.btm.BizType; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.data.LinkObject; |
| | | import com.vci.corba.omd.qtm.QTD; |
| | | import com.vci.model.OsLinkTypeDO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.OsLinkTypePO; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | | import com.vci.starter.poi.bo.WriteExcelData; |
| | | import com.vci.starter.poi.bo.WriteExcelOption; |
| | | import com.vci.starter.poi.constant.ExcelLangCodeConstant; |
| | | import com.vci.starter.poi.util.ExcelUtil; |
| | | import com.vci.starter.web.annotation.log.VciUnLog; |
| | | import com.vci.starter.web.enumpck.VciFieldTypeEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.BaseQueryObject; |
| | | import com.vci.corba.omd.qtm.QTInfo; |
| | | import com.vci.dto.QTInfoDTO; |
| | | import com.vci.omd.objects.OtherInfo; |
| | | import com.vci.starter.web.pagemodel.BaseResult; |
| | | import com.vci.starter.web.pagemodel.DataGrid; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.Func; |
| | | import com.vci.web.util.DateUtil; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.apache.commons.lang3.time.DateFormatUtils; |
| | | import org.dom4j.DocumentException; |
| | | import org.dom4j.DocumentHelper; |
| | | import org.dom4j.Element; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Lazy; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿æå¡ |
| | |
| | | */ |
| | | @Autowired |
| | | private PlatformClientUtil platformClientUtil; |
| | | |
| | | private final String EQUAL = "="; |
| | | private final String UNEQUAL = "!="; |
| | | private final String CONTAINS = "å
å«"; |
| | | private final String IN = "in"; |
| | | private final String NOTIN = "not in"; |
| | | private final String GT = ">"; |
| | | private final String GTE = ">="; |
| | | private final String LT = "<"; |
| | | private final String LTE = "<="; |
| | | private final String AND = "å¹¶ä¸"; |
| | | private final String OR = "æè
"; |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿çå表 |
| | |
| | | return BaseResult.fail("å 餿¥è¯¢æ¨¡æ¿å¤±è´¥"); |
| | | } |
| | | } |
| | | /** |
| | | * |
| | | * @param dataMap ä¼ è¾çæ°æ®å¯¹è±¡ï¼ |
| | | * linkTypeName 龿¥ç±»åã |
| | | * rdPositive æ¹åï¼trueæ£åï¼falseåå |
| | | * btmName ä¸å¡ç±»ååç§° |
| | | * combRelaType ä¸å¡ç±»åéæ©å¼ |
| | | * versionValue çæ¬çæ¬¡å¼ |
| | | * isQueryIsLeaf æ¯å¦éæ©ä¸çº§ |
| | | * level åèç¹å±æ° |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult getCriteria(HashMap<String,Object> dataMap) throws PLException { |
| | | QueryTemplate qt = getQT(dataMap); |
| | | String checkInfo = OQTool.checkQT(qt); |
| | | if(!checkInfo.equals("OK")){ |
| | | throw new PLException("500", new String[]{checkInfo}); |
| | | } |
| | | qt.setId("qt1"); |
| | | LinkObject[] result = platformClientUtil.getQueryService().findLTObjects(qt.getId(), OQTool.qtTOXMl(qt).asXML()); |
| | | return BaseResult.dataList(Arrays.asList(result)); |
| | | } |
| | | |
| | | /** |
| | | * æ¥è¯¢æ¨¡æ¿å表 |
| | | * @param btName ç±»ååç§° |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult getObjTypeQTs(String btName) throws PLException, DocumentException { |
| | | VciBaseUtil.alertNotNull(btName,"ç±»åå"); |
| | | QTInfo[] objTypeQTs = platformClientUtil.getQTDService().getObjTypeQTs(btName); |
| | | List<QTInfoDTO> dtos = new ArrayList<>(); |
| | | for (QTInfo obj : objTypeQTs) { |
| | | QTInfoDTO qtInfoDTO = new QTInfoDTO(); |
| | | qtInfoDTO.setCreator(obj.creator); |
| | | qtInfoDTO.setBtmName(obj.btmName); |
| | | qtInfoDTO.setQtName(obj.qtName); |
| | | qtInfoDTO.setLevelFlag(obj.levelFlag); |
| | | // qtInfoDTO.setQtText(obj.qtText); |
| | | qtInfoDTO.setQtUIText(obj.qtUIText); |
| | | if(StringUtils.isNotBlank(obj.qtUIText)){ |
| | | //å°ç»å®çStringææ¬è§£æä¸ºXMLææ¡£å¹¶è¿åæ°å建çdocument |
| | | qtInfoDTO.setTree(analysisXml(obj)); |
| | | } |
| | | qtInfoDTO.setQueryTemplate(OQTool.getQTByDoc(DocumentHelper.parseText(obj.qtText), obj.qtName)); |
| | | qtInfoDTO.setCreateTimeText(DateFormatUtils.format(new Date(obj.createTime), DateUtil.PATTERN_DATETIME)); |
| | | dtos.add(qtInfoDTO); |
| | | } |
| | | return BaseResult.dataList(dtos); |
| | | } |
| | | |
| | | /** |
| | | * å°å®¢æç«¯ç颿¾ç¤ºçxml转为hashMap |
| | | * @param obj çé¢å¯¹è±¡ |
| | | * @return |
| | | * @throws DocumentException |
| | | */ |
| | | private HashMap<String,Object> analysisXml(QTInfo obj) throws DocumentException { |
| | | org.dom4j.Document document = DocumentHelper.parseText(obj.qtUIText); |
| | | if(document == null){ |
| | | return null; |
| | | } |
| | | //è·åæ ¹èç¹,å¨ä¾åä¸å°±æ¯responsedataèç¹ |
| | | Element root = document.getRootElement(); |
| | | List<HashMap<String,Object>> treeList = new ArrayList<>(); |
| | | HashMap<String,Object> treeMap = new HashMap<>(); |
| | | treeMap.put("connector",root.getText()); |
| | | List<Element> children = root.elements(); |
| | | List<Object> childList = new ArrayList<>(); |
| | | for(Iterator<Element> i = children.iterator(); i.hasNext();){ |
| | | Element child = i.next(); |
| | | if(AND.equals(child.getText()) || OR.equals(child.getText())){ |
| | | childList.add(addDefaultMutableTree(child)); |
| | | }else { |
| | | childList.add(child.getText().trim()); |
| | | } |
| | | } |
| | | treeMap.put("child",childList); |
| | | return treeMap; |
| | | } |
| | | |
| | | /** |
| | | * å°åèç¹è½¬ä¸ºmapç»æ |
| | | * @param element |
| | | */ |
| | | public Map<String, Object> addDefaultMutableTree(Element element){ |
| | | List<Object> childList = new ArrayList<>(); |
| | | List<Element> children = element.elements(); |
| | | HashMap<String,Object> treeMap = new HashMap<>(); |
| | | treeMap.put("connector",element.getText()); |
| | | for(Iterator<Element> i = children.iterator(); i.hasNext();){ |
| | | Element child = i.next(); |
| | | if(AND.equals(child.getText()) || OR.equals(child.getText())){ |
| | | childList.add(addDefaultMutableTree(child)); |
| | | }else { |
| | | childList.add(child.getText().trim()); |
| | | } |
| | | } |
| | | treeMap.put("child",childList); |
| | | return treeMap; |
| | | } |
| | | |
| | | /** |
| | | * æ£æ¥æ¥è¯¢æ¨¡æ¿å忝å¦åå¨ |
| | | * @param name æ¥è¯¢æ¨¡æ¿åå |
| | | * @return æ¥è¯¢ç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult isExistsQT(String name) throws PLException { |
| | | VciBaseUtil.alertNotNull(name,"询模æ¿å"); |
| | | return BaseResult.success(platformClientUtil.getQTDService().isExistsQT(name)); |
| | | } |
| | | |
| | | /** |
| | | * 龿¥ç±»åæ¥è¯¢æ¨¡æ¿ä¿å |
| | | * @param qtInfoDTO ä¿åä¼ è¾å¯¹è±¡ |
| | | * @return ä¿åç»æ |
| | | */ |
| | | @Override |
| | | public BaseResult linkSave(QTInfoDTO qtInfoDTO) throws PLException { |
| | | QueryTemplate qt = getQT(qtInfoDTO); |
| | | String checkInfo = OQTool.checkQT(qt); |
| | | if(!checkInfo.equals("OK")){ |
| | | throw new PLException("500", new String[]{checkInfo}); |
| | | } |
| | | boolean saveFlag ; |
| | | qt.setId(qtInfoDTO.getQtName()); |
| | | qt.setOrderInfoList(qtInfoDTO.getQueryTemplate().getOrderInfoList()); |
| | | QTInfo qtWrapper = new QTInfo(); |
| | | qtWrapper.qtName = qt.getId(); |
| | | qtWrapper.btmName = qt.getLinkType(); |
| | | qtWrapper.creator = WebUtil.getCurrentUserId(); |
| | | qtWrapper.createTime = System.currentTimeMillis(); |
| | | if(qtInfoDTO.getTree() == null){ |
| | | qtWrapper.qtUIText = ""; |
| | | }else{ |
| | | qtWrapper.qtUIText = getSeniorXML(qtInfoDTO); |
| | | } |
| | | qtWrapper.levelFlag = qtInfoDTO.getLevelFlag(); |
| | | qtWrapper.qtText = OQTool.qtTOXMl(qt).asXML(); |
| | | saveFlag = platformClientUtil.getQTDService().saveQT(qtWrapper); |
| | | if(saveFlag){ |
| | | return BaseResult.success(); |
| | | }else{ |
| | | return BaseResult.fail("ä¿åæ¥è¯¢æ¨¡æ¿å¤±è´¥"); |
| | | } |
| | | } |
| | | |
| | | private String getSeniorXML(QTInfoDTO qtInfoDTO){ |
| | | HashMap<String, Object> tree = qtInfoDTO.getTree(); |
| | | if(tree.isEmpty()){ |
| | | return ""; |
| | | } |
| | | StringBuilder xmlStr = new StringBuilder("<?xml version=\"1.0\" encoding=\"UTF-8\"?><root>"); |
| | | xmlStr.append(tree.get("connector")); |
| | | List<Object> childrens = (List<Object>) tree.get("child"); |
| | | Iterator<Object> children = childrens.iterator(); |
| | | while (children.hasNext()) { |
| | | Object obj = children.next(); |
| | | if(obj instanceof JSONObject && (((JSONObject) obj).get("connector").equals(AND) |
| | | || ((JSONObject) obj).get("connector").equals(OR))){ |
| | | xmlStr.append(getSeniorChildXML((JSONObject) obj)); |
| | | }else{ |
| | | xmlStr.append("<child>").append(obj).append("</child>"); |
| | | } |
| | | } |
| | | return xmlStr.append("</root>").toString(); |
| | | |
| | | } |
| | | private String getSeniorChildXML(JSONObject childs){ |
| | | |
| | | StringBuilder xmlStr = new StringBuilder("<child>" + childs.get("connector")); |
| | | List<Object> childrens = (List<Object>) childs.get("child"); |
| | | if(childrens == null){ |
| | | return ""; |
| | | } |
| | | Iterator<Object> child = childrens.iterator(); |
| | | while (child.hasNext()) { |
| | | Object obj = child.next(); |
| | | if(obj instanceof JSONObject && (((JSONObject) obj).get("connector").equals(AND) |
| | | || ((JSONObject) obj).get("connector").equals(OR))){ |
| | | xmlStr.append(getSeniorChildXML((JSONObject) obj)); |
| | | }else{ |
| | | xmlStr.append("<child>").append(obj).append("</child>"); |
| | | } |
| | | } |
| | | return xmlStr.append("</child>").toString(); |
| | | } |
| | | |
| | | /** |
| | | * ç»è£
æ¥è¯¢æ¨¡æ¿ |
| | | * @return |
| | | */ |
| | | public QueryTemplate getQT(QTInfoDTO qtInfoDTO) throws PLException { |
| | | QueryTemplate qt = new QueryTemplate(); |
| | | qt.setType(QTConstants.TYPE_LINK); |
| | | //TODO String qtId = |
| | | qt.setLinkType(qtInfoDTO.getBtmName()); |
| | | qt.setDirection(qtInfoDTO.getQueryTemplate().getDirection()); |
| | | qt.setBtmType(qtInfoDTO.getQueryTemplate().getBtmType()); |
| | | |
| | | qt.setVersion(qtInfoDTO.getQueryTemplate().getVersion()); |
| | | qt.setQueryISLeaf(qtInfoDTO.getQueryTemplate().isQueryISLeaf()); |
| | | qt.setLevel(qtInfoDTO.getQueryTemplate().getLevel()); |
| | | List<String> clauseList = new ArrayList<String>(); |
| | | //TODO æ¥è¯¢å æ¾ç¤ºå |
| | | clauseList.add("*"); |
| | | qt.setClauseList(clauseList); |
| | | Condition con = new Condition(); |
| | | qt.setCondition(con); |
| | | HashMap<String, ConditionItem> ciMap = getCIMap(qtInfoDTO); |
| | | con.setCIMap(ciMap); |
| | | con.setRootCIName(con.getRootCINameByCIMap(ciMap)); |
| | | return qt; |
| | | } |
| | | |
| | | /** |
| | | * è·åæ¥è¯¢æ¡ä»¶ |
| | | * @return |
| | | */ |
| | | private HashMap<String, ConditionItem> getCIMap(QTInfoDTO qtInfoDTO) throws PLException { |
| | | HashMap<String, ConditionItem> ciMap = new HashMap<>(); |
| | | //æ®éæ¥è¯¢æ¡ä»¶ |
| | | if(qtInfoDTO.getLevelFlag() == 0){ |
| | | /** |
| | | * å å
¥å¶åèç¹ |
| | | */ |
| | | for(int i = 0; i < qtInfoDTO.getCondition().size(); i++){ |
| | | ConditionItem ci = new ConditionItem(); |
| | | String id = "ci" + (i + 1); |
| | | ci.setId(id); |
| | | ci.setLeafFlag(true); |
| | | HashMap<String, String> condition = qtInfoDTO.getCondition().get(i); |
| | | String clause = condition.get("clause"); |
| | | String operator = condition.get("operator"); |
| | | String ordinaryValue = condition.get("ordinaryValue"); |
| | | //add by zhangweiwei 2014/12/09 end å å¢å éæ©æ¥è¯¢æ¨¡æ¿æé®å°æ¯è¡ç»ä»¶æ°ç±4æ¹æ5 |
| | | LeafInfo leafInfo = new LeafInfo(); |
| | | if(clause.contains("T_OID.") || clause.contains("F_OID.")){ |
| | | //廿T_OID.æè
F_OID. |
| | | String clause_ = clause.substring(6); |
| | | //屿§ä¸ºåç
§å±æ§ |
| | | if(clause_.contains(".")){ |
| | | int fpIndex = clause_.indexOf("."); |
| | | String refAbName = clause.substring(0, fpIndex + 6); |
| | | clause = clause.substring(fpIndex + 6 + 1); |
| | | leafInfo.setClause(refAbName); |
| | | //廿T_OID.æè
F_OID. |
| | | refAbName = refAbName.substring(6); |
| | | leafInfo.setOperator(Operator.IN); |
| | | QueryTemplate qt = getRefQT(refAbName, clause, operator, ordinaryValue); |
| | | LeafValue lValue = new LeafValue(); |
| | | lValue.setQueryTemplate(qt); |
| | | leafInfo.setValue(lValue); |
| | | //屿§ä¸ºéåç
§å±æ§ |
| | | }else{ |
| | | leafInfo.setClause(clause); |
| | | leafInfo.setOperator(operator); |
| | | LeafValue lValue = new LeafValue(); |
| | | leafInfo.setValue(lValue); |
| | | //add by zhangweiwei 2014/12/09 start |
| | | //妿åµå¥Link |
| | | if(ordinaryValue.contains(";")){ |
| | | leafInfo.setOperator(Operator.IN); |
| | | String[] values = ordinaryValue.split(";"); |
| | | String QTname = values[0]; |
| | | String attr = values[1].substring(0, values[1].length()); |
| | | try { |
| | | QTInfo qt = platformClientUtil.getQTDService().getQT(QTname); |
| | | String qtText = qt.qtText; |
| | | QueryTemplate qt_ = OQTool.getQTByQTText(qt.qtName, qtText); |
| | | List<String> clauseList = new ArrayList<String>(); |
| | | clauseList.add(attr); |
| | | qt_.setClauseList(clauseList); |
| | | lValue.setQueryTemplate(qt_); |
| | | //lValue.setAttr(attr); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | catch (DocumentException e1) { |
| | | e1.printStackTrace(); |
| | | } |
| | | }else{ |
| | | lValue.setOrdinaryValue(ordinaryValue); |
| | | } |
| | | //add by zhangweiwei 2014/12/09 end |
| | | } |
| | | }else{ |
| | | //屿§ä¸ºåç
§å±æ§ |
| | | if(clause.contains(".")){ |
| | | int fpIndex = clause.indexOf("."); |
| | | String refAbName = clause.substring(0, fpIndex); |
| | | clause = clause.substring(fpIndex + 1); |
| | | leafInfo.setClause(refAbName); |
| | | leafInfo.setOperator(Operator.IN); |
| | | QueryTemplate qt = getRefQT(refAbName, clause, operator, ordinaryValue); |
| | | LeafValue lValue = new LeafValue(); |
| | | lValue.setQueryTemplate(qt); |
| | | leafInfo.setValue(lValue); |
| | | //屿§ä¸ºéåç
§å±æ§ |
| | | }else{ |
| | | leafInfo.setClause(clause); |
| | | leafInfo.setOperator(operator); |
| | | LeafValue lValue = new LeafValue(); |
| | | leafInfo.setValue(lValue); |
| | | //add by zhangweiwei 2014/12/09 start |
| | | //妿åµå¥Link |
| | | if(ordinaryValue.contains(";")){ |
| | | leafInfo.setOperator(Operator.IN); |
| | | String[] values = ordinaryValue.split(";"); |
| | | String QTname = values[0]; |
| | | String attr = values[1].substring(0, values[1].length()); |
| | | try { |
| | | QTInfo qt = platformClientUtil.getQTDService().getQT(QTname); |
| | | String qtText = qt.qtText; |
| | | QueryTemplate qt_ = OQTool.getQTByQTText(qt.qtName, qtText); |
| | | List<String> clauseList = new ArrayList<String>(); |
| | | clauseList.add(attr); |
| | | qt_.setClauseList(clauseList); |
| | | lValue.setQueryTemplate(qt_); |
| | | //lValue.setAttr(attr); |
| | | } catch (PLException e) { |
| | | e.printStackTrace(); |
| | | } catch (DocumentException e1) { |
| | | e1.printStackTrace(); |
| | | } |
| | | |
| | | }else{ |
| | | lValue.setOrdinaryValue(ordinaryValue); |
| | | } |
| | | //add by zhangweiwei 2014/12/09 end |
| | | } |
| | | } |
| | | |
| | | ci.setLeafInfo(leafInfo); |
| | | ciMap.put(ci.getId(), ci); |
| | | } |
| | | |
| | | Iterator<String> iterator = ciMap.keySet().iterator(); |
| | | ArrayList<ConditionItem> ciList = new ArrayList<ConditionItem>(); |
| | | String lCIId = null; |
| | | while(iterator.hasNext()){ |
| | | lCIId = iterator.next(); |
| | | break; |
| | | } |
| | | int count = ciMap.size(); |
| | | while(iterator.hasNext()){ |
| | | String rCIId = iterator.next(); |
| | | ConditionItem pCI = new ConditionItem(); |
| | | String pId = "ci" + ++count; |
| | | pCI.setId(pId); |
| | | pCI.setLeafFlag(false); |
| | | ChildrenInfo pChildrenInfo = new ChildrenInfo(); |
| | | pChildrenInfo.setLeftCIName(lCIId); |
| | | pChildrenInfo.setConnector(Connector.AND); |
| | | pChildrenInfo.setRightCIName(rCIId); |
| | | pCI.setChildrenInfo(pChildrenInfo); |
| | | ciList.add(pCI); |
| | | lCIId = pId; |
| | | } |
| | | for(Iterator<ConditionItem> i = ciList.iterator(); i.hasNext();){ |
| | | ConditionItem ci = i.next(); |
| | | ciMap.put(ci.getId(), ci); |
| | | } |
| | | //é«çº§æ¥è¯¢æ¡ä»¶ |
| | | }else if(qtInfoDTO.getLevelFlag() == 1){ |
| | | ciMap = getCIMapForSeniorTree(qtInfoDTO); |
| | | |
| | | // OQTool.parseTreeToDoc(seniorTree); |
| | | } |
| | | return ciMap; |
| | | } |
| | | |
| | | /** |
| | | * è·åé«çº§æ¥è¯¢çæ¥è¯¢æ¡ä»¶éå |
| | | * @return |
| | | */ |
| | | private HashMap<String, ConditionItem> getCIMapForSeniorTree(QTInfoDTO qtInfoDTO) throws PLException { |
| | | HashMap<String, ConditionItem> ciMap = new HashMap<>(); |
| | | HashMap<String, Object> tree = qtInfoDTO.getTree(); |
| | | if (tree.isEmpty()) { |
| | | // æ æ¥è¯¢æ¡ä»¶çæ¥è¯¢ |
| | | return null; |
| | | } |
| | | ArrayList<ConditionItem> ciList = new ArrayList<ConditionItem>(); |
| | | String connector = String.valueOf(tree.get("connector")); |
| | | List<Object> childrens = (List<Object>) tree.get("child"); |
| | | Iterator<Object> children = childrens.iterator(); |
| | | while (children.hasNext()) { |
| | | Object obj = children.next(); |
| | | if(obj instanceof JSONObject && (((JSONObject) obj).get("connector").equals(AND) |
| | | || ((JSONObject) obj).get("connector").equals(OR))){ |
| | | List<ConditionItem> subCIList = getCIList((JSONObject) obj, ciList.size() + 1); |
| | | if(subCIList == null){ |
| | | continue; |
| | | } |
| | | if(ciList.size() > 0){ |
| | | ConditionItem leftCI = ciList.get(ciList.size() - 1); |
| | | ConditionItem rightCI = subCIList.get(subCIList.size() - 1); |
| | | ciList.addAll(subCIList); |
| | | ConditionItem pCI = new ConditionItem(); |
| | | pCI.setId("ci" + (ciList.size() + 1)); |
| | | ciList.add(pCI); |
| | | pCI.setLeafFlag(false); |
| | | ChildrenInfo cInfo = new ChildrenInfo(); |
| | | pCI.setChildrenInfo(cInfo); |
| | | cInfo.setLeftCIName(leftCI.getId()); |
| | | cInfo.setConnector(connector); |
| | | cInfo.setRightCIName(rightCI.getId()); |
| | | }else{ |
| | | ciList.addAll(subCIList); |
| | | } |
| | | }else{ |
| | | String text = String.valueOf(obj); |
| | | if(text == null || text.equals("")){ |
| | | continue; |
| | | } |
| | | if(!text.contains(Operator.EQUAL) && !text.contains(Operator.UNEQUAL) && !text.contains(Operator.CONTAINS) |
| | | && !text.contains(Operator.IN) && !text.contains(Operator.NOTIN) &&!text.contains(Operator.GTE) && !text.contains(Operator.GT) |
| | | && !text.contains(Operator.LTE) && !text.contains(Operator.LT)){ |
| | | continue; |
| | | } |
| | | if(ciList.size() > 0){ |
| | | ConditionItem leftCI = ciList.get(ciList.size() - 1); |
| | | ConditionItem rightCI = getCIByNode(text, ciList.size() + 1); |
| | | ciList.add(rightCI); |
| | | ConditionItem pCI = new ConditionItem(); |
| | | pCI.setId("ci" + (ciList.size() + 1)); |
| | | ciList.add(pCI); |
| | | pCI.setLeafFlag(false); |
| | | ChildrenInfo cInfo = new ChildrenInfo(); |
| | | pCI.setChildrenInfo(cInfo); |
| | | cInfo.setLeftCIName(leftCI.getId()); |
| | | cInfo.setConnector(connector); |
| | | cInfo.setRightCIName(rightCI.getId()); |
| | | }else{ |
| | | ConditionItem ci = getCIByNode(text, ciList.size() + 1); |
| | | ciList.add(ci); |
| | | } |
| | | } |
| | | } |
| | | |
| | | for(int i = 0; i < ciList.size(); i++){ |
| | | ConditionItem ci = ciList.get(i); |
| | | ciMap.put(ci.getId(), ci); |
| | | } |
| | | return ciMap; |
| | | } |
| | | /** |
| | | * æ åä¸ä¸ªæ¥è¯¢æ¡ä»¶ç»èç¹ |
| | | * @param children |
| | | * @param beginId |
| | | * @return |
| | | */ |
| | | private List<ConditionItem> getCIList(JSONObject children, int beginId) throws PLException { |
| | | List<ConditionItem> ciList = new ArrayList<>(); |
| | | String connector = String.valueOf(children.get("connector")); |
| | | List<Object> childrens = (List<Object>) children.get("child"); |
| | | if(childrens == null){ |
| | | return null; |
| | | } |
| | | Iterator<Object> child = childrens.iterator(); |
| | | while (child.hasNext()) { |
| | | Object obj = child.next(); |
| | | if(obj instanceof JSONObject && (((JSONObject) obj).get("connector").equals(AND) |
| | | || ((JSONObject) obj).get("connector").equals(OR))){ |
| | | List<ConditionItem> subCIList = getCIList((JSONObject) obj, beginId); |
| | | if(ciList.size() > 0){ |
| | | ConditionItem leftCI = ciList.get(ciList.size() - 1); |
| | | ConditionItem rightCI = subCIList.get(subCIList.size() - 1); |
| | | ciList.addAll(subCIList); |
| | | beginId = beginId + subCIList.size(); |
| | | ConditionItem pCI = new ConditionItem(); |
| | | pCI.setId("ci" + beginId); |
| | | ciList.add(pCI); |
| | | beginId = beginId + 1; |
| | | pCI.setLeafFlag(false); |
| | | ChildrenInfo cInfo = new ChildrenInfo(); |
| | | pCI.setChildrenInfo(cInfo); |
| | | cInfo.setLeftCIName(leftCI.getId()); |
| | | cInfo.setConnector(connector); |
| | | cInfo.setRightCIName(rightCI.getId()); |
| | | }else{ |
| | | ciList.addAll(subCIList); |
| | | beginId = beginId + subCIList.size(); |
| | | } |
| | | }else{ |
| | | String text = String.valueOf(obj); |
| | | if(text == null || text.equals("")){ |
| | | continue; |
| | | } |
| | | if(!text.contains(Operator.EQUAL) && !text.contains(Operator.UNEQUAL) && !text.contains(Operator.CONTAINS) |
| | | && !text.contains(Operator.IN) && !text.contains(Operator.NOTIN) &&!text.contains(Operator.GTE) && !text.contains(Operator.GT) |
| | | && !text.contains(Operator.LTE) && !text.contains(Operator.LT)){ |
| | | continue; |
| | | } |
| | | if(ciList.size() > 0){ |
| | | ConditionItem leftCI = ciList.get(ciList.size() - 1); |
| | | ConditionItem rightCI = getCIByNode(text, beginId); |
| | | ciList.add(rightCI); |
| | | beginId = beginId + 1; |
| | | ConditionItem pCI = new ConditionItem(); |
| | | pCI.setId("ci" + beginId); |
| | | ciList.add(pCI); |
| | | beginId = beginId + 1; |
| | | pCI.setLeafFlag(false); |
| | | ChildrenInfo cInfo = new ChildrenInfo(); |
| | | pCI.setChildrenInfo(cInfo); |
| | | cInfo.setLeftCIName(leftCI.getId()); |
| | | cInfo.setConnector(connector); |
| | | cInfo.setRightCIName(rightCI.getId()); |
| | | }else{ |
| | | ConditionItem ci = getCIByNode(text, beginId); |
| | | ciList.add(ci); |
| | | beginId = beginId + 1; |
| | | } |
| | | } |
| | | } |
| | | return ciList; |
| | | } |
| | | /** |
| | | * é«çº§æ¥è¯¢ |
| | | * æNodeå
容解ææConditionItem |
| | | * @param text |
| | | * @param id |
| | | * @return |
| | | */ |
| | | private ConditionItem getCIByNode(String text, int id) throws PLException { |
| | | ConditionItem ci = new ConditionItem(); |
| | | ci.setId("ci" + id); |
| | | ci.setLeafFlag(true); |
| | | LeafInfo leafInfo = new LeafInfo(); |
| | | ci.setLeafInfo(leafInfo); |
| | | String operator = null; |
| | | if(text.contains(Operator.EQUAL)){ |
| | | operator = Operator.EQUAL; |
| | | }else if(text.contains(Operator.CONTAINS)){ |
| | | operator = Operator.CONTAINS; |
| | | }else if(text.contains(Operator.UNEQUAL)){ |
| | | operator = Operator.UNEQUAL; |
| | | }else if(text.contains(Operator.IN)){ |
| | | operator = Operator.IN; |
| | | }else if(text.contains(Operator.NOTIN)){ |
| | | operator = Operator.NOTIN; |
| | | }else if(text.contains(Operator.GTE)){ |
| | | operator = Operator.GTE; |
| | | }else if(text.contains(Operator.GT)){ |
| | | operator = Operator.GT; |
| | | }else if(text.contains(Operator.LTE)){ |
| | | operator = Operator.LTE; |
| | | }else if(text.contains(Operator.LT)){ |
| | | operator = Operator.LT; |
| | | } |
| | | int operatorIndex = text.indexOf(operator); |
| | | String clause = text.substring(0, operatorIndex).trim(); |
| | | String ordinaryValue = text.substring(operatorIndex + 2).trim(); |
| | | if(clause.contains("T_OID.") || clause.contains("F_OID.")){ |
| | | //廿T_OID.æè
F_OID. |
| | | String clause_ = clause.substring(6); |
| | | //屿§ä¸ºåç
§å±æ§ |
| | | if(clause_.contains(".")){ |
| | | int fpIndex = clause_.indexOf("."); |
| | | String refAbName = clause.substring(0, fpIndex + 6); |
| | | clause = clause.substring(fpIndex + 6 + 1); |
| | | leafInfo.setClause(refAbName); |
| | | //廿T_OID.æè
F_OID. |
| | | refAbName = refAbName.substring(6); |
| | | leafInfo.setOperator(Operator.IN); |
| | | QueryTemplate qt = getRefQT(refAbName, clause, operator, ordinaryValue); |
| | | LeafValue lValue = new LeafValue(); |
| | | lValue.setQueryTemplate(qt); |
| | | leafInfo.setValue(lValue); |
| | | //屿§ä¸ºéåç
§å±æ§ |
| | | }else{ |
| | | leafInfo.setClause(clause); |
| | | leafInfo.setOperator(operator); |
| | | LeafValue lValue = new LeafValue(); |
| | | leafInfo.setValue(lValue); |
| | | lValue.setOrdinaryValue(ordinaryValue); |
| | | } |
| | | }else{ |
| | | //屿§ä¸ºåç
§å±æ§ |
| | | if(clause.contains(".")){ |
| | | int fpIndex = clause.indexOf("."); |
| | | String refAbName = clause.substring(0, fpIndex); |
| | | clause = clause.substring(fpIndex + 1); |
| | | leafInfo.setClause(refAbName); |
| | | leafInfo.setOperator(Operator.IN); |
| | | QueryTemplate qt = getRefQT(refAbName, clause, operator, ordinaryValue); |
| | | LeafValue lValue = new LeafValue(); |
| | | lValue.setQueryTemplate(qt); |
| | | leafInfo.setValue(lValue); |
| | | //屿§ä¸ºéåç
§å±æ§ |
| | | }else{ |
| | | leafInfo.setClause(clause); |
| | | leafInfo.setOperator(operator); |
| | | LeafValue lValue = new LeafValue(); |
| | | leafInfo.setValue(lValue); |
| | | lValue.setOrdinaryValue(ordinaryValue); |
| | | } |
| | | } |
| | | |
| | | return ci; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * è·ååç
§çæ¥è¯¢æ¨¡æ¿ |
| | | * @param refAbName: åç
§å±æ§å |
| | | * @param clause: 屿§åç
§çä¸å¡ç±»åä¸ç屿§ |
| | | * @param operator |
| | | * @param ordinaryValue |
| | | * @return |
| | | */ |
| | | private QueryTemplate getRefQT(String refAbName, String clause, |
| | | String operator, String ordinaryValue) throws PLException { |
| | | QueryTemplate qt = new QueryTemplate(); |
| | | List<String> clauseList = new ArrayList<String>(); |
| | | clauseList.add("OID"); |
| | | qt.setClauseList(clauseList); |
| | | AttributeDef refAb = platformClientUtil.getAttributeService().getAttributeDefByName(refAbName); |
| | | OtherInfo otherInfo = OtherInfo.getOtherInfoByText(refAb.other); |
| | | int refFlag = otherInfo.getRefFlag(); |
| | | String type = otherInfo.getRefTypeName(); |
| | | if(refFlag == 0){ |
| | | qt.setType(QTConstants.TYPE_BTM); |
| | | qt.setBtmType(type); |
| | | }else if(refFlag == 1){ |
| | | qt.setType(QTConstants.TYPE_LINK); |
| | | qt.setLinkType(type); |
| | | } |
| | | Condition condition = new Condition(); |
| | | qt.setCondition(condition); |
| | | condition.setRootCIName("ci1"); |
| | | HashMap<String, ConditionItem> ciMap = new HashMap<String, ConditionItem>(); |
| | | condition.setCIMap(ciMap); |
| | | ConditionItem ci = new ConditionItem(); |
| | | ci.setId("ci1"); |
| | | ciMap.put(ci.getId(), ci); |
| | | ci.setLeafFlag(true); |
| | | LeafInfo leafInfo = new LeafInfo(); |
| | | if(clause.contains(".")){ |
| | | int fpIndex = clause.indexOf("."); |
| | | String refAbName_ = clause.substring(0, fpIndex); |
| | | clause = clause.substring(fpIndex + 1); |
| | | leafInfo.setClause(refAbName_); |
| | | leafInfo.setOperator(Operator.IN); |
| | | QueryTemplate qt_ = getRefQT(refAbName_, clause, operator, ordinaryValue); |
| | | LeafValue lValue = new LeafValue(); |
| | | lValue.setQueryTemplate(qt_); |
| | | leafInfo.setValue(lValue); |
| | | qt.setId("qt_" + refAbName + "_" + refAbName_); |
| | | }else{ |
| | | leafInfo.setClause(clause); |
| | | leafInfo.setOperator(operator); |
| | | LeafValue lValue = new LeafValue(); |
| | | lValue.setOrdinaryValue(ordinaryValue); |
| | | leafInfo.setValue(lValue); |
| | | qt.setId("qt_" + refAbName + "_" + clause); |
| | | } |
| | | ci.setLeafInfo(leafInfo); |
| | | condition.setCIMap(ciMap); |
| | | return qt; |
| | | } |
| | | |
| | | /** |
| | | * ç»è£
æ¥è¯¢æ¨¡æ¿ |
| | | * @return |
| | | */ |
| | | public QueryTemplate getQT(HashMap<String,Object> dataMap){ |
| | | QueryTemplate qt = new QueryTemplate(); |
| | | qt.setType(QTConstants.TYPE_LINK); |
| | | //TODO String qtId = |
| | | qt.setLinkType((String) dataMap.get("linkTypeName")); |
| | | qt.setDirection( (Boolean)dataMap.get("rdPositive") ? QTConstants.DIRECTION_POSITIVE : QTConstants.DIRECTION_OPPOSITE); |
| | | qt.setBtmType((String) dataMap.get("btmName")); |
| | | if("ææç±»å".equals(dataMap.get("combRelaType"))){ |
| | | qt.setBtmType("*"); |
| | | } |
| | | qt.setVersion(getVersion((String) dataMap.get("versionValue"))); |
| | | qt.setQueryISLeaf((Boolean) dataMap.get("isQueryIsLeaf")); |
| | | qt.setLevel(StringUtils.isBlank((CharSequence) dataMap.get("level")) ? 1 : Integer.valueOf(String.valueOf(dataMap.get("level")))); |
| | | List<String> clauseList = new ArrayList<String>(); |
| | | //TODO æ¥è¯¢å æ¾ç¤ºå |
| | | clauseList.add("*"); |
| | | qt.setClauseList(clauseList); |
| | | // Condition con = new Condition(); |
| | | // qt.setCondition(con); |
| | | // HashMap<String, ConditionItem> ciMap = getCIMap(); |
| | | // con.setCIMap(ciMap); |
| | | // con.setRootCIName(con.getRootCINameByCIMap(ciMap)); |
| | | return qt; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è¿åæ¥è¯¢ççæ¬ |
| | | * @return |
| | | */ |
| | | public int getVersion(String versionValue){ |
| | | int version = 0; |
| | | if(versionValue.equals("å½åçæ¬å½åçæ¬¡")){ |
| | | version = 1; |
| | | }else if(versionValue.equals("å½åçæ¬ææ°çæ¬¡")){ |
| | | version = 2; |
| | | }else if(versionValue.equals("ææ°çæ¬ææ°çæ¬¡")){ |
| | | version = 3; |
| | | }else if(versionValue.equals("å½åçæ¬¡")){ |
| | | version = 4; |
| | | }else if(versionValue.equals("å½åçæ¬")){ |
| | | version = 5; |
| | | }else if(versionValue.equals("å½åå½å对象")){ |
| | | version = 6; |
| | | }else if(versionValue.equals("å·²åå¸çææ°çæ¬")){ |
| | | version = 7; |
| | | } |
| | | return version; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * æ ¡éªåæ° |
| | |
| | | "script-loader": "^0.7.2", |
| | | "vue": "^2.6.10", |
| | | "vue-axios": "^2.1.2", |
| | | "vue-flowchart-editor": "1.0.2", |
| | | "vue-i18n": "^8.7.0", |
| | | "vue-quill-editor": "^3.0.6", |
| | | "vue-router": "^3.0.1", |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function getBizTypes(params) { |
| | | return request({ |
| | | url: "/api/btmTypeController/getTreeBizTypes", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function gridLifeCycle() { |
| | | return request({ |
| | | url: "/api/lifeCycleController/gridLifeCycle", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // è·è¿äºä»¶æ¥è¯¢ |
| | | export function getLCEventKeys() { |
| | | return request({ |
| | | url: "/api/lifeCycleController/getLCEventKeys", |
| | | method: "get", |
| | | }); |
| | | } |
| | | |
| | | // å建 |
| | | export function addLifeCycle(params) { |
| | | return request({ |
| | | url: "/api/lifeCycleController/addLifeCycle", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // ä¿®æ¹ |
| | | export function updateLifeCycle(params) { |
| | | return request({ |
| | | url: "/api/lifeCycleController/updateLifeCycle", |
| | | method: "put", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // å é¤ |
| | | export function deleteLifeCycles(data) { |
| | | return request({ |
| | | url: "/api/lifeCycleController/deleteLifeCycles", |
| | | method: "delete", |
| | | data:data |
| | | }); |
| | | } |
| | | |
| | | // 导å
¥ |
| | | export function exportLifeCycles (params) { |
| | | return request({ |
| | | url: '/api/lifeCycleController/exportLifeCycles', |
| | | method: 'get', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // æ¥çéç¨èå´ |
| | | export function getUsedLifeCycleList(params) { |
| | | return request({ |
| | | url: "/api/lifeCycleController/getUsedLifeCycleList", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | |
| | | }); |
| | | } |
| | | |
| | | // ä¿®å¤ |
| | | export function repairTable(params) { |
| | | return request({ |
| | | url: "/api/linkTypeController/repairTable", |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // å建è§å¾ |
| | | export function createView() { |
| | | return request({ |
| | |
| | | } |
| | | |
| | | // æ¥ä¸å¡ç±»åæ¥å£ |
| | | export function getBizTypes() { |
| | | export function getBizTypes(params) { |
| | | return request({ |
| | | url: "/api/linkTypeController/expData", |
| | | method: "post", |
| | | url: "/api/btmTypeController/getBizTypes", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | |
| | | // å¯¼åº |
| | | export function exportStatus (params) { |
| | | export function expData (params) { |
| | | return request({ |
| | | url: '/api/statusController/exportStatus', |
| | | url: '/api/linkTypeController/expData', |
| | | method: 'get', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | |
| | | }) |
| | | } |
| | | |
| | | // ä¿å ä¿®æ¹ æ¥å£ |
| | | export function addAndEditLink(addFlag,params) { |
| | | return request({ |
| | | url: `/api/linkTypeController/addAndEditLink?addFlag=${addFlag}`, |
| | | method: "post", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | | // å 餿¥å£ |
| | | export function deleteLink(params) { |
| | | return request({ |
| | | url: '/api/linkTypeController/deleteLink', |
| | | method: "delete", |
| | | data:params |
| | | }); |
| | | } |
| | | |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function gridStatus(params) { |
| | | export function gridStatus(page, limit) { |
| | | return request({ |
| | | url: "/api/statusController/gridStatus", |
| | | method: "get", |
| | | params |
| | | params: { |
| | | page, |
| | | limit, |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | return request({ |
| | | url: "/api/statusController/addSave", |
| | | method: "post", |
| | | data:params |
| | | data: params |
| | | }); |
| | | } |
| | | |
| | |
| | | return request({ |
| | | url: "/api/statusController/editSave", |
| | | method: "put", |
| | | data:params |
| | | data: params |
| | | }); |
| | | } |
| | | |
| | |
| | | return request({ |
| | | url: "/api/statusController/deleteStatus", |
| | | method: "delete", |
| | | data:params |
| | | data: params |
| | | }); |
| | | } |
| | | |
| | | // å¯¼åº |
| | | export function exportStatus (params) { |
| | | export function exportStatus(params) { |
| | | return request({ |
| | | url: '/api/statusController/exportStatus', |
| | | method: 'get', |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <context-menu class="contextMenu"> |
| | | <node-menu> |
| | | <!-- <menu-li command="copy" text="æ·è´" />--> |
| | | <menu-li command="delete" text="å é¤" /> |
| | | </node-menu> |
| | | <edge-menu> |
| | | <menu-li command="delete" text="å é¤" /> |
| | | </edge-menu> |
| | | <canvas-menu> |
| | | <menu-li command="undo" text="æ¤é" /> |
| | | <menu-li command="redo" text="éå" /> |
| | | <!-- <menu-li command="pasteHere" icon="paste" text="ç²è´´å°è¿é" />--> |
| | | </canvas-menu> |
| | | </context-menu> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | NodeMenu, |
| | | EdgeMenu, |
| | | GroupMenu, |
| | | MultiMenu, |
| | | CanvasMenu, |
| | | ContextMenu, |
| | | } from 'vue-flowchart-editor' |
| | | import MenuLi from './ContextMenuItem' |
| | | |
| | | export default { |
| | | name: 'EditorContextMenu', |
| | | components: { |
| | | NodeMenu, |
| | | EdgeMenu, |
| | | GroupMenu, |
| | | MultiMenu, |
| | | CanvasMenu, |
| | | ContextMenu, |
| | | MenuLi, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .contextMenu { |
| | | display: none; |
| | | overflow: hidden; |
| | | font-size: 12px; |
| | | background: #fff; |
| | | border-radius: 4px; |
| | | box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15); |
| | | } |
| | | |
| | | .contextMenu .command.disable .item { |
| | | color: rgba(0, 0, 0, 0.25); |
| | | cursor: auto; |
| | | } |
| | | |
| | | .contextMenu .command.disable .item:hover { |
| | | background: #fff; |
| | | } |
| | | |
| | | .contextMenu .item { |
| | | display: flex; |
| | | align-items: center; |
| | | padding: 5px 12px; |
| | | cursor: pointer; |
| | | transition: all 0.3s; |
| | | user-select: none; |
| | | } |
| | | |
| | | .contextMenu .item:hover { |
| | | background: #e6f7ff; |
| | | } |
| | | |
| | | .contextMenu .item i { |
| | | margin-right: 8px; |
| | | margin-top: 3px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <command :name="command"> |
| | | <div class="item"> |
| | | <icon :type="iconType" :title="text" /> |
| | | <span>{{ label }}</span> |
| | | </div> |
| | | </command> |
| | | </template> |
| | | |
| | | <script> |
| | | import { Command } from 'vue-flowchart-editor' |
| | | import Icon from './Icon' |
| | | import upperFirst from 'lodash/upperFirst' |
| | | |
| | | export default { |
| | | name: 'EditorContextMenuItem', |
| | | |
| | | components: { |
| | | Command, |
| | | Icon, |
| | | }, |
| | | |
| | | props: ['command', 'icon', 'text'], |
| | | |
| | | computed: { |
| | | iconType() { |
| | | return `icon${this.icon || this.command}` |
| | | }, |
| | | |
| | | label() { |
| | | return this.text || upperFirst(this.command) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <register-command |
| | | name="generateData" |
| | | :config="generateDataCommandConfig" |
| | | extend="copy" |
| | | /> |
| | | <register-command |
| | | name="downloadImage" |
| | | :config="downloadImageCommandConfig" |
| | | extend="copy" |
| | | /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { RegisterCommand } from 'vue-flowchart-editor' |
| | | |
| | | export default { |
| | | name: 'CustomCommand', |
| | | |
| | | components: { |
| | | RegisterCommand, |
| | | }, |
| | | |
| | | inject: ['root'], |
| | | |
| | | props: ['save', 'download'], |
| | | |
| | | data() { |
| | | const { propsAPI } = this.root |
| | | const { save, download } = this |
| | | return { |
| | | generateDataCommandConfig: { |
| | | queue: false, // æ¯å¦è¿å
¥åéï¼é»è®¤ä¸º true |
| | | enable(/* editor */) { |
| | | // å½ä»¤æ¯å¦å¯ç¨ |
| | | return true |
| | | }, |
| | | execute(/* editor */) { |
| | | // æ£åå½ä»¤é»è¾ |
| | | console.log('æ§è¡æ£åå½ä»¤') |
| | | const data = propsAPI.save() |
| | | console.log(data) |
| | | console.log(JSON.stringify(data)) |
| | | save(data) |
| | | alert(JSON.stringify(data)) |
| | | }, |
| | | back(/* editor */) { |
| | | // ååå½ä»¤é»è¾ |
| | | console.log('æ§è¡ååå½ä»¤') |
| | | }, |
| | | }, |
| | | downloadImageCommandConfig: { |
| | | queue: false, |
| | | enable() { |
| | | return true |
| | | }, |
| | | execute() { |
| | | download() |
| | | }, |
| | | back() {}, |
| | | }, |
| | | } |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="right_box"> |
| | | <hr/> |
| | | <div v-if="type === 'node'"> |
| | | <el-form |
| | | ref="form" |
| | | :model="formModel" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | size="mini" |
| | | > |
| | | <el-form-item label="åç§°" prop="label"> |
| | | <el-input v-model.trim="formModel.label" :maxLength="20" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="å½¢ç¶"> |
| | | <el-select |
| | | v-model="formModel.shape" |
| | | :disabled="!disabledBtn" |
| | | placeholder="è¯·éæ©å½¢ç¶" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in shapeTypeList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="é¢è²"> |
| | | <el-input v-model.trim="formModel.color" :disabled="!disabledBtn" clearable/> |
| | | </el-form-item> |
| | | <el-form-item label="宽度" prop="width"> |
| | | <el-input v-model.trim.number="formModel.width" :disabled="!disabledBtn" clearable> |
| | | <template slot="prepend">宽</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | <el-form-item label="é«åº¦" prop="height"> |
| | | <el-input v-model.trim.number="formModel.height" :disabled="!disabledBtn" clearable> |
| | | <template slot="prepend">é«</template> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div v-else-if="type === 'edge'"> |
| | | <el-form |
| | | :model="formModel" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | size="small" |
| | | > |
| | | <el-form-item label="èµ·å§ç¶æ"> |
| | | <el-input v-model.trim="formModel.source" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="ç®æ ç¶æ"> |
| | | <el-input v-model.trim="formModel.target" disabled/> |
| | | </el-form-item> |
| | | <el-form-item label="åç§°"> |
| | | <el-input v-model.trim="formModel.label" :disabled="!disabledBtn"/> |
| | | </el-form-item> |
| | | <el-form-item label="å½¢ç¶"> |
| | | <el-select |
| | | v-model="formModel.shape" |
| | | :disabled="!disabledBtn" |
| | | placeholder="è¯·éæ©å½¢ç¶" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in lineTypeList" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div class="btn_box"> |
| | | <el-button :disabled="!disabledBtn" size="mini" type="primary" @click="handleSubmit" |
| | | >æ´æ°å±æ§ |
| | | </el-button |
| | | > |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import {cloneDeep} from 'lodash' |
| | | |
| | | export default { |
| | | name: 'EditorDetailForm', |
| | | |
| | | inject: ['root'], |
| | | |
| | | props: ['type', 'readOnly'], |
| | | |
| | | data() { |
| | | return { |
| | | formModel: {}, |
| | | fontSize: 12, |
| | | shapeTypeList: [ |
| | | {label: 'ç©å½¢', value: 'flow-rect'}, |
| | | {label: 'æ¤å', value: 'flow-circle'}, |
| | | {label: 'è±å½¢', value: 'flow-rhombus'}, |
| | | {label: 'è¶å', value: 'flow-capsule'}, |
| | | ], |
| | | lineTypeList: [ |
| | | {label: 'æ²çº¿', value: 'flow-smooth'}, |
| | | {label: 'æçº¿', value: 'flow-polyline'}, |
| | | {label: 'åè§æçº¿', value: 'flow-polyline-round'}, |
| | | ], |
| | | rules: { |
| | | label: [{required: true, message: 'åç§°ä¸è½ä¸ºç©º', trigger: 'blur'}], |
| | | width: [ |
| | | {required: true, message: '宽度ä¸è½ä¸ºç©º', trigger: 'blur'}, |
| | | {pattern: /^[0-9]+$/, message: '宽度åªè½ä¸ºæ°å', trigger: 'blur'}, |
| | | ], |
| | | height: [ |
| | | {required: true, message: 'é«åº¦ä¸è½ä¸ºç©º', trigger: 'blur'}, |
| | | {pattern: /^[0-9]+$/, message: 'é«åº¦åªè½ä¸ºæ°å', trigger: 'blur'}, |
| | | ], |
| | | }, |
| | | } |
| | | }, |
| | | |
| | | created() { |
| | | const formModel = this.root.propsAPI.getSelected()[0].getModel() |
| | | this.formModel = Object.assign( |
| | | {width: 80, height: 48}, |
| | | {shape: 'flow-smooth'}, |
| | | cloneDeep(formModel) // 鲿¢è¯¯ç¼è¾ |
| | | ) |
| | | }, |
| | | computed: { |
| | | disabledBtn() { |
| | | return this.$store.state.flow.methodBtn; |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | async handleSubmit() { |
| | | if (this.type === 'node') { |
| | | await this.$refs.form.validate() |
| | | } |
| | | const {getSelected, executeCommand, update} = this.root.propsAPI |
| | | const {formModel} = this |
| | | setTimeout(() => { |
| | | const item = getSelected()[0] |
| | | if (!item) return |
| | | |
| | | // èªå¨è°æ´å°ºå¯¸ |
| | | const adjustSize = (model) => { |
| | | // if (model.type !== 'node' || model.shape !== 'flow-rect') { |
| | | // return model |
| | | // } |
| | | const canvas = document.createElement('canvas') |
| | | const canvasContext = canvas.getContext('2d') |
| | | canvasContext.font = this.fontSize + 'px System' |
| | | let label = model.label.replace('\n', '') |
| | | let sourceWidth = this.formModel.width |
| | | let sourceHeight = this.formModel.height |
| | | const spacing = 10 |
| | | // è·åæå宽度 |
| | | const widthWithSpacing = canvasContext.measureText(label).width + spacing |
| | | model.size = `${sourceWidth}*${sourceHeight}` // å
æ¢å¤é»è®¤å°ºå¯¸ |
| | | |
| | | if (widthWithSpacing <= sourceWidth) { |
| | | return model |
| | | } |
| | | |
| | | // èªå¨æè¡ |
| | | let multilineText = '' |
| | | let multilineCount = 1 |
| | | let multilineTextWidth = 0 |
| | | |
| | | for (const char of label) { |
| | | const {width} = canvasContext.measureText(char) |
| | | console.log(multilineTextWidth + width + spacing, 'multilineTextWidth'); |
| | | if (multilineTextWidth + width + spacing >= sourceWidth) { |
| | | multilineText += '\n' |
| | | multilineTextWidth = 0 |
| | | multilineCount++ |
| | | } |
| | | multilineText += char |
| | | multilineTextWidth += width |
| | | } |
| | | |
| | | return { |
| | | ...model, |
| | | label: multilineText, |
| | | size: `${sourceWidth}*${Math.max( |
| | | sourceHeight, |
| | | this.fontSize * multilineCount * 1.2 + spacing |
| | | )}`, |
| | | } |
| | | } |
| | | |
| | | const newFormModel = adjustSize(formModel) |
| | | console.log(newFormModel, 'newFormModel') |
| | | executeCommand(() => { |
| | | update(item, newFormModel) |
| | | }) |
| | | }, 0) |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .btn_box { |
| | | text-align: center; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div> |
| | | <div class="tree_data_box"> |
| | | <el-form |
| | | ref="form" |
| | | :model="newRowData" |
| | | :rules="rules" |
| | | label-width="80px" |
| | | size="mini" |
| | | > |
| | | <el-form-item label="åç§°" prop="id"> |
| | | <el-input v-model.trim="newRowData.id" :disabled="!disabledBtn" :maxLength="20" clearable/> |
| | | </el-form-item> |
| | | <el-form-item label="æ ç¾" prop="name"> |
| | | <el-input v-model.trim="newRowData.name" :disabled="!disabledBtn" clearable/> |
| | | </el-form-item> |
| | | <el-form-item label="èµ·å§ç¶æ" prop="startStatus"> |
| | | <el-select |
| | | v-model="newRowData.startStatus" |
| | | :disabled="!disabledBtn" |
| | | placeholder="è¯·éæ©èµ·å§ç¶æ" |
| | | style="width: 100%" |
| | | > |
| | | <el-option |
| | | v-for="item in existNodes" |
| | | :key="item.id" |
| | | :label="item.id" |
| | | :value="item.id" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="æè¿°"> |
| | | <el-input v-model.trim="newRowData.description" :disabled="!disabledBtn" type="textarea"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <detail-panel> |
| | | <template v-slot="{ status }"> |
| | | <node-panel :status="status"> |
| | | <detail-form ref="detailFrom" type="node"/> |
| | | </node-panel> |
| | | <edge-panel :status="status"> |
| | | <detail-form type="edge"/> |
| | | </edge-panel> |
| | | <group-panel :status="status"> |
| | | <detail-form type="group"/> |
| | | </group-panel> |
| | | |
| | | <div v-if="status === 'edge-selected'" class="event"> |
| | | <hr/> |
| | | <h4>è·è¿äºä»¶</h4> |
| | | <el-select |
| | | ref="mySelect" |
| | | v-model="currentSelectedLine.events" |
| | | :disabled="!disabledBtn" |
| | | multiple |
| | | size="mini" |
| | | style="width: 100%" |
| | | value-key="oid" |
| | | @change="handleChange" |
| | | > |
| | | <el-option |
| | | v-for="(item,index) in newRowData.eventList" |
| | | :key="index" |
| | | :label="item" |
| | | :value="item" |
| | | ></el-option> |
| | | </el-select> |
| | | </div> |
| | | </template> |
| | | </detail-panel> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | // import API from "@/api/modeling/cycle"; |
| | | |
| | | import { |
| | | NodePanel, |
| | | EdgePanel, |
| | | GroupPanel, |
| | | MultiPanel, |
| | | CanvasPanel, |
| | | DetailPanel, |
| | | } from "vue-flowchart-editor"; |
| | | import DetailForm from "./DetailForm"; |
| | | |
| | | export default { |
| | | name: "EditorDetailPanel", |
| | | components: { |
| | | NodePanel, |
| | | EdgePanel, |
| | | GroupPanel, |
| | | MultiPanel, |
| | | CanvasPanel, |
| | | DetailPanel, |
| | | DetailForm, |
| | | }, |
| | | props: ["rowData", "existNodes", "existEdges", "type", "currentSelectedLine"], |
| | | data() { |
| | | return { |
| | | newRowData: { |
| | | startStatus: undefined, |
| | | name: undefined, |
| | | id: undefined, |
| | | remark: undefined, |
| | | saveEventList: [] |
| | | }, |
| | | rules: { |
| | | name: [{required: true, message: "åç§°ä¸è½ä¸ºç©º", trigger: "blur"}], |
| | | id: [ |
| | | {required: true, message: "æ ç¾ä¸è½ä¸ºç©º", trigger: "blur"}, |
| | | { |
| | | pattern: /^[A-z]+$/g, |
| | | message: "æ ç¾åªè½è¾å
¥è±æ", |
| | | trigger: "blur", |
| | | }, |
| | | ], |
| | | startStatus: [ |
| | | {required: true, message: "èµ·å§ç¶æä¸è½ä¸ºç©º", trigger: "change"}, |
| | | ], |
| | | }, |
| | | eventList: [ |
| | | { |
| | | oid: '1', |
| | | value: 'xxx', |
| | | eventShowName: 'xxx' |
| | | } |
| | | ], |
| | | edgeEventList: {}, |
| | | currentActive: 0, |
| | | }; |
| | | }, |
| | | created() { |
| | | }, |
| | | computed: { |
| | | disabledBtn() { |
| | | return this.$store.state.flow.methodBtn; |
| | | } |
| | | }, |
| | | methods: { |
| | | async getNewRowDate() { |
| | | return new Promise((resolve) => { |
| | | this.$refs.form.validate((flag) => { |
| | | if (!flag) { |
| | | resolve(false); |
| | | } else { |
| | | resolve(this.newRowData); |
| | | } |
| | | }); |
| | | }); |
| | | }, |
| | | handleChange(val) { |
| | | } |
| | | |
| | | }, |
| | | watch: { |
| | | rowData: { |
| | | deep: true, |
| | | immediate: true, |
| | | handler(newV) { |
| | | if ( |
| | | typeof newV === "object" && |
| | | newV !== null && |
| | | Object.keys(this.rowData).length > 0 |
| | | ) { |
| | | this.newRowData = Object.assign({}, newV); |
| | | } |
| | | }, |
| | | }, |
| | | existNodes(newV) { |
| | | const flag = newV.some((item) => item.id === this.newRowData.startStatus); |
| | | if (!flag) { |
| | | this.newRowData.startStatus = undefined; |
| | | } |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | <style lang="scss" scoped> |
| | | |
| | | ::v-deep { |
| | | .el-tag.el-tag--info { |
| | | color: #409eff; |
| | | background-color: #ecf5ff; |
| | | } |
| | | |
| | | } |
| | | |
| | | .event { |
| | | margin-top: 20px; |
| | | text-align: center; |
| | | } |
| | | |
| | | .flex { |
| | | margin-top: 10px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | } |
| | | |
| | | .red { |
| | | color: red; |
| | | } |
| | | |
| | | .active { |
| | | // box-shadow: 2px 2px 2px rgba(0, 0, 0, 0.4) |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <minimap :height="200" /> |
| | | </template> |
| | | |
| | | <script> |
| | | import { Minimap } from 'vue-flowchart-editor' |
| | | export default { |
| | | name: 'EditorMinimap', |
| | | components: { Minimap }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <i class="action" :title="text"> |
| | | <svg width="1em" height="1em" fill="currentColor"> |
| | | <use :xlink:href="'#' + type" /> |
| | | </svg> |
| | | </i> |
| | | </template> |
| | | |
| | | <script> |
| | | import '../iconfont' |
| | | export default { |
| | | name: 'EditorIcon', |
| | | props: ['type', 'text'], |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="item_panel_box"> |
| | | <el-input size="mini" placeholder="è¾å
¥å
³é®åè¿è¡è¿æ»¤" v-model="filterText"> |
| | | </el-input> |
| | | <div class="box_item"> |
| | | <item-panel class="item-panel" v-loading="loading"> |
| | | <template v-for="(item, index) in nodeItems"> |
| | | <item |
| | | :key="index" |
| | | :type="item.type || 'node'" |
| | | :size="item.size || '72*43'" |
| | | :shape="item.shape || 'flow-rect'" |
| | | :model="{ |
| | | // must have model property |
| | | color: item.color || '#1890FF', |
| | | label: item.id || 'èç¹' |
| | | }" |
| | | > |
| | | <template v-if="item.src"> |
| | | <div class="item item-img"> |
| | | <img :src="item.src" :alt="item.id" /> |
| | | </div> |
| | | </template> |
| | | <template v-else> |
| | | <div :class="'item item-' + (item.shape || 'flow-rect')"> |
| | | <span>{{ item.id }}</span> |
| | | </div> |
| | | </template> |
| | | </item> |
| | | </template> |
| | | </item-panel> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | import { Item, ItemPanel } from 'vue-flowchart-editor' |
| | | // import { getPage } from '../../../api/omd/status' |
| | | |
| | | export default { |
| | | name: 'EditorItemPanel', |
| | | components: { ItemPanel, Item }, |
| | | props: { |
| | | nodeItems:{ |
| | | type:Array, |
| | | default:() => [], |
| | | } |
| | | }, |
| | | data() { |
| | | return { |
| | | filterText: '', |
| | | loading: false, |
| | | } |
| | | }, |
| | | created() { |
| | | this.loading = false |
| | | |
| | | }, |
| | | computed: { |
| | | filterNode() { |
| | | return this.nodeItems.filter(item => item.id.includes(this.filterText)) |
| | | } |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .item-panel { |
| | | width: 210px; |
| | | height: 77vh; |
| | | text-align: center; |
| | | overflow-y: scroll; |
| | | display: flex; |
| | | flex-wrap: wrap; /* å
许æ¢è¡ */ |
| | | justify-content: center; /* å±
ä¸å¯¹é½é¡¹ç® */ |
| | | align-items: flex-start; /* ç¡®ä¿é¡¹ç®å¨å®¹å¨é¡¶é¨å¯¹é½ */ |
| | | } |
| | | |
| | | .item { |
| | | display: flex; |
| | | justify-content: center; |
| | | align-items: center; |
| | | font-size: 12px; |
| | | margin: 10px; /* 设å®å¤è¾¹è·ä»¥ç¡®ä¿é¡¹ç®é´æé´é */ |
| | | user-select: none; |
| | | } |
| | | |
| | | /* 项ç®ç±»åçæ ·å¼ */ |
| | | .item-flow-rect { |
| | | width: 75px; |
| | | padding: 6px; |
| | | box-sizing: border-box; |
| | | border: 1px solid rgb(24, 144, 255); |
| | | background-color: rgba(24, 144, 255, 0.2); |
| | | } |
| | | |
| | | .item-flow-circle { |
| | | width: 70px; |
| | | height: 70px; |
| | | border-radius: 60px; |
| | | border: 1px solid rgb(250, 140, 22); |
| | | background-color: rgba(250, 140, 22, 0.2); |
| | | } |
| | | |
| | | .item-flow-rhombus { |
| | | width: 70px; |
| | | height: 70px; |
| | | border: 1px solid rgb(19, 194, 194); |
| | | background-color: rgba(19, 194, 194, 0.2); |
| | | transform: rotate(45deg); |
| | | margin: 25px auto; |
| | | |
| | | span { |
| | | transform: rotate(-45deg); |
| | | } |
| | | } |
| | | |
| | | .item-img { |
| | | max-width: 100px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <toolbar class="toolbar"> |
| | | <template> |
| | | <toolbar-button command="undo" text="æ¤é"/> |
| | | <toolbar-button command="redo" text="éå"/> |
| | | <!-- <toolbar-button command="copy" text="å¤å¶"/>--> |
| | | <!-- <toolbar-button command="paste" text="ç²è´´"/>--> |
| | | <div class="split"></div> |
| | | </template> |
| | | <toolbar-button command="zoomIn" icon="zoom-in" text="æ¾å¤§"/> |
| | | <toolbar-button command="zoomOut" icon="zoom-out" text="缩å°"/> |
| | | <toolbar-button command="autoZoom" icon="fit" text="èªéåº"/> |
| | | <toolbar-button command="resetZoom" icon="actual-size" text="å®é
尺寸"/> |
| | | <template> |
| | | <div class="split"></div> |
| | | <!-- <toolbar-button command="toBack" icon="to-back" text="åä¸ä¸å±" /> --> |
| | | <!-- <toolbar-button command="toFront" icon="to-front" text="åä¸ä¸å±" /> --> |
| | | <!-- <toolbar-button command="addGroup" icon="group" text="ç¼ç»" /> --> |
| | | <!-- <toolbar-button command="unGroup" icon="ungroup" text="åæ¶ç¼ç»" /> --> |
| | | <toolbar-button command="selectAll" icon="select-all" text="å
¨é"/> |
| | | <toolbar-button command="multiSelect" icon="select" text="æ¡é"/> |
| | | <div v-if="disabledBtn" class="split"></div> |
| | | <toolbar-button command="delete" text="å é¤"/> |
| | | <toolbar-button command="clear" icon="clear" text="æ¸
空ç»å¸"/> |
| | | </template> |
| | | <template> |
| | | <div class="split"></div> |
| | | <toolbar-button |
| | | command="downloadImage" |
| | | icon="image" |
| | | text="ä¸è½½å¾å" |
| | | /> |
| | | </template> |
| | | <!-- <el-button>{{this.$store}}</el-button>--> |
| | | <el-button :disabled="!disabledBtn" icon="el-icon-check" plain size="small" type="success" |
| | | @click="saveClickHandler">ä¿å |
| | | </el-button> |
| | | <el-button :disabled="!disabledBtn" icon="el-icon-close" plain size="small" type="danger" |
| | | @click="removeClickHandler">åæ¶ |
| | | </el-button> |
| | | <!-- right toolbar button --> |
| | | <!-- <div class="pull-right">--> |
| | | <!-- <toolbar-button--> |
| | | <!-- command="generateData"--> |
| | | <!-- icon="save"--> |
| | | <!-- text="çææ°æ®"--> |
| | | <!-- label="ä¿åæ°æ®"--> |
| | | <!-- />--> |
| | | <!-- </div>--> |
| | | </toolbar> |
| | | </template> |
| | | |
| | | <script> |
| | | import {Toolbar} from 'vue-flowchart-editor' |
| | | import ToolbarButton from './ToolbarButton' |
| | | |
| | | export default { |
| | | name: 'FlowToolbar', |
| | | |
| | | components: { |
| | | Toolbar, |
| | | ToolbarButton, |
| | | }, |
| | | |
| | | props: ['chartData', 'toggleReadOnly'], |
| | | created() { |
| | | |
| | | }, |
| | | computed: { |
| | | disabledBtn() { |
| | | return this.$store.state.flow.methodBtn; |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | // åæ¶æé®ç¹å» |
| | | removeClickHandler() { |
| | | this.$confirm("æ¨ç¡®è®¤æ§è¡åæ¶æä½?", "æç¤º", { |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }).then(() => { |
| | | this.$store.dispatch('updateMethodBtn', false); |
| | | this.$store.dispatch('typeChange', ''); |
| | | console.log(this.$s) |
| | | // this.$emit('reset-tree'); // 触åç¶ç»ä»¶éç½® |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // ä¿åæé®ç¹å»äºä»¶ |
| | | saveClickHandler(){ |
| | | this.$emit('handler-save'); |
| | | }, |
| | | }, |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .toolbar { |
| | | display: flex; |
| | | align-items: center; |
| | | height: 27px; |
| | | |
| | | .split { |
| | | width: 10px; |
| | | height: 100%; |
| | | border-right: 1px solid #eee; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .pull-right { |
| | | display: flex; |
| | | align-items: center; |
| | | margin-left: auto; |
| | | } |
| | | |
| | | .command { |
| | | margin-right: 15px; |
| | | display: flex; |
| | | color: #333; |
| | | |
| | | i { |
| | | display: block; |
| | | width: 27px; |
| | | height: 27px; |
| | | margin: 0 6px; |
| | | padding-top: 10px; |
| | | text-align: center; |
| | | border: 1px solid #fff; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | span { |
| | | display: block; |
| | | font-size: 12px; |
| | | padding-top: 10px; |
| | | margin-left: -6px; |
| | | padding-right: 6px; |
| | | line-height: 20px; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | &:hover { |
| | | color: #1890ff; |
| | | } |
| | | } |
| | | |
| | | .disable { |
| | | color: rgba(0, 0, 0, 0.25); |
| | | |
| | | i { |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | span { |
| | | cursor: not-allowed; |
| | | } |
| | | |
| | | &:hover { |
| | | color: rgba(0, 0, 0, 0.25); |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <command :name="command"> |
| | | <icon :type="iconType" :title="text" /> |
| | | <span v-if="label">{{ label }}</span> |
| | | </command> |
| | | </template> |
| | | |
| | | <script> |
| | | import { Command } from 'vue-flowchart-editor' |
| | | import Icon from './Icon' |
| | | |
| | | export default { |
| | | name: 'EditorToolbarButton', |
| | | |
| | | props: ['command', 'icon', 'text', 'label'], |
| | | |
| | | computed: { |
| | | iconType() { |
| | | return `icon${this.icon || this.command}` |
| | | }, |
| | | }, |
| | | |
| | | components: { |
| | | Command, |
| | | Icon, |
| | | }, |
| | | } |
| | | </script> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <vue-flowchart-editor ref="flowChart" class="vue-flowchart-editor"> |
| | | <div class="vfe-chart"> |
| | | <!-- é¡¶é¨èå --> |
| | | <div v-if="type !== 'detail'" class="vfe-chart-header"> |
| | | <editor-toolbar @handler-save="handlerSave" @reset-tree="handleResetTree" :chart-data="chartData"/> |
| | | </div> |
| | | <div class="vfe-chart-container"> |
| | | <!-- å·¦ä¾§é¡¹ç®æ --> |
| | | <div v-if="disabledBtn" class="vfe-chart-sidebar"> |
| | | <editor-item-panel :node-items="chartDataNodeItems"/> |
| | | </div> |
| | | <!-- 主å¾è¡¨ --> |
| | | <div class="vfe-chart-main"> |
| | | <flow |
| | | :data="chartData" |
| | | :onAfterChange="onAfterChange" |
| | | :onAfterItemSelected="onAfterItemSelected" |
| | | /> |
| | | <!-- æç¤ºæ¡ --> |
| | | <div class="tooltip"> |
| | | <template v-for="item in tooltipData"> |
| | | <p>{{ item.name }}: {{ item.value }}</p> |
| | | </template> |
| | | </div> |
| | | </div> |
| | | |
| | | <div v-if="type !== 'detail'" class="vfe-chart-panel"> |
| | | <div class="vfe-chart-panel-detail"> |
| | | <editor-detail-panel |
| | | ref="EditorDetailPanel" |
| | | :currentSelectedLine="currentSelectedLine" |
| | | :existEdges="existEdges" |
| | | :existNodes="existNodes" |
| | | :rowData="rowData" |
| | | :type="type" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | </div> |
| | | |
| | | <!-- å³é®èå --> |
| | | <editor-context-menu v-if="type !== 'detail'"/> |
| | | <!-- èªå®ä¹è¾¹é
ç½® --> |
| | | <register-edge |
| | | :config="customEdgeConfig" |
| | | extend="flow-polyline" |
| | | name="custom-polyline" |
| | | /> |
| | | <!-- èªå®ä¹å½ä»¤ç»ä»¶ --> |
| | | <custom-command :download="downloadImage"/> |
| | | </vue-flowchart-editor> |
| | | </template> |
| | | |
| | | <script> |
| | | import VueFlowchartEditor, {Flow, RegisterEdge} from "vue-flowchart-editor"; |
| | | import EditorToolbar from "./components/Toolbar"; |
| | | import EditorItemPanel from "./components/ItemPanel"; |
| | | import EditorDetailPanel from "./components/DetailPanel"; |
| | | import EditorMinimap from "./components/EditorMinimap"; |
| | | import EditorContextMenu from "./components/ContextMenu"; |
| | | import CustomCommand from "./components/CustomCommand"; |
| | | |
| | | export default { |
| | | name: "FlowchartEditor", |
| | | |
| | | components: { |
| | | VueFlowchartEditor, |
| | | Flow, |
| | | EditorToolbar, |
| | | EditorItemPanel, |
| | | EditorDetailPanel, |
| | | EditorMinimap, |
| | | EditorContextMenu, |
| | | CustomCommand, |
| | | RegisterEdge, |
| | | }, |
| | | |
| | | props: ["chartData", "chartDataNodeItems", "saveData", "rowData", "type"], |
| | | |
| | | data() { |
| | | return { |
| | | // å½åå¾è¡¨çæ°æ® |
| | | flowChartData: {}, |
| | | // èªå®ä¹è¾¹çé
ç½® |
| | | customEdgeConfig: { |
| | | getActivedStyle(/*item*/) { |
| | | return { |
| | | lineWidth: 3, // æ´»è·ç¶æä¸çè¾¹æ ·å¼ |
| | | }; |
| | | }, |
| | | getSelectedStyle(/*item*/) { |
| | | return { |
| | | lineWidth: 3, // éä¸ç¶æä¸çè¾¹æ ·å¼ |
| | | }; |
| | | }, |
| | | }, |
| | | // å·¥å
·æç¤ºæ¾ç¤ºå¼å
³ |
| | | tooltipShow: true, |
| | | // å·¥å
·æç¤ºæ°æ® |
| | | tooltipData: [], |
| | | // å·²åå¨çèç¹åè¾¹ |
| | | existNodes: this.chartData.nodes || [], |
| | | existEdges: this.chartData.edges || [], |
| | | // å½åéä¸çè¾¹ |
| | | currentSelectedLine: {} |
| | | }; |
| | | }, |
| | | computed: { |
| | | disabledBtn() { |
| | | return this.$store.state.flow.methodBtn; |
| | | } |
| | | }, |
| | | |
| | | mounted() { |
| | | // ç»ä»¶æè½½å®æåï¼èªå¨ç¼©æ¾ç»å¸ï¼ä»
卿·»å 模å¼ä¸ï¼ |
| | | if (this.type === "add") { |
| | | this.$nextTick(() => { |
| | | this.$refs.flowChart.propsAPI.executeCommand("autoZoom"); |
| | | }); |
| | | } |
| | | }, |
| | | |
| | | methods: { |
| | | update(){ |
| | | this.$refs.flowChart.propsAPI.read(this.flowChartData); |
| | | }, |
| | | // å¤çå¾è¡¨æ°æ®æ´æ¹çäºä»¶ |
| | | onAfterChange(e) { |
| | | console.log(e) |
| | | try { |
| | | if('edit' === this.$store.state.flow.type){ |
| | | this.$refs.flowChart.propsAPI.remove(e.item); |
| | | if(e.action === 'remove'){ |
| | | this.$message.error('ç¼è¾ç¶æä¸ä¸è½åæ¢éä¸é¡¹ï¼'); |
| | | } |
| | | return; |
| | | } |
| | | // å¦ææ·»å äºèç¹ä¸èç¹æ²¡æè¢«æ´æ¹è¿ |
| | | if (e.action === "add" && e.model.type === "node") { |
| | | if (!e.model.change) { |
| | | this.$refs.flowChart.propsAPI.remove(e.item); // ç§»é¤åæçèç¹ |
| | | e.model.id = e.model.label; // ä½¿ç¨æ ç¾ä½ä¸ºèç¹ç ID |
| | | e.model.change = true; |
| | | this.$refs.flowChart.propsAPI.add("node", e.model); // æ·»å æ°çèç¹ |
| | | } |
| | | } |
| | | } catch (err) { |
| | | console.log(err) |
| | | // å¤çèç¹ ID å²çªé误 |
| | | if ( |
| | | err.message === |
| | | `id:${e.model.label} has already been set, please set new one` |
| | | ) { |
| | | this.$message.error("ä¸è½æ·»å å·²åå¨çèç¹ï¼"); |
| | | } |
| | | } |
| | | // ä¿åå½åçèç¹åè¾¹æ°æ® |
| | | const {nodes, edges} = this.$refs.flowChart.propsAPI.save(); |
| | | this.existNodes = nodes || []; |
| | | this.existEdges = edges || []; |
| | | }, |
| | | // å¤çéä¸çº¿ååçäºä»¶ åå¡«å½åçº¿ä¿¡æ¯ |
| | | onAfterItemSelected({item}) { |
| | | if (item.target) { |
| | | // æ¥æ¾å½åéä¸çè¾¹ |
| | | const currentEdge = this.existEdges.filter(itm => itm.id === item.id)[0] || {}; |
| | | if (!Array.isArray(currentEdge.events)) { |
| | | currentEdge.events = [] |
| | | } |
| | | this.currentSelectedLine = currentEdge; |
| | | } |
| | | }, |
| | | |
| | | // ä¸è½½å¾ç |
| | | _downloadImage(data, filename = "flowchart.png") { |
| | | const a = document.createElement("a"); |
| | | a.href = data; |
| | | a.download = filename; |
| | | document.body.appendChild(a); |
| | | a.click(); |
| | | }, |
| | | |
| | | // è°ç¨ä¸è½½å¾çæ¹æ³ |
| | | downloadImage() { |
| | | const page = this.$refs["flowChart"].propsAPI.editor.getCurrentPage(); |
| | | this._downloadImage(page.saveImage().toDataURL("image/png")); |
| | | }, |
| | | // è·åæ°çè¡æ°æ®ï¼ä»è¯¦ç»é¢æ¿ä¸ï¼ |
| | | getNewRowData() { |
| | | return this.$refs.EditorDetailPanel.getNewRowDate(); |
| | | }, |
| | | // è·åå½åå¾è¡¨çæ°æ® |
| | | getFlowData() { |
| | | return this.$refs.flowChart.propsAPI.save(); |
| | | }, |
| | | // è·åè¾¹äºä»¶å表ï¼ä»è¯¦ç»é¢æ¿ä¸ï¼ |
| | | getEdgesEvents() { |
| | | return this.$refs.EditorDetailPanel.edgeEventList; |
| | | }, |
| | | |
| | | // è°ç¨ç¶ç»ä»¶éç½® |
| | | handleResetTree(){ |
| | | this.$emit('reset-tree'); |
| | | }, |
| | | handlerSave(){ |
| | | this.$emit('handler-save') |
| | | } |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .vue-flowchart-editor { |
| | | display: flex; |
| | | flex: 1; |
| | | flex-direction: column; |
| | | width: 100%; |
| | | height: 100%; |
| | | background: #fff; |
| | | } |
| | | |
| | | .vfe-chart { |
| | | position: relative; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | |
| | | .vfe-chart-header { |
| | | border: 1px solid #e6e9ed; |
| | | padding: 8px; |
| | | } |
| | | |
| | | .vfe-chart-container { |
| | | flex: 1; |
| | | display: flex; |
| | | height: 550px; |
| | | overflow: hidden; |
| | | |
| | | .vfe-chart-main { |
| | | position: relative; |
| | | flex: 1; |
| | | height: 80vh; // fix scroll show |
| | | width: 65%; |
| | | |
| | | .tooltip { |
| | | position: absolute; |
| | | display: none; |
| | | top: 0; |
| | | left: 0; |
| | | width: 100px; |
| | | height: auto; |
| | | padding: 15px; |
| | | border-radius: 10px; |
| | | z-index: 999; |
| | | opacity: 0.8; |
| | | color: #ffffff; |
| | | font-size: 12px; |
| | | background-color: #000; |
| | | |
| | | p { |
| | | margin: 0; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .vfe-chart-sidebar { |
| | | margin-top: 10px; |
| | | position: relative; |
| | | display: flex; |
| | | justify-content: center; |
| | | width: 210px; |
| | | background-color: #fafafa; |
| | | border-right: 1px solid #e6e9ed; |
| | | } |
| | | |
| | | .vfe-chart-panel { |
| | | position: relative; |
| | | width: 260px; |
| | | background-color: #fafafa; |
| | | border-left: 1px solid #e6e9ed; |
| | | overflow-y: scroll; |
| | | |
| | | .vfe-chart-panel-detail { |
| | | box-sizing: border-box; |
| | | padding: 10px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | !function(v){var c,h='<svg><symbol id="iconto-back" viewBox="0 0 1024 1024"><path d="M640 726.016l0-86.016 86.016 0 0 86.016-86.016 0zM640 214.016l0-86.016 86.016 0 0 86.016-86.016 0zM214.016 297.984l0 512 512 0 0 86.016-512 0q-36.010667 0-61.013333-25.984t-25.002667-59.989333l0-512 86.016 0zM809.984 726.016l0-86.016 86.016 0q0 34.005333-25.984 59.989333t-59.989333 25.984zM809.984 384l0-86.016 86.016 0 0 86.016-86.016 0zM809.984 553.984l0-84.010667 86.016 0 0 84.010667-86.016 0zM384 726.016q-36.010667 0-61.013333-25.984t-25.002667-59.989333l86.016 0 0 86.016zM553.984 128l0 86.016-84.010667 0 0-86.016 84.010667 0zM809.984 128q34.005333 0 59.989333 25.984t25.984 59.989333l-86.016 0 0-86.016zM553.984 640l0 86.016-84.010667 0 0-86.016 84.010667 0zM384 128l0 86.016-86.016 0q0-34.005333 25.002667-59.989333t61.013333-25.984zM384 470.016l0 84.010667-86.016 0 0-84.010667 86.016 0zM384 297.984l0 86.016-86.016 0 0-86.016 86.016 0z" ></path></symbol><symbol id="iconfit" viewBox="0 0 1024 1024"><path d="M597.333333 405.376c0-0.128 0.085333-0.256 0.085333-0.384C597.418667 404.821333 597.333333 404.650667 597.333333 404.522667L597.333333 192.768C597.333333 180.522667 606.933333 170.538667 618.666667 170.666667c11.733333-0.042667 21.376 9.813333 21.376 22.144L640.042667 384l191.189333 0c12.16 0 22.186667 9.6 22.101333 21.333333 0 11.733333-9.813333 21.333333-22.186667 21.333333l-211.754667 0c-0.128 0-0.256-0.085333-0.384-0.085333S618.837333 426.666667 618.709333 426.666667c-4.821333 0-9.045333-1.962667-12.629333-4.736-0.853333-0.64-1.749333-0.981333-2.432-1.706667-0.213333-0.213333-0.298667-0.469333-0.512-0.725333C599.68 415.744 597.333333 410.837333 597.333333 405.376zM362.666667 170.666667C350.933333 170.624 341.290667 180.48 341.290667 192.810667L341.290667 384 150.101333 384C137.898667 384 127.914667 393.6 128 405.333333 128 417.066667 137.813333 426.666667 150.186667 426.666667l211.754667 0c0.128 0 0.256-0.085333 0.384-0.085333S362.496 426.666667 362.624 426.666667c4.821333 0 9.045333-1.962667 12.629333-4.736 0.853333-0.64 1.749333-0.981333 2.432-1.706667 0.213333-0.213333 0.298667-0.469333 0.512-0.725333C381.653333 415.744 384 410.837333 384 405.376c0-0.128-0.085333-0.256-0.085333-0.384C383.914667 404.821333 384 404.650667 384 404.522667L384 192.768C384 180.522667 374.4 170.538667 362.666667 170.666667zM831.146667 640l-211.754667 0c-0.128 0-0.256 0.085333-0.384 0.085333S618.837333 640 618.709333 640c-4.821333 0-9.088 2.005333-12.672 4.778667-0.810667 0.597333-1.706667 0.938667-2.389333 1.664-0.213333 0.213333-0.298667 0.469333-0.512 0.725333C599.68 650.922667 597.333333 655.829333 597.333333 661.290667c0 0.128 0.085333 0.256 0.085333 0.384 0 0.170667-0.085333 0.341333-0.085333 0.469333l0 211.797333c0 12.202667 9.6 22.229333 21.333333 22.101333 11.733333 0.042667 21.376-9.813333 21.376-22.144L640.042667 682.666667l191.189333 0c12.16 0 22.186667-9.6 22.101333-21.333333C853.333333 649.6 843.52 640 831.146667 640zM378.154667 647.168c-0.213333-0.256-0.298667-0.512-0.512-0.725333-0.682667-0.725333-1.578667-1.066667-2.389333-1.664C371.712 642.005333 367.445333 640 362.624 640c-0.128 0-0.213333 0.085333-0.341333 0.085333S362.026667 640 361.898667 640L150.186667 640C137.813333 640 128 649.6 128 661.333333 127.914667 673.066667 137.898667 682.666667 150.101333 682.666667l191.189333 0 0 191.189333c0 12.288 9.642667 22.186667 21.376 22.144C374.4 896.128 384 886.144 384 873.898667l0-211.797333c0-0.128-0.085333-0.298667-0.085333-0.469333C383.914667 661.546667 384 661.418667 384 661.290667 384 655.829333 381.653333 650.922667 378.154667 647.168zM490.666667 469.333333c-35.328 0-64 28.672-64 64s28.672 64 64 64 64-28.672 64-64S525.994667 469.333333 490.666667 469.333333z" ></path></symbol><symbol id="iconpaste" viewBox="0 0 1024 1024"><path d="M776 248 704 248 704 192l99.968 0C819.392 192 832 204.608 832 220.032l0 98.88-56 0L776 248zM255.104 904 184 904 184 248 256 248 256 192 156.032 192C140.608 192 128 204.608 128 220.032l0 712C128 947.392 140.608 960 156.032 960l99.136 0L255.168 904zM640 320 320 320 320 192l64 0L384 120C384 89.216 409.216 64 440 64l72.064 0c30.784 0 56 25.216 56 56L568.064 192 640 192 640 320zM512.128 120.128C512.064 120.064 512 120 512 120L440.064 120.064c0 0 0 0.064-0.064 0.064L440 192l72.064 0 0.064 0L512.128 120.128zM888.256 995.776 888.256 578.88l-182.4-192L351.488 386.88c-18.624 0-31.232 12.608-31.232 28.032l0 580.864c0 15.36 12.608 28.032 28.032 28.032l512 0C875.648 1023.744 888.256 1011.136 888.256 995.776zM824.256 586.88l-129.6 0L694.656 450.88 824.256 586.88zM832.256 970.88 376.256 970.88 376.256 442.88l265.6 0 0 196.864 190.4 0L832.256 970.88z" ></path></symbol><symbol id="iconactual-size" viewBox="0 0 1024 1024"><path d="M829.013333 810.666667l-640 0c-58.794667 0-106.666667-47.829333-106.666667-106.666667l0-469.333333c0-58.794667 47.872-106.666667 106.666667-106.666667l640 0c58.837333 0 106.666667 47.872 106.666667 106.666667l0 469.333333C935.68 762.837333 887.850667 810.666667 829.013333 810.666667zM189.013333 170.666667c-35.285333 0-64 28.714667-64 64l0 469.333333c0 35.285333 28.714667 64 64 64l640 0c35.285333 0 64-28.714667 64-64l0-469.333333c0-35.285333-28.714667-64-64-64L189.013333 170.666667zM338.346667 640.256c0 11.733333-9.557333 21.333333-21.333333 21.333333s-21.333333-9.6-21.333333-21.333333l0-341.333333c0-11.818667 9.557333-21.333333 21.333333-21.333333s21.333333 9.514667 21.333333 21.333333L338.346667 640.256zM722.346667 640.256c0 11.733333-9.557333 21.333333-21.333333 21.333333s-21.333333-9.6-21.333333-21.333333l0-341.333333c0-11.818667 9.557333-21.333333 21.333333-21.333333s21.333333 9.514667 21.333333 21.333333L722.346667 640.256zM509.013333 341.333333c-23.594667 0-42.666667 19.072-42.666667 42.666667s19.072 42.666667 42.666667 42.666667 42.666667-19.072 42.666667-42.666667S532.565333 341.333333 509.013333 341.333333zM509.013333 512c-23.594667 0-42.666667 19.072-42.666667 42.666667s19.072 42.666667 42.666667 42.666667 42.666667-19.072 42.666667-42.666667S532.565333 512 509.013333 512z" ></path></symbol><symbol id="iconredo" viewBox="0 0 1024 1024"><path d="M708.16 635.904c-39.36 35.968-48.32 41.344-50.496-25.856-3.968-49.152 0-103.552 0-103.552-1.408-3.072-86.464-35.008-227.072 25.856C290.048 593.28 195.2 783.36 178.432 842.88 177.088 877.248 132.288 943.616 128 841.472c-0.576-166.656 64.512-341.12 230.336-441.152 154.624-93.248 283.264-83.776 297.408-78.848 0.256 1.344 0.64 1.856 1.344 1.024 0.192-0.256-0.384-0.64-1.344-1.024-1.216-6.208 2.496-38.272 2.88-98.56-2.368-54.144 12.096-55.808 49.536-26.944 68.544 56.32 251.776 231.36 251.776 231.36S776.768 580.608 708.16 635.904z" ></path></symbol><symbol id="iconundo" viewBox="0 0 1024 1024"><path d="M379.776 635.904c39.36 35.968 48.32 41.344 50.496-25.856 3.968-49.152 0-103.552 0-103.552 1.408-3.072 86.464-35.008 227.072 25.856 140.544 60.928 235.456 251.008 252.16 310.528 1.344 34.368 46.144 100.736 50.432-1.344 0.576-166.656-64.512-341.12-230.336-441.152C574.976 307.072 446.4 316.608 432.192 321.472c-0.256 1.344-0.64 1.856-1.344 1.024-0.192-0.256 0.384-0.64 1.344-1.024 1.216-6.208-2.496-38.272-2.88-98.56 2.368-54.144-12.096-55.808-49.536-26.944C311.168 252.288 128 427.264 128 427.264S311.168 580.608 379.776 635.904z" ></path></symbol><symbol id="icondelete" viewBox="0 0 1024 1024"><path d="M677.647059 256l0-90.352941c0-37.436235-23.461647-60.235294-61.771294-60.235294L408.094118 105.411765c-38.249412 0-61.741176 22.799059-61.741176 60.235294l0 90.352941-180.705882 0 0 60.235294 60.235294 0 0 512c0 54.272 33.972706 90.352941 90.352941 90.352941l391.529412 0c55.085176 0 90.352941-33.490824 90.352941-90.352941l0-512 60.235294 0 0-60.235294L677.647059 256zM406.588235 165.647059l210.823529 0-1.264941 90.352941L406.588235 256 406.588235 165.647059zM737.882353 858.352941l-451.764706 0 0-542.117647 451.764706 0L737.882353 858.352941zM466.823529 376.470588l-58.729412 0-1.505882 391.529412 60.235294 0L466.823529 376.470588zM617.411765 376.470588l-60.235294 0 0 391.529412 60.235294 0L617.411765 376.470588z" ></path></symbol><symbol id="iconzoom-in" viewBox="0 0 1024 1024"><path d="M1000.146824 957.500235l-311.597176-311.597176c58.729412-68.487529 94.509176-157.214118 94.509176-254.373647 0-215.883294-175.646118-391.529412-391.529412-391.529412-104.628706 0-202.932706 40.719059-276.901647 114.688-73.968941 73.908706-114.627765 172.272941-114.627765 276.841412 0 215.883294 175.646118 391.529412 391.529412 391.529412 97.099294 0 185.886118-35.779765 254.433882-94.509176l311.597176 311.597176 42.586353-42.646588zM391.529412 722.823529c-182.693647 0-331.294118-148.600471-331.294118-331.294118 0-88.545882 34.394353-171.730824 96.978824-234.315294 62.584471-62.524235 145.769412-96.978824 234.315294-96.978824 182.693647 0 331.294118 148.600471 331.294118 331.294118 0 182.693647-148.600471 331.294118-331.294118 331.294118zM421.647059 361.411765l120.470588 0 0 60.235294-120.470588 0 0 120.470588-60.235294 0 0-120.470588-120.470588 0 0-60.235294 120.470588 0 0-120.470588 60.235294 0 0 120.470588z" ></path></symbol><symbol id="iconzoom-out" viewBox="0 0 1024 1024"><path d="M999.344139 955.925769l-311.084802-311.084802c58.63284-68.374912 94.35377-157.015739 94.35377-253.955368 0-215.528306-175.357294-390.8856-390.8856-390.8856-104.396523 0-202.599013 40.652102-276.50646 114.439276-73.787174 73.84731-114.439276 172.0498-114.37914 276.446324 0 215.528306 175.357294 390.8856 390.8856 390.8856 96.939629 0 185.640592-35.72093 254.015504-94.35377l311.084802 311.084802 42.516326-42.576462zM391.727508 721.634954c-182.333098 0-330.749354-148.356119-330.749354-330.749354-0.060136-88.400282 34.337797-171.448438 96.819356-233.869861 62.421424-62.48156 145.529716-96.879493 233.929998-96.879493 182.333098 0 330.749354 148.356119 330.749354 330.749354 0 182.333098-148.416256 330.749354-330.749354 330.749354zM241.386892 360.817477l300.681231 0 0 60.136246-300.681231 0 0-60.136246z" ></path></symbol><symbol id="iconcopy" viewBox="0 0 1024 1024"><path d="M880 247.008l-162.016-166.016Q700.992 64 677.984 64h-316.992q-26.016 0-46.016 18.016-16.992 15.008-23.008 36.992H231.968q-43.008 0-73.504 31.008t-30.496 76v627.008q0 44 30.496 75.488T231.968 960h508q43.008 0 73.504-31.488t30.496-75.488v-63.008q23.008-6.016 37.504-25.504t14.496-44.512V287.008q0-24-16-40z m-168-160.992l-3.008-3.008z m98.016 177.984L744 196z m-126.016-116.992l108 110.016h-108V147.008zM676.992 128zM204.992 948q4 0.992 4.992 2.016-2.016-0.992-4.992-2.016z m27.008 4q-6.016 0-12-0.992 4.992 0.992 12 0.992z m543.008-99.008q0 15.008-10.016 25.504t-24.992 10.496H232q-14.016 0-24.512-10.496t-10.496-25.504V225.984q0-15.008 10.496-25.504t24.512-10.496h58.016v531.008q0 30.016 20.992 51.008t50.016 20.992H775.04v60z m52-132.992q0 2.016-2.016 2.016h-464q-2.016 0-2.016-2.016V136.992q0-2.016 2.016-2.016h251.008v156.992q0 15.008 10.016 24.992t24 10.016h180.992v392.992z m9.984 64q4-0.992 8.992-2.016-4.992 0.992-8.992 2.016z m-244-168.992h-107.008q-15.008 0-24.992 10.496t-10.016 24.992 10.016 24.992 24.992 10.496h107.008q14.016 0 24.512-10.496t10.496-24.992-10.496-24.992-24.512-10.496z m107.008-111.008h-214.016q-14.016 0-24.512 10.496t-10.496 24.992 10.496 24.992 24.512 10.496h214.016q14.016 0 24-10.496t10.016-24.992-10.016-24.992-24-10.496z m-240.992 36q0 4 0.992 8-0.992-4-0.992-8zM700 512z m12 52l4-2.016z m-260.992-135.488q0 14.496 10.496 24.992t24.512 10.496h214.016q14.016 0 24-10.496t10.016-24.992-10.016-24.992-24-10.496h-214.016q-14.016 0-24.512 10.496t-10.496 24.992z m8 1.504z" ></path></symbol><symbol id="iconsave" viewBox="0 0 1024 1024"><path d="M886.4 265.6l-128-128c-6.4-6.4-12.8-9.6-22.4-9.6H160c-19.2 0-32 12.8-32 32v704c0 19.2 12.8 32 32 32h704c19.2 0 32-12.8 32-32V288c0-9.6-3.2-16-9.6-22.4zM352 192h320v256H352V192z m480 640H192V192h96v288c0 19.2 12.8 32 32 32h384c19.2 0 32-12.8 32-32V204.8l96 96V832z" ></path><path d="M576 256c-19.2 0-32 12.8-32 32v64c0 19.2 12.8 32 32 32s32-12.8 32-32V288c0-19.2-12.8-32-32-32z" ></path></symbol><symbol id="iconselect-all" viewBox="0 0 1024 1024"><path d="M128 213.333333h85.333333V128c-47.146667 0-85.333333 38.186667-85.333333 85.333333z m0 341.333334h85.333333v-85.333334H128v85.333334z m170.666667 341.333333h85.333333v-85.333333h-85.333333v85.333333zM128 384h85.333333v-85.333333H128v85.333333zM554.666667 128h-85.333334v85.333333h85.333334V128z m256 0v85.333333h85.333333c0-47.146667-38.186667-85.333333-85.333333-85.333333zM213.333333 896v-85.333333H128c0 47.146667 38.186667 85.333333 85.333333 85.333333z m-85.333333-170.666667h85.333333v-85.333333H128v85.333333zM384 128h-85.333333v85.333333h85.333333V128z m85.333333 768h85.333334v-85.333333h-85.333334v85.333333z m341.333334-341.333333h85.333333v-85.333334h-85.333333v85.333334z m0 341.333333c47.146667 0 85.333333-38.186667 85.333333-85.333333h-85.333333v85.333333z m0-512h85.333333v-85.333333h-85.333333v85.333333z m0 341.333333h85.333333v-85.333333h-85.333333v85.333333z m-170.666667 170.666667h85.333333v-85.333333h-85.333333v85.333333z m0-682.666667h85.333333V128h-85.333333v85.333333zM298.666667 725.333333h426.666666V298.666667H298.666667v426.666666z m85.333333-341.333333h256v256H384V384z" fill="" ></path></symbol><symbol id="iconselect" viewBox="0 0 1024 1024"><path d="M324.266667 34.133333h-102.4c-10.24 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066667h102.4c10.24 0 17.066667-6.826667 17.066666-17.066667S334.506667 34.133333 324.266667 34.133333zM597.333333 34.133333h-102.4c-10.24 0-17.066667 6.826667-17.066666 17.066667s6.826667 17.066667 17.066666 17.066667h102.4c10.24 0 17.066667-6.826667 17.066667-17.066667s-6.826667-17.066667-17.066667-17.066667zM324.266667 716.8h-102.4c-10.24 0-17.066667 6.826667-17.066667 17.066667s6.826667 17.066667 17.066667 17.066666h102.4c10.24 0 17.066667-6.826667 17.066666-17.066666s-6.826667-17.066667-17.066666-17.066667zM563.2 716.8h-68.266667c-10.24 0-17.066667 6.826667-17.066666 17.066667s6.826667 17.066667 17.066666 17.066666h68.266667c10.24 0 17.066667-6.826667 17.066667-17.066666s-6.826667-17.066667-17.066667-17.066667zM34.133333 597.333333c0 10.24 6.826667 17.066667 17.066667 17.066667s17.066667-6.826667 17.066667-17.066667v-102.4c0-10.24-6.826667-17.066667-17.066667-17.066666s-17.066667 6.826667-17.066667 17.066666v102.4zM51.2 341.333333c10.24 0 17.066667-6.826667 17.066667-17.066666v-102.4c0-10.24-6.826667-17.066667-17.066667-17.066667s-17.066667 6.826667-17.066667 17.066667v102.4c0 10.24 6.826667 17.066667 17.066667 17.066666zM768 477.866667c-10.24 0-17.066667 6.826667-17.066667 17.066666v68.266667c0 10.24 6.826667 17.066667 17.066667 17.066667s17.066667-6.826667 17.066667-17.066667v-68.266667c0-10.24-6.826667-17.066667-17.066667-17.066666zM785.066667 221.866667c0-10.24-6.826667-17.066667-17.066667-17.066667s-17.066667 6.826667-17.066667 17.066667v102.4c0 10.24 6.826667 17.066667 17.066667 17.066666s17.066667-6.826667 17.066667-17.066666v-102.4zM733.866667 102.4h68.266666c10.24 0 17.066667-6.826667 17.066667-17.066667v-68.266666c0-10.24-6.826667-17.066667-17.066667-17.066667h-68.266666c-10.24 0-17.066667 6.826667-17.066667 17.066667v68.266666c0 10.24 6.826667 17.066667 17.066667 17.066667zM85.333333 0h-68.266666C6.826667 0 0 6.826667 0 17.066667v68.266666c0 10.24 6.826667 17.066667 17.066667 17.066667h68.266666c10.24 0 17.066667-6.826667 17.066667-17.066667v-68.266666c0-10.24-6.826667-17.066667-17.066667-17.066667zM85.333333 682.666667h-68.266666c-10.24 0-17.066667 6.826667-17.066667 17.066666v68.266667c0 10.24 6.826667 17.066667 17.066667 17.066667h68.266666c10.24 0 17.066667-6.826667 17.066667-17.066667v-68.266667c0-10.24-6.826667-17.066667-17.066667-17.066666zM1013.76 788.48l-375.466667-204.8c-6.826667-3.413333-13.653333-3.413333-20.48 3.413333-3.413333 3.413333-3.413333 10.24-3.413333 17.066667l170.666667 409.6c3.413333 6.826667 6.826667 10.24 13.653333 10.24s13.653333-3.413333 13.653333-10.24l64.853334-133.12 133.12-64.853333c6.826667-3.413333 10.24-10.24 10.24-13.653334 3.413333-6.826667 0-10.24-6.826667-13.653333z" fill="" ></path></symbol><symbol id="iconto-front" viewBox="0 0 1024 1024"><path d="M128 554.666667h85.333333v-85.333334H128v85.333334z m0 170.666666h85.333333v-85.333333H128v85.333333z m85.333333 170.666667v-85.333333H128c0 47.146667 38.186667 85.333333 85.333333 85.333333zM128 384h85.333333v-85.333333H128v85.333333z m512 512h85.333333v-85.333333h-85.333333v85.333333z m170.666667-768H384c-47.146667 0-85.333333 38.186667-85.333333 85.333333v426.666667c0 47.146667 38.186667 85.333333 85.333333 85.333333h426.666667c47.146667 0 85.333333-38.186667 85.333333-85.333333V213.333333c0-47.146667-38.186667-85.333333-85.333333-85.333333z m0 512H384V213.333333h426.666667v426.666667zM469.333333 896h85.333334v-85.333333h-85.333334v85.333333z m-170.666666 0h85.333333v-85.333333h-85.333333v85.333333z" ></path></symbol><symbol id="iconimage" viewBox="0 0 1024 1024"><path d="M847.657 64.016H175.703c-61.766 0-111.993 50.227-111.993 111.992v671.954c0 61.765 50.226 111.993 111.993 111.993h671.954c61.765 0 111.992-50.228 111.992-111.993V176.01c0-61.765-50.227-111.993-111.992-111.993z m55.995 783.946c0 30.87-25.127 55.997-55.996 55.997H175.703c-30.87 0-55.996-25.127-55.996-55.997V176.01c0-30.87 25.128-55.996 55.996-55.996h671.954c30.87 0 55.996 25.127 55.996 55.996v671.953zM835.19 544.686l-83.995-55.996c-10.444-6.945-23.54-5.688-32.782 1.722l-0.246-0.3-133.184 106.551-197.435-135.752c-0.083-0.055-0.164-0.055-0.218-0.11-2.297-1.53-4.895-2.379-7.52-3.199-0.874-0.273-1.666-0.875-2.57-1.04-2.378-0.492-4.811-0.218-7.273-0.081-1.121 0.082-2.27-0.218-3.363 0-1.23 0.218-2.35 0.984-3.554 1.394-2.27 0.739-4.566 1.367-6.616 2.707-0.083 0.055-0.192 0.055-0.274 0.11L188.17 572.684c-12.878 8.585-16.35 25.946-7.765 38.824 5.386 8.094 14.273 12.47 23.323 12.47 5.332 0 10.718-1.533 15.503-4.704L371.444 517.81 803.8 815.042a27.793 27.793 0 0 0 15.831 4.923c8.913 0 17.663-4.238 23.105-12.14 8.749-12.74 5.523-30.156-7.219-38.934L633.214 629.802l103.956-83.147 66.959 44.621c4.786 3.172 10.171 4.704 15.503 4.704 9.05 0 17.937-4.374 23.323-12.469 8.584-12.877 5.112-30.24-7.766-38.825zM581.674 427.991c69.476 0 125.992-56.516 125.992-125.99 0-69.477-56.516-125.993-125.992-125.993-69.475 0-125.99 56.516-125.99 125.992s56.516 125.991 125.99 125.991z m0-195.985c38.607 0 69.995 31.387 69.995 69.994s-31.388 69.995-69.995 69.995c-38.606 0-69.995-31.39-69.995-69.995 0-38.607 31.39-69.994 69.995-69.994z" ></path></symbol><symbol id="iconclear" viewBox="0 0 1024 1024"><path d="M686.464 452.821333c5.461333-15.274667 20.394667-43.690667 40.533333-77.952 14.549333-24.746667 39.466667-55.978667 64.810667-87.466666 6.4-7.978667 13.909333-17.152 22.357333-27.562667l34.304 19.456c-8.533333 10.752-15.914667 19.968-22.186666 27.733333-25.770667 31.914667-50.261333 62.165333-65.024 87.296-8.576 14.634667-15.872 27.562667-21.76 38.741334l116.906666 66.304a77.013333 77.013333 0 0 1 28.970667 106.24l-197.973333 336.810666a80 80 0 0 1-108.245334 28.458667l-411.562666-233.344a77.013333 77.013333 0 0 1-28.970667-106.24l197.973333-336.810667a80 80 0 0 1 108.245334-28.501333l116.821333 66.261333c6.912-10.624 14.634667-23.253333 23.253333-37.888 14.762667-25.173333 29.226667-61.056 44.501334-98.986666 3.712-9.173333 8.106667-20.053333 13.354666-32.725334l34.304 19.456-13.141333 32.853334c-15.061333 37.248-30.165333 74.069333-44.714667 98.816-20.138667 34.261333-37.717333 61.184-48.469333 73.429333l-118.229333-67.029333c-33.152-18.773333-73.301333-11.989333-92.074667 19.882666l-167.552 285.056c-18.773333 31.914667-6.826667 73.088 26.325333 91.904l352.554667 199.893334c33.109333 18.773333 75.050667 8.106667 93.781333-23.765334l167.594667-285.056c18.773333-31.914667 5.034667-69.248-28.117333-88.021333l-118.613334-67.242667z m-43.690667-290.133333c22.613333-36.906667 90.026667-47.786667 146.432-15.786667 56.405333 32 80.554667 94.762667 59.306667 132.437334l-34.304-19.456c9.984-18.944-7.68-57.728-45.056-78.890667-37.290667-21.162667-80.341333-16.810667-92.074667 1.109333l-34.304-19.456zM314.112 418.858667l472.704 267.989333-21.888 37.248L292.224 456.106667l21.888-37.205334z" ></path></symbol><symbol id="icongroup" viewBox="0 0 1024 1024"><path d="M912 820.1V203.9c28-9.9 48-36.6 48-67.9 0-39.8-32.2-72-72-72-31.3 0-58 20-67.9 48H203.9C194 84 167.3 64 136 64c-39.8 0-72 32.2-72 72 0 31.3 20 58 48 67.9v616.2C84 830 64 856.7 64 888c0 39.8 32.2 72 72 72 31.3 0 58-20 67.9-48h616.2c9.9 28 36.6 48 67.9 48 39.8 0 72-32.2 72-72 0-31.3-20-58-48-67.9zM888 112c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zM136 912c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z m0-752c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z m704 680H184V184h656v656z m48 72c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z" ></path><path d="M288 474h448c8.8 0 16-7.2 16-16V282c0-8.8-7.2-16-16-16H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16z m56-136h336v64H344v-64zM288 758h448c8.8 0 16-7.2 16-16V566c0-8.8-7.2-16-16-16H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16z m56-136h336v64H344v-64z" ></path></symbol><symbol id="iconungroup" viewBox="0 0 1024 1024"><path d="M736 550H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16h448c8.8 0 16-7.2 16-16V566c0-8.8-7.2-16-16-16z m-56 136H344v-64h336v64zM888 816c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z m0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zM736 266H288c-8.8 0-16 7.2-16 16v176c0 8.8 7.2 16 16 16h448c8.8 0 16-7.2 16-16V282c0-8.8-7.2-16-16-16z m-56 136H344v-64h336v64zM888 208c39.8 0 72-32.2 72-72s-32.2-72-72-72-72 32.2-72 72 32.2 72 72 72z m0-96c13.3 0 24 10.7 24 24s-10.7 24-24 24-24-10.7-24-24 10.7-24 24-24zM136 64c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z m0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24zM136 816c-39.8 0-72 32.2-72 72s32.2 72 72 72 72-32.2 72-72-32.2-72-72-72z m0 96c-13.3 0-24-10.7-24-24s10.7-24 24-24 24 10.7 24 24-10.7 24-24 24z" ></path></symbol></svg>',l=(c=document.getElementsByTagName("script"))[c.length-1].getAttribute("data-injectcss");if(l&&!v.__iconfont__svg__cssinject__){v.__iconfont__svg__cssinject__=!0;try{document.write("<style>.svgfont {display: inline-block;width: 1em;height: 1em;fill: currentColor;vertical-align: -0.1em;font-size:16px;}</style>")}catch(c){console&&console.log(c)}}!function(c){if(document.addEventListener)if(~["complete","loaded","interactive"].indexOf(document.readyState))setTimeout(c,0);else{var l=function(){document.removeEventListener("DOMContentLoaded",l,!1),c()};document.addEventListener("DOMContentLoaded",l,!1)}else document.attachEvent&&(o=c,e=v.document,z=!1,(h=function(){try{e.documentElement.doScroll("left")}catch(c){return void setTimeout(h,50)}t()})(),e.onreadystatechange=function(){"complete"==e.readyState&&(e.onreadystatechange=null,t())});function t(){z||(z=!0,o())}var o,e,z,h}(function(){var c,l,t,o,e,z;(c=document.createElement("div")).innerHTML=h,h=null,(l=c.getElementsByTagName("svg")[0])&&(l.setAttribute("aria-hidden","true"),l.style.position="absolute",l.style.width=0,l.style.height=0,l.style.overflow="hidden",t=l,(o=document.body).firstChild?(e=t,(z=o.firstChild).parentNode.insertBefore(e,z)):o.appendChild(t))})}(window); |
| | |
| | | <span v-if="keyCollapse" |
| | | class="avue-logo_subtitle" |
| | | key="0"> |
| | | {{ website.logo }} |
| | | <img class="imgTop" :src=imgurl> |
| | | </span> |
| | | </transition> |
| | | <transition-group name="fade"> |
| | |
| | | top: 15px; |
| | | left: 37px; |
| | | } |
| | | .imgTop{ |
| | | position: absolute; |
| | | top: 15px; |
| | | left: 12px; |
| | | } |
| | | </style> |
| | |
| | | Vue.use(VueRouter) |
| | | //åå»ºè·¯ç± |
| | | export const createRouter = () => new VueRouter({ |
| | | mode:"history", //ä¿®æ¹ä¸º history æ¨¡å¼ é»è®¤ä¸å¸¦#å· |
| | | mode:"hash", //ä¿®æ¹ä¸º history æ¨¡å¼ é»è®¤ä¸å¸¦#å· |
| | | routes: [...PageRouter, ...ViewsRouter], |
| | | }) |
| | | const Router = createRouter() // è·å¾ route å®ä¾ |
| | |
| | | import logs from './modules/logs' |
| | | import dict from './modules/dict' |
| | | import getters from './getters' |
| | | import flow from './modules/LifeFlow' |
| | | |
| | | Vue.use(Vuex) |
| | | const store = new Vuex.Store({ |
| | |
| | | common, |
| | | logs, |
| | | tags, |
| | | dict |
| | | dict, |
| | | flow |
| | | }, |
| | | getters, |
| | | }) |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import {setStore, getStore} from '@/util/store' |
| | | import user from "@/store/modules/user"; |
| | | |
| | | const flow = { |
| | | state: { |
| | | methodBtn: false, |
| | | editMethodBtn:false, |
| | | type:"", |
| | | }, |
| | | mutations: { |
| | | setMethodBtn(state, value) { |
| | | state.methodBtn = value; |
| | | }, |
| | | |
| | | setEditMethodBtn(state, value) { |
| | | state.methodBtn = value; |
| | | }, |
| | | |
| | | setTypeChange(state,value){ |
| | | state.type = value; |
| | | } |
| | | }, |
| | | actions: { |
| | | // æ´æ°ä¿å åæ¶æé® |
| | | updateMethodBtn({commit}, value) { |
| | | commit('setMethodBtn', value); |
| | | }, |
| | | |
| | | editNodesStatus({commit}, value){ |
| | | commit('setEditMethodBtn', value); |
| | | }, |
| | | |
| | | typeChange({commit}, value){ |
| | | commit('setTypeChange', value); |
| | | } |
| | | } |
| | | } |
| | | export default flow |
| | |
| | | import CryptoJS from 'crypto-js' |
| | | |
| | | export default class func { |
| | | |
| | | /** |
| | | * åéè¡¨æ ¼è¡ |
| | | * row å½åè¡æ°æ® |
| | | * CrudRef è¡¨æ ¼refç»å®å¼ |
| | | * lastIndex å¤æäºæ¬¡ç¹å»indexæ¯å¦åç¬¬ä¸æ¬¡ç¹å»ä¸è´ |
| | | * setLastIndex æ´æ°lastIndexå¼ |
| | | * setSelectList å°ä¸ææ¡ä¿åæ°ç»ç½®ç©º |
| | | */ |
| | | |
| | | static rowClickHandler(row, CrudRef, lastIndex, setLastIndex, setSelectList) { |
| | | if (lastIndex === row.$index) { |
| | | setSelectList(); |
| | | CrudRef.clearSelection(); |
| | | } else { |
| | | setSelectList(); |
| | | CrudRef.clearSelection(); |
| | | CrudRef.toggleRowSelection(row); |
| | | } |
| | | |
| | | setLastIndex(row.$index); |
| | | } |
| | | |
| | | /** |
| | | * ä¸ä¸ºç©º |
| | | * @param val |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </el-form-item> |
| | | <el-form-item v-if="!form.enumSwitch" label="è¿ç®ç¬¦ï¼"> |
| | | <div> |
| | | <el-button size="mini" @click="operationHandler('>')"> > </el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> < </el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >= </el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <= </el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> = </el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> != </el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> () </el-button> |
| | | <el-button size="mini" @click="operationHandler('>')"> ></el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> <</el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >=</el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <=</el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> =</el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> !=</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ()</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="form.enumSwitch ? 'å½åæä¸¾å¼ï¼' : 'å½åå¼åï¼'" prop="rangeValue"> |
| | |
| | | </el-form-item> |
| | | <el-form-item label="è¿ç®ç¬¦ï¼"> |
| | | <div> |
| | | <el-button size="mini" @click="operationHandler('>')"> > </el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> < </el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >= </el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <= </el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> = </el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> != </el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> () </el-button> |
| | | <el-button size="mini" @click="operationHandler('>')"> ></el-button> |
| | | <el-button size="mini" @click="operationHandler('<')"> <</el-button> |
| | | <el-button size="mini" @click="operationHandler('>=')"> >=</el-button> |
| | | <el-button size="mini" @click="operationHandler('<=')"> <=</el-button> |
| | | <el-button size="mini" @click="operationHandler('=')"> =</el-button> |
| | | <el-button size="mini" @click="operationHandler('!=')"> !=</el-button> |
| | | <el-button size="mini" @click="operationHandler('()')"> ()</el-button> |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item :label="form.enumSwitch ? 'å½åæä¸¾å¼ï¼' : 'å½åå¼åï¼'" prop="rangeValue"> |
| | | <el-form-item :label="form.enumSwitch ? 'å½åæä¸¾å¼ï¼' : 'å½åå¼åï¼'" prop="rangeValue"> |
| | | <textarea v-model="form.rangeValue" |
| | | style="width: 330px; height: 80px; border: 1px solid #DCDFE6; overflow: auto; text-align: left;resize: none;"> |
| | | </textarea> |
| | |
| | | ], |
| | | upFileType: ['xls', 'xlsx'], |
| | | fileUrl: 'api/attributeController/importAttributes', |
| | | lastIndex: null |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | |
| | | // ç¹å»è¡ |
| | | rowClickHandler(row) { |
| | | this.$refs.userCrud.toggleRowSelection(row); |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.userCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // æ¡æ° |
| | |
| | | { |
| | | label: '屿§å', |
| | | prop: 'id', |
| | | search:true, |
| | | sortable:true, |
| | | search: true, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æ ç¾', |
| | | prop: 'name', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'ç±»å', |
| | | prop: 'attributeDataTypeText', |
| | | sortable:true, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'é»è®¤å¼', |
| | | prop: 'defaultValue', |
| | | sortable:true, |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | overHidden:true, |
| | | }, |
| | | ]; |
| | |
| | | <template> |
| | | <p>ä¸å¡ç±»å</p> |
| | | <el-container> |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="miniBtn" icon="el-icon-circle-plus-outline" plain size="small" |
| | | type="primary" @click="createViewClickHandler">å建è§å¾ |
| | | </el-button> |
| | | <el-button class="miniBtn" icon="el-icon-circle-plus-outline" plain size="small" |
| | | type="primary" @click="checkClickHandler">åå»ºç´¢å¼ |
| | | </el-button> |
| | | <el-button icon="el-icon-menu" plain size="small" style="width: 82px;text-align: center;padding-left: 1px" |
| | | type="primary" @click="checkClickHandler">ä¸è´æ§æ£æ¥ |
| | | </el-button> |
| | | <el-button class="miniBtn" icon="el-icon-delete" plain size="small" |
| | | type="danger" @click="checkClickHandler">å 餿°æ® |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" |
| | | type="danger" @click="checkClickHandler">å é¤å
¨é¨ç±»å |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 330px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <div style="display: flex;justify-content: center"> |
| | | <div class="descBox"> |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="屿§ä¿¡æ¯"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | åç§° |
| | | </template> |
| | | <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.label"></i> |
| | | æ ç¾ |
| | | </template> |
| | | <el-tag v-if="nodeRow.label">{{ nodeRow.label }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.implClass"></i> |
| | | å®ç°ç±» |
| | | </template> |
| | | <el-tooltip class="item" effect="dark" :content="nodeRow.implClass" placement="top-start"> |
| | | <el-tag v-if="nodeRow.implClass">{{ nodeRow.implClass }}</el-tag> |
| | | </el-tooltip> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | <div class="descBox"> |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="屿§ä¿¡æ¯"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | åç§° |
| | | </template> |
| | | <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.label"></i> |
| | | æ ç¾ |
| | | </template> |
| | | <el-tag v-if="nodeRow.label">{{ nodeRow.label }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.implClass"></i> |
| | | å®ç°ç±» |
| | | </template> |
| | | <el-tag v-if="nodeRow.implClass">{{ nodeRow.implClass }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | <div class="descBox"> |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="屿§ä¿¡æ¯"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | åç§° |
| | | </template> |
| | | <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.label"></i> |
| | | æ ç¾ |
| | | </template> |
| | | <el-tag v-if="nodeRow.label">{{ nodeRow.label }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.implClass"></i> |
| | | å®ç°ç±» |
| | | </template> |
| | | <el-tag v-if="nodeRow.implClass">{{ nodeRow.implClass }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </div> |
| | | </div> |
| | | |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {getBizTypes} from "@/api/modeling/businessType/api" |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | form:{ |
| | | |
| | | }, |
| | | nodeRow:{}, |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'name', |
| | | value: 'name', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | treeData: [], |
| | | descriptionOption: { |
| | | labelStyle: 'text-align:center;min-width:80px;', |
| | | contentStyle: 'width:200px;text-align:center;word-break;break-all;' |
| | | }, |
| | | icons: { |
| | | id: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTreeList(); |
| | | }, |
| | | methods: { |
| | | getTreeList() { |
| | | getBizTypes().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | return item.attributes; |
| | | }); |
| | | this.treeData = data; |
| | | }) |
| | | }, |
| | | |
| | | // æ ç¹å» |
| | | nodeClick(row){ |
| | | console.log(row); |
| | | this.nodeRow = row; |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | .el-form-item .el-select { |
| | | width: 100%; |
| | | } |
| | | |
| | | .headerCon { |
| | | .el-button { |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(10) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .miniBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 7px; |
| | | } |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | .descBox{ |
| | | width: 32%; |
| | | margin-left: 20px; |
| | | } |
| | | </style> |
| | |
| | | }, |
| | | tableLoading: false, |
| | | selectList: [], |
| | | searchParams: {} |
| | | searchParams: {}, |
| | | lastIndex: null |
| | | } |
| | | }, |
| | | computed: { |
| | |
| | | |
| | | // éæ©æ¡ |
| | | selectChange(row) { |
| | | console.log(row) |
| | | this.selectList = row; |
| | | }, |
| | | |
| | | // ç¹å»è¡ |
| | | rowClickHandler(row) { |
| | | this.$refs.userCrud.toggleRowSelection(row); |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.userCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // å
³éå¯¹è¯æ¡ |
| | |
| | | <template> |
| | | <p>çå½å¨æ</p> |
| | | <el-container> |
| | | <el-aside width="15.7%"> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 300px);"> |
| | | <avue-tree ref="tree" :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | <el-main> |
| | | <basic-container> |
| | | <CycleFlow |
| | | :key="Reload" |
| | | ref="vueFlowchartEditor" |
| | | :chart-data="nodesEdgesData" |
| | | :chart-data-node-items="flowChartNodeItems" |
| | | :rowData="rowData" |
| | | :type="type" |
| | | class="cycle_flow" |
| | | @save-data="save" |
| | | @reset-tree="handleResetTree" |
| | | @handler-save="handlerSave" |
| | | /> |
| | | </basic-container> |
| | | </el-main> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="getTableList"></upload-file> |
| | | |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-loading="checkViewLoading" |
| | | :visible.sync="checkViewVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="æ¥ç使ç¨èå´" |
| | | width="60%" |
| | | > |
| | | <avue-crud |
| | | ref="checkViewCrud" |
| | | :data="checkViewData" |
| | | :option="checkViewOption" |
| | | @search-change="checkHandleSearch" |
| | | @search-reset="checkHandleReset" |
| | | > |
| | | |
| | | </avue-crud> |
| | | </el-dialog> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import { |
| | | gridLifeCycle, |
| | | getLCEventKeys, |
| | | addLifeCycle, |
| | | updateLifeCycle, |
| | | deleteLifeCycles, |
| | | exportLifeCycles, |
| | | getUsedLifeCycleList |
| | | } from '@/api/modeling/lifeCycle/api'; |
| | | import {gridStatus} from '@/api/modeling/statusPool/api' |
| | | import CycleFlow from "@/components/flow-cycle/flowchartEditor.vue"; |
| | | import func from "@/util/func"; |
| | | import basicOption from "@/util/basic-option"; |
| | | |
| | | export default { |
| | | name: "index" |
| | | name: "index", |
| | | components: {CycleFlow}, |
| | | data() { |
| | | return { |
| | | checkViewOption: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | menu: false, |
| | | searchMenuSpan: 8, |
| | | refreshBtn: false, |
| | | selection: false, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'lifeCycleName', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æ¥æº', |
| | | prop: 'source', |
| | | sortable: true, |
| | | search: true |
| | | }, |
| | | { |
| | | label: '说æ', |
| | | prop: 'desc', |
| | | } |
| | | ] |
| | | }, |
| | | checkViewData: [], |
| | | checkViewDataSearch: [], |
| | | checkViewVisible: false, |
| | | checkViewLoading: false, |
| | | tipList: [ |
| | | "åç§°ãæ ç¾ãèµ·å§ç¶æä¸è½ä¸ºç©ºï¼ä¸åç§°åªè½ä¸ºè±æå符", |
| | | "注æé
ç½®è¿æ¥çº¿èµ·å§ç¶æä»¥åç®æ ç¶æåç§°", |
| | | ], |
| | | upFileType: ['xls', 'xlsx'], |
| | | fileUrl: 'api/lifeCycleController/importLifeCycles', |
| | | eventList: [], |
| | | Reload: Math.random(), |
| | | flowKey: null, |
| | | visible: false, |
| | | type: 'edit', |
| | | nodesEdgesData: {}, |
| | | flowChartNodeItems: [], // æµç¨èç¹æ°æ® |
| | | rowData: {}, |
| | | treeData: [], |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'id', |
| | | value: 'id', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | } |
| | | }, |
| | | created() { |
| | | this.createdHandler(); |
| | | }, |
| | | methods: { |
| | | // å·¦ä¾§æ æ¥è¯¢ |
| | | getTreeList() { |
| | | gridLifeCycle().then(res => { |
| | | const data = res.data.data; |
| | | this.treeData = data; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | }); |
| | | }, |
| | | |
| | | // çå½å¨æç¶ææ¥è¯¢ |
| | | getStatusList() { |
| | | gridStatus().then(res => { |
| | | const data = res.data.data.map(item => { |
| | | return { |
| | | id: item.id, |
| | | name: item.name |
| | | } |
| | | }) |
| | | this.flowChartNodeItems = data; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | }); |
| | | }, |
| | | |
| | | // è·è¿äºä»¶æ¥è¯¢ |
| | | getEventsSelect() { |
| | | getLCEventKeys().then(res => { |
| | | const data = res.data.data; |
| | | this.eventList = data; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | }); |
| | | }, |
| | | |
| | | // å·æ°æ´ä¸ªé¡µé¢æ°æ® |
| | | createdHandler() { |
| | | this.getTreeList(); // æ æ¥è¯¢ |
| | | this.getStatusList(); // tagç¶ææ± æ¥è¯¢ |
| | | this.getEventsSelect(); // è·è¿äºä»¶æ¥è¯¢ |
| | | }, |
| | | |
| | | // è¡ç¹å» |
| | | nodeClick(row) { |
| | | console.log(row); |
| | | this.nodesEdgesData = { |
| | | nodes: this.transformNodeData(row.bounds), |
| | | edges: this.transformEdgeData(row.lines) |
| | | }; |
| | | this.rowData = {...row, eventList: {...this.eventList}}; |
| | | this.$store.dispatch('updateMethodBtn', false); |
| | | this.Reload = Math.random(); // å·æ°flowå¾è¡¨ |
| | | }, |
| | | |
| | | // nodeèç¹æ°æ®è½¬æ¢ |
| | | transformNodeData(nodes) { |
| | | return nodes.map(item => ({ |
| | | ...item, |
| | | label: item.name, |
| | | id: item.name, |
| | | color: '#1890FF', |
| | | shape: "flow-rect", |
| | | x: Number(item.cellx), |
| | | y: Number(item.celly), |
| | | width: Number(item.cellw), |
| | | height: Number(item.cellh) |
| | | })); |
| | | }, |
| | | |
| | | // lineè¿æ¥çº¿æ°æ®è½¬æ¢ |
| | | transformEdgeData(edges) { |
| | | return edges.map(item => ({ |
| | | ...item, |
| | | events: item.events.map(item => item.oid), // è·è¿äºä»¶ä¸ææ¡ç»å®ï¼å¨FlowchartEditorç»ä»¶onAfterItemSelectedæ¹æ³éæ¥æ¾å°å¯¹åºè¿æ¥çº¿çä¿¡æ¯ |
| | | label: item.name, // ç¨äºå³ä¾§è¯¦ç»ä¿¡æ¯åç§° |
| | | source: item.sourceLifeStatus, |
| | | target: item.targetLifeStatus |
| | | })); |
| | | }, |
| | | |
| | | // å建æé® |
| | | addClickHandler() { |
| | | this.$store.dispatch('updateMethodBtn', true); |
| | | this.handleResetTree(); |
| | | this.$store.dispatch('typeChange', 'add'); |
| | | }, |
| | | |
| | | // ä¿®æ¹æé® |
| | | editClickHandler() { |
| | | if (func.isEmptyObject(this.rowData)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.$store.dispatch('updateMethodBtn', Object.keys(this.rowData).length > 0); |
| | | this.$store.dispatch('editNodesStatus', true); |
| | | this.$store.dispatch('typeChange', 'edit'); |
| | | }, |
| | | |
| | | // å é¤æé® |
| | | delClickHandler() { |
| | | if (func.isEmptyObject(this.rowData)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | const {id, oid, ts} = this.rowData; |
| | | |
| | | const data = [{id, oid, ts}]; |
| | | deleteLifeCycles(data).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.handleResetTree(); |
| | | this.createdHandler(); |
| | | this.$store.dispatch('updateMethodBtn', Object.keys(this.rowData).length > 0); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // å¯¼åºæé® |
| | | exportClickHandler(){ |
| | | if (func.isEmptyObject(this.rowData)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | exportLifeCycles({lcNames:this.rowData.id}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }) |
| | | }, |
| | | |
| | | // 导å
¥æé® |
| | | uploadClickHandler(){ |
| | | this.$refs.upload.visible = true; |
| | | }, |
| | | |
| | | // æ¥ç使ç¨èå´æé® |
| | | checkViewClickHandler(){ |
| | | if (func.isEmptyObject(this.rowData)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | |
| | | getUsedLifeCycleList({lifeCycleName:this.rowData.id}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.checkViewVisible = true; |
| | | this.checkViewData = res.data.data; |
| | | this.checkViewDataSearch = res.data.data; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // æ¥ç使ç¨èå´æ¥è¯¢ |
| | | checkHandleSearch(params, done) { |
| | | const {source} = params; |
| | | |
| | | if (!params.source) { |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | return done(); |
| | | } |
| | | ; |
| | | |
| | | this.checkViewData = this.checkViewData.filter(item => { |
| | | return item.source && item.source.includes(source); |
| | | }); |
| | | |
| | | done(); |
| | | |
| | | }, |
| | | |
| | | // æ¥ç使ç¨èå´éç½® |
| | | checkHandleReset() { |
| | | this.checkViewData = this.checkViewDataSearch; |
| | | }, |
| | | |
| | | // åç»ä»¶åè°ä¿å |
| | | async handlerSave() { |
| | | const newRowData = await this.$refs.vueFlowchartEditor.getNewRowData(); |
| | | if (!newRowData) { |
| | | return; |
| | | } |
| | | |
| | | const flowData = await this.$refs.vueFlowchartEditor.getFlowData() || {}; |
| | | |
| | | const nodes = flowData.nodes || []; |
| | | const edges = flowData.edges || []; |
| | | |
| | | // æ£æ¥æ¯å¦ç»å¶äºè³å°ä¸ä¸ªå¾å½¢ |
| | | if (nodes.length <= 0) { |
| | | this.$message.error('请è³å°ç»å¶ä¸ä¸ªå¾å½¢ï¼'); |
| | | return; |
| | | } |
| | | |
| | | // æ£æ¥æ¯å¦ç»å¶äºè¿æ¥çº¿ |
| | | if (nodes.length > 1 && !edges.length) { |
| | | this.$message.error('è¯·æ£æ¥æ¯å¦ç»å¶è¿æ¥çº¿ï¼'); |
| | | return; |
| | | } |
| | | |
| | | // æ£æ¥ææè¿æ¥çº¿çåç§°æ¯å¦å¡«å |
| | | const hasValidLabels = edges.every(item => item.label && item.label.trim() !== ""); |
| | | if (!hasValidLabels) { |
| | | this.$message.error('è¯·æ£æ¥æ¯å¦æè¿æ¥çº¿åç§°æªå¡«åï¼'); |
| | | return; |
| | | } |
| | | |
| | | // æ£æ¥æ¯å¦æéæ¼çè¿æ¥çº¿ |
| | | if (edges.length + 1 < nodes.length) { |
| | | this.$message.error('è¯·æ£æ¥æ¯å¦å
¨é¨ç»å¶è¿æ¥çº¿ï¼'); |
| | | return; |
| | | } |
| | | |
| | | |
| | | let params = {...newRowData, ...flowData}; |
| | | const transformedData = { |
| | | id: params.id, |
| | | name: params.name, |
| | | startStatus: params.startStatus, |
| | | startStatusName: params.startStatusName, |
| | | description: params.description, |
| | | bounds: params.nodes.map(node => ({ |
| | | name: node.id, |
| | | cellx: String(node.x), |
| | | celly: String(node.y), |
| | | cellw: String(node.width), |
| | | cellh: String(node.height), |
| | | })), |
| | | lines: !params.edges ? [] : params.edges.map(edge => ({ |
| | | sourceLifeStatus: edge.source, |
| | | targetLifeStatus: edge.target, |
| | | saveEventList: edge.saveEventList, |
| | | name: edge.label |
| | | })) |
| | | }; |
| | | const getFunction = Object.keys(this.rowData).length > 0 ? () => updateLifeCycle(transformedData) |
| | | : () => addLifeCycle(transformedData); |
| | | |
| | | getFunction().then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.createdHandler(); |
| | | // this.handleResetTree(); |
| | | this.$store.dispatch('updateMethodBtn', Object.keys(this.rowData).length > 0); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // éç½®æ åå¾è¡¨ |
| | | handleResetTree() { |
| | | this.$refs.tree.setCurrentKey(null); |
| | | this.rowData = {}; |
| | | this.nodesEdgesData = {}; |
| | | this.Reload = Math.random(); |
| | | } |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button { |
| | | width: 65px; |
| | | padding-left: 9.5px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | //.headerCon > .el-button:nth-child(6) { |
| | | // margin-left: 0; |
| | | //} |
| | | |
| | | .smallBtn { |
| | | width: 77px !important; |
| | | //font-size: 11px !important; |
| | | text-align: center !important; |
| | | padding-left: 1px !important; |
| | | } |
| | | |
| | | </style> |
| | | |
| | |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary">ä¿®æ¹ |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger">å é¤ |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="deleteClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-view" plain size="small" type="primary">æ¥ç |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary">å¯¼åº |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary">导å
¥ |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="upLoadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button icon="el-icon-circle-plus-outline" plain size="small" |
| | | <el-button class="smallBtn" icon="el-icon-circle-plus-outline" plain size="small" |
| | | style="padding-left: 7px !important;" |
| | | type="primary" @click="createViewClickHandler">å建è§å¾ |
| | | </el-button> |
| | | <el-button icon="el-icon-menu" plain size="small" |
| | | <el-button class="smallBtn" icon="el-icon-menu" plain size="small" style="padding-left: 1px" |
| | | type="primary" @click="checkClickHandler">ä¸è´æ§æ£æ¥ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 300px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <!-- å建 && ç¼è¾ --> |
| | | <!-- å建 && ç¼è¾ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :title="title === 'add' ? 'å建' : 'ä¿®æ¹'" |
| | | :visible.sync="visible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | title="å建" |
| | | width="70%" |
| | | @close="addDialogClose" |
| | | > |
| | | <el-form ref="form" :model="form" :rules="rules" label-width="90px"> |
| | | <div class="dialogForm"> |
| | | <div class="leftForm"> |
| | | <el-form-item label="åç§°ï¼" prop="name"> |
| | | <el-input v-model="form.name"></el-input> |
| | | <el-input v-model="form.name" :readOnly="title === 'edit'"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="æ ç¾ï¼"> |
| | | <el-input v-model="form.tag"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å®ç°ç±»ï¼"> |
| | | <el-input v-model="form.impClass"></el-input> |
| | | <el-input v-model="form.implClass"></el-input> |
| | | </el-form-item> |
| | | <el-form-item label="å½¢ç¶"> |
| | | <el-input v-model="form.shape"></el-input> |
| | |
| | | |
| | | <div class="centerForm"> |
| | | <el-form-item label="Form端类åï¼" label-width="110px"> |
| | | <el-input v-model="form.btmItemsFrom"></el-input> |
| | | <!-- <el-button v-if="!form.btmItemsFrom" plain size="mini" type="success"--> |
| | | <!-- @click="FormItemReferChange('form')">æ·»å --> |
| | | <!-- </el-button>--> |
| | | <!-- <el-input v-if="form.btmItemsFrom" v-model="form.btmItemsFrom"></el-input>--> |
| | | <div style="display: flex; align-items: center"> |
| | | <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> |
| | | <!-- å
容 --> |
| | | <el-table |
| | | :data="bizFormData" |
| | | :show-header="false" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="small" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="bizTypeDeleteRow('form',scope.$index)"> |
| | | ç§»é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-button plain size="mini" style="margin-left: 5px" type="success" |
| | | @click="FormItemReferChange('form')">æ·»å |
| | | </el-button> |
| | | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="对åºå
³ç³»ï¼" label-width="110px"> |
| | | <el-select v-model="form.relationFrom"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="主类åï¼" label-width="110px"> |
| | | <el-input v-model="form.primitivesFrom"></el-input> |
| | | <el-select v-model="form.primitivesFrom"> |
| | | <el-option v-for="(item,index) in bizFormData" :key="index" :label="item.name" |
| | | :value="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | | <div class="rightForm"> |
| | | <el-form-item label="To端类åï¼" label-width="110px"> |
| | | <el-input v-model="form.btmItemsTo"></el-input> |
| | | <div style="display: flex; align-items: center"> |
| | | <div style="height: 200px; width: 280px; border: 1px solid #bdbbbb;overflow-y: auto"> |
| | | <!-- å
容 --> |
| | | <el-table |
| | | :data="bizToData" |
| | | :show-header="false" |
| | | style="width: 100%"> |
| | | <el-table-column |
| | | align="center" |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | | <el-button |
| | | size="small" |
| | | style="color:#F56C6C;" |
| | | type="text" |
| | | @click.native.prevent="bizTypeDeleteRow('to',scope.$index)"> |
| | | ç§»é¤ |
| | | </el-button> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | | </div> |
| | | <el-button plain size="mini" style="margin-left: 5px" type="success" |
| | | @click="FormItemReferChange('to')">æ·»å |
| | | </el-button> |
| | | |
| | | </div> |
| | | </el-form-item> |
| | | <el-form-item label="对åºå
³ç³»ï¼" label-width="110px"> |
| | | <el-select v-model="form.relationTo"> |
| | |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item label="主类åï¼" label-width="110px"> |
| | | <el-input v-model="form.primitivesTo"></el-input> |
| | | <el-select v-model="form.primitivesTo"> |
| | | <el-option v-for="(item,index) in bizToData" :key="index" :label="item.name" |
| | | :value="item.name"></el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | </div> |
| | | </div> |
| | |
| | | <avue-crud |
| | | :data="dialogBottomData" |
| | | :option="dialogBottomOption" |
| | | @row-del="dialogBottomAttrDel" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="dialogAddClickHandler">å¢ å |
| | |
| | | :option="conCheckOption" |
| | | :table-loading="conCheckLoading"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="conCheckVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- form to 端类åå¯¹è¯æ¡è¡¨æ ¼ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :title="bizTypeTitle === 'form' ? 'Form端类å' : 'To端类å'" |
| | | :visible.sync="bizTypeVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="70%" |
| | | > |
| | | <avue-crud |
| | | :key="bizTypeReload" |
| | | ref="bizTypeCrud" |
| | | :data="bizTypeData" |
| | | :option="bizTypeOption" |
| | | :table-loading="bizTypeLoading" |
| | | @search-change="bizTypeHandleSearch" |
| | | @search-reset="bizTypeHandleReset" |
| | | @selection-change="bizTypeSelection" |
| | | @row-click="bizTypeRowClick"> |
| | | </avue-crud> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bizTypeVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="bizTypeAddHandler">ç¡® å®</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="getTreeList"></upload-file> |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {gridLink, getByAttributeNames, checkLinkType, createView} from "@/api/modeling/linkType/api"; |
| | | import { |
| | | gridLink, |
| | | getByAttributeNames, |
| | | checkLinkType, |
| | | createView, |
| | | getBizTypes, |
| | | addAndEditLink, |
| | | expData, |
| | | repairTable, |
| | | deleteLink |
| | | } from "@/api/modeling/linkType/api"; |
| | | import basicOption from '@/util/basic-option' |
| | | import {gridAttribute} from "@/api/modeling/attributePool/api"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | tipList: [ |
| | | "导å
¥é¾æ¥åç§°ä¸å¯ä¸ºç©ºä¸é¾æ¥ç±»ååç§°åªè½ä¸ºè±æåæ¯", |
| | | "导å
¥çæä»¶å
æ¬å±æ§ãä¸å¡ç±»åãçå½å¨æçæä»¶", |
| | | "ä¸ä¼ çæä»¶ä¸ºå缩æä»¶ï¼ä¸åç¼©æ ¼å¼ä»
è½ä¸ºzipæ ¼å¼" |
| | | ], |
| | | upFileType: ['zip'], |
| | | fileUrl: 'api/linkTypeController/impData', |
| | | title: '', |
| | | bizTypeReload: null, |
| | | bizToData: [], |
| | | bizFormData: [], |
| | | bizTypeList: [], |
| | | bizTypeLoading: false, |
| | | bizTypeData: [], |
| | | bizTypeOption: { |
| | | ...basicOption, |
| | | menu: false, |
| | | addBtn: false, |
| | | index: false, |
| | | refreshBtn: false, |
| | | highlightCurrentRow: true, |
| | | searchMenuSpan: 8, |
| | | searchLabelWidth: 100, |
| | | column: [ |
| | | { |
| | | label: 'ä¸å¡ç±»åå', |
| | | prop: 'name', |
| | | sortable: true, |
| | | search: true, |
| | | }, |
| | | { |
| | | label: 'æ ç¾', |
| | | prop: 'label', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'ç¶ç±»', |
| | | prop: 'fName', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'çæ¬è§å', |
| | | prop: 'revRuleName', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'çå½å¨æ', |
| | | prop: 'lifeCycle', |
| | | sortable: true, |
| | | }, |
| | | ] |
| | | }, |
| | | bizTypeVisible: false, |
| | | bizTypeTitle: "", |
| | | conDefaultCheckData: [], // ä¿çä¸ä¸ªæ¥å£è¿åçæ°æ® |
| | | conCheckLoading: false, |
| | | conCheckOption: { |
| | |
| | | addBtn: false, |
| | | index: false, |
| | | selection: false, |
| | | refreshBtn: false |
| | | refreshBtn: false, |
| | | column: [ |
| | | { |
| | | label: 'ç±»åå', |
| | | prop: 'id', |
| | | }, |
| | | { |
| | | label: 'æä½', |
| | | prop: 'methods', |
| | | }, |
| | | { |
| | | label: 'ç¶æ', |
| | | prop: 'status', |
| | | } |
| | | ] |
| | | }, |
| | | conCheckData: [], |
| | | conCheckVisible: false, |
| | |
| | | form: { |
| | | name: '', // åç§° |
| | | tag: '', // æ ç¾ |
| | | impClass: '', // å®ç°ç±» |
| | | implClass: '', // å®ç°ç±» |
| | | shape: '', // å½¢ç¶ |
| | | description: '', // æè¿° |
| | | btmItemsFrom: '', // From端类åå表 |
| | |
| | | primitivesFrom: '', // form端主类å |
| | | btmItemsTo: '', // to端类åå表 |
| | | relationTo: 'N', // to端对åºå
³ç³» |
| | | primitivesTo: '', // to端主类å |
| | | primitivesTo: '', // to端主类å, |
| | | attributes: [] |
| | | }, |
| | | dialogBottomOption: { |
| | | ...basicOption, |
| | |
| | | main: 'el-icon-warning-outline', |
| | | desc: 'el-icon-chat-line-square' |
| | | }, |
| | | bizLastIndex: null, |
| | | attrLastIndex:null |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | this.treeData = data; |
| | | this.tableLoading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | this.$message.error(err); |
| | | }); |
| | | }, |
| | | |
| | | // 导å
¥ |
| | | upLoadClickHandler() { |
| | | this.$refs.upload.visible = true; |
| | | }, |
| | | |
| | | // æ ç¹å»äºä»¶ |
| | | nodeClick(row) { |
| | | console.log(row); |
| | | this.nodeRow = row; |
| | | this.getAttrPollData(row); // è·å屿§æ± å表 |
| | | }, |
| | |
| | | }) |
| | | }, |
| | | |
| | | // å é¤æé® |
| | | deleteClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | deleteLink(this.nodeRow).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success('å 餿å'); |
| | | this.getTreeList(); |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // å建æé® |
| | | addClickHandler() { |
| | | this.visible = true; |
| | | this.title = 'add'; |
| | | }, |
| | | |
| | | // ç¼è¾æé® |
| | | editClickHandler() { |
| | | this.title = 'edit'; |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | this.form = {...this.nodeRow}; // æµ
æ·è´ è§£å³å¼ç¨å¤å¶ |
| | | console.log(this.nodeRow); |
| | | this.bizFormData = this.form.btmItemsFrom.length > 0 && this.form.btmItemsFrom.map(item => { |
| | | return { |
| | | name: item |
| | | }; |
| | | }); |
| | | |
| | | this.bizToData = this.form.btmItemsTo.length > 0 && this.form.btmItemsTo.map(item => { |
| | | return { |
| | | name: item |
| | | }; |
| | | }); |
| | | |
| | | if (this.form.attributes.length > 0) { |
| | | let value = this.form.attributes.join(','); |
| | | getByAttributeNames({attrNames: value}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.dialogBottomData = res.data.data; |
| | | } |
| | | }) |
| | | } |
| | | this.visible = true; |
| | | }, |
| | | |
| | |
| | | checkLinkType().then(res => { |
| | | if (res.data.code === 200) { |
| | | const data = res.data.data; |
| | | this.conDefaultCheckData = data; |
| | | data.map(item => { |
| | | // è·å btmCheckMap 对象ç屿§å |
| | | const keys = Object.keys(item.btmCheckMap); |
| | | this.conDefaultCheckData = data; // ä¿çä¸ä»½åå§æ°æ® |
| | | this.conCheckLoading = false; |
| | | |
| | | return { |
| | | id: keys[0], |
| | | } |
| | | }) |
| | | const outputData = []; |
| | | |
| | | data.forEach(item => { |
| | | Object.entries(item.btmCheckMap).forEach(([id, methodsArray]) => { |
| | | methodsArray.forEach(methods => { |
| | | // 夿åç¼ |
| | | const action = methods.startsWith('F_') ? 'ç§»é¤form端ä¸å¡ç±»å' : 'ç§»é¤to端ä¸å¡ç±»å'; |
| | | const detail = methods.split('_')[1]; // è·å _ åé¢çå
容 |
| | | outputData.push({ |
| | | id: id, |
| | | methods: `${action}:${detail}`, |
| | | status: 'æªä¿®å¤' |
| | | }); |
| | | }); |
| | | }); |
| | | |
| | | // å¤ç dbCheckMap |
| | | Object.entries(item.dbCheckMap).forEach(([id, methods]) => { |
| | | const splitMethods = methods.split('('); |
| | | // å¤æç¬¬ä¸ä¸ªç¬¦å·åé¢çå¼ |
| | | if (splitMethods[0].startsWith('_ADD')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: 'å¢å å(' + splitMethods[1].slice(0, -1) + ')', // ç»æä½ç½®åå»)çå符 |
| | | status: 'æªä¿®å¤' |
| | | }); |
| | | } else if (splitMethods[0].startsWith('_CREATE')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: 'å建表(' + splitMethods[1].slice(0, -1) + ')', |
| | | status: 'æªä¿®å¤' |
| | | }); |
| | | } else if (splitMethods[0].startsWith('_DROP')) { |
| | | outputData.push({ |
| | | id: id, |
| | | methods: 'ç§»é¤å(' + splitMethods[1].slice(0, -1) + ')', |
| | | status: 'æªä¿®å¤' |
| | | }); |
| | | } else { |
| | | this.$message.error("䏿¯æç dbCheckMap ç±»åï¼ " + methods) |
| | | } |
| | | }); |
| | | }); |
| | | this.conCheckData = outputData; |
| | | } |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | this.$message.error(err); |
| | | }) |
| | | }, |
| | | |
| | | // ä¿®å¤ä¸è´æ§æ£æ¥ |
| | | repairClickHandler() { |
| | | console.log(this.conDefaultCheckData) |
| | | const params = this.conDefaultCheckData[0]; |
| | | repairTable(params).then(res => { |
| | | if (func.isEmptyObject(res.data.obj[0])) { |
| | | this.$message.success('ä¿®å¤æå'); |
| | | } else { |
| | | this.$message.error('ä¿®å¤å¤±è´¥ï¼è¯·éæ°å°è¯ï¼'); |
| | | } |
| | | this.conCheckVisible = false; |
| | | }) |
| | | }, |
| | | |
| | |
| | | createView().then(res => { |
| | | if (res.data.code === 200) { |
| | | this.createViewLoading = false; |
| | | this.$message.success(res.data.obj) |
| | | this.$message.success(res.data.obj); |
| | | } |
| | | }) |
| | | }, |
| | |
| | | this.dialogAttrLoading = true; |
| | | this.attrPollDialogVisible = true; |
| | | this.dialogAttrReload = Math.random(); // 强å¶å·æ°è¡¨æ ¼ è§£å³è¡¨æ ¼éè¡ |
| | | this.getAttrDialogDta() |
| | | this.getAttrDialogDta(); |
| | | }, |
| | | |
| | | // æ¥è¯¢å±æ§æ± åè¡¨æ°æ® |
| | |
| | | this.attrPage.total = res.data.total; |
| | | this.dialogAttrLoading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | this.$message.error(err); |
| | | }); |
| | | }, |
| | | |
| | |
| | | |
| | | // æ·»å 屿§æ± è¡ç¹å» |
| | | dialogAttrRowClickHandler(row) { |
| | | this.$refs.dialogAttrCrud.toggleRowSelection(row); |
| | | |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.dialogAttrCrud, |
| | | this.attrLastIndex, |
| | | (newIndex) => { this.attrLastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // æ·»å 屿§æ± å
³éå¯¹è¯æ¡ |
| | | dialogAttrClose() { |
| | | this.attrPollDialogVisible = false; |
| | | this.searchAttrParams = {}; |
| | | }, |
| | | |
| | | // æ¸
空form表å |
| | | resetForm() { |
| | | const form = { |
| | | name: '', // åç§° |
| | | tag: '', // æ ç¾ |
| | | implClass: '', // å®ç°ç±» |
| | | shape: '', // å½¢ç¶ |
| | | description: '', // æè¿° |
| | | btmItemsFrom: '', // From端类åå表 |
| | | relationFrom: 'N', // form端对åºå
³ç³» |
| | | primitivesFrom: '', // form端主类å |
| | | btmItemsTo: '', // to端类åå表 |
| | | relationTo: 'N', // to端对åºå
³ç³» |
| | | primitivesTo: '', // to端主类å |
| | | }; |
| | | this.form = form; |
| | | this.$refs.form.resetFields(); |
| | | this.bizFormData = []; |
| | | this.bizToData = []; |
| | | this.dialogBottomData = []; |
| | | console.log(this.form); |
| | | console.log('--', this.nodeRow) |
| | | }, |
| | | |
| | | // æ·»å 屿§æ± ä¿å |
| | |
| | | this.getAttrDialogDta(); |
| | | }, |
| | | |
| | | // 屿§æ± å é¤ |
| | | dialogBottomAttrDel(form, index) { |
| | | this.dialogBottomData.splice(index, 1); |
| | | }, |
| | | |
| | | // å建 ç¼è¾ å¯¹è¯æ¡å
³é |
| | | addDialogClose() { |
| | | this.visible = false; |
| | | this.dialogBottomData = []; |
| | | this.resetForm(); |
| | | }, |
| | | |
| | | // form to ç±»åbluråç
§å¯¹è¯æ¡ |
| | | FormItemReferChange(val) { |
| | | this.bizTypeTitle = val; |
| | | this.bizTypeLoading = true; |
| | | this.getBizTypeHandler(); |
| | | this.bizTypeVisible = true; |
| | | this.bizTypeReload = Math.random(); // 强å¶å·æ°è¡¨æ ¼ è§£å³è¡¨æ ¼éè¡ |
| | | }, |
| | | |
| | | // form to ç±»åè¡¨æ ¼æ¥è¯¢ |
| | | getBizTypeHandler(params) { |
| | | getBizTypes(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | const data = res.data.data; |
| | | this.bizTypeData = data; |
| | | this.bizTypeLoading = false; |
| | | } |
| | | }) |
| | | }, |
| | | |
| | | // form to ç±»åéæ©æ¡ |
| | | bizTypeSelection(row) { |
| | | this.bizTypeList = row; |
| | | }, |
| | | |
| | | // form to ç±»åè¡ç¹å» |
| | | bizTypeRowClick(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.bizTypeCrud, |
| | | this.bizLastIndex, |
| | | (newIndex) => { this.bizLastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // form to ç±»åä¿å |
| | | bizTypeAddHandler() { |
| | | if (this.bizTypeList.length === 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | |
| | | const data = this.bizTypeList.map(item => ({name: item.name})); |
| | | |
| | | const dataName = this.bizTypeTitle === 'form' ? 'bizFormData' : 'bizToData'; |
| | | |
| | | let hasDuplicate = false; |
| | | // å
å建ä¸ä¸ªä¸´æ¶æ°ç»æ¥åå¨ä¸éå¤ç项 |
| | | const newItems = []; |
| | | this.bizTypeList.forEach(item => { |
| | | const exists = this[dataName].some(existingItem => existingItem.name === item.name); |
| | | |
| | | if (exists) { |
| | | hasDuplicate = true; |
| | | return; |
| | | } |
| | | |
| | | // å¦ææ²¡æéå¤é¡¹ï¼åå°è¯¥é¡¹æ·»å å°ä¸´æ¶æ°ç»ä¸ |
| | | newItems.push({ |
| | | name: item.name, |
| | | }); |
| | | }); |
| | | |
| | | if (hasDuplicate) { |
| | | this.$message.error('è¯·æ£æ¥æ¯å¦ææ·»å éå¤é¡¹ï¼'); |
| | | } else { |
| | | // å¦ææ²¡æéå¤é¡¹ï¼å°æ°é¡¹æ·»å å° dialogBottomData |
| | | this[dataName].push(...newItems); |
| | | this.bizTypeVisible = false; |
| | | } |
| | | }, |
| | | |
| | | // form to ç±»åæç´¢ |
| | | bizTypeHandleSearch(params, done) { |
| | | console.log(params); |
| | | let obj = { |
| | | btmName: params.name |
| | | }; |
| | | this.getBizTypeHandler(obj); |
| | | |
| | | done(); |
| | | }, |
| | | |
| | | // form to ç±»åéç½® |
| | | bizTypeHandleReset() { |
| | | this.getBizTypeHandler(); |
| | | }, |
| | | |
| | | // form to ç«¯è¡¨æ ¼ç§»é¤ |
| | | bizTypeDeleteRow(val, index) { |
| | | const dataName = val === 'form' ? 'bizFormData' : 'bizToData'; |
| | | const primitivesName = val === 'form' ? 'primitivesFrom' : 'primitivesTo'; |
| | | |
| | | this[dataName].splice(index, 1); |
| | | |
| | | if (this[dataName].length === 0) { |
| | | this.form[primitivesName] = ""; |
| | | } |
| | | }, |
| | | |
| | | // å建ç¼è¾ ä¿å |
| | | addDialogSavaHandler() { |
| | | if (this.bizFormData.length <= 0 || this.bizToData.length <= 0) { |
| | | this.$message.error('form端ä¸å¡ç±»ååto端类ååä¸è½ä¸ºç©ºï¼') |
| | | return; |
| | | } |
| | | this.form.btmItemsFrom = this.bizFormData.map(item => item.name); |
| | | this.form.btmItemsTo = this.bizToData.map(item => item.name); |
| | | this.form.attributes = this.dialogBottomData.map(item => item.id); |
| | | let flag = this.title === 'add' ? true : false; |
| | | addAndEditLink(flag, this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.visible = false; |
| | | this.$message.success(res.data.msg); |
| | | this.resetForm(); |
| | | this.getTreeList(); |
| | | } |
| | | }); |
| | | }, |
| | | |
| | | // å¯¼åº |
| | | exportClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®'); |
| | | return; |
| | | } |
| | | let name = this.nodeRow.name; |
| | | expData({name: name}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | }).catch(err => { |
| | | this.$message.error(err); |
| | | }); |
| | | } |
| | | } |
| | | } |
| | |
| | | |
| | | .el-form-item .el-select { |
| | | width: 100%; |
| | | } |
| | | |
| | | .headerCon { |
| | | .el-button { |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | .dialogForm > div { |
| | | width: 28%; |
| | | width: 34%; |
| | | border: 1px solid #eee; |
| | | padding: 25px 20px 5px 10px; /* ä¸ å³ ä¸ å·¦ */ |
| | | box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.2); /* æ·»å é´å½±ææ */ |
| | | } |
| | | |
| | | .leftForm { |
| | | width: 19% !important; |
| | | padding: 25px 20px 5px 0px !important; |
| | | } |
| | | |
| | | .smallBtn { |
| | | width: 82px !important; |
| | | text-align: center !important; |
| | | padding-left: 0px !important; |
| | | } |
| | | </style> |
| | |
| | | <template> |
| | | <el-container> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="useCrud" |
| | | :table-loading="loading" |
| | | :data="data" |
| | | :option="option" |
| | | :page.sync="page" |
| | | @selection-change="selectChange" |
| | | @row-click="rowClickHandler" |
| | | @refresh-change="handleRefresh" |
| | | @size-change="sizeChange" |
| | | @current-change="currentChange" |
| | | > |
| | | <template slot="menuLeft"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button icon="el-icon-check" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </template> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button plain size="small" style="width: 100px;text-align: center" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | <template slot="menu" slot-scope="{row,index}"> |
| | | <el-button icon="el-icon-edit" plain size="small" type="text" @click="editClickHandler(row)">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="text" @click="delRowClickHandler(row)">å é¤ |
| | | </el-button> |
| | | </template> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | <el-descriptions :column="1" border class="margin-top" size="medium" title="屿§ä¿¡æ¯"> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.id"></i> |
| | | åç§° |
| | | </template> |
| | | <el-tag v-if="nodeRow.id">{{ nodeRow.id }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.name"></i> |
| | | æ ç¾ |
| | | </template> |
| | | <el-tag v-if="nodeRow.name">{{ nodeRow.name }}</el-tag> |
| | | </el-descriptions-item> |
| | | <el-descriptions-item :contentStyle="descriptionOption.contentStyle" |
| | | :labelStyle="descriptionOption.labelStyle"> |
| | | <template slot="label"> |
| | | <i :class="icons.desc"></i> |
| | | æè¿° |
| | | </template> |
| | | <el-tag v-if="nodeRow.description">{{ nodeRow.description }}</el-tag> |
| | | </el-descriptions-item> |
| | | </el-descriptions> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | <!-- æ°å¢ ä¿®æ¹ --> |
| | | </avue-crud> |
| | | |
| | | <!-- æ°å¢ ä¿®æ¹ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :title="dialogTitle === 'add' ? 'å建' : 'ä¿®æ¹'" |
| | |
| | | </span> |
| | | </el-dialog> |
| | | |
| | | <!-- 导å
¥ --> |
| | | <!-- 导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="getTreeList"></upload-file> |
| | | |
| | | <!-- æ¥ç使ç¨èå´ --> |
| | | <!-- æ¥ç使ç¨èå´ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | :visible.sync="checkViewVisible" |
| | |
| | | > |
| | | </avue-crud> |
| | | </el-dialog> |
| | | |
| | | </el-container> |
| | | </basic-container> |
| | | |
| | | </template> |
| | | |
| | |
| | | name: "index", |
| | | data() { |
| | | return { |
| | | loading:false, |
| | | data: [], |
| | | option: { |
| | | ...basicOption, |
| | | addBtn: false, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | calcHeight: -60, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'id', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æ ç¾', |
| | | prop: 'name', |
| | | sortable: true, |
| | | }, |
| | | { |
| | | label: 'æè¿°', |
| | | prop: 'description', |
| | | }, |
| | | ] |
| | | }, |
| | | checkViewVisible: false, |
| | | checkViewData: [], |
| | | checkViewDataSearch: [], |
| | |
| | | ] |
| | | }, |
| | | visible: false, |
| | | treeOption: { |
| | | height: 'auto', |
| | | defaultExpandAll: false, |
| | | menu: false, |
| | | addBtn: false, |
| | | props: { |
| | | label: 'id', |
| | | value: 'id', |
| | | children: 'children' |
| | | } |
| | | }, |
| | | treeData: [], |
| | | nodeRow: {}, |
| | | descriptionOption: { |
| | | labelStyle: 'text-align:center;width:120px', |
| | | contentStyle: 'width:240px;text-align:center;word-break;break-all;' |
| | | }, |
| | | icons: { |
| | | id: 'el-icon-finished', |
| | | name: 'el-icon-tickets', |
| | | desc: 'el-icon-chat-line-square' |
| | | selectList:[], |
| | | lastIndex:null, |
| | | page: { |
| | | currentPage: 1, |
| | | pageSize: 15, |
| | | total: 0, |
| | | pageSizes: [15, 30, 50, 100], |
| | | }, |
| | | } |
| | | }, |
| | |
| | | methods: { |
| | | // 左侧æ è¯·æ± |
| | | getTreeList() { |
| | | gridStatus({page: 1, limit: -1}).then(res => { |
| | | gridStatus(this.page.currentPage, this.page.pageSize).then(res => { |
| | | const data = res.data.data; |
| | | this.treeData = data; |
| | | this.data = data; |
| | | this.page.total = res.data.total; |
| | | this.loading = false; |
| | | }).catch(err => { |
| | | this.$message.error(err) |
| | | this.$message.error(err); |
| | | }); |
| | | }, |
| | | |
| | | // æ èç¹ç¹å»äºä»¶ |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | // è¡¨æ ¼å·æ° |
| | | handleRefresh(){ |
| | | this.getTreeList(); |
| | | }, |
| | | |
| | | // è¡¨æ ¼å¤é |
| | | selectChange(row){ |
| | | this.selectList = row; |
| | | }, |
| | | |
| | | // æ¡æ° |
| | | sizeChange(val) { |
| | | this.page.pageSize = val; |
| | | this.getTreeList(); |
| | | }, |
| | | |
| | | // 页ç |
| | | currentChange(val) { |
| | | this.page.currentPage = val; |
| | | this.getTreeList(); |
| | | }, |
| | | |
| | | // è¡åé |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.useCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // å建æé® |
| | |
| | | }, |
| | | |
| | | // ç¼è¾æé® |
| | | editClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | editClickHandler(row) { |
| | | this.visible = true; |
| | | this.dialogTitle = 'edit'; |
| | | this.form = this.nodeRow; |
| | | this.form = {...row}; |
| | | }, |
| | | |
| | | // å é¤ |
| | | delClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const list = [this.nodeRow]; |
| | | this.loading = true; |
| | | deleteStatus(this.selectList).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | // è¡å个å é¤ |
| | | delRowClickHandler(row){ |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤æéæ©çæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | const list = [row]; |
| | | this.loading = true; |
| | | deleteStatus(list).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTreeList(); |
| | | this.nodeRow = {}; |
| | | } |
| | | }) |
| | | }).catch(() => { |
| | |
| | | saveFunction(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.loading = true; |
| | | this.getTreeList(); |
| | | this.visible = false; |
| | | } else { |
| | |
| | | |
| | | // å¯¼åº |
| | | exportClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | |
| | | exportStatus({statusOids: this.nodeRow.oid}).then(res => { |
| | | exportStatus({statusOids: this.selectList.map(item => item.oid).join(',')}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | }).catch(err => { |
| | |
| | | |
| | | // æ¥ç使ç¨èå´ |
| | | checkViewClickHandler() { |
| | | if (func.isEmptyObject(this.nodeRow)) { |
| | | if (this.selectList.length <= 0) { |
| | | this.$message.error('请è³å°éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | listUsed({oid: this.nodeRow.oid}).then(res => { |
| | | |
| | | if (this.selectList.length > 1) { |
| | | this.$message.error('åªè½éæ©ä¸æ¡æ°æ®ï¼'); |
| | | return; |
| | | } |
| | | listUsed({oid: this.selectList[0].oid}).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.checkViewVisible = true; |
| | | const data = res.data.data; |
| | | data.forEach(item => { |
| | | item.name = item.id + `( ${item.name} )`; |
| | | item.TreeId = this.nodeRow.id; |
| | | item.TreeId = this.selectList[0].oid; |
| | | }) |
| | | this.checkViewData = res.data.data; |
| | | this.checkViewDataSearch = res.data.data; |
| | |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .upload-demo { |
| | | margin-left: 20px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button plain size="small" style="width: 100px;text-align: center" type="primary" |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | |
| | | //å·¦ä¾§æ æ¥è¯¢ |
| | | getTreeList() { |
| | | getVersionRuleAllList().then(res => { |
| | | console.log(res); |
| | | const data = res.data.data; |
| | | this.treeData = data; |
| | | }).catch(err => { |
| | |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | |
| | | .headerCon { |
| | | .el-button { |
| | | width: 82px; |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | .headerCon { |
| | |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <p>ä¸å¡ç±»åæ¥è¯¢</p> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <p>龿¥ç±»åæ¥è¯¢</p> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | <template> |
| | | <p>æ¥è¯¢æ¨¡æ¿å®ä¹</p> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <el-container> |
| | | |
| | | <el-aside> |
| | | <basic-container> |
| | | <div ref="TreeBox" style="height: calc(100vh - 144px);!important;"> |
| | | <div class="headerCon"> |
| | | <el-button icon="el-icon-plus" plain size="small" type="primary" @click="addClickHandler">å建 |
| | | </el-button> |
| | | <el-button icon="el-icon-edit" plain size="small" type="primary" @click="editClickHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button icon="el-icon-delete" plain size="small" type="danger" @click="delClickHandler">å é¤ |
| | | </el-button> |
| | | <el-button icon="el-icon-download" plain size="small" type="primary" @click="exportClickHandler">å¯¼åº |
| | | </el-button> |
| | | <el-button icon="el-icon-upload2" plain size="small" type="primary" @click="uploadClickHandler">导å
¥ |
| | | </el-button> |
| | | <el-button class="smallBtn" plain size="small" type="primary" |
| | | @click="checkViewClickHandler">æ¥ç使ç¨èå´ |
| | | </el-button> |
| | | </div> |
| | | <!-- 左侧æ --> |
| | | <div style="height: calc(100vh - 280px);"> |
| | | <avue-tree :data="treeData" :option="treeOption" @node-click="nodeClick"> |
| | | <span slot-scope="{ node, data }" class="el-tree-node__label"> |
| | | <span style="font-size: 15px"> |
| | | <i class="el-icon-s-promotion"></i> |
| | | {{ (node || {}).label }} |
| | | </span> |
| | | </span> |
| | | </avue-tree> |
| | | </div> |
| | | </div> |
| | | </basic-container> |
| | | </el-aside> |
| | | |
| | | <el-main> |
| | | <basic-container> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | | </el-container> |
| | | </template> |
| | | |
| | | <script> |
| | | export default { |
| | | name: "index" |
| | | } |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | ::v-deep { |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .headerCon{ |
| | | .el-button{ |
| | | width: 82px; |
| | | } |
| | | } |
| | | } |
| | | |
| | | .headerCon { |
| | | display: flex; |
| | | flex-wrap: wrap; |
| | | margin-bottom: 5px; |
| | | |
| | | .el-button + .el-button { |
| | | margin-left: 5px; |
| | | } |
| | | |
| | | .el-button { |
| | | margin-top: 5px; |
| | | } |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(4) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | .headerCon > .el-button:nth-child(7) { |
| | | margin-left: 0; |
| | | } |
| | | |
| | | |
| | | .smallBtn { |
| | | width: 82px; |
| | | text-align: center; |
| | | padding-left: 4.5px; |
| | | } |
| | | |
| | | </style> |
| | |
| | | </avue-crud> |
| | | <div slot="footer" class="dialog-footer" style="display: flex;gap: 20px;justify-content: center"> |
| | | <div> |
| | | <el-tag>å½åè§è²æ»äººæ°: {{this.countData.length}}</el-tag> |
| | | <el-tag>å½åè§è²æ»äººæ°: {{ this.countData.length }}</el-tag> |
| | | </div> |
| | | <el-button size="small" @click="statisticsVisible = false" icon="el-icon-close" type="danger">å
³ é</el-button> |
| | | <el-button icon="el-icon-close" size="small" type="danger" @click="statisticsVisible = false">å
³ é</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <!-- 导å
¥è§è² --> |
| | | <upload-file ref="upload" :tipList="tipList" :fileType="upFileType" :fileUrl="fileUrl" @updata="getTableList" title="导å
¥è§è²"></upload-file> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥è§è²" |
| | | @updata="getTableList"></upload-file> |
| | | |
| | | </basic-container> |
| | | </template> |
| | |
| | | } from '@/api/system/role/api' |
| | | import basicOption from "@/util/basic-option"; |
| | | import {column} from "@/views/system/role/option"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index", |
| | |
| | | countData: [], |
| | | countOption: { |
| | | ...basicOption, |
| | | selection:false, |
| | | selection: false, |
| | | refreshBtn: false, |
| | | addBtn:false, |
| | | menu:false, |
| | | addBtn: false, |
| | | menu: false, |
| | | column: [ |
| | | { |
| | | label: 'é¨é¨', |
| | |
| | | }, |
| | | upFileType: ['xls', 'xlsx'], |
| | | fileUrl: 'api/roleQueryController/importRole', |
| | | tipList:["è§è²å¯¼å
¥åªæ åç§° å æè¿° 两åï¼ä¸å称为å¿
è¾é¡¹ä¸è½ä¸ºç©º"] |
| | | tipList: ["è§è²å¯¼å
¥åªæ åç§° å æè¿° 两åï¼ä¸å称为å¿
è¾é¡¹ä¸è½ä¸ºç©º"] |
| | | } |
| | | }, |
| | | methods: { |
| | |
| | | |
| | | // è¡åé |
| | | rowClickHandler(row) { |
| | | this.$refs.roleCrud.toggleRowSelection(row); |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.roleCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // æ·»å |
| | | rowSaveHandler(row, done,loading) { |
| | | rowSaveHandler(row, done, loading) { |
| | | delete row.roleClassifyText; |
| | | addRole(row).then(res => { |
| | | console.log(res) |
| | |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err =>{ |
| | | }).catch(err => { |
| | | console.log(err); |
| | | loading(); |
| | | }) |
| | | }, |
| | | |
| | | // ç¼è¾ |
| | | rowUpdateHandler(row, index, done,loading) { |
| | | rowUpdateHandler(row, index, done, loading) { |
| | | delete row.roleClassifyText; |
| | | updateRole(row).then(res => { |
| | | if (res.data.code === 200) { |
| | |
| | | this.countData = data.map(item => { |
| | | return { |
| | | pkDepartmentName: item.pkDepartmentName, |
| | | name:item.name, |
| | | id:item.id, |
| | | pkPersonName:this.selectList[0].name |
| | | name: item.name, |
| | | id: item.id, |
| | | pkPersonName: this.selectList[0].name |
| | | } |
| | | }); |
| | | this.statisticsVisible = true; |
| | |
| | | }, |
| | | |
| | | // 导å
¥è§è² |
| | | upLoadRole(){ |
| | | upLoadRole() { |
| | | this.$refs.upload.visible = true; |
| | | } |
| | | } |
| | |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | align:'left' |
| | | }, |
| | | { |
| | | label: 'ç¼å·', |
| | |
| | | leftRoleData: [], // åé
è§è²ç©¿æ¢æ¡å·¦ä¾§åå§æ°æ® |
| | | rightRoleData: [], // åé
è§è²ç©¿æ¢æ¡å³ä¾§åå§æ°æ® |
| | | transferTitle: ['ç°æè§è²', 'æ¥æè§è²'], |
| | | tipList:["导å
¥æ¨¡æ¿ä¸æ æçº¢è²åä½ç为å¿
è¾é¡¹","é¨é¨åä¸ä¸çº§å
³ç³»å¿
é¡»æç
§åææ éå¼(/)"] |
| | | tipList:["导å
¥æ¨¡æ¿ä¸æ æçº¢è²åä½ç为å¿
è¾é¡¹","é¨é¨åä¸ä¸çº§å
³ç³»å¿
é¡»æç
§åææ éå¼(/)"], |
| | | lastIndex:null, |
| | | } |
| | | }, |
| | | created() { |
| | |
| | | |
| | | // ç¹å»è¡ |
| | | rowClickHandler(row) { |
| | | this.$refs.userCrud.toggleRowSelection(row); |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.userCrud, |
| | | this.lastIndex, |
| | | (newIndex) => { this.lastIndex = newIndex; }, |
| | | () => { this.selectList = []; } |
| | | ); |
| | | }, |
| | | |
| | | // åé
è§è² |