Merge remote-tracking branch 'origin/master'
| | |
| | | |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @Description 徿 ä¼ è¾å¯¹è±¡ |
| | | * @Author dangsn |
| | |
| | | * 徿 åç» |
| | | */ |
| | | private String groups; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | private long plCreateTime ; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | private String plCreateUser; |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | private long plModifyTime ; |
| | | /** |
| | | * ä¿®æ¹äºº |
| | | */ |
| | | private String plModifyUser; |
| | | } |
| | |
| | | * 徿 æå±åº |
| | | */ |
| | | private String lable; |
| | | |
| | | /** |
| | | * å建æ¶é´ |
| | | */ |
| | | private long plCreateTime ; |
| | | /** |
| | | * å建人 |
| | | */ |
| | | private String plCreateUser; |
| | | /** |
| | | * ä¿®æ¹æ¶é´ |
| | | */ |
| | | private long plModifyTime ; |
| | | /** |
| | | * ä¿®æ¹äºº |
| | | */ |
| | | private String plModifyUser; |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * ä¿®æ¹ç¨æ·å¤´å |
| | | * @param file æä»¶ |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/updateUserPhoto",method = RequestMethod.POST) |
| | | public BaseResult updateUserPhoto(MultipartFile file){ |
| | | try { |
| | | return userQueryService.updateUserPhoto(file) ? BaseResult.success("ç¨æ·å¤´åä¿®æ¹æåï¼"):BaseResult.fail("ç¨æ·å¤´åä¿®æ¹å¤±è´¥ï¼"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | String exceptionMessage = "ä¿®æ¹ç¨æ·å¤´åæ¶åºç°é误ï¼åå ï¼" + VciBaseUtil.getExceptionMessage(e); |
| | | logger.error(exceptionMessage); |
| | | return BaseResult.fail(exceptionMessage); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * è·åç¨æ·å¤´å |
| | | * @param response |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/getUserPhoto",method = RequestMethod.GET) |
| | | public void getUserPhoto(HttpServletResponse response){ |
| | | try { |
| | | ControllerUtil.writeFileToResponse(response,userQueryService.getUserPhoto()); |
| | | } catch (Exception e) { |
| | | throw new VciBaseException(e.getMessage(),new String[0],e); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * å é¤ç¨æ· |
| | | * @param ids |
| | | * @return |
| | |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import java.util.Collection; |
| | |
| | | * @return |
| | | */ |
| | | String expUser() throws PLException; |
| | | /** |
| | | * ä¿®æ¹ç¨æ·å¤´å |
| | | * @param file æä»¶ |
| | | * @return |
| | | */ |
| | | boolean updateUserPhoto(MultipartFile file) throws PLException; |
| | | |
| | | String getUserPhoto() throws PLException; |
| | | } |
| | |
| | | |
| | | import com.vci.common.util.ThreeDES; |
| | | import com.vci.common.utility.ObjectUtility; |
| | | import com.vci.constant.FrameWorkLangCodeConstant; |
| | | import com.vci.constant.WebLangCodeConstant; |
| | | import com.vci.corba.common.PLException; |
| | | import com.vci.corba.common.data.UserEntityInfo; |
| | | import com.vci.corba.framework.data.*; |
| | | import com.vci.corba.omd.data.BusinessObject; |
| | | import com.vci.corba.omd.etm.EnumItem; |
| | | import com.vci.corba.omd.etm.EnumType; |
| | | import com.vci.corba.volume.VolumeServicePrx; |
| | | import com.vci.dto.SmUserDTO; |
| | | import com.vci.dto.VciFileObjectDTO; |
| | | import com.vci.enumpck.UI.OrgTypeEnum; |
| | | import com.vci.enumpck.UI.VciFileTransProtocolEnum; |
| | | import com.vci.enumpck.UserTypeEnum; |
| | | import com.vci.lcstatuspck.FileLCStatus; |
| | | import com.vci.model.SmUserDO; |
| | | import com.vci.model.VciFileDocClassifyDO; |
| | | import com.vci.model.VciFileObjectDO; |
| | | import com.vci.model.VciFileVolumeDO; |
| | | import com.vci.omd.utils.ObjectTool; |
| | | import com.vci.pagemodel.OrgDepartmentVO; |
| | | import com.vci.pagemodel.SmPasswordStrategyVO; |
| | | import com.vci.pagemodel.SmRoleVO; |
| | | import com.vci.pagemodel.SmUserVO; |
| | | import com.vci.pagemodel.*; |
| | | import com.vci.po.SmUserPO; |
| | | import com.vci.properties.OsConfig; |
| | | import com.vci.starter.poi.bo.ReadExcelOption; |
| | |
| | | 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.revision.service.RevisionModelUtil; |
| | | import com.vci.starter.web.enumpck.BooleanEnum; |
| | | import com.vci.starter.web.enumpck.DataSecretEnum; |
| | | import com.vci.starter.web.enumpck.UserSecretEnum; |
| | | import com.vci.starter.web.exception.VciBaseException; |
| | | import com.vci.starter.web.pagemodel.*; |
| | | import com.vci.starter.web.util.*; |
| | | import com.vci.starter.web.util.Lcm.Func; |
| | | import com.vci.starter.web.wrapper.VciQueryWrapperForDO; |
| | | import com.vci.web.dao.VciFileObjectDaoI; |
| | | import com.vci.web.properties.WebProperties; |
| | | import com.vci.web.service.*; |
| | | import com.vci.web.util.PlatformClientUtil; |
| | | import com.vci.web.util.WebUtil; |
| | | import org.apache.commons.io.FilenameUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.apache.poi.hssf.util.HSSFColor; |
| | | import org.slf4j.Logger; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.util.CollectionUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.io.File; |
| | | import javax.annotation.Resource; |
| | | import java.io.*; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.vci.constant.FrameWorkLangCodeConstant.UPLOAD_FAIL; |
| | | |
| | | /** |
| | | * ç¨æ·çæ¥è¯¢ç¸å
³çæå¡ï¼å¯ä»¥å
¼å®¹èå¹³å°åèçpdm |
| | |
| | | */ |
| | | @Autowired |
| | | private WebPwdStrategyQueryServiceI smPwdStrategyQueryService; |
| | | |
| | | /** |
| | | * æä»¶çå·æå¡ |
| | | */ |
| | | @Autowired |
| | | private VciFileVolumeServiceI vciFileVolumeServiceI; |
| | | |
| | | /** |
| | | * çæ¬å对象æä½ç±» |
| | | */ |
| | | @Autowired(required = false) |
| | | private RevisionModelUtil revisionModelUtil; |
| | | |
| | | /** |
| | | * é
置对象 |
| | | */ |
| | | @Autowired |
| | | private WebProperties webProperties; |
| | | |
| | | /** |
| | | * 使ç¨è§è²ç屿§æ¥è¯¢ç¨æ·æ¶ |
| | |
| | | * æ¥å¿ |
| | | */ |
| | | private Logger logger = LoggerFactory.getLogger(getClass()); |
| | | |
| | | /** |
| | | * æä»¶ä¸ä¼ ä¸å¡å± |
| | | */ |
| | | @Autowired |
| | | private VciFileUploadServiceI vciFileUploadServiceI; |
| | | |
| | | /** |
| | | * æä»¶ä¿¡æ¯æ°æ®å± |
| | | */ |
| | | @Resource |
| | | private VciFileObjectDaoI vciFileObjectMapper; |
| | | |
| | | /** |
| | | * å¹³å°é
ç½® |
| | |
| | | smUserVO.setLastModifier(userInfo.updateUser); |
| | | smUserVO.setLastLoginTime(VciDateUtil.long2Date(userInfo.updateTime)); |
| | | smUserVO.setLastModifyPasswordTime(VciDateUtil.long2Date(userInfo.pwdUpdateTime)); |
| | | smUserVO.setPhoto(userInfo.photo); |
| | | return smUserVO; |
| | | } |
| | | |
| | |
| | | userInfo.grantor = user.getGrantor() == null ? "" : user.getGrantor(); |
| | | userInfo.secretGrade = user.getSecretGrade() == null ? 2 : Integer.valueOf(user.getSecretGrade()); |
| | | userInfo.isDeptLeader = user.getIsDeptLeader() == null ? "0" : user.getIsDeptLeader(); |
| | | userInfo.photo = user.getPhoto() == null ? "" : user.getPhoto(); |
| | | return userInfo; |
| | | } |
| | | |
| | |
| | | ExcelUtil.writeDataToFile(excelPath, excelOption); |
| | | return excelPath; |
| | | } |
| | | /** |
| | | * ä¿®æ¹ç¨æ·å¤´å |
| | | * @param file æä»¶ |
| | | * @return |
| | | */ |
| | | @Override |
| | | public boolean updateUserPhoto(MultipartFile file) throws PLException { |
| | | //è·åæä»¶ä»ä½ç½® |
| | | VciFileVolumeDO vciFileVolumeDO = vciFileVolumeServiceI.getUploadVolume(); |
| | | String volumeName = vciFileVolumeDO.getName(); |
| | | VolumeServicePrx volumnCorbaService = platformClientUtil.getVolumeService(volumeName); |
| | | if(volumnCorbaService == null){ |
| | | throw new VciBaseException("没æè·åå°å·æå¡"); |
| | | } |
| | | InputStream in = null; |
| | | String path = vciFileVolumeDO.getId() + ":/userphoto/" + WebUtil.getSessionInfo().getUserOid() + "." + |
| | | FilenameUtils.getExtension(file.getOriginalFilename()); |
| | | UserInfo userInfo = platformClientUtil.getFrameworkService().getUserObjectByoid(WebUtil.getSessionInfo().getUserOid()); |
| | | if(StringUtils.isNotBlank(userInfo.photo)){ |
| | | volumnCorbaService.deleteFile(userInfo.photo); |
| | | } |
| | | try{ |
| | | long currentTime = volumnCorbaService.getCurrrentTimeMillions(); |
| | | in = file.getInputStream(); |
| | | long fileSize = file.getSize(); |
| | | int blockSize = webProperties.getBlockLength()*1024; |
| | | byte[] buffer = new byte[blockSize]; |
| | | long temp =0L; |
| | | for(temp = 0L; temp < fileSize - (long)blockSize; temp += (long)blockSize) { |
| | | in.read(buffer, 0, blockSize); |
| | | volumnCorbaService.receiveFile(path, buffer, temp, currentTime, fileSize); |
| | | } |
| | | int remainSize = (int)(fileSize - temp); |
| | | buffer = new byte[remainSize]; |
| | | in.read(buffer, 0, remainSize); |
| | | volumnCorbaService.receiveFile(path, buffer, temp, currentTime, fileSize); |
| | | }catch(IOException e){ |
| | | throw new VciBaseException("读åæä»¶[" + file.getName() + "]åºç°äºé误ï¼" + e.getMessage() ,new String[0],e); |
| | | }catch(Exception e){ |
| | | throw new VciBaseException("å¤çä¸ä¼ æä»¶[" + file.getName() + "]åºç°äºé误ï¼" + e.getMessage() ,new String[0],e); |
| | | }finally { |
| | | if(in!=null){ |
| | | try { |
| | | in.close(); |
| | | } catch (IOException e) { |
| | | } |
| | | } |
| | | } |
| | | userInfo.photo = path; |
| | | boolean b = platformClientUtil.getFrameworkService().updateUser(userInfo, new UserEntityInfo(WebThreadLocalUtil.getCurrentUserSessionInfoInThread().getUserId(), null)); |
| | | if(!b){ |
| | | return false; |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | @Override |
| | | public String getUserPhoto() throws PLException { |
| | | //è·åæä»¶ä»ä½ç½® |
| | | VciFileVolumeDO vciFileVolumeDO = vciFileVolumeServiceI.getUploadVolume(); |
| | | String volumeName = vciFileVolumeDO.getName(); |
| | | VolumeServicePrx volumnCorbaService = platformClientUtil.getVolumeService(volumeName); |
| | | if(volumnCorbaService == null){ |
| | | throw new VciBaseException("没æè·åå°å·æå¡"); |
| | | } |
| | | UserInfo userInfo = platformClientUtil.getFrameworkService().getUserObjectByoid(WebUtil.getSessionInfo().getUserOid()); |
| | | String serverPath = userInfo.photo; |
| | | String tempFilePath = LocalFileUtil.getDefaultTempFolder() + File.separator+serverPath.substring(serverPath.lastIndexOf("/") + 1); |
| | | try { |
| | | FileOutputStream destFileOs = new FileOutputStream(tempFilePath); |
| | | long blockSize = webProperties.getBlockLength()*1024; |
| | | if(blockSize> Integer.MAX_VALUE){ |
| | | blockSize = Integer.MAX_VALUE; |
| | | } |
| | | long fileSize = volumnCorbaService.getFileSize(serverPath); |
| | | long temp = 0; |
| | | while (fileSize - temp > blockSize) { |
| | | destFileOs.write(volumnCorbaService.sendFile(serverPath, temp)); |
| | | temp += blockSize; |
| | | } |
| | | destFileOs.write(volumnCorbaService.sendFile(serverPath, temp)); |
| | | destFileOs.flush(); |
| | | destFileOs.close(); |
| | | } catch (FileNotFoundException e) { |
| | | throw new VciBaseException("è¦åå
¥çæä»¶æ²¡ææ¾å°",new String[]{tempFilePath},e); |
| | | } catch (IOException e) { |
| | | throw new VciBaseException("åå
¥æä»¶åºé" + e.getMessage(),new String[]{tempFilePath},e); |
| | | } catch (Exception e){ |
| | | throw new VciBaseException("å·æå¡ä¼ è¾æä»¶æ¶åºç°äºé误" + e.getMessage(),new String[0],e); |
| | | } |
| | | return tempFilePath; |
| | | } |
| | | |
| | | //æ ¹æ®åé¨é¨æ¥è¯¢æå±çç¶ç±»é¨é¨ï¼å¹¶æ¼æ¥æå符串形å¼ï¼è¿å |
| | | public String getDeptObjectAllByDeptId(DeptInfo obj) throws PLException { |
| | | String fetchDepName = ""; |
| | |
| | | import com.vci.corba.omd.ltm.LinkTypeServicePrx; |
| | | import com.vci.corba.omd.qtm.QTDServicePrx; |
| | | import com.vci.corba.omd.stm.StatePoolServicePrx; |
| | | import com.vci.corba.omd.tim.TypeIndexServicePrx; |
| | | import com.vci.corba.omd.vrm.VersionRuleServicePrx; |
| | | import com.vci.corba.pllog.LogServicePrx; |
| | | import com.vci.corba.portal.PortalServicePrx; |
| | |
| | | } |
| | | |
| | | /** |
| | | * è·åç±»åç´¢å¼ç®¡çæå¡ |
| | | * @return æå¡ç对象 |
| | | */ |
| | | public TypeIndexServicePrx getTypeIndexService() throws PLException { |
| | | return WebServiceProvider.getOMDService().getTypeIndexService(); |
| | | } |
| | | |
| | | /** |
| | | * è·åçå½å¨æçæå¡ |
| | | * @return çå½å¨æçæå¡å¯¹è±¡ |
| | | */ |
| | |
| | | import com.vci.corba.omd.lcm.LifeCycle; |
| | | import com.vci.corba.omd.ltm.LinkType; |
| | | import com.vci.corba.omd.stm.StatePool; |
| | | import com.vci.corba.omd.tim.TypeIndexDef; |
| | | import com.vci.corba.omd.vrm.VersionRule; |
| | | import com.vci.dto.OsBtmTypeDTO; |
| | | import com.vci.model.IndexObject; |
| | |
| | | if (Func.isEmpty(conditionMap)) { |
| | | return new ArrayList<>(); |
| | | } |
| | | List<String> indexNameList = new ArrayList<String>(); |
| | | QueryTemplate qtl = new QueryTemplate(); |
| | | List<String> list = new ArrayList<String>(); |
| | | list.add("*"); |
| | | qtl.setBtmType("indexobject"); |
| | | qtl.setClauseList(list); |
| | | qtl.setId("p"); |
| | | qtl.setType("btm"); |
| | | qtl.setRightFlag(false); |
| | | Condition condition = OQTool.getCondition(conditionMap); |
| | | qtl.setCondition(condition); |
| | | //HashMap<String, String> indexmap = new HashMap<String, String>(); |
| | | BusinessObject findBTMObjects[] = platformClientUtil.getQueryService().findBTMObjects(qtl.getId(), OQTool.qtTOXMl(qtl).asXML()); |
| | | List<IndexObject> indexObjects = new ArrayList<>(); |
| | | for (int i = 0; i < findBTMObjects.length; i++) { |
| | | BusinessObject findBTMObject = findBTMObjects[i]; |
| | | TypeIndexDef[] typenames = ClientServiceProvider.getOMDService().getTypeIndexService().getBTIndexDefs(conditionMap.get("typename")); |
| | | |
| | | for (int i = 0; i < typenames.length; i++) { |
| | | TypeIndexDef typename = typenames[i]; |
| | | IndexObject indexObject = new IndexObject(); |
| | | indexObject.setOid(findBTMObject.oid); |
| | | indexObject.setDescription(findBTMObject.description); |
| | | indexObject.setCreateTime(Func.format(new Date(findBTMObject.createTime), DateUtil.PATTERN_DATE)); |
| | | indexObject.setIndexName(ObjectTool.getBOAttributeValue(findBTMObject, "indexname")); |
| | | indexObject.setTypeName(ObjectTool.getBOAttributeValue(findBTMObject, "typename")); |
| | | indexObject.setAttrNames(ObjectTool.getBOAttributeValue(findBTMObject, "attrname")); |
| | | indexObject.setOid(typename.oid); |
| | | indexObject.setDescription(typename.description); |
| | | indexObject.setCreateTime(Func.format(new Date(typename.createTime), DateUtil.PATTERN_DATE)); |
| | | indexObject.setIndexName(typename.name); |
| | | indexObject.setTypeName(typename.typeName); |
| | | indexObject.setAttrNames(typename.attributes); |
| | | indexObjects.add(indexObject); |
| | | } |
| | | return indexObjects; |
| | |
| | | @Override |
| | | public boolean delIndex(String btmName, String indexName) throws PLException { |
| | | VciBaseUtil.alertNotNull(btmName, "ä¸å¡ç±»åå", indexName, "ç´¢å¼å"); |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("typename", btmName); |
| | | conditionMap.put("indexname", indexName); |
| | | List<IndexObject> bo2 = getIndexByCondition(conditionMap); |
| | | if (bo2 != null && bo2.size() > 0) { |
| | | TypeIndexDef[] typeIndexDef= ClientServiceProvider.getOMDService().getTypeIndexService().getBTIndexDefs(btmName); |
| | | if( typeIndexDef != null && typeIndexDef.length > 0 ){ |
| | | String[] indexAttr = {indexName}; |
| | | |
| | | boolean alterFlag = platformClientUtil.getBtmService().dropIndex(btmName, indexAttr); |
| | |
| | | if (!alterFlag) { |
| | | return false; |
| | | } |
| | | for (int i = 0; i < bo2.size(); i++) { |
| | | String oid = bo2.get(i).getOid(); |
| | | BusinessObject bo = platformClientUtil.getBOFactoryService().readBusinessObject(oid, "indexobject"); |
| | | platformClientUtil.getBOFactoryService().deleteBusinessObject(bo, 1); |
| | | for (int i = 0; i < typeIndexDef.length; i++) { |
| | | if(!typeIndexDef[i].name.equals(indexName)) { |
| | | continue; |
| | | } |
| | | String oid = typeIndexDef[i].oid; |
| | | ClientServiceProvider.getOMDService().getTypeIndexService().delIndexDef(oid); |
| | | } |
| | | } |
| | | return true; |
| | |
| | | String btmName = indexObjectList.get(0).getTypeName(); |
| | | String indexNames = indexObjectList.stream().map(IndexObject::getIndexName).collect(Collectors.joining(",")); |
| | | String[] oldindexAttr = {indexNames}; |
| | | BusinessObject bo; |
| | | List<BusinessObject> boList = new ArrayList<>(); |
| | | //å
æ¥è¯¢å½åæ·»å ç´¢å¼æ¯å¦å·²ç»åå¨ï¼å¦æåå¨å°±å
å é¤åæ°å¢å®ç°æ¿æ¢æä½ |
| | | Map<String, String> conditionMap = new HashMap<>(); |
| | | conditionMap.put("typename", btmName); |
| | | //å
è¿æ ·å¤çï¼å端ç°å¨åªåäºå次ä¿åï¼æä»¥ä¸ç¨in |
| | | conditionMap.put("indexname", indexNames); |
| | | List<IndexObject> indexObjects = getIndexByCondition(conditionMap); |
| | | if (indexObjects != null && indexObjects.size() > 0) { |
| | | //ç´¢å¼ä¸å卿¶å é¤å°±ä¼æ¥éç´¢å¼ä¸åå¨ï¼æä»¥è¿éæç´¢å¼æå»å é¤ |
| | | boolean b = platformClientUtil.getBtmService().dropIndex(btmName, oldindexAttr); |
| | | if (b) { |
| | | for (int i = 0; i < indexObjects.size(); i++) { |
| | | String oid = (String) indexObjects.get(i).getOid(); |
| | | bo = platformClientUtil.getBOFactoryService().readBusinessObject(oid, "indexobject"); |
| | | platformClientUtil.getBOFactoryService().deleteBusinessObject(bo, 1); |
| | | } |
| | | } |
| | | } |
| | | // BusinessObject bo; |
| | | // List<BusinessObject> boList = new ArrayList<>(); |
| | | // //å
æ¥è¯¢å½åæ·»å ç´¢å¼æ¯å¦å·²ç»åå¨ï¼å¦æåå¨å°±å
å é¤åæ°å¢å®ç°æ¿æ¢æä½ |
| | | // Map<String, String> conditionMap = new HashMap<>(); |
| | | // conditionMap.put("typename", btmName); |
| | | // //å
è¿æ ·å¤çï¼å端ç°å¨åªåäºå次ä¿åï¼æä»¥ä¸ç¨in |
| | | // conditionMap.put("indexname", indexNames); |
| | | TypeIndexDef[] typeIndexDefs = platformClientUtil.getTypeIndexService().getBTIndexDefs(btmName); |
| | | |
| | | for (int i = 0; i < indexObjectList.size(); i++) { |
| | | IndexObject indexObject = indexObjectList.get(i); |
| | | //bo = platformClientUtil.getBOFService().initBusinessObject("indexobject"); |
| | | bo = boService.createCBOByBtmName("indexobject"); |
| | | List<AttributeValue> attributeValues = new ArrayList<>(); |
| | | attributeValues.add(new AttributeValue("typename", btmName)); |
| | | attributeValues.add(new AttributeValue("indexname", indexObject.getIndexName())); |
| | | attributeValues.add(new AttributeValue("attrname", indexObject.getAttrNames())); |
| | | bo.newAttrValList = attributeValues.toArray(new AttributeValue[attributeValues.size()]); |
| | | bo.description = indexObject.getDescription(); |
| | | String[] indexAttr = {indexObject.getIndexName(), indexObject.getAttrNames()}; |
| | | //ç»æå®ä¸å¡ç±»åçæå®å±æ§åå»ºç´¢å¼ |
| | | boolean alterFlag = platformClientUtil.getBtmService().addIndex(btmName, indexAttr); |
| | | //ç´¢å¼å建æåä¹åï¼éè¦å卿åç´¢å¼å°ç´¢å¼è¡¨ä¸ |
| | | if (!alterFlag) { |
| | | return false; |
| | | if(typeIndexDefs!=null && typeIndexDefs.length>0){ |
| | | boolean hasIndex = false; |
| | | for(int i = 0; i < typeIndexDefs.length; i ++){ |
| | | if(!typeIndexDefs[i].name.equals(indexNames)) { |
| | | continue; |
| | | } |
| | | String oid = typeIndexDefs[i].oid; |
| | | platformClientUtil.getTypeIndexService().delIndexDef(oid); |
| | | hasIndex = true; |
| | | } |
| | | boList.add(bo); |
| | | //æ·»å ç´¢å¼ä¿¡æ¯å°ç´¢å¼çä¸å¡è¡¨ä¸ |
| | | //platformClientUtil.getBOFactoryService().createBusinessObject(bo,false,false); |
| | | //ç´¢å¼ä¸å卿¶å é¤å°±ä¼æ¥éç´¢å¼ä¸åå¨ï¼æä»¥è¿éæç´¢å¼æå»å é¤ |
| | | if(hasIndex) { |
| | | platformClientUtil.getBtmService().dropIndex(btmName, oldindexAttr); |
| | | } |
| | | } |
| | | //æ·»å ç´¢å¼ä¿¡æ¯å°ç´¢å¼çä¸å¡è¡¨ä¸ |
| | | platformClientUtil.getBOFactoryService().batchCreateBusinessObject(boList.toArray(new BusinessObject[boList.size()]), false, false); |
| | | StringBuilder sb = new StringBuilder(); |
| | | List<TypeIndexDef> saveDefs = new ArrayList<>(); |
| | | for(int i = 0; i < indexObjectList.size(); i ++){ |
| | | TypeIndexDef saveDef = new TypeIndexDef(); |
| | | saveDef.typeName = indexObjectList.get(i).getTypeName(); |
| | | saveDef.name = indexObjectList.get(i).getIndexName(); |
| | | saveDef.description = indexObjectList.get(i).getDescription(); |
| | | saveDef.attributes = indexObjectList.get(i).getAttrNames(); |
| | | sb.append(indexObjectList.get(i).getAttrNames()); |
| | | if(i<indexObjectList.size()-1){ |
| | | sb.append(","); |
| | | } |
| | | saveDefs.add(saveDef); |
| | | } |
| | | String[] indexAttr = {indexObjectList.get(0).getIndexName(),sb.toString()}; |
| | | boolean alterFlag = platformClientUtil.getBtmService().addIndex(btmName, indexAttr); |
| | | if(!alterFlag) { |
| | | return false; |
| | | } |
| | | ClientServiceProvider.getOMDService().getTypeIndexService().saveIndexDefs(saveDefs.toArray(new TypeIndexDef[saveDefs.size()])); |
| | | return true; |
| | | } |
| | | |
| | |
| | | icon.content = iconContent; |
| | | icon.type = type; |
| | | icon.groups = groups; |
| | | icon.plModifyUser = WebUtil.getCurrentUserId(); |
| | | updateList.add(icon); |
| | | }else{ |
| | | PLIcon icon = new PLIcon(); |
| | |
| | | icon.content = iconContent; |
| | | icon.type = type; |
| | | icon.groups = groups; |
| | | icon.plCreateUser = WebUtil.getCurrentUserId(); |
| | | addList.add(icon); |
| | | } |
| | | } |
| | |
| | | plIcon.content = iconContent; |
| | | plIcon.type = iconDTO.getType(); |
| | | plIcon.groups = iconDTO.getGroups(); |
| | | |
| | | plIcon.plCreateUser = WebUtil.getCurrentUserId(); |
| | | plIcon.plModifyUser = WebUtil.getCurrentUserId(); |
| | | try { |
| | | PortalServicePrx portalServicePrx = platformClientUtil.getPortalService(); |
| | | portalServicePrx.savePLIcon(plIcon); |
| | |
| | | plIcon.content = iconContent; |
| | | plIcon.type = iconDTO.getType(); |
| | | plIcon.groups = iconDTO.getGroups(); |
| | | plIcon.plCreateUser = iconDTO.getPlCreateUser(); |
| | | plIcon.plCreateTime = iconDTO.getPlCreateTime(); |
| | | plIcon.plModifyUser = WebUtil.getCurrentUserId(); |
| | | portalServicePrx.updatePLIcon(plIcon); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | |
| | | vo.setContent(icon.content); |
| | | vo.setType(icon.type); |
| | | vo.setGroups(icon.groups); |
| | | vo.setPlCreateTime(icon.plCreateTime); |
| | | vo.setPlCreateUser(icon.plCreateUser); |
| | | vo.setPlModifyTime(icon.plModifyTime); |
| | | vo.setPlModifyUser(icon.plModifyUser); |
| | | String[] nameArr = icon.name.split(":"); |
| | | if(nameArr.length > 1){ |
| | | vo.setLable(nameArr[0]); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function getProcessTempList(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/getPvolumesPage", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | export function saveProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/savePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function updateProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/updatePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function deleteProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/deletePvolume", |
| | | method: "delete", |
| | | params |
| | | }) |
| | | } |
| | | // å¯¼åº |
| | | export function download (params) { |
| | | return request({ |
| | | url: '/api/webEnumController/exportEnumTypes', |
| | | method: 'get', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | export function downloadTemplate (params) { |
| | | return request({ |
| | | url: '/api/webEnumController/downloadEnumTemplate', |
| | | method: 'get', |
| | | headers: {'Content-Type': 'application/x-www-form-urlencoded;charset=UTF-8'}, |
| | | responseType: 'blob', |
| | | params |
| | | }) |
| | | } |
| | | |
| | | // åç¨å¯ç¨ |
| | | export function stopProcessTemp(params) { |
| | | return request({ |
| | | url: "/api/userQueryController/stopUsers", |
| | | method: "post", |
| | | params |
| | | }); |
| | | } |
¶Ô±ÈÐÂÎļþ |
| | |
| | | import request from '@/router/axios'; |
| | | |
| | | // å表æ¥è¯¢ |
| | | export function getTypeList(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/getPvolumesPage", |
| | | method: "get", |
| | | params |
| | | }); |
| | | } |
| | | export function saveType(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/savePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function updateType(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/updatePvolume", |
| | | method: "post", |
| | | data: params |
| | | }); |
| | | } |
| | | export function deleteType(params) { |
| | | return request({ |
| | | url: "/api/pvolumesController/deletePvolume", |
| | | method: "delete", |
| | | params |
| | | }) |
| | | } |
| | |
| | | <template> |
| | | <!--å¨ææ¨¡æ¿--> |
| | | <avue-form ref="form" :option="option" v-model="form" v-loading="loading"> |
| | | <avue-form ref="basicform" :option="option" v-model="form" v-loading="loading"> |
| | | <template v-for="item in allColumn" :slot="item.prop+ ''"> |
| | | <vciWebRefer |
| | | v-if="item.type === 'refer'" |
| | |
| | | // è¡¨åæ ¡éª |
| | | validate(done) { |
| | | return new Promise((resolve) => { |
| | | this.$refs.form.validate((valid,fields) => { |
| | | this.$refs.basicform.validate((valid,fields) => { |
| | | done(valid,fields); |
| | | if (valid) { |
| | | resolve(true); |
| | |
| | | }); |
| | | }, |
| | | resetFields(){ |
| | | this.$refs.form.resetFields() |
| | | this.$refs.basicform.resetFields() |
| | | }, |
| | | clearValidate(props){ |
| | | this.$refs.form.clearValidate(props) |
| | | this.$refs.basicform.clearValidate(props) |
| | | }, |
| | | updateDic(prop,data){ |
| | | this.$refs.form.updateDic(prop,data) |
| | | this.$refs.basicform.updateDic(prop,data) |
| | | }, |
| | | dicInit(){ |
| | | this.$refs.basicform.dicInit() |
| | | }, |
| | | getPropRef(){ |
| | | this.$refs.basicform.getPropRef() |
| | | } |
| | | }, |
| | | }; |
| | |
| | | return new Promise((resolve) => { |
| | | getButtons().then(res => { |
| | | const data = res.data.data; |
| | | console.log('getButton', data) |
| | | commit('SET_PERMISSION', data); |
| | | resolve(); |
| | | }) |
| | |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | /**å³ä¾§ä¾§æä½æ **/ |
| | | .avue-crud__right{ |
| | | display: flex; |
| | | align-items: center; |
| | | } |
| | | /**表å
æä½æ **/ |
| | | .avue-crud .avue-crud__menu{ |
| | | min-height: 18px; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | justify-content: flex-start; |
| | | } |
| | | .avue-crud .avue-crud__menu .el-button{ |
| | | |
| | | } |
| | | .avue-crud .avue-crud__menu .el-button--text{ |
| | | padding: 2px 6px; |
| | | padding: 2px 3px; |
| | | display: flex; |
| | | } |
| | | .avue-crud .avue-crud__menu .el-button--text > span { |
| | |
| | | font-size: 12px !important; |
| | | width: 12px !important; |
| | | height: 12px !important; |
| | | margin-right: 6px; |
| | | margin-right: 2px; |
| | | } |
| | | |
| | | .el-table td.el-table__cell div.iconShow{ |
| | |
| | | width: 14px !important; |
| | | height: 14px !important; |
| | | margin-top: -1px; |
| | | margin-right: 3px; |
| | | margin-right: 1px; |
| | | } |
| | | |
| | | /* |
| | |
| | | </el-form> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="addEscHandler">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="addEscHandler">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!--导å
¥ --> |
| | |
| | | </avue-crud> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button @click="addDialogClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="addDialogClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | > |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button @click="dialogAttrClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogAttrClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | :table-loading="conCheckLoading"> |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | <el-button @click="conCheckVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | <el-button size="small" @click="conCheckVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </span> |
| | | </el-dialog> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="indexClickAddHandler">ä¿ å</el-button> |
| | | <el-button @click="indexDialogClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="indexClickAddHandler">ä¿ å</el-button> |
| | | <el-button size="small" @click="indexDialogClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="rowSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="dialogVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="rowSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | |
| | | prop="name"> |
| | | </el-table-column> |
| | | <el-table-column |
| | | fixed="right" |
| | | label="æä½" |
| | | width="60"> |
| | | <template slot-scope="scope"> |
| | |
| | | </avue-crud> |
| | | </div> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button @click="addDialogClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addDialogSavaHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="addDialogClose">å æ¶</el-button> |
| | | </span> |
| | | |
| | | <!-- 屿§æ± å表 --> |
| | |
| | | > |
| | | </avue-crud> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button @click="dialogAttrClose">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="dialogAttrAddClickHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogAttrClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | </el-dialog> |
| | |
| | | :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> |
| | | <el-button size="small" @click="conCheckVisible = false">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="repairClickHandler">ä¿® å¤</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </avue-crud> |
| | | |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button @click="bizTypeVisible = false">å æ¶</el-button> |
| | | <el-button type="primary" @click="bizTypeAddHandler">ç¡® å®</el-button> |
| | | <el-button size="small" type="primary" @click="bizTypeAddHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="bizTypeVisible = false">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | </el-row> |
| | | </el-form> |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button @click="visibleCloseHandler">å æ¶</el-button> |
| | | <el-button size="small" type="primary" @click="addSaveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="visibleCloseHandler">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | |
| | |
| | | width="1620px" |
| | | @close="cancelDialog"> |
| | | <div style="min-height: 665px;max-height: 85vh;padding-bottom: 50px;"> |
| | | <basic-form key="linkQueryForm" ref="form" |
| | | <basic-form key="businessQueryForm" ref="form" |
| | | :formData="form" |
| | | :formItems="formItems" |
| | | :span="4" |
| | |
| | | return false; |
| | | }, |
| | | allowDrag: (dropNode) => { |
| | | if (dropNode.data.attrs && dropNode.data.attrs.length > 0) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | return true; |
| | | }, |
| | | props: { |
| | | label: 'name', |
| | |
| | | this.$refs.form.validate((valid) => { |
| | | if (valid) { |
| | | const formData = this.initFormData(); |
| | | console.log(formData) |
| | | btmSave(formData).then(res => { |
| | | if (res.data.success) { |
| | | this.$message.success("ä¿åæå"); |
| | |
| | | this.orderFieldList.unshift({ |
| | | id: data.row.orderField |
| | | }); |
| | | this.tableFormOption.column[0].dicData = this.orderFieldList |
| | | this.$refs.tableForm.updateDic('orderField',this.orderFieldList); |
| | | }, |
| | | //è·åæåºè®¾ç½®ä¸æææåºå段 |
| | | getAllAttr() { |
| | |
| | | }, |
| | | businessQueryDefineChange(data) { |
| | | if (data.value) { |
| | | this.businessTreeData = [{ |
| | | name: data.value, |
| | | attrs: data.item.attrs |
| | | }] |
| | | this.businessTreeData = [data.item] |
| | | } |
| | | }, |
| | | // å¼å§ææ½æ èç¹äºä»¶ |
| | |
| | | @row-click="rowClick" |
| | | :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> |
| | | </avue-crud> |
| | | <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> |
| | | <!--导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="uploadCallBack"></upload-file> |
| | | |
| | | <div> |
| | | <fieldset> |
| | | <legend> æ¥è¯¢æ¡ä»¶ </legend> |
| | |
| | | ></form-query-dialog> |
| | | </fieldset> |
| | | </div> |
| | | <!--æ·»å ä¿®æ¹å¼¹çª--> |
| | | <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> |
| | | <!--导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="uploadCallBack"></upload-file> |
| | | </basic-container> |
| | | </el-main> |
| | | |
| | |
| | | selection: true, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: 300, |
| | | calcHeight: 305, |
| | | tip: false, |
| | | header:false, |
| | | column: [{ |
| | |
| | | }, |
| | | // æ ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTemp(); |
| | | if(row.oid=="topNode"){ |
| | | this.nodeRow = null; |
| | | this.crudData=[]; |
| | | this.queryCondition=[]; |
| | | this.queryTree={}; |
| | | this.levelFlag=0; |
| | | }else{ |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTemp(); |
| | | } |
| | | }, |
| | | //模æ¿åè¡¨æ°æ® |
| | | getTemp() { |
| | |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .el-main .avue-crud .avue-crud__body .el-card__body .el-form .el-table--small{ |
| | | min-height: 300px; |
| | | } |
| | | } |
| | | fieldset { |
| | | padding: 10px 6px; |
| | |
| | | <el-dialog v-dialogDrag |
| | | :title="dialog.title" |
| | | :visible.sync="dialog.showDialog" |
| | | width="1620px" |
| | | width="1650px" |
| | | :append-to-body="true" |
| | | class="avue-dialog" |
| | | :destroy-on-close="true" |
| | |
| | | prop: 'qtName', |
| | | type: 'input', |
| | | span:4.5, |
| | | labelWidth: 100, |
| | | labelWidth: 110, |
| | | rules: [{ |
| | | required: true, |
| | | message: "请è¾å
¥æ¥è¯¢æ¨¡æ¿åç§°", |
| | |
| | | }, { |
| | | label: 'åå', |
| | | value: 'opposite' |
| | | }] |
| | | }], |
| | | control: (val, form) => { |
| | | const dicData=this.getDicData(val); |
| | | this.form.btmType=dicData[0].value |
| | | return { |
| | | btmType: { |
| | | dicData: dicData |
| | | } |
| | | }; |
| | | } |
| | | },{ |
| | | label: 'ä¸å¡ç±»å', |
| | | prop: 'btmType', |
| | | type: 'select', |
| | | labelWidth:110, |
| | | dicData: [] |
| | | clearable:false, |
| | | rules: [{ |
| | | required: true, |
| | | message: "è¯·éæ©ä¸å¡ç±»å", |
| | | trigger: "blur" |
| | | }], |
| | | dicData: [], |
| | | change: ({ value, column, item, dic }) => { |
| | | this.form.btmType=value; |
| | | if(value){ |
| | | this.getAllAttr(); |
| | | this.getTemp(value,false); |
| | | } |
| | | }, |
| | | }, { |
| | | label: 'çæ¬çæ¬¡', |
| | | prop: 'version', |
| | |
| | | return false; |
| | | }, |
| | | allowDrag: (dropNode) => { |
| | | if (dropNode.data.attrs && dropNode.data.attrs.length>0) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | return true; |
| | | }, |
| | | props:{ |
| | | label:'name', |
| | |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | //æ¹å |
| | | 'form.direction': { |
| | | handler(val) { |
| | | if(val=='positive'){ |
| | | //æ£å |
| | | const dicData=this.treeData.btmItemsTo.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | dicData.push({ |
| | | label: 'ææç±»å', |
| | | value: '*' |
| | | }) |
| | | this.$refs.form.updateDic('btmType', dicData); |
| | | this.form.btmType=dicData[0].value |
| | | this.getAllAttr(); |
| | | }else if(val=='opposite'){ |
| | | //åå |
| | | const dicData=this.treeData.btmItemsFrom.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | dicData.push({ |
| | | label: 'ææç±»å', |
| | | value: '*' |
| | | }) |
| | | this.$refs.form.updateDic('btmType', dicData); |
| | | this.form.btmType=dicData[0].value |
| | | this.getAllAttr(); |
| | | } |
| | | }, |
| | | immediate: true, |
| | | }, |
| | | //ä¸å¡ç±»å |
| | | 'form.btmType': { |
| | | handler(val) { |
| | | if(val && val!='*'){ |
| | | this.getTemp(val,false); |
| | | } |
| | | }, |
| | | immediate: true, |
| | | } |
| | | }, |
| | | watch: {}, |
| | | methods: { |
| | | openDialog(btmName, title, mode, data) { |
| | | this.dialog.title = title; |
| | |
| | | this.queryCondition=this.selectData.queryTemplate.condition; |
| | | this.queryTree=this.selectData.tree; |
| | | this.form.levelFlag=this.selectData.levelFlag; |
| | | |
| | | const dicData=this.getDicData(this.form.direction); |
| | | this.formItems[2].dicData=dicData; |
| | | } else { |
| | | this.form.direction='positive'; |
| | | this.selectData = {}; |
| | | this.orderInfoList = []; |
| | | this.queryCondition=[]; |
| | |
| | | connector:'å¹¶ä¸', |
| | | child:[] |
| | | }; |
| | | const dicData=this.getDicData(this.form.direction); |
| | | this.formItems[2].dicData=dicData; |
| | | this.form.btmType=dicData[0].value; |
| | | } |
| | | this.dialog.showDialog = true; |
| | | this.treeOption.defaultExpandedKeys=[data.treeData.label] |
| | | this.getTemp(data.treeData.label, true) |
| | | |
| | | }, |
| | | //è·åä¸å¡ç±»åä¸ææ°æ® |
| | | getDicData(directionVal){ |
| | | let dicData=[]; |
| | | if(directionVal=='positive'){ |
| | | //æ£å |
| | | dicData=this.treeData.btmItemsTo.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | }else if(directionVal=='opposite'){ |
| | | //åå |
| | | dicData=this.treeData.btmItemsFrom.map(item=>{ |
| | | return { |
| | | label: item, |
| | | value: item |
| | | } |
| | | }) |
| | | } |
| | | dicData.push({ |
| | | label: 'ææç±»å', |
| | | value: '*' |
| | | }) |
| | | return dicData; |
| | | }, |
| | | cancelDialog() { |
| | | this.dialog.loading = false; |
| | |
| | | this.orderFieldList.unshift({ |
| | | id: data.row.orderField |
| | | }); |
| | | this.tableFormOption.column[0].dicData= this.orderFieldList |
| | | this.$refs.tableForm.updateDic('orderField',this.orderFieldList); |
| | | }, |
| | | //è·åæåºè®¾ç½®ä¸æææåºå段 |
| | | getAllAttr() { |
| | |
| | | }, |
| | | linkQueryDefineChange(data) { |
| | | if (data.value) { |
| | | this.linkTreeData = [{ |
| | | name: data.value, |
| | | attrs: data.item.attrs |
| | | }] |
| | | this.linkTreeData = [ data.item] |
| | | } |
| | | }, |
| | | businessQueryDefineChange(data) { |
| | | if (data.value) { |
| | | this.businessTreeData = [{ |
| | | name: data.value, |
| | | attrs: data.item.attrs |
| | | }] |
| | | this.businessTreeData = [ data.item] |
| | | } |
| | | }, |
| | | // å¼å§ææ½æ èç¹äºä»¶ |
| | |
| | | style="width: 32%;display: inline-block;text-align: right;word-break: break-all">{{ condition.clause }}</span> |
| | | <avue-select v-model="condition.operator" :clearable="false" :dic="condition.operatorDic" :disabled="readOnly" |
| | | style="width: 80px;margin: 0 5px;" type="tree"></avue-select> |
| | | <!--<el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" :disabled="readOnly" |
| | | style="width:300px;margin-right: 5px;display: inline-block;" type="date" |
| | | <el-date-picker v-if="condition.type=='VTDate'" v-model="condition.ordinaryValue" :disabled="readOnly" |
| | | style="width:36%;margin-right: 5px;display: inline-block;" type="date" |
| | | value-format="YYYY-MM-DD"> |
| | | </el-date-picker> |
| | | <el-date-picker v-else-if="condition.type=='VTDateTime'" v-model="condition.ordinaryValue" :disabled="readOnly" |
| | | style="width:300px;margin-right: 5px;display: inline-block;" |
| | | style="width:36%;margin-right: 5px;display: inline-block;" |
| | | type="datetime"> |
| | | </el-date-picker> |
| | | <el-time-select v-else-if="condition.type=='VTTime'" v-model="condition.ordinaryValue" :disabled="readOnly" |
| | | style="width:300px;margin-right: 5px;display: inline-block;" value-format="HH:mm:ss"> |
| | | style="width:36%;margin-right: 5px;display: inline-block;" value-format="HH:mm:ss"> |
| | | </el-time-select> |
| | | <avue-input-number v-else-if="condition.type=='VTInteger'" v-model="condition.ordinaryValue" |
| | | <!--<avue-input-number v-else-if="condition.type=='VTInteger'" v-model="condition.ordinaryValue" |
| | | :disabled="readOnly" |
| | | precision="0" |
| | | style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> |
| | |
| | | style="width:300px;margin-right: 5px;display: inline-block;"></avue-input-number> |
| | | <avue-input v-else v-model="condition.ordinaryValue" :disabled="readOnly" placeholder="" |
| | | style="width: 300px;margin-right: 5px;"></avue-input>--> |
| | | <avue-input v-model="condition.ordinaryValue" :disabled="readOnly" placeholder="" |
| | | <avue-input v-else v-model="condition.ordinaryValue" :disabled="readOnly" placeholder="" |
| | | style="width: 36%;margin-right: 5px;"></avue-input> |
| | | <el-button v-if="!readOnly" plain size="mini" type="primary" @click="checkTemp(index)">éæ©æ¥è¯¢æ¨¡æ¿</el-button> |
| | | <el-button v-if="!readOnly" icon="el-icon-delete" size="mini" style="padding: 7px 8px" type="danger" |
| | |
| | | @node-click="nodeClick"></avue-tree> |
| | | </div> |
| | | <div v-if="!readOnly" style="text-align: right;margin-top: 10px;"> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="addHandler">å¢å é»è¾</el-button> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="editHandler">ä¿®æ¹æ¡ä»¶</el-button> |
| | | <el-button v-if="radioForm==1" plain size="mini" type="primary" @click="delHandler">å é¤</el-button> |
| | | <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="addHandler">å¢å é»è¾</el-button> |
| | | <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="editHandler">ä¿®æ¹æ¡ä»¶</el-button> |
| | | <el-button v-show="radioForm==1" plain size="mini" type="primary" @click="delHandler">å é¤</el-button> |
| | | <el-button plain size="mini" type="primary" @click="queryHandler">æ¥è¯¢</el-button> |
| | | <el-button plain size="mini" type="primary" @click="">åæ¶</el-button> |
| | | <!--<el-button plain size="mini" type="primary" @click="">åæ¶</el-button>--> |
| | | </div> |
| | | |
| | | <!--ä¿®æ¹æ¡ä»¶--> |
| | |
| | | <script> |
| | | import basicOption from "@/util/basic-option"; |
| | | import {getAllQTs} from "@/api/queryTemplate/queryDefine"; |
| | | import {getCriteria} from "@/api/queryTemplate/linkTypeQuery"; |
| | | import {dateFormat} from "@/util/date" |
| | | |
| | | export default { |
| | |
| | | } |
| | | }, |
| | | created() { |
| | | this.getTemp(); |
| | | if (!this.readOnly) { |
| | | this.getTemp(); |
| | | } |
| | | }, |
| | | methods: { |
| | | // ææ½å°æ¶ |
| | |
| | | //éæ©æ¥è¯¢æ¨¡æ¿ |
| | | checkTemp(index) { |
| | | if (index >= 0) { |
| | | if (['VTInteger', 'VTDouble', 'VTLong', 'VTDateTime', 'VTDate', 'VTTime'].includes(this.conditionList[index].type)) { |
| | | if (['VTDateTime', 'VTDate', 'VTTime'].includes(this.conditionList[index].type)) { |
| | | this.$message.warning("è¯¥å±æ§ç±»åä¸è½éæ©æ¥è¯¢æ¨¡æ¿"); |
| | | return false; |
| | | } |
| | | } |
| | |
| | | <avue-crud ref="crud" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClick" |
| | | :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px"> |
| | | :data="crudData" :option="crudOption" :table-loading="tableLoading" style="margin-top: 10px;"> |
| | | </avue-crud> |
| | | <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> |
| | | <!--导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="uploadCallBack"></upload-file> |
| | | <div> |
| | | <fieldset> |
| | | <legend> æ¥è¯¢æ¡ä»¶ </legend> |
| | |
| | | ></form-query-dialog> |
| | | </fieldset> |
| | | </div> |
| | | <!--æ·»å ä¿®æ¹å¼¹çª--> |
| | | <form-dialog ref="formRef" @refresh="getTemp"></form-dialog> |
| | | <!--导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥" |
| | | @updata="uploadCallBack"></upload-file> |
| | | </basic-container> |
| | | </el-main> |
| | | </el-container> |
| | |
| | | selection: true, |
| | | menu: false, |
| | | height: "auto", |
| | | calcHeight: 300, |
| | | calcHeight: 305, |
| | | tip: false, |
| | | header:false, |
| | | column: [{ |
| | |
| | | prop: 'btmType', |
| | | width: 130, |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.btmType; |
| | | if (row.queryTemplate.btmType == '*') { |
| | | return 'ææç±»å' |
| | | } else { |
| | | return row.queryTemplate.btmType; |
| | | } |
| | | } |
| | | }, { |
| | | label: 'çæ¬çæ¬¡', |
| | |
| | | prop: 'queryISLeaf', |
| | | width: 120, |
| | | formatter:function (row, value) { |
| | | return row.queryTemplate.queryISLeaf |
| | | if(row.queryTemplate.queryISLeaf=='false' || row.queryTemplate.queryISLeaf==false){ |
| | | return 'å¦' |
| | | }else{ |
| | | return 'æ¯' |
| | | } |
| | | } |
| | | }, { |
| | | label: 'åèç¹å±æ¬¡æ°', |
| | |
| | | |
| | | // æ ç¹å» |
| | | nodeClick(row) { |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTemp(); |
| | | if(row.oid=="topNode"){ |
| | | this.nodeRow = null; |
| | | this.crudData=[]; |
| | | this.queryCondition=[]; |
| | | this.queryTree={}; |
| | | this.levelFlag=0; |
| | | }else{ |
| | | this.nodeRow = row; |
| | | this.tableLoading = true; |
| | | this.getTemp(); |
| | | } |
| | | }, |
| | | //è·åæ¥è¯¢æ¨¡æ¿å表 |
| | | getTemp() { |
| | |
| | | .el-scrollbar__wrap { |
| | | overflow: auto !important; |
| | | } |
| | | .el-main .avue-crud .avue-crud__body .el-card__body .el-form .el-table--small{ |
| | | min-height: 300px; |
| | | } |
| | | } |
| | | |
| | | fieldset { |
| | |
| | | @selection-change="selectChangeHandler" |
| | | @row-click="rowClickHandler"> |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutAddBtn" class="button-custom-icon" plain size="small" |
| | | type="primary" |
| | | @click="addClickHandler"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutAddBtn.source"></icon-show> |
| | | å¢å |
| | |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutDesignBtn.source"></icon-show> |
| | | æé®è®¾è®¡ |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" size="small" type="text" @click="editBtnClick(scope.row)"> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutEditBtn" size="small" type="text" |
| | | @click="editBtnClick(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutEditBtn.source"></icon-show> |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" size="small" type="text" @click="rowDeleteHandler(scope.row)"> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutDelBtn" size="small" type="text" |
| | | @click="rowDeleteHandler(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutDelBtn.source"></icon-show> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" size="small" type="text" @click="rowCloneHandler(scope.row)"> |
| | | <el-button v-if="permissionChildrenList.UiPageLayoutCloneBtn" size="small" type="text" |
| | | @click="rowCloneHandler(scope.row)"> |
| | | <icon-show :name="permissionChildrenList.UiPageLayoutCloneBtn.source"></icon-show> |
| | | å
é |
| | | </el-button> |
| | |
| | | <el-container v-loading="dialogLoading"> |
| | | <el-header style="height: 40px !important;padding-left: 5px;"> |
| | | <div style="display: flex"> |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="addClickBtnHandler">æ·»å |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" |
| | | @click="addClickBtnHandler">æ·»å |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" @click="editClickBtnHandler">ä¿®æ¹ |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="primary" |
| | | @click="editClickBtnHandler">ä¿®æ¹ |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" @click="delClickBtnHandler">å é¤ |
| | | <el-button v-show="disabledBtn" :disabled="!disabledBtn" plain size="mini" type="danger" |
| | | @click="delClickBtnHandler">å é¤ |
| | | </el-button> |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-check" type="success" @click="saveClickBtnHandler">ä¿å |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-check" plain size="mini" |
| | | type="success" @click="saveClickBtnHandler">ä¿å |
| | | </el-button> |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" plain size="mini" icon="el-icon-close" type="danger" @click="escClickBtnHandler">åæ¶ |
| | | <el-button v-show="!disabledBtn" :disabled="disabledBtn" icon="el-icon-close" plain size="mini" |
| | | type="danger" @click="escClickBtnHandler">åæ¶ |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">è°æ´ä¸ºä¸çº§æé®</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">è°æ´ä¸ºä¸çº§æé®</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">å¤å¶å°å
¶ä»ç»ä»¶</el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeBottomBtnHandler">è°æ´ä¸ºä¸çº§æé® |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="changeTopBtnHandler">è°æ´ä¸ºä¸çº§æé® |
| | | </el-button> |
| | | <el-button v-show="disabledBtn" plain size="mini" type="primary" @click="cloneClickBtnHandler">å¤å¶å°å
¶ä»ç»ä»¶ |
| | | </el-button> |
| | | </div> |
| | | </el-header> |
| | | <el-container> |
| | |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="åç§°ï¼" prop="label"> |
| | | <el-form-item label="åç§°ï¼" prop="label"> |
| | | <el-input v-model="basicForm.label" :disabled="disabledBtn"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12"> |
| | | <el-form-item label="Actionï¼" prop="actionName"> |
| | | <el-input v-model="basicForm.actionName" :disabled="disabledBtn" :clearable="true" @focus="actionFoucus" @clear="clearActionValue"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" @click="actionFoucus"></i> |
| | | <el-input v-model="basicForm.actionName" :clearable="true" :disabled="disabledBtn" |
| | | @clear="clearActionValue" @focus="actionFoucus"> |
| | | <i slot="suffix" class="el-input__icon el-icon-search" style="cursor: pointer" |
| | | @click="actionFoucus"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col :span="12" v-show="basicForm.show=='0'"> |
| | | <el-col v-show="basicForm.show=='0'" :span="12"> |
| | | <el-form-item label="æ¾ç¤ºæ¹å¼ï¼" prop="showType"> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="text">æå</el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="image">徿 </el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">æåå徿 </el-radio> |
| | | <el-radio v-model="basicForm.displayMode" :disabled="disabledBtn" label="textandimage">æåå徿 |
| | | </el-radio> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="24" v-show="basicForm.show=='0' && (basicForm.displayMode=='image'||basicForm.displayMode=='textandimage')"> |
| | | <el-form-item label="徿 ï¼" prop="iconPath"> |
| | | <el-form-item :class="basicForm.displayMode==='image'?'is-required':''" label="徿 ï¼" prop="iconPath"> |
| | | <input-icon v-model="basicForm.iconPath" :disabled="disabledBtn"></input-icon> |
| | | </el-form-item> |
| | | </el-col> |
| | |
| | | </el-container> |
| | | </el-container> |
| | | </el-dialog> |
| | | <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" @updataAction="actionSaveHandler"></action-dialog> |
| | | <action-dialog ref="actionDialog" @cancelAction="actionCancelHandler" |
| | | @updataAction="actionSaveHandler"></action-dialog> |
| | | <clone-dialog ref="cloneDialog" :fromOid="fromOid" :sourceOId="sourceOId" paramsType="tab" |
| | | type="pageDef"></clone-dialog> |
| | | <clone-dialog ref="cloneBtnDialog" :fromOid="formBtnOid" :sourceOId="sourceBtnOid" paramsType="pageDef" |
| | |
| | | editBtn: false, |
| | | delBtn: false, |
| | | refreshBtn: false, |
| | | dialogWidth:'600', |
| | | menuWidth:'140', |
| | | dialogWidth: '600', |
| | | menuWidth: '140', |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | | prop: 'name', |
| | | width:180, |
| | | width: 180, |
| | | span: 24, |
| | | overHidden:true, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | { |
| | | label: 'å¼', |
| | | prop: 'value', |
| | | type:'textarea', |
| | | type: 'textarea', |
| | | span: 24, |
| | | overHidden:true, |
| | | overHidden: true, |
| | | rules: [ |
| | | { |
| | | required: true, |
| | |
| | | data: [], |
| | | option: { |
| | | ...basicOption, |
| | | size:'mini', |
| | | size: 'mini', |
| | | height: this.height, |
| | | addBtn: false, |
| | | index: true, |
| | | calcHeight: -30, |
| | | editBtn: false, |
| | | delBtn: false, |
| | | menuWidth:300, |
| | | menuWidth: 300, |
| | | column: [ |
| | | { |
| | | label: 'åç§°', |
| | |
| | | { |
| | | label: 'ç¼å·', |
| | | prop: 'seq', |
| | | width:100, |
| | | width: 100, |
| | | labelWidth: 110, |
| | | hide: false, |
| | | rules: [ |
| | |
| | | ], |
| | | group: [ |
| | | { |
| | | icon:'el-icon-info', |
| | | label:'', |
| | | icon: 'el-icon-info', |
| | | label: '', |
| | | arrow: true, |
| | | prop: 'group1', |
| | | column: [ |
| | |
| | | lastIndex: null, |
| | | selectList: [], |
| | | formDataRow: {}, |
| | | defaultForm:{}, |
| | | defaultForm: {}, |
| | | } |
| | | }, |
| | | computed:{ |
| | | computed: { |
| | | ...mapGetters(["permission"]), |
| | | permissionChildrenList() { |
| | | return { |
| | |
| | | if (this.saveType === 'add') { |
| | | this.$refs.Tree.setCurrentKey(null); |
| | | this.$refs.form.resetFields(); |
| | | }else { |
| | | } else { |
| | | this.basicForm = {...this.defaultForm}; |
| | | } |
| | | }, |
| | | |
| | | // æé®è®¾è®¡ä¿å |
| | | saveClickBtnHandler() { |
| | | if (this.basicForm.show == '0' && (this.basicForm.displayMode == 'image' || this.basicForm.displayMode == 'textandimage') && this.basicForm.iconPath == '') { |
| | | if (this.basicForm.show == '0' && this.basicForm.displayMode == 'image' && this.basicForm.iconPath == '') { |
| | | this.$message.error('è¯·éæ©å¾æ '); |
| | | return; |
| | | } |
| | |
| | | }, |
| | | // action鿩弹çªç´æ¥å
³é |
| | | actionCancelHandler() { |
| | | if(this.basicForm.actionOId){ |
| | | if (this.basicForm.actionOId) { |
| | | this.$refs.form.clearValidate('Action') |
| | | } |
| | | }, |
| | | |
| | | //æ¸
é¤action |
| | | clearActionValue(){ |
| | | clearActionValue() { |
| | | this.$set(this.basicForm, 'actionName', ''); |
| | | this.$set(this.basicForm, 'actionOId', ''); |
| | | }, |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æµç¨æ¨¡æ¿å®ä¹--> |
| | | <basic-container style="height: calc(100vh - 123px)"> |
| | | <div style="margin-bottom: 5px;"> |
| | | æµç¨åç±»ï¼ |
| | | <el-select v-model="tempType" :clearable="true" placeholder="è¯·éæ©" size="small" |
| | | style="width: 300px;margin-right: 20px;" |
| | | @change="tempTypeChange"> |
| | | <el-option |
| | | v-for="item in tempTypeData" |
| | | :key="item.id" |
| | | :label="item.name" |
| | | :value="item.id"> |
| | | </el-option> |
| | | </el-select> |
| | | æµç¨æ¨¡æ¿åç§°ï¼ |
| | | <el-input size="small" v-model="tempName" style="width: 300px;margin-right: 10px;"></el-input> |
| | | <el-button icon="el-icon-search" plain size="small" style="margin-right: 40px;" type="primary" |
| | | @click="searchData"> |
| | | æ¥è¯¢ |
| | | </el-button> |
| | | </div> |
| | | <el-container style="height: calc(100% - 100px)"> |
| | | <el-aside style="width: 40%;min-width: 500px;margin-right: 5px;"> |
| | | <avue-crud |
| | | ref="crud" |
| | | :data="tableData" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @on-load="getTableList" |
| | | @refresh-change="getTableList" |
| | | @selection-change="selectionChange" |
| | | @row-click="rowClickHandler" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="handlerAdd"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | å¢å |
| | | </el-button> |
| | | <el-button v-if="permissionList.downloadImportTemplateBtn" class="button-custom-icon" plain size="small" |
| | | type="primary" @click="downloadTemplateHandler"> |
| | | <icon-show :name="permissionList.downloadImportTemplateBtn.source"></icon-show> |
| | | ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | </el-button> |
| | | <el-button v-if="permissionList.importBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="uploadHandler"> |
| | | <icon-show :name="permissionList.importBtn.source"></icon-show> |
| | | 导å
¥ |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" |
| | | @click="downloadHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | å¯¼åº |
| | | </el-button> |
| | | </template> |
| | | |
| | | <template slot="menu" slot-scope="scope"> |
| | | <el-button v-if="permissionList.editBtn" size="small" type="text" |
| | | @click="handleEdit(scope.row)"> |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button v-if="permissionList.delBtn" size="small" type="text" |
| | | @click="handleDel(scope.row)"> |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | å é¤ |
| | | </el-button> |
| | | <el-button size="small" type="text" @click.stop="stopHandler(scope.row)"> |
| | | <span v-if="scope.row.status === 0 && permissionList.stopBtn" style="color: #fa3434;display: flex"> |
| | | <icon-show :name="permissionList.stopBtn.source"></icon-show> |
| | | åç¨ |
| | | </span> |
| | | <span v-if="scope.row.status === 1 && permissionList.actionBtn" style="color: #55b61d;display: flex"> |
| | | <icon-show :name="permissionList.actionBtn.source"></icon-show> |
| | | å¯ç¨ |
| | | </span> |
| | | </el-button> |
| | | </template> |
| | | |
| | | </avue-crud> |
| | | <!-- å建ç¼è¾èªå®ä¹å¯¹è¯æ¡ --> |
| | | <el-dialog |
| | | v-dialogDrag |
| | | v-loading="dialogLoading" |
| | | :title="dialogType === 'add' ? ' å建' : 'ç¼è¾'" |
| | | :visible.sync="dialogVisible" |
| | | append-to-body="true" |
| | | class="avue-dialog" |
| | | width="1000px" |
| | | @close="dialogClose" |
| | | > |
| | | <span slot="footer" class="dialog-footer"> |
| | | <el-button size="small" type="primary" @click="saveHandler">ç¡® å®</el-button> |
| | | <el-button size="small" @click="dialogClose">å æ¶</el-button> |
| | | </span> |
| | | </el-dialog> |
| | | <!-- 导å
¥ --> |
| | | <upload-file ref="upload" :fileType="upFileType" :fileUrl="fileUrl" :tipList="tipList" title="导å
¥æµç¨æ¨¡æ¿" |
| | | @updata="getTableList"></upload-file> |
| | | </el-aside> |
| | | |
| | | <el-main width="60%"> |
| | | <div style="height: 100%;background-color: #eeeeea">设计å¨</div> |
| | | </el-main> |
| | | </el-container> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {getTypeList} from "@/api/processTemplate/type"; |
| | | import {getProcessTempList,saveProcessTemp,updateProcessTemp,deleteProcessTemp,downloadTemplate,download,stopProcessTemp} from "@/api/processTemplate/define"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data(){ |
| | | return { |
| | | tempType:'', |
| | | tempName:'', |
| | | tempTypeData:[], |
| | | form:{}, |
| | | tableLoading: false, |
| | | tableData: [], |
| | | currentRow:null, |
| | | selectionList: [], |
| | | upFileType: ['xls', 'xlsx'], |
| | | fileUrl: 'api/userQueryController/importUser', |
| | | tipList:[], |
| | | dialogLoading:false, |
| | | dialogVisible:false, |
| | | dialogType:'add' |
| | | } |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | exportBtn: this.vaildData(this.permission[this.$route.query.id].EXPORT, false), |
| | | importBtn: this.vaildData(this.permission[this.$route.query.id].IMPORT, false), |
| | | downloadImportTemplateBtn: this.vaildData(this.permission[this.$route.query.id].DOWNLOADFILE, false), |
| | | stopBtn: this.vaildData(this.permission[this.$route.query.id].FREEZE, false), |
| | | actionBtn: this.vaildData(this.permission[this.$route.query.id].UNFREZE, false), |
| | | }; |
| | | }, |
| | | option(){ |
| | | return { |
| | | ...basicOption, |
| | | addBtn:false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | columnBtn:false, |
| | | gridBtn:false, |
| | | width:500, |
| | | calcHeight: -50, |
| | | align:'left', |
| | | headerAlign:'center', |
| | | menuWidth:190, |
| | | dialogMenuPosition: 'right', |
| | | dialogWidth:600, |
| | | column: [ |
| | | { |
| | | label: 'æµç¨æ¨¡æ¿åç§°', |
| | | prop: 'name' |
| | | },{ |
| | | label: 'çæ¬', |
| | | prop: 'desc', |
| | | width:50 |
| | | },{ |
| | | label: 'ç¶æ', |
| | | prop: 'status', |
| | | width:65 |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | created() { |
| | | getTypeList().then(res => { |
| | | this.tempTypeData = res.data.data; |
| | | }) |
| | | }, |
| | | methods:{ |
| | | getTableList(){ |
| | | this.tableLoading = true; |
| | | getProcessTempList({tempType:this.tempType,tempName:this.tempName}).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | //æµç¨åç±»éæ© |
| | | tempTypeChange(val){ |
| | | this.getTableList(); |
| | | }, |
| | | searchData(){ |
| | | this.getTableList(); |
| | | }, |
| | | |
| | | handlerAdd(){ |
| | | this.form={}; |
| | | this.dialogVisible=true; |
| | | this.dialogType='add' |
| | | }, |
| | | handleEdit(row,index) { |
| | | this.form={ |
| | | ...row |
| | | } |
| | | this.dialogVisible = true; |
| | | this.dialogType = 'edit' |
| | | }, |
| | | // ç¼è¾ä¿å |
| | | saveHandler() { |
| | | if(this.dialogType=='add'){ |
| | | saveProcessTemp(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }); |
| | | }else{ |
| | | updateProcessTemp(this.form).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | dialogClose(){ |
| | | this.form={}; |
| | | this.dialogLoading=false; |
| | | this.dialogVisible=false; |
| | | }, |
| | | // å é¤ |
| | | handleDel(row,index) { |
| | | let params = { |
| | | ids: row.id |
| | | } |
| | | |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤å½åæ°æ®åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteProcessTemp(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //éæ©çè¡ |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | |
| | | // è¡åé |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectionList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | | |
| | | // å¯¼åº |
| | | downloadHandler() { |
| | | if (this.selectionList.length <= 0) { |
| | | this.$message.warning('请è³å°éæ©ä¸æ¡æ°æ®è¿è¡å¯¼åº'); |
| | | return; |
| | | } |
| | | |
| | | download({enumNames: this.ids}).then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('å¯¼åºæå'); |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | |
| | | // ä¸è½½å¯¼å
¥æ¨¡æ¿ |
| | | downloadTemplateHandler() { |
| | | downloadTemplate().then(res => { |
| | | func.downloadFileByBlobHandler(res); |
| | | this.$message.success('ä¸è½½æå'); |
| | | }).catch(err => { |
| | | }) |
| | | }, |
| | | |
| | | //导å
¥ |
| | | uploadHandler() { |
| | | this.$refs.upload.visible = true; |
| | | }, |
| | | // åç¨å¯ç¨ |
| | | stopHandler(row) { |
| | | let params = {}; |
| | | params = { |
| | | ids: row.oid, |
| | | flag: row.status === 0 ? true : false |
| | | } |
| | | stopProcessTemp(params).then(res => { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | }); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <!--æµç¨æ¨¡æ¿åç±»--> |
| | | <basic-container> |
| | | <avue-crud |
| | | ref="crud" |
| | | v-model="form" |
| | | :data="tableData" |
| | | :option="option" |
| | | :table-loading="tableLoading" |
| | | @on-load="getTableList" |
| | | @refresh-change="getTableList" |
| | | @row-save="rowSaveHandler" |
| | | @row-update="rowUpdateHandler" |
| | | @row-click="rowClickHandler" |
| | | @selection-change="selectionChange" |
| | | > |
| | | <template slot="menuLeft" slot-scope="scope"> |
| | | <el-button v-if="permissionList.addBtn" class="button-custom-icon" size="small" type="primary" |
| | | @click="$refs.crud.rowAdd()"> |
| | | <icon-show :name="permissionList.addBtn.source"></icon-show> |
| | | æ° å¢ |
| | | </el-button> |
| | | <el-button v-if="permissionList.exportBtn" class="button-custom-icon" plain size="small" type="primary" @click="exportClickHandler"> |
| | | <icon-show :name="permissionList.exportBtn.source"></icon-show> |
| | | å¯¼åº |
| | | </el-button> |
| | | </template> |
| | | <template slot="menu" slot-scope="{ row, index }"> |
| | | <el-button |
| | | v-if="permissionList.editBtn" |
| | | size="small" |
| | | type="text" |
| | | @click="handleEdit(row, index)" |
| | | > |
| | | <icon-show :name="permissionList.editBtn.source"></icon-show> |
| | | ç¼è¾ |
| | | </el-button> |
| | | <el-button |
| | | v-if="permissionList.delBtn" |
| | | size="small" |
| | | type="text" |
| | | @click="handleDel(row, index)" |
| | | > |
| | | <icon-show :name="permissionList.delBtn.source"></icon-show> |
| | | å é¤ |
| | | </el-button> |
| | | </template> |
| | | </avue-crud> |
| | | </basic-container> |
| | | </template> |
| | | |
| | | <script> |
| | | import {mapGetters} from "vuex"; |
| | | import basicOption from "@/util/basic-option"; |
| | | import {getTypeList, saveType, updateType, deleteType} from "@/api/processTemplate/type"; |
| | | import func from "@/util/func"; |
| | | |
| | | export default { |
| | | name: "index", |
| | | data: function () { |
| | | return { |
| | | form:{}, |
| | | tableLoading: false, |
| | | tableData: [], |
| | | currentRow:null, |
| | | selectionList: [], |
| | | } |
| | | }, |
| | | computed: { |
| | | ids() { |
| | | let ids = []; |
| | | this.selectionList.forEach(ele => { |
| | | ids.push(ele.id); |
| | | }); |
| | | return ids.join(","); |
| | | }, |
| | | ...mapGetters(["permission"]), |
| | | permissionList() { |
| | | return { |
| | | addBtn: this.vaildData(this.permission[this.$route.query.id].ADD, false), |
| | | delBtn: this.vaildData(this.permission[this.$route.query.id].DELETE, false), |
| | | editBtn: this.vaildData(this.permission[this.$route.query.id].EDIT, false), |
| | | }; |
| | | }, |
| | | option(){ |
| | | return { |
| | | ...basicOption, |
| | | addBtn:false, |
| | | editBtn:false, |
| | | delBtn:false, |
| | | calcHeight: -60, |
| | | align:'left', |
| | | headerAlign:'center', |
| | | menuWidth:160, |
| | | dialogMenuPosition: 'right', |
| | | dialogWidth:600, |
| | | column: [ |
| | | { |
| | | label: 'åç±»åç§°', |
| | | prop: 'name', |
| | | span: 24, |
| | | rules: [{ required: true, message: '请è¾å
¥åç±»åç§°', trigger: 'blur' }] |
| | | },{ |
| | | label: 'æè¿°', |
| | | prop: 'desc', |
| | | span: 24, |
| | | type:'textarea' |
| | | }] |
| | | } |
| | | } |
| | | }, |
| | | methods: { |
| | | // è¡¨æ ¼è¯·æ± |
| | | getTableList() { |
| | | this.tableLoading = true; |
| | | getTypeList().then(res => { |
| | | this.tableData = res.data.data; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | | |
| | | // æ°å¢ |
| | | rowSaveHandler(row, done, loading) { |
| | | saveType(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done(); |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | }); |
| | | }, |
| | | |
| | | handleEdit(row,index){ |
| | | this.$refs.crud.rowEdit(row, index); |
| | | }, |
| | | |
| | | // ç¼è¾ |
| | | rowUpdateHandler(row, index, done, loading) { |
| | | updateType(row).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | done() |
| | | } |
| | | }).catch(err => { |
| | | loading() |
| | | }); |
| | | }, |
| | | |
| | | // å é¤ |
| | | handleDel(row,index) { |
| | | let params = { |
| | | ids: row.id |
| | | } |
| | | |
| | | this.$confirm('æ¨ç¡®å®è¦å é¤å½åçåç±»åï¼', 'æç¤º', { |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning' |
| | | }).then(() => { |
| | | deleteType(params).then(res => { |
| | | if (res.data.code === 200) { |
| | | this.$message.success(res.data.obj); |
| | | this.getTableList(); |
| | | } |
| | | }); |
| | | }).catch(() => { |
| | | this.$message({ |
| | | type: 'info', |
| | | message: '已忶å é¤' |
| | | }); |
| | | }); |
| | | }, |
| | | |
| | | //éæ©çè¡ |
| | | selectionChange(list) { |
| | | this.selectionList = list; |
| | | }, |
| | | |
| | | // è¡åé |
| | | rowClickHandler(row) { |
| | | func.rowClickHandler( |
| | | row, |
| | | this.$refs.crud, |
| | | this.lastIndex, |
| | | (newIndex) => { |
| | | this.lastIndex = newIndex; |
| | | }, |
| | | () => { |
| | | this.selectionList = [row]; |
| | | } |
| | | ); |
| | | }, |
| | | } |
| | | } |
| | | </script> |
| | | |
| | | <style scoped> |
| | | |
| | | </style> |
| | |
| | | }).then(res => { |
| | | this.tableData = res.data.data; |
| | | this.page.total = res.data.total; |
| | | this.selectList=[]; |
| | | this.selectList = []; |
| | | this.tableLoading = false; |
| | | }) |
| | | }, |
| | |
| | | // æå¼å¼¹åºå±ç»ææ¶çåè° |
| | | modalOpened() { |
| | | this.visible = true; |
| | | if (!this.resizeHandler) { |
| | | this.resizeHandler = debounce(() => { |
| | | this.refresh() |
| | | }, 100) |
| | | } |
| | | // if (!this.resizeHandler) { |
| | | // this.resizeHandler = debounce(() => { |
| | | // this.refresh() |
| | | // }, 100) |
| | | // } |
| | | window.addEventListener("resize", this.resizeHandler) |
| | | }, |
| | | // å·æ°ç»ä»¶ |
| | |
| | | // ä¸ä¼ å¾ç |
| | | uploadImg() { |
| | | this.$refs.cropper.getCropBlob(data => { |
| | | console.log(data); |
| | | let formData = new FormData(); |
| | | formData.append("avatarfile", data, this.options.filename); |
| | | uploadAvatar(formData).then(response => { |
| | |
| | | let node = this.currentClickNode.parent; |
| | | node.loaded = false; |
| | | node.expand(); |
| | | this.$refs.tree.setCurrentNode(this.currentClickNode); |
| | | this.$nextTick(()=>{ |
| | | this.$refs.tree.setCurrentKey(this.currentClickNode.data.id); |
| | | }); |
| | | } else { |
| | | this.refresh = Math.random(); // å·æ°å·¦ä¾§æ |
| | | } |
| | |
| | | methods: { |
| | | // æ è¡ç¹å» |
| | | nodeClick(row, node) { |
| | | console.log(row.childType); |
| | | this.form = {...row}; |
| | | this.nodeRow = {...row}; |
| | | this.currentClickNode = node; |
| | |
| | | let node = this.currentClickNode.parent; |
| | | node.loaded = false; |
| | | node.expand(); |
| | | this.$refs.tree.setCurrentNode(this.currentClickNode); |
| | | this.$nextTick(()=>{ |
| | | this.$refs.tree.setCurrentKey(this.currentClickNode.data.id); |
| | | }); |
| | | } else { |
| | | this.refresh = Math.random(); // å·æ°å·¦ä¾§æ |
| | | } |
| | |
| | | logName: "ç»å½æ¥å¿ç»è®¡", |
| | | text: "å½åç»å½æ¥å¿æ»è®°å½æ°", |
| | | color: 'rgb(230, 71, 88)', |
| | | router: '/LogInfoMain?logType=1&roleType=2' |
| | | router: '/C41AF7C4-1D19-00DF-1974-2542CDD49FFB?logType=1&roleType=1&id=C41AF7C4-1D19-00DF-1974-2542CDD49FFB&name=ç»å½æ¥å¿æ¥è¯¢ï¼ç®¡çåï¼' |
| | | }, |
| | | { |
| | | logType: "3", |
| | | logName: "æææ¥å¿ç»è®¡", |
| | | text: "å½åæææ¥å¿æ»è®°å½æ°", |
| | | color: 'rgb(178, 159, 255)', |
| | | router: '/LogAuthorizeMain?logType=3&roleType=2' |
| | | router: '/EBA630BC-71DF-AF03-F9CB-2F4DF14459AF?logType=3&roleType=1&id=EBA630BC-71DF-AF03-F9CB-2F4DF14459AF&name=æææ¥å¿æ¥è¯¢ï¼ç®¡çåï¼' |
| | | }, |
| | | { |
| | | logType: "4", |
| | | logName: "æä½æ¥å¿ç»è®¡", |
| | | text: "å½åæä½æ¥å¿æ»è®°å½æ°", |
| | | color: 'rgb(27, 201, 142)', |
| | | router: '/LogOperateMain?logType=4&roleType=2' |
| | | router: '/674C5E77-501F-AE85-2B61-191711BDA57A?logType=4&roleType=1&id=674C5E77-501F-AE85-2B61-191711BDA57A&name=æä½æ¥å¿æ¥è¯¢ï¼ç®¡çåï¼' |
| | | }, |
| | | ]; |
| | | |