已重命名1个文件
已添加12个文件
已修改8个文件
| | |
| | | var LFData = iisHost + "/LFData"; |
| | | |
| | | // Server |
| | | var BASE_URL = webHost + '/server'; |
| | | |
| | | var BASE_URL = 'http://192.168.11.14:12316/server'; |
| | | // var BASE_URL = webHost+ '/server'; |
| | | // GeoServerUrl |
| | | var geoServerURl = webHost + '/geoserver/LF/wms'; |
| | | |
| | |
| | | |
| | | var geoserverWFSLine = '/geoserver/LF/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=LF%3Am_pipeline&maxFeatures=50&outputFormat=application%2Fjson&cql_filter=projname='; |
| | | |
| | | |
| | | var getLayerJosn = location.origin+"/layer/" |
| | | |
| | | |
| | | // 模åå è½½å°å |
| | | var modelUrl = LFData; |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | { |
| | | "code": 200, |
| | | "count": 0, |
| | | "msg": "æå", |
| | | "result": [{ |
| | | "cnName": "é¦é¡µ", |
| | | "css": null, |
| | | "enName": "Index", |
| | | "icon": null, |
| | | "id": 3, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 1, |
| | | "perms": "/comprehensive", |
| | | "pid": 2, |
| | | "type": 1, |
| | | "url": "Synthesis" |
| | | }, |
| | | { |
| | | "cnName": "æµç»ä¸ä¸", |
| | | "css": null, |
| | | "enName": "Major in surveying and mapping", |
| | | "icon": "", |
| | | "id": 67, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 1, |
| | | "perms": null, |
| | | "pid": 64, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=æµç»ä¸ä¸&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "èµæºç®å½", |
| | | "css": null, |
| | | "enName": "Resource Directory", |
| | | "icon": "", |
| | | "id": 75, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 1, |
| | | "perms": null, |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/resm/#/resourceManage?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®ä¸ä¼ ", |
| | | "css": null, |
| | | "enName": "Data Updata", |
| | | "icon": null, |
| | | "id": 15, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 1, |
| | | "perms": "/dataUpload", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "dataUpdata" |
| | | }, |
| | | |
| | | { |
| | | "cnName": "ä¸è½½æ¥å¿", |
| | | "css": null, |
| | | "enName": "Download Log", |
| | | "icon": "", |
| | | "id": 60, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 1, |
| | | "perms": "/downlog", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "downlog" |
| | | }, |
| | | { |
| | | "cnName": "å¾å±", |
| | | "css": null, |
| | | "enName": "Coverage", |
| | | "icon": null, |
| | | "id": 4, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 1, |
| | | "perms": null, |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | { |
| | | "cnName": "管éåºç¡å¤§æ°æ®å¹³å°", |
| | | "css": null, |
| | | "enName": "Pipeline Basic Big Data Platform", |
| | | "icon": null, |
| | | "id": 1, |
| | | "isShow": 0, |
| | | "level": 0, |
| | | "orderNum": 1, |
| | | "perms": "/perms", |
| | | "pid": 0, |
| | | "type": 0, |
| | | "url": null |
| | | }, |
| | | { |
| | | "cnName": "æ ¼å¼è½¬æ¢", |
| | | "css": null, |
| | | "enName": "Format Conversion", |
| | | "icon": "", |
| | | "id": 70, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 1, |
| | | "perms": null, |
| | | "pid": 65, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=æ°æ®äº¤æ¢&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "ç»å½æ¥å¿", |
| | | "css": null, |
| | | "enName": "Login Log", |
| | | "icon": null, |
| | | "id": 36, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 2, |
| | | "perms": "/login", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "logLog" |
| | | }, |
| | | { |
| | | "cnName": "è§å¾", |
| | | "css": null, |
| | | "enName": "Viewport", |
| | | "icon": null, |
| | | "id": 5, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 2, |
| | | "perms": null, |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | { |
| | | "cnName": "项ç®ç®¡ç", |
| | | "css": null, |
| | | "enName": "Project management", |
| | | "icon": null, |
| | | "id": 16, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 2, |
| | | "perms": "/dir", |
| | | "pid": 85, |
| | | "type": 1, |
| | | "url": "catalogueManage" |
| | | }, |
| | | { |
| | | "cnName": "åå¯ä¸ä¸", |
| | | "css": null, |
| | | "enName": "Major in investigation", |
| | | "icon": "", |
| | | "id": 68, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 2, |
| | | "perms": null, |
| | | "pid": 64, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=åå¯ä¸ä¸&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "èµæºå®¡æ ¸", |
| | | "css": null, |
| | | "enName": "Resource audit", |
| | | "icon": null, |
| | | "id": 76, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 2, |
| | | "perms": null, |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/resm/#/resapproval?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æå¿ä¸å¼ å¾", |
| | | "css": "m5", |
| | | "enName": "Comprehensive Display", |
| | | "icon": null, |
| | | "id": 2, |
| | | "isShow": 1, |
| | | "level": 1, |
| | | "orderNum": 2, |
| | | "perms": "/comprehensive", |
| | | "pid": 1, |
| | | "type": 1, |
| | | "url": "Synthesis" |
| | | }, |
| | | { |
| | | "cnName": "å¨çº¿å¶å¾", |
| | | "css": null, |
| | | "enName": "Online Cartography", |
| | | "icon": "", |
| | | "id": 45, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 2, |
| | | "perms": "/export", |
| | | "pid": 2, |
| | | "type": 1, |
| | | "url": "ExportMap" |
| | | }, |
| | | { |
| | | "cnName": "ä¿¡æ¯ç®¡ç", |
| | | "css": null, |
| | | "enName": "Information management", |
| | | "icon": null, |
| | | "id": 20, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 2, |
| | | "perms": "/meta", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "metadataManage" |
| | | }, |
| | | { |
| | | "cnName": "åæ è½¬æ¢", |
| | | "css": null, |
| | | "enName": "Coordinate Transformation", |
| | | "icon": null, |
| | | "id": 71, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 2, |
| | | "perms": null, |
| | | "pid": 65, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=åæ è½¬æ¢&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®åå", |
| | | "css": null, |
| | | "enName": "Data distribution", |
| | | "icon": null, |
| | | "id": 72, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 3, |
| | | "perms": null, |
| | | "pid": 65, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=æ°æ®åå&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æä½æ¥å¿", |
| | | "css": null, |
| | | "enName": "Operation Log", |
| | | "icon": null, |
| | | "id": 37, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 3, |
| | | "perms": "/operate", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "operationLog" |
| | | }, |
| | | { |
| | | "cnName": "åå¸ç®¡ç", |
| | | "css": null, |
| | | "enName": "Release management", |
| | | "icon": "", |
| | | "id": 90, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 3, |
| | | "perms": "/publish", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "uploadmanage" |
| | | }, |
| | | { |
| | | "cnName": "漫游", |
| | | "css": null, |
| | | "enName": "Wander", |
| | | "icon": null, |
| | | "id": 6, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 3, |
| | | "perms": null, |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | |
| | | { |
| | | "cnName": "å°ç¾ä¸ä¸", |
| | | "css": null, |
| | | "enName": "Major in Earth disaster", |
| | | "icon": "", |
| | | "id": 88, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 3, |
| | | "perms": null, |
| | | "pid": 64, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=å°ç¾ä¸ä¸&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "项ç®ä¿¡æ¯", |
| | | "css": null, |
| | | "enName": "Project Information", |
| | | "icon": "", |
| | | "id": 58, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 3, |
| | | "perms": "/project", |
| | | "pid": 85, |
| | | "type": 1, |
| | | "url": "projectManage" |
| | | }, |
| | | { |
| | | "cnName": "åæ", |
| | | "css": null, |
| | | "enName": "Analyse", |
| | | "icon": null, |
| | | "id": 7, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 4, |
| | | "perms": null, |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | { |
| | | "cnName": "å¾å±ç®¡ç", |
| | | "css": null, |
| | | "enName": " Layer Management", |
| | | "icon": "", |
| | | "id": 93, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 4, |
| | | "perms": "/layer", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "layerManagement" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®ç³è¯·", |
| | | "css": null, |
| | | "enName": "Data application", |
| | | "icon": "", |
| | | "id": 62, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 4, |
| | | "perms": "/apply", |
| | | "pid": 2, |
| | | "type": 1, |
| | | "url": "dataApplication" |
| | | }, |
| | | { |
| | | "cnName": "æ´åºä¸ä¸", |
| | | "css": null, |
| | | "enName": "Professional Cave", |
| | | "icon": null, |
| | | "id": 89, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 4, |
| | | "perms": null, |
| | | "pid": 64, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=æ´åºä¸ä¸&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®ç®¡ç", |
| | | "css": "m3", |
| | | "enName": "Data Manage", |
| | | "icon": null, |
| | | "id": 14, |
| | | "isShow": 1, |
| | | "level": 1, |
| | | "orderNum": 4, |
| | | "perms": "", |
| | | "pid": 1, |
| | | "type": 1, |
| | | "url": "" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®æ²»ç", |
| | | "css": null, |
| | | "enName": "Data governance", |
| | | "icon": null, |
| | | "id": 73, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 4, |
| | | "perms": null, |
| | | "pid": 65, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/task_zsy?tags=æ°æ®æ²»ç&embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "çæ¬ç®¡ç", |
| | | "css": null, |
| | | "enName": "Version Management", |
| | | "icon": null, |
| | | "id": 18, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 4, |
| | | "perms": "/ver", |
| | | "pid": 85, |
| | | "type": 1, |
| | | "url": "versionManage" |
| | | }, |
| | | { |
| | | "cnName": "èµæºæ¥å¿", |
| | | "css": null, |
| | | "enName": "Resource Log", |
| | | "icon": null, |
| | | "id": 38, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 4, |
| | | "perms": "/resOp", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "eventlogManage" |
| | | }, |
| | | { |
| | | "cnName": "ä»»å¡ç®¡ç", |
| | | "css": null, |
| | | "enName": "Task management", |
| | | "icon": null, |
| | | "id": 81, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 5, |
| | | "perms": "", |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/task/list?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "å¼å管ç", |
| | | "css": null, |
| | | "enName": "Domain Management", |
| | | "icon": "", |
| | | "id": 44, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 5, |
| | | "perms": "/domain", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "domainManage" |
| | | }, |
| | | { |
| | | "cnName": "æ¹æ¡ç®¡ç", |
| | | "css": null, |
| | | "enName": "Programme management", |
| | | "icon": "", |
| | | "id": 80, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 5, |
| | | "perms": null, |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/dataxdi/#/schema/list?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®ç»è®¡", |
| | | "css": null, |
| | | "enName": "dataStatistics", |
| | | "icon": "", |
| | | "id": 94, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 5, |
| | | "perms": null, |
| | | "pid": 2, |
| | | "type": 1, |
| | | "url": "/dataCount" |
| | | }, |
| | | { |
| | | "cnName": "令ç管ç", |
| | | "css": null, |
| | | "enName": "Token Management", |
| | | "icon": null, |
| | | "id": 39, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 5, |
| | | "perms": "/token", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "tokentool" |
| | | }, |
| | | { |
| | | "cnName": "åç¨èµæº", |
| | | "css": null, |
| | | "enName": "Application record", |
| | | "icon": "", |
| | | "id": 87, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 5, |
| | | "perms": null, |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/resm/#/resdisabled?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æ¥è¯¢", |
| | | "css": null, |
| | | "enName": "IQuery", |
| | | "icon": null, |
| | | "id": 8, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 5, |
| | | "perms": "/inquiry", |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | |
| | | { |
| | | "cnName": "é»/ç½åå", |
| | | "css": null, |
| | | "enName": "Black/White List", |
| | | "icon": null, |
| | | "id": 40, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 6, |
| | | "perms": "/blacklist", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "blackwhiteList" |
| | | }, |
| | | { |
| | | "cnName": "å®ä½", |
| | | "css": null, |
| | | "enName": "Orientation", |
| | | "icon": null, |
| | | "id": 9, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 6, |
| | | "perms": "/locate", |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | { |
| | | "cnName": "èµæºææ", |
| | | "css": null, |
| | | "enName": "Resource Management", |
| | | "icon": "", |
| | | "id": 91, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 6, |
| | | "perms": null, |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/resm/#/rescancelauth?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "èµæé¦", |
| | | "css": null, |
| | | "enName": "Data Library", |
| | | "icon": null, |
| | | "id": 13, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 6, |
| | | "perms": "/dataLib", |
| | | "pid": 2, |
| | | "type": 1, |
| | | "url": "Archive" |
| | | }, |
| | | { |
| | | "cnName": "åå
¸ç®¡ç", |
| | | "css": null, |
| | | "enName": "Dictionary Management", |
| | | "icon": null, |
| | | "id": 19, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 6, |
| | | "perms": "/dict", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "dictionaryManage" |
| | | }, |
| | | |
| | | { |
| | | "cnName": "æ ·å¼ç®¡ç", |
| | | "css": null, |
| | | "enName": "Style Management", |
| | | "icon": null, |
| | | "id": 21, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 7, |
| | | "perms": "/style", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "styleManage" |
| | | }, |
| | | { |
| | | "cnName": "ç³è¯·ç¶æ", |
| | | "css": null, |
| | | "enName": "Application status", |
| | | "icon": "", |
| | | "id": 92, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 7, |
| | | "perms": null, |
| | | "pid": 66, |
| | | "type": 1, |
| | | "url": "{fmeHost}/resm/#/resrequest?embed=true&theme=dark&lang=zh&token=" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®åºçæ§", |
| | | "css": null, |
| | | "enName": "Database Monitoring", |
| | | "icon": null, |
| | | "id": 41, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 7, |
| | | "perms": "/sign/toDruid", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "{webHost}/server/druid/index.html" |
| | | }, |
| | | { |
| | | "cnName": "æµé", |
| | | "css": null, |
| | | "enName": "Measurement", |
| | | "icon": null, |
| | | "id": 10, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 7, |
| | | "perms": null, |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | |
| | | { |
| | | "cnName": "æ°æ®èµæºç®¡ç", |
| | | "css": "m6", |
| | | "enName": "Operat Management", |
| | | "icon": null, |
| | | "id": 22, |
| | | "isShow": 1, |
| | | "level": 1, |
| | | "orderNum": 7, |
| | | "perms": "", |
| | | "pid": 1, |
| | | "type": 1, |
| | | "url": "" |
| | | }, |
| | | { |
| | | "cnName": "综åæå¿æ¾ç¤º", |
| | | "css": "m5", |
| | | "enName": "Operat Management", |
| | | "icon": null, |
| | | "id": 202, |
| | | "isShow": 1, |
| | | "level": 1, |
| | | "orderNum": 7, |
| | | "perms": "", |
| | | "pid": 1, |
| | | "type": 1, |
| | | "url": "" |
| | | }, |
| | | { |
| | | "cnName": "æ ç»", |
| | | "css": null, |
| | | "enName": "Plotting", |
| | | "icon": null, |
| | | "id": 11, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 8, |
| | | "perms": "/mark", |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": null |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®æ¥è¯¢", |
| | | "css": null, |
| | | "enName": "Data Query", |
| | | "icon": null, |
| | | "id": 17, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 8, |
| | | "perms": "/dataQuery", |
| | | "pid": 86, |
| | | "type": 1, |
| | | "url": "SpatialData" |
| | | }, |
| | | { |
| | | "cnName": "ç³»ç»çæ§", |
| | | "css": null, |
| | | "enName": "System Monitoring", |
| | | "icon": null, |
| | | "id": 42, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 8, |
| | | "perms": "/ws", |
| | | "pid": 35, |
| | | "type": 1, |
| | | "url": "systemMonitoring" |
| | | }, |
| | | { |
| | | "cnName": "åºæ¯", |
| | | "css": null, |
| | | "enName": "Scene", |
| | | "icon": "", |
| | | "id": 61, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 9, |
| | | "perms": "/Scene", |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": "" |
| | | }, |
| | | { |
| | | "cnName": "管é空é´åæ", |
| | | "css": null, |
| | | "enName": " Pipe space analysis", |
| | | "icon": "", |
| | | "id": 63, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 10, |
| | | "perms": "/pipeline", |
| | | "pid": 3, |
| | | "type": 2, |
| | | "url": "/pipeline" |
| | | }, |
| | | { |
| | | "cnName": "项ç®ç®¡ç", |
| | | "css": null, |
| | | "enName": "Project management", |
| | | "icon": "", |
| | | "id": 85, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 11, |
| | | "perms": null, |
| | | "pid": 14, |
| | | "type": 1, |
| | | "url": "/projectController" |
| | | }, |
| | | { |
| | | "cnName": "æ°æ®åºç®¡ç", |
| | | "css": null, |
| | | "enName": "Database management", |
| | | "icon": null, |
| | | "id": 86, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 12, |
| | | "perms": null, |
| | | "pid": 14, |
| | | "type": 1, |
| | | "url": "/bankController" |
| | | }, |
| | | { |
| | | "cnName": "ç³»ç»ç®¡ç", |
| | | "css": null, |
| | | "enName": "System Management", |
| | | "icon": null, |
| | | "id": 23, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 23, |
| | | "perms": null, |
| | | "pid": 22, |
| | | "type": 1, |
| | | "url": "/systemController" |
| | | }, |
| | | { |
| | | "cnName": "èå管ç", |
| | | "css": null, |
| | | "enName": "Menu Management", |
| | | "icon": null, |
| | | "id": 24, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 24, |
| | | "perms": "/menu", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "menuSettings" |
| | | }, |
| | | { |
| | | "cnName": "ç¨æ·ç®¡ç", |
| | | "css": null, |
| | | "enName": "User Management", |
| | | "icon": null, |
| | | "id": 25, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 25, |
| | | "perms": "/user", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "userInfoManage" |
| | | }, |
| | | { |
| | | "cnName": "åä½ç®¡ç", |
| | | "css": null, |
| | | "enName": "Organization Management", |
| | | "icon": null, |
| | | "id": 26, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 26, |
| | | "perms": "/dep", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "orgManage" |
| | | }, |
| | | { |
| | | "cnName": "èµæºç®¡ç", |
| | | "css": null, |
| | | "enName": "Resource Management", |
| | | "icon": null, |
| | | "id": 27, |
| | | "isShow": 0, |
| | | "level": 3, |
| | | "orderNum": 27, |
| | | "perms": "/res", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "resourceManage" |
| | | }, |
| | | { |
| | | "cnName": "è§è²ç®¡ç", |
| | | "css": null, |
| | | "enName": "Role Management", |
| | | "icon": null, |
| | | "id": 28, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 28, |
| | | "perms": "/role", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "roleManage" |
| | | }, |
| | | { |
| | | "cnName": "æé管ç", |
| | | "css": null, |
| | | "enName": "Permission Management", |
| | | "icon": null, |
| | | "id": 29, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 29, |
| | | "perms": "/auth", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "authorityManage" |
| | | }, |
| | | { |
| | | "cnName": "ææç®¡ç", |
| | | "css": null, |
| | | "enName": "Authorization Management", |
| | | "icon": null, |
| | | "id": 30, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 30, |
| | | "perms": null, |
| | | "pid": 22, |
| | | "type": 1, |
| | | "url": "/empowerController" |
| | | }, |
| | | { |
| | | "cnName": "模æ¿ç®¡ç", |
| | | "css": null, |
| | | "enName": "Template management", |
| | | "icon": "", |
| | | "id": 82, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 30, |
| | | "perms": "/report", |
| | | "pid": 23, |
| | | "type": 1, |
| | | "url": "templateManage" |
| | | }, |
| | | { |
| | | "cnName": "ç¨æ·è§è²ææ", |
| | | "css": null, |
| | | "enName": "User Role Authorization", |
| | | "icon": null, |
| | | "id": 31, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 31, |
| | | "perms": "/roleUser", |
| | | "pid": 30, |
| | | "type": 1, |
| | | "url": "userRoleAuthorization" |
| | | }, |
| | | { |
| | | "cnName": "èåæéææ", |
| | | "css": null, |
| | | "enName": "Menu Permission Authorization", |
| | | "icon": null, |
| | | "id": 32, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 32, |
| | | "perms": "/menuAuth", |
| | | "pid": 30, |
| | | "type": 1, |
| | | "url": "menuRoleAuthorization" |
| | | }, |
| | | { |
| | | "cnName": "è§è²èåææ", |
| | | "css": null, |
| | | "enName": "Role Menu Authorization", |
| | | "icon": null, |
| | | "id": 33, |
| | | "isShow": 1, |
| | | "level": 3, |
| | | "orderNum": 33, |
| | | "perms": "/roleMenuAuth", |
| | | "pid": 30, |
| | | "type": 1, |
| | | "url": "roleMenuAuthorization" |
| | | }, |
| | | { |
| | | "cnName": "è§è²èµæºææ", |
| | | "css": null, |
| | | "enName": "Role Resource Authorization", |
| | | "icon": null, |
| | | "id": 34, |
| | | "isShow": 0, |
| | | "level": 3, |
| | | "orderNum": 34, |
| | | "perms": "/roleRes", |
| | | "pid": 30, |
| | | "type": 1, |
| | | "url": "roleResAuthorization" |
| | | }, |
| | | { |
| | | "cnName": "è¿ç»´çæ§", |
| | | "css": null, |
| | | "enName": "Operation And Monitoring", |
| | | "icon": null, |
| | | "id": 35, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 35, |
| | | "perms": "/ctrl", |
| | | "pid": 22, |
| | | "type": 1, |
| | | "url": "/opexController" |
| | | }, |
| | | { |
| | | "cnName": "ç³»ç»é
ç½®", |
| | | "css": null, |
| | | "enName": "System Configuration", |
| | | "icon": null, |
| | | "id": 43, |
| | | "isShow": 1, |
| | | "level": 2, |
| | | "orderNum": 43, |
| | | "perms": "/args", |
| | | "pid": 22, |
| | | "type": 1, |
| | | "url": "parameterConfiguration" |
| | | } |
| | | ], |
| | | "time": 1714294558805 |
| | | } |
| | |
| | | |
| | | /* Homeé¡µé¢ */ |
| | | .home { |
| | | height: 100vh; |
| | | position: relative; |
| | | height: 100vh; |
| | | position: relative; |
| | | } |
| | | |
| | | .el-container { |
| | | height: 100%; |
| | | height: 100%; |
| | | } |
| | | |
| | | .el-header { |
| | | padding: 0; |
| | | height: 60px !important; |
| | | padding: 0; |
| | | height: 60px !important; |
| | | } |
| | | |
| | | .el-main { |
| | | margin: 0px; |
| | | padding: 0px !important; |
| | | background: #3B4D6E; |
| | | margin: 0px; |
| | | padding: 0px !important; |
| | | background: #3B4D6E; |
| | | } |
| | | |
| | | /* å¯¼èªæ é¡µé¢ */ |
| | | .NavBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | background-image: url("../../assets/img/menu/navbg.jpg"); |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | /*background-image: linear-gradient(rgb(34, 33, 33), rgb(27, 31, 78));*/ |
| | | width: 100%; |
| | | height: 100%; |
| | | background-image: url("../../assets/img/menu/navbg.png"); |
| | | background-repeat: no-repeat; |
| | | background-size: 100% 100%; |
| | | /*background-image: linear-gradient(rgb(34, 33, 33), rgb(27, 31, 78));*/ |
| | | } |
| | | |
| | | .topBox { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | justify-content: space-around; |
| | | align-items: center; |
| | | } |
| | | |
| | | .topTitle { |
| | | /* width: 415px; |
| | | /* width: 415px; |
| | | height: 70px; |
| | | background: url("../img/LOGO.png") no-repeat center; */ |
| | | width: 18%; |
| | | height: 50px; |
| | | background: url("../img/menu/navtitle.png") no-repeat center center; |
| | | background-size: 100% 100%; |
| | | width: 18%; |
| | | height: 50px; |
| | | /* background: url("../img/menu/navtitle.png") no-repeat center center; */ |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .topMenu { |
| | | width: auto; |
| | | flex: 1; |
| | | height: 60px; |
| | | margin-left: 3%; |
| | | width: auto; |
| | | flex: 1; |
| | | height: 60px; |
| | | margin-left: 3%; |
| | | |
| | | } |
| | | |
| | | .menuContent { |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | /* justify-content: center; */ |
| | | width: 100%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | /* justify-content: center; */ |
| | | } |
| | | |
| | | .topUser { |
| | | |
| | | color: white; |
| | | width: 9%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | padding-left: 10px; |
| | | color: white; |
| | | width: 9%; |
| | | height: 100%; |
| | | display: flex; |
| | | align-items: center; |
| | | padding-left: 10px; |
| | | } |
| | | |
| | | .contentDiv { |
| | | margin-left: 1%; |
| | | margin-left: 1%; |
| | | } |
| | | |
| | | .ImgMenu { |
| | | /*width: 100%;*/ |
| | | width: 40px; |
| | | height: auto; |
| | | display: flex; |
| | | justify-content: center; |
| | | /*width: 100%;*/ |
| | | width: 40px; |
| | | height: auto; |
| | | display: flex; |
| | | justify-content: center; |
| | | } |
| | | |
| | | .menuImage { |
| | | width: 40px; |
| | | height: 40px; |
| | | width: 40px; |
| | | height: 40px; |
| | | } |
| | | |
| | | .menulabel { |
| | | font-size: 15px; |
| | | font-family: Source Han Sans CN; |
| | | text-align: left; |
| | | padding: 0 10px; |
| | | /*width: 100px;*/ |
| | | /*width: 120px;*/ |
| | | color: #fff |
| | | font-size: 15px; |
| | | font-family: Source Han Sans CN; |
| | | text-align: left; |
| | | padding: 0 10px; |
| | | /*width: 100px;*/ |
| | | /*width: 120px;*/ |
| | | color: #fff |
| | | } |
| | | |
| | | .changeStyle { |
| | | color: #fec801; |
| | | color: #fec801; |
| | | } |
| | | |
| | | .m1 { |
| | | background: url("../img/menu/menu11.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu11.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m2 { |
| | | background: url("../img/menu/menu21.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu21.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m3 { |
| | | background: url("../img/menu/menu31.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu31.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m4 { |
| | | background: url("../img/menu/menu41.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu41.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m5 { |
| | | background: url("../img/menu/menu51.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu51.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m6 { |
| | | background: url("../img/menu/menu61.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu61.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m7 { |
| | | background: url("../img/menu/qwyzt.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/qwyzt.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m11 { |
| | | background: url("../img/menu/menu12.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu12.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m21 { |
| | | background: url("../img/menu/menu22.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu22.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m31 { |
| | | background: url("../img/menu/menu32.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu32.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m41 { |
| | | background: url("../img/menu/menu42.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu42.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m51 { |
| | | background: url("../img/menu/menu52.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu52.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m61 { |
| | | background: url("../img/menu/menu62.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/menu62.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .m71 { |
| | | background: url("../img/menu/qwyzt-h.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | background: url("../img/menu/qwyzt-h.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | |
| | | |
| | | .userName { |
| | | margin: 0px 10px 0 5px; |
| | | /*margin-right: 10px;*/ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 30px; |
| | | align-items: center; |
| | | margin: 0px 10px 0 5px; |
| | | /*margin-right: 10px;*/ |
| | | display: flex; |
| | | justify-content: space-between; |
| | | height: 30px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .userLanguage { |
| | | /*margin: 0px 10px;*/ |
| | | /*margin-top: 10px;*/ |
| | | display: flex; |
| | | height: 30px; |
| | | align-items: center; |
| | | /*margin: 0px 10px;*/ |
| | | /*margin-top: 10px;*/ |
| | | display: flex; |
| | | height: 30px; |
| | | align-items: center; |
| | | } |
| | | |
| | | .userImage { |
| | | width: 20px; |
| | | height: 20px; |
| | | float: left; |
| | | margin-right: 10px; |
| | | width: 20px; |
| | | height: 20px; |
| | | float: left; |
| | | margin-right: 10px; |
| | | } |
| | | |
| | | .user1 { |
| | | /*background: url("../img/user.png") no-repeat;*/ |
| | | background: url("../img/menu/user.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | /*background: url("../img/user.png") no-repeat;*/ |
| | | background: url("../img/menu/user.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | } |
| | | |
| | | .user2 { |
| | | /*background: url("../img/EN.png") no-repeat;*/ |
| | | background: url("../img/menu/en.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | /*background: url("../img/EN.png") no-repeat;*/ |
| | | background: url("../img/menu/en.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .theme { |
| | | background: url("../img/menu/theme.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | background: url("../img/menu/theme.png") no-repeat; |
| | | background-size: 100% 100%; |
| | | cursor: pointer; |
| | | } |
| | | |
| | | .userText { |
| | | font-size: 10px; |
| | | line-height: 15px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | font-size: 10px; |
| | | line-height: 15px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | |
| | | text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.35); |
| | | text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.35); |
| | | } |
| | | |
| | | .TextLanguage { |
| | | font-size: 10px; |
| | | line-height: 15px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | font-size: 10px; |
| | | line-height: 15px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | |
| | | text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.35); |
| | | text-shadow: 0px 1px 2px rgba(0, 0, 0, 0.35); |
| | | } |
| | | |
| | | .elLink { |
| | | margin-left: 5px; |
| | | font-size: 10px; |
| | | margin-bottom: 4px; |
| | | color: white; |
| | | margin-left: 5px; |
| | | font-size: 10px; |
| | | margin-bottom: 4px; |
| | | color: white; |
| | | } |
| | | |
| | | |
| | | |
| | | .topUser .el-link--default:hover { |
| | | color: #409eff !important; |
| | | color: #409eff !important; |
| | | } |
| | | |
| | | .topUser .el-link--default { |
| | | color: white !important; |
| | | color: white !important; |
| | | } |
| | | |
| | | .el-menu { |
| | | border: transparent; |
| | | border: transparent; |
| | | } |
| | | |
| | | .secondMenuDiv { |
| | | position: absolute; |
| | | z-index: 1024; |
| | | margin-top: 15px; |
| | | background: rgba(244, 248, 255, 1); |
| | | box-shadow: 0px 0px 6px 2px rgba(244, 248, 255, 0.85); |
| | | border-radius: 5px; |
| | | border: 1px solid #DCDFE6; |
| | | position: absolute; |
| | | z-index: 1024; |
| | | margin-top: 15px; |
| | | background: rgba(244, 248, 255, 1); |
| | | box-shadow: 0px 0px 6px 2px rgba(244, 248, 255, 0.85); |
| | | border-radius: 5px; |
| | | border: 1px solid #DCDFE6; |
| | | } |
| | | |
| | | .secondMenuDiv div { |
| | | line-height: 30px; |
| | | padding: 10px; |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | text-align: center; |
| | | line-height: 20px; |
| | | min-width: 100px; |
| | | line-height: 30px; |
| | | padding: 10px; |
| | | font-size: 12px; |
| | | font-family: Microsoft YaHei; |
| | | font-weight: 400; |
| | | text-align: center; |
| | | line-height: 20px; |
| | | min-width: 100px; |
| | | } |
| | | |
| | | .secondMenuDiv .changeLiStyle { |
| | | color: #409eff; |
| | | box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1); |
| | | border: 1px solid #409eff; |
| | | /* background: #182E45 */ |
| | | /* |
| | | color: #409eff; |
| | | box-shadow: 0px 1px 3px 0px rgba(0, 0, 0, 0.1); |
| | | border: 1px solid #409eff; |
| | | /* background: #182E45 */ |
| | | /* |
| | | */ |
| | | |
| | | } |
| | | |
| | | .distance-legend { |
| | | bottom: 55px !important; |
| | | bottom: 55px !important; |
| | | } |
| | | |
| | | .ol-scale-line { |
| | | bottom: 70px !important; |
| | | right: 110px |
| | | bottom: 70px !important; |
| | | right: 110px |
| | | } |
| | | |
| | | .ol-scale-line { |
| | | display: block !important; |
| | | display: block !important; |
| | | } |
| | | |
| | | /*.mapTerrain {*/ |
| | |
| | | <template> |
| | | <div class="container"> |
| | | <vue-particles |
| | | :particleOpacity="0.7" |
| | | :particlesNumber="80" |
| | | shapeType="circle" |
| | | :particleSize="4" |
| | | :linesWidth="1" |
| | | :lineLinked="true" |
| | | :lineOpacity="0.4" |
| | | :linesDistance="80" |
| | | :moveSpeed="2" |
| | | :hoverEffect="true" |
| | | hoverMode="grab" |
| | | :clickEffect="false" |
| | | clickMode="bubble" |
| | | > |
| | | <vue-particles :particleOpacity="0.7" |
| | | :particlesNumber="80" |
| | | shapeType="circle" |
| | | :particleSize="4" |
| | | :linesWidth="1" |
| | | :lineLinked="true" |
| | | :lineOpacity="0.4" |
| | | :linesDistance="80" |
| | | :moveSpeed="2" |
| | | :hoverEffect="true" |
| | | hoverMode="grab" |
| | | :clickEffect="false" |
| | | clickMode="bubble"> |
| | | </vue-particles> |
| | | <div class="MapMenu"> |
| | | <iframe |
| | | id="ifream" |
| | | style="border: none" |
| | | width="100%" |
| | | height="100%" |
| | | v-bind:src="reportUrl" |
| | | ></iframe> |
| | | <iframe id="ifream" |
| | | style="border: none" |
| | | width="100%" |
| | | height="100%" |
| | | v-bind:src="reportUrl"></iframe> |
| | | </div> |
| | | <div class="title_img"> |
| | | <img |
| | | src="../assets/img/lg_03.png" |
| | | alt="" |
| | | /> |
| | | <img src="../assets/img/lg_03.png" |
| | | alt="" /> |
| | | </div> |
| | | <div class="login"> |
| | | <div class="login_title"> |
| | | <span>ç¨æ·ç»å½</span> |
| | | </div> |
| | | <el-form |
| | | :model="loginForm" |
| | | :rules="rules" |
| | | ref="loginForm" |
| | | class="loginForm" |
| | | > |
| | | <el-form :model="loginForm" |
| | | :rules="rules" |
| | | ref="loginForm" |
| | | class="loginForm"> |
| | | <el-form-item prop="uid"> |
| | | <el-input |
| | | v-model="loginForm.uid" |
| | | placeholder="è¾å
¥ç»å½è´¦å·" |
| | | class="nobr" |
| | | size="meddle" |
| | | autocomplete="off" |
| | | > |
| | | <i |
| | | slot="prefix" |
| | | class="el-icon-user" |
| | | ></i> |
| | | <el-input v-model="loginForm.uid" |
| | | placeholder="è¾å
¥ç»å½è´¦å·" |
| | | class="nobr" |
| | | size="meddle" |
| | | autocomplete="off"> |
| | | <i slot="prefix" |
| | | class="el-icon-user"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item prop="pwd"> |
| | | <el-input |
| | | show-password |
| | | v-model="loginForm.pwd" |
| | | placeholder="请è¾å
¥ç»å½å¯ç " |
| | | class="nobr" |
| | | autocomplete="off" |
| | | > |
| | | <i |
| | | slot="prefix" |
| | | class="el-icon-lock" |
| | | ></i> |
| | | <el-input show-password |
| | | v-model="loginForm.pwd" |
| | | placeholder="请è¾å
¥ç»å½å¯ç " |
| | | class="nobr" |
| | | autocomplete="off"> |
| | | <i slot="prefix" |
| | | class="el-icon-lock"></i> |
| | | </el-input> |
| | | </el-form-item> |
| | | |
| | | <el-form-item required> |
| | | <el-col :span="18"> |
| | | <el-form-item prop="validCode"> |
| | | <el-input |
| | | v-model="loginForm.validCode" |
| | | placeholder="请è¾å
¥éªè¯ç ï¼å¿½ç¥å¤§å°åï¼" |
| | | class="nobr" |
| | | ></el-input> |
| | | <el-input v-model="loginForm.validCode" |
| | | placeholder="请è¾å
¥éªè¯ç ï¼å¿½ç¥å¤§å°åï¼" |
| | | class="nobr"></el-input> |
| | | </el-form-item> |
| | | </el-col> |
| | | |
| | | <el-col |
| | | :span="6" |
| | | align="right" |
| | | > |
| | | <validCode |
| | | v-model="validCode" |
| | | ref="refresh" |
| | | @sendData="getCode" |
| | | ></validCode> |
| | | <el-col :span="6" |
| | | align="right"> |
| | | <validCode v-model="validCode" |
| | | ref="refresh" |
| | | @sendData="getCode"></validCode> |
| | | </el-col> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <img |
| | | src="../assets/img/zhengshu.png" |
| | | alt="" |
| | | /><span style="color: black">è¯ä¹¦å®è£
䏿·»å ä¿¡ä»»ç«ç¹</span> |
| | | <img src="../assets/img/zhengshu.png" |
| | | alt="" /><span style="color: black">è¯ä¹¦å®è£
䏿·»å ä¿¡ä»»ç«ç¹</span> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <img |
| | | src="../assets/img/document.png" |
| | | alt="" |
| | | /><span style="color: black">使ç¨å¸®å©ææ¡£</span> |
| | | <img src="../assets/img/document.png" |
| | | alt="" /><span style="color: black">使ç¨å¸®å©ææ¡£</span> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | type="primary" |
| | | class="nobr loginbtn" |
| | | style="" |
| | | :loading="loading" |
| | | @click="submitForm('loginForm')" |
| | | >ç»å½</el-button> |
| | | <el-button type="primary" |
| | | class="nobr loginbtn" |
| | | style="" |
| | | :loading="loading" |
| | | @click="submitForm('loginForm')">ç»å½</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | |
| | | export default { |
| | | components: { validCode }, |
| | | data() { |
| | | let validUserName = (rule, value, callback) => { |
| | | if (!value) { |
| | | data () { |
| | | let validUserName=(rule,value,callback) => { |
| | | if(!value) { |
| | | return callback(new Error("ç¨æ·åä¸è½ä¸ºç©º")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | |
| | | let validPassword = (rule, value, callback) => { |
| | | if (!value) { |
| | | let validPassword=(rule,value,callback) => { |
| | | if(!value) { |
| | | return callback(new Error("å¯ç ä¸è½ä¸ºç©º")); |
| | | } else { |
| | | callback(); |
| | | } |
| | | }; |
| | | |
| | | const checkValidCode = (rule, value, callback) => { |
| | | if (!value) { |
| | | const checkValidCode=(rule,value,callback) => { |
| | | if(!value) { |
| | | callback(new Error("请è¾å
¥éªè¯ç ")); |
| | | } else if (value.toUpperCase() !== this.validCode.toUpperCase()) { |
| | | } else if(value.toUpperCase()!==this.validCode.toUpperCase()) { |
| | | callback(new Error("éªè¯ç 䏿£ç¡®")); |
| | | } else { |
| | | callback(); |
| | |
| | | pwd: "", |
| | | }, |
| | | rules: { |
| | | uid: [{ validator: validUserName, trigger: "blur" }], |
| | | pwd: [{ validator: validPassword, trigger: "blur" }], |
| | | validCode: [{ validator: checkValidCode, trigger: "blur" }], |
| | | uid: [{ validator: validUserName,trigger: "blur" }], |
| | | pwd: [{ validator: validPassword,trigger: "blur" }], |
| | | validCode: [{ validator: checkValidCode,trigger: "blur" }], |
| | | showSessionId: "", |
| | | reportUrl: "", |
| | | }, |
| | | }; |
| | | }, |
| | | mounted() { |
| | | mounted () { |
| | | this.getpublickey(); |
| | | }, |
| | | methods: { |
| | | handlePaste(e) { |
| | | handlePaste (e) { |
| | | e.preventDefault(); |
| | | }, |
| | | // è·åvuexä¸Actionséçæ¹æ³ |
| | | ...mapActions(["login", "getpublickey"]), |
| | | getCode(data) { |
| | | this.validCode = data; //å¨dataä¸å®ä¹ä¸ä¸ª validCode:'',ç¨æ¥è®°å½éªè¯ç ã |
| | | ...mapActions(["login","getpublickey"]), |
| | | getCode (data) { |
| | | this.validCode=data; //å¨dataä¸å®ä¹ä¸ä¸ª validCode:'',ç¨æ¥è®°å½éªè¯ç ã |
| | | }, |
| | | |
| | | submitForm(formName) { |
| | | submitForm (formName) { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.loading = true; |
| | | if(valid) { |
| | | this.loading=true; |
| | | this.login(this.loginForm) |
| | | .then((response) => { |
| | | if (response.code != 200) { |
| | | this.loading = false; |
| | | if(response.code!=200) { |
| | | this.loading=false; |
| | | this.$message({ |
| | | message: response.msg, |
| | | type: "error", |
| | |
| | | return; |
| | | } |
| | | |
| | | if (response.msg != "") { |
| | | if(response.msg!="") { |
| | | this.$message({ |
| | | message: response.msg, |
| | | type: "warning", |
| | |
| | | this.setCookies(response); |
| | | |
| | | getPerms().then((res) => { |
| | | if (res.code == 200) { |
| | | this.$store.commit("getPermsEntity", res.result); |
| | | if(res.code==200) { |
| | | this.$store.commit("getPermsEntity",res.result); |
| | | |
| | | if (res.result.length != 0) { |
| | | sessionStorage.setItem("routerName", "/Thematic"); |
| | | sessionStorage.setItem("changeSelectStyle", 1); |
| | | this.$router.push("/"); |
| | | if(res.result.length!=0) { |
| | | |
| | | // sessionStorage.setItem("routerName","/Synthesis"); |
| | | // sessionStorage.setItem("routerName", "/Thematic"); |
| | | // sessionStorage.setItem("changeSelectStyle",1); |
| | | // this.$router.push("/"); |
| | | sessionStorage.setItem("changeSelectStyle",1) |
| | | this.$router.push("/Synthesis") |
| | | } else { |
| | | this.$message({ |
| | | message: "请æ¨è系管çååé
è§è²èå", |
| | | type: "error", |
| | | }); |
| | | } |
| | | this.loading = false; |
| | | this.loading=false; |
| | | } else { |
| | | this.loading = false; |
| | | this.loading=false; |
| | | console.log("error submit!!"); |
| | | } |
| | | }); |
| | | |
| | | this.loading = false; |
| | | this.loading=false; |
| | | //è°ç¨å½æ¥å£ |
| | | }) |
| | | .catch((response) => { |
| | | this.loading = false; |
| | | this.loading=false; |
| | | }); |
| | | //妿ç»å½å¤±è´¥ï¼éè¦å·æ°éªè¯ç ç |
| | | this.$refs.refresh.createdCode(); |
| | | this.validCode = ""; //æ¸
空éªè¯ç è¾å
¥æ¡çå
容 |
| | | this.validCode=""; //æ¸
空éªè¯ç è¾å
¥æ¡çå
容 |
| | | } else { |
| | | this.loading = false; |
| | | this.loading=false; |
| | | console.log("error submit!!"); |
| | | return false; |
| | | } |
| | | }); |
| | | }, |
| | | setCookies(res) { |
| | | var timeData = moment(res.result.expire).format("YYYY-MM-DD HH:mm:ss"); |
| | | var LfPrems = { |
| | | setCookies (res) { |
| | | var timeData=moment(res.result.expire).format("YYYY-MM-DD HH:mm:ss"); |
| | | var LfPrems={ |
| | | token: res.result.token, |
| | | uname: res.result.uname, |
| | | time: timeData, |
| | |
| | | expire: res.result.expire, |
| | | autoLogOut: res.result.autoLogOut, |
| | | }; |
| | | LfPrems = JSON.stringify(LfPrems); |
| | | localStorage.setItem("LFToken", LfPrems); |
| | | LfPrems=JSON.stringify(LfPrems); |
| | | localStorage.setItem("LFToken",LfPrems); |
| | | }, |
| | | enterLogin() { |
| | | document.onkeydown = (e) => { |
| | | e = window.event || e; |
| | | enterLogin () { |
| | | document.onkeydown=(e) => { |
| | | e=window.event||e; |
| | | |
| | | if ( |
| | | this.$route.path == "/login" && |
| | | (e.code == "Enter" || e.code == "enter" || e.code == "NumpadEnter") |
| | | if( |
| | | this.$route.path=="/login"&& |
| | | (e.code=="Enter"||e.code=="enter"||e.code=="NumpadEnter") |
| | | ) { |
| | | //æéè¦æåè°ç¨1.ç»å½æ ¡éªæ¹æ³ |
| | | //this.login(); |
| | |
| | | } |
| | | }; |
| | | }, |
| | | startURL() { |
| | | var url = window.location.href; |
| | | var testurl = ""; |
| | | if (url.indexOf("web") != -1) { |
| | | testurl = "/web"; |
| | | startURL () { |
| | | var url=window.location.href; |
| | | var testurl=""; |
| | | if(url.indexOf("web")!=-1) { |
| | | testurl="/web"; |
| | | } |
| | | this.reportUrl = |
| | | window.location.origin + testurl + "/mapscreen/index.html"; |
| | | this.reportUrl= |
| | | window.location.origin+testurl+"/mapscreen/index.html"; |
| | | }, |
| | | }, |
| | | created() { |
| | | created () { |
| | | this.startURL(); |
| | | this.enterLogin(); |
| | | }, |
| | |
| | | <template> |
| | | <div |
| | | class="NavBox" |
| | | @click.stop |
| | | > |
| | | <div class="NavBox" |
| | | @click.stop> |
| | | <div class="topBox"> |
| | | <div class="topTitle"></div> |
| | | <div class="topMenu"> |
| | | <div class="menuContent"> |
| | | <div |
| | | class="contentDiv" |
| | | @click="setMenuMove(index, item)" |
| | | v-for="(item, index) in listMenu" |
| | | > |
| | | <div class="contentDiv" |
| | | @click="setMenuMove(index, item)" |
| | | v-for="(item, index) in listMenu"> |
| | | <div style="display: flex;align-items: center"> |
| | | <div class="ImgMenu"> |
| | | <div |
| | | class="menuImage" |
| | | :class="changeSelectStyle == index ? item.checkClass : item.css" |
| | | ></div> |
| | | <div class="menuImage" |
| | | :class="changeSelectStyle == index ? item.checkClass : item.css"></div> |
| | | </div> |
| | | <div |
| | | class="menulabel" |
| | | :class="{ changeStyle: changeSelectStyle == index }" |
| | | > |
| | | <div class="menulabel" |
| | | :class="{ changeStyle: changeSelectStyle == index }"> |
| | | <span v-show="language"> {{ item.cnName }}</span> <span v-show="!language"> {{ item.enName }}</span> |
| | | </div> |
| | | </div> |
| | | <div |
| | | class="secondMenuDiv subpage_Div" |
| | | v-show="index == showFlag ? true :false" |
| | | > |
| | | <div |
| | | v-for="res in item.children" |
| | | @click="setLiClick(res,index)" |
| | | :class="{ changeLiStyle: changeliSelect == res.cnName }" |
| | | > |
| | | <div class="secondMenuDiv subpage_Div" |
| | | v-show="index == showFlag ? true :false"> |
| | | <div v-for="res in item.children" |
| | | @click="setLiClick(res,index)" |
| | | :class="{ changeLiStyle: changeliSelect == res.cnName }"> |
| | | <span v-show="language"> {{ res.cnName }}</span> <span v-show="!language"> {{ res.enName }}</span> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="topUser"> |
| | | <div class="userLanguage"> |
| | | <div |
| | | class="userImage theme" |
| | | @click="themeChange" |
| | | ></div> |
| | | <div |
| | | class="userImage user2" |
| | | @click="switchLang" |
| | | ></div> |
| | | <div class="userImage theme" |
| | | @click="themeChange"></div> |
| | | <!-- <div class="userImage user2" |
| | | @click="switchLang"></div> --> |
| | | |
| | | </div> |
| | | <div class="userName"> |
| | | <div class="userImage user1"></div> |
| | | <div class="userText"> |
| | | <span>{{ this.$store.state.uname }}</span> |
| | | <el-link |
| | | @click="logOut" |
| | | :underline="false" |
| | | class="elLink" |
| | | >{{ $t('common.logout') }}</el-link> |
| | | <el-link @click="logOut" |
| | | :underline="false" |
| | | class="elLink">{{ $t('common.logout') }}</el-link> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </template> |
| | | |
| | | <script> |
| | | import { logout, selectMenuRecursive, sign_insertOpLog } from '@/api/api'; |
| | | import { removeToken, getToken } from '@/utils/auth'; |
| | | import { logout,selectMenuRecursive,sign_insertOpLog } from '@/api/api'; |
| | | import { removeToken,getToken } from '@/utils/auth'; |
| | | import customElMenu from '../components/customElMenu.vue'; |
| | | import { queryMenuTree, getPerms } from '../api/api'; |
| | | import { queryMenuTree,getPerms } from '../api/api'; |
| | | import colorChange from '../views/maintenance/colorChange.vue'; |
| | | import { containsCoordinate } from 'ol/extent'; |
| | | import axios from "axios"; |
| | | import Vue from 'vue'; |
| | | import $ from 'jquery' |
| | | export default { |
| | |
| | | customElMenu, |
| | | colorChange, |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | |
| | | themeColor: true, |
| | |
| | | ] |
| | | }; |
| | | }, |
| | | created() { }, |
| | | mounted() { |
| | | this.$store.state.themeflag = false; |
| | | created () { }, |
| | | mounted () { |
| | | this.$store.state.themeflag=false; |
| | | $("#app").removeClass("Black_theme"); |
| | | this.getMenuTree(); |
| | | if (sessionStorage.getItem('changeliSelect')) { |
| | | this.$set(this, 'changeliSelect', sessionStorage.getItem('changeliSelect')) |
| | | if(sessionStorage.getItem('changeliSelect')) { |
| | | this.$set(this,'changeliSelect',sessionStorage.getItem('changeliSelect')) |
| | | // this.changeliSelect = sessionStorage.getItem('changeliSelect') |
| | | } |
| | | document.body.addEventListener('click', () => { |
| | | this.showFlag = null; |
| | | }, false); |
| | | document.body.addEventListener('click',() => { |
| | | this.showFlag=null; |
| | | },false); |
| | | // this.$bus.$on('closeMenuSecond', res => { |
| | | // this.showFlag = null; |
| | | // }) |
| | | window.addEventListener('message', (e) => { |
| | | window.addEventListener('message',(e) => { |
| | | |
| | | this.showFlag = null; |
| | | this.showFlag=null; |
| | | }) |
| | | }, |
| | | computed: {}, |
| | | methods: { |
| | | closeSecondMenu() { |
| | | this.showFlag = null |
| | | closeSecondMenu () { |
| | | this.showFlag=null |
| | | }, |
| | | themeChange() { |
| | | this.$store.state.themeflag = !this.$store.state.themeflag; |
| | | if (this.$store.state.themeflag == true) { |
| | | themeChange () { |
| | | this.$store.state.themeflag=!this.$store.state.themeflag; |
| | | if(this.$store.state.themeflag==true) { |
| | | $("#app").addClass("Black_theme"); |
| | | |
| | | } else { |
| | |
| | | } |
| | | |
| | | }, |
| | | async getCookies() { |
| | | var boolean = this.getTimeCookies(); |
| | | if (boolean != true) { |
| | | async getCookies () { |
| | | var boolean=this.getTimeCookies(); |
| | | if(boolean!=true) { |
| | | this.$router.push('/login'); |
| | | return; |
| | | } |
| | | if (this.$store.state.permsEntity.length == 0) { |
| | | const data = await getPerms(); |
| | | this.$store.state.permsEntity = data.result; |
| | | if(this.$store.state.permsEntity.length==0) { |
| | | const data=await getPerms(); |
| | | this.$store.state.permsEntity=data.result; |
| | | } |
| | | |
| | | this.$store.state.uname = JSON.parse( |
| | | this.$store.state.uname=JSON.parse( |
| | | localStorage.getItem('LFToken') |
| | | ).uname; |
| | | this.$store.state.unid = JSON.parse( |
| | | this.$store.state.unid=JSON.parse( |
| | | localStorage.getItem('LFToken') |
| | | ).userid; |
| | | this.$router.push('/'); |
| | | }, |
| | | getTimeCookies() { |
| | | if (!localStorage.getItem('LFToken')) { |
| | | getTimeCookies () { |
| | | if(!localStorage.getItem('LFToken')) { |
| | | return false |
| | | } |
| | | var time1 = new Date(JSON.parse(localStorage.getItem('LFToken')).time); |
| | | var time2 = new Date(); |
| | | if (time2 > time1) { |
| | | var time1=new Date(JSON.parse(localStorage.getItem('LFToken')).time); |
| | | var time2=new Date(); |
| | | if(time2>time1) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | |
| | | }, |
| | | |
| | | //主é¢åæ¢ |
| | | setThemeColors() { }, |
| | | async signInsertOpLog(m1, m2) { |
| | | var obj = { |
| | | setThemeColors () { }, |
| | | async signInsertOpLog (m1,m2) { |
| | | var obj={ |
| | | m1: m1, |
| | | m2: m2, |
| | | } |
| | | const data = await sign_insertOpLog(obj); |
| | | const data=await sign_insertOpLog(obj); |
| | | }, |
| | | //é¼ æ ç§»å
¥èåäºä»¶ |
| | | setMenuMove(index, item) { |
| | | setMenuMove (index,item) { |
| | | |
| | | if (item.perms != null && item.perms != "") { |
| | | if(item.perms!=null&&item.perms!="") { |
| | | this.$router.push(item.url); |
| | | if (this.showFlag != null) { |
| | | if(this.showFlag!=null) { |
| | | |
| | | this.changeliSelect = '%%'; |
| | | this.showFlag = null; |
| | | this.changeliSelect='%%'; |
| | | this.showFlag=null; |
| | | } |
| | | if (item.url == "Thematic") { |
| | | this.signInsertOpLog("综åå±ç¤º", item.cnName) |
| | | if(item.url=="Thematic") { |
| | | this.signInsertOpLog("综åå±ç¤º",item.cnName) |
| | | } |
| | | |
| | | this.changeSelectStyle = index; |
| | | sessionStorage.setItem('changeSelectStyle', index) |
| | | this.changeSelectStyle=index; |
| | | sessionStorage.setItem('changeSelectStyle',index) |
| | | } else { |
| | | if (this.showFlag != index) { |
| | | this.showFlag = index; |
| | | if(this.showFlag!=index) { |
| | | this.showFlag=index; |
| | | } else { |
| | | this.showFlag = null; |
| | | this.showFlag=null; |
| | | } |
| | | } |
| | | // |
| | | if (index === 4 || index === 5 || index === 6) { |
| | | if(index===4||index===5||index===6) { |
| | | sessionStorage.removeItem('changeliSelect') |
| | | this.$set(this, 'changeliSelect', null) |
| | | this.$set(this,'changeliSelect',null) |
| | | } |
| | | |
| | | |
| | | }, |
| | | closeAllChildren() { |
| | | var val = this.listMenu |
| | | for (var i = 0; i < val.length; i++) { |
| | | let newItem = val[i]; |
| | | newItem.show = false; |
| | | closeAllChildren () { |
| | | var val=this.listMenu |
| | | for(var i=0;i<val.length;i++) { |
| | | let newItem=val[i]; |
| | | newItem.show=false; |
| | | |
| | | Vue.set(val, i, newItem); |
| | | Vue.set(val,i,newItem); |
| | | |
| | | } |
| | | }, |
| | | setShowFalseDiv(bolean) { |
| | | var index = this.showFlag; |
| | | if (index != null) { |
| | | let newItem = this.listMenu[index]; |
| | | setShowFalseDiv (bolean) { |
| | | var index=this.showFlag; |
| | | if(index!=null) { |
| | | let newItem=this.listMenu[index]; |
| | | |
| | | newItem.show = bolean; |
| | | Vue.set(this.listMenu, index, newItem); |
| | | newItem.show=bolean; |
| | | Vue.set(this.listMenu,index,newItem); |
| | | } |
| | | }, |
| | | setLiClick(res, index) { |
| | | this.changeSelectStyle = index; |
| | | sessionStorage.setItem('changeSelectStyle', index) |
| | | setLiClick (res,index) { |
| | | this.changeSelectStyle=index; |
| | | sessionStorage.setItem('changeSelectStyle',index) |
| | | sessionStorage.removeItem('hanleselectmochaitmo') |
| | | sessionStorage.removeItem('hanleselectindex') |
| | | |
| | | // this.signInsertOpLog(this.listMenu[index].cnName, res.cnName) |
| | | setTimeout(() => { |
| | | this.changeliSelect = res.cnName; |
| | | sessionStorage.setItem('changeliSelect', res.cnName) |
| | | if (res.url.indexOf('{fmeHost}') != -1) { |
| | | this.$store.reporturl = res.url; |
| | | sessionStorage.setItem('iframehttpurl', this.$store.reporturl) |
| | | this.changeliSelect=res.cnName; |
| | | sessionStorage.setItem('changeliSelect',res.cnName) |
| | | if(res.url.indexOf('{fmeHost}')!=-1) { |
| | | this.$store.reporturl=res.url; |
| | | sessionStorage.setItem('iframehttpurl',this.$store.reporturl) |
| | | this.$router.push('/QualityInspection'); |
| | | // if (location.href.indexOf('/WareInspection') == -1) { |
| | | // this.$store.reporturl = res.url; |
| | |
| | | // this.$bus.$emit('changeNaveUrl', res.url); |
| | | // } |
| | | } else { |
| | | this.$store.reporturl = null; |
| | | sessionStorage.setItem('iframehttpurl', null) |
| | | this.$store.reporturl=null; |
| | | sessionStorage.setItem('iframehttpurl',null) |
| | | // sessionStorage.setItem('changeliSelect', null) |
| | | this.$router.push(res.url); |
| | | this.$store.commit('currentPerms', res.perms); |
| | | this.$store.commit('currentPerms',res.perms); |
| | | } |
| | | this.setShowFalseDiv(false) |
| | | }, 100) |
| | | },100) |
| | | |
| | | }, |
| | | async getMenuTree() { |
| | | async getMenuTree () { |
| | | this.getCookies(); |
| | | const data = await queryMenuTree(); |
| | | const data=await queryMenuTree(); |
| | | var that=this; |
| | | |
| | | var that = this; |
| | | if (data.code == 200) { |
| | | that.showTreeData(data) |
| | | }, |
| | | showTreeData (data) { |
| | | var that=this; |
| | | if(data.code==200) { |
| | | |
| | | if (data.result.length != 0) { |
| | | let menuLists = data.result.filter((value) => { |
| | | return value.pid == 1; |
| | | if(data.result.length!=0) { |
| | | let menuLists=data.result.filter((value) => { |
| | | return value.pid==1; |
| | | }); |
| | | |
| | | that.menuList = menuLists; |
| | | that.menuList=menuLists; |
| | | |
| | | that.setMenuTree(menuLists); |
| | | } else { |
| | |
| | | } |
| | | } |
| | | }, |
| | | async setMenuTree(res) { |
| | | async setMenuTree (res) { |
| | | |
| | | for (var i in res) { |
| | | res[i].checkClass = res[i].css + '1'; |
| | | res[i].show = false; //æ§å¶æ¾é |
| | | for(var i in res) { |
| | | res[i].checkClass=res[i].css+'1'; |
| | | res[i].show=false; //æ§å¶æ¾é |
| | | |
| | | if (res[i].perms == null || res[i].perms == "") { |
| | | const result = await selectMenuRecursive({ id: res[i].id }); |
| | | if(res[i].perms==null||res[i].perms=="") { |
| | | const result=await selectMenuRecursive({ id: res[i].id }); |
| | | |
| | | if (result.code == 200) { |
| | | if(result.code==200) { |
| | | |
| | | res[i].children = result.result.filter((value) => { |
| | | return value.isShow == 1; |
| | | res[i].children=result.result.filter((value) => { |
| | | return value.isShow==1; |
| | | }) |
| | | .filter((value) => { |
| | | return value.pid == res[i].id; |
| | | return value.pid==res[i].id; |
| | | }); |
| | | |
| | | } |
| | |
| | | // this.changeSelectStyle = this.listMenu.length - 1; |
| | | // } |
| | | |
| | | this.changeSelectStyle = sessionStorage.getItem('changeSelectStyle') |
| | | this.changeSelectStyle=sessionStorage.getItem('changeSelectStyle') |
| | | // var strartMneu = res[i].children[0]; |
| | | // this.$store.commit('currentPerms', strartMneu.perms); |
| | | // this.changeliSelect = strartMneu.cnName; |
| | |
| | | } |
| | | } |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | // console.log(cloneData); |
| | | if (cloneData.length != 0) { |
| | | if(cloneData.length!=0) { |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length>0? (father.children=branchArr):''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.pid == 1; // è¿åä¸çº§èå |
| | | return father.pid==1; // è¿åä¸çº§èå |
| | | }); |
| | | } else { |
| | | this.$message({ |
| | |
| | | }); |
| | | } |
| | | }, |
| | | logOut() { |
| | | this.$confirm('确认æ¯å¦éåºç»å½?', 'æç¤º', { |
| | | logOut () { |
| | | this.$confirm('确认æ¯å¦éåºç»å½?','æç¤º',{ |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }) |
| | | .then(async () => { |
| | | const data = await logout({ token: getToken() }); |
| | | const data=await logout({ token: getToken() }); |
| | | // console.log(data); |
| | | if (data.code != 200) { |
| | | if(data.code!=200) { |
| | | return this.$message.error('éåºç»å½å¤±è´¥'); |
| | | } |
| | | removeToken(); |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | switchLang() { |
| | | switchLang () { |
| | | //å½åen |
| | | if (this.lang == 'en') { |
| | | if(this.lang=='en') { |
| | | //è¯è¨æ¢æzh |
| | | this.lang = 'zh'; |
| | | this.language = true; |
| | | this.$store.state.language = true; |
| | | this.lang='zh'; |
| | | this.language=true; |
| | | this.$store.state.language=true; |
| | | //èåæ¢ä¸ºzh |
| | | this.$store.commit('changeLang', 'zh'); |
| | | this.$store.commit('changeLang','zh'); |
| | | //i18æ¢æzh |
| | | this.$i18n.locale = this.lang; |
| | | this.$i18n.locale=this.lang; |
| | | } |
| | | //å½åzh |
| | | else { |
| | | this.lang = 'en'; |
| | | this.language = false; |
| | | this.$store.state.language = false; |
| | | this.$i18n.locale = this.lang; |
| | | this.$store.commit('changeLang', 'en'); //ä¼ éç¹å»çèç¹ |
| | | this.lang='en'; |
| | | this.language=false; |
| | | this.$store.state.language=false; |
| | | this.$i18n.locale=this.lang; |
| | | this.$store.commit('changeLang','en'); //ä¼ éç¹å»çèç¹ |
| | | } |
| | | }, |
| | | handleselect(index, indexPath, e) { |
| | | handleselect (index,indexPath,e) { |
| | | // console.log(e.$attrs.perms); |
| | | this.$store.commit('currentPerms', e.$attrs.perms.perms); |
| | | if (Window.ws != null) { |
| | | this.$store.commit('currentPerms',e.$attrs.perms.perms); |
| | | if(Window.ws!=null) { |
| | | Window.ws.close(); |
| | | Window.ws.onclose = () => { |
| | | Window.ws.onclose=() => { |
| | | console.log('æå¡å¨å
³é'); |
| | | }; |
| | | Window.ws = null; |
| | | Window.ws=null; |
| | | } |
| | | debugger |
| | | if (index.indexOf('{fmeHost}') != -1) { |
| | | debugger |
| | | if(index.indexOf('{fmeHost}')!=-1) { |
| | | this.$router.push('/databaseMonitoring'); |
| | | this.$store.commit('getIframe', index); |
| | | } else if (isNaN(Number(index))) { |
| | | this.$store.commit('getIframe',index); |
| | | } else if(isNaN(Number(index))) { |
| | | this.$router.push(index); |
| | | } |
| | | }, |
| | | }, |
| | | watch: { |
| | | $route() { |
| | | let str = this.$route.path; |
| | | if (str[0] == '/') { |
| | | this.activeIndex = str.slice(1); |
| | | $route () { |
| | | let str=this.$route.path; |
| | | if(str[0]=='/') { |
| | | this.activeIndex=str.slice(1); |
| | | } |
| | | }, |
| | | }, |
| | | created() { |
| | | this.$store.reporturl = null; |
| | | let str = this.$route.path; |
| | | if (str[0] == '/') { |
| | | this.activeIndex = str.slice(1); |
| | | created () { |
| | | this.$store.reporturl=null; |
| | | let str=this.$route.path; |
| | | if(str[0]=='/') { |
| | | this.activeIndex=str.slice(1); |
| | | } |
| | | }, |
| | | }; |
| | |
| | | import QualityInspection from '@/views/PackageTwo/index.vue'; //æ°æ®è´¨æ£-å
¥åºè´¨æ£ |
| | | |
| | | |
| | | // éä¿¡èµæºç®¡ç |
| | | import commResource from '../views/comm/commResource/commResource.vue' |
| | | // éä¿¡ç½ç³»ç®¡ç |
| | | import commNetwork from '../views/comm/commNetwork/commNetwork.vue' |
| | | // éä¿¡æ³å®ç®¡ç |
| | | import commScenario from '../views/comm/commScenario/commScenario.vue' |
| | | // å¤åªä½ç´ æç®¡ç |
| | | import multimedia from '../views/comm/multimedia/multimedia.vue' |
| | | // ä»¿çæ¨¡å管ç |
| | | import simulationModel from '../views/comm/simulationModel/simulationModel.vue' |
| | | //éä¿¡æ¹æ¡ç®¡ç |
| | | import commScheme from '../views/comm/commScheme/commScheme.vue' |
| | | //æ¹æ¡æå¶ |
| | | import planFormulation from '../views/comm/planFormulation/planFormulation.vue' |
| | | //æ¹æ¡è®²è¯ |
| | | import planReview from '../views/comm/planReview/planReview.vue' |
| | | //éä¿¡æ¯ä¼¤å½±åè¯ä¼° |
| | | import damageAssess from '../views/comm/damageAssess/damageAssess.vue' |
| | | |
| | | |
| | | |
| | | const originalPush = VueRouter.prototype.push; |
| | |
| | | component: Home, |
| | | redirect: '/Synthesis', |
| | | children: [ |
| | | { |
| | | path: '/damageAssess', |
| | | component: damageAssess, |
| | | name: 'damageAssess', |
| | | meta: { |
| | | title: 'éä¿¡æ¯ä¼¤å½±åè¯ä¼°', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/planFormulation', |
| | | component: planFormulation, |
| | | name: 'planFormulation', |
| | | meta: { |
| | | title: 'éä¿¡æ¹æ¡æå¶', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/planReview', |
| | | component: planReview, |
| | | name: 'planReview', |
| | | meta: { |
| | | title: 'æ¹æ¡è®²è¯', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/commScheme', |
| | | component: commScheme, |
| | | name: 'commScheme', |
| | | meta: { |
| | | title: 'éä¿¡æ¹æ¡ç®¡ç', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/simulationModel', |
| | | component: simulationModel, |
| | | name: 'simulationModel', |
| | | meta: { |
| | | title: 'ä»¿çæ¨¡å管ç', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/multimedia', |
| | | component: multimedia, |
| | | name: 'multimedia', |
| | | meta: { |
| | | title: 'å¤åªä½ç´ æç®¡ç', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/commScenario', |
| | | component: commScenario, |
| | | name: 'commScenario', |
| | | meta: { |
| | | title: 'éä¿¡æ³å®ç®¡ç', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/commNetwork', |
| | | component: commNetwork, |
| | | name: 'commNetwork', |
| | | meta: { |
| | | title: 'éä¿¡ç½ç³»ç®¡ç', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/commResource', |
| | | component: commResource, |
| | | name: 'commResource', |
| | | meta: { |
| | | title: 'éä¿¡èµæºç®¡ç', |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | { |
| | | path: '/WareInspection', |
| | | component: WareInspection, |
| | |
| | | requireAuth: true, // æ è¯è¯¥è·¯ç±æ¯å¦éè¦ç»å½ |
| | | }, |
| | | }, |
| | | |
| | | ], |
| | | }, |
| | | ]; |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="contentBox"> |
| | | |
| | | <div class="box" |
| | | ref="box"> |
| | | <div class="left box_div"> |
| | | <el-menu :default-active="activeIndex" |
| | | background-color="transparent" |
| | | @select="handleselect"> |
| | | <customElMenu :menuData="menuList"></customElMenu> |
| | | </el-menu> |
| | | </div> |
| | | <div class="resize" |
| | | title="æ¶ç¼©ä¾§è¾¹æ "> |
| | | â® |
| | | </div> |
| | | <div class="mid box_div"> |
| | | <My-bread :list="[ |
| | | `éä¿¡èµæºç®¡ç`, |
| | | nodeName, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { selectMenuRecursive,queryMenuTree,sign_insertOpLog } from '@/api/api.js' |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | import customElMenu from "@/components/customElMenu.vue"; |
| | | export default { |
| | | components: { |
| | | MyBread, |
| | | customElMenu |
| | | |
| | | }, |
| | | data () { |
| | | return { |
| | | setMenuFlag: ' ', |
| | | activeIndex: ' ', |
| | | oriData: [], //åå§æ æ°æ® |
| | | dirData: [], //elæ æ°æ® |
| | | newData: [], //æå¨åæ°æ® |
| | | lang: 'zh', |
| | | |
| | | menuList: [], |
| | | editTitle: '', |
| | | showPopover: false, |
| | | showEditInfoWrapper: false, |
| | | showEdit: false, |
| | | editMenu: false, |
| | | editCatalogue: false, |
| | | editUnit: false, |
| | | itemdetail: {}, |
| | | formLabelWidth: '70px', |
| | | pid: null, |
| | | nodeName: null, |
| | | }; |
| | | }, |
| | | created () { }, |
| | | mounted () { |
| | | |
| | | this.getTreeData(); |
| | | //左峿å |
| | | this.dragControllerDiv(); |
| | | }, |
| | | methods: { |
| | | //左峿å |
| | | dragControllerDiv: function() { |
| | | var resize=document.getElementsByClassName('resize'); |
| | | var left=document.getElementsByClassName('left'); |
| | | var mid=document.getElementsByClassName('mid'); |
| | | var box=document.getElementsByClassName('box'); |
| | | for(let i=0;i<resize.length;i++) { |
| | | // é¼ æ æä¸äºä»¶ |
| | | resize[i].onmousedown=function(e) { |
| | | //é¢è²æ¹åæé |
| | | resize[i].style.background='#818181'; |
| | | var startX=e.clientX; |
| | | resize[i].left=resize[i].offsetLeft; |
| | | // é¼ æ æå¨äºä»¶ |
| | | document.onmousemove=function(e) { |
| | | var endX=e.clientX; |
| | | var moveLen=resize[i].left+(endX-startX); // ï¼endx-startxï¼=ç§»å¨çè·ç¦»ãresize[i].left+ç§»å¨çè·ç¦»=左边åºåæåç宽度 |
| | | var maxT=box[i].clientWidth-resize[i].offsetWidth; // 容å¨å®½åº¦ - 左边åºåç宽度 = å³è¾¹åºåç宽度 |
| | | |
| | | if(moveLen<205) moveLen=205; // 左边åºåçæå°å®½åº¦ä¸º32px |
| | | if(moveLen>maxT-300) moveLen=maxT-300; //å³è¾¹åºåæå°å®½åº¦ä¸º150px |
| | | |
| | | resize[i].style.left=moveLen; // 设置左侧åºåç宽度 |
| | | |
| | | for(let j=0;j<left.length;j++) { |
| | | left[j].style.width=moveLen+'px'; |
| | | mid[j].style.width=(box[i].clientWidth-moveLen-10)+'px'; |
| | | } |
| | | }; |
| | | // é¼ æ æ¾å¼äºä»¶ |
| | | document.onmouseup=function(evt) { |
| | | //é¢è²æ¢å¤ |
| | | resize[i].style.background='#d6d6d6'; |
| | | document.onmousemove=null; |
| | | document.onmouseup=null; |
| | | resize[i].releaseCapture&&resize[i].releaseCapture(); //å½ä½ ä¸å¨éè¦ç»§ç»è·å¾é¼ æ æ¶æ¯å°±è¦åºè¯¥è°ç¨ReleaseCapture()éæ¾æ |
| | | }; |
| | | resize[i].setCapture&&resize[i].setCapture(); //è¯¥å½æ°å¨å±äºå½å线ç¨çæå®çªå£éè®¾ç½®é¼ æ æè· |
| | | return false; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | //è·åæ |
| | | async getTreeData () { |
| | | const data=await queryMenuTree(); |
| | | |
| | | let menuLists=data.result.filter((value) => { |
| | | return value.url=="/commNetWork"; |
| | | }); |
| | | |
| | | this.pid=menuLists[0].id; |
| | | |
| | | const res=await selectMenuRecursive({ id: menuLists[0].id }); |
| | | |
| | | if(res.code==200) { |
| | | if(res.result.length!=0) { |
| | | let menuList=res.result.filter((value) => { |
| | | return value.type==1; |
| | | }); |
| | | this.menuList=this.treeData(menuList); |
| | | |
| | | this.m1=this.menuList[0].cnName; |
| | | this.setViewController(this.menuList[0]); |
| | | this.nodeName=this.m1 |
| | | const hanleselectindex=sessionStorage.getItem('hanleselectindex') |
| | | if(hanleselectindex) { |
| | | this.$nextTick(function() { |
| | | this.handleselecttwo(JSON.parse(hanleselectindex).url,JSON.parse(hanleselectindex)) |
| | | this.setViewController(JSON.parse(hanleselectindex)) |
| | | }) |
| | | } |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | } else { |
| | | this.$message.error('æ¥å£æ¥é'); |
| | | } |
| | | |
| | | // this.treeList = this.treeData(data.result); |
| | | }, |
| | | setViewController (res) { |
| | | if(res.children!=null) { |
| | | this.setViewController(res.children[0]); |
| | | } else { |
| | | this.signInsertOpLog(this.m1,res.cnName) |
| | | this.$store.state.currentPerms=res.perms; |
| | | this.setMenuFlag=res.url; |
| | | this.activeIndex=res.url; |
| | | } |
| | | }, |
| | | async signInsertOpLog (m1,m2) { |
| | | var obj={ |
| | | m1: m1, |
| | | m2: m2, |
| | | } |
| | | // const data = await sign_insertOpLog(obj); |
| | | }, |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | var that=this; |
| | | // console.log(cloneData); |
| | | if(cloneData.length!=0) { |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length>0? (father.children=branchArr):''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.pid==that.pid; // è¿åä¸çº§èå |
| | | }); |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | }, |
| | | |
| | | handleselect (index,indexPath,e) { |
| | | const a=JSON.stringify(e.$attrs.perms) |
| | | this.signInsertOpLog(this.m1,e.$attrs.perms.cnName) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e.$attrs.perms; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | this.nodeName=data.cnName |
| | | }, |
| | | |
| | | handleselecttwo (index,e) { |
| | | const a=JSON.stringify(e) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="contentBox"> |
| | | |
| | | <div class="box" |
| | | ref="box"> |
| | | <div class="left box_div"> |
| | | <el-menu :default-active="activeIndex" |
| | | background-color="transparent" |
| | | @select="handleselect"> |
| | | <customElMenu :menuData="menuList"></customElMenu> |
| | | </el-menu> |
| | | </div> |
| | | <div class="resize" |
| | | title="æ¶ç¼©ä¾§è¾¹æ "> |
| | | â® |
| | | </div> |
| | | <div class="mid box_div"> |
| | | <My-bread :list="[ |
| | | `éä¿¡èµæºç®¡ç`, |
| | | nodeName, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { selectMenuRecursive,queryMenuTree,sign_insertOpLog } from '@/api/api.js' |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | import customElMenu from "@/components/customElMenu.vue"; |
| | | export default { |
| | | components: { |
| | | MyBread, |
| | | customElMenu |
| | | |
| | | }, |
| | | data () { |
| | | return { |
| | | setMenuFlag: ' ', |
| | | activeIndex: ' ', |
| | | oriData: [], //åå§æ æ°æ® |
| | | dirData: [], //elæ æ°æ® |
| | | newData: [], //æå¨åæ°æ® |
| | | lang: 'zh', |
| | | |
| | | menuList: [], |
| | | editTitle: '', |
| | | showPopover: false, |
| | | showEditInfoWrapper: false, |
| | | showEdit: false, |
| | | editMenu: false, |
| | | editCatalogue: false, |
| | | editUnit: false, |
| | | itemdetail: {}, |
| | | formLabelWidth: '70px', |
| | | pid: null, |
| | | nodeName: null, |
| | | }; |
| | | }, |
| | | created () { }, |
| | | mounted () { |
| | | |
| | | this.getTreeData(); |
| | | //左峿å |
| | | this.dragControllerDiv(); |
| | | }, |
| | | methods: { |
| | | //左峿å |
| | | dragControllerDiv: function() { |
| | | var resize=document.getElementsByClassName('resize'); |
| | | var left=document.getElementsByClassName('left'); |
| | | var mid=document.getElementsByClassName('mid'); |
| | | var box=document.getElementsByClassName('box'); |
| | | for(let i=0;i<resize.length;i++) { |
| | | // é¼ æ æä¸äºä»¶ |
| | | resize[i].onmousedown=function(e) { |
| | | //é¢è²æ¹åæé |
| | | resize[i].style.background='#818181'; |
| | | var startX=e.clientX; |
| | | resize[i].left=resize[i].offsetLeft; |
| | | // é¼ æ æå¨äºä»¶ |
| | | document.onmousemove=function(e) { |
| | | var endX=e.clientX; |
| | | var moveLen=resize[i].left+(endX-startX); // ï¼endx-startxï¼=ç§»å¨çè·ç¦»ãresize[i].left+ç§»å¨çè·ç¦»=左边åºåæåç宽度 |
| | | var maxT=box[i].clientWidth-resize[i].offsetWidth; // 容å¨å®½åº¦ - 左边åºåç宽度 = å³è¾¹åºåç宽度 |
| | | |
| | | if(moveLen<205) moveLen=205; // 左边åºåçæå°å®½åº¦ä¸º32px |
| | | if(moveLen>maxT-300) moveLen=maxT-300; //å³è¾¹åºåæå°å®½åº¦ä¸º150px |
| | | |
| | | resize[i].style.left=moveLen; // 设置左侧åºåç宽度 |
| | | |
| | | for(let j=0;j<left.length;j++) { |
| | | left[j].style.width=moveLen+'px'; |
| | | mid[j].style.width=(box[i].clientWidth-moveLen-10)+'px'; |
| | | } |
| | | }; |
| | | // é¼ æ æ¾å¼äºä»¶ |
| | | document.onmouseup=function(evt) { |
| | | //é¢è²æ¢å¤ |
| | | resize[i].style.background='#d6d6d6'; |
| | | document.onmousemove=null; |
| | | document.onmouseup=null; |
| | | resize[i].releaseCapture&&resize[i].releaseCapture(); //å½ä½ ä¸å¨éè¦ç»§ç»è·å¾é¼ æ æ¶æ¯å°±è¦åºè¯¥è°ç¨ReleaseCapture()éæ¾æ |
| | | }; |
| | | resize[i].setCapture&&resize[i].setCapture(); //è¯¥å½æ°å¨å±äºå½å线ç¨çæå®çªå£éè®¾ç½®é¼ æ æè· |
| | | return false; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | //è·åæ |
| | | async getTreeData () { |
| | | const data=await queryMenuTree(); |
| | | |
| | | let menuLists=data.result.filter((value) => { |
| | | return value.url=="/commResource"; |
| | | }); |
| | | this.pid=menuLists[0].id; |
| | | const res=await selectMenuRecursive({ id: menuLists[0].id }); |
| | | |
| | | if(res.code==200) { |
| | | if(res.result.length!=0) { |
| | | let menuList=res.result.filter((value) => { |
| | | return value.type==1; |
| | | }); |
| | | this.menuList=this.treeData(menuList); |
| | | console.log(this.menuList) |
| | | this.m1=this.menuList[0].cnName; |
| | | this.setViewController(this.menuList[0]); |
| | | this.nodeName=this.m1 |
| | | const hanleselectindex=sessionStorage.getItem('hanleselectindex') |
| | | if(hanleselectindex) { |
| | | this.$nextTick(function() { |
| | | this.handleselecttwo(JSON.parse(hanleselectindex).url,JSON.parse(hanleselectindex)) |
| | | this.setViewController(JSON.parse(hanleselectindex)) |
| | | }) |
| | | } |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | } else { |
| | | this.$message.error('æ¥å£æ¥é'); |
| | | } |
| | | |
| | | // this.treeList = this.treeData(data.result); |
| | | }, |
| | | setViewController (res) { |
| | | if(res.children!=null) { |
| | | this.setViewController(res.children[0]); |
| | | } else { |
| | | this.signInsertOpLog(this.m1,res.cnName) |
| | | this.$store.state.currentPerms=res.perms; |
| | | this.setMenuFlag=res.url; |
| | | this.activeIndex=res.url; |
| | | } |
| | | }, |
| | | async signInsertOpLog (m1,m2) { |
| | | var obj={ |
| | | m1: m1, |
| | | m2: m2, |
| | | } |
| | | // const data = await sign_insertOpLog(obj); |
| | | }, |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | var that=this; |
| | | // console.log(cloneData); |
| | | if(cloneData.length!=0) { |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length>0? (father.children=branchArr):''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.pid==that.pid; // è¿åä¸çº§èå |
| | | }); |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | }, |
| | | |
| | | handleselect (index,indexPath,e) { |
| | | const a=JSON.stringify(e.$attrs.perms) |
| | | this.signInsertOpLog(this.m1,e.$attrs.perms.cnName) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e.$attrs.perms; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | this.nodeName=data.cnName |
| | | }, |
| | | |
| | | handleselecttwo (index,e) { |
| | | const a=JSON.stringify(e) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="contentBox"> |
| | | |
| | | <div class="box" |
| | | ref="box"> |
| | | <div class="left box_div"> |
| | | <el-menu :default-active="activeIndex" |
| | | background-color="transparent" |
| | | @select="handleselect"> |
| | | <customElMenu :menuData="menuList"></customElMenu> |
| | | </el-menu> |
| | | </div> |
| | | <div class="resize" |
| | | title="æ¶ç¼©ä¾§è¾¹æ "> |
| | | â® |
| | | </div> |
| | | <div class="mid box_div"> |
| | | <My-bread :list="[ |
| | | `éä¿¡èµæºç®¡ç`, |
| | | nodeName, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { selectMenuRecursive,queryMenuTree,sign_insertOpLog } from '@/api/api.js' |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | import customElMenu from "@/components/customElMenu.vue"; |
| | | export default { |
| | | components: { |
| | | MyBread, |
| | | customElMenu |
| | | |
| | | }, |
| | | data () { |
| | | return { |
| | | setMenuFlag: ' ', |
| | | activeIndex: ' ', |
| | | oriData: [], //åå§æ æ°æ® |
| | | dirData: [], //elæ æ°æ® |
| | | newData: [], //æå¨åæ°æ® |
| | | lang: 'zh', |
| | | |
| | | menuList: [], |
| | | editTitle: '', |
| | | showPopover: false, |
| | | showEditInfoWrapper: false, |
| | | showEdit: false, |
| | | editMenu: false, |
| | | editCatalogue: false, |
| | | editUnit: false, |
| | | itemdetail: {}, |
| | | formLabelWidth: '70px', |
| | | pid: null, |
| | | nodeName: null, |
| | | }; |
| | | }, |
| | | created () { }, |
| | | mounted () { |
| | | |
| | | this.getTreeData(); |
| | | //左峿å |
| | | this.dragControllerDiv(); |
| | | }, |
| | | methods: { |
| | | //左峿å |
| | | dragControllerDiv: function() { |
| | | var resize=document.getElementsByClassName('resize'); |
| | | var left=document.getElementsByClassName('left'); |
| | | var mid=document.getElementsByClassName('mid'); |
| | | var box=document.getElementsByClassName('box'); |
| | | for(let i=0;i<resize.length;i++) { |
| | | // é¼ æ æä¸äºä»¶ |
| | | resize[i].onmousedown=function(e) { |
| | | //é¢è²æ¹åæé |
| | | resize[i].style.background='#818181'; |
| | | var startX=e.clientX; |
| | | resize[i].left=resize[i].offsetLeft; |
| | | // é¼ æ æå¨äºä»¶ |
| | | document.onmousemove=function(e) { |
| | | var endX=e.clientX; |
| | | var moveLen=resize[i].left+(endX-startX); // ï¼endx-startxï¼=ç§»å¨çè·ç¦»ãresize[i].left+ç§»å¨çè·ç¦»=左边åºåæåç宽度 |
| | | var maxT=box[i].clientWidth-resize[i].offsetWidth; // 容å¨å®½åº¦ - 左边åºåç宽度 = å³è¾¹åºåç宽度 |
| | | |
| | | if(moveLen<205) moveLen=205; // 左边åºåçæå°å®½åº¦ä¸º32px |
| | | if(moveLen>maxT-300) moveLen=maxT-300; //å³è¾¹åºåæå°å®½åº¦ä¸º150px |
| | | |
| | | resize[i].style.left=moveLen; // 设置左侧åºåç宽度 |
| | | |
| | | for(let j=0;j<left.length;j++) { |
| | | left[j].style.width=moveLen+'px'; |
| | | mid[j].style.width=(box[i].clientWidth-moveLen-10)+'px'; |
| | | } |
| | | }; |
| | | // é¼ æ æ¾å¼äºä»¶ |
| | | document.onmouseup=function(evt) { |
| | | //é¢è²æ¢å¤ |
| | | resize[i].style.background='#d6d6d6'; |
| | | document.onmousemove=null; |
| | | document.onmouseup=null; |
| | | resize[i].releaseCapture&&resize[i].releaseCapture(); //å½ä½ ä¸å¨éè¦ç»§ç»è·å¾é¼ æ æ¶æ¯å°±è¦åºè¯¥è°ç¨ReleaseCapture()éæ¾æ |
| | | }; |
| | | resize[i].setCapture&&resize[i].setCapture(); //è¯¥å½æ°å¨å±äºå½å线ç¨çæå®çªå£éè®¾ç½®é¼ æ æè· |
| | | return false; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | //è·åæ |
| | | async getTreeData () { |
| | | const data=await queryMenuTree(); |
| | | |
| | | let menuLists=data.result.filter((value) => { |
| | | return value.url=="/commScenario"; |
| | | }); |
| | | this.pid=menuLists[0].id; |
| | | const res=await selectMenuRecursive({ id: menuLists[0].id }); |
| | | |
| | | if(res.code==200) { |
| | | if(res.result.length!=0) { |
| | | let menuList=res.result.filter((value) => { |
| | | return value.type==1; |
| | | }); |
| | | this.menuList=this.treeData(menuList); |
| | | console.log(this.menuList) |
| | | this.m1=this.menuList[0].cnName; |
| | | this.setViewController(this.menuList[0]); |
| | | this.nodeName=this.m1 |
| | | const hanleselectindex=sessionStorage.getItem('hanleselectindex') |
| | | if(hanleselectindex) { |
| | | this.$nextTick(function() { |
| | | this.handleselecttwo(JSON.parse(hanleselectindex).url,JSON.parse(hanleselectindex)) |
| | | this.setViewController(JSON.parse(hanleselectindex)) |
| | | }) |
| | | } |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | } else { |
| | | this.$message.error('æ¥å£æ¥é'); |
| | | } |
| | | |
| | | // this.treeList = this.treeData(data.result); |
| | | }, |
| | | setViewController (res) { |
| | | if(res.children!=null) { |
| | | this.setViewController(res.children[0]); |
| | | } else { |
| | | this.signInsertOpLog(this.m1,res.cnName) |
| | | this.$store.state.currentPerms=res.perms; |
| | | this.setMenuFlag=res.url; |
| | | this.activeIndex=res.url; |
| | | } |
| | | }, |
| | | async signInsertOpLog (m1,m2) { |
| | | var obj={ |
| | | m1: m1, |
| | | m2: m2, |
| | | } |
| | | // const data = await sign_insertOpLog(obj); |
| | | }, |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | var that=this; |
| | | // console.log(cloneData); |
| | | if(cloneData.length!=0) { |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length>0? (father.children=branchArr):''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.pid==that.pid; // è¿åä¸çº§èå |
| | | }); |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | }, |
| | | |
| | | handleselect (index,indexPath,e) { |
| | | const a=JSON.stringify(e.$attrs.perms) |
| | | this.signInsertOpLog(this.m1,e.$attrs.perms.cnName) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e.$attrs.perms; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | this.nodeName=data.cnName |
| | | }, |
| | | |
| | | handleselecttwo (index,e) { |
| | | const a=JSON.stringify(e) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | <template> |
| | | <div class="contentBox"> |
| | | |
| | | <div class="box" |
| | | ref="box"> |
| | | <div class="left box_div"> |
| | | <el-menu :default-active="activeIndex" |
| | | background-color="transparent" |
| | | @select="handleselect"> |
| | | <customElMenu :menuData="menuList"></customElMenu> |
| | | </el-menu> |
| | | </div> |
| | | <div class="resize" |
| | | title="æ¶ç¼©ä¾§è¾¹æ "> |
| | | â® |
| | | </div> |
| | | <div class="mid box_div"> |
| | | <My-bread :list="[ |
| | | `éä¿¡èµæºç®¡ç`, |
| | | nodeName, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | </div> |
| | | </div> |
| | | |
| | | </div> |
| | | |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import { selectMenuRecursive,queryMenuTree,sign_insertOpLog } from '@/api/api.js' |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | import customElMenu from "@/components/customElMenu.vue"; |
| | | export default { |
| | | components: { |
| | | MyBread, |
| | | customElMenu |
| | | |
| | | }, |
| | | data () { |
| | | return { |
| | | setMenuFlag: ' ', |
| | | activeIndex: ' ', |
| | | oriData: [], //åå§æ æ°æ® |
| | | dirData: [], //elæ æ°æ® |
| | | newData: [], //æå¨åæ°æ® |
| | | lang: 'zh', |
| | | |
| | | menuList: [], |
| | | editTitle: '', |
| | | showPopover: false, |
| | | showEditInfoWrapper: false, |
| | | showEdit: false, |
| | | editMenu: false, |
| | | editCatalogue: false, |
| | | editUnit: false, |
| | | itemdetail: {}, |
| | | formLabelWidth: '70px', |
| | | pid: null, |
| | | nodeName: null, |
| | | }; |
| | | }, |
| | | created () { }, |
| | | mounted () { |
| | | |
| | | this.getTreeData(); |
| | | //左峿å |
| | | this.dragControllerDiv(); |
| | | }, |
| | | methods: { |
| | | //左峿å |
| | | dragControllerDiv: function() { |
| | | var resize=document.getElementsByClassName('resize'); |
| | | var left=document.getElementsByClassName('left'); |
| | | var mid=document.getElementsByClassName('mid'); |
| | | var box=document.getElementsByClassName('box'); |
| | | for(let i=0;i<resize.length;i++) { |
| | | // é¼ æ æä¸äºä»¶ |
| | | resize[i].onmousedown=function(e) { |
| | | //é¢è²æ¹åæé |
| | | resize[i].style.background='#818181'; |
| | | var startX=e.clientX; |
| | | resize[i].left=resize[i].offsetLeft; |
| | | // é¼ æ æå¨äºä»¶ |
| | | document.onmousemove=function(e) { |
| | | var endX=e.clientX; |
| | | var moveLen=resize[i].left+(endX-startX); // ï¼endx-startxï¼=ç§»å¨çè·ç¦»ãresize[i].left+ç§»å¨çè·ç¦»=左边åºåæåç宽度 |
| | | var maxT=box[i].clientWidth-resize[i].offsetWidth; // 容å¨å®½åº¦ - 左边åºåç宽度 = å³è¾¹åºåç宽度 |
| | | |
| | | if(moveLen<205) moveLen=205; // 左边åºåçæå°å®½åº¦ä¸º32px |
| | | if(moveLen>maxT-300) moveLen=maxT-300; //å³è¾¹åºåæå°å®½åº¦ä¸º150px |
| | | |
| | | resize[i].style.left=moveLen; // 设置左侧åºåç宽度 |
| | | |
| | | for(let j=0;j<left.length;j++) { |
| | | left[j].style.width=moveLen+'px'; |
| | | mid[j].style.width=(box[i].clientWidth-moveLen-10)+'px'; |
| | | } |
| | | }; |
| | | // é¼ æ æ¾å¼äºä»¶ |
| | | document.onmouseup=function(evt) { |
| | | //é¢è²æ¢å¤ |
| | | resize[i].style.background='#d6d6d6'; |
| | | document.onmousemove=null; |
| | | document.onmouseup=null; |
| | | resize[i].releaseCapture&&resize[i].releaseCapture(); //å½ä½ ä¸å¨éè¦ç»§ç»è·å¾é¼ æ æ¶æ¯å°±è¦åºè¯¥è°ç¨ReleaseCapture()éæ¾æ |
| | | }; |
| | | resize[i].setCapture&&resize[i].setCapture(); //è¯¥å½æ°å¨å±äºå½å线ç¨çæå®çªå£éè®¾ç½®é¼ æ æè· |
| | | return false; |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | |
| | | |
| | | //è·åæ |
| | | async getTreeData () { |
| | | const data=await queryMenuTree(); |
| | | |
| | | let menuLists=data.result.filter((value) => { |
| | | return value.url=="/commScheme"; |
| | | }); |
| | | this.pid=menuLists[0].id; |
| | | const res=await selectMenuRecursive({ id: menuLists[0].id }); |
| | | |
| | | if(res.code==200) { |
| | | if(res.result.length!=0) { |
| | | let menuList=res.result.filter((value) => { |
| | | return value.type==1; |
| | | }); |
| | | this.menuList=this.treeData(menuList); |
| | | console.log(this.menuList) |
| | | this.m1=this.menuList[0].cnName; |
| | | this.setViewController(this.menuList[0]); |
| | | this.nodeName=this.m1 |
| | | const hanleselectindex=sessionStorage.getItem('hanleselectindex') |
| | | if(hanleselectindex) { |
| | | this.$nextTick(function() { |
| | | this.handleselecttwo(JSON.parse(hanleselectindex).url,JSON.parse(hanleselectindex)) |
| | | this.setViewController(JSON.parse(hanleselectindex)) |
| | | }) |
| | | } |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | } else { |
| | | this.$message.error('æ¥å£æ¥é'); |
| | | } |
| | | |
| | | // this.treeList = this.treeData(data.result); |
| | | }, |
| | | setViewController (res) { |
| | | if(res.children!=null) { |
| | | this.setViewController(res.children[0]); |
| | | } else { |
| | | this.signInsertOpLog(this.m1,res.cnName) |
| | | this.$store.state.currentPerms=res.perms; |
| | | this.setMenuFlag=res.url; |
| | | this.activeIndex=res.url; |
| | | } |
| | | }, |
| | | async signInsertOpLog (m1,m2) { |
| | | var obj={ |
| | | m1: m1, |
| | | m2: m2, |
| | | } |
| | | // const data = await sign_insertOpLog(obj); |
| | | }, |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | var that=this; |
| | | // console.log(cloneData); |
| | | if(cloneData.length!=0) { |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length>0? (father.children=branchArr):''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.pid==that.pid; // è¿åä¸çº§èå |
| | | }); |
| | | } else { |
| | | |
| | | this.$message.error('ææ èåæ æ°æ®'); |
| | | } |
| | | }, |
| | | |
| | | handleselect (index,indexPath,e) { |
| | | const a=JSON.stringify(e.$attrs.perms) |
| | | this.signInsertOpLog(this.m1,e.$attrs.perms.cnName) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e.$attrs.perms; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | this.nodeName=data.cnName |
| | | }, |
| | | |
| | | handleselecttwo (index,e) { |
| | | const a=JSON.stringify(e) |
| | | sessionStorage.setItem('hanleselectindex',a) |
| | | var data=e; |
| | | this.$store.state.currentPerms=data.perms; |
| | | var index=data.url; |
| | | |
| | | if(index!=null) { |
| | | if(index.indexOf('http')!=-1) { |
| | | this.$store.commit('getIframe',data.url); |
| | | index='dataIfream'; |
| | | } |
| | | } |
| | | this.setMenuFlag=index; |
| | | }, |
| | | }, |
| | | }; |
| | | </script> |
| | | |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <div class="dictionaryBox"> |
| | | <My-bread :list="[ |
| | | `éä¿¡æè½è¯ä¼°`, |
| | | `éä¿¡æ¯ä¼¤å½±åè¯ä¼°`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | |
| | | export default { |
| | | name: "multimedia", |
| | | components: { MyBread }, |
| | | data () { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | created () { |
| | | |
| | | }, |
| | | methods () { |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | //@import url(); å¼å
¥å
Œ
±cssç±» |
| | | .dictionaryBox { |
| | | height: calc(100% - 40px); |
| | | width: calc(100% - 40px); |
| | | padding: 10px; |
| | | background: #f4f8ff; |
| | | margin: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <div class="dictionaryBox"> |
| | | <My-bread :list="[ |
| | | `æ°æ®èµæºç®¡ç`, |
| | | `å¤åªä½ç´ æç®¡ç`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | |
| | | export default { |
| | | name: "multimedia", |
| | | components: { MyBread }, |
| | | data () { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | created () { |
| | | |
| | | }, |
| | | methods () { |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | //@import url(); å¼å
¥å
Œ
±cssç±» |
| | | .dictionaryBox { |
| | | height: calc(100% - 40px); |
| | | width: calc(100% - 40px); |
| | | padding: 10px; |
| | | background: #f4f8ff; |
| | | margin: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <div class="dictionaryBox"> |
| | | <My-bread :list="[ |
| | | `éä¿¡æ¹æ¡ç¹å`, |
| | | `æ¹æ¡æå¶`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | |
| | | export default { |
| | | name: "multimedia", |
| | | components: { MyBread }, |
| | | data () { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | created () { |
| | | |
| | | }, |
| | | methods () { |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | //@import url(); å¼å
¥å
Œ
±cssç±» |
| | | .dictionaryBox { |
| | | height: calc(100% - 40px); |
| | | width: calc(100% - 40px); |
| | | padding: 10px; |
| | | background: #f4f8ff; |
| | | margin: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <div class="dictionaryBox"> |
| | | <My-bread :list="[ |
| | | `éä¿¡æ¹æ¡ç¹å`, |
| | | `æ¹æ¡è®²è¯`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | |
| | | export default { |
| | | name: "multimedia", |
| | | components: { MyBread }, |
| | | data () { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | created () { |
| | | |
| | | }, |
| | | methods () { |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | //@import url(); å¼å
¥å
Œ
±cssç±» |
| | | .dictionaryBox { |
| | | height: calc(100% - 40px); |
| | | width: calc(100% - 40px); |
| | | padding: 10px; |
| | | background: #f4f8ff; |
| | | margin: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | |
| | | <template> |
| | | <div class="dictionaryBox"> |
| | | <My-bread :list="[ |
| | | `æ°æ®èµæºç®¡ç`, |
| | | `ä»¿çæ¨¡å管ç`, |
| | | ]"></My-bread> |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | | <script> |
| | | |
| | | import MyBread from "@/components/MyBread.vue"; |
| | | |
| | | export default { |
| | | name: "multimedia", |
| | | components: { MyBread }, |
| | | data () { |
| | | return { |
| | | |
| | | }; |
| | | }, |
| | | watch: { |
| | | |
| | | }, |
| | | created () { |
| | | |
| | | }, |
| | | methods () { |
| | | |
| | | } |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | | //@import url(); å¼å
¥å
Œ
±cssç±» |
| | | .dictionaryBox { |
| | | height: calc(100% - 40px); |
| | | width: calc(100% - 40px); |
| | | padding: 10px; |
| | | background: #f4f8ff; |
| | | margin: 10px; |
| | | border-radius: 5px; |
| | | } |
| | | </style> |
| | |
| | | <el-divider /> |
| | | <div class="mainBox"> |
| | | |
| | | <div |
| | | class="cataLogContent leftTree subpage_Div" |
| | | style="border: 1px solid #dcdfe6;" |
| | | > |
| | | <div class="cataLogContent leftTree subpage_Div" |
| | | style="border: 1px solid #dcdfe6;"> |
| | | <div style="min-width: 450px"> |
| | | <el-tree |
| | | ref="tree" |
| | | :props="defaultProps" |
| | | node-key="id" |
| | | :data="dirList" |
| | | :highlight-current="true" |
| | | :expand-on-click-node="false" |
| | | :default-expanded-keys="expandData" |
| | | @node-click="handleNodeClick" |
| | | @node-contextmenu="openTreeMenu" |
| | | > |
| | | <el-tree ref="tree" |
| | | :props="defaultProps" |
| | | node-key="id" |
| | | :data="dirList" |
| | | :highlight-current="true" |
| | | :expand-on-click-node="false" |
| | | :default-expanded-keys="expandData" |
| | | @node-click="handleNodeClick" |
| | | @node-contextmenu="openTreeMenu"> |
| | | </el-tree> |
| | | <div |
| | | class="right_menu box_divm" |
| | | id="menu" |
| | | v-show="showRightMenu" |
| | | > |
| | | <div class="right_menu box_divm" |
| | | id="menu" |
| | | v-show="showRightMenu"> |
| | | <ul> |
| | | <li @click="setMenuDataCopy">å¤å¶</li> |
| | | <li @click="setMenuDataPaste">ç²è´´</li> |
| | |
| | | </div> |
| | | </div> |
| | | <div class="cataLog_rightContent right subpage_Div"> |
| | | <div |
| | | class="inquire" |
| | | style=" |
| | | <div class="inquire" |
| | | style=" |
| | | align-items: center; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | " |
| | | > |
| | | "> |
| | | <el-breadcrumb separator="/"> |
| | | <el-breadcrumb-item :to="{ path: '/' }">{{ |
| | | |
| | |
| | | </el-breadcrumb> |
| | | <div style="margin-right: -5px"> |
| | | <div class="menuTop"> |
| | | <el-form |
| | | :inline="true" |
| | | class="demo-form-inline" |
| | | > |
| | | <el-form :inline="true" |
| | | class="demo-form-inline"> |
| | | <el-form-item> |
| | | |
| | | <el-button |
| | | v-show="directoryFlag" |
| | | icon="el-icon-download" |
| | | type="info" |
| | | size="small" |
| | | @click="setDirectoryDownload" |
| | | >{{ $t("shuJuGuanLi.butten.folderDownload") }}</el-button> |
| | | <el-button v-show="directoryFlag" |
| | | icon="el-icon-download" |
| | | type="info" |
| | | size="small" |
| | | @click="setDirectoryDownload">{{ $t("shuJuGuanLi.butten.folderDownload") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | |
| | | <el-button |
| | | icon="el-icon-download" |
| | | type="info" |
| | | size="small" |
| | | @click="setTemplateDownload" |
| | | >{{ $t("shuJuGuanLi.butten.templateDownload") }}</el-button> |
| | | <el-button icon="el-icon-download" |
| | | type="info" |
| | | size="small" |
| | | @click="setTemplateDownload">{{ $t("shuJuGuanLi.butten.templateDownload") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-upload |
| | | action |
| | | accept=".xlsx, .xls" |
| | | :auto-upload="false" |
| | | :show-file-list="false" |
| | | :on-change="handleChange" |
| | | :file-list="fileList" |
| | | > |
| | | <el-button |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t("shuJuGuanLi.butten.uploads") }}</el-button> |
| | | <el-upload action |
| | | accept=".xlsx, .xls" |
| | | :auto-upload="false" |
| | | :show-file-list="false" |
| | | :on-change="handleChange" |
| | | :file-list="fileList"> |
| | | <el-button type="success" |
| | | icon="el-icon-plus" |
| | | size="small">{{ $t("shuJuGuanLi.butten.uploads") }}</el-button> |
| | | </el-upload> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(1)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t("shuJuGuanLi.butten.NewPeer") }}</el-button> |
| | | <el-button v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(1)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small">{{ $t("shuJuGuanLi.butten.NewPeer") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(2)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{ $t("shuJuGuanLi.butten.AddChild") }}</el-button> |
| | | <el-button v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(2)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small">{{ $t("shuJuGuanLi.butten.AddChild") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="setDelNode()" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >{{ $t("shuJuGuanLi.butten.Delete") }}</el-button> |
| | | <el-button v-if="menuStatus.delete" |
| | | @click="setDelNode()" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small">{{ $t("shuJuGuanLi.butten.Delete") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small" |
| | | >{{ $t("shuJuGuanLi.butten.MoveUp") }}</el-button> |
| | | <el-button v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small">{{ $t("shuJuGuanLi.butten.MoveUp") }}</el-button> |
| | | </el-form-item> |
| | | <el-form-item> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small" |
| | | >{{ $t("shuJuGuanLi.butten.MoveDown") }}</el-button> |
| | | <el-button v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small">{{ $t("shuJuGuanLi.butten.MoveDown") }}</el-button> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="dividing-line"></div> |
| | | |
| | | <el-form |
| | | :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | style="position: relative; padding-top: 18px" |
| | | > |
| | | <el-form-item |
| | | prop="name" |
| | | :label="$t('dataManage.dataUpObj.name')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.name" |
| | | size="small" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')" |
| | | clearable |
| | | /> |
| | | <el-form :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | style="position: relative; padding-top: 18px"> |
| | | <el-form-item prop="name" |
| | | :label="$t('dataManage.dataUpObj.name')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.name" |
| | | size="small" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')" |
| | | clearable /> |
| | | <!-- style="max-width: 400px"--> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.explain')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.descr" |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')" |
| | | clearable |
| | | /> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.explain')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.descr" |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')" |
| | | clearable /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.inspectionItems')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | style="width: 420px" |
| | | v-model="itemdetail.checks" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')" |
| | | multiple |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | <el-form-item :label="$t('dataManage.dataUpObj.inspectionItems')" |
| | | :label-width="formLabelWidth"> |
| | | <el-select style="width: 420px" |
| | | v-model="itemdetail.checks" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')" |
| | | multiple> |
| | | <el-option v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | <!-- <el-input |
| | |
| | | <!-- resize="none"--> |
| | | <!-- style="height: 100%; overflow: auto; max-width: 400px"--> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.fileExtension')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.exts" |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" |
| | | clearable |
| | | /> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.fileExtension')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.exts" |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" |
| | | clearable /> |
| | | </el-form-item> |
| | | <!-- <el-form-item |
| | | :label="$t('dataManage.dataUpObj.inspectionItems')" |
| | |
| | | style="height: 100%; overflow: auto; max-width: 400px" |
| | | /> |
| | | </el-form-item>--> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.code')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.code" |
| | | disabled |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | autosize |
| | | /> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.code')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.code" |
| | | disabled |
| | | type="textarea" |
| | | style=" max-width: 420px" |
| | | autosize /> |
| | | </el-form-item> |
| | | <!-- <el-form-item |
| | | :label="$t('dataManage.dataUpObj.catalogRemarks')" |
| | |
| | | > |
| | | </div>--> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | style="padding-left: 45% ;padding-top: 20px" |
| | | > |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | type="primary" |
| | | size="small" |
| | | @click="updCata('itemdetail')" |
| | | >{{ $t("common.preservation") }}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | size="small" |
| | | @click="reset" |
| | | >{{ $t("common.cancel") }}</el-button> |
| | | <div slot="footer" |
| | | class="dialog-footer" |
| | | style="padding-left: 45% ;padding-top: 20px"> |
| | | <el-button v-if="menuStatus.update" |
| | | type="primary" |
| | | size="small" |
| | | @click="updCata('itemdetail')">{{ $t("common.preservation") }}</el-button> |
| | | <el-button v-if="menuStatus.update" |
| | | size="small" |
| | | @click="reset">{{ $t("common.cancel") }}</el-button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | |
| | | </div> --> |
| | | <!-- </div> --> |
| | | <el-dialog |
| | | :title="$t('dataManage.dataUpObj.newDirectory')" |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <el-form |
| | | :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | > |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.name')" |
| | | prop="name" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.name" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')" |
| | | ></el-input> |
| | | <el-dialog :title="$t('dataManage.dataUpObj.newDirectory')" |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose"> |
| | | <el-form :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules"> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.name')" |
| | | prop="name" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.name" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueName')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.explain')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.descr" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')" |
| | | ></el-input> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.explain')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.descr" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexplain')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.fileExtension')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.exts" |
| | | type="textarea" |
| | | resize="none" |
| | | style="height: 100%; overflow: auto" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" |
| | | /> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.fileExtension')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.exts" |
| | | type="textarea" |
| | | resize="none" |
| | | style="height: 100%; overflow: auto" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuesuffix')" /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.inspectionItems')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-form-item :label="$t('dataManage.dataUpObj.inspectionItems')" |
| | | :label-width="formLabelWidth"> |
| | | <!-- <el-input |
| | | |
| | | type="textarea" |
| | | resize="none" |
| | | |
| | | /> --> |
| | | <el-select |
| | | v-model="ruleForm.checks" |
| | | multiple |
| | | style="width:100%;" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')" |
| | | > |
| | | <el-option |
| | | v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | <el-select v-model="ruleForm.checks" |
| | | multiple |
| | | style="width:100%;" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueexamine')"> |
| | | <el-option v-for="item in options" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.code')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.code" |
| | | disabled |
| | | type="textarea" |
| | | resize="none" |
| | | style="height: 100%; overflow: auto" |
| | | /> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.code')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.code" |
| | | disabled |
| | | type="textarea" |
| | | resize="none" |
| | | style="height: 100%; overflow: auto" /> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('dataManage.dataUpObj.Remarks')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueRemarks')" |
| | | ></el-input> |
| | | <el-form-item :label="$t('dataManage.dataUpObj.Remarks')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valueRemarks')"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <div slot="footer" |
| | | class="dialog-footer"> |
| | | <el-button @click="resetForm('ruleForm')">{{ |
| | | $t("common.cancel") |
| | | }}</el-button> |
| | | <el-button |
| | | class="primary" |
| | | @click="submitForm('ruleForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t("common.preservation") }}</el-button> |
| | | <el-button class="primary" |
| | | @click="submitForm('ruleForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading">{{ $t("common.preservation") }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | |
| | | <iframe |
| | | id="Iframe1" |
| | | src="" |
| | | style="display: none; border: 0; padding: 0; height: 0; width: 0" |
| | | ></iframe> |
| | | <div |
| | | class="loadBox" |
| | | v-if="loadDialogVisible" |
| | | > |
| | | <iframe id="Iframe1" |
| | | src="" |
| | | style="display: none; border: 0; padding: 0; height: 0; width: 0"></iframe> |
| | | <div class="loadBox" |
| | | v-if="loadDialogVisible"> |
| | | <div style="widht:100%; margin:20px; color:white"> |
| | | <div style="margin-left:99%"> |
| | | <!-- <el-link |
| | |
| | | > X</el-link> --> |
| | | </div> |
| | | </div> |
| | | <div |
| | | v-loading="true" |
| | | element-loading-background="rgba(0, 0, 0, 0.0) " |
| | | element-loading-text="ç®å½ä¸ä¼ ä¸,请çå¾
..." |
| | | style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); " |
| | | > |
| | | <div v-loading="true" |
| | | element-loading-background="rgba(0, 0, 0, 0.0) " |
| | | element-loading-text="ç®å½ä¸ä¼ ä¸,请çå¾
..." |
| | | style="margin: 0px 20px;widht:100%;height:calc(100% - 80px); "> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | components: { |
| | | MyBread, |
| | | }, |
| | | data() { |
| | | let validName = (rule, value, callback) => { |
| | | if (value === "" || value === null || value === undefined) { |
| | | data () { |
| | | let validName=(rule,value,callback) => { |
| | | if(value===""||value===null||value===undefined) { |
| | | return callback(new Error("ç®å½åç§°ä¸è½ä¸ºç©º")); |
| | | } else { |
| | | callback(); |
| | |
| | | checks: [] |
| | | }, |
| | | rules: { |
| | | name: [{ required: true, validator: validName, trigger: "blur" }], |
| | | name: [{ required: true,validator: validName,trigger: "blur" }], |
| | | }, |
| | | newNode: null, |
| | | expandData: [], |
| | |
| | | { |
| | | value: 'checkMain', |
| | | label: 'æ»è´¨æ£' |
| | | }, { |
| | | },{ |
| | | value: 'checkOsgb', |
| | | label: 'OSGBæ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkXls', |
| | | label: 'è¡¨æ ¼æ°æ®æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkLaz', |
| | | label: 'ç¹äºæ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkDem', |
| | | label: 'é«ç¨æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkAttrs', |
| | | label: '屿§æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkTopology', |
| | | label: 'æææ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkDecorate', |
| | | label: 'å¾é¢æ´é¥°æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkOrigin', |
| | | label: 'åç¹æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkDom', |
| | | label: 'æ
æ ¼æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkMath', |
| | | label: 'æ°å¦åºç¡æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkMeta', |
| | | label: 'å
æ°æ®æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkLogical', |
| | | label: 'é»è¾ä¸è´æ§æ£æ¥' |
| | | }, { |
| | | },{ |
| | | value: 'checkSingleIntegrity', |
| | | label: 'å项ææå®æ´æ§æ£æ¥' |
| | | } |
| | |
| | | }, |
| | | methods: { |
| | | // å¤å¶ |
| | | setMenuDataCopy() { |
| | | this.checksCopyData = this.checksData; |
| | | setMenuDataCopy () { |
| | | this.checksCopyData=this.checksData; |
| | | }, |
| | | //ç²è´´ |
| | | setMenuDataPaste() { |
| | | if (!this.checksCopyData) { |
| | | setMenuDataPaste () { |
| | | if(!this.checksCopyData) { |
| | | return this.$message('æªéä¸è¦å¤å¶çèç¹'); |
| | | } |
| | | var val = this.$refs.tree.getNode(this.checksCopyData).data; |
| | | var val=this.$refs.tree.getNode(this.checksCopyData).data; |
| | | |
| | | var level = this.$refs.tree.getNode(this.checksData).data.level + 1; |
| | | this.setInsertCopyData([val], this.checksData, level); |
| | | var level=this.$refs.tree.getNode(this.checksData).data.level+1; |
| | | this.setInsertCopyData([val],this.checksData,level); |
| | | }, |
| | | setInsertCopyData(val, pid, level) { |
| | | for (var i in val) { |
| | | var data = val[i]; |
| | | var pchildNodes = []; |
| | | setInsertCopyData (val,pid,level) { |
| | | for(var i in val) { |
| | | var data=val[i]; |
| | | var pchildNodes=[]; |
| | | |
| | | if (this.$refs.tree.getNode(pid) && this.$refs.tree.getNode(pid).childNodes) { |
| | | pchildNodes = this.$refs.tree.getNode(pid).childNodes |
| | | if(this.$refs.tree.getNode(pid)&&this.$refs.tree.getNode(pid).childNodes) { |
| | | pchildNodes=this.$refs.tree.getNode(pid).childNodes |
| | | } |
| | | var orderNum = this.getMaxOrderNum(pchildNodes); |
| | | var obj = { |
| | | var orderNum=this.getMaxOrderNum(pchildNodes); |
| | | var obj={ |
| | | bak: data.bak, |
| | | level: level, |
| | | orderNum: orderNum + 1, |
| | | orderNum: orderNum+1, |
| | | pid: pid, |
| | | checks: data.checks, |
| | | name: data.name, |
| | |
| | | exts: data.exts, |
| | | } |
| | | insertDir(obj).then((res) => { |
| | | if (res.code == 200) { |
| | | if(res.code==200) { |
| | | this.getDirTree(); |
| | | if (data.children && data.children.length > 0) { |
| | | if(data.children&&data.children.length>0) { |
| | | |
| | | this.setInsertCopyData(data.children, res.result, level + 1) |
| | | this.setInsertCopyData(data.children,res.result,level+1) |
| | | } |
| | | } |
| | | }) |
| | |
| | | |
| | | |
| | | |
| | | handleNodeClick(data, node) { |
| | | this.showRightMenu = false; |
| | | document.removeEventListener('click', this.closeRightMenu) |
| | | handleNodeClick (data,node) { |
| | | this.showRightMenu=false; |
| | | document.removeEventListener('click',this.closeRightMenu) |
| | | this.layerFormInline(data) |
| | | |
| | | }, |
| | | //å³é®èå |
| | | openTreeMenu(event, data, node, obj) { |
| | | this.showRightMenu = true; |
| | | let menu = document.getElementById('menu') |
| | | menu.style.left = event.clientX + 20 + 'px' |
| | | menu.style.top = event.clientY + 'px' |
| | | document.addEventListener('click', this.closeRightMenu) |
| | | this.checksData = data.id; |
| | | openTreeMenu (event,data,node,obj) { |
| | | this.showRightMenu=true; |
| | | let menu=document.getElementById('menu') |
| | | menu.style.left=event.clientX+20+'px' |
| | | menu.style.top=event.clientY+'px' |
| | | document.addEventListener('click',this.closeRightMenu) |
| | | this.checksData=data.id; |
| | | console.log(this.checksData) |
| | | }, |
| | | closeRightMenu() { |
| | | this.showRightMenu = false; |
| | | document.removeEventListener('click', this.closeRightMenu) |
| | | closeRightMenu () { |
| | | this.showRightMenu=false; |
| | | document.removeEventListener('click',this.closeRightMenu) |
| | | |
| | | }, |
| | | setTemplateDownload() { |
| | | var url = window.location.href; |
| | | var testurl = window.location.origin + "/"; |
| | | if (url.indexOf("web") != -1) { |
| | | testurl = testurl + "/web/"; |
| | | setTemplateDownload () { |
| | | var url=window.location.href; |
| | | var testurl=window.location.origin+"/"; |
| | | if(url.indexOf("web")!=-1) { |
| | | testurl=testurl+"/web/"; |
| | | } |
| | | testurl += dirTemplateFile |
| | | $("#Iframe1").attr("src", testurl).click() |
| | | testurl+=dirTemplateFile |
| | | $("#Iframe1").attr("src",testurl).click() |
| | | }, |
| | | handleChange(file, fileList) { |
| | | this.file = file; |
| | | if (fileList.length > 0) { |
| | | this.fileList = [fileList[fileList.length - 1]]; //è¿ä¸æ¥ï¼æ¯ å±ç¤ºæå䏿¬¡éæ©æä»¶; |
| | | handleChange (file,fileList) { |
| | | this.file=file; |
| | | if(fileList.length>0) { |
| | | this.fileList=[fileList[fileList.length-1]]; //è¿ä¸æ¥ï¼æ¯ å±ç¤ºæå䏿¬¡éæ©æä»¶; |
| | | this.handle(); |
| | | } |
| | | }, |
| | | async handle() { |
| | | let file = this.file?.raw; |
| | | if (!this.file) { |
| | | async handle () { |
| | | let file=this.file?.raw; |
| | | if(!this.file) { |
| | | console.log("æä»¶æå¼å¤±è´¥"); |
| | | return; |
| | | } else { |
| | | const reader = new FileReader(); |
| | | let that = this; |
| | | const reader=new FileReader(); |
| | | let that=this; |
| | | reader.readAsArrayBuffer(file); |
| | | reader.onload = function () { |
| | | const buffer = reader.result; |
| | | const bytes = new Uint8Array(buffer); |
| | | const length = bytes.byteLength; |
| | | let binary = ""; |
| | | for (let i = 0; i < length; i++) { |
| | | binary += String.fromCharCode(bytes[i]); |
| | | reader.onload=function() { |
| | | const buffer=reader.result; |
| | | const bytes=new Uint8Array(buffer); |
| | | const length=bytes.byteLength; |
| | | let binary=""; |
| | | for(let i=0;i<length;i++) { |
| | | binary+=String.fromCharCode(bytes[i]); |
| | | } |
| | | const XLSX = require("xlsx"); |
| | | const wb = XLSX.read(binary, { |
| | | const XLSX=require("xlsx"); |
| | | const wb=XLSX.read(binary,{ |
| | | type: "binary", |
| | | }); |
| | | const outdata = XLSX.utils.sheet_to_json( |
| | | const outdata=XLSX.utils.sheet_to_json( |
| | | wb.Sheets[wb.SheetNames[0]], |
| | | { defval: null } |
| | | ); // é»è®¤ç¬¬ä¸è¡ä¸ä¸ºç©ºä¹è½è§£æåºç¬¬ä¸åè¡ |
| | | var data = [...outdata]; |
| | | var data=[...outdata]; |
| | | that.setLeToFc(data); |
| | | }; |
| | | } |
| | | }, |
| | | |
| | | setLeToFc(res) { |
| | | var arr = []; |
| | | for (var i in res) { |
| | | var value = this.getNameAndPname(res[i], res, i) |
| | | setLeToFc (res) { |
| | | var arr=[]; |
| | | for(var i in res) { |
| | | var value=this.getNameAndPname(res[i],res,i) |
| | | arr.push({ |
| | | name: value[0], |
| | | pname: value[1], |
| | |
| | | exts: res[i].exts, |
| | | orderNum: null, |
| | | pid: null, |
| | | tid: parseInt(value[2]) + 1, |
| | | sid: parseInt(value[3]) + 1 |
| | | tid: parseInt(value[2])+1, |
| | | sid: parseInt(value[3])+1 |
| | | }) |
| | | } |
| | | |
| | | this.tableData = arr; |
| | | this.tableData=arr; |
| | | |
| | | this.setInsertData(this.tableData); |
| | | }, |
| | | getNameAndPname(res, result, flag) { |
| | | var chLevel = null; |
| | | var faLevel = null; |
| | | getNameAndPname (res,result,flag) { |
| | | var chLevel=null; |
| | | var faLevel=null; |
| | | |
| | | for (var i = 1; i < 8; i++) { |
| | | var lel = 'L' + i; |
| | | if (res[lel] != null) { |
| | | chLevel = i |
| | | for(var i=1;i<8;i++) { |
| | | var lel='L'+i; |
| | | if(res[lel]!=null) { |
| | | chLevel=i |
| | | } |
| | | } |
| | | if (chLevel == 1) { |
| | | return [res['L' + chLevel], null, flag, -1] |
| | | if(chLevel==1) { |
| | | return [res['L'+chLevel],null,flag,-1] |
| | | } else { |
| | | faLevel = chLevel - 1; |
| | | for (var i = flag; i >= 0; i--) { |
| | | var val = result[i] |
| | | if (val['L' + faLevel]) { |
| | | return [res['L' + chLevel], val['L' + faLevel], flag, i] |
| | | faLevel=chLevel-1; |
| | | for(var i=flag;i>=0;i--) { |
| | | var val=result[i] |
| | | if(val['L'+faLevel]) { |
| | | return [res['L'+chLevel],val['L'+faLevel],flag,i] |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | setInsertData(res) { |
| | | var list = this.excelData(res); |
| | | if (list.length != 0) { |
| | | if (list[0].pname != null) { |
| | | setInsertData (res) { |
| | | var list=this.excelData(res); |
| | | if(list.length!=0) { |
| | | if(list[0].pname!=null) { |
| | | return this.$message.error("ä¸ä¼ æ°æ®é误ï¼ç¬¬ä¸æ¡æ°æ®ä¸ä¸ºç©º"); |
| | | } |
| | | this.getAllNodeId(res); |
| | | } |
| | | }, |
| | | async getAllNodeId(res) { |
| | | this.loadDialogVisible = true; |
| | | for (let i = 0; i < res.length; i++) { |
| | | var val = res[i]; |
| | | if (val.pname == null) { |
| | | val.orderNum = this.dirList[this.dirList.length - 1].orderNum + 1; |
| | | val.pid = 0; |
| | | async getAllNodeId (res) { |
| | | this.loadDialogVisible=true; |
| | | for(let i=0;i<res.length;i++) { |
| | | var val=res[i]; |
| | | if(val.pname==null) { |
| | | val.orderNum=this.dirList[this.dirList.length-1].orderNum+1; |
| | | val.pid=0; |
| | | } else { |
| | | this.tableData.filter((child) => { |
| | | if (child.tid == val.sid) { |
| | | val.pid = child.id; |
| | | val.orderNum = i + 1; |
| | | if(child.tid==val.sid) { |
| | | val.pid=child.id; |
| | | val.orderNum=i+1; |
| | | } |
| | | }); |
| | | } |
| | | |
| | | const data = await insertDir(val); |
| | | if (data.code != 200) { |
| | | this.$message.error("ç®å½ä¸ä¼ 失败" + data.msg); |
| | | this.loadDialogVisible = false; |
| | | const data=await insertDir(val); |
| | | if(data.code!=200) { |
| | | this.$message.error("ç®å½ä¸ä¼ 失败"+data.msg); |
| | | this.loadDialogVisible=false; |
| | | break; |
| | | } |
| | | |
| | | this.tableData.filter((child) => { |
| | | |
| | | if (child.name == val.name && child.tid == val.tid) { |
| | | child.id = data.result; |
| | | if(child.name==val.name&&child.tid==val.tid) { |
| | | child.id=data.result; |
| | | } |
| | | }); |
| | | this.itemaName = data.result; |
| | | this.itemaName=data.result; |
| | | // this.getDirTree(); |
| | | |
| | | // if (res[i].children) { |
| | |
| | | // } |
| | | } |
| | | this.getDirTree(); |
| | | this.loadDialogVisible = false; |
| | | this.loadDialogVisible=false; |
| | | |
| | | }, |
| | | excelData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | excelData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr = cloneData.filter((child) => father.tid == child.sid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | let branchArr=cloneData.filter((child) => father.tid==child.sid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | branchArr.length>0? (father.children=branchArr):""; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.sid == 0; // è¿åä¸çº§èå |
| | | return father.sid==0; // è¿åä¸çº§èå |
| | | }); |
| | | }, |
| | | readFile(file) { |
| | | readFile (file) { |
| | | //æä»¶è¯»å |
| | | return new Promise((resolve) => { |
| | | let reader = new FileReader(); |
| | | let reader=new FileReader(); |
| | | reader.readAsBinaryString(file); //以äºè¿å¶çæ¹å¼è¯»å |
| | | reader.onload = (ev) => { |
| | | reader.onload=(ev) => { |
| | | resolve(ev.target.result); |
| | | }; |
| | | }); |
| | | }, |
| | | |
| | | // 请æ±ç®å½æ |
| | | async getDirTree() { |
| | | async getDirTree () { |
| | | //è·åç®å½æ æå¤§IDï¼æ°å»ºèç¹ä½¿ç¨ |
| | | // queryMaxId().then((res) => { |
| | | // this.id = res.data; |
| | | // }); |
| | | // è·åç®å½æ æ°æ® |
| | | const data = await queryDirTree(); |
| | | const data=await queryDirTree(); |
| | | |
| | | if (data.code != 200) { |
| | | if(data.code!=200) { |
| | | return this.$message.error("项ç®å表æ¥è¯¢å¤±è´¥"); |
| | | } |
| | | this.oriData = data.result; |
| | | this.newData = data.result; |
| | | this.dirList = this.treeData(data.result); |
| | | this.oriData=data.result; |
| | | this.newData=data.result; |
| | | this.dirList=this.treeData(data.result); |
| | | |
| | | |
| | | var cdata; |
| | | if (this.currentData) { |
| | | var rs = JSON.parse(this.currentData); |
| | | cdata = this.$refs.tree.getNode(rs.id).data; |
| | | if(this.currentData) { |
| | | var rs=JSON.parse(this.currentData); |
| | | cdata=this.$refs.tree.getNode(rs.id).data; |
| | | } else { |
| | | cdata = this.dirList[this.dirList.length - 1] |
| | | cdata=this.dirList[this.dirList.length-1] |
| | | } |
| | | this.$nextTick(() => { |
| | | this.expandData = [cdata.id]; |
| | | this.expandData=[cdata.id]; |
| | | this.$refs.tree.setCurrentKey(cdata.id); |
| | | this.layerFormInline(cdata) |
| | | }); |
| | |
| | | // } |
| | | // }); |
| | | }, |
| | | handleClose() { |
| | | handleClose () { |
| | | this.$confirm("å
³éåæ æ³ä¿åï¼æ¯å¦å
³é?") |
| | | .then((_) => { |
| | | this.resetForm(); |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | if (branchArr.length > 0) { |
| | | branchArr.sort(function (a, b) { |
| | | return a.orderNum - b.orderNum |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | if(branchArr.length>0) { |
| | | branchArr.sort(function(a,b) { |
| | | return a.orderNum-b.orderNum |
| | | }) |
| | | } |
| | | |
| | | branchArr.length > 0 ? (father.children = branchArr) : ""; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | branchArr.length>0? (father.children=branchArr):""; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | // å±äºåä¸å¯¹è±¡é®é¢ï¼ä¾å¦ï¼ä»¤ a=bãc=1 ï¼ç¶åå令 b.c=c ï¼ é£ä¹ a.c=b.c=c=1 ï¼åçï¼åç»ä»¤ c.d=2 ,é£ä¹ a.c.d 乿¯=2ï¼ |
| | | // ç±æ¤å¾ªç¯å¤æ¬¡åï¼å°±è½å½¢æç¸åºçæ å½¢æ°æ®ç»æ |
| | | return father.pid == 0; // è¿åä¸çº§èå |
| | | return father.pid==0; // è¿åä¸çº§èå |
| | | }); |
| | | }, |
| | | //åä¸åä¸ç§»å¨ |
| | | setEditNode(res) { |
| | | let node = this.$refs.tree.getCurrentNode(); |
| | | let pchildNodes = this.$refs.tree.getNode(node.id).parent.childNodes; |
| | | let currentId = {}; |
| | | for (let i = 0; i < pchildNodes.length; i++) { |
| | | if (pchildNodes[i].data.id == node.id) { |
| | | currentId = i; |
| | | setEditNode (res) { |
| | | let node=this.$refs.tree.getCurrentNode(); |
| | | let pchildNodes=this.$refs.tree.getNode(node.id).parent.childNodes; |
| | | let currentId={}; |
| | | for(let i=0;i<pchildNodes.length;i++) { |
| | | if(pchildNodes[i].data.id==node.id) { |
| | | currentId=i; |
| | | } |
| | | } |
| | | switch (res) { |
| | | switch(res) { |
| | | case 1: //åä¸ç§»å¨ |
| | | if (currentId != 0) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId - 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | if(currentId!=0) { |
| | | const tempChildrenNodex1=pchildNodes[currentId-1]; |
| | | const tempChildrenNodex2=pchildNodes[currentId]; |
| | | // tempChildrenNodex2.orderNum = |
| | | // pchildNodes[currentId - 1].data.orderNum; |
| | | // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | |
| | | const arr = []; |
| | | const arr=[]; |
| | | this.oriData.filter((res) => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | if(res.id==tempChildrenNodex2.data.id) { |
| | | // res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res); |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | } else if(res.id==tempChildrenNodex1.data.id) { |
| | | // res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res); |
| | | } |
| | | }); |
| | | |
| | | const orderNum = arr[1].orderNum |
| | | arr[1].orderNum = arr[0].orderNum |
| | | arr[0].orderNum = orderNum |
| | | const orderNum=arr[1].orderNum |
| | | arr[1].orderNum=arr[0].orderNum |
| | | arr[0].orderNum=orderNum |
| | | |
| | | this.newData = arr; |
| | | this.newData=arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | |
| | | } |
| | | break; |
| | | case 2: //åä¸ç§»å¨ |
| | | if (currentId < pchildNodes.length - 1) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId + 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | if(currentId<pchildNodes.length-1) { |
| | | const tempChildrenNodex1=pchildNodes[currentId+1]; |
| | | const tempChildrenNodex2=pchildNodes[currentId]; |
| | | // tempChildrenNodex2.orderNum = |
| | | // pchildNodes[currentId + 1].data.orderNum; |
| | | // tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | |
| | | const arr = []; |
| | | const arr=[]; |
| | | this.oriData.filter((res) => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | if(res.id==tempChildrenNodex2.data.id) { |
| | | // res.orderNum = tempChildrenNodex2.orderNum; |
| | | arr.push(res); |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | } else if(res.id==tempChildrenNodex1.data.id) { |
| | | // res.orderNum = tempChildrenNodex1.orderNum; |
| | | arr.push(res); |
| | | } |
| | | }); |
| | | const orderNum = arr[1].orderNum |
| | | arr[1].orderNum = arr[0].orderNum |
| | | arr[0].orderNum = orderNum |
| | | this.newData = arr; |
| | | const orderNum=arr[1].orderNum |
| | | arr[1].orderNum=arr[0].orderNum |
| | | arr[0].orderNum=orderNum |
| | | this.newData=arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | |
| | | break; |
| | | } |
| | | }, |
| | | setDelNode() { |
| | | this.$confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥ç®å½, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | setDelNode () { |
| | | this.$confirm("æ¤æä½å°æ°¸ä¹
å é¤è¯¥ç®å½, æ¯å¦ç»§ç»?","æç¤º",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | this.remove(this.newNode, this.itemdetail); |
| | | this.remove(this.newNode,this.itemdetail); |
| | | }) |
| | | .catch(() => { |
| | | this.$message({ |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | insertStart() { |
| | | this.ruleForm = { |
| | | insertStart () { |
| | | this.ruleForm={ |
| | | level: null, |
| | | orderNum: null, |
| | | pid: null, |
| | |
| | | checks: [] |
| | | } |
| | | }, |
| | | setNewNode(res) { |
| | | setNewNode (res) { |
| | | this.insertStart(); |
| | | var node = this.$refs.tree.getCurrentNode(); |
| | | this.newNode = node; |
| | | var id, lever, orderNum; |
| | | if (res == 1) { |
| | | var node=this.$refs.tree.getCurrentNode(); |
| | | this.newNode=node; |
| | | var id,lever,orderNum; |
| | | if(res==1) { |
| | | //æ°å¢å级 |
| | | id = this.itemdetail.pid; |
| | | let pchildNodes = this.$refs.tree.getNode(this.newNode.id).parent.childNodes |
| | | orderNum = this.getMaxOrderNum(pchildNodes); |
| | | lever = this.itemdetail.level; |
| | | } else if (res == 2) { |
| | | id=this.itemdetail.pid; |
| | | let pchildNodes=this.$refs.tree.getNode(this.newNode.id).parent.childNodes |
| | | orderNum=this.getMaxOrderNum(pchildNodes); |
| | | lever=this.itemdetail.level; |
| | | } else if(res==2) { |
| | | //æ°å¢å级 |
| | | id = this.itemdetail.id; |
| | | let pchildNodes = this.$refs.tree.getNode(this.newNode.id).childNodes |
| | | orderNum = this.getMaxOrderNum(pchildNodes); |
| | | lever = this.itemdetail.level + 1; |
| | | id=this.itemdetail.id; |
| | | let pchildNodes=this.$refs.tree.getNode(this.newNode.id).childNodes |
| | | orderNum=this.getMaxOrderNum(pchildNodes); |
| | | lever=this.itemdetail.level+1; |
| | | } |
| | | |
| | | this.ruleForm.pid = id; |
| | | this.ruleForm.level = lever; |
| | | this.ruleForm.orderNum = orderNum; |
| | | this.dialogFormVisible = true; |
| | | this.ruleForm.pid=id; |
| | | this.ruleForm.level=lever; |
| | | this.ruleForm.orderNum=orderNum; |
| | | this.dialogFormVisible=true; |
| | | }, |
| | | getMaxOrderNum(res) { |
| | | var val = -100; |
| | | for (var i in res) { |
| | | if (res[i].data.orderNum > val) { |
| | | val = res[i].data.orderNum; |
| | | getMaxOrderNum (res) { |
| | | var val=-100; |
| | | for(var i in res) { |
| | | if(res[i].data.orderNum>val) { |
| | | val=res[i].data.orderNum; |
| | | } |
| | | } |
| | | val = val + 1; |
| | | val=val+1; |
| | | return val; |
| | | }, |
| | | append(node, data) { |
| | | this.dialogFormVisible = true; |
| | | this.ruleForm.pid = data.id; |
| | | this.ruleForm.orderNum = node.childNodes.length + 1; |
| | | this.ruleForm.level = data.level + 1; |
| | | append (node,data) { |
| | | this.dialogFormVisible=true; |
| | | this.ruleForm.pid=data.id; |
| | | this.ruleForm.orderNum=node.childNodes.length+1; |
| | | this.ruleForm.level=data.level+1; |
| | | }, |
| | | resetForm(formName) { |
| | | this.dialogFormVisible = false; |
| | | this.ruleForm = {}; |
| | | resetForm (formName) { |
| | | this.dialogFormVisible=false; |
| | | this.ruleForm={}; |
| | | this.$nextTick(() => { |
| | | this.ruleForm = {}; |
| | | this.ruleForm={}; |
| | | // this.$refs[formName].resetFields(); |
| | | }); |
| | | }, |
| | | submitForm(formName) { |
| | | submitForm (formName) { |
| | | this.$nextTick(() => { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.fullscreenLoading = true; |
| | | var val = this.ruleForm; |
| | | if (this.ruleForm.checks) { |
| | | val.checks = this.ruleForm.checks.toString() |
| | | if(valid) { |
| | | this.fullscreenLoading=true; |
| | | var val=this.ruleForm; |
| | | if(this.ruleForm.checks) { |
| | | val.checks=this.ruleForm.checks.toString() |
| | | } else { |
| | | val.checks = '' |
| | | val.checks='' |
| | | } |
| | | // var val = JSON.parse(JSON.stringify(this.ruleForm)) |
| | | // this.itemdetail = val |
| | | insertDir(val) |
| | | .then((res) => { |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | this.fullscreenLoading=false; |
| | | |
| | | if (res.code == 200) { |
| | | if(res.code==200) { |
| | | this.$message({ |
| | | message: "æ·»å æå", |
| | | type: "success", |
| | |
| | | |
| | | // this.itemdetail = {}; |
| | | // this.ruleForm = {}; |
| | | this.dialogFormVisible = false; |
| | | this.dialogFormVisible=false; |
| | | this.$refs[formName].resetFields(); |
| | | this.getDirTree(); |
| | | } |
| | | }, 500); |
| | | },500); |
| | | }) |
| | | .catch((res) => { |
| | | this.itemdetail = {}; |
| | | this.itemdetail={}; |
| | | this.$message.error("æ·»å 失败"); |
| | | this.fullscreenLoading = false; |
| | | this.fullscreenLoading=false; |
| | | console.log(res); |
| | | }); |
| | | } else { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | remove(node, data) { |
| | | this.itemaName = node.parent.data.id; |
| | | remove (node,data) { |
| | | this.itemaName=node.parent.data.id; |
| | | |
| | | this.$confirm("æ¤æä½å°å é¤è¯¥èç¹, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | this.$confirm("æ¤æä½å°å é¤è¯¥èç¹, æ¯å¦ç»§ç»?","æç¤º",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | //å
å¼éæ°æåº |
| | | const parent = node.parent; |
| | | const children = parent.data.children || parent.data; |
| | | children.splice(data.orderNum - 1, 1); |
| | | children.forEach((item, index) => { |
| | | item.orderNum = index + 1; |
| | | const parent=node.parent; |
| | | const children=parent.data.children||parent.data; |
| | | children.splice(data.orderNum-1,1); |
| | | children.forEach((item,index) => { |
| | | item.orderNum=index+1; |
| | | }); |
| | | |
| | | this.traverseArr(data); //è·åå é¤çåID |
| | | this.delChildIDs.push(data.id); //è¦å é¤çå
¨é¨ID |
| | | let delIDs = this.delChildIDs; |
| | | let delIDs=this.delChildIDs; |
| | | Promise.all([ |
| | | deleteDir({ ids: delIDs.toString() }), |
| | | updateDirTrees(children), |
| | | ]) |
| | | .then((res) => { |
| | | if (res[0].code == 200 && res[1].code == 200) { |
| | | if(res[0].code==200&&res[1].code==200) { |
| | | this.$message({ |
| | | type: "success", |
| | | message: "å 餿å!", |
| | | }); |
| | | let pchildNodes = this.$refs.tree.getNode(this.itemdetail.id).parent; |
| | | if (pchildNodes.data.id) { |
| | | this.currentData = JSON.stringify(pchildNodes.data) |
| | | let pchildNodes=this.$refs.tree.getNode(this.itemdetail.id).parent; |
| | | if(pchildNodes.data.id) { |
| | | this.currentData=JSON.stringify(pchildNodes.data) |
| | | } else { |
| | | this.currentData = null |
| | | this.currentData=null |
| | | } |
| | | this.itemdetail = {}; |
| | | this.itemdetail={}; |
| | | |
| | | this.getDirTree(); |
| | | } else if (res[0].code == 200) { |
| | | } else if(res[0].code==200) { |
| | | this.$message.error("å 餿åï¼ä½ç½®è°æ´å¤±è´¥"); |
| | | } else if (res[1].code == 200) { |
| | | } else if(res[1].code==200) { |
| | | this.$message.error("å é¤å¤±è´¥,ä½ç½®è°æ´æå"); |
| | | } else { |
| | | this.$message.error("å é¤å¤±è´¥"); |
| | |
| | | // this.itemdetail = {}; |
| | | }); |
| | | //éç½®è¦å é¤çåID |
| | | this.delChildIDs = []; |
| | | this.delChildIDs=[]; |
| | | }) |
| | | .catch(() => { |
| | | this.$message("已忶å é¤"); |
| | |
| | | // // console.log(data); |
| | | // console.log(this.flaten(res)); |
| | | }, |
| | | traverseArr(obj) { |
| | | if (obj.children) { |
| | | traverseArr (obj) { |
| | | if(obj.children) { |
| | | return obj.children.forEach((item) => { |
| | | // console.log(item.id + "---" + item.name); |
| | | // this.delChildID += "id=" + item.id + "&"; |
| | |
| | | } |
| | | return; |
| | | }, |
| | | flaten(arr) { |
| | | return arr.reduce((p, v, i) => { |
| | | for (let i = 0; i < p.length; i++) { |
| | | if (p[i].children) { |
| | | flaten (arr) { |
| | | return arr.reduce((p,v,i) => { |
| | | for(let i=0;i<p.length;i++) { |
| | | if(p[i].children) { |
| | | delete p[i].children; |
| | | } |
| | | } |
| | | return p.concat(v.children ? this.flaten(v.children).concat(v) : v); |
| | | }, []); |
| | | return p.concat(v.children? this.flaten(v.children).concat(v):v); |
| | | },[]); |
| | | }, |
| | | handleDragStart(node, ev) { |
| | | this.old_dirDat = JSON.parse(JSON.stringify(this.dirList)); //å°å¤ä»½çdiréæ°èµå¼ |
| | | handleDragStart (node,ev) { |
| | | this.old_dirDat=JSON.parse(JSON.stringify(this.dirList)); //å°å¤ä»½çdiréæ°èµå¼ |
| | | }, |
| | | handleDrop(draggingNode, dropNode, dropType, ev) { |
| | | this.$confirm("æ¤æä½å°ä¿åç®å½æ´æ¹, æ¯å¦ç»§ç»?", "æç¤º", { |
| | | handleDrop (draggingNode,dropNode,dropType,ev) { |
| | | this.$confirm("æ¤æä½å°ä¿åç®å½æ´æ¹, æ¯å¦ç»§ç»?","æç¤º",{ |
| | | confirmButtonText: "ç¡®å®", |
| | | cancelButtonText: "åæ¶", |
| | | type: "warning", |
| | | }) |
| | | .then(() => { |
| | | //ç¶èç¹ |
| | | let data = dropType != "inner" ? dropNode.parent.data : dropNode.data; |
| | | let data=dropType!="inner"? dropNode.parent.data:dropNode.data; |
| | | // ç¶èç¹ä¸å
¨é¨åèç¹ |
| | | let nodeData = |
| | | dropNode.level == 1 && dropType != "inner" ? data : data.children; |
| | | let nodeData= |
| | | dropNode.level==1&&dropType!="inner"? data:data.children; |
| | | //åæ´èç¹ |
| | | nodeData.forEach((item, i) => { |
| | | if (dropType != "inner") { |
| | | if (draggingNode.data.pid === dropNode.data.pid) { |
| | | item.pid = item.pid; |
| | | nodeData.forEach((item,i) => { |
| | | if(dropType!="inner") { |
| | | if(draggingNode.data.pid===dropNode.data.pid) { |
| | | item.pid=item.pid; |
| | | } else { |
| | | item.pid = dropNode.data.pid; |
| | | item.pid=dropNode.data.pid; |
| | | } |
| | | } else { |
| | | item.pid = data.id; |
| | | item.pid=data.id; |
| | | } |
| | | item.orderNum = i + 1; |
| | | item.orderNum=i+1; |
| | | }); |
| | | |
| | | let arr = []; |
| | | let arr=[]; |
| | | this.oriData.forEach((e) => { |
| | | nodeData.forEach((item) => { |
| | | if (item.id === e.id) e = item; |
| | | if(item.id===e.id) e=item; |
| | | }); |
| | | arr.push(e); |
| | | }); |
| | | this.newData = arr; |
| | | this.newData=arr; |
| | | this.sendChange(); |
| | | }) |
| | | .catch(() => { |
| | | this.$message("å·²åæ¶æ´æ¹"); |
| | | this.dirList = this.old_dirDat; //å°å¤ä»½çdiréæ°èµå¼ |
| | | this.dirList=this.old_dirDat; //å°å¤ä»½çdiréæ°èµå¼ |
| | | }); |
| | | }, |
| | | async sendChange() { |
| | | const data = await updateDirTrees(this.newData) |
| | | async sendChange () { |
| | | const data=await updateDirTrees(this.newData) |
| | | |
| | | if (data.code != 200) { |
| | | if(data.code!=200) { |
| | | return this.$message.error("ç§»å¨å¤±è´¥"); |
| | | } |
| | | this.getDirTree(); |
| | |
| | | // }); |
| | | }, |
| | | |
| | | setDirectoryDownload() { |
| | | var url = BASE_URL + '/dir/downloadDir?token=' + getToken() + '&id=' + this.directoryData.id |
| | | setDirectoryDownload () { |
| | | var url=BASE_URL+'/dir/downloadDir?token='+getToken()+'&id='+this.directoryData.id |
| | | console.log(url) |
| | | $("#Iframe1").attr("src", url).click() |
| | | $("#Iframe1").attr("src",url).click() |
| | | }, |
| | | |
| | | layerFormInline(data) { |
| | | if (data.pid == 0) { |
| | | this.directoryData = data; |
| | | this.directoryFlag = true; |
| | | layerFormInline (data) { |
| | | if(data.pid==0) { |
| | | this.directoryData=data; |
| | | this.directoryFlag=true; |
| | | } else { |
| | | this.directoryFlag = false; |
| | | this.directoryFlag=false; |
| | | } |
| | | |
| | | this.newNode = this.$refs.tree.getNode(data.id); |
| | | this.backUpData = JSON.stringify(data); |
| | | var val = this.$refs.tree.getNode(data.id).data; |
| | | this.itemdetail = val; |
| | | this.currentData = JSON.stringify(data) |
| | | this.newNode=this.$refs.tree.getNode(data.id); |
| | | this.backUpData=JSON.stringify(data); |
| | | var val=this.$refs.tree.getNode(data.id).data; |
| | | this.itemdetail=val; |
| | | this.currentData=JSON.stringify(data) |
| | | |
| | | var checks = []; |
| | | if (val.checks) { |
| | | if (val.checks.indexOf(',') > -1) { |
| | | var value = val.checks.split(','); |
| | | for (var i in value) { |
| | | var checks=[]; |
| | | if(val.checks) { |
| | | if(val.checks.indexOf(',')>-1) { |
| | | var value=val.checks.split(','); |
| | | for(var i in value) { |
| | | checks.push(value[i]) |
| | | } |
| | | } else if (val.checks.indexOf('[]') > -1) { |
| | | } else if(val.checks.indexOf('[]')>-1) { |
| | | |
| | | } else { |
| | | checks.push(val.checks) |
| | | } |
| | | this.itemdetail.checks = checks; |
| | | this.itemdetail.checks=checks; |
| | | } else { |
| | | this.itemdetail.checks = [] |
| | | this.itemdetail.checks=[] |
| | | } |
| | | }, |
| | | |
| | | |
| | | async updCata(formName) { |
| | | this.fullscreenLoading = true; |
| | | var val = JSON.parse(JSON.stringify(this.itemdetail)); |
| | | val.orderNum = this.newNode.data.orderNum; |
| | | async updCata (formName) { |
| | | this.fullscreenLoading=true; |
| | | var val=JSON.parse(JSON.stringify(this.itemdetail)); |
| | | val.orderNum=this.newNode.data.orderNum; |
| | | |
| | | var value = this.itemdetail.checks.toString() |
| | | val.checks = value; |
| | | const data = await updateDirTree(val); |
| | | this.currentData = JSON.stringify(this.itemdetail) |
| | | var value=this.itemdetail.checks.toString() |
| | | val.checks=value; |
| | | const data=await updateDirTree(val); |
| | | this.currentData=JSON.stringify(this.itemdetail) |
| | | |
| | | if (data.code != 200) { |
| | | this.fullscreenLoading = false; |
| | | if(data.code!=200) { |
| | | this.fullscreenLoading=false; |
| | | return this.$message.error("ä¿®æ¹å¤±è´¥"); |
| | | } |
| | | this.$message({ |
| | | message: 'ä¿®æ¹æå', |
| | | type: 'success' |
| | | }); |
| | | this.fullscreenLoading = false; |
| | | this.fullscreenLoading=false; |
| | | this.getDirTree(); |
| | | |
| | | // this.$nextTick(() => { |
| | |
| | | // }); |
| | | // }); |
| | | }, |
| | | reset(formName) { |
| | | this.itemdetail = {}; |
| | | reset (formName) { |
| | | this.itemdetail={}; |
| | | // this.$refs[formName].resetFields(); |
| | | if (this.backUpData != "") { |
| | | this.itemdetail = JSON.parse(this.backUpData); |
| | | var val = JSON.parse(this.backUpData); |
| | | var checks = []; |
| | | if (val.checks) { |
| | | if (val.checks.indexOf(',') > -1) { |
| | | var value = val.checks.split(','); |
| | | for (var i in value) { |
| | | if(this.backUpData!="") { |
| | | this.itemdetail=JSON.parse(this.backUpData); |
| | | var val=JSON.parse(this.backUpData); |
| | | var checks=[]; |
| | | if(val.checks) { |
| | | if(val.checks.indexOf(',')>-1) { |
| | | var value=val.checks.split(','); |
| | | for(var i in value) { |
| | | checks.push(value[i]) |
| | | } |
| | | } else { |
| | | checks.push(val.checks) |
| | | } |
| | | this.itemdetail.checks = checks; |
| | | this.itemdetail.checks=checks; |
| | | } else { |
| | | this.itemdetail.checks = [] |
| | | this.itemdetail.checks=[] |
| | | } |
| | | } |
| | | }, |
| | | showPermsMenu(res) { |
| | | switch (res.tag) { |
| | | showPermsMenu (res) { |
| | | switch(res.tag) { |
| | | case "/delete": |
| | | this.menuStatus.delete = true; |
| | | this.menuStatus.delete=true; |
| | | break; |
| | | case "/insert": |
| | | this.menuStatus.insert = true; |
| | | this.menuStatus.insert=true; |
| | | break; |
| | | case "/update": |
| | | this.menuStatus.update = true; |
| | | this.menuStatus.update=true; |
| | | break; |
| | | } |
| | | }, |
| | | getPerms() { |
| | | var val = this.$store.state.currentPerms; |
| | | var permsEntity = this.$store.state.permsEntity; |
| | | if (!permsEntity || !permsEntity.length) { |
| | | getPerms () { |
| | | var val=this.$store.state.currentPerms; |
| | | var permsEntity=this.$store.state.permsEntity; |
| | | if(!permsEntity||!permsEntity.length) { |
| | | getPerms().then((res) => { |
| | | if (res.code == 200) { |
| | | permsEntity = res.result; |
| | | if(res.code==200) { |
| | | permsEntity=res.result; |
| | | } |
| | | }); |
| | | } |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (val === permsEntity[i].perms) { |
| | | for(var i=0;i<permsEntity.length;i++) { |
| | | if(val===permsEntity[i].perms) { |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | | }, |
| | | }, |
| | | mounted() { |
| | | mounted () { |
| | | this.getDirTree(); |
| | | this.getPerms(); |
| | | }, |
| | |
| | | <style lang="less" scoped> |
| | | .subpage_Box { |
| | | //height: 96%; |
| | | width: 98%; |
| | | width: calc(98% - 20px); |
| | | height: calc(95% - 20px); |
| | | padding: 1%; |
| | | border-radius: 10px; |
| | | background: #f4f8ff; |
| | | margin: 10px; |
| | | // .cataLogContent { |
| | | // width: 100%; |
| | | // height: 100%; |
| | |
| | | <div class="cataLogContent"> |
| | | <div class="left_Tree subpage_Div"> |
| | | <div style="width:auto"> |
| | | <el-tree |
| | | ref="tree" |
| | | :props="defaultProps" |
| | | node-key="id" |
| | | highlight-current |
| | | :data="menuList" |
| | | :expand-on-click-node="false" |
| | | :default-expand-all="true" |
| | | @node-click="handleNodeClick" |
| | | > |
| | | <el-tree ref="tree" |
| | | :props="defaultProps" |
| | | node-key="id" |
| | | highlight-current |
| | | :data="menuList" |
| | | :expand-on-click-node="false" |
| | | :default-expand-all="true" |
| | | @node-click="handleNodeClick"> |
| | | </el-tree> |
| | | </div> |
| | | </div> |
| | | <div class="right_menu subpage_Div"> |
| | | <div style="display:flex;justify-content:right;align-items: center;padding-bottom: 14px"> |
| | | <el-breadcrumb separator="/" style="display: none"> |
| | | <el-breadcrumb separator="/" |
| | | style="display: none"> |
| | | <el-breadcrumb-item :to="{ path: '/' }">{{ |
| | | $t('dataManage.dictionaryManageObj.particulars') |
| | | }}</el-breadcrumb-item> |
| | | </el-breadcrumb> |
| | | |
| | | <div> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(1)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.insert')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.insert" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(2)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.subInsert')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.delete" |
| | | @click="setDelNode()" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.delete')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.moveUp')}}</el-button> |
| | | <el-button |
| | | v-if="menuStatus.update" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small" |
| | | >{{$t('operatManage.menuSetObj.moveDown')}}</el-button> |
| | | <el-button :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(1)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small">{{$t('operatManage.menuSetObj.insert')}}</el-button> |
| | | <el-button :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setNewNode(2)" |
| | | type="success" |
| | | icon="el-icon-plus" |
| | | size="small">{{$t('operatManage.menuSetObj.subInsert')}}</el-button> |
| | | <el-button @click="setDelNode()" |
| | | :disabled="itemdetail.pid == null ? true : false" |
| | | type="danger" |
| | | icon="el-icon-delete" |
| | | size="small">{{$t('operatManage.menuSetObj.delete')}}</el-button> |
| | | <el-button :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(1)" |
| | | type="info" |
| | | icon="el-icon-top" |
| | | size="small">{{$t('operatManage.menuSetObj.moveUp')}}</el-button> |
| | | <el-button :disabled="itemdetail.pid == null ? true : false" |
| | | @click="setEditNode(2)" |
| | | type="info" |
| | | icon="el-icon-bottom" |
| | | size="small">{{$t('operatManage.menuSetObj.moveDown')}}</el-button> |
| | | </div> |
| | | |
| | | </div> |
| | | <div class="dividing-line"></div> |
| | | <!-- <el-divider />--> |
| | | <!-- <el-divider />--> |
| | | <div class="form_box"> |
| | | <el-form |
| | | :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | label-width="130px" |
| | | > |
| | | <el-form-item |
| | | prop="enName" |
| | | :label="$t('operatManage.menuSetObj.enName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | clear="el_input" |
| | | v-model="itemdetail.enName" |
| | | :placeholder="$t('operatManage.menuSetObj.enNameHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-form :model="itemdetail" |
| | | ref="itemdetail" |
| | | :rules="rules" |
| | | label-width="130px"> |
| | | <el-form-item prop="enName" |
| | | :label="$t('operatManage.menuSetObj.enName')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input clear="el_input" |
| | | v-model="itemdetail.enName" |
| | | :placeholder="$t('operatManage.menuSetObj.enNameHolder')" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="cnName" |
| | | :label="$t('operatManage.menuSetObj.cnName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.cnName" |
| | | :placeholder="$t('operatManage.menuSetObj.cnNameHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-form-item prop="cnName" |
| | | :label="$t('operatManage.menuSetObj.cnName')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.cnName" |
| | | :placeholder="$t('operatManage.menuSetObj.cnNameHolder')" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <!-- <el-form-item--> |
| | | <!-- :label="$t('operatManage.menuSetObj.icon')"--> |
| | | <!-- :label-width="formLabelWidth"--> |
| | | <!-- >--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="itemdetail.icon"--> |
| | | <!-- :placeholder="$t('operatManage.menuSetObj.iconHolder')"--> |
| | | <!-- autocomplete="off"--> |
| | | <!-- ></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item |
| | | prop="isShow" |
| | | :label="$t('operatManage.menuSetObj.isShow')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | style="width: 400px" |
| | | :popper-append-to-body="false" |
| | | v-model="itemdetail.isShow" |
| | | :placeholder="$t('operatManage.menuSetObj.show')" |
| | | > |
| | | <el-option :label="$t('operatManage.menuSetObj.hiddeen')" value="0" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.isshow')" value="1" /> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options1"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <!-- <el-form-item--> |
| | | <!-- :label="$t('operatManage.menuSetObj.icon')"--> |
| | | <!-- :label-width="formLabelWidth"--> |
| | | <!-- >--> |
| | | <!-- <el-input--> |
| | | <!-- v-model="itemdetail.icon"--> |
| | | <!-- :placeholder="$t('operatManage.menuSetObj.iconHolder')"--> |
| | | <!-- autocomplete="off"--> |
| | | <!-- ></el-input>--> |
| | | <!-- </el-form-item>--> |
| | | <el-form-item prop="isShow" |
| | | :label="$t('operatManage.menuSetObj.isShow')" |
| | | :label-width="formLabelWidth"> |
| | | <el-select style="width: 400px" |
| | | :popper-append-to-body="false" |
| | | v-model="itemdetail.isShow" |
| | | :placeholder="$t('operatManage.menuSetObj.show')"> |
| | | <el-option :label="$t('operatManage.menuSetObj.hiddeen')" |
| | | value="0" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.isshow')" |
| | | value="1" /> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options1"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.menuUrl')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.url" |
| | | :placeholder="$t('operatManage.menuSetObj.menuUrlHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.menuUrl')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.url" |
| | | :placeholder="$t('operatManage.menuSetObj.menuUrlHolder')" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.authorize')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.perms" |
| | | :placeholder="$t('operatManage.menuSetObj.permsHolder')" |
| | | autocomplete="off" |
| | | ></el-input> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.authorize')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.perms" |
| | | :placeholder="$t('operatManage.menuSetObj.permsHolder')" |
| | | autocomplete="off"></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.type')" |
| | | prop="type" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | style="width: 400px" |
| | | :popper-append-to-body="false" |
| | | v-model="itemdetail.type" |
| | | :placeholder="$t('operatManage.menuSetObj.typeHolder')" |
| | | > |
| | | <el-option :label="$t('operatManage.menuSetObj.rootpath')" value="0" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.menu')" value="1" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.button')" value="2" /> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options2"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.type')" |
| | | prop="type" |
| | | :label-width="formLabelWidth"> |
| | | <el-select style="width: 400px" |
| | | :popper-append-to-body="false" |
| | | v-model="itemdetail.type" |
| | | :placeholder="$t('operatManage.menuSetObj.typeHolder')"> |
| | | <el-option :label="$t('operatManage.menuSetObj.rootpath')" |
| | | value="0" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.menu')" |
| | | value="1" /> |
| | | <el-option :label="$t('operatManage.menuSetObj.button')" |
| | | value="2" /> |
| | | <!-- <el-option--> |
| | | <!-- v-for="item in options2"--> |
| | | <!-- :key="item.value"--> |
| | | <!-- :label="item.label"--> |
| | | <!-- :value="item.value"--> |
| | | <!-- >--> |
| | | <!-- </el-option>--> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="itemdetail.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('operatManage.menuSetObj.bakHolder')" |
| | | ></el-input> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.bak')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="itemdetail.bak" |
| | | autocomplete="off" |
| | | :placeholder="$t('operatManage.menuSetObj.bakHolder')"></el-input> |
| | | </el-form-item> |
| | | <div v-if="menuStatus.update"> |
| | | <div> |
| | | <el-form-item> |
| | | <el-button |
| | | size="small" |
| | | type="primary" |
| | | @click="updMenu('itemdetail')" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | <el-button |
| | | size="small" |
| | | type="info" |
| | | @click="reset('itemdetail')" |
| | | >{{ |
| | | <el-button size="small" |
| | | type="primary" |
| | | @click="updMenu('itemdetail')">{{ $t('common.confirm') }}</el-button> |
| | | <el-button size="small" |
| | | type="info" |
| | | @click="reset('itemdetail')">{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | </el-form-item> |
| | |
| | | </div> |
| | | </div> |
| | | |
| | | <el-dialog |
| | | :title="$t('common.append')" |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose" |
| | | > |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form |
| | | :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | label-position="top" |
| | | > |
| | | <el-form-item |
| | | prop="enName" |
| | | :label="$t('operatManage.menuSetObj.enName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.enName" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.enName')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="cnName" |
| | | :label="$t('operatManage.menuSetObj.cnName')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.cnName" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.cnName')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.icon')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.icon" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.icon')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | prop="isShow" |
| | | :label="$t('operatManage.menuSetObj.isShow')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="ruleForm.isShow" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('operatManage.menuSetObj.isShow')" |
| | | > |
| | | <el-option |
| | | v-for="item in options1" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.menuUrl')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.url" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.menuUrl')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.authorize')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.perms" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.authorize')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.type')" |
| | | prop="type" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-select |
| | | :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="ruleForm.type" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('operatManage.menuSetObj.type')" |
| | | > |
| | | <el-option |
| | | v-for="item in options2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | > |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item |
| | | :label="$t('operatManage.menuSetObj.bak')" |
| | | :label-width="formLabelWidth" |
| | | > |
| | | <el-input |
| | | v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.bak')" |
| | | ></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div |
| | | slot="footer" |
| | | class="dialog-footer" |
| | | > |
| | | <el-dialog :title="$t('common.append')" |
| | | :visible.sync="dialogFormVisible" |
| | | :before-close="handleClose"> |
| | | <div style="height: 500px; overflow: auto"> |
| | | <el-form :model="ruleForm" |
| | | ref="ruleForm" |
| | | :rules="rules" |
| | | label-position="top"> |
| | | <el-form-item prop="enName" |
| | | :label="$t('operatManage.menuSetObj.enName')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.enName" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.enName')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="cnName" |
| | | :label="$t('operatManage.menuSetObj.cnName')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.cnName" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.cnName')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.icon')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.icon" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.icon')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item prop="isShow" |
| | | :label="$t('operatManage.menuSetObj.isShow')" |
| | | :label-width="formLabelWidth"> |
| | | <el-select :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="ruleForm.isShow" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('operatManage.menuSetObj.isShow')"> |
| | | <el-option v-for="item in options1" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.menuUrl')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.url" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.menuUrl')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.authorize')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.perms" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.authorize')"></el-input> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.type')" |
| | | prop="type" |
| | | :label-width="formLabelWidth"> |
| | | <el-select :popper-append-to-body="false" |
| | | style="width:85%" |
| | | v-model="ruleForm.type" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetree')+$t('operatManage.menuSetObj.type')"> |
| | | <el-option v-for="item in options2" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value"> |
| | | </el-option> |
| | | </el-select> |
| | | </el-form-item> |
| | | <el-form-item :label="$t('operatManage.menuSetObj.bak')" |
| | | :label-width="formLabelWidth"> |
| | | <el-input v-model="ruleForm.bak" |
| | | autocomplete="off" |
| | | style="width:85%" |
| | | :placeholder="$t('shuJuGuanLi.shuJuJianSuo.valuetwo')+$t('operatManage.menuSetObj.bak')"></el-input> |
| | | </el-form-item> |
| | | </el-form> |
| | | </div> |
| | | <div slot="footer" |
| | | class="dialog-footer"> |
| | | <el-button @click="resetForm('ruleForm')">{{ |
| | | $t('common.cancel') |
| | | }}</el-button> |
| | | <el-button |
| | | style="background: #409eff; color: white; border: 1px solid #409eff" |
| | | @click="submitForm('ruleForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading" |
| | | >{{ $t('common.confirm') }}</el-button> |
| | | <el-button style="background: #409eff; color: white; border: 1px solid #409eff" |
| | | @click="submitForm('ruleForm')" |
| | | v-loading.fullscreen.lock="fullscreenLoading">{{ $t('common.confirm') }}</el-button> |
| | | </div> |
| | | </el-dialog> |
| | | </div> |
| | |
| | | components: { |
| | | MyBread, |
| | | }, |
| | | data() { |
| | | data () { |
| | | return { |
| | | menuStatus: { |
| | | delete: false, |
| | |
| | | type: null, |
| | | bak: '', |
| | | }, |
| | | rules : { |
| | | rules: { |
| | | enName: [ |
| | | { required: true, message: this.$t('operatManage.menuSetObj.enNameHolder'), trigger: 'blur' }, |
| | | { required: true,message: this.$t('operatManage.menuSetObj.enNameHolder'),trigger: 'blur' }, |
| | | ], |
| | | cnName: [ |
| | | { required: true, message: this.$t('operatManage.menuSetObj.cnNameHolder'), trigger: 'blur' }, |
| | | { required: true,message: this.$t('operatManage.menuSetObj.cnNameHolder'),trigger: 'blur' }, |
| | | ], |
| | | |
| | | isShow: [ |
| | |
| | | options1: [ |
| | | { |
| | | value: 0, |
| | | label:this.$t('operatManage.menuSetObj.hiddeen') |
| | | label: this.$t('operatManage.menuSetObj.hiddeen') |
| | | }, |
| | | { |
| | | value: 1, |
| | | label:this.$t('operatManage.menuSetObj.isshow') |
| | | label: this.$t('operatManage.menuSetObj.isshow') |
| | | }, |
| | | ], |
| | | options2: [ |
| | | { |
| | | value: 0, |
| | | label:this.$t('operatManage.menuSetObj.rootpath') |
| | | label: this.$t('operatManage.menuSetObj.rootpath') |
| | | // label: 'æ ¹ç®å½', |
| | | }, |
| | | { |
| | | value: 1, |
| | | label:this.$t('operatManage.menuSetObj.menu') |
| | | label: this.$t('operatManage.menuSetObj.menu') |
| | | // label: 'èå', |
| | | }, |
| | | { |
| | | value: 2, |
| | | label:this.$t('operatManage.menuSetObj.button') |
| | | label: this.$t('operatManage.menuSetObj.button') |
| | | // label: 'æé®', |
| | | }, |
| | | ], |
| | |
| | | }; |
| | | }, |
| | | methods: { |
| | | getMenuTree() { |
| | | getMenuTree () { |
| | | //è·åç®å½æ æå¤§IDï¼æ°å»ºèç¹ä½¿ç¨ |
| | | // queryMaxId().then((res) => { |
| | | // this.id = res.data; |
| | | // }); |
| | | queryMenuAll().then((res) => { |
| | | if (res.code == 200) { |
| | | this.menuList = this.treeData(res.result); |
| | | this.oriData = res.result; |
| | | this.newData = res.result; |
| | | if (this.itemdetail.id != null) { |
| | | if(res.code==200) { |
| | | this.menuList=this.treeData(res.result); |
| | | this.oriData=res.result; |
| | | this.newData=res.result; |
| | | if(this.itemdetail.id!=null) { |
| | | this.$nextTick(() => { |
| | | this.$refs.tree.setCurrentKey(this.itemdetail.id); |
| | | }); |
| | |
| | | } |
| | | }); |
| | | }, |
| | | treeData(source) { |
| | | let cloneData = JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | treeData (source) { |
| | | let cloneData=JSON.parse(JSON.stringify(source)); // å¯¹æºæ°æ®æ·±åº¦å
é |
| | | return cloneData.filter((father) => { |
| | | // å¾ªç¯ææé¡¹ |
| | | let branchArr = cloneData.filter((child) => father.id == child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length > 0 ? (father.children = branchArr) : ''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | return father.pid == 0; // è¿åä¸çº§èå |
| | | let branchArr=cloneData.filter((child) => father.id==child.pid); // 对æ¯IDï¼åå«ä¸ä¸çº§èåï¼å¹¶è¿åæ°æ® |
| | | branchArr.length>0? (father.children=branchArr):''; // ç»ç¶çº§æ·»å ä¸ä¸ªchildren屿§ï¼å¹¶èµå¼ |
| | | return father.pid==0; // è¿åä¸çº§èå |
| | | }); |
| | | }, |
| | | |
| | | setEditNode(res) { |
| | | let node = this.$refs.tree.getCurrentNode(); |
| | | let pchildNodes = this.$refs.tree.getNode(node.id).parent.childNodes; |
| | | let currentId = {}; |
| | | for (let i = 0; i < pchildNodes.length; i++) { |
| | | if (pchildNodes[i].data.id == node.id) { |
| | | currentId = i; |
| | | setEditNode (res) { |
| | | let node=this.$refs.tree.getCurrentNode(); |
| | | let pchildNodes=this.$refs.tree.getNode(node.id).parent.childNodes; |
| | | let currentId={}; |
| | | for(let i=0;i<pchildNodes.length;i++) { |
| | | if(pchildNodes[i].data.id==node.id) { |
| | | currentId=i; |
| | | } |
| | | } |
| | | switch (res) { |
| | | switch(res) { |
| | | case 1://åä¸ç§»å¨ |
| | | if (currentId != 0) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId - 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = pchildNodes[currentId - 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum |
| | | var arr = []; |
| | | if(currentId!=0) { |
| | | const tempChildrenNodex1=pchildNodes[currentId-1]; |
| | | const tempChildrenNodex2=pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum=pchildNodes[currentId-1].data.orderNum; |
| | | tempChildrenNodex1.orderNum=pchildNodes[currentId].data.orderNum |
| | | var arr=[]; |
| | | this.oriData.filter(res => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | if(res.id==tempChildrenNodex2.data.id) { |
| | | res.orderNum=tempChildrenNodex2.orderNum; |
| | | arr.push(res) |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | } else if(res.id==tempChildrenNodex1.data.id) { |
| | | res.orderNum=tempChildrenNodex1.orderNum; |
| | | arr.push(res) |
| | | } |
| | | |
| | | }) |
| | | this.newData = arr; |
| | | this.newData=arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | |
| | | } |
| | | break; |
| | | case 2://åä¸ç§»å¨ |
| | | if (currentId < (pchildNodes.length - 1)) { |
| | | const tempChildrenNodex1 = pchildNodes[currentId + 1]; |
| | | const tempChildrenNodex2 = pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum = pchildNodes[currentId + 1].data.orderNum; |
| | | tempChildrenNodex1.orderNum = pchildNodes[currentId].data.orderNum; |
| | | var arr = []; |
| | | if(currentId<(pchildNodes.length-1)) { |
| | | const tempChildrenNodex1=pchildNodes[currentId+1]; |
| | | const tempChildrenNodex2=pchildNodes[currentId]; |
| | | tempChildrenNodex2.orderNum=pchildNodes[currentId+1].data.orderNum; |
| | | tempChildrenNodex1.orderNum=pchildNodes[currentId].data.orderNum; |
| | | var arr=[]; |
| | | this.oriData.filter(res => { |
| | | if (res.id == tempChildrenNodex2.data.id) { |
| | | res.orderNum = tempChildrenNodex2.orderNum; |
| | | if(res.id==tempChildrenNodex2.data.id) { |
| | | res.orderNum=tempChildrenNodex2.orderNum; |
| | | arr.push(res) |
| | | } else if (res.id == tempChildrenNodex1.data.id) { |
| | | res.orderNum = tempChildrenNodex1.orderNum; |
| | | } else if(res.id==tempChildrenNodex1.data.id) { |
| | | res.orderNum=tempChildrenNodex1.orderNum; |
| | | arr.push(res) |
| | | } |
| | | }) |
| | | this.newData = arr; |
| | | this.newData=arr; |
| | | this.sendChange(); |
| | | } else { |
| | | this.$message({ |
| | |
| | | |
| | | } |
| | | }, |
| | | setDelNode() { |
| | | this.remove(this.newNode, this.itemdetail) |
| | | setDelNode () { |
| | | this.remove(this.newNode,this.itemdetail) |
| | | }, |
| | | setNewNode(res) { |
| | | var id, lever, orderNum; |
| | | if (res == 1) {//æ°å¢å级 |
| | | id = this.itemdetail.pid; |
| | | orderNum = this.getMaxOrderNum(this.newNode.parent.childNodes) |
| | | setNewNode (res) { |
| | | var id,lever,orderNum; |
| | | if(res==1) {//æ°å¢å级 |
| | | id=this.itemdetail.pid; |
| | | orderNum=this.getMaxOrderNum(this.newNode.parent.childNodes) |
| | | |
| | | lever = this.itemdetail.level; |
| | | } else if (res == 2) {//æ°å¢å级 |
| | | id = this.itemdetail.id; |
| | | orderNum = this.getMaxOrderNum(this.newNode.childNodes) |
| | | lever=this.itemdetail.level; |
| | | } else if(res==2) {//æ°å¢å级 |
| | | id=this.itemdetail.id; |
| | | orderNum=this.getMaxOrderNum(this.newNode.childNodes) |
| | | |
| | | lever = this.itemdetail.level + 1; |
| | | lever=this.itemdetail.level+1; |
| | | } |
| | | |
| | | this.ruleForm.pid = id; |
| | | this.ruleForm.level = lever; |
| | | this.ruleForm.orderNum = orderNum |
| | | this.dialogFormVisible = true; |
| | | this.ruleForm.pid=id; |
| | | this.ruleForm.level=lever; |
| | | this.ruleForm.orderNum=orderNum |
| | | this.dialogFormVisible=true; |
| | | }, |
| | | getMaxOrderNum(res) { |
| | | var val = -100; |
| | | for (var i in res) { |
| | | if (res[i].data.orderNum > val) { |
| | | val = res[i].data.orderNum |
| | | getMaxOrderNum (res) { |
| | | var val=-100; |
| | | for(var i in res) { |
| | | if(res[i].data.orderNum>val) { |
| | | val=res[i].data.orderNum |
| | | } |
| | | } |
| | | val = val + 1; |
| | | val=val+1; |
| | | return val; |
| | | }, |
| | | |
| | |
| | | |
| | | |
| | | |
| | | append(node, data) { |
| | | this.dialogFormVisible = true; |
| | | this.ruleForm.pid = data.id; |
| | | this.ruleForm.orderNum = node.childNodes.length + 1; |
| | | this.ruleForm.level = data.level + 1; |
| | | append (node,data) { |
| | | this.dialogFormVisible=true; |
| | | this.ruleForm.pid=data.id; |
| | | this.ruleForm.orderNum=node.childNodes.length+1; |
| | | this.ruleForm.level=data.level+1; |
| | | }, |
| | | resetForm(formName) { |
| | | resetForm (formName) { |
| | | this.$confirm("å
³éåæ æ³ä¿åï¼æ¯å¦å
³é?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false; |
| | | this.dialogFormVisible=false; |
| | | this.$nextTick(() => { |
| | | this.$refs[formName].resetFields(); |
| | | this.ruleForm = {}; |
| | | this.ruleForm={}; |
| | | }); |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | submitForm(formName) { |
| | | submitForm (formName) { |
| | | this.$nextTick(() => { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.fullscreenLoading = true; |
| | | if(valid) { |
| | | this.fullscreenLoading=true; |
| | | insertMenu(this.ruleForm) |
| | | .then((res) => { |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.fullscreenLoading=false; |
| | | if(res.code==200) { |
| | | this.$message({ |
| | | message: 'æ·»å æå', |
| | | type: 'success', |
| | | }); |
| | | this.getMenuTree(); |
| | | this.itemdetail = {}; |
| | | this.ruleForm = {}; |
| | | this.dialogFormVisible = false; |
| | | this.itemdetail={}; |
| | | this.ruleForm={}; |
| | | this.dialogFormVisible=false; |
| | | this.$refs[formName].resetFields(); |
| | | } |
| | | }, 500); |
| | | },500); |
| | | }) |
| | | .catch((res) => { |
| | | this.itemdetail = {}; |
| | | this.itemdetail={}; |
| | | this.$message.error('æ·»å 失败'); |
| | | this.fullscreenLoading = false; |
| | | this.fullscreenLoading=false; |
| | | console.log(res); |
| | | }); |
| | | } else { |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | remove(node, data) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥èç¹, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | remove (node,data) { |
| | | this.$confirm('æ¤æä½å°å é¤è¯¥èç¹, æ¯å¦ç»§ç»?','æç¤º',{ |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | //å
å¼éæ°æåº |
| | | const parent = node.parent; |
| | | const children = parent.data.children || parent.data; |
| | | children.splice(data.orderNum - 1, 1); |
| | | children.forEach((item, index) => { |
| | | item.orderNum = index + 1; |
| | | const parent=node.parent; |
| | | const children=parent.data.children||parent.data; |
| | | children.splice(data.orderNum-1,1); |
| | | children.forEach((item,index) => { |
| | | item.orderNum=index+1; |
| | | }); |
| | | |
| | | this.traverseArr(data); //è·åå é¤çåID |
| | | this.delChildIDs.push(data.id); //è¦å é¤çå
¨é¨ID |
| | | let delIDs = this.delChildIDs; |
| | | let delIDs=this.delChildIDs; |
| | | Promise.all([ |
| | | deleteMenu({ ids: delIDs.toString() }), |
| | | updateMenuTrees(children), |
| | | ]) |
| | | .then((res) => { |
| | | if (res[0].code == 200 && res[1].code == 200) { |
| | | if(res[0].code==200&&res[1].code==200) { |
| | | this.$message({ |
| | | type: 'success', |
| | | message: 'å 餿å!', |
| | | }); |
| | | this.getMenuTree(); |
| | | this.itemdetail = {}; |
| | | } else if (res[0].code == 200) { |
| | | this.itemdetail={}; |
| | | } else if(res[0].code==200) { |
| | | this.getMenuTree(); |
| | | this.$message.error('å 餿åï¼ä½ç½®è°æ´å¤±è´¥'); |
| | | } else if (res[1].code == 200) { |
| | | } else if(res[1].code==200) { |
| | | this.getMenuTree(); |
| | | this.$message.error('å é¤å¤±è´¥,ä½ç½®è°æ´æå'); |
| | | } else { |
| | |
| | | }); |
| | | |
| | | //éç½®è¦å é¤çåID |
| | | this.delChildIDs = []; |
| | | this.delChildIDs=[]; |
| | | }) |
| | | .catch(() => { |
| | | this.$message('已忶å é¤'); |
| | | }); |
| | | }, |
| | | traverseArr(obj) { |
| | | if (obj.children) { |
| | | traverseArr (obj) { |
| | | if(obj.children) { |
| | | return obj.children.forEach((item) => { |
| | | // console.log(item.id + "---" + item.name); |
| | | // this.delChildID += "id=" + item.id + "&"; |
| | |
| | | } |
| | | return; |
| | | }, |
| | | flaten(arr) { |
| | | return arr.reduce((p, v, i) => { |
| | | for (let i = 0; i < p.length; i++) { |
| | | if (p[i].children) { |
| | | flaten (arr) { |
| | | return arr.reduce((p,v,i) => { |
| | | for(let i=0;i<p.length;i++) { |
| | | if(p[i].children) { |
| | | delete p[i].children; |
| | | } |
| | | } |
| | | return p.concat(v.children ? this.flaten(v.children).concat(v) : v); |
| | | }, []); |
| | | return p.concat(v.children? this.flaten(v.children).concat(v):v); |
| | | },[]); |
| | | }, |
| | | handleDragStart(node, ev) { |
| | | this.old_dirDat = JSON.parse(JSON.stringify(this.menuList)); //å°å¤ä»½çdiréæ°èµå¼ |
| | | handleDragStart (node,ev) { |
| | | this.old_dirDat=JSON.parse(JSON.stringify(this.menuList)); //å°å¤ä»½çdiréæ°èµå¼ |
| | | }, |
| | | handleDrop(draggingNode, dropNode, dropType, ev) { |
| | | this.$confirm('æ¤æä½å°ä¿åç®å½æ´æ¹, æ¯å¦ç»§ç»?', 'æç¤º', { |
| | | handleDrop (draggingNode,dropNode,dropType,ev) { |
| | | this.$confirm('æ¤æä½å°ä¿åç®å½æ´æ¹, æ¯å¦ç»§ç»?','æç¤º',{ |
| | | confirmButtonText: 'ç¡®å®', |
| | | cancelButtonText: 'åæ¶', |
| | | type: 'warning', |
| | | }) |
| | | .then(() => { |
| | | //ç¶èç¹ |
| | | let data = dropType != 'inner' ? dropNode.parent.data : dropNode.data; |
| | | let data=dropType!='inner'? dropNode.parent.data:dropNode.data; |
| | | // ç¶èç¹ä¸å
¨é¨åèç¹ |
| | | let nodeData = |
| | | dropNode.level == 1 && dropType != 'inner' ? data : data.children; |
| | | let nodeData= |
| | | dropNode.level==1&&dropType!='inner'? data:data.children; |
| | | //åæ´èç¹ |
| | | // console.log(nodeData); |
| | | nodeData.forEach((item, i) => { |
| | | if (dropType != 'inner') { |
| | | if (draggingNode.data.pid === dropNode.data.pid) { |
| | | item.pid = item.pid; |
| | | nodeData.forEach((item,i) => { |
| | | if(dropType!='inner') { |
| | | if(draggingNode.data.pid===dropNode.data.pid) { |
| | | item.pid=item.pid; |
| | | } else { |
| | | item.pid = dropNode.data.pid; |
| | | item.pid=dropNode.data.pid; |
| | | } |
| | | } else { |
| | | item.pid = data.id; |
| | | item.pid=data.id; |
| | | } |
| | | item.orderNum = i + 1; |
| | | item.orderNum=i+1; |
| | | }); |
| | | // console.log(nodeData); |
| | | //æ´æ°åå§æ´ä½æ°æ® |
| | | let arr = []; |
| | | let arr=[]; |
| | | this.oriData.forEach((e) => { |
| | | nodeData.forEach((item) => { |
| | | if (item.id === e.id) e = item; |
| | | if(item.id===e.id) e=item; |
| | | }); |
| | | arr.push(e); |
| | | }); |
| | | this.newData = arr; |
| | | this.newData=arr; |
| | | this.sendChange(); |
| | | }) |
| | | .catch(() => { |
| | |
| | | type: 'info', |
| | | message: 'å·²åæ¶æ´æ¹', |
| | | }); |
| | | this.menuList = this.old_dirDat; //å°å¤ä»½çdiréæ°èµå¼ |
| | | this.menuList=this.old_dirDat; //å°å¤ä»½çdiréæ°èµå¼ |
| | | }); |
| | | }, |
| | | sendChange() { |
| | | sendChange () { |
| | | this.newData.forEach((item) => { |
| | | if (item.pid == 0) { |
| | | item.type = 0; |
| | | if(item.pid==0) { |
| | | item.type=0; |
| | | } |
| | | }); |
| | | updateMenuTrees(this.newData) |
| | | .then((res) => { |
| | | if (res.code == 200) { |
| | | if(res.code==200) { |
| | | this.getMenuTree(); |
| | | return; |
| | | } else { |
| | |
| | | this.$message.error('è°æ´å¤±è´¥ï¼è¯·éè¯ï¼'); |
| | | }); |
| | | }, |
| | | handleNodeClick(data, node) { |
| | | this.newNode = node; |
| | | this.backUpData = JSON.stringify(data); |
| | | this.itemdetail = JSON.parse(JSON.stringify(data)); |
| | | this.itemdetail.isShow = this.itemdetail.isShow.toString(); |
| | | this.itemdetail.type = this.itemdetail.type.toString(); |
| | | handleNodeClick (data,node) { |
| | | this.newNode=node; |
| | | this.backUpData=JSON.stringify(data); |
| | | this.itemdetail=JSON.parse(JSON.stringify(data)); |
| | | this.itemdetail.isShow=this.itemdetail.isShow.toString(); |
| | | this.itemdetail.type=this.itemdetail.type.toString(); |
| | | }, |
| | | updMenu(formName) { |
| | | updMenu (formName) { |
| | | this.$nextTick(() => { |
| | | this.$refs[formName].validate((valid) => { |
| | | if (valid) { |
| | | this.fullscreenLoading = true; |
| | | if(valid) { |
| | | this.fullscreenLoading=true; |
| | | updateMenuTree(this.itemdetail) |
| | | .then((res) => { |
| | | setTimeout(() => { |
| | | this.fullscreenLoading = false; |
| | | if (res.code == 200) { |
| | | this.fullscreenLoading=false; |
| | | if(res.code==200) { |
| | | this.$router.go(0); |
| | | this.getMenuTree(); |
| | | this.itemdetail = {}; |
| | | this.dialogFormVisible = false; |
| | | this.itemdetail={}; |
| | | this.dialogFormVisible=false; |
| | | this.$refs[formName].resetFields(); |
| | | } |
| | | }, 500); |
| | | },500); |
| | | }) |
| | | .catch((res) => { |
| | | this.$message.error('è°æ´å¤±è´¥ï¼è¯·éè¯ï¼'); |
| | | this.fullscreenLoading = false; |
| | | this.fullscreenLoading=false; |
| | | }); |
| | | } else { |
| | | return false; |
| | |
| | | }); |
| | | }); |
| | | }, |
| | | reset(formName) { |
| | | reset (formName) { |
| | | this.$refs[formName].resetFields(); |
| | | if (this.backUpData != '') { |
| | | this.itemdetail = JSON.parse(this.backUpData); |
| | | if(this.backUpData!='') { |
| | | this.itemdetail=JSON.parse(this.backUpData); |
| | | } |
| | | }, |
| | | showPermsMenu(res) { |
| | | showPermsMenu (res) { |
| | | |
| | | switch (res.tag) { |
| | | switch(res.tag) { |
| | | case '/delete': |
| | | this.menuStatus.delete = true; |
| | | this.menuStatus.delete=true; |
| | | break; |
| | | case '/insert': |
| | | this.menuStatus.insert = true; |
| | | this.menuStatus.insert=true; |
| | | break; |
| | | case '/update': |
| | | this.menuStatus.update = true; |
| | | this.menuStatus.update=true; |
| | | break; |
| | | } |
| | | }, |
| | | getPerms() { |
| | | var val = this.$store.state.currentPerms; |
| | | var permsEntity = this.$store.state.permsEntity; |
| | | getPerms () { |
| | | var val=this.$store.state.currentPerms; |
| | | var permsEntity=this.$store.state.permsEntity; |
| | | |
| | | if (permsEntity.length == 0) { |
| | | if(permsEntity.length==0) { |
| | | getPerms().then((res) => { |
| | | if (res.code == 200) { |
| | | permsEntity = res.result; |
| | | if(res.code==200) { |
| | | permsEntity=res.result; |
| | | } |
| | | }); |
| | | } |
| | | for (var i = 0; i < permsEntity.length; i++) { |
| | | if (permsEntity[i].perms == val) { |
| | | for(var i=0;i<permsEntity.length;i++) { |
| | | if(permsEntity[i].perms==val) { |
| | | this.showPermsMenu(permsEntity[i]); |
| | | } |
| | | } |
| | | }, |
| | | handleClose() { |
| | | handleClose () { |
| | | this.$confirm("å
³éåæ æ³ä¿åï¼æ¯å¦å
³é?") |
| | | .then((_) => { |
| | | this.dialogFormVisible = false |
| | | this.dialogFormVisible=false |
| | | }) |
| | | .catch((_) => { }); |
| | | }, |
| | | }, |
| | | mounted() { |
| | | mounted () { |
| | | this.getMenuTree(); |
| | | this.getPerms(); |
| | | }, |
| | | created() { }, |
| | | created () { }, |
| | | }; |
| | | </script> |
| | | <style lang="less" scoped> |
| | |
| | | border-radius: 5px; |
| | | padding: 1%; |
| | | overflow-y: auto; |
| | | border-right: 1px solid #dcdfe6; |
| | | border-right: 1px solid #dcdfe6; |
| | | } |
| | | .right_menu { |
| | | width: 80%; |
| | |
| | | } |
| | | } |
| | | } |
| | | .btnBox{ |
| | | |
| | | .btnBox { |
| | | position: absolute; |
| | | bottom: 0; |
| | | right: 0; |