This commit is contained in:
chenxiaoxi
2022-01-26 15:30:49 +08:00
507 changed files with 306853 additions and 35754 deletions
+194 -175
View File
@@ -13,9 +13,13 @@
}
},
"@antv/algorithm": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@antv/algorithm/-/algorithm-0.0.6.tgz",
"integrity": "sha512-g/abjTXHwzebghN8QPuk3z5nM/C9Wf1Toq6iHK6lwZXdUMGHxxhuO5RAkkYcR2Vib550zdQy6PLldmAWhgOjQA=="
"version": "0.1.10",
"resolved": "https://registry.npmjs.org/@antv/algorithm/-/algorithm-0.1.10.tgz",
"integrity": "sha512-x2ZbPkUaR2OQ5/HY46WaJqLLjxarWSsCvGokv8MVzlhOBcgvUIfpHla+l3atmdt2el4W1I0bncxEUs3jVlEjSA==",
"requires": {
"@antv/util": "^2.0.13",
"tslib": "^2.0.0"
}
},
"@antv/dom-util": {
"version": "2.0.3",
@@ -31,16 +35,16 @@
"integrity": "sha512-6C6NJOdoNVptCr5y9BVOhKkCgW7LFs/SpcRyAExUeSjAm0zJqcqNkSIRGsXYhj4PJI+CZICHzGwwiSnIsE68Ug=="
},
"@antv/g-base": {
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.5.tgz",
"integrity": "sha512-Cl3Gup4GBebqz/YeaPJHhF0ZP4lj0C0LdNkNj01jlqy/WGCbhf8CyDFzLE91N346cyzB9Ri2ztGz4pLlvdOLtQ==",
"version": "0.5.9",
"resolved": "https://registry.npmjs.org/@antv/g-base/-/g-base-0.5.9.tgz",
"integrity": "sha512-IAzuCLRmz9cKCWUKR3cKWgLZ/6OQYpTCIOgxAP8Bc+HRw0mu8iC3OTz+tWKGv9L8unpvCvpQd1H+OTTjdg/TpQ==",
"requires": {
"@antv/event-emitter": "^0.1.1",
"@antv/g-math": "^0.1.6",
"@antv/matrix-util": "^3.1.0-beta.1",
"@antv/path-util": "~2.0.5",
"@antv/util": "~2.0.0",
"@types/d3-timer": "^1.0.9",
"@types/d3-timer": "^2.0.0",
"d3-ease": "^1.0.5",
"d3-interpolate": "^1.3.2",
"d3-timer": "^1.0.9",
@@ -68,9 +72,9 @@
}
},
"@antv/g-canvas": {
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@antv/g-canvas/-/g-canvas-0.5.6.tgz",
"integrity": "sha512-r6f6KqYuNZWunf2Vnf1ACopn8aic6TBFhaN3XuckenhQNqR+/PI/4Mft7z14zo7WH58X2Xs2Npq9awJXBEUzaw==",
"version": "0.5.12",
"resolved": "https://registry.npmjs.org/@antv/g-canvas/-/g-canvas-0.5.12.tgz",
"integrity": "sha512-iJ/muwwqCCNONVlPIzv/7OL5iLguaKRj2BxNMytUO3TWwamM+kHkiyYEOkS0dPn9h/hBsHYlLUluSVz2Fp6/bw==",
"requires": {
"@antv/g-base": "^0.5.3",
"@antv/g-math": "^0.1.6",
@@ -122,19 +126,18 @@
}
},
"@antv/g-webgpu": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@antv/g-webgpu/-/g-webgpu-0.5.2.tgz",
"integrity": "sha512-uz8gngKOaFSuQFJR9ktEsYlIx/JQnZFNGcNzNZ9BSiAd8nKWnmsisx1kIJX9CaqzmgHdNfW6tBEYZ5QbrBH3Og==",
"version": "0.5.5",
"resolved": "https://registry.npmjs.org/@antv/g-webgpu/-/g-webgpu-0.5.5.tgz",
"integrity": "sha512-TxtBniINFq1jFGEPo46xjJfrbJbUqkFd5wmsRs3tcg/7J7xoldOP1kEadpI3AJG9knMYdE92VpILw1VPd6DgzQ==",
"requires": {
"@antv/g-webgpu-core": "^0.5.2",
"@antv/g-webgpu-engine": "^0.5.2",
"@antv/g-webgpu-core": "^0.5.5",
"@antv/g-webgpu-engine": "^0.5.5",
"@webgpu/types": "^0.0.31",
"gl-matrix": "^3.1.0",
"gl-vec2": "^1.3.0",
"hammerjs": "^2.0.8",
"inversify": "^5.0.1",
"inversify-inject-decorators": "^3.1.0",
"lodash": "^4.17.15",
"polyline-miter-util": "^1.0.1",
"polyline-normals": "^2.0.2",
"probe.gl": "^3.1.1",
@@ -142,60 +145,58 @@
}
},
"@antv/g-webgpu-core": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@antv/g-webgpu-core/-/g-webgpu-core-0.5.2.tgz",
"integrity": "sha512-ZGMe8YUSs+tUgORuxf9GcFHUKsQNd57Ug2U4JNsbI6gBo//ro/FDqgjiSBxWiO4YVF4Za/Ae+jM/n48mWF+6BA==",
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@antv/g-webgpu-core/-/g-webgpu-core-0.5.6.tgz",
"integrity": "sha512-DPiH3GkAUiT0Q+LAKeImpI+IOQ/gP2w6HstYKivpFIpBPIvZ/9equM3icVrn1iDfDkZANVXQ1PppcO3xBv1ZTw==",
"requires": {
"eventemitter3": "^4.0.0",
"gl-matrix": "^3.1.0",
"inversify": "^5.0.1",
"inversify-inject-decorators": "^3.1.0",
"lodash": "^4.17.15",
"probe.gl": "^3.1.1",
"reflect-metadata": "^0.1.13"
}
},
"@antv/g-webgpu-engine": {
"version": "0.5.2",
"resolved": "https://registry.npmjs.org/@antv/g-webgpu-engine/-/g-webgpu-engine-0.5.2.tgz",
"integrity": "sha512-GsmJ4xP4a/CVmbhpYiFuqBSyT/wQsoYGqCuEbfxGPxP2cs5MGqQyClh8gjy2TPr80YRuM05oOsH2RUYFw+Tc1g==",
"version": "0.5.6",
"resolved": "https://registry.npmjs.org/@antv/g-webgpu-engine/-/g-webgpu-engine-0.5.6.tgz",
"integrity": "sha512-D311qYUefdEFwLayutIHqucrAY3cAGH3BdnXS37nq+0nsglrHcNP0Ab1YTinn9RihLoY3yXFTLzrYkJHJbZXDg==",
"requires": {
"@antv/g-webgpu-core": "^0.5.2",
"@antv/g-webgpu-core": "^0.5.6",
"@webgpu/glslang": "^0.0.15",
"@webgpu/types": "^0.0.31",
"gl-matrix": "^3.1.0",
"hammerjs": "^2.0.8",
"inversify": "^5.0.1",
"inversify-inject-decorators": "^3.1.0",
"lodash": "^4.17.15",
"probe.gl": "^3.1.1",
"reflect-metadata": "^0.1.13",
"regl": "^1.3.11"
}
},
"@antv/g6": {
"version": "4.1.4",
"resolved": "https://registry.npmjs.org/@antv/g6/-/g6-4.1.4.tgz",
"integrity": "sha512-J6n1JiiNT2zpqDhiR7BoFG672/KSnyWEdHyNf2u6SwlyP88p1mY9i1hUKhqVyVowOZn3128bhC1Io9N8QvFSBg==",
"version": "4.3.6",
"resolved": "https://registry.npmjs.org/@antv/g6/-/g6-4.3.6.tgz",
"integrity": "sha512-droBnC51bY5omyIr7CZu5kwsoMm2f5oRu17N1vjf4bnLcSw+HvORspV9DWPMe9XmqUHFQt5HImjzyPXcTdcbvw==",
"requires": {
"@antv/g6-pc": "^0.0.8"
"@antv/g6-pc": "0.3.6"
}
},
"@antv/g6-core": {
"version": "0.0.7",
"resolved": "https://registry.npmjs.org/@antv/g6-core/-/g6-core-0.0.7.tgz",
"integrity": "sha512-6ixXCqxsrKgovdf14KglKT6dQFb4LbzZgQaMj9s5NsfJWgwN9aYWyU2qbsyWgHkp/AOyW+vef+w2Vlk42qXFwg==",
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/@antv/g6-core/-/g6-core-0.3.6.tgz",
"integrity": "sha512-sYqfBFyM/Fh0oNXhIhDWuw763ebU1zB13VS4ClqCX4Zh66NClH66efflaCiSm0nDFG6HfitUNenzQbMajTsJnA==",
"requires": {
"@antv/algorithm": "^0.0.6",
"@antv/algorithm": "^0.1.8",
"@antv/dom-util": "^2.0.1",
"@antv/event-emitter": "~0.1.0",
"@antv/g-base": "^0.5.1",
"@antv/g-math": "^0.1.1",
"@antv/matrix-util": "^3.1.0-beta.2",
"@antv/path-util": "^2.0.3",
"@antv/scale": "^0.3.1",
"@antv/util": "~2.0.5",
"ml-matrix": "^6.5.0"
"ml-matrix": "^6.5.0",
"tslib": "^2.1.0"
},
"dependencies": {
"@antv/matrix-util": {
@@ -206,85 +207,65 @@
"@antv/util": "^2.0.9",
"gl-matrix": "^3.3.0",
"tslib": "^1.10.0"
},
"dependencies": {
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"tslib": {
"version": "1.14.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-1.14.1.tgz",
"integrity": "sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg=="
}
}
},
"@antv/g6-element": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@antv/g6-element/-/g6-element-0.0.6.tgz",
"integrity": "sha512-Vfg5XWyymCO74JSmtuuhp5VMYgucOaViwNnIV+H3JqQ5iruo3VEh7GVtlYUGUU5xXMFKPeDMdwvRZOJKddCvSg==",
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/@antv/g6-element/-/g6-element-0.3.6.tgz",
"integrity": "sha512-PnqxzYkgH/mfuxiGp20LX0SSR8bP/Qz+taMcGyD0myVIq6NiGgvqfhOjriAEVnaL9htldz5+BXth6euePqO5Lg==",
"requires": {
"@antv/g-base": "^0.5.1",
"@antv/g6-core": "^0.0.7",
"@antv/g6-core": "*",
"@antv/util": "~2.0.5"
}
},
"@antv/g6-pc": {
"version": "0.0.8",
"resolved": "https://registry.npmjs.org/@antv/g6-pc/-/g6-pc-0.0.8.tgz",
"integrity": "sha512-0VY1zrXnzEe0L99zkaGUhE8TRdhlS/TdtMvE3rUiysE1iS5nQX+9lPJxUMpoJMuWZAYJ3X5xQHwyAcyhupsXYQ==",
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/@antv/g6-pc/-/g6-pc-0.3.6.tgz",
"integrity": "sha512-VhdPzRp14DmxZ+JB0A+zOkRRW8PeJTdH4BRIC6O5KmkjP+ASDqqOvV7LCigqb/iykAFyC3WvY6jMMzGY/7NsIg==",
"requires": {
"@ant-design/colors": "^4.0.5",
"@antv/algorithm": "^0.0.6",
"@antv/algorithm": "^0.1.8",
"@antv/dom-util": "^2.0.1",
"@antv/event-emitter": "~0.1.0",
"@antv/g-base": "^0.5.1",
"@antv/g-canvas": "^0.5.2",
"@antv/g-math": "^0.1.1",
"@antv/g-svg": "^0.5.1",
"@antv/g-webgpu": "^0.5.1",
"@antv/g6-core": "^0.0.7",
"@antv/g6-element": "^0.0.6",
"@antv/g6-plugin": "^0.0.6",
"@antv/hierarchy": "^0.6.2",
"@antv/layout": "^0.0.16",
"@antv/g6-core": "0.3.6",
"@antv/g6-element": "0.3.6",
"@antv/g6-plugin": "0.3.6",
"@antv/hierarchy": "^0.6.7",
"@antv/layout": "^0.1.14",
"@antv/matrix-util": "^3.0.4",
"@antv/path-util": "^2.0.3",
"@antv/scale": "^0.3.1",
"@antv/util": "~2.0.5",
"color": "^3.1.3",
"d3-force": "^2.0.1",
"dagre": "^0.8.5",
"insert-css": "^2.0.0",
"ml-matrix": "^6.5.0"
},
"dependencies": {
"color": {
"version": "3.1.3",
"resolved": "https://registry.npmjs.org/color/-/color-3.1.3.tgz",
"integrity": "sha512-xgXAcTHa2HeFCGLE9Xs/R82hujGtu9Jd9x4NW3T34+OMs7VoPsjwzRczKHvTAHeJwWFwX5j15+MgAppE8ztObQ==",
"requires": {
"color-convert": "^1.9.1",
"color-string": "^1.5.4"
}
},
"color-string": {
"version": "1.5.4",
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.5.4.tgz",
"integrity": "sha512-57yF5yt8Xa3czSEW1jfQDE79Idk0+AkN/4KWad6tbdxUmAs3MvjxlWSWD4deYytcRfoZ9nhKyFl1kj5tBvidbw==",
"requires": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
}
}
}
},
"@antv/g6-plugin": {
"version": "0.0.6",
"resolved": "https://registry.npmjs.org/@antv/g6-plugin/-/g6-plugin-0.0.6.tgz",
"integrity": "sha512-gPFSyzztTPs4phr1YawjI7CEQs686u2atTWt3bqty556ZiXgkDLNNG+ZX/Sh/yrbpr3msPCBM22UiO3p2h9GgA==",
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/@antv/g6-plugin/-/g6-plugin-0.3.6.tgz",
"integrity": "sha512-qpuS8S+KFH3iYsebY3/qKbf8Ks/Hm8hmQdTYwT93YJLZlm7sNSg1/+nfTXpEKbGfyOq8kocSzVvFyS7gluVg8A==",
"requires": {
"@antv/dom-util": "^2.0.2",
"@antv/g-base": "^0.5.1",
"@antv/g-canvas": "^0.5.2",
"@antv/g-svg": "^0.5.2",
"@antv/g6-core": "^0.0.7",
"@antv/g6-core": "0.3.6",
"@antv/matrix-util": "^3.0.4",
"@antv/scale": "^0.3.4",
"@antv/util": "^2.0.9",
@@ -292,19 +273,19 @@
}
},
"@antv/hierarchy": {
"version": "0.6.6",
"resolved": "https://registry.npmjs.org/@antv/hierarchy/-/hierarchy-0.6.6.tgz",
"integrity": "sha512-ivb9j5aJOogjjU9k7WZXWznevMyqgBbP/Xq2rfXsQFLk4ArABt2ewU6a6jndPOiycGDxppZ8kaYjli70i4HluA==",
"version": "0.6.8",
"resolved": "https://registry.npmjs.org/@antv/hierarchy/-/hierarchy-0.6.8.tgz",
"integrity": "sha512-wVzUl+pxny5gyGJ2mkWx8IiEypX6bnMHgr/NILgbxY6shoy0Vf4FhZpI3CY8Ez7bQT6js8fMkB2NymPW7d7i8A==",
"requires": {
"@antv/util": "^2.0.7"
}
},
"@antv/layout": {
"version": "0.0.16",
"resolved": "https://registry.npmjs.org/@antv/layout/-/layout-0.0.16.tgz",
"integrity": "sha512-844gAk6PTVc/5ma1hay1M5Wc6KC5vKVJxBiskPy1IrSoZYUNlwsAUJudejgfWt03Vr4GBpNywMXDIIB7kHitlQ==",
"version": "0.1.18",
"resolved": "https://registry.npmjs.org/@antv/layout/-/layout-0.1.18.tgz",
"integrity": "sha512-mnuVtZLVnUzy09TpqlwsM5vKCMYFbHhZ/Un87gIFRkIFHwg7Uw5dlaRBpFviQ5rVBwuncKMXR7xPOGdlt3OnRg==",
"requires": {
"@antv/g-webgpu": "^0.5.1",
"@antv/g-webgpu": "0.5.5",
"d3-force": "^2.0.1",
"dagre": "^0.8.5",
"ml-matrix": "^6.5.0"
@@ -330,9 +311,9 @@
}
},
"@antv/scale": {
"version": "0.3.7",
"resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.7.tgz",
"integrity": "sha512-uMIbzC5Ix/fc0D7EJ6Z04bPvR763baQecsbdsReZyd5H/jXWx5Flo07m35nW3quegh0mzaWaW0PmzMiwwNNV6Q==",
"version": "0.3.12",
"resolved": "https://registry.npmjs.org/@antv/scale/-/scale-0.3.12.tgz",
"integrity": "sha512-ov0cQy5VsYUVFTwKZ3/sXcIKJK1msXye6xie6h+1McwvgmM+rZdKvGCbfGIXVmV9JBc9zksa2ke4E0sI0TawjQ==",
"requires": {
"@antv/util": "~2.0.3",
"fecha": "~4.2.0",
@@ -340,9 +321,9 @@
}
},
"@antv/util": {
"version": "2.0.10",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.10.tgz",
"integrity": "sha512-cO6F5qyGVdwG21lunhoDhupR+I+eLYAePgDzM2bjU3LwE3akfyymhOlHE8wcONsPEVRLQ3sTOtd+FojO6g01gw==",
"version": "2.0.14",
"resolved": "https://registry.npmjs.org/@antv/util/-/util-2.0.14.tgz",
"integrity": "sha512-iwM4XKRzW7pbBnMnSGKqcNGo3FdDzMGbRojAiMQ2KC0bTwtLEphQ+hYWa1c+O9BuHtcMkVvTVDylHNESL5vE5g==",
"requires": {
"tslib": "^2.0.3"
}
@@ -2682,10 +2663,15 @@
"integrity": "sha512-shAmDyaQC4H92APFoIaVDHCx5bStIocgvbwQyxPRrbUY20V1EYTbSDchWbuwlMG3V17cprZhA6+78JfB+3DTPw==",
"dev": true
},
"@popperjs/core": {
"version": "2.11.0",
"resolved": "https://registry.npmjs.org/@popperjs/core/-/core-2.11.0.tgz",
"integrity": "sha512-zrsUxjLOKAzdewIDRWy9nsV1GQsKBCWaGwsZQlCgr6/q+vjyZhFgqedLfFBuI9anTPEUT4APq9Mu0SZBTzIcGQ=="
},
"@probe.gl/stats": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-3.3.0.tgz",
"integrity": "sha512-CV4c3EgallqZTO88u34/u9L5asL0nCVP1BEkb4qcXlh8Qz2Vmygbyjz1ViQsct6rSi2lJ52lo6W0PnlpZJJvcA==",
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/@probe.gl/stats/-/stats-3.4.0.tgz",
"integrity": "sha512-Gl37r9qGuiKadIvTZdSZvzCNOttJYw6RcY1oT0oDuB8r2uhuZAdSMQRQTy9FTinp6MY6O9wngGnV6EpQ8wSBAw==",
"requires": {
"@babel/runtime": "^7.0.0"
}
@@ -2755,14 +2741,9 @@
}
},
"@types/d3-timer": {
"version": "1.0.10",
"resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-1.0.10.tgz",
"integrity": "sha512-ZnAbquVqy+4ZjdW0cY6URp+qF/AzTVNda2jYyOzpR2cPT35FTXl78s15Bomph9+ckOiI1TtkljnWkwbIGAb6rg=="
},
"@types/estree": {
"version": "0.0.46",
"resolved": "https://registry.npmjs.org/@types/estree/-/estree-0.0.46.tgz",
"integrity": "sha512-laIjwTQaD+5DukBZaygQ79K1Z0jb1bPEMRrkXSLjtCcZm+abyp5YbrqpSLzD42FwWW6gK/aS4NYpJ804nG2brg=="
"version": "2.0.1",
"resolved": "https://registry.npmjs.org/@types/d3-timer/-/d3-timer-2.0.1.tgz",
"integrity": "sha512-TF8aoF5cHcLO7W7403blM7L1T+6NF3XMyN3fxyUolq2uOcFeicG/khQg/dGxiCJWoAcmYulYN7LYSRKO54IXaA=="
},
"@types/express": {
"version": "4.17.11",
@@ -2844,7 +2825,8 @@
"@types/node": {
"version": "14.14.22",
"resolved": "https://registry.npmjs.org/@types/node/-/node-14.14.22.tgz",
"integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw=="
"integrity": "sha512-g+f/qj/cNcqKkc3tFqlXOYjrmZA+jNBiDzbP3kH+B+otKFqAdPgVTGP1IeKRdMml/aE69as5S4FqtxAbl+LaMw==",
"dev": true
},
"@types/normalize-package-data": {
"version": "2.4.0",
@@ -2963,11 +2945,23 @@
}
}
},
"@vant/icons": {
"version": "1.7.1",
"resolved": "https://registry.nlark.com/@vant/icons/download/@vant/icons-1.7.1.tgz",
"integrity": "sha1-Sa5CAwK1WB5U5olIkeWgW8dun4c="
},
"@vant/popperjs": {
"version": "1.1.0",
"resolved": "https://registry.nlark.com/@vant/popperjs/download/@vant/popperjs-1.1.0.tgz",
"integrity": "sha1-tO3uW7+m+xhwWYbjE9T9XxeUKg8=",
"requires": {
"@popperjs/core": "^2.9.2"
}
},
"@vue/babel-helper-vue-jsx-merge-props": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/@vue/babel-helper-vue-jsx-merge-props/-/babel-helper-vue-jsx-merge-props-1.2.1.tgz",
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA==",
"dev": true
"integrity": "sha512-QOi5OW45e2R20VygMSNhyQHvpdUwQZqGPc748JLGCYEy+yp8fNFNdbNIGAgZmi9e+2JHPd6i6idRuqivyicIkA=="
},
"@vue/babel-helper-vue-transform-on": {
"version": "1.0.2",
@@ -5426,6 +5420,16 @@
"object.assign": "^4.1.0"
}
},
"babel-plugin-import": {
"version": "1.13.3",
"resolved": "https://registry.npmjs.org/babel-plugin-import/-/babel-plugin-import-1.13.3.tgz",
"integrity": "sha512-1qCWdljJOrDRH/ybaCZuDgySii4yYrtQ8OJQwrcDqdt0y67N30ng3X3nABg6j7gR7qUJgcMa9OMhc4AGViDwWw==",
"dev": true,
"requires": {
"@babel/helper-module-imports": "^7.0.0",
"@babel/runtime": "^7.0.0"
}
},
"babel-polyfill": {
"version": "6.26.0",
"resolved": "https://registry.npmjs.org/babel-polyfill/-/babel-polyfill-6.26.0.tgz",
@@ -6347,6 +6351,15 @@
"object-visit": "^1.0.0"
}
},
"color": {
"version": "3.2.1",
"resolved": "https://registry.npmjs.org/color/-/color-3.2.1.tgz",
"integrity": "sha512-aBl7dZI9ENN6fUGC7mWpMTPNHmWUSNan9tuWN6ahh5ZLNk9baLJOnSMlrQkHcrfFgz2/RigjUVAjdx36VcemKA==",
"requires": {
"color-convert": "^1.9.3",
"color-string": "^1.6.0"
}
},
"color-convert": {
"version": "1.9.3",
"resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz",
@@ -6360,6 +6373,15 @@
"resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz",
"integrity": "sha1-p9BVi9icQveV3UIyj3QIMcpTvCU="
},
"color-string": {
"version": "1.6.0",
"resolved": "https://registry.npmjs.org/color-string/-/color-string-1.6.0.tgz",
"integrity": "sha512-c/hGS+kRWJutUBEngKKmk4iH3sD59MBkoxVapS/0wgpCz2u7XsNloxknyvBhzwEs1IbV36D9PwqLPJ2DTu3vMA==",
"requires": {
"color-name": "^1.0.0",
"simple-swizzle": "^0.2.2"
}
},
"colorette": {
"version": "1.2.1",
"resolved": "https://registry.npmjs.org/colorette/-/colorette-1.2.1.tgz",
@@ -8511,9 +8533,9 @@
"dev": true
},
"fecha": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.0.tgz",
"integrity": "sha512-aN3pcx/DSmtyoovUudctc8+6Hl4T+hI9GBBHLjA76jdZl7+b1sgh5g4k+u/GL3dTy1/pnYzKp69FpJ0OicE3Wg=="
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/fecha/-/fecha-4.2.1.tgz",
"integrity": "sha512-MMMQ0ludy/nBs1/o0zVOiKTpG7qMbonKUzjJgQFEuvq6INZ1OraKPRAWkBq5vlKLOUMpmNYG1JoN3oDPUQ9m3Q=="
},
"figgy-pudding": {
"version": "3.5.2",
@@ -9306,9 +9328,9 @@
"integrity": "sha1-610Ql7dUL0x56jBg067gfQU4gPQ="
},
"inversify": {
"version": "5.0.5",
"resolved": "https://registry.npmjs.org/inversify/-/inversify-5.0.5.tgz",
"integrity": "sha512-60QsfPz8NAU/GZqXu8hJ+BhNf/C/c+Hp0eDc6XMIJTxBiP36AQyyQKpBkOVTLWBFDQWYVHpbbEuIsHu9dLuJDA=="
"version": "5.1.1",
"resolved": "https://registry.npmjs.org/inversify/-/inversify-5.1.1.tgz",
"integrity": "sha512-j8grHGDzv1v+8T1sAQ+3boTCntFPfvxLCkNcxB1J8qA0lUN+fAlSyYd+RXKvaPRL4AGyPxViutBEJHNXOyUdFQ=="
},
"inversify-inject-decorators": {
"version": "3.1.0",
@@ -9360,12 +9382,9 @@
}
},
"is-any-array": {
"version": "0.1.0",
"resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-0.1.0.tgz",
"integrity": "sha512-6Kkl1RnvfdkmXM6ZlP+kELGBMA74Nq5pSOm9gIKDaPRe9KQlIJzonrOgq0Jzn/iElB6F2/olpLgWYeVySzrSRg==",
"requires": {
"rollup": "^1.31.1"
}
"version": "1.0.0",
"resolved": "https://registry.npmjs.org/is-any-array/-/is-any-array-1.0.0.tgz",
"integrity": "sha512-0o0ZsgObnylv72nO39P6M+PL7jPUEx39O6BEfZuX36IKPy/RpdudxluAIaRn/LZi5eVPDMlMBaLABzOK6bwPlw=="
},
"is-arguments": {
"version": "1.0.4",
@@ -10292,37 +10311,37 @@
}
},
"ml-array-max": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ml-array-max/-/ml-array-max-1.2.0.tgz",
"integrity": "sha512-3UH7XCdjINxbtBWj1EuHMeI242Q3uLuC4rTpSybBWUpGjnG/BefAFxmTolUCuXDM59mJ/G/re80CQbaVIuMjQA==",
"version": "1.2.3",
"resolved": "https://registry.npmjs.org/ml-array-max/-/ml-array-max-1.2.3.tgz",
"integrity": "sha512-49YwnLlAf4/E/VyezUz+SNfSBhPE8JTahxRPuyM9S9Uv+ft5x0C8A4trtkDgrttMxoxbhudTA1yg8zgJZaYtpA==",
"requires": {
"is-any-array": "^0.1.0"
"is-any-array": "^1.0.0"
}
},
"ml-array-min": {
"version": "1.2.0",
"resolved": "https://registry.npmjs.org/ml-array-min/-/ml-array-min-1.2.0.tgz",
"integrity": "sha512-Wgf2+lCndLy1SbeOZSUqlkxD9T1CXPT7CIlNGAZRRQI35wsqvfuNtLNH4qKFx8kNjlq3VGXKOSBHeiXR31vaTA==",
"version": "1.2.2",
"resolved": "https://registry.npmjs.org/ml-array-min/-/ml-array-min-1.2.2.tgz",
"integrity": "sha512-yidQcOHFaGEuVr6FcwAn+QvKXJv1Lxel5fyKrO+aXGJGp97Mt+p8r21WYtikS/PTVbxdSrliQ0UK4wSHYHHgzQ==",
"requires": {
"is-any-array": "^0.1.0"
"is-any-array": "^1.0.0"
}
},
"ml-array-rescale": {
"version": "1.3.2",
"resolved": "https://registry.npmjs.org/ml-array-rescale/-/ml-array-rescale-1.3.2.tgz",
"integrity": "sha512-kiXwdVCGrer7rLnjR6Q9ZgP6e9rbnmQvYVUMLXyqNg4+zOs+jek8yBupqPZPDr+NvlSE5OuMnfAbP1oA63kHBA==",
"version": "1.3.5",
"resolved": "https://registry.npmjs.org/ml-array-rescale/-/ml-array-rescale-1.3.5.tgz",
"integrity": "sha512-czK+faN7kYrF48SgVQeXGkxUjDEas6BA4EzF4jJNh8UEtzpSvHW3RllZCJCCyrAqeFc+Y/LhgYUzuHFpevM3qA==",
"requires": {
"is-any-array": "^0.1.0",
"ml-array-max": "^1.2.0",
"ml-array-min": "^1.2.0"
"is-any-array": "^1.0.0",
"ml-array-max": "^1.2.3",
"ml-array-min": "^1.2.2"
}
},
"ml-matrix": {
"version": "6.6.0",
"resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.6.0.tgz",
"integrity": "sha512-ca3+z0VwvzmhTQ1KuvUTSQJxDruzbdkfkThp4XptLOGAKbEtedgWfPTsBVicxOf+3NTR69Zqiw8fRFZM747FAQ==",
"version": "6.8.0",
"resolved": "https://registry.npmjs.org/ml-matrix/-/ml-matrix-6.8.0.tgz",
"integrity": "sha512-c29k/gtyzLeNs0vLB2u4hHYcKr8PdyIs4oB0OsVhlgKiHbYyFkC2e98FcUPKhcnzn234jeZk42No+6d4bXBDNg==",
"requires": {
"ml-array-rescale": "^1.3.2"
"ml-array-rescale": "^1.3.5"
}
},
"moment": {
@@ -11420,12 +11439,12 @@
}
},
"probe.gl": {
"version": "3.3.0",
"resolved": "https://registry.npmjs.org/probe.gl/-/probe.gl-3.3.0.tgz",
"integrity": "sha512-59E6AEw4N8sU4PKfAl7S2UBYJCOa064WpEFcXfeFOB/36FJtplYY+261DqLjLAvOqRRHiKVEQUBo63PQ3jKeWA==",
"version": "3.4.0",
"resolved": "https://registry.npmjs.org/probe.gl/-/probe.gl-3.4.0.tgz",
"integrity": "sha512-9CLByZATuhuG/Viq3ckfWU+dAhb7dMmjzsyCy4s7ds9ueTejcVRENxL197/XacOK/AN61YrEERB0QnouB0Qc0Q==",
"requires": {
"@babel/runtime": "^7.0.0",
"@probe.gl/stats": "3.3.0"
"@probe.gl/stats": "3.4.0"
}
},
"process": {
@@ -11886,23 +11905,6 @@
"inherits": "^2.0.1"
}
},
"rollup": {
"version": "1.32.1",
"resolved": "https://registry.npmjs.org/rollup/-/rollup-1.32.1.tgz",
"integrity": "sha512-/2HA0Ec70TvQnXdzynFffkjA6XN+1e2pEv/uKS5Ulca40g2L7KuOE3riasHoNVHOsFD5KKZgDsMk1CP3Tw9s+A==",
"requires": {
"@types/estree": "*",
"@types/node": "*",
"acorn": "^7.1.0"
},
"dependencies": {
"acorn": {
"version": "7.4.1",
"resolved": "https://registry.npmjs.org/acorn/-/acorn-7.4.1.tgz",
"integrity": "sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A=="
}
}
},
"run-queue": {
"version": "1.0.3",
"resolved": "https://registry.npmjs.org/run-queue/-/run-queue-1.0.3.tgz",
@@ -13130,9 +13132,9 @@
"dev": true
},
"tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A=="
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.3.1.tgz",
"integrity": "sha512-77EbyPPpMz+FRFRuAFlWMtmgUWGe9UOG2Z25NqCwiIjRhOf5iKGuzSe5P2w1laq+FkRy4p+PCuVkJSGkzTEKVw=="
},
"tty-browserify": {
"version": "0.0.0",
@@ -13470,6 +13472,18 @@
"spdx-expression-parse": "^3.0.0"
}
},
"vant": {
"version": "2.12.36",
"resolved": "https://registry.npmmirror.com/vant/download/vant-2.12.36.tgz",
"integrity": "sha512-+/XRx0MC/fHK2gskC7BMI00Ubrh+C46HtlyBzFGYIauzbQy9IotiuBkBZh+ep15ygXxIpozmudsLlGtX1cfexw==",
"requires": {
"@babel/runtime": "7.x",
"@vant/icons": "^1.7.1",
"@vant/popperjs": "^1.1.0",
"@vue/babel-helper-vue-jsx-merge-props": "^1.0.0",
"vue-lazyload": "1.2.3"
}
},
"vary": {
"version": "1.1.2",
"resolved": "https://registry.npmjs.org/vary/-/vary-1.1.2.tgz",
@@ -13528,10 +13542,15 @@
"resolved": "https://registry.npmjs.org/vue-i18n/-/vue-i18n-8.22.4.tgz",
"integrity": "sha512-XLI5s0AdqMP2Lf4I4CmdmOq8kjb5DDFGR77wAuxCfpEuYSfhTRyyx6MetgZMiL6Lxa0DasjBOiOcciU3NkL3/Q=="
},
"vue-lazyload": {
"version": "1.2.3",
"resolved": "https://registry.nlark.com/vue-lazyload/download/vue-lazyload-1.2.3.tgz",
"integrity": "sha1-kB+ewVx+bKeHgaK65KNDaGve2yw="
},
"vue-loader-v16": {
"version": "npm:vue-loader@16.3.3",
"resolved": "https://registry.nlark.com/vue-loader/download/vue-loader-16.3.3.tgz",
"integrity": "sha1-5EDk6xJ4bhYTi12YthIgjynd9TI=",
"version": "npm:vue-loader@16.8.3",
"resolved": "https://registry.npmmirror.com/vue-loader/download/vue-loader-16.8.3.tgz?cache=0&sync_timestamp=1636034706501&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Fvue-loader%2Fdownload%2Fvue-loader-16.8.3.tgz",
"integrity": "sha1-1D5nXe9bqTRdbH8FkUwT2GGZcIc=",
"dev": true,
"optional": true,
"requires": {
@@ -13542,7 +13561,7 @@
"dependencies": {
"ansi-styles": {
"version": "4.3.0",
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz?cache=0&sync_timestamp=1618995651629&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fansi-styles%2Fdownload%2Fansi-styles-4.3.0.tgz",
"resolved": "https://registry.nlark.com/ansi-styles/download/ansi-styles-4.3.0.tgz",
"integrity": "sha1-7dgDYornHATIWuegkG7a00tkiTc=",
"dev": true,
"optional": true,
@@ -13551,9 +13570,9 @@
}
},
"chalk": {
"version": "4.1.1",
"resolved": "https://registry.nlark.com/chalk/download/chalk-4.1.1.tgz",
"integrity": "sha1-yAs/qyi/Y3HmhjMl7uZ+YYt35q0=",
"version": "4.1.2",
"resolved": "https://registry.npmmirror.com/chalk/download/chalk-4.1.2.tgz",
"integrity": "sha1-qsTit3NKdAhnrrFr8CqtVWoeegE=",
"dev": true,
"optional": true,
"requires": {
@@ -13563,7 +13582,7 @@
},
"color-convert": {
"version": "2.0.1",
"resolved": "https://registry.npm.taobao.org/color-convert/download/color-convert-2.0.1.tgz",
"resolved": "https://registry.nlark.com/color-convert/download/color-convert-2.0.1.tgz",
"integrity": "sha1-ctOmjVmMm9s68q0ehPIdiWq9TeM=",
"dev": true,
"optional": true,
@@ -13573,29 +13592,29 @@
},
"color-name": {
"version": "1.1.4",
"resolved": "https://registry.npm.taobao.org/color-name/download/color-name-1.1.4.tgz",
"resolved": "https://registry.nlark.com/color-name/download/color-name-1.1.4.tgz",
"integrity": "sha1-wqCah6y95pVD3m9j+jmVyCbFNqI=",
"dev": true,
"optional": true
},
"has-flag": {
"version": "4.0.0",
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz?cache=0&sync_timestamp=1626716578584&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fhas-flag%2Fdownload%2Fhas-flag-4.0.0.tgz",
"resolved": "https://registry.nlark.com/has-flag/download/has-flag-4.0.0.tgz",
"integrity": "sha1-lEdx/ZyByBJlxNaUGGDaBrtZR5s=",
"dev": true,
"optional": true
},
"hash-sum": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/hash-sum/download/hash-sum-2.0.0.tgz",
"resolved": "https://registry.nlark.com/hash-sum/download/hash-sum-2.0.0.tgz",
"integrity": "sha1-gdAbtd6OpKIUrV1urRtSNGCwtFo=",
"dev": true,
"optional": true
},
"loader-utils": {
"version": "2.0.0",
"resolved": "https://registry.npm.taobao.org/loader-utils/download/loader-utils-2.0.0.tgz",
"integrity": "sha1-5MrOW4FtQloWa18JfhDNErNgZLA=",
"version": "2.0.2",
"resolved": "https://registry.npmmirror.com/loader-utils/download/loader-utils-2.0.2.tgz?cache=0&sync_timestamp=1636687947060&other_urls=https%3A%2F%2Fregistry.npmmirror.com%2Floader-utils%2Fdownload%2Floader-utils-2.0.2.tgz",
"integrity": "sha1-1uO0+4GHByGuTghoqxHdY4NowSk=",
"dev": true,
"optional": true,
"requires": {
@@ -13606,7 +13625,7 @@
},
"supports-color": {
"version": "7.2.0",
"resolved": "https://registry.nlark.com/supports-color/download/supports-color-7.2.0.tgz?cache=0&sync_timestamp=1626703455199&other_urls=https%3A%2F%2Fregistry.nlark.com%2Fsupports-color%2Fdownload%2Fsupports-color-7.2.0.tgz",
"resolved": "https://registry.npmmirror.com/supports-color/download/supports-color-7.2.0.tgz",
"integrity": "sha1-G33NyzK4E4gBs+R4umpRyqiWSNo=",
"dev": true,
"optional": true,
+3 -1
View File
@@ -7,7 +7,7 @@
"build": "vue-cli-service build"
},
"dependencies": {
"@antv/g6": "^4.1.4",
"@antv/g6": "^4.3.6",
"@babel/polyfill": "^7.12.1",
"animate.css": "^4.1.1",
"axios": "^0.21.1",
@@ -21,6 +21,7 @@
"moment": "^2.29.1",
"sortablejs": "^1.14.0",
"v-charts": "^1.19.0",
"vant": "^2.12.36",
"vue": "^2.6.11",
"vue-clipboard2": "^0.3.1",
"vue-contextmenujs": "^1.3.13",
@@ -33,6 +34,7 @@
"@vue/cli-plugin-router": "~4.5.0",
"@vue/cli-plugin-vuex": "~4.5.0",
"@vue/cli-service": "~4.5.0",
"babel-plugin-import": "^1.13.3",
"less": "^3.13.1",
"less-loader": "^5.0.0",
"popper.js": "^1.16.1",
Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.2 KiB

After

Width:  |  Height:  |  Size: 1.9 KiB

+1 -1
View File
@@ -8,7 +8,7 @@
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="Cache-Control" content="no-cache, must-revalidate">
<meta http-equiv="expires" content="0">
<title>全球标准法规系统</title>
<title>标准法规管理系统</title>
<script src = "https://cdn.jsdelivr.net/npm/proxy-polyfill@0.3.0/proxy.min.js"></script>
</head>
<body class="el-drawer-body">
+53 -9
View File
@@ -1,6 +1,8 @@
<!DOCTYPE html>
<html style="height: 100%">
<head>
<head id="vue">
<meta charset="utf-8" http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"/>
@@ -8,8 +10,10 @@
<meta name="mobile-web-app-capable" content="yes"/>
<title>在线编辑</title>
<!-- 此处配置onlyOffice地址 -->
<script type="text/javascript" src="http://106.2.13.189:9001/web-apps/apps/api/documents/api.js"></script>
<!-- <script type="text/javascript" src="http://172.20.10.5/web-apps/apps/api/documents/api.js"></script>-->
<script type="text/javascript" src="https://10.100.5.116:9443/web-apps/apps/api/documents/api.js"></script>
<!-- <script src="js/vue.min.js"></script>-->
<!-- <script type="text/javascript" src="http://172.20.10.5/web-apps/apps/api/documents/api.js"></script>-->
</head>
<body style="height: 100%">
@@ -17,12 +21,45 @@
<div id="iframeEditor"></div>
</div>
<script type="text/javascript">
// var preview = GetQueryValue('preview')
// var vm = new Vue({
// el: '#vue',
// data: {
// titleName: preview ? "在线预览":"在线编辑",
// },
// methods: {
// details: function() {
// return this.site + " - 学的不仅是技术,更是梦想!";
// }
// }
// })
var oldFileName = GetQueryValue('oldFileName')
var filePath = GetQueryValue('filePath')
var fileName = GetQueryValue('fileName')
var fileUrl = GetQueryValue('fileUrl')
var standNo = GetQueryValue('standNo')
var oldFileName = GetQueryValue('oldFileName')
var key = GetQueryValue('key')
// var attId = GetQueryValue('attId')
var fileSuffix = GetQueryValue('fileType')
// 文档类word-text、表格类excel-spreadsheet、ppt类-presentation
var documentType = ''
var arr_data_ppt = ['pdf', 'PDF', 'pptx', 'PPTX', 'ppt', 'PPT'];
var arr_data_word = ['pdf', 'PDF', 'doc','DOC', 'docx','DOCX'];
var arr_data_xls = ['xls', 'XLS', 'xlsx', 'XLSX','.xls', '.XLS', '.xlsx', '.XLSX'];
arr_data_ppt.find(function(value) {
if(value === fileSuffix) {
documentType = 'presentation'
}})
arr_data_word.find(function(value) {
if(value === fileSuffix) {
documentType = 'text'
}})
arr_data_xls.find(function(value) {
if(value === fileSuffix) {
documentType = 'spreadsheet'
}})
//将文件后缀处理掉
// fileSuffix = fileSuffix.split(".").join("");
var docEditor;
@@ -60,15 +97,20 @@
// const fileUrl = 'http://172.20.10.2:9090/conver.docx'
var config = {
"document": {
"fileType": 'docx',
"permissions": {
"edit": true, //是否可以编辑: 只能查看,传false
"download":true,//是否可以下载
"print":true //是否可以打印
},
"fileType": fileSuffix,
"key": key,
"title": fileName,
"title": oldFileName,
"url": fileUrl
},
"documentType": "text",
"documentType": documentType, // 文档类word-text、表格类excel-spreadsheet、ppt类-presentation
"editorConfig": {
// 此处配置回调地址
"callbackUrl": `http://39.98.140.126:10005/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${standNo}`,
"callbackUrl": `http://10.100.5.116:4202/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${filePath}`,
"mode":"edit",
"lang":"zh-CN",
// "customization": {
@@ -135,8 +177,10 @@
// "frameEditorId": "iframeEditor",
// "parentOrigin": "http://172.20.10.2:8081"
// }
console.log(config)
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
console.log(docEditor)
/**
* [通过参数名获取url中的参数值]
File diff suppressed because one or more lines are too long
+199
View File
@@ -0,0 +1,199 @@
<!DOCTYPE html>
<html style="height: 100%">
<head id="vue">
<meta charset="utf-8" http-equiv="Content-Security-Policy" content="upgrade-insecure-requests">
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta name="viewport"
content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no, minimal-ui"/>
<meta name="apple-mobile-web-app-capable" content="yes"/>
<meta name="mobile-web-app-capable" content="yes"/>
<title>在线预览</title>
<!-- 此处配置onlyOffice地址 -->
<script type="text/javascript" src="https://10.100.5.116:9443/web-apps/apps/api/documents/api.js"></script>
<!-- <script type="text/javascript" src="http://172.20.10.5/web-apps/apps/api/documents/api.js"></script>-->
</head>
<body style="height: 100%">
<div class="form" style="height: 100%">
<div id="iframeEditor"></div>
</div>
<script type="text/javascript">
// var preview = GetQueryValue('preview')
// var vm = new Vue({
// el: '#vue',
// data: {
// titleName: preview ? "在线预览":"在线编辑",
// },
// methods: {
// details: function() {
// return this.site + " - 学的不仅是技术,更是梦想!";
// }
// }
// })
var fileName = GetQueryValue('fileName')
var filePath = GetQueryValue('filePath')
var fileUrl = GetQueryValue('fileUrl')
var oldFileName = GetQueryValue('oldFileName')
var key = GetQueryValue('key')
// var attId = GetQueryValue('attId')
var fileSuffix = GetQueryValue('fileType')
// 文档类word-text、表格类excel-spreadsheet、ppt类-presentation
var documentType = ''
var arr_data_ppt = ['pdf', 'PDF', 'pptx', 'PPTX', 'ppt', 'PPT'];
var arr_data_word = ['pdf', 'PDF', 'doc','DOC', 'docx','DOCX'];
var arr_data_xls = ['xls', 'XLS', 'xlsx', 'XLSX','.xls', '.XLS', '.xlsx', '.XLSX'];
arr_data_ppt.find(function(value) {
if(value === fileSuffix) {
documentType = 'presentation'
}})
arr_data_word.find(function(value) {
if(value === fileSuffix) {
documentType = 'text'
}})
arr_data_xls.find(function(value) {
if(value === fileSuffix) {
documentType = 'spreadsheet'
}})
//将文件后缀处理掉
// fileSuffix = fileSuffix.split(".").join("");
var docEditor;
var innerAlert = function (message) {
if (console && console.log)
console.log(message);
};
var onAppReady = function () {
innerAlert("Document editor ready");
};
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
};
var onRequestEditRights = function () {
location.href = location.href.replace(RegExp("mode=view\&?", "i"), "");
};
var onError = function (event) {
if (event)
innerAlert(event.data);
};
var onOutdatedVersion = function (event) {
location.reload(true);
};
// console.log(key)
// console.log(fileUrl)
// console.log(attId)
// console.log(fileName)
// const fileUrl = 'http://172.20.10.2:9090/conver.docx'
var config = {
"document": {
"permissions": {
"edit": false, //是否可以编辑: 只能查看,传false
"download":true,//是否可以下载
"print":true //是否可以打印
},
"fileType": fileSuffix,
"key": key,
"title": oldFileName,
"url": fileUrl
},
"documentType": documentType,
"editorConfig": {
// 此处配置回调地址
"callbackUrl": `http://10.100.5.116:4202/api/att/attFile/recieveFile?fileNm=${fileName}&standNo=${filePath}`,
"mode":"edit",
"lang":"zh-CN",
// "customization": {
// "forcesave": "true"
// }
}
};
// var config = {
// "type": "desktop",
// "mode": "edit",
// "documentType": "text",
// "document": {
// "title": "new.docx",
// "url": "http://172.20.10.2:9090/conver.docx",
// "fileType": "docx",
// "key": "-1988670278",
// "permissions": {
// "comment": true,
// "download": true,
// "edit": true,
// "fillForms": true,
// "modifyFilter": true,
// "modifyContentControl": true,
// "review": true
// }
// },
// "editorConfig": {
// "mode": "edit",
// "callbackUrl": "http://39.98.140.126:10005/api/IndexServlet?type=track&fileName=new.docx&userAddress=172.20.10.2",
// "lang": "zh",
// "user": {
// "id": "uid-1",
// "name": "John Smith"
// },
// "customization": {
// "goback": {
// "url": "http://39.98.140.126:10005/api/IndexServlet"
// },
// "about": true,
// "feedback": false
// },
// "canCoAuthoring": true,
// "canUseHistory": false,
// "canHistoryClose": false,
// "canHistoryRestore": false,
// "canSendEmailAddresses": false,
// "canRequestEditRights": true,
// "canRequestClose": false,
// "canRename": false,
// "canMakeActionLink": true,
// "canRequestUsers": false,
// "canRequestSendNotify": false,
// "canRequestSaveAs": false,
// "canRequestInsertImage": false,
// "canRequestMailMergeRecipients": false,
// "canRequestCompareFile": false,
// "canRequestSharingSettings": false,
// "canRequestCreateNew": false
// },
// "width": "100%",
// "height": "100%",
// "events": {},
// "frameEditorId": "iframeEditor",
// "parentOrigin": "http://172.20.10.2:8081"
// }
console.log(config)
docEditor = new DocsAPI.DocEditor("iframeEditor", config);
console.log(docEditor)
/**
* [通过参数名获取url中的参数值]
* 示例URL:http://htmlJsTest/getrequest.html?uid=admin&rid=1&fid=2&name=小明
* @param {[string]} queryName [参数名]
* @return {[string]} [参数值]
*/
function GetQueryValue(queryName) {
var query = decodeURI(window.location.search.substring(1));
var vars = query.split("&");
for (var i = 0; i < vars.length; i++) {
var pair = vars[i].split("=");
if (pair[0] == queryName) { return pair[1]; }
}
return null;
}
</script>
</body>
</html>
File diff suppressed because it is too large Load Diff
+569
View File
@@ -0,0 +1,569 @@
<!DOCTYPE html>
<!--
Copyright 2012 Mozilla Foundation
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
Adobe CMap resources are covered by their own copyright but the same license:
Copyright 1990-2015 Adobe Systems Incorporated.
See https://github.com/adobe-type-tools/cmap-resources
-->
<html dir="ltr" mozdisallowselectionprint moznomarginboxes>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<meta name="google" content="notranslate">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>在线查看</title>
<link rel="stylesheet" href="bzzqyjViewer.css">
<!-- This snippet is used in production (included from viewer.html) -->
<link rel="resource" type="application/l10n" href="locale/locale.properties">
<link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css">
<link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<style>
/*.pdfViewer .page{*/
/* margin: 1px auto -8px 232px;*/
/*}*/
.right-click-box{
position: fixed;
width: 100px;
min-height: 100px;
border-radius: 5px;
background: #ffffff;
display: none;
z-index: 999;
box-shadow: inset 0 0 2px 1px #e5e5e5;
}
.right-click-box p{
padding: 5px 10px;
cursor: pointer;
border-bottom: 1px solid #e5e5e5;
}
/*.note-box{*/
/* display: none;*/
/* padding: 15px;*/
/* width: 500px;*/
/* height: 380px;*/
/* position: fixed;*/
/* top: 50%;*/
/* left: 50%;*/
/* transform: translate(-50%, -50%);*/
/* border: 1px solid #e5e5e5;*/
/* 8px;*/
/* background: #e5e5e5;*/
/* z-index: 999;*/
/*}*/
/*.note-title{*/
/* padding-bottom: 10px;*/
/*}*/
/*.note-textarea{*/
/* width: 500px;*/
/* height: 300px;*/
/*}*/
/*.note-footer, .tree-add-footer{*/
/* float: right;*/
/* padding-top: 15px;*/
/*}*/
/*.note-footer button, .tree-add-footer button{*/
/* width: 60px;*/
/* height: 35px;*/
/* line-height: 35px;*/
/* background-color: #3391CE;*/
/* border: #3391CE;*/
/* color: #ffffff;*/
/* 3px;*/
/* cursor: pointer;*/
/*}*/
/*.note-float{*/
/* box-shadow: inset 0 0 2px 1px #e5e5e5;*/
/* min-width: 100px;*/
/* min-height: 40px;*/
/* padding: 10px;*/
/* background: lemonchiffon;*/
/*}*/
/*.note-del{*/
/* position: absolute;*/
/* top: 2px;*/
/* right: 5px;*/
/* color: #707070;*/
/* cursor: pointer;*/
/*}*/
/*.ztree{*/
/* position: fixed;*/
/* top: 32px;*/
/* left: 0;*/
/* z-index: 99;*/
/* height: 100% !important;*/
/*}*/
/*#rMenu{*/
/* position: fixed !important;*/
/* z-index: 1000;*/
/*}*/
/*div#rMenu {position:absolute; visibility:hidden; top:0;text-align: left;padding: 2px;}*/
/*div#rMenu ul li{*/
/* padding: 0 15px;*/
/* cursor: pointer;*/
/* list-style: none;*/
/* border: 1px solid #888;*/
/* border-bottom: 1px solid transparent;*/
/* background: #FFEBC0;*/
/*}*/
/*div#rMenu ul li:last-child{*/
/* border-bottom: 1px solid #888;*/
/* }*/
/*div#rMenu ul li:hover{*/
/* background: #FFC774;*/
/* }*/
/*.tree-add-modal{*/
/* display: none;*/
/* padding: 15px;*/
/* width: 400px;*/
/* height: 180px;*/
/* position: fixed;*/
/* top: 50%;*/
/* left: 50%;*/
/* transform: translate(-50%, -50%);*/
/* border: 1px solid #e5e5e5;*/
/* 8px;*/
/* background: #e5e5e5;*/
/* z-index: 999;*/
/*}*/
/*.tree-add-modal .form-box label{*/
/* display: block;*/
/* margin-top: 10px;*/
/*}*/
/*.tree-add-modal .form-box label span{*/
/* display: inline-block;*/
/* font-size: 14px;*/
/* width: 80px;*/
/*}*/
/*.tree-add-modal .form-box label input{*/
/* width: 200px;*/
/* height: 40px;*/
/* text-indent: 10px;*/
/*}*/
/*.mask{*/
/* display: none;*/
/* width: 100%;*/
/* height: 100%;*/
/* position: fixed;*/
/* top: 0;*/
/* bottom: 0;*/
/* left: 0;*/
/* right: 0;*/
/* background: #000000;*/
/* opacity: 0.5;*/
/* z-index: 998;*/
/*}*/
.button-box{
display: none;
position: fixed;
height: 26px;
line-height: 26px;
z-index: 999;
border: 1px solid #e5e5e5;
border-right: none;
background: #ffffff;
}
.button-box span{
display: inline-block;
width: 52px;
text-align: center;
font-size: 14px;
font-weight: 500;
border-right: 1px solid #e5e5e5;
cursor: default;
}
.hidden-textarea{
position: fixed;
z-index: -1;
}
</style>
<script src="js/jquery-3.3.1.min.js"></script>
<script src="compatibility.js"></script>
<script src="l10n.js"></script>
<script src="../build/pdf.js"></script>
<!-- <script type="text/javascript" src="../../zTree/js/jquery.ztree.core.js"></script>-->
<!--<script type="text/javascript" src="../../../src/assets/zTree/js/jquery.ztree.excheck.js"></script>-->
<!--<script type="text/javascript" src="../../../src/assets/zTree/js/jquery.ztree.exedit.js"></script>-->
<!--<script type="text/javascript" src="../../../src/assets/zTree/js/jquery.ztree.exhide.js"></script>-->
<script src="bzzqyjViewer.js"></script>
</head>
<body tabindex="1" class="loadingInProgress">
<!--遮罩层-->
<div class="mask"></div>
<!-- <ul id="treeDemo" class="ztree"></ul>-->
<!-- <div id="rMenu">-->
<!-- &lt;!&ndash; 不需要权限 &ndash;&gt;-->
<!-- <ul>-->
<!-- <li class="m_add" id="rightAdd">节点新增</li>-->
<!-- &lt;!&ndash;<li class="m_edit" @click="rightEdit" v-show="!isRoot || root">{{ editTitle }}</li>&ndash;&gt;-->
<!-- <li class="m_del" id="rightRemove">节点删除</li>-->
<!-- &lt;!&ndash;<li class="m_copy" @click="rightCopy" v-show="!isRoot|| root">{{ copyTitle }}</li>&ndash;&gt;-->
<!-- </ul>-->
<!-- </div>-->
<!-- &lt;!&ndash;新增tree弹窗&ndash;&gt;-->
<!-- <div class="tree-add-modal">-->
<!-- <h5>节点新增</h5>-->
<!-- <div class="form-box">-->
<!-- <label><span>节点位置:</span><input class="title-name" type="number" name="titleName" placeholder="请输入页码" autocomplete="off" disabled/></label>-->
<!-- <label><span>节点名称:</span><input class="menu-name" type="text" name="menuName" placeholder="请输入节点名称" autocomplete="off"/></label>-->
<!-- </div>-->
<!-- <div class="tree-add-footer">-->
<!-- <button id="treeAddCancel">取消</button>-->
<!-- <button id="treeAddSave">保存</button>-->
<!-- </div>-->
<!-- </div>-->
<div id="outerContainer">
<div id="sidebarContainer">
<div id="toolbarSidebar">
<div class="splitToolbarButton toggled">
<button id="viewThumbnail" class="toolbarButton toggled" title="Show Thumbnails" tabindex="2" data-l10n-id="thumbs">
<span data-l10n-id="thumbs_label">Thumbnails</span>
</button>
<button id="viewOutline" class="toolbarButton" title="Show Document Outline (double-click to expand/collapse all items)" tabindex="3" data-l10n-id="document_outline">
<span data-l10n-id="document_outline_label">Document Outline</span>
</button>
<button id="viewAttachments" class="toolbarButton" title="Show Attachments" tabindex="4" data-l10n-id="attachments">
<span data-l10n-id="attachments_label">Attachments</span>
</button>
</div>
</div>
<div id="sidebarContent">
<div id="thumbnailView">
</div>
<div id="outlineView" class="hidden">
</div>
<div id="attachmentsView" class="hidden">
</div>
</div>
</div> <!-- sidebarContainer -->
<div id="mainContainer">
<div class="findbar hidden doorHanger" id="findbar">
<div id="findbarInputContainer">
<input id="findInput" class="toolbarField" title="Find" placeholder="Find in document…" tabindex="91" data-l10n-id="find_input">
<div class="splitToolbarButton">
<button id="findPrevious" class="toolbarButton findPrevious" title="Find the previous occurrence of the phrase" tabindex="92" data-l10n-id="find_previous">
<span data-l10n-id="find_previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button id="findNext" class="toolbarButton findNext" title="Find the next occurrence of the phrase" tabindex="93" data-l10n-id="find_next">
<span data-l10n-id="find_next_label">Next</span>
</button>
</div>
</div>
<div id="findbarOptionsContainer">
<input type="checkbox" id="findHighlightAll" class="toolbarField" tabindex="94">
<label for="findHighlightAll" class="toolbarLabel" data-l10n-id="find_highlight">Highlight all</label>
<input type="checkbox" id="findMatchCase" class="toolbarField" tabindex="95">
<label for="findMatchCase" class="toolbarLabel" data-l10n-id="find_match_case_label">Match case</label>
<span id="findResultsCount" class="toolbarLabel hidden"></span>
</div>
<div id="findbarMessageContainer">
<span id="findMsg" class="toolbarLabel"></span>
</div>
</div> <!-- findbar -->
<div id="secondaryToolbar" class="secondaryToolbar hidden doorHangerRight">
<div id="secondaryToolbarButtonContainer">
<button id="secondaryPresentationMode" class="secondaryToolbarButton presentationMode visibleLargeView" title="Switch to Presentation Mode" tabindex="51" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<button id="secondaryOpenFile" class="secondaryToolbarButton openFile visibleLargeView" title="Open File" tabindex="52" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>
<button id="secondaryPrint" class="secondaryToolbarButton print visibleMediumView" title="Print" tabindex="53" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="secondaryDownload" class="secondaryToolbarButton download visibleMediumView" title="Download" tabindex="54" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
</button>
<a href="#" id="secondaryViewBookmark" class="secondaryToolbarButton bookmark visibleSmallView" title="Current view (copy or open in new window)" tabindex="55" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<div class="horizontalToolbarSeparator visibleLargeView"></div>
<button id="firstPage" class="secondaryToolbarButton firstPage" title="Go to First Page" tabindex="56" data-l10n-id="first_page">
<span data-l10n-id="first_page_label">Go to First Page</span>
</button>
<button id="lastPage" class="secondaryToolbarButton lastPage" title="Go to Last Page" tabindex="57" data-l10n-id="last_page">
<span data-l10n-id="last_page_label">Go to Last Page</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="pageRotateCw" class="secondaryToolbarButton rotateCw" title="Rotate Clockwise" tabindex="58" data-l10n-id="page_rotate_cw">
<span data-l10n-id="page_rotate_cw_label">Rotate Clockwise</span>
</button>
<button id="pageRotateCcw" class="secondaryToolbarButton rotateCcw" title="Rotate Counterclockwise" tabindex="59" data-l10n-id="page_rotate_ccw">
<span data-l10n-id="page_rotate_ccw_label">Rotate Counterclockwise</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="cursorSelectTool" class="secondaryToolbarButton selectTool toggled" title="Enable Text Selection Tool" tabindex="60" data-l10n-id="cursor_text_select_tool">
<span data-l10n-id="cursor_text_select_tool_label">Text Selection Tool</span>
</button>
<button id="cursorHandTool" class="secondaryToolbarButton handTool" title="Enable Hand Tool" tabindex="61" data-l10n-id="cursor_hand_tool">
<span data-l10n-id="cursor_hand_tool_label">Hand Tool</span>
</button>
<div class="horizontalToolbarSeparator"></div>
<button id="documentProperties" style="display: none" class="secondaryToolbarButton documentProperties" title="Document Properties…" tabindex="62" data-l10n-id="document_properties">
<span data-l10n-id="document_properties_label">Document Properties…</span>
</button>
</div>
</div> <!-- secondaryToolbar -->
<div class="toolbar">
<div id="toolbarContainer">
<div id="toolbarViewer">
<div id="toolbarViewerLeft">
<button id="sidebarToggle" class="toolbarButton" title="Toggle Sidebar" tabindex="11" data-l10n-id="toggle_sidebar">
<span data-l10n-id="toggle_sidebar_label">Toggle Sidebar</span>
</button>
<div class="toolbarButtonSpacer"></div>
<button id="viewFind" class="toolbarButton" title="Find in Document" tabindex="12" data-l10n-id="findbar">
<span data-l10n-id="findbar_label">Find</span>
</button>
<div class="splitToolbarButton hiddenSmallView">
<button class="toolbarButton pageUp" title="Previous Page" id="previous" tabindex="13" data-l10n-id="previous">
<span data-l10n-id="previous_label">Previous</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button class="toolbarButton pageDown" title="Next Page" id="next" tabindex="14" data-l10n-id="next">
<span data-l10n-id="next_label">Next</span>
</button>
</div>
<input type="number" id="pageNumber" class="toolbarField pageNumber" title="Page" value="1" size="4" min="1" tabindex="15" data-l10n-id="page">
<span id="numPages" class="toolbarLabel"></span>
</div>
<div id="toolbarViewerRight">
<button id="presentationMode" class="toolbarButton presentationMode hiddenLargeView" title="Switch to Presentation Mode" tabindex="31" data-l10n-id="presentation_mode">
<span data-l10n-id="presentation_mode_label">Presentation Mode</span>
</button>
<button id="openFile" class="toolbarButton openFile hiddenLargeView" title="Open File" tabindex="32" data-l10n-id="open_file">
<span data-l10n-id="open_file_label">Open</span>
</button>
<button id="print" data-print="KLO98GHSDD" class="toolbarButton print hiddenMediumView" title="Print" tabindex="33" data-l10n-id="print">
<span data-l10n-id="print_label">Print</span>
</button>
<button id="download" style="visibility:hidden" class="toolbarButton download hiddenMediumView" title="Download" tabindex="34" data-l10n-id="download">
<span data-l10n-id="download_label">Download</span>
</button>
<a href="#" id="viewBookmark" style="visibility:hidden" class="toolbarButton bookmark hiddenSmallView" title="Current view (copy or open in new window)" tabindex="35" data-l10n-id="bookmark">
<span data-l10n-id="bookmark_label">Current View</span>
</a>
<div class="verticalToolbarSeparator hiddenSmallView"></div>
<button id="secondaryToolbarToggle" class="toolbarButton" title="Tools" tabindex="36" data-l10n-id="tools">
<span data-l10n-id="tools_label">Tools</span>
</button>
</div>
<div id="toolbarViewerMiddle">
<div class="splitToolbarButton">
<button id="zoomOut" class="toolbarButton zoomOut" title="Zoom Out" tabindex="21" data-l10n-id="zoom_out">
<span data-l10n-id="zoom_out_label">Zoom Out</span>
</button>
<div class="splitToolbarButtonSeparator"></div>
<button id="zoomIn" class="toolbarButton zoomIn" title="Zoom In" tabindex="22" data-l10n-id="zoom_in">
<span data-l10n-id="zoom_in_label">Zoom In</span>
</button>
</div>
<span id="scaleSelectContainer" class="dropdownToolbarButton">
<select id="scaleSelect" title="Zoom" tabindex="23" data-l10n-id="zoom">
<option id="pageAutoOption" title="" value="auto" selected="selected" data-l10n-id="page_scale_auto">Automatic Zoom</option>
<option id="pageActualOption" title="" value="page-actual" data-l10n-id="page_scale_actual">Actual Size</option>
<option id="pageFitOption" title="" value="page-fit" data-l10n-id="page_scale_fit">Page Fit</option>
<option id="pageWidthOption" title="" value="page-width" data-l10n-id="page_scale_width">Page Width</option>
<option id="customScaleOption" title="" value="custom" disabled="disabled" hidden="true"></option>
<option title="" value="0.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 50 }'>50%</option>
<option title="" value="0.75" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 75 }'>75%</option>
<option title="" value="1" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 100 }'>100%</option>
<option title="" value="1.25" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 125 }'>125%</option>
<option title="" value="1.5" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 150 }'>150%</option>
<option title="" value="2" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 200 }'>200%</option>
<option title="" value="3" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 300 }'>300%</option>
<option title="" value="4" data-l10n-id="page_scale_percent" data-l10n-args='{ "scale": 400 }'>400%</option>
</select>
</span>
</div>
</div>
<div id="loadingBar">
<div class="progress">
<div class="glimmer">
</div>
</div>
</div>
</div>
</div>
<menu type="context" id="viewerContextMenu">
<menuitem id="contextFirstPage" label="First Page"
data-l10n-id="first_page"></menuitem>
<menuitem id="contextLastPage" label="Last Page"
data-l10n-id="last_page"></menuitem>
<menuitem id="contextPageRotateCw" label="Rotate Clockwise"
data-l10n-id="page_rotate_cw"></menuitem>
<menuitem id="contextPageRotateCcw" label="Rotate Counter-Clockwise"
data-l10n-id="page_rotate_ccw"></menuitem>
</menu>
<div id="viewerContainer" tabindex="0">
<div id="viewer" class="pdfViewer"></div>
</div>
<div id="errorWrapper" hidden='true'>
<div id="errorMessageLeft">
<span id="errorMessage"></span>
<button id="errorShowMore" data-l10n-id="error_more_info">
More Information
</button>
<button id="errorShowLess" data-l10n-id="error_less_info" hidden='true'>
Less Information
</button>
</div>
<div id="errorMessageRight">
<button id="errorClose" data-l10n-id="error_close">
Close
</button>
</div>
<div class="clearBoth"></div>
<textarea id="errorMoreInfo" hidden='true' readonly="readonly"></textarea>
</div>
</div> <!-- mainContainer -->
<div id="overlayContainer" class="hidden">
<div id="passwordOverlay" class="container hidden">
<div class="dialog">
<div class="row">
<p id="passwordText" data-l10n-id="password_label">Enter the password to open this PDF file:</p>
</div>
<div class="row">
<input type="password" id="password" class="toolbarField">
</div>
<div class="buttonRow">
<button id="passwordCancel" class="overlayButton"><span data-l10n-id="password_cancel">Cancel</span></button>
<button id="passwordSubmit" class="overlayButton"><span data-l10n-id="password_ok">OK</span></button>
</div>
</div>
</div>
<div id="documentPropertiesOverlay" class="container hidden">
<div class="dialog">
<div class="row">
<span data-l10n-id="document_properties_file_name">File name:</span> <p id="fileNameField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_file_size">File size:</span> <p id="fileSizeField">-</p>
</div>
<div class="separator"></div>
<div class="row">
<span data-l10n-id="document_properties_title">Title:</span> <p id="titleField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_author">Author:</span> <p id="authorField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_subject">Subject:</span> <p id="subjectField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_keywords">Keywords:</span> <p id="keywordsField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creation_date">Creation Date:</span> <p id="creationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_modification_date">Modification Date:</span> <p id="modificationDateField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_creator">Creator:</span> <p id="creatorField">-</p>
</div>
<div class="separator"></div>
<div class="row">
<span data-l10n-id="document_properties_producer">PDF Producer:</span> <p id="producerField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_version">PDF Version:</span> <p id="versionField">-</p>
</div>
<div class="row">
<span data-l10n-id="document_properties_page_count">Page Count:</span> <p id="pageCountField">-</p>
</div>
<div class="buttonRow">
<button id="documentPropertiesClose" class="overlayButton"><span data-l10n-id="document_properties_close">Close</span></button>
</div>
</div>
</div>
<div id="printServiceOverlay" class="container hidden">
<div class="dialog">
<div class="row">
<span data-l10n-id="print_progress_message">Preparing document for printing…</span>
</div>
<div class="row">
<progress value="0" max="100"></progress>
<span data-l10n-id="print_progress_percent" data-l10n-args='{ "progress": 0 }' class="relative-progress">0%</span>
</div>
<div class="buttonRow">
<button id="printCancel" class="overlayButton"><span data-l10n-id="print_progress_close">Cancel</span></button>
</div>
</div>
</div>
</div> <!-- overlayContainer -->
</div> <!-- outerContainer -->
<div id="rightClickBox" class="right-click-box">
<p id="copy">开启复制</p>
</div>
<div class="button-box">
<!--<span>翻译</span>-->
<span id="copyBtn">复制</span>
</div>
<textarea type="hidden" class="hidden-textarea"></textarea>
<div id="printContainer"></div>
<script>
window.onload = function () {
var print = document.getElementById('print')
var printId = print.getAttribute('data-print')
var printParentNode = print.parentNode
var menuList = JSON.parse(localStorage.getItem('menuList'))
var visible = false
menuList.map(function (menu) {
if (menu.id === printId) {
visible = true
return
}
})
if (!visible) {
printParentNode.removeChild(print)
}
}
</script>
</body>
</html>
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+3
View File
@@ -33,6 +33,9 @@ See https://github.com/adobe-type-tools/cmap-resources
<link rel="stylesheet" href="../../zTree/css/demo.css" type="text/css">
<link rel="stylesheet" href="../../zTree/css/zTreeStyle/zTreeStyle.css" type="text/css">
<style>
body{
font: 56px Arial, Helvetica, simsun, sans-serif;
}
/*.pdfViewer .page{*/
/* margin: 1px auto -8px 232px;*/
/*}*/
+181 -140
View File
@@ -6630,11 +6630,11 @@ var PDFPageView = function () {
var coverWorkNum = "";
var msg = ""
if(userInfo != null){
coverUserName = userInfo.uName + ',';
coverUserName = userInfo.uName;
if (userInfo.workNum != null) {
coverWorkNum = userInfo.workNum + ',';
}
msg = coverUserName + coverWorkNum;
msg = coverUserName;
}
var myDate = new Date();
var mytime=myDate.toLocaleString();
@@ -6646,39 +6646,80 @@ var PDFPageView = function () {
}
//cover.innerText = userInfo.uName + "," + userInfo.workNum;
var defaultSettings = {
watermark_txt: msg + mytime,
watermark_x: 0,//水印起始位置x轴坐标
watermark_y: 0,//水印起始位置Y轴坐标
watermark_rows: 10,//水印行数
watermark_cols: 10,//水印列数
watermark_x_space: 100,//水印x轴间隔
watermark_y_space: 150,//水印y轴间隔
watermark_color: '#d9d9d9',//水印字体颜色
watermark_txt: msg,
watermark_x: 100,//水印起始位置x轴坐标
watermark_y: -130,//水印起始位置Y轴坐标
watermark_rows: 0,//水印行数
watermark_cols: 0,//水印列数
watermark_x_space: 40,//水印x轴间隔
watermark_y_space: 50,//水印y轴间隔
watermark_color: 'rgba(232,232,240)',//水印字体颜色
watermark_alpha: 0.3,//水印透明度
watermark_fontsize: '13px',//水印字体大小
watermark_fontsize: '40px',//水印字体大小
watermark_font: '微软雅黑',//水印字体
watermark_width: 120,//水印宽度
watermark_height: 80,//水印长度
watermark_angle: 60//水印倾斜度数
watermark_angle: 40//水印倾斜度数
};
// //判断分辨率
// if (screen.width+"*"+screen.height === '800*600' ){
// }
var oTemp = document.createDocumentFragment();
//获取页面最大宽度
var getPage = Math.max(document.body.scrollWidth, document.body.clientWidth);
var page_width = getPage - (0.35 * getPage);
// var getPage = Math.max(document.body.scrollWidth, document.body.clientWidth);
// var getPage =document.body.scrollWidth;
// var page_width = getPage - (0.35 * getPage);
//var page_width = canvasWrapper.style.width;
//获取页面最大长度
var page_height = Math.max(document.body.scrollHeight, document.body.clientHeight+350);
// var page_height = Math.max(document.body.scrollHeight, document.body.clientHeight+350);
// //获取页面最大宽度
// var page_width = parseInt(canvasWrapper.style.width);
// //获取页面最大长度
// var page_height = parseInt(canvasWrapper.style.height);
var pdf_page =document.getElementById("viewer");
//2021/12/5 分辨率不同的情况会出现问题
//如果将水印列数设置为0,或水印列数设置过大,超过页面最大宽度,则重新计算水印列数和水印x轴间隔
// if (defaultSettings.watermark_cols == 0 || (parseInt(defaultSettings.watermark_x + defaultSettings.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (defaultSettings.watermark_cols - 1)) > page_width)) {
// defaultSettings.watermark_cols = parseInt((page_width - defaultSettings.watermark_x + defaultSettings.watermark_x_space) / (defaultSettings.watermark_width + defaultSettings.watermark_x_space))-1;
// console.log("------------------------------------")
// console.log(defaultSettings.watermark_cols)
// // defaultSettings.watermark_x_space = parseInt((page_width - defaultSettings.watermark_x - defaultSettings.watermark_width * defaultSettings.watermark_cols) / (defaultSettings.watermark_cols - 1));
// // console.log(defaultSettings.watermark_x_space)
// }
// //如果将水印行数设置为0,或水印行数设置过大,超过页面最大长度,则重新计算水印行数和水印y轴间隔
// if (defaultSettings.watermark_rows == 0 || (parseInt(defaultSettings.watermark_y + defaultSettings.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (defaultSettings.watermark_rows - 1)) > page_height)) {
// defaultSettings.watermark_rows = parseInt((defaultSettings.watermark_y_space + page_height - defaultSettings.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space))-3;
// // defaultSettings.watermark_y_space = parseInt(((page_height - defaultSettings.watermark_y) - defaultSettings.watermark_height * defaultSettings.watermark_rows) / (defaultSettings.watermark_rows - 1));
// console.log("------------------------------------")
// console.log(defaultSettings.watermark_rows)
// // console.log(defaultSettings.watermark_y_space)
//
// }
var page_width = parseInt(textLayerDiv.style.width) //获取pdf页面宽度
var page_height = parseInt(textLayerDiv.style.height)+defaultSettings.watermark_y //获取pdf页面长度
//如果将水印列数设置为0,或水印列数设置过大,超过页面最大宽度,则重新计算水印列数和水印x轴间隔
if (defaultSettings.watermark_cols == 0 || (parseInt(defaultSettings.watermark_x + defaultSettings.watermark_width * defaultSettings.watermark_cols + defaultSettings.watermark_x_space * (defaultSettings.watermark_cols - 1)) > page_width)) {
defaultSettings.watermark_cols = parseInt((page_width - defaultSettings.watermark_x + defaultSettings.watermark_x_space) / (defaultSettings.watermark_width + defaultSettings.watermark_x_space));
defaultSettings.watermark_x_space = parseInt((page_width - defaultSettings.watermark_x - defaultSettings.watermark_width * defaultSettings.watermark_cols) / (defaultSettings.watermark_cols - 1));
console.log("---------------watermark_cols---------------------")
console.log(defaultSettings.watermark_cols)
}
//如果将水印行数设置为0,或水印行数设置过大,超过页面最大长度,则重新计算水印行数和水印y轴间隔
if (defaultSettings.watermark_rows == 0 || (parseInt(defaultSettings.watermark_y + defaultSettings.watermark_height * defaultSettings.watermark_rows + defaultSettings.watermark_y_space * (defaultSettings.watermark_rows - 1)) > page_height)) {
defaultSettings.watermark_rows = parseInt((defaultSettings.watermark_y_space + page_height - defaultSettings.watermark_y) / (defaultSettings.watermark_height + defaultSettings.watermark_y_space));
defaultSettings.watermark_y_space = parseInt(((page_height - defaultSettings.watermark_y) - defaultSettings.watermark_height * defaultSettings.watermark_rows) / (defaultSettings.watermark_rows - 1));
console.log("--------------watermark_rows----------------------")
console.log(defaultSettings.watermark_rows)
}
var x;
var y;
@@ -10498,130 +10539,130 @@ if (document.readyState === 'interactive' || document.readyState === 'complete')
* liuyan
* PDF添加笔记功能js
*/
$(document).ready(function () {
// var page // 当前pdf页码
// var pageY // Y轴
// var pageX // X轴
// // 去掉默认的contextmenu事件,否则会和右键事件同时出现。
document.oncontextmenu = function (e) {
e.preventDefault()
}
$('#outerContainer').mousedown(function (e) {
var res = document.getElementById('rightClickBox')
res.style.display = 'none'
$('.button-box').hide()
if (e.button === 2) {
res.style.top = e.clientY + 'px' // 鼠标点击时给div定位Y轴
res.style.left = e.clientX + 'px' // 鼠标点击时给div定位X轴
res.style.display = 'block'
// pageX = e.clientX
// pageY = $('#viewerContainer').scrollTop() + e.clientY - 32
// } else if (e.button === 0) {
// res.style.display = 'none'
// // alert("你点了左键");
// } else if (e.button === 1) {
// // alert("你点了滚轮")
// res.style.display = 'none'
}
})
// // 点击添加笔记
// $('#addNote').click(() => {
// page = document.getElementById('pageNumber').value // 获取当前PDF页码
// var res = document.getElementById('noteBox') // 添加笔记 box
// res.style.display = 'block'
// $('.mask').show()
// $('#rightClickBox').css('display', 'none')
// })
// // 点击 添加笔记 取消 按钮
// $('#noteCancel').click(() => {
// $('#noteBox').css('display', 'none')
// $('.mask').hide()
// $('.note-textarea').val('')
// })
// // 点击 添加笔记 保存 按钮
// $('#noteSave').click(() => {
// let textareaVal = $('.note-textarea').val() // 笔记val
// let url = decodeURIComponent(window.location.search)
// let attIdIndex = url.indexOf('ATT_FILE') // 截取文件id
// let fileUrlId = url.substring(attIdIndex, url.length)
// /**
// * 获取笔记类型
// * @type {string}
// * EXPERT::专家笔记、 PERSONAL:个人笔记
// */
// // let noteType = JSON.parse(sessionStorage.getItem('userInfo')).userRole === '超级管理员' ? 'EXPERT' : 'PERSONAL'
// $.ajax({
// type: 'POST',
// url: '/api/lawss/utNoteInfo/saveNote',
// data: {
// noteContent: textareaVal,
// xContent: 1250,
// yContent: pageY,
// attId: fileUrlId, // pdf文件ID
// noteType: 'PERSONAL',
// noteName: JSON.parse(sessionStorage.getItem('fileInfo'))[0].fileName
// },
// success: (res) => {
// if (res.ok) {
// alert('保存成功')
// $('#noteBox').css('display', 'none')
// $('.mask').hide()
// $('.note-textarea').val('')
// getNote()
// } else {
// alert(res.message)
// }
// }
// })
// })
// // 回显笔记内容
// function getNote () {
// let url = decodeURIComponent(window.location.search)
// let attIdIndex = url.indexOf('ATT_FILE') // 截取文件id
// let fileUrlId = url.substring(attIdIndex, url.length)
// $.ajax({
// type: 'GET',
// url: '/api/lawss/utNoteInfo/worldPage',
// data: {
// attId: fileUrlId
// },
// success: (res) => {
// if (res.ok) {
// $('.note-float').remove() // 移除所有的笔记
// // 重新渲染笔记
// res.data.list.map(item => {
// let str = `<div class="note-float" style="position: absolute; top: ${item.yContent}px; left: ${item.xContent}px">
// <span>${item.noteContent}</span>
// <span class="note-del" id="${item.id}">x</span>
// </div>`
// $('#viewerContainer').append(str)
// })
// }
// }
// })
// $(document).ready(function () {
// // var page // 当前pdf页码
// // var pageY // Y轴
// // var pageX // X轴
// // // 去掉默认的contextmenu事件,否则会和右键事件同时出现。
// document.oncontextmenu = function (e) {
// e.preventDefault()
// }
// getNote()
// // 删除笔记事件
// $('body').delegate('.note-float .note-del', 'click', (e) => {
// $.ajax({
// type: 'POST',
// url: '/api/lawss/utNoteInfo/deleteNote',
// data: {
// ids: e.target.id
// },
// success: (res) => {
// if (res.ok) {
// alert('删除成功')
// getNote()
// } else {
// alert(res.message)
// }
// }
// })
// $('#outerContainer').mousedown(function (e) {
// var res = document.getElementById('rightClickBox')
// res.style.display = 'none'
// $('.button-box').hide()
// if (e.button === 2) {
// res.style.top = e.clientY + 'px' // 鼠标点击时给div定位Y轴
// res.style.left = e.clientX + 'px' // 鼠标点击时给div定位X轴
// res.style.display = 'block'
// // pageX = e.clientX
// // pageY = $('#viewerContainer').scrollTop() + e.clientY - 32
// // } else if (e.button === 0) {
// // res.style.display = 'none'
// // // alert("你点了左键");
// // } else if (e.button === 1) {
// // // alert("你点了滚轮")
// // res.style.display = 'none'
// }
// })
// // 点击 tree新增modal取消按钮
// $('#treeAddCancel').click(() => {
// $('.tree-add-modal').hide()
// $('.mask').hide()
// })
})
// // // 点击添加笔记
// // $('#addNote').click(() => {
// // page = document.getElementById('pageNumber').value // 获取当前PDF页码
// // var res = document.getElementById('noteBox') // 添加笔记 box
// // res.style.display = 'block'
// // $('.mask').show()
// // $('#rightClickBox').css('display', 'none')
// // })
// // // 点击 添加笔记 取消 按钮
// // $('#noteCancel').click(() => {
// // $('#noteBox').css('display', 'none')
// // $('.mask').hide()
// // $('.note-textarea').val('')
// // })
// // // 点击 添加笔记 保存 按钮
// // $('#noteSave').click(() => {
// // let textareaVal = $('.note-textarea').val() // 笔记val
// // let url = decodeURIComponent(window.location.search)
// // let attIdIndex = url.indexOf('ATT_FILE') // 截取文件id
// // let fileUrlId = url.substring(attIdIndex, url.length)
// // /**
// // * 获取笔记类型
// // * @type {string}
// // * EXPERT::专家笔记、 PERSONAL:个人笔记
// // */
// // // let noteType = JSON.parse(sessionStorage.getItem('userInfo')).userRole === '超级管理员' ? 'EXPERT' : 'PERSONAL'
// // $.ajax({
// // type: 'POST',
// // url: '/api/lawss/utNoteInfo/saveNote',
// // data: {
// // noteContent: textareaVal,
// // xContent: 1250,
// // yContent: pageY,
// // attId: fileUrlId, // pdf文件ID
// // noteType: 'PERSONAL',
// // noteName: JSON.parse(sessionStorage.getItem('fileInfo'))[0].fileName
// // },
// // success: (res) => {
// // if (res.ok) {
// // alert('保存成功')
// // $('#noteBox').css('display', 'none')
// // $('.mask').hide()
// // $('.note-textarea').val('')
// // getNote()
// // } else {
// // alert(res.message)
// // }
// // }
// // })
// // })
// // // 回显笔记内容
// // function getNote () {
// // let url = decodeURIComponent(window.location.search)
// // let attIdIndex = url.indexOf('ATT_FILE') // 截取文件id
// // let fileUrlId = url.substring(attIdIndex, url.length)
// // $.ajax({
// // type: 'GET',
// // url: '/api/lawss/utNoteInfo/worldPage',
// // data: {
// // attId: fileUrlId
// // },
// // success: (res) => {
// // if (res.ok) {
// // $('.note-float').remove() // 移除所有的笔记
// // // 重新渲染笔记
// // res.data.list.map(item => {
// // let str = `<div class="note-float" style="position: absolute; top: ${item.yContent}px; left: ${item.xContent}px">
// // <span>${item.noteContent}</span>
// // <span class="note-del" id="${item.id}">x</span>
// // </div>`
// // $('#viewerContainer').append(str)
// // })
// // }
// // }
// // })
// // }
// // getNote()
// // // 删除笔记事件
// // $('body').delegate('.note-float .note-del', 'click', (e) => {
// // $.ajax({
// // type: 'POST',
// // url: '/api/lawss/utNoteInfo/deleteNote',
// // data: {
// // ids: e.target.id
// // },
// // success: (res) => {
// // if (res.ok) {
// // alert('删除成功')
// // getNote()
// // } else {
// // alert(res.message)
// // }
// // }
// // })
// // })
// // // 点击 tree新增modal取消按钮
// // $('#treeAddCancel').click(() => {
// // $('.tree-add-modal').hide()
// // $('.mask').hide()
// // })
// })
@@ -96,7 +96,6 @@
#upload .placeholder .webuploader-pick {
font-size: 18px;
background: #00b7ee;
3px;
line-height: 44px;
padding: 0 30px;
*width: 120px;
@@ -198,7 +197,6 @@
overflow: hidden;
z-index: 50;
margin: 0;
0;
background: none;
-webkit-box-shadow: 0 0 0;
}
@@ -317,7 +315,6 @@
height: 113px;
background: url(./images/image.png) no-repeat center 12px;
border: 1px solid #eeeeee;
0;
}
#upload .filelist li.filePickerBlock div.webuploader-pick {
width: 100%;
@@ -447,7 +444,6 @@
color: #565656;
padding: 0 18px;
display: inline-block;
3px;
margin-left: 10px;
cursor: pointer;
font-size: 14px;
@@ -10,8 +10,8 @@
.bottom{height:320px;width:100%;margin: 0 auto;}
.transparent{ background: url("images/bg.gif") repeat;}
.bottom table tr td{border:1px dashed #ccc;}
#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;3px;box-shadow: 2px 2px 5px #D3D6DA;}
.border_style1{padding:2px;border: 1px solid #ccc;5px;box-shadow:2px 2px 5px #d3d6da;}
#colorPicker{width: 17px;height: 17px;border: 1px solid #CCC;display: inline-block;box-shadow: 2px 2px 5px #D3D6DA;}
.border_style1{padding:2px;border: 1px solid #ccc;box-shadow:2px 2px 5px #d3d6da;}
p{margin: 5px 0}
table{clear:both;margin-bottom:10px;border-collapse:collapse;word-break:break-all;}
li{clear:both}
+199 -60
View File
@@ -1,34 +1,146 @@
<template>
<div id="app">
<router-view v-if="!isBoolean"/>
<div class="content-box" v-if="isBoolean">
<nav-menu></nav-menu>
<div class="sub-container">
<com-header></com-header>
<div class="container-box">
<router-view />
</div>
<!-- <router-view v-if="!isBoolean"/>-->
<span v-if="this.$route.name === 'Login'|| !isBoolean">
<router-view />
</span>
<span v-else>
<div class="content-box" v-if="isCollapse">
<el-container>
<el-header>
<div>
<img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
</div>
<div style="float: right; margin-right: 20px;">
<div class="user-info">
<el-dropdown
trigger="click"
@command="handleCommand"
>
<div class="user-box">
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
<span class="iconfont" v-else style="color: #000;">&#xe69b;</span>
<span style="color: #000;">{{ $store.getters.userInfo.uName }}</span>
<i style="color: #000;" class="el-icon-arrow-down"/>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</el-header>
<el-main>
<nav-menu></nav-menu>
<div class="sub-container" style="margin-left: 60px">
<div class="container-box">
<router-view/>
</div>
</div>
</el-main>
</el-container>
</div>
</div>
<div class="content-box" v-else>
<el-container>
<el-header>
<div>
<img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
</div>
<div style="float: right; margin-right: 20px;">
<div class="user-info">
<el-dropdown
trigger="click"
@command="handleCommand"
>
<div class="user-box">
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
<span class="iconfont" v-else style="color: #000;">&#xe69b;</span>
<span style="color: #000;">{{ $store.getters.userInfo.uName }}</span>
<i style="color: #000;" class="el-icon-arrow-down"/>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
</el-header>
<el-main>
<nav-menu></nav-menu>
<div class="sub-container" style="margin-left: 200px">
<div class="container-box">
<router-view/>
</div>
</div>
</el-main>
</el-container>
</div>
</span>
</div>
</template>
<script>
import {mapGetters, mapState} from 'vuex'
import {webLoginType,ssoLogoutUrlDev} from '@/sysConfig'
export default {
name: 'App',
data () {
data() {
return {
isBoolean: false
}
},
methods: {
// 点击下拉选项事件
handleCommand(command) {
// 退出登录
if (command === 'loginOut') {
this.$confirm('您确认要退出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
if (webLoginType != null && webLoginType === 'idm') {
this.$store.dispatch('logout')
window.location.href = ssoLogoutUrlDev
// this.$http.post('logout', {}, res => {
// window.location.href= 'http://testsso1.foton.com.cn/logout?service='
// })
} else if (webLoginType != null && webLoginType === 'dev') {
this.$store.commit('setTypeFlag', 'loginOut')
this.$http.get('logout', {}, {
_this: this
}, res => {
this.$store.dispatch('logout')
this.$router.push('/login')
}, e => {
})
}
// this.$http.post('/logout', {}, res => {
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
// })
// return
// this.$store.commit('setTypeFlag', 'loginOut')
// this.$http.get('logout', {}, {
// _this: this
// }, res => {
// this.$store.dispatch('logout')
// this.$router.push('/login')
// }, e => {})
}).catch(() => {
})
}
},
/**
* @description: 主题设置
* @author: xx
* @date: 2018-08-29 14:56:39
*/
setTheme (theme) {
setTheme(theme) {
document.getElementById('app').className = theme
},
@@ -40,32 +152,32 @@ export default {
banBackSpace(e) {
var ev = e || window.event;
//各种浏览器下获取事件对象
var obj = ev.relatedTarget || ev.srcElement || ev.target ||ev.currentTarget;
var obj = ev.relatedTarget || ev.srcElement || ev.target || ev.currentTarget;
//按下Backspace键
if(ev.keyCode == 8){
if (ev.keyCode == 8) {
var tagName = obj.nodeName //标签名称
//如果标签不是input或者textarea则阻止Backspace
if(tagName!='INPUT' && tagName!='TEXTAREA'){
if (tagName != 'INPUT' && tagName != 'TEXTAREA') {
return this.stopIt(ev);
}
var tagType = obj.type.toUpperCase();//标签类型
//input标签除了下面几种类型,全部阻止Backspace
if(tagName=='INPUT' && (tagType!='TEXT' && tagType!='TEXTAREA' && tagType!='PASSWORD')){
if (tagName == 'INPUT' && (tagType != 'TEXT' && tagType != 'TEXTAREA' && tagType != 'PASSWORD')) {
return this.stopIt(ev);
}
//input或者textarea输入框如果不可编辑则阻止Backspace
if((tagName=='INPUT' || tagName=='TEXTAREA') && (obj.readOnly==true || obj.disabled ==true)){
if ((tagName == 'INPUT' || tagName == 'TEXTAREA') && (obj.readOnly == true || obj.disabled == true)) {
return this.stopIt(ev);
}
}
},
stopIt(ev) {
if(ev.preventDefault){
if (ev.preventDefault) {
//preventDefault()方法阻止元素发生默认的行为
ev.preventDefault();
}
if(ev.returnValue){
if (ev.returnValue) {
//IE浏览器下用window.event.returnValue = false;实现阻止元素发生默认的行为
ev.returnValue = false;
}
@@ -79,30 +191,39 @@ export default {
}
},
computed: {
// 获取用户头像
userAvator() {
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
},
...mapGetters([
'getWebSocketList', 'getTheme', 'getMenuList'
]),
...mapState(['userInfoModifyTime'])
...mapState(['userInfoModifyTime', 'isCollapse'])
},
watch: {
// 'userInfoModifyTime'() {
// // console.log('watch global, userInfoModifyTime')
// this.refresh()
// },
getTheme (val) {
getTheme(val) {
// 主题修改
this.setTheme(val)
},
// 监听路由 控制isBoolean
$route () {
if (this.$route.name !== 'Login' && this.$route.name !== 'Home' && !this.$route.meta.isBoolean && this.$route.name !== 'beeEChungLogin' && this.$route.name !== 'beeEnergyLogin' && this.$route.name !== 'mdLawLogin' && this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin' && this.$route.name !== 'StandardSearch') {
$route() {
if (this.$route.name !== 'Login' && this.$route.name !== 'Home'
&& !this.$route.meta.isBoolean && this.$route.name !== 'beeEChungLogin'
&& this.$route.name !== 'beeEnergyLogin' && this.$route.name !== 'mdLawLogin'
&& this.$route.name !== 'nuoBLogin' && this.$route.name !== 'sTLogin'
&& this.$route.name !== 'StandardSearch' && this.$route.name !== 'phoneIndex'
&& this.$route.name !== 'blankPage' && this.$route.name !== 'processedPage' ) {
this.isBoolean = true
} else {
this.isBoolean = false
}
}
},
mounted () {
mounted() {
this.setTheme(this.getTheme)
//实现对字符码的截获,keypress中屏蔽了这些功能按键
document.onkeypress = this.banBackSpace
@@ -119,11 +240,13 @@ export default {
return
}
if (userInfoModifyTimeInLocalStorage === null) {
if (userInfoModifyTimeInLocalStorage === null && webLoginType === 'idm') {
this.$store.dispatch('syncStorageData')
const currentPage = this.$route.name
if (currentPage === 'Login') {return}
if (currentPage === 'Login') {
return
}
this.currentMinute = 3
this.loading && this.loading.close()
this.loading = this.$loading({
@@ -134,7 +257,7 @@ export default {
});
this.messageForLogin && this.messageForLogin.close()
this.messageForLogin = this.$message({
message: `用户已退出,${this.currentMinute}秒后将跳转到登录页面`,
message: `用户已退出,${this.currentMinute}秒后将跳转到登录1页面`,
type: 'warning'
})
@@ -149,9 +272,9 @@ export default {
}
this.currentMinute--
this.messageForLogin.message = `用户已退出,${this.currentMinute}秒后将跳转到登录页面`
}, 1000)
}, 0)
} else if (userInfoModifyTime !== userInfoModifyTimeInLocalStorage) {
} else if (userInfoModifyTime !== userInfoModifyTimeInLocalStorage && webLoginType === 'idm') {
this.$store.dispatch('syncStorageData')
console.log('用户信息已更改,同步数据')
@@ -178,7 +301,7 @@ export default {
this.$router.push({
path: '/redirect',
query: '/home'
query: '/home2'
})
}
this.currentMinute--
@@ -209,43 +332,59 @@ export default {
</script>
<style lang="less">
#app {
position: relative;
#app {
position: relative;
width: 100%;
height: 100%;
overflow-y: hidden;
background-color: #F0F2F5;
//background: url('~@/assets/images/shangqi/home/BG.png') no-repeat;
background-size: 100% 100%;
font-family: MicrosoftYaHei, 微软雅黑;
& > div {
position: absolute;
top: 0;
left: 0;
width: 100%;
min-height: 100%;
}
.el-main {
padding: 15px 10px 0 10px;
}
.content-box {
display: flex;
height: 100%;
overflow-y: auto;
background: url('~@/assets/images/shangqi/home/BG.png') no-repeat;
background-size: 100% 100%;
& > div{
position: absolute;
top: 0;
left: 0;
width: 100%;
min-height: 100%;
.el-header {
padding: 0;
}
.content-box {
display: flex;
.sub-container {
height: 100%;
.sub-container {
height: 100%;
flex: 1;
overflow-x: auto;
display: flex;
flex-direction: column;
.container-box {
position: relative;
height: calc(~'100% - 50px');
//flex: 1;
background: #F4F4F4;
overflow-y: auto;
padding: 10px 10px 0;
.pagination {
border-top: 1px solid #f4f4f4;
width: calc(~'100% - 20px');
left: 10px;
}
flex: 1;
overflow-x: auto;
display: flex;
flex-direction: column;
.container-box {
position: relative;
height: calc(~'100% - 10px');
//flex: 1;
background: #F4F4F4;
overflow-y: auto;
.pagination {
border-top: 1px solid #f4f4f4;
width: calc(~'100% - 20px');
left: 10px;
}
}
}
}
/deep/ .el-menu--vertical {
background: red;
}
}
</style>
+14
View File
@@ -0,0 +1,14 @@
/**
* @description: 业务相关API接口
*/
import axios from '@/common/axiosV2'
// 企标评价-获取评价指标
export function getEvaluationIndex (data) {
return axios({
url: '/api/sarEnterpriseStandardEvaluation/evaluation-index/getEvaluationIndex',
method: 'get',
params: data
})
}
+28
View File
@@ -0,0 +1,28 @@
import axios from '@/common/axiosV2'
export function getFileAttId (data) {
this.getBusStandFileByAttId(data)
.then(res => {
if(res){
const editFileInfo = res
if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
}else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
}else {
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
}
}
}).catch(e => {
this.$message.warning('文件不存在,预览失败')
})
}
export function getBusStandFileByAttId(data) {
return axios({
url: 'api/att/attFile/getBusStandFileByAttId',
method: 'get',
params: data
})
}
File diff suppressed because one or more lines are too long
+10
View File
@@ -0,0 +1,10 @@
import axios from "@/common/axiosV2";
export function getImg (data) {
return axios({
url: 'api/sarUrl/tsUrl/getIconImg',
method: 'get',
params: data,
responseType: 'arraybuffer'
})
}
+10
View File
@@ -0,0 +1,10 @@
import axios from "@/common/axiosV2";
// 手机端查询人
export function phoneUser(params) {
return axios({
url: "api/sys/user/getUserByPhone",
method: "get",
params
});
}
+148
View File
@@ -76,6 +76,22 @@ export function processCreateStand (data) {
data
})
}
export function processCreateBuss (data) {
return axios({
url: '/api/lawss/actSarItemsBuss/processCreateBuss',
method: 'post',
data
})
}
export function processCreateLaws (data) {
return axios({
url: '/api/lawss/actSarItemsLaws/processCreateLaws',
method: 'post',
data
})
}
// 流程3 法规流程入库
export function processCreatePG (data) {
return axios({
@@ -129,6 +145,15 @@ export function queryTaskFirst (data) {
params: data
})
}
// 草稿删除
export function taskDel (data) {
return axios({
url: '/api/lawss/activiti/delCG',
method: 'post',
params: data
})
}
// 整改流程 详情查询nonconformity
export function getNonconformity (data) {
return axios({
@@ -415,6 +440,78 @@ export function isEnd (data) {
})
}
export function processModelHisOne (data) {
return axios({
url: '/api/lawss/activiti/processModelHisOne',
method: 'get',
params: data
})
}
export function saveEditFile (data) {
return axios({
url: '/api/lawss/activiti/saveEditFile',
method: 'get',
params: data
})
}
export function processEditFile (data) {
return axios({
url: '/api/lawss/activiti/processEditFile',
method: 'get',
params: data
})
}
export function processModelHisOneCount (data) {
return axios({
url: '/api/lawss/activiti/processModelHisOneCount',
method: 'get',
params: data
})
}
export function evaluationHisList (data) {
return axios({
url: '/api/lawss/activiti/evaluationHisList',
method: 'get',
params: data
})
}
export function execTask (data) {
return axios({
url: '/api/lawss/activiti/execTask',
method: 'get',
params: data
})
}
export function get_verify_by_instance (data) {
return axios({
url: '/api/lawss/activiti/get_verify_by_instance',
method: 'get',
params: data
})
}
export function getMenu (data) {
return axios({
url: '/api/sarUser/user/menu',
method: 'get',
params: data
})
}
export function loginIdm (data) {
return axios({
url: '/api/loginIdm',
method: 'post',
data
})
}
// 流程委托接口
export function changeAssigneeNew (data) {
return axios({
@@ -564,6 +661,15 @@ export function getConvertFileByAttId(data) {
})
}
// 获取openOffice 在线预览文件
export function getBusStandFileByAttId(data) {
return axios({
url: 'api/att/attFile/getBusStandFileByAttId',
method: 'get',
params: data
})
}
// 未符合项跟踪修改状态
export function updateBaseInfo(data) {
return axios({
@@ -607,3 +713,45 @@ export function getStandInfoById (data) {
params: data
})
}
// 流程撤回接口
export function processBack(data) {
return axios({
url: 'api/lawss/activiti/startProcessRollBack',
method: 'post',
data
})
}
// 标准法规工作组接口
export function workGroup(data) {
return axios({
url: 'api/wg_work_group/researchData',
method: 'get',
params: data
})
}
// 手机端查询token
export function loginMobile(data) {
return axios({
url: 'api/lawss/activiti/loginMobile',
method: 'post',
params: data
})
}
// 日历信息编辑
export function updateMeet(data) {
return axios({
url: '/api/sapMeetInfo/updateMeeting',
method: 'post',
params: data
})
}
// 上传接口
export function upFile(data) {
return axios({
url: '/api/att/attFile/upload',
method: 'post',
data
})
}
+268
View File
@@ -0,0 +1,268 @@
import axios from '@/common/axiosV2'
/** 协会费用信息统计接口 */
// 获取所有统计数据
export function statisticsAll (data) {
return axios({
url: 'api/wgdCensusZ/wgd-assoc-cost/getAllAssocCosts',
method: 'get',
params: data
})
}
// 多条件查询
export function queryStatistics (data) {
return axios({
url: 'api/wgdCensusZ/wgd-assoc-cost/queryAllAssocCosts',
method: 'get',
params: data
})
}
// 获取单个详情
/*
export function queryStatistics (data) {
return axios({
url: 'api/wgdCensusZ/wgd-assoc-cost/getAssocCostById',
method: 'get',
params: data
})
}
*/
// 数据编辑
export function statisticsEdit (data) {
return axios({
url: 'api/wgdCensusZ/wgd-assoc-cost/modAssocCost',
method: 'put',
params: data
})
}
// 页面数据新增
export function statisticsAdd (data) {
return axios({
url: 'api/wgdCensusZ/wgd-assoc-cost/addAssocCost',
method: 'post',
params: data
})
}
// 多数据删除
export function delMore (data) {
return axios({
url: 'api/wgdCensusZ/wgd-assoc-cost/delAssocCosts',
method: 'delete',
params: data
})
}
/** 参会费用信息统计 */
// 查询
export function meetAll (data) {
return axios({
url: 'api/wgdCensusZ/wgd-meet-cost/queryAllMeetCosts',
method: 'get',
params: data
})
}
// 编辑
export function meetEdit (data) {
return axios({
url: 'api/wgdCensusZ/wgd-meet-cost/modMeetCost',
method: 'put',
params: data
})
}
// 新增
export function meetAdd (data) {
return axios({
url: 'api/wgdCensusZ/wgd-meet-cost/addMeetCost',
method: 'post',
params: data
})
}
// 删除
export function meetDel (data) {
return axios({
url: 'api/wgdCensusZ/wgd-meet-cost/delMeetCosts',
method: 'delete',
params: data
})
}
/** 参与外部标准制修订费用统计 */
// 数据查询
export function reviseAll (data) {
return axios({
url: 'api/wgdCensusZ/wgd-ex-revise-cost/queryAllExReviseCosts',
method: 'get',
params: data
})
}
// 编辑
export function reviseEdit (data) {
return axios({
url: 'api/wgdCensusZ/wgd-ex-revise-cost/modExReviseCost',
method: 'put',
params: data
})
}
// 新增
export function reviseAdd (data) {
return axios({
url: 'api/wgdCensusZ/wgd-ex-revise-cost/addExReviseCost',
method: 'post',
params: data
})
}
export function reviseDel (data) {
return axios({
url: 'api/wgdCensusZ/wgd-ex-revise-cost/delExReviseCosts',
method: 'delete',
params: data
})
}
/** 采购费用信息统计接口 */
// 查询
export function CgfysAll (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/queryAllCgfys',
method: 'get',
params: data
})
}
/*// 查询详情
export function CgfyDetail(data) {
return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/getCgfyById',
method: 'get',
params: data
})
}*/
// 编辑接口
export function CgfysEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/modCgfy',
method: 'post',
params: data
})
}
// 新增接口
export function CgfysAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/addCgfy',
method: 'post',
params: data
})
}
// 批量删除
export function CgfysDelMore (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-cgfy/delCgfys',
method: 'post',
params: data
})
}
/** 翻译费用信息统计 */
// 查询
export function fyQuery (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/queryAllFyfys',
method: 'get',
params: data
})
}
// 查看
export function fyDetail (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/getFyfyById',
method: 'get',
params: data
})
}
// 编辑
export function fyEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/modFyfy',
method: 'post',
params: data
})
}
// 新增
export function fyAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/addFyfy',
method: 'post',
params: data
})
}
// 删除
// 查看
export function fyDel (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-fyfy/delFyfys',
method: 'post',
params: data
})
}
/** 资金收支统计(收入) */
// 查询
export function inComeQuery (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/queryAllSrbs',
method: 'get',
params: data
})
}
// 编辑
export function inComeEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/modSrb',
method: 'post',
params: data
})
}
// 新增
export function inComeAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/addSrb',
method: 'post',
params: data
})
}
// 删除
export function inComeDel (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-srb/delSrbs',
method: 'post',
params: data
})
}
/** 资金收支统计(支出) */
// 查询
export function exportQuery (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/queryAllZcbs',
method: 'get',
params: data
})
}
// 编辑
export function exportEdit (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/modZcb',
method: 'post',
params: data
})
}
// 新增
export function exportAdd (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/addZcb',
method: 'post',
params: data
})
}
// 删除
export function exportDel (data) {
return axios({
url: 'api/wgdCensusLeo/wgd-zcb/delZcbs',
method: 'post',
params: data
})
}
+103 -21
View File
@@ -1,40 +1,122 @@
import axios from '@/common/axiosV2'
import axios from "@/common/axiosV2";
// 查询未整改项列表接口
export function standUnqualified (data) {
export function standUnqualified(data) {
return axios({
url: '/api/sarStandUnqualified/sar-stand-unqualified',
method: 'get',
url: "/api/sarStandUnqualified/sar-stand-unqualified",
method: "get",
params: data
})
});
}
// 人员菜单列表获取
export function roleTreeData (data) {
export function roleTreeData(data) {
return axios({
url: '/api/SarInstitution/institution/institutionAndUser',
method: 'get',
url: "/api/SarInstitution/institution/institutionAndUser",
method: "get",
params: data
})
});
}
// 上传文件
export function uploadFileText (data) {
export function uploadFileText(data) {
return axios({
url: 'api/att/attFile/upload',
method: 'get',
url: "api/att/attFile/upload",
method: "get",
params: data
})
});
}
export function dicTypeData (data) {
export function dicTypeData(data) {
return axios({
url: 'api/sys/dictype/getDicTypeListCode',
method: 'get',
url: "api/sys/dictype/getDicTypeListCode",
method: "get",
params: data
})
});
}
export function StandardsInfoPage (data) {
export function StandardsInfoPage(data) {
return axios({
url: 'api/sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage',
method: 'get',
url: "api/sarStandardsInfo/sar-standards-info/getSarStandardsInfoPageBak",
method: "get",
params: data
})
});
}
// 车型库清单的下拉列表
export function solostarData(data) {
return axios({
url: "api/sarStandProjectLibrary/solostar",
method: "get",
params: data
});
}
// 活动日历查询接口
export function meetingByMonth(params) {
return axios({
url: "api/sapMeetInfo/getMeetingsByMonthType",
method: "get",
params
});
}
//未符合项模块新增
export function addUn(
closeState,standId, standSerialNumber, standName,
itemsNum, itemsName, productType,
productLine, productName,productId,reason,
dutyEngineer, authEngineer, qaEngineer, planCloseTime) {
const data = {
closeState,
standId,
standSerialNumber, //标准号
standName, //标准名称
itemsNum, //条款号
itemsName, //条款名称
productType,
productLine, //产品线
productName, //项目名称
productId, //项目编号
reason, //不合规项目
dutyEngineer, //责任工程师
authEngineer, //认证工程师
qaEngineer, //质量工程师
planCloseTime //计划关闭时间
};
return axios({
url: "api/sarStandUnqualified/sar-stand-unqualified/addOne",
method: "post",
data
});
}
//未符合项模块编辑
export function editUn(
closeState, standId, standSerialNumber, standName,
itemsNum, itemsName, productType,
productLine, productName, reason,
dutyEngineer, authEngineer, qaEngineer, planCloseTime, id) {
const data = {
closeState,
standId,
standSerialNumber, //标准号
standName, //标准名称
itemsNum, //条款号
itemsName, //条款名称
productType,
productLine, //产品线
productName, //项目名称
reason, //不合规项目
dutyEngineer, //责任工程师
authEngineer, //认证工程师
qaEngineer, //质量工程师
planCloseTime, //计划关闭时间
id
};
return axios({
url: "api/sarStandUnqualified/sar-stand-unqualified/updateOne",
method: "post",
data
});
}
Binary file not shown.

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 158 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 827 B

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 4.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 KiB

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 6.7 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 787 B

After

Width:  |  Height:  |  Size: 5.4 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 899 B

After

Width:  |  Height:  |  Size: 4.2 KiB

+3 -2
View File
@@ -152,8 +152,8 @@ export const m = {
title: '标题',
creator: '创建人',
serialNumber: '序号',
dataType: '资料类型',
standardNumberAndPolicyNumber: '标准号/政策号',
dataType: '标准类别',
standardNumberAndPolicyNumber: '标准号/政策号',
standardNameAndPolicyName: '标准名称/政策名称',
textState: '文本状态',
conversionResults: '转换结果',
@@ -407,6 +407,7 @@ export const m = {
PleaseSelectYourFieldOfExpertise: '请选择所属专业领域',
pleaseEnterComments: '请输入备注',
standardNo: '标准号',
enterpriseStandardNumber: '企标号',
nameStandard: '标准名称',
theImportFile: '导入文件',
specialEffectiveDate: '特殊生效日期',
+1
View File
@@ -236,6 +236,7 @@ export const m = {
pleaseSelectApplicableArea: 'PleaseSelectApplicableArea',
country: 'Country',
itemNumber: 'ItemNumber',
enterpriseStandardNumber: 'enterpriseStandardNumber',
entryName: 'EntryName',
clauseRequirements: 'ClauseRequirements',
keyPointsOfimplementation: 'KeyPointsOfimplementation',
+7
View File
@@ -1,6 +1,8 @@
/*liuyan 全局公共样式*/
@import './style';
@import './mixins';
// 移动端公共样式
@import './phone';
// 左侧菜单样式
@import './navMenu';
// tree组件父组件内样式
@@ -389,3 +391,8 @@
.clearfix{
*zoom: 1;/*ie6清除浮动的方式 *号只有IE6-IE7执行,其他浏览器不执行*/
}
.el-button--primary {
background-color: #4788c0 ;
border-color: #3986c9
}
+9 -9
View File
@@ -14,7 +14,7 @@
font-weight: 600;
}
.el-submenu__title, .el-menu-item{
font-size: 15px;
font-size: 14px;
background-color: transparent !important;
&::before{
content: '';
@@ -73,14 +73,14 @@
&.is-active {
background: rgba(255, 255, 255, 0.1) !important;
}
&:first-child {
border-top-left-radius: 15px;
border-top-right-radius: 15px;
}
&:last-child {
border-bottom-left-radius: 15px;
border-bottom-right-radius: 15px;
}
//&:first-child {
// border-top-left-radius: 15px;
// border-top-right-radius: 15px;
//}
//&:last-child {
// border-bottom-left-radius: 15px;
// border-bottom-right-radius: 15px;
//}
}
}
}
+18 -345
View File
@@ -1,348 +1,18 @@
//button.el-button.form-upload-btn.el-button--default.el-button--small{
// padding: 13px 15px;
//}
////设置查询按钮
//.el-button--primary.searchAngNewBtn{
// height: 32px;
// padding: 0 15px;
// color: #fff;
// background-color: #3391CE;
// font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', Arial, sans-serif;
// border-color: #3391CE;
// &.is-disabled {
// background-color: #b0d3ed !important;
// border-color: #bcd1e0 !important;
// }
//}
//.el-button--primary.searchAngNewBtn:hover{
// padding: 0 15px;
// background-color: #3391CE;
// border-color: #3391CE;
//}
//.el-button--primary.searchAngNewBtn:focus{
// padding: 0 15px;
// background-color: #3391CE;
// border-color: #3391CE;
//}
//.el-button--danger.searchAngNewBtn{
// height: 32px;
// padding: 0 15px;
// color: #fff;
//}
//.el-button--danger.searchAngNewBtn:hover{
// padding: 0 15px;
//}
//.el-button--danger.searchAngNewBtn:focus{
// padding: 0 15px;
//}
//.el-button.searchAngNewBtn{
// height: 32px;
// padding: 0 15px;
// //color: #fff;
//}
//.el-button.searchAngNewBtn:hover{
// padding: 0 15px;
//}
//.el-button.searchAngNewBtn:focus{
// padding: 0 15px;
//}
////设置新增,导出等按钮
//.el-button.el-button--primary.el-button--mini {
// padding: 5px 18px;
// color: #fff;
// background-color: #3391CE;
// border-color: #3391CE;
// &.is-disabled {
// background-color: #b0d3ed !important;
// border-color: #bcd1e0 !important;
// }
//}
//.el-button.el-button--primary.el-button--mini:hover{
// padding: 5px 18px;
// background-color: #3391CE;
// border-color: #3391CE;
//}
//.el-button.el-button--primary.el-button--mini:focus{
// padding: 5px 18px;
// background-color: #3391CE;
// border-color: #3391CE;
//}
//.el-button.el-button--danger.el-button--mini {
// padding: 5px 18px;
// color: #fff;
//}
//.el-button.el-button--danger.el-button--mini:hover{
// padding: 5px 18px;
//}
//.el-button.el-button--danger.el-button--mini:focus{
// padding: 5px 18px;
//}
//// 设置表格操作按钮
//.el-button.el-button--primary.el-button--mini.opera-btn {
// padding: 5px 7px;
// color: #fff;
// background-color: #3391CE;
// border-color: #3391CE;
// &.is-disabled {
// background-color: #b0d3ed !important;
// border-color: #bcd1e0 !important;
// }
//}
//.el-button.el-button--primary.el-button--mini.opera-btn:hover{
// padding: 5px 7px;
// background-color: #3391CE;
// border-color: #3391CE;
//}
//.el-button.el-button--primary.el-button--mini.opera-btn:focus{
// padding: 5px 7px;
// background-color: #3391CE;
// border-color: #3391CE;
//}
//.el-button.el-button--danger.el-button--mini.opera-btn {
// padding: 5px 7px;
// color: #fff;
//}
//.el-button.el-button--danger.el-button--mini.opera-btn:hover{
// padding: 5px 7px;
//}
//.el-button.el-button--danger.el-button--mini.opera-btn:focus{
// padding: 5px 7px;
//}
//.el-button.el-button--warning.el-button--mini.opera-btn {
// padding: 5px 7px;
// color: #fff;
// background-color: #ff9900;
// border-color: #ff9900;
//}
//.el-button.el-button--warning.el-button--mini.opera-btn:hover{
// padding: 5px 7px;
// background-color: #ff9900;
// border-color: #ff9900;
//}
//.el-button.el-button--warning.el-button--mini.opera-btn:focus{
// padding: 5px 7px;
// background-color: #ff9900;
// border-color: #ff9900;
//}
//
////设置form-item
//.el-form-item.serch-form-item {
// margin-bottom: 0;
// margin-right: 6px;
// margin-top: 10px;
//}
//.el-form-item.serch-form-item.btn-box {
// margin-bottom: 0;
// margin-right: 2px;
//}
//// 设置查询orm-item-lable
//.serch-form-item .el-form-item__label{
// position: relative;
// top: 1px;
// padding: 0 7px;
// height: 32px;
// line-height: 32px;
// font-size: 12px;
// border: 1px solid #DDD;
// border-top-left-radius: 4px;
// border-bottom-left-radius: 4px;
// border-right: none;
// background: #F4F8FB;
// text-align: center;
// min-width: 80px;
//}
//.serch-form-item .el-form-item__content {
// line-height: 32px;
// position: relative;
// font-size: 14px;
// .put__inner{
// height: 32px !important;
// line-height: 32px !important;
// width: 170px;
// 0 4px 4px 0;
// font-size: 12px;
// color: #515a6e;
// font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
// }
// .el-input__icon{
// line-height: 32px;
// }
//}
//.el-form-item.search-form-item.btn-box {
// margin-bottom: 0;
// margin-right: 2px;
//}
//// 设置查询orm-item-lable
//.search-form-item .el-form-item__label{
// position: relative;
// top: 1px;
// padding: 0 7px;
// height: 32px;
// line-height: 32px;
// font-size: 12px;
// border: 1px solid #DDD;
// border-top-left-radius: 4px;
// border-bottom-left-radius: 4px;
// border-right: none;
// background: #F4F8FB;
// text-align: center;
// min-width: 80px;
//}
//.search-form-item .el-form-item__content {
// line-height: 32px;
// position: relative;
// font-size: 14px;
// .el-input__inner{
// height: 32px !important;
// line-height: 32px !important;
// width: 180px;
// 4px;
// font-size: 12px;
// color: #515a6e;
// font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
// }
// .el-input__icon{
// line-height: 32px;
// }
//}
//// 设置新增form-item-lable
//.add-form-item .el-form-item__label{
// position: relative;
// top: 1px;
// padding: 0 7px;
// width: 120px;
// height: 40px;
// line-height: 40px;
// font-size: 12px;
// border: 1px solid #DDD;
// border-top-left-radius: 4px;
// border-bottom-left-radius: 4px;
// border-right: none;
// background: #F4F8FB;
// text-align: center;
// white-space: nowrap;
// text-overflow: ellipsis;
// overflow: hidden;
//}
//.add-form-item .el-form-item__content {
// position: relative;
// font-size: 14px;
// width: 224px;
// .el-input__inner{
// 0 4px 4px 0;
// font-size: 12px;
// color: #515a6e;
// font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
// width: 224px;
// }
// //设置输入框高度
//// .label-input-form{
//// .el-input__inner{
//// // @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
//// // // ie下样式偏差1px
//// // line-height: 27px !important;
//// // }
//// }
//// }
//}
//// 设置新增等按钮区域样式
//.action-bar{
// padding:10px 0;
// .el-button+.el-button{
// margin-left: 2px;
// }
//}
//// 设置tabs激活状态颜色
//.el-tabs--border-card>.el-tabs__header .el-tabs__item.is-active {
// color: #3391CE;
// background-color: #FFF;
// border-right-color: #DCDFE6;
// border-left-color: #DCDFE6;
//}
//// 设置tabs hover颜色
//.el-tabs--border-card>.el-tabs__header .el-tabs__item:not(.is-disabled):hover {
// color: #3391CE;
//}
//// 设置页面查询区域下的下划线
//.search-area {
// border-bottom: 1px solid #e8eaec;
//}
///* element样式重置 start */
///* 去掉input尾部上下小箭头 start */
//input::-webkit-outer-spin-button,input::-webkit-inner-spin-button{
// -webkit-appearance: none !important;
// -moz-appearance: none !important;
// -o-appearance: none !important;
// -ms-appearance: none !important;
// appearance: none !important;
// margin: 0;
//}
//input[type="number"]{
// -webkit-appearance:textfield;
// -moz-appearance:textfield;
// -o-appearance:textfield;
// -ms-appearance:textfield;
// appearance:textfield;
//}
///* 去掉input尾部上下小箭头 end */
//// 所属部门选项 样式
//.user-dept-popper{
// padding: 0;
//}
//// 表单验证星星样式
//.single-star {
// .el-form-item__label:before{
// content: '*' !important;
// color: #F56C6C !important;
// margin-right: 4px !important;
// }
//}
//.double-star {
// .el-form-item__label:before{
// content: '**' !important;
// color: #F56C6C !important;
// margin-right: 4px !important;
// }
//}
//.add-form-item{
// /*margin-top -1px*/
// .top1px{
// .el-input__inner{
// margin-top: -1px;
// }
// }
// .el-textarea{
// .el-textarea__inner{
// height: 40px;
// min-height: 40px !important;
// font-size: 12px;
// font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
// border-bottom-left-radius: 0;
// border-top-left-radius: 0;
// }
// }
// .form-upload-btn{
// font-size: 12px;
// font-family: Helvetica, 'Hiragino Sans GB', 'Microsoft Yahei', '\5FAE\8F6F\96C5\9ED1', Arial, sans-serif !important;
// }
//}
//// 设置日期样式
//.el-date-editor .el-range-input{
// font-size: 12px;
// font-family: sans-serif;
//}
//span.el-range-separator{
// position: relative;
// left: -6px;
// font-size: 12px;
//}
//.el-date-editor .el-range-separator{
// line-height: 26px;
//}
//.serch-form-item .el-form-item__content .el-input__icon{
// line-height: 26px;
//}
// 设置查询区域
.itemsTextBox {
min-height: 300px;
max-height: 500px;
overflow: auto;
line-height: 20px;
td {
border: 1px solid #606266;
text-align: center;
}
/deep/ td {
border: 1px solid #606266;
text-align: center;
}
}
.search-area{
display: flex;
justify-content: space-between;
@@ -516,6 +186,7 @@ button.el-button.common-button-default.el-button--default.is-round{
}
// 按钮 + 图标
.add-button{
height: 32px;
.add{
background-image: url("~assets/images/shangqi/img/add.png");
}
@@ -788,12 +459,14 @@ tr.el-table__row{
.el-table th>.cell {
font-size: 14px;
}
.el-table td>.cell {
font-size: 12px;
}
.el-table th.gutter{
display: table-cell !important;
}
.iconfont {
font-size: 12px;
margin-right: 5px;
}
.dept-popover {
padding: 0;
+46
View File
@@ -0,0 +1,46 @@
.phoneBox {
width: 100%;
height: 100%;
.van-cell {
padding: 10px 0;
}
/deep/.van-field__label {
width: 100px;
margin-right: 0px;
padding-left: 10.38px;
}
.headerTabs {
height: 52px;
display: flex;
align-items: center;
position: absolute;
top: 51px;
right: 10px;
.headerTabsItem {
border: 1px solid #c1c1c1;
padding: 0 5px;
height: 30px;
line-height: 30px;
cursor: pointer;
}
.active {
border: 1px solid #E6A23C;
color: #fff;
background: #E6A23C;
}
}
.content {
border-top: 1px solid #DCDFE6;
margin-top: 51px;
height: calc(~'100% - 154px');
}
}
@media screen and (max-width: 1366px) {
.el-message {
min-width: 200px !important;
}
.el-message-box {
width: 270px!important;
top: -60px!important;
}
}
+6 -1
View File
@@ -18,7 +18,12 @@ mark{background-color:transparent}
a,ins,s,u,del{text-decoration:none}
sup,sub{vertical-align:baseline}
html {width:100%;height: 100%;font-size: 50px;-webkit-tap-highlight-color: transparent;}
body {font-family: 'PingFang SC', 'Microsoft Yahei', '微软雅黑', Arial, sans-serif !important;color: #333;font-size: 14px;line-height: 1;-webkit-text-size-adjust: none;width:100%;height:100%;min-width:1280px;overflow-x:auto;}
@media screen and (min-width: 1366px) {
body {
min-width:1280px;
}
}
body {font-family: 'PingFang SC', 'Microsoft Yahei', '微软雅黑', Arial, sans-serif !important;color: #333;font-size: 14px;line-height: 1;-webkit-text-size-adjust: none;width:100%;height:100%;overflow-x:auto;}
hr {height: .02rem;margin: .1rem 0;border: medium none;border-top: .02rem solid #cacaca;}
a {text-decoration: none;}
/*意见反馈页面富文本表格宽度*/
+60 -25
View File
@@ -7,7 +7,13 @@ import axios from 'axios'
import router from '@/router'
import store from '@/store'
import {Message} from 'element-ui'
import { baseUrl } from '@/sysConfig'
import { baseUrl,webLoginType,ssoLoginUrlDev } from '@/sysConfig'
import isMobile from "../../store/isMobile";
import domMessage from '../messageOnce/messageOnce'
const messageOnce = new domMessage()
export const CancelToken = axios.CancelToken
// import 'element-ui/lib/theme-chalk/index.css'
const _axios = axios.create({
@@ -34,37 +40,66 @@ window._axiosPromiseArr = []
* liuyan
*/
_axios.interceptors.request.use(
config => {
// 记录接口请求
// config.cancelToken = new axios.CancelToken(cancel => {
// // window._axiosPromiseArr.push({ cancel })
// })
return config
},
error => {
return Promise.reject(error.response)
})
config => {
// 记录接口请求
let token = store.state.token;
if (!config.headers.hasOwnProperty('token') && token != null && token) {
config.headers.token = token;
}
// config.cancelToken = new axios.CancelToken(cancel => {
// // window._axiosPromiseArr.push({ cancel })
// })
return config
},
error => {
return Promise.reject(error.response)
})
/**
* @description: axios响应拦截器
* liuyan
*/
_axios.interceptors.response.use(
res => {
return res
},
error => {
// 登录超时
if (error.response.data.path === '/a/login' && store.state.isTimeOut === false) {
for (let key in store.state) {
if (key !== 'isTimeOut' && key !== 'laws_urm' && key !== 'laws_prm') {
store.state[key] = ''
res => {
// IE 8-9
if (res.data == null && res.config.responseType === 'json' && res.request.responseText != null) {
try {
res.data = JSON.parse(res.request.responseText);
} catch (e) {
// ignored
}
}
Message.warning('登录超时,请重新登录')
router.push('/login')
store.state.isTimeOut = true
}
})
if(res.data && res.data.respCode && res.data.respCode === 'LE505'){
if (isMobile()) {
localStorage.removeItem('token')
return router.push('/phoneIndex')
}
window.sessionStorage.clear()
messageOnce.warning({
message: '登录超时,请重新登录',
type: 'warning'
})
if(webLoginType != null && webLoginType === 'idm' ) {
// idm 统一认证登录页面
return window.location.href = ssoLoginUrlDev
}else if(webLoginType != null && webLoginType === 'dev'){
return router.push('/login')
}
}
return res
},
error => {
// 登录超时
if (error.response.data.path === '/a/login' && store.state.isTimeOut === false) {
for (let key in store.state) {
if (key !== 'isTimeOut' && key !== 'laws_urm' && key !== 'laws_prm') {
store.state[key] = ''
}
}
Message.warning('登录超时,请重新登录')
router.push('/login')
store.state.isTimeOut = true
}
})
function api () {
return store.getters.getTypeFlag === 'CloudRepository' ? '/busApi/' : '/api/'
}
+61 -25
View File
@@ -2,9 +2,15 @@ import axios from 'axios'
import router from '@/router'
import store from '@/store'
import {Message} from 'element-ui'
import { baseUrl } from '@/sysConfig'
import { baseUrl,webLoginType,ssoLoginUrlDev } from '@/sysConfig'
import isMobile from "../../store/isMobile";
import domMessage from '../messageOnce/messageOnce'
// import 'element-ui/lib/theme-chalk/index.css'
const messageOnce = new domMessage()
/**
* @description: FormData
* @author: xx
@@ -29,35 +35,65 @@ service.defaults.headers['Content-type'] = 'application/json'
* liuyan
*/
service.interceptors.request.use(
config => {
if (config.params) {
// 解决IE请求不刷新
config.params._t = new Date().getTime()
}
return config
},
error => {
return Promise.reject(error.response)
})
config => {
if (config.params) {
// 解决IE请求不刷新
config.params._t = new Date().getTime()
}
let token = store.state.token;
if (!config.headers.hasOwnProperty('token') && token != null && token) {
config.headers.token = token;
}
return config
},
error => {
return Promise.reject(error.response)
})
/**
* @description: axios响应拦截器
* liuyan
*/
service.interceptors.response.use(
res => {
return res.data
},
error => {
// 登录超时
if (error.response.data.path === '/a/login' && store.state.isTimeOut === false) {
for (let key in store.state) {
if (key !== 'isTimeOut' && key !== 'laws_urm' && key !== 'laws_prm') {
store.state[key] = ''
res => {
// IE 8-9
if (res.data == null && res.config.responseType === 'json' && res.request.responseText != null) {
try {
res.data = JSON.parse(res.request.responseText);
} catch (e) {
// ignored
}
}
if(res.data && res.data.respCode != undefined && res.data.respCode === 'LE505'){
if (isMobile()) {
localStorage.removeItem('token')
return router.push('/phoneIndex')
}else {
window.sessionStorage.clear()
messageOnce.warning({
message: '登录超时,请重新登录',
type: 'warning'
})
if(webLoginType != null && webLoginType === 'idm' ) {
// idm 统一认证登录页面
return window.location.href = ssoLoginUrlDev
}else if(webLoginType != null && webLoginType === 'dev'){
return router.push('/login')
}
}
}
return res.data
},
error => {
// 登录超时
if (error.response.data.path === '/a/login' && store.state.isTimeOut === false) {
for (let key in store.state) {
if (key !== 'isTimeOut' && key !== 'laws_urm' && key !== 'laws_prm') {
store.state[key] = ''
}
}
Message.warning('登录超时,请重新登录')
router.push('/login')
store.state.isTimeOut = true
}
Message.warning('登录超时,请重新登录')
router.push('/login')
store.state.isTimeOut = true
}
})
})
export default service
+26 -1
View File
@@ -5,6 +5,11 @@
import base64 from './base64'
import dateFormat from './date'
import hasPermission from './hasPermission'
import preview from './preview'
import onlineEdit from './onlineEdit'
import onlinePreview from './onlinePreview'
import onlineEditPreview from './onlineEditPreview'
// 表单验证
import verify from './verify'
const install = function (Vue) {
@@ -31,7 +36,27 @@ const install = function (Vue) {
get () {
return hasPermission
}
}
},
$preview: {
get () {
return preview
}
},
$onlinePreview: {
get () {
return onlinePreview
}
},
$onlineEditPreview: {
get () {
return onlineEditPreview
}
},
$onlineEdit: {
get () {
return onlineEdit
}
},
})
}
export default {
+27
View File
@@ -0,0 +1,27 @@
import {Message} from 'element-ui'
// 私有属性,只在当前文件可用
const showMessage = Symbol('showMessage')
export default class domMessage {
success (options, single = true) {
this[showMessage]('success', options, single)
}
warning(options, single = true) {
this[showMessage]('warning', options, single)
}
info(options, single = true) {
this[showMessage]('info', options, single)
}
error(options, single = true) {
this[showMessage]('error', options, single)
}
[showMessage] (type, options, single) {
if (single) {
// 关键代码,判断当前页是否有el-message标签,如果没有则执行弹窗操作
if (document.getElementsByClassName('el-message').length === 0) {
Message[type](options)
}
} else {
Message[type](options)
}
}
}
+27
View File
@@ -0,0 +1,27 @@
/**
* 在线编辑
*/
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { processEditFile } from 'api/process'
let Base64 = require('js-base64').Base64;
export default (id,nodeName,userId,userName) => {
processEditFile({
id
}).then(res => {
if(res){
const editFileInfo = res
const showName = nodeName
const editFilePath = editFileInfo.editFilePath.split("/")
editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
editFileInfo.fileName = editFilePath[2]
editFileInfo.userId = userId
editFileInfo.userName = userName
if(editFileInfo.pid){
editFileInfo.pId = editFileInfo.pid
}
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/editor?pid='+editFileInfo.pId+'&taskIds='+editFileInfo.taskId+'&editType='+editFileInfo.editType+'&oldFileName=' + showName + '&fileType=' + 'docx' + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName+'&userId='+editFileInfo.userId+'&userName='+editFileInfo.userName)
}
}).catch(e => {
})
}
+29
View File
@@ -0,0 +1,29 @@
/**
* 工作流文件在线编辑预览
*/
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { processEditFile } from 'api/process'
let Base64 = require('js-base64').Base64;
export default (id,nodeName,userId,userName) => {
processEditFile({
id
}).then(res => {
if(res){
const editFileInfo = res
const showName = nodeName
const editFilePath = editFileInfo.editFilePath.split("/")
editFileInfo.filePath = editFilePath[0]+'/'+editFilePath[1]+'/'
editFileInfo.fileName = editFilePath[2]
editFileInfo.userId = userId
editFileInfo.userName = userName
if(editFileInfo.pid){
editFileInfo.pId = editFileInfo.pid
}
editFileInfo.fileSuffix = 'docx'
const nowTime = new Date().getTime()
window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + showName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
}
}).catch(e => {
})
}
+17
View File
@@ -0,0 +1,17 @@
/**
* 工作流文件预览
*/
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { processEditFile } from 'api/process'
let Base64 = require('js-base64').Base64;
export default id => {
processEditFile({
id
}).then(res => {
if(res){
const editFileInfo = res
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
}
}).catch(e => {
})
}
+26
View File
@@ -0,0 +1,26 @@
/**
* 文件预览
*/
import { onlyOfficeUrl,kkFileViewUrl } from '@/sysConfig'
import { getBusStandFileByAttId } from 'api/process'
let Base64 = require('js-base64').Base64;
export default attId => {
getBusStandFileByAttId({
attId
}).then(res => {
if(res){
const editFileInfo = res.data
if(editFileInfo.fileSuffix.toLowerCase() === 'pdg'){
window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
}else if(editFileInfo.fileSuffix.toLowerCase() === 'pdf'){
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
}else {
const nowTime = new Date().getTime()
// window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
window.open(kkFileViewUrl+'/onlinePreview?url='+encodeURIComponent(Base64.encode(editFileInfo.downLoadUrl)));
}
}
}).catch(e => {
})
}
@@ -15,6 +15,7 @@
format="yyyy-MM-dd"
:value="value"
type="date"
clearable
:editable="true"
:disabled="disabled"
:placeholder="placeholder"
@@ -74,5 +75,4 @@ export default {
</script>
<style scoped>
</style>
@@ -87,7 +87,7 @@ export default {
},
labelWidth: {
type: String,
default: '150px'
default: '210px'
}
},
components: {},
@@ -144,7 +144,9 @@ export default {
},
watch: {
value (val) {
this.tagList = val !== '' && val !== null ? val.split(',') : []
this.tagList = val !== '' && val !== null && val !== undefined? val.split(',') : []
// 把日期的时分秒去掉
this.tagList=this.tagList.map((item)=>item.substring(0,10))
},
tagList: {
handler (val) {
+56 -23
View File
@@ -22,13 +22,22 @@
v-if="reUpload || showUploadBtn">{{ uploadText || '重新上传' }}</el-button>
</ul>
<template style="margin-left: 105px;" v-else>
<ul class="file-file__wrap">
<li class="file-item"
v-for="(file, index) in showFileList"
:key="index"
:title="file.name"
@click="handlePreview(file)">
{{ file.name }}
</li>
</ul>
<el-button
size="small"
@click="clickButtonToUpload('opinionFileList')"
icon="el-icon-upload"
class="form-upload-btn"
>
{{ (value === 'null' || value === '' || value == null) && (!processModel || (processModel && !disabled)) ? '点击上传' : '查看已上传的文件' }}
<!-- {{ (value === 'null' || value === '' || value == null) && (!processModel || (processModel && !disabled)) ? '点击上传' : '查看已上传的文件' }}-->
</el-button>
</template>
<el-dialog
@@ -67,7 +76,9 @@
</template>
<script>
import { getConvertFileByAttId } from 'api/process'
import { onlyOfficeUrl } from '@/sysConfig'
import { getConvertFileByAttId,getBusStandFileByAttId } from 'api/process'
let Base64 = require('js-base64').Base64;
export default {
name: 'CustomFile',
data() {
@@ -95,7 +106,7 @@ export default {
allowType: {
type: Array,
default: () => {
return ['.pdf', '.PDF', '.doc','.DOC', '.docx','.DOCX', '.pptx', '.PPTX', '.ppt', '.PPT', '.jpg','.JPG','.jpeg','.JPEG', '.PNG', '.png', '.xls','.XLS', '.xlsx','.XLSX']
return ['.pdf', '.PDF', '.doc','.DOC', '.docx','.DOCX', '.pptx', '.PPTX', '.ppt', '.PPT', '.xls','.XLS', '.xlsx','.XLSX']
}
},
// 栅格比例
@@ -151,6 +162,7 @@ export default {
}
},
mounted() {
this.getShowFileList()
if (this.showFileModel) {
this.getShowFileList()
}
@@ -255,7 +267,11 @@ export default {
},
uploadSuccess(res, file, fileList) {
if (res.ok) {
// this.value += res.data.id + ','
let obj = {name: '', response: {}}
obj.name = file.response.data.oldFileName
obj.response.data = file.response.data
this.showFileList.push(obj)
// this.value += res.data.id + ','
this.$emit('input', this.value ? this.value + ','+ res.data.id + ',' : this.value+ res.data.id + ',')
this.$emit('success')
this.$message({
@@ -302,7 +318,6 @@ export default {
this.$emit('input', '')
}
}
const showFileList = []
fileList.map(item => {
let obj = {name: '', response: {}}
@@ -335,29 +350,32 @@ export default {
handlePreview(file) {
const attId = file.response.data.id
if (this.preview) {
this.getConvertFileByAttId(attId)
.then(res => {
switch (res.convertState) {
case 'ERROR':
this.$message.warning('文档转换失败')
break
case 'LODING':
this.$message.info('文档转换中,请稍后查看')
break
case 'SUCCESS':
const { convertFileInfo } = res
window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + convertFileInfo.id))
break
}
}).catch(e => {
this.$message.warning('文档转换失败')
})
} else {
if (attId) {
window.location.href = '/api/att/attFile/downloadFileForSar?fileId=' + attId
} else {
this.$message.warning('文件不存在,下载失败')
}
} else {
this.$preview(attId)
// this.getBusStandFileByAttId(attId)
// .then(res => {
// console.log(res)
// if(res){
// const editFileInfo = res
// console.log(editFileInfo)
// if(editFileInfo.fileSuffix === 'pdg' || editFileInfo.fileSuffix === 'PDG'){
// window.open('book://ssreader/e0?url='+editFileInfo.downLoadUrl)
// }else if(editFileInfo.fileSuffix === 'pdf' || editFileInfo.fileSuffix === 'PDF'){
// window.open('/static/pdf/web/viewer.html?file=' + encodeURIComponent('/api/att/attFile/getFileInfo?fileId=' + editFileInfo.id))
// }else {
// const nowTime = new Date().getTime()
// window.open(onlyOfficeUrl+'/onlyOffice?oldFileName=' + editFileInfo.oldFileName + '&fileType=' + editFileInfo.fileSuffix + '&attId=' + editFileInfo.id + '&fileUrl=' + editFileInfo.downLoadUrl + '&key=' + editFileInfo.id + nowTime+'&filePath='+editFileInfo.filePath+'&fileName='+editFileInfo.fileName)
// }
// }
// }).catch(e => {
// console.log(e)
// this.$message.warning('文件不存在,预览失败')
// })
}
},
@@ -377,6 +395,21 @@ export default {
})
})
},
getBusStandFileByAttId(attId) {
return new Promise((resolve, reject) => {
getBusStandFileByAttId({
attId
}).then(res => {
if (res.ok) {
resolve(res.data)
} else {
reject()
}
}).catch(e => {
reject(e)
})
})
},
/**
* @description: 获取展示的文件
+14 -2
View File
@@ -12,6 +12,9 @@
:value="value"
:placeholder="placeholder"
:disabled="disabled"
type="textarea"
resize="none"
:autosize="true"
clearable
@input="handleChange"
></el-input>
@@ -63,6 +66,15 @@ export default {
}
</script>
<style scoped>
<style lang="less" scoped>
.add-form-item{
/deep/.el-form-item__content{
.el-textarea{
width: calc(~'100% - 90px');
}
}
}
/deep/.el-dialog__body{
padding: 15px 20px;
}
</style>
@@ -5,6 +5,7 @@
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item"
style="width: 100%;"
:class="{'form-item-disabled': disabled}"
>
<el-input
@@ -20,6 +21,7 @@
size="mini"
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
:disabled="disabled"
v-if="(processModel && !disabled) || !processModel"
>{{config.attrField === 'releventStand' ? '选择标准' :'手动查找'}}</el-button>
</el-form-item>
@@ -42,7 +44,7 @@
v-model="replaceLawsNumForm.standType"
placeholder="请选择"
>
<el-option value="ALL" label="全部"></el-option>
<el-option value="" label="全部"></el-option>
<el-option value="INLAND" label="国内"></el-option>
<el-option value="FOREIGN" label="海外"></el-option>
</el-select>
@@ -125,8 +127,8 @@
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
<el-button class="common-button-default" round size="mini" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round size="mini" class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
@@ -176,7 +178,7 @@ export default {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'ALL',
standType: '',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
@@ -0,0 +1,382 @@
<template>
<div>
<el-form-item
:label="config.attrName"
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item"
style="width: 100%;"
:class="{'form-item-disabled': disabled}"
>
<el-input
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
@input="handleChange"
></el-input>
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
:disabled="disabled"
v-if="(processModel && !disabled) || !processModel"
>{{config.attrField === 'releventStand' ? '选择标准' :'手动查找'}}</el-button>
</el-form-item>
<el-dialog
:title="config.attrName"
:visible.sync="replaceLawsNumModel"
width="1000px"
:close-on-click-modal="false"
@close="replaceLawsNumModelCancel"
:append-to-body="true"
>
<div class="search-area">
<div class="left">
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form">
<el-form-item label="标准编号" class="search-item">
<el-input v-model="replaceLawsNumForm.standNumber" placeholder="根据标准编号查找" clearable :maxlength="100"></el-input>
</el-form-item>
<el-form-item label="标准名称" class="search-item">
<el-input v-model="replaceLawsNumForm.standName" placeholder="根据标准名称查找" clearable :maxlength="100"></el-input>
</el-form-item>
<el-form-item label="国内/海外" class="search-item">
<el-select
v-model="replaceLawsNumForm.standType"
placeholder="请选择"
>
<el-option v-if="enterpriseStandard" value="1" label="企标"></el-option>
<el-option value="INLAND" label="国内"></el-option>
<el-option value="FOREIGN" label="海外"></el-option>
</el-select>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
type="primary"
class="common-button-primary"
size="mini"
@click="getReplaceLawsNumRowInfo">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
size="mini"
type="default"
@click="getResetLawsNumRow">
清空
</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-table
ref="selections"
:data="replaceLawsNumRow"
tooltip-effect="dark"
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
border
:height="300"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="selectReplaceStandNumRowChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
label="标准编号"
show-overflow-tooltip
width="130">
<template slot-scope="scope">
<a class="table-jump" v-if="scope.row.standYear" @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a class="table-jump" v-else @click="handlePreview(scope.row)">{{ scope.row.standSort }} {{ scope.row.standNumber }}</a>
</template>
</el-table-column>
<el-table-column
prop="standName"
show-overflow-tooltip
label="标准名称">
<template slot-scope="scope">
<a class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standName }}</a>
</template>
</el-table-column>
<el-table-column
prop="issueTime"
show-overflow-tooltip
label="发布日期"
width="130">
</el-table-column>
<el-table-column
label="实施日期"
show-overflow-tooltip
width="130">
<template slot-scope="scope">
<span v-if="scope.row.standType === 'INLAND' || scope.row.standType === 'FOREIGN'">{{ scope.row.ssrq }}</span>
<span v-else>{{ scope.row.putTime }}</span>
</template>
</el-table-column>
<el-table-column
label="文本状态"
show-overflow-tooltip
width="130">
<template slot-scope="scope">
<span v-if="scope.row.standType === 'INLAND' || scope.row.standType === 'FOREIGN'">{{ textStatusMap[scope.row.textStatus] }}</span>
<span v-else>{{ scope.row.standStatusShow }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
<!--分页-->
<pagination
style="position: relative;"
:page="replacePage"
:total="replaceTotal"
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
</div>
</template>
<script>
export default {
name: 'CustomInput',
props: {
config: {
type: Object,
required: true
},
value: {
required: true
},
disabled: {
type: Boolean,
default: false
},
// 栅格比例
span: {
type: Number,
default: 24
},
// 是否为流程中使用
processModel: {
type: Boolean,
default: false
},
// label宽度
labelWidth: {
type: String,
default: '150px'
},
placeholderText: {
type: String
},
enterpriseStandard: {
type: Boolean,
default: false
}
},
data () {
return {
textStatusMap: {},
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
},
// 代替标准号
replaceLawsNumForm: {
standNumber: '', // 政策编号
standName: '',
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'INLAND',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
},
replaceLawsNumRow: [], // 代替政策号 数组内容
replaceTotal: 0,
selectedListRep: [],
replaceLoading: true,
replacePage: 1
}
},
computed: {
placeholder () {
if (this.placeholderText){
return `${this.placeholderText}`
} else {
return `请输入${this.config.attrName}`
}
},
showMessage () {
return `${this.config.attrName}不能为空`
},
isRequired () {
return !!this.config.isMust
}
},
methods: {
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
handleChange (event) {
const value = event
this.$emit('input', value)
},
selectLaws () {
this.replaceLawsNumModel = true
this.getReplaceLawsNumRow()
},
getReplaceLawsNumRowInfo() {
this.replaceLawsNumForm.page = 1
this.getReplaceLawsNumRow()
},
// 代替政策号 请求数据
getReplaceLawsNumRow () {
if (this.replaceLawsNumForm.standType === '1') {
let json = {}
json = this.replaceLawsNumForm
json.userId = this.$store.getters.userInfo.userId
json.standCode = this.replaceLawsNumForm.standNumber
this.$http.get('lawss/sarBussionessStand/getSarBussionStandPage', json, {
_this: this, loading: 'replaceLoading'
}, res => {
this.replaceLawsNumRow = res.data.list
this.replaceTotal = res.data.count
}, e => {
})
} else {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
this.quoteIdList1 = []
this.replaceLawsNumForm.quoteIdList = ''
}
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.replaceLawsNumForm, {
_this: this,
loading: 'replaceLoading'
}, res => {
this.replaceLawsNumRow = res.data.list
this.replaceTotal = res.data.count
}, e => {
})
}
},
// 代替政策编号-取消
replaceLawsNumModelCancel () {
this.$refs.selections.clearSelection()
},
// 代替政策号 table选择事件
selectReplaceStandNumRowChange (row) {
this.selectedListRep = row
},
// 代替政策分页
pageChangeReplace (page) {
this.replacePage = page
this.replaceLawsNumForm.page = page
this.getReplaceLawsNumRow()
},
pageSizeChangeReplace (pageSize) {
// this.replaceRows = pageSize
this.replaceLawsNumForm.pageSize = pageSize
this.getReplaceLawsNumRow()
},
// 代替政策编号确定
replaceLawsNumModelBt () {
let textArr = []
if (typeof this.value === 'string') {
if (this.value) {
textArr = this.value.split(',')
}
}
if (this.selectedListRep.length === 0) {
return this.$message({
message: '请先选择数据',
type: 'warning'
})
}
if (this.selectedListRep.length + textArr.length > 20) {
return this.$message({
message: '代替标准号最多选择20项',
type: 'warning'
})
}
this.selectedListRep.map((item) => {
let texts = ''
if (item.standYear != null && item.standYear !== '') {
texts = item.standSort !== null ? item.standSort + ' ' + item.standNumber + '-' + item.standYear : item.standNumber + '-' + item.standYear
} else {
texts = item.standSort !== null ? item.standSort + ' ' + item.standNumber : item.standNumber
}
textArr.push(texts)
textArr = [...new Set(textArr)]
this.replaceLawsNumModel = false
})
this.$emit('input', textArr.join(','))
this.$refs.selections.clearSelection()
},
// 点击查看
handlePreview (item) {
if (item.standType === 'INLAND' || item.standType === 'FOREIGN') {
let pageType = item.standType === 'INLAND' ? 'INLAND_STAND' : 'FOREIGN_STAND'
let routeUrl = this.$router.resolve({
name: 'OtherStandardDetails',
params: {
id: item.id,
pageType: pageType
}
})
window.open(routeUrl.href, '_blank')
} else {
let routeUrl = this.$router.resolve({
name: 'OtherBussStandardDetails',
params: {
id: item.id,
pageType: 'BUSINESS_STAND'
}
})
window.open(routeUrl.href, '_blank')
}
},
getResetLawsNumRow () {
this.replaceLawsNumForm = {
standNumber: '', // 政策编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'INLAND',
quoteIdList: '',
validFlag: '0'
}
this.getReplaceLawsNumRow()
}
},
mounted() {
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.setMap(res.data.WBZTCLASS)
}, e => {
})
}
}
</script>
<style scoped>
</style>
@@ -38,13 +38,20 @@
<div class="search-area">
<div class="left">
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form" @keyup.enter.native="getReplaceLawsNumRowFirst">
<el-form-item label="编号/名称" class="search-item">
<el-form-item label="标准编号" class="search-item">
<el-input
v-model="replaceLawsNumForm.standNumber"
placeholder="根据编号/名称查找"
placeholder="根据标准编号查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="标准名称" class="search-item">
<el-input
v-model="replaceLawsNumForm.standName"
placeholder="根据标准名称查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="标准来源" class="search-item" v-if="dataSource">
<el-select
v-model="replaceLawsNumForm.standType"
@@ -55,20 +62,21 @@
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
size="mini"
@click="getReplaceLawsNumRowFirst(true)">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
size="mini"
type="default"
@click="getResetLawsNumRow"></el-button>
@click="getResetLawsNumRow">
清空
</el-button>
</el-form-item>
</el-form>
</div>
@@ -97,6 +105,7 @@
</el-table-column>
<el-table-column
prop="standName"
min-width="300"
label="标准名称">
</el-table-column>
<el-table-column
@@ -106,9 +115,12 @@
<template slot-scope="scope">{{ ['已发布', 'TBD', ''].includes(scope.row.issueTime) ? scope.row.issueTime : $moment(scope.row.issueTime).format('YYYY-MM-DD') }}</template>
</el-table-column>
<el-table-column
prop="standStateShow"
label="标准状态"
prop="textStatus"
label="文本状态"
width="130">
<template slot-scope="scope">
<span>{{ textStatusMap[scope.row.textStatus] }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
@@ -120,8 +132,8 @@
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" round icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
@@ -168,6 +180,8 @@ export default {
},
data () {
return {
textStatus:'',//文本状态
textStatusMap: {}, // 文本状态id与name对应
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
@@ -175,10 +189,11 @@ export default {
// 代替标准号
replaceLawsNumForm: {
standNumber: '', // 标准编号
standName: '', // 标准编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'ALL',
standType: 'INLAND',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
@@ -203,7 +218,22 @@ export default {
return !!this.config.isMust
}
},
mounted() {
//从数据库中查询下拉框数据
this.$http.get("sys/dictype/getDicTypeListCode", {}, {
_this: this
}, res => {
this.standStateOptions = res.data.WBZTCLASS; // 文本状态
this.setMap(this.standStateOptions);
});
},
methods: {
// 将文本状态的id与name对应
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
handleChange (event) {
// const value = event.target.value
const value = event
@@ -256,6 +286,11 @@ export default {
this.quoteIdList1 = []
this.replaceLawsNumForm.quoteIdList = ''
}
if (this.config.attrField === 'CBBH') {
this.replaceLawsNumForm.standType = 'FOREIGN'
} else {
this.replaceLawsNumForm.standType = ''
}
// this.replaceLawsNumForm.standType = this.config.attrField === 'CBBH' ? 'FOREIGN' : 'INLAND'
this.$http.get('sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage', this.replaceLawsNumForm, {
_this: this,
@@ -362,10 +397,11 @@ export default {
this.replacePage = 1
this.replaceLawsNumForm = {
standNumber: '', // 标准编号
standName: '', // 标准编号
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'ALL',
standType: 'INLAND',
quoteIdList: '',
validFlag: '0'
}
@@ -376,6 +412,9 @@ export default {
</script>
<style scoped lang="less">
/deep/.el-dialog__body{
padding: 15px 20px;
}
.add-form-item{
/deep/.el-form-item__content{
.el-textarea{
@@ -1,150 +1,166 @@
<template>
<!-- <div>-->
<!-- <div>-->
<el-col :span="span">
<el-form-item
:label="config.attrName"
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item leftButton"
:class="{'form-item-disabled': disabled}"
:label="config.attrName"
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item leftButton"
:class="{'form-item-disabled': disabled}"
>
<el-input
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
@input="handleChange"
type="textarea"
resize="none"
:autosize="true"
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
@input="handleChange"
></el-input>
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
v-if="(processModel && !disabled) || !processModel"
>手动查找</el-button>
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
v-if="(processModel && !disabled) || !processModel"
>手动查找
</el-button>
</el-form-item>
<el-dialog
:title="config.attrName"
:visible.sync="replaceLawsNumModel"
width="875px"
:close-on-click-modal="false"
@close="replaceLawsNumModelCancel"
:append-to-body="true"
:title="config.attrName"
:visible.sync="replaceLawsNumModel"
width="875px"
:close-on-click-modal="false"
@close="replaceLawsNumModelCancel"
:append-to-body="true"
>
<div class="search-area">
<div class="left">
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form" @keyup.enter.native="getReplaceLawsNumRowSearch">
<el-form-item label="数据来源" class="search-item">
<el-select v-model="replaceLawsNumForm.dataSource" filterable>
<el-option
v-for="item in dataSourceOptions"
:key="item.value"
:value="item.value"
:label="item.label"
>
</el-option>
</el-select>
</el-form-item>
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form"
@keyup.enter.native="getReplaceLawsNumRowSearch">
<!-- <el-form-item label="数据来源" class="search-item">-->
<!-- <el-select v-model="replaceLawsNumForm.dataSource" filterable>-->
<!-- <el-option-->
<!-- v-for="item in dataSourceOptions"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="企标编号/标准名称" class="search-item input-width">
<el-input
v-model="replaceLawsNumForm.numberName"
placeholder="根据企标编号/标准名称查找"
clearable
:maxlength="100"></el-input>
v-model="replaceLawsNumForm.numberName"
placeholder="根据企标编号/标准名称查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
@click="getReplaceLawsNumRowSearch">
type="primary"
class="common-button-primary"
round
@click="getReplaceLawsNumRowSearch">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
type="default"
@click="getResetLawsNumRow"></el-button>
class="common-button-default"
round
type="default"
@click="getResetLawsNumRow">
清空
</el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-table
ref="selections"
:data="replaceLawsNumRow"
tooltip-effect="dark"
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
border
:height="300"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
ref="selections"
:data="replaceLawsNumRow"
tooltip-effect="dark"
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
border
:height="300"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="selectReplaceStandNumRowChange">
@selection-change="selectReplaceStandNumRowChange">
<el-table-column
type="selection"
width="55"
align="center">
type="selection"
width="55"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- min-width="130"-->
<!-- >-->
<!-- </el-table-column>-->
<!-- <el-table-column-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- min-width="130"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
label="企标编号"
min-width="130">
label="企标编号"
min-width="130">
<template slot-scope="scope">
<span v-if="dataSource === 'BUSINESS'">
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standCode }}-{{ scope.row.standYear }}</a>
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{
scope.row.standCode
}}</a>
<a v-else class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standCode }}</a>
</span>
<span v-else>
<a v-if="scope.row.standYear" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}-{{ scope.row.standYear }}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{ scope.row.standSortShow }} {{ scope.row.standNumber }}</a>
<a v-if="scope.row.standYear" class="table-jump"
@click="handlePreview(scope.row)">{{ scope.row.standSortShow }} {{
scope.row.standNumber
}}</a>
<a v-else @click="handlePreview(scope.row)" class="table-jump">{{
scope.row.standSortShow
}}</a>
</span>
</template>
</el-table-column>
<el-table-column
prop="standName"
label="标准名称"
min-width="130">
prop="standName"
label="标准名称"
min-width="130">
</el-table-column>
<el-table-column
prop="issueTime"
label="发布日期"
width="130">
prop="issueTime"
label="发布日期"
width="130">
</el-table-column>
<el-table-column
prop="putTime"
label="实施日期"
width="130">
prop="putTime"
label="实施日期"
width="130">
</el-table-column>
<el-table-column
prop="standStateShow"
label="标准状态"
width="130">
prop="standStatusShow"
label="文本状态"
width="130">
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
<loading :loading="replaceLoading">{{ $t('m.dataAcquisition') }}</loading>
<!--分页-->
<pagination
style="position: relative;"
:page="replacePage"
:total="replaceTotal"
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
style="position: relative;"
:page="replacePage"
:total="replaceTotal"
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
<el-button class="common-button-default" round icon="el-icon-close" @click="replaceLawsNumModel = false">取消
</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check"
@click="replaceLawsNumModelBt">提交
</el-button>
</div>
</el-dialog>
</el-col>
<!-- </div>-->
<!-- </div>-->
</template>
@@ -179,7 +195,7 @@ export default {
default: '150px'
}
},
data () {
data() {
return {
replaceLawsNumModel: false,
sarBussionessLawsEO: {
@@ -211,28 +227,28 @@ export default {
}
},
computed: {
placeholder () {
placeholder() {
return `请输入${this.config.attrName}`
},
showMessage () {
showMessage() {
return `${this.config.attrName}不能为空`
},
isRequired () {
isRequired() {
return !!this.config.isMust
}
},
methods: {
getReplaceLawsNumRowSearch () {
getReplaceLawsNumRowSearch() {
this.replaceLawsNumForm.page = 1
this.replacePage = 1
this.getReplaceLawsNumRow()
},
handleChange (event) {
handleChange(event) {
// const value = event.target.value
const value = event
this.$emit('input', value)
},
selectLaws () {
selectLaws() {
// if (this.standNumFlag === 1) {
// this.$refs.selections.selectAll(false)
// }
@@ -241,7 +257,7 @@ export default {
this.getReplaceLawsNumRow()
},
//
getReplaceLawsNumRow () {
getReplaceLawsNumRow() {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
@@ -256,7 +272,7 @@ export default {
formData.standType = this.replaceLawsNumForm.dataSource === 'INLAND_STAND' ? 'INLAND'
: this.replaceLawsNumForm.dataSource === 'FOREIGN_STAND' ? 'FOREIGN' : ''
formData.standNumber = formData.numberName
let url = this.replaceLawsNumForm.dataSource === 'BUSINESS' ? 'lawss/sarBussionessStand/getSarBussionStandPage' : 'sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage'
let url = this.replaceLawsNumForm.dataSource === 'BUSINESS' ? 'lawss/sarBussionessStand/getSarBussionStandPage' : 'sarStandardsInfo/sar-standards-info/getSarStandardsInfoPage'
this.$http.get(url, formData, {
_this: this,
loading: 'replaceLoading'
@@ -276,27 +292,27 @@ export default {
})
},
// -
replaceLawsNumModelCancel () {
replaceLawsNumModelCancel() {
// this.replaceLawsNumModel = false
this.$refs.selections.clearSelection()
},
// table
selectReplaceStandNumRowChange (row) {
selectReplaceStandNumRowChange(row) {
this.selectedListRep = row
},
//
pageChangeReplace (page) {
pageChangeReplace(page) {
this.replacePage = page
this.replaceLawsNumForm.page = page
this.getReplaceLawsNumRow()
},
pageSizeChangeReplace (pageSize) {
pageSizeChangeReplace(pageSize) {
// this.replaceRows = pageSize
this.replaceLawsNumForm.pageSize = pageSize
this.getReplaceLawsNumRow()
},
//
replaceLawsNumModelBt () {
replaceLawsNumModelBt() {
let textArr = []
if (typeof this.value === 'string') {
@@ -341,7 +357,7 @@ export default {
this.$refs.selections.clearSelection()
},
//
handlePreview (item) {
handlePreview(item) {
let name = ''
let pageType = ''
switch (this.dataSource) {
@@ -368,7 +384,7 @@ export default {
window.open(routeUrl.href, '_blank')
},
getResetLawsNumRow () {
getResetLawsNumRow() {
this.replaceLawsNumForm = {
dataSource: 'BUSINESS',
numberName: '', //
@@ -386,13 +402,23 @@ export default {
</script>
<style scoped lang="less">
/deep/.el-dialog__body {
padding: 0 20px 0;
}
/deep/.el-dialog__footer {
padding: 0 20px 20px;
}
/deep/.input-width input.el-input__inner {
width: 220px;
/deep/ .el-dialog__body {
padding: 0 20px 0;
}
/deep/ .el-dialog__footer {
padding: 0 20px 20px;
}
.add-form-item {
/deep/ .el-form-item__content {
.el-textarea {
width: calc(~'100% - 90px');
}
}
}
/deep/ .input-width input.el-input__inner {
width: 220px;
}
</style>
@@ -9,11 +9,14 @@
:class="{'form-item-disabled': disabled}"
>
<el-input
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
@input="handleChange"
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
type="textarea"
resize="none"
:autosize="true"
@input="handleChange"
></el-input>
<el-button
type="primary"
@@ -49,20 +52,21 @@
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
size="mini"
class="common-button-primary"
round
@click="getReplaceLawsNumRow(true)">
查询
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
type="default"
@click="getResetLawsNumRow"></el-button>
size="mini"
@click="getResetLawsNumRow">
清空
</el-button>
</el-form-item>
</el-form>
</div>
@@ -93,7 +97,7 @@
<el-table-column
prop="standName"
label="标准名称"
width="130">
min-width="300" >
</el-table-column>
<el-table-column
prop="issueTime"
@@ -112,9 +116,14 @@
width="130">
</el-table-column>
<el-table-column
prop="standStateShow"
label="标准状态"
prop="textStatus"
label="文本状态"
width="130">
<template slot-scope="scope">
<span>
{{ textStatusMap[scope.row.textStatus] }}
</span>
</template>
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
@@ -126,8 +135,8 @@
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" round icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
@@ -178,6 +187,8 @@ export default {
},
data() {
return {
textStatus:'',//
textStatusMap: {}, // idname
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
@@ -188,7 +199,7 @@ export default {
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
standType: 'ALL',
standType: 'FOREIGN',
quoteIdList: '',
validFlag: '0',
menuId: 'nomenu'
@@ -213,6 +224,12 @@ export default {
}
},
methods: {
// idname
setMap(data) {
data.forEach(item => {
this.$set(this.textStatusMap, item.value, item.label)
})
},
handleChange (event) {
// const value = event.target.value
const value = event
@@ -336,6 +353,17 @@ export default {
this.getReplaceLawsNumRow()
}
},
async mounted () {
//
this.$http.get('sys/dictype/getDicTypeListCode', '', {
_this: this
}, res => {
this.standStateOptions = res.data.WBZTCLASS //
this.setMap(this.standStateOptions)
}, e => {
console.log("error");
})
},
watch: {
dataSourceFrom: {
handler (val) {
@@ -346,6 +374,16 @@ export default {
}
</script>
<style scoped>
<style lang="less" scoped>
.add-form-item{
/deep/.el-form-item__content{
.el-textarea{
width: calc(~'100% - 90px');
}
}
}
/deep/.el-dialog__body{
padding: 15px 20px;
}
</style>
@@ -0,0 +1,390 @@
<template>
<!-- <div>-->
<el-col :span="span">
<el-form-item
:label="config.attrName"
:prop="config.attrField"
:label-width="labelWidth"
class="add-form-item leftButton"
:class="{'form-item-disabled': disabled}"
>
<el-input
:value="value"
:placeholder="placeholder"
:disabled="disabled"
clearable
@input="handleChange"
></el-input>
<el-button
type="primary"
class="common-button-primary"
size="mini"
style="position:absolute;top: 10px;right: 0;"
@click="selectLaws"
v-if="(processModel && !disabled) || !processModel"
>手动查找</el-button>
</el-form-item>
<el-dialog
:title="config.attrName"
:visible.sync="replaceLawsNumModel"
width="875px"
:close-on-click-modal="false"
@close="replaceLawsNumModelCancel"
:append-to-body="true"
>
<div class="search-area">
<div class="left">
<el-form :modal="replaceLawsNumForm" :inline="true" class="label-input-form" @keyup.enter.native="getReplaceLawsNumRowSearch">
<!-- <el-form-item label="数据来源" class="search-item">-->
<!-- <el-select v-model="replaceLawsNumForm.dataSource" filterable>-->
<!-- <el-option-->
<!-- v-for="item in dataSourceOptions"-->
<!-- :key="item.value"-->
<!-- :value="item.value"-->
<!-- :label="item.label"-->
<!-- >-->
<!-- </el-option>-->
<!-- </el-select>-->
<!-- </el-form-item>-->
<el-form-item label="政策编号" class="search-item input-width">
<el-input
v-model="replaceLawsNumForm.lawsNumber"
placeholder="根据政策编号查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item label="政策名称" class="search-item input-width">
<el-input
v-model="replaceLawsNumForm.numberName"
placeholder="根据政策名称查找"
clearable
:maxlength="100"></el-input>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
icon="el-icon-search"
type="primary"
class="common-button-primary"
round
@click="getReplaceLawsNumRowSearch">
</el-button>
</el-form-item>
<el-form-item class="search-item btn-box">
<el-button
class="common-button-default"
icon="el-icon-refresh-left"
round
type="default"
@click="getResetLawsNumRow"></el-button>
</el-form-item>
</el-form>
</div>
</div>
<el-table
ref="selections"
:data="replaceLawsNumRow"
tooltip-effect="dark"
style="width: 100%;overflow-y: auto;overflow-x: hidden;"
border
:height="300"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="selectReplaceStandNumRowChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<!-- <el-table-column-->
<!-- prop="standSortShow"-->
<!-- label="企标类别"-->
<!-- min-width="130"-->
<!-- >-->
<!-- </el-table-column>-->
<el-table-column
label="政策编号"
min-width="130">
<template slot-scope="scope">
<span>
<a v-if="scope.row.lawsNumber" class="table-jump" @click="handlePreview(scope.row)">{{ scope.row.lawsNumber }}</a>
</span>
</template>
</el-table-column>
<el-table-column
prop="lawsName"
label="中文名称"
min-width="130">
</el-table-column>
<el-table-column
prop="lawsName"
label="英文名称"
min-width="130">
</el-table-column>
<el-table-column
prop="issueTime"
label="发文日期"
width="130">
<template slot-scope="scope">{{ $moment(scope.row.issueTime).format('YYYY-MM-DD') }}</template>
</el-table-column>
<el-table-column
prop="standStatusShow"
label="文本状态"
width="130">
</el-table-column>
</el-table>
<loading :loading="replaceLoading">{{$t('m.dataAcquisition')}}</loading>
<!--分页-->
<pagination
style="position: relative;"
:page="replacePage"
:total="replaceTotal"
@pageChange="pageChangeReplace"
@pageSizeChange="pageSizeChangeReplace"></pagination>
<div slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" round icon="el-icon-close" @click="replaceLawsNumModel = false">取消</el-button>
<el-button type="primary" round class="common-button-primary" icon="el-icon-check" @click="replaceLawsNumModelBt">提交</el-button>
</div>
</el-dialog>
</el-col>
<!-- </div>-->
</template>
<script>
export default {
name: 'CustomInput',
props: {
config: {
type: Object,
required: true
},
value: {
required: true
},
disabled: {
type: Boolean,
default: false
},
//
span: {
type: Number,
default: 24
},
// 使
processModel: {
type: Boolean,
default: false
},
// label
labelWidth: {
type: String,
default: '150px'
}
},
data () {
return {
replaceLawsNumModel: false,
sarBussionessLawsEO: {
replaceLawsNum: ''
},
//
replaceLawsNumForm: {
dataSource: 'BUSINESS', //
lawsNumber: '', //
numberName: '', //
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
quoteIdList: '',
menuId: '',
validFlag: 0
},
replaceLawsNumRow: [], //
replaceTotal: 0,
selectedListRep: [],
replaceLoading: true,
replacePage: 1,
// list
dataSourceOptions: [
{value: 'INLAND_STAND', label: '国内标准法规'},
{value: 'FOREIGN_STAND', label: '海外标准法规'},
{value: 'BUSINESS', label: '企业标准 '},
{value: 'LAWS_STAND', label: '国内外政策'}
],
dataSource: 'LAWS_STAND'
}
},
computed: {
placeholder () {
return `请输入${this.config.attrName}`
},
showMessage () {
return `${this.config.attrName}不能为空`
},
isRequired () {
return !!this.config.isMust
}
},
methods: {
getReplaceLawsNumRowSearch () {
this.replaceLawsNumForm.page = 1
this.replacePage = 1
this.getReplaceLawsNumRow()
},
handleChange (event) {
// const value = event.target.value
const value = event
this.$emit('input', value)
},
selectLaws () {
// if (this.standNumFlag === 1) {
// this.$refs.selections.selectAll(false)
// }
// this.sarBussionessLawsEO.replaceLawsNum = ''
this.replaceLawsNumModel = true
this.getReplaceLawsNumRow()
},
//
getReplaceLawsNumRow () {
if (this.sarBussionessLawsEO.replaceLawsNum !== null && this.sarBussionessLawsEO.replaceLawsNum !== '') {
this.replaceLawsNumForm.quoteIdList = this.quoteIdList1.toString() === '' ? '' : this.quoteIdList1
} else {
this.quoteIdList1 = []
this.replaceLawsNumForm.quoteIdList = ''
}
const formData = {
...this.replaceLawsNumForm
}
let url = 'lawss/sarLawsInfo/page'
this.$http.get(url, formData, {
_this: this,
loading: 'replaceLoading'
}, res => {
this.replaceLawsNumRow = res.data.list
this.replaceTotal = res.data.count
if (this.selectedListRep.length !== 0) {
this.selectedListRep.map((list) => {
this.replaceLawsNumRow.map((item) => {
if (list.id === item.id) {
item._checked = true
}
})
})
}
}, e => {
})
},
// -
replaceLawsNumModelCancel () {
// this.replaceLawsNumModel = false
this.$refs.selections.clearSelection()
},
// table
selectReplaceStandNumRowChange (row) {
this.selectedListRep = row
},
//
pageChangeReplace (page) {
this.replacePage = page
this.replaceLawsNumForm.page = page
this.getReplaceLawsNumRow()
},
pageSizeChangeReplace (pageSize) {
// this.replaceRows = pageSize
this.replaceLawsNumForm.pageSize = pageSize
this.getReplaceLawsNumRow()
},
//
replaceLawsNumModelBt () {
let textArr = []
if (typeof this.value === 'string') {
if (this.value) {
textArr = this.value.split(',')
}
}
if (this.selectedListRep.length === 0) {
return this.$message({
message: '请先选择数据',
type: 'warning'
})
}
if (this.selectedListRep.length + textArr.length > 20) {
return this.$message({
message: '代替文件号最多选择20项',
type: 'warning'
})
}
this.selectedListRep.map((item) => {
let texts = ''
//
if (this.dataSource === 'LAWS_STAND') {
texts = item.lawsNumber
}
textArr.push(texts)
textArr = [...new Set(textArr)]
this.replaceLawsNumModel = false
})
// this.SarLawsInfoEO.replaceLawsNum = textArr.join(',')
this.$emit('input', textArr.join(','))
this.$refs.selections.clearSelection()
},
//
handlePreview (item) {
let name = ''
let pageType = ''
switch (this.dataSource) {
case 'INLAND_STAND':
name = 'OtherStandardDetails'
pageType = 'INLAND_STAND'
break
case 'FOREIGN_STAND':
name = 'OtherStandardDetails'
pageType = 'FOREIGN_STAND'
break
case 'BUSINESS':
name = 'OtherBussStandardDetails'
pageType = 'BUSINESS_STAND'
break
case 'LAWS_STAND':
name = 'OtherLawsStandDetails'
pageType = 'LAWS_STAND'
break
}
let routeUrl = this.$router.resolve({
name: name,
params: {
id: item.id,
pageType: pageType
}
})
window.open(routeUrl.href, '_blank')
},
getResetLawsNumRow () {
this.replaceLawsNumForm = {
lawsNumber: '', //
numberName: '', //
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
validFlag: '0'
}
this.getReplaceLawsNumRow()
}
}
}
</script>
<style scoped lang="less">
/deep/.el-dialog__body {
padding: 0 20px 0;
}
/deep/.el-dialog__footer {
padding: 0 20px 20px;
}
/deep/.input-width input.el-input__inner {
width: 220px;
}
</style>
@@ -12,6 +12,7 @@
:placeholder="placeholder"
:disabled="disabled"
clearable
filterable
@change="handleChange"
>
<el-option
@@ -10,11 +10,15 @@
<el-select
v-model="valueArr"
:placeholder="placeholder"
filterable
:disabled="disabled"
clearable
multiple
@change="handleChange"
>
<el-option value="全选" @click.native="clickOption" v-if="options.length > 0">
{{ checkAll ? '取消全选' : '全选' }}
</el-option>
<el-option
v-for="opt in options"
:key="opt.value"
@@ -51,7 +55,8 @@ export default {
},
data () {
return {
valueArr: []
valueArr: [],
checkAll: false,
}
},
computed: {
@@ -69,9 +74,33 @@ export default {
}
},
methods: {
clickOption () {
this.checkAll = !this.checkAll
if (this.checkAll) {
let list = []
this.config.options.map(item => {
this.valueArr.push(item.value)
list.push(item.value)
})
this.$emit('input', list)
} else {
this.valueArr = []
this.$emit('input', this.valueArr)
}
},
handleChange (event) {
// const value = event.target.value
this.$emit('input', event)
if (event.includes('全选')) {
return
} else {
if (event.length === this.config.options.length) {
this.checkAll = true
} else {
this.checkAll = false
}
this.$emit('input', event)
}
// const value = event.target.value
}
},
watch: {
@@ -88,7 +117,7 @@ export default {
this.valueArr = []
}
}
}
},
},
mounted () {
if (this.value !== '' && this.value !== null && typeof (this.value) !== 'undefined') {
File diff suppressed because one or more lines are too long
+76 -73
View File
@@ -7,98 +7,102 @@
<!--面包屑-->
<el-breadcrumb separator="/">
<el-breadcrumb-item
v-for="(item, index) in routerList"
:key="index"
v-for="(item, index) in routerList"
:key="index"
>
{{ item.meta.title }}
</el-breadcrumb-item>
</el-breadcrumb>
</div>
<!-- header头部 右侧内容 当前登录人和退出-->
<div class="header-right">
<div class="user-info">
<el-dropdown
trigger="click"
@command="handleCommand"
>
<div class="user-box">
<img :src="userAvator" v-if="$store.getters.userInfo.avator">
<span class="iconfont" v-else style="color: #333333;">&#xe69b;</span>
<span>您好{{ $store.getters.userInfo.uName }}</span>
<i class="el-icon-arrow-down"/>
</div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item command="loginOut">退出</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</div>
<!-- <div class="header-right">-->
<!-- <div class="user-info">-->
<!-- <el-dropdown-->
<!-- trigger="click"-->
<!-- @command="handleCommand"-->
<!-- >-->
<!-- <div class="user-box">-->
<!-- <img :src="userAvator" v-if="$store.getters.userInfo.avator">-->
<!-- <span class="iconfont" v-else style="color: #333333;">&#xe69b;</span>-->
<!-- <span>您好{{ $store.getters.userInfo.uName }}</span>-->
<!-- <i class="el-icon-arrow-down"/>-->
<!-- </div>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="loginOut">退出</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
</template>
<script>
import { mapMutations, mapGetters } from 'vuex'
export default {
name: 'ComHeader',
data () {
return {
routerList: [] //
}
},
created () {
//
this.routerList = this.$route.matched
},
computed: {
//
userAvator () {
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
},
...mapGetters(['isCollapse'])
},
watch: {
//
$route () {
this.routerList = this.$route.matched
}
},
methods: {
//
handleCommand (command) {
// 退
if (command === 'loginOut') {
this.$confirm('您确认要退出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
this.$store.commit('setTypeFlag', 'loginOut')
this.$http.get('logout', {}, {
_this: this
}, res => {
this.$store.dispatch('logout')
this.$router.push('/login')
}, e => {})
}).catch(() => {
})
import { mapMutations, mapGetters } from 'vuex'
export default {
name: 'ComHeader',
data () {
return {
routerList: [] //
}
},
handleToggleSideBar() {
this.toggleSideBar(!this.isCollapse)
created () {
//
this.routerList = this.$route.matched
},
computed: {
//
userAvator () {
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
},
...mapGetters(['isCollapse'])
},
watch: {
//
$route () {
this.routerList = this.$route.matched
}
},
methods: {
//
handleCommand (command) {
// 退
if (command === 'loginOut') {
this.$confirm('您确认要退出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
roundButton: false
}).then(() => {
// this.$http.post('/logout', {}, res => {
// window.location.href = 'http://testsso1.foton.com.cn/oauth2.0/authorize?client_id=app_slrs&redirect_uri=http://127.0.0.1:9090&response_type=code'
// })
// return
this.$store.commit('setTypeFlag', 'loginOut')
this.$http.get('logout', {}, {
_this: this
}, res => {
this.$store.dispatch('logout')
this.$router.push('/login')
}, e => {})
}).catch(() => {
})
}
},
...mapMutations(['toggleSideBar'])
handleToggleSideBar() {
this.toggleSideBar(!this.isCollapse)
},
...mapMutations(['toggleSideBar'])
}
}
}
</script>
<style lang="less" scoped>
.com-header{
padding: 0 10px;
height: 50px;
background: #ffffff;
background: #fff;
border-bottom: 1px solid #e5e5e5;
display: flex;
align-items: center;
@@ -125,7 +129,6 @@ export default {
align-items: center;
.iconfont {
font-size: 22px;
margin-right: 5px;
}
& > img{
width: 25px;
+7
View File
@@ -22,9 +22,13 @@ import GenerationNumber from './generationNumber' // 生成企标编号组件
import RoleUserTree from './roleUserTree' // 根据部门和角色查询人员
import DeptRoleTree from './deptRoleTree' // 根据部门查询角色
import RoleTree from './roleTree' // 查询所有机构及人员
import MechanismTree from './mechanismTree'
import SQTree from './SQTree'
import OrgTable from './OrgTable'
import MySelect from './mySelect'
import PhoneHistortTable from './phoneHistortTable'
import phoneRole from './phoneRole'
const install = function (Vue) {
Vue.component('loading', Loading)
@@ -49,7 +53,10 @@ const install = function (Vue) {
Vue.component('SQTree', SQTree)
Vue.component('OrgTable', OrgTable)
Vue.component('RoleTree', RoleTree)
Vue.component('MechanismTree', MechanismTree)
Vue.component('MySelect', MySelect)
Vue.component('phoneRole', phoneRole)
Vue.component('PhoneHistortTable', PhoneHistortTable)
}
export default {
+1
View File
@@ -1501,6 +1501,7 @@ export default {
}
}
}
.ztree li span.button { width: 6px }
.ztree li span.button.add {margin-left:2px; margin-right: -1px; background-position:-144px 0; vertical-align:top; *vertical-align:middle}
div#rMenu {position:absolute; visibility:hidden; top:0;text-align: left;padding: 2px;}
div#rMenu ul {
+267
View File
@@ -0,0 +1,267 @@
<template>
<div class="roleTree">
<el-drawer
:title="isTitle"
v-if="isVisible2"
:visible.sync="isVisible2"
:wrapperClosable="false"
@close="handleTreeDrawerCancel"
size="400px">
<el-form
ref="attributeEO"
class="label-input-form"
:inline="true"
>
<el-form-item class="form-item-disabled" style="margin: 10px;">
<el-input
v-model="filterText"
placeholder="请输入部门"
></el-input>
</el-form-item>
</el-form>
<div class="demo-drawer-content">
<el-tree
class="filter-tree tree-line"
:data="treeData"
v-if="isVisible2"
:props="defaultProps"
icon-class="icon-tree"
:check-strictly="true"
:current-node-key="nodeKeyId"
node-key="id"
:filter-node-method="filterNode"
:default-checked-keys="nodeList"
highlight-current
:auto-expand-parent="true"
show-checkbox
ref="tree"
:load="loadNode"
@check="drawerCheck"
:expand-on-click-node="false"
@node-click="handleNodeClick">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span>
</span>
</el-tree>
</div>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">
确定
</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleTreeDrawerCancel">取消
</el-button>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
</el-drawer>
</div>
</template>
<script>
export default {
name: "MechanismTree",
props: {
checkBox: { // /
type: Boolean,
default: false,
},
isTitle: { //
type: String
},
isVisible: { // drawer
type: Boolean,
default: false,
},
nodeList: { //
type: Array,
default: () => {
return []
}
}
},
data() {
return {
roleList: [],
nodeKeyId: '',
isVisible2: false,
filterText: '',
defaultProps: {
children: 'children',
label: 'name',
isLeaf: (data, node) => {
if (!node.disabled) {
return true
}
}
},
treeData1: [],
treeData: [],
open1: true,
treeLoading: false,
roleRow: {}
}
},
methods: {
treeClass() {
},
handleTreeDrawerCancel() {
this.filterText = ''
this.isVisible2 = false
},
saveUserInfo() {
let arr = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
this.isVisible2 = false
this.$emit('checkedRole', arr)
},
loadNode(node, resolve) {
if (node.level === 0) {
return resolve(this.treeData);
}
},
drawerCheck(data) {
if (this.checkBox) {
//
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if (getlist.length == 1) {
this.roleRow = getlist[0]
} else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0]
}
this.roleList = [this.roleRow]
} else {
this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
}
},
getTree() {
this.$http.get('SarInstitution/institution', {}, {
_this: this,
loading: 'treeLoading'
}, res => {
this.treeData = res.data
this.nodeKeyId = this.treeData[0].id
this.id = res.data[0].id
}, e => {
console.log(e);
})
},
handleNodeClick(data) {
this.id = data.id
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
},
watch: {
isVisible(val) {
this.isVisible2 = val
},
isVisible2(val) {
this.$emit('update:isVisible', val)
},
filterText(val) {
this.$refs.tree.filter(val);
},
},
mounted() {
this.getTree()
}
}
</script>
<style lang="less" scoped>
/deep/ .icon-tree {
margin: 0 5px 0 10px;
position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png');
background-size: 100% 100%;
}
/deep/ .el-tree-node__content {
padding-left: 0px !important;
}
/deep/ .is-leaf {
background-image: none;
background-size: 100% 100%;
}
/deep/ .is-leaf-none {
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background: url('~@/assets/images/shangqi/img/personnel.png');
background-size: 100% 100%;
}
/deep/ .is-show {
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background: url('~@/assets/images/shangqi/img/mechanism.png');
background-size: 100% 100%;
}
/deep/ .tree-line {
min-height: calc(100vh - 170px);
.el-tree-node {
position: relative;
padding-left: 0px; //
line-height: 30px;
}
.el-tree-node__children {
padding-left: 16px; //
}
// 线
.el-tree-node::before {
content: "";
height: 100%;
width: 1px;
position: absolute;
left: -3px;
top: -26px;
border-left: 1px dashed #858990e0;
}
// 线
.el-tree-node:last-child::before {
height: 38px; //
}
// 线
.el-tree-node::after {
content: "";
width: 11px;
height: 20px;
position: absolute;
left: -3px;
top: 12px;
border-width: 1px;
border-top: 1px dashed #858990e0;
}
// 线
& > .el-tree-node::after {
border-top: none;
}
& > .el-tree-node::before {
border-left: none;
}
// icon
.el-tree-node__expand-icon {
font-size: 16px;
//
&.is-leaf {
color: transparent;
// display: none; //
}
}
}
</style>
File diff suppressed because it is too large Load Diff
+1 -1
View File
@@ -17,6 +17,6 @@ export default {
height: calc(~'100% - 30px');
position: relative;
background: @subContainerContentColor;
overflow: hidden;
overflow: auto;
}
</style>
+110 -74
View File
@@ -1,124 +1,158 @@
<template>
<div class="header">
<div class="header-left">
<span class="logo" @click="toHome" title="回到首页"></span>
<div>
<img style="height: 50px;width: 100%" :src="require('@/assets/images/shangqi/home/top-logo.png')">
</div>
<div class="header-right">
<span class="date">{{currentTime}}</span>
<span class="divide-line"> | </span>
<span class="user-img"></span>
<span class="user">您好{{ $store.getters.userInfo.uName }}</span>
<div class="user-info-panel-setting" @click.prevent="userInfoVisible = !userInfoVisible">
<el-dropdown
trigger="click"
:visible="userInfoVisible"
@command="userInfoOpen"
>
<div class="iconfont" style="color: #fff;"><i class="el-icon-arrow-down"></i></div>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item name="logout" command="logout">{{$t('m.exit')}}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
<!-- header头部 右侧内容 当前登录人和退出-->
<!-- <div class="header-right" style="display: inline-block; float: right; margin-right: 20px; color: #fff">-->
<!-- <div>-->
<!-- <el-dropdown-->
<!-- trigger="click"-->
<!-- @command="handleCommand"-->
<!-- >-->
<!-- <div>-->
<!-- <img :src="userAvator" v-if="$store.getters.userInfo.avator">-->
<!-- <span class="iconfont" v-else style="color: #FFFFFF;">&#xe69b;</span>-->
<!-- <span style="color: #FFFFFF;">{{ $store.getters.userInfo.uName }}</span>-->
<!-- <i style="color: #FFFFFF;" class="el-icon-arrow-down"/>-->
<!-- </div>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item command="loginOut">退出</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<!-- </div>-->
</div>
</div>
<!-- <div class="header-left">-->
<!-- <span class="logo" @click="toHome" title="回到首页"></span>-->
<!-- </div>-->
<!-- <div class="header-center">-->
<!-- <span style="color: #fff; line-height: 65px; font-size: 20px;">-->
<!-- 标准法规管理系统 standard and regulations management system-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="header-right">-->
<!-- <span class="date">{{ currentTime }}</span>-->
<!-- <span class="divide-line"> | </span>-->
<!-- <span class="user-img"></span>-->
<!-- <span class="user">{{ $store.getters.userInfo.uName }}</span>-->
<!-- <div class="user-info-panel-setting" @click.prevent="userInfoVisible = !userInfoVisible">-->
<!-- <el-dropdown-->
<!-- trigger="click"-->
<!-- :visible="userInfoVisible"-->
<!-- @command="userInfoOpen"-->
<!-- >-->
<!-- <div class="iconfont" style="color: #fff;"><i class="el-icon-arrow-down"></i></div>-->
<!-- <el-dropdown-menu slot="dropdown">-->
<!-- <el-dropdown-item name="logout" command="logout">{{ $t("m.exit") }}</el-dropdown-item>-->
<!-- </el-dropdown-menu>-->
<!-- </el-dropdown>-->
<!-- </div>-->
<!-- </div>-->
</template>
<script>
import {mapGetters, mapMutations} from 'vuex'
import { mapGetters, mapMutations } from "vuex";
export default {
name: 'useImg',
data () {
name: "useImg",
data() {
return {
//
currentTime: '',
currentTime: "",
userInfoVisible: false
}
};
},
methods: {
toHome () {
this.$router.push('/home1')
toHome() {
this.$router.push("/home2");
},
//
getTime () {
this.currentTime = this.$dateFormat(new Date(), 'yyyy-MM-dd hh:mm:ss')
getTime() {
this.currentTime = this.$dateFormat(new Date(), "yyyy-MM-dd hh:mm:ss");
},
//
userInfoOpen (name) {
userInfoOpen(name) {
switch (name) {
case 'personal':
this.$router.push('/personal')
break
case 'logout':
this.$confirm('您确认要退出吗?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
confirmButtonClass: 'common-button-primary',
case "personal":
this.$router.push("/personal");
break;
case "logout":
this.$confirm("您确认要退出吗?", "提示", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
confirmButtonClass: "common-button-primary",
roundButton: true
}).then(() => {
this.userLoginOut()
}).catch(() => {})
break
this.userLoginOut();
}).catch(() => {
});
break;
}
},
// 退
userLoginOut () {
this.$http.get('logout', {}, {
userLoginOut() {
this.$http.get("logout", {}, {
_this: this
}, res => {
this.$store.dispatch('logout')
this.$router.push('/sign_in')
}, e => {})
this.$store.dispatch("logout");
this.$router.push("/sign_in");
}, e => {
});
},
...mapMutations(['setProcess', 'setDynamicTotal'])
...mapMutations(["setProcess", "setDynamicTotal"])
},
mounted () {
this.getTime()
mounted() {
this.getTime();
},
computed: {
//
userAvator () {
return this.$store.getters.userInfo.avator || require('@/assets/images/avator_default.png')
userAvator() {
return this.$store.getters.userInfo.avator || require("@/assets/images/avator_default.png");
},
uName () {
return this.$store.getters.userInfo.uName
uName() {
return this.$store.getters.userInfo.uName;
},
...mapGetters(['getDynamicTotal', 'getMenuList'])
...mapGetters(["getDynamicTotal", "getMenuList"])
}
}
};
</script>
<style lang="less" scoped>
.header{
display: flex;
justify-content: space-between;
color: #fff;
.header-left{
text-align: left;
width: 50%;
.header {
//display: flex;
//justify-content: space-between;
//background-color: #171E4A;
//color: #fff;
.header-left {
float: left;
.logo {
display: inline-block;
width: 160px;
height: 61px;
background: url("~@/assets/images/shangqi/home/logo2.png") no-repeat;
background-size: cover;
cursor: pointer;
padding: 4px 42px 10px 10px;
text-align: left;
}
}
.header-right{
.header-center{
width: 70%;
margin-left: 60px;
}
.header-right {
width: 49%;
text-align: right;
line-height: 61px;
height: 61px;
display: flex;
margin-right: 20px;
justify-content: flex-end;
align-items: center;
.date{
.date {
display: inline-block;
margin-right: 20px;
}
.user-img{
.user-img {
display: inline-block;
width: 20px;
height: 21px;
@@ -126,11 +160,13 @@ export default {
background-size: 100% 100%;
margin-right: 15px;
}
.divide-line{
.divide-line {
display: inline-block;
margin-right: 20px;
}
.user{
.user {
display: inline-block;
}
}
@@ -0,0 +1,93 @@
<template>
<div class="phoneHistortTable">
<el-table
height="100%"
ref="selection"
:data="histortData"
tooltip-effect="dark"
style="width: 100%"
border
row-key="id"
:header-cell-style="{background: '#f8f8f9', color: '#515a6e'}">
<el-table-column
prop="name"
label="任务步骤"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="assignee"
label="任务受理人"
align="center"
sortable="custom"
>
</el-table-column>
<el-table-column
prop="createTime"
label="创建时间"
sortable="custom"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.createTime ? $moment(scope.row.createTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="endTime"
label="完成时间"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? $moment(scope.row.endTime).format('YYYY-MM-DD HH:mm:ss') : '' }}</span>
</template>
</el-table-column>
<el-table-column
prop="comment"
label="流程信息"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.commentText }}</span>
</template>
</el-table-column>
<el-table-column
prop="completeFlag"
label="状态"
align="center">
<template slot-scope="scope">
<span>{{ scope.row.endTime ? '已完成' : '未完成'}}</span>
</template>
</el-table-column>
</el-table>
</div>
</template>
<script>
export default {
name: "phoneHistortTable",
data() {
return {
histortData: []
}
},
props: {
prcNum: { //
type: String
}
},
methods: {
getHistoryData () {
this.$http.get('lawss/activiti/get_list_by_instance', {
prcNum: this.prcNum,
}, {}, res => {
this.histortData = res
}, e => {})
},
},
mounted () {
this.getHistoryData()
}
}
</script>
<style scoped>
</style>
+265
View File
@@ -0,0 +1,265 @@
<template>
<div class="phoneRole phoneBox">
<van-action-sheet
v-model="isShowPhone2"
:title="roleTitle"
v-if="isShowPhone2"
>
<el-form
ref="phoneForm"
class="label-input-form"
:inline="true"
:model="phoneForm"
@submit.native.prevent
>
<el-form-item class="form-item-disabled" style="margin: 10px;">
<el-input
size="small"
clearable
v-model="phoneForm.name"
placeholder="请输入姓名"
></el-input>
</el-form-item>
<el-form-item class="form-item-disabled" style="margin: 10px;">
<el-button type="primary" size="small" @click="queryPhone">查询</el-button>
</el-form-item>
</el-form>
<van-pull-refresh v-model="refreshing" @refresh="onRefresh">
<van-list
v-model="loading"
:finished="finished"
finished-text="没有更多了"
@load="onLoad"
:immediate-check="false"
:offset="300"
>
<van-checkbox-group v-if="!checkMore" v-model="result" :max="1">
<van-cell-group>
<van-cell
v-for="(item, index) in roleList"
clickable
:key="index"
:title="item.userName"
@click="toggle(index)"
>
<template #right-icon>
<van-checkbox :name="item.usId" ref="checkbox"/>
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
<van-checkbox-group v-if="checkMore" v-model="result">
<van-cell-group>
<van-cell
v-for="(item, index) in roleList"
clickable
:key="index"
:title="item.userName"
@click="toggle(index)"
>
<template #right-icon>
<van-checkbox :name="item.usId" ref="checkbox"/>
</template>
</van-cell>
</van-cell-group>
</van-checkbox-group>
</van-list>
</van-pull-refresh>
<div class="phoneBtn">
<van-button type="default" @click="roleClear">取消</van-button>
<van-button type="info" @click="roleSumit">确认</van-button>
</div>
</van-action-sheet>
</div>
</template>
<script>
import Vue from 'vue';
import {ActionSheet, Checkbox, CheckboxGroup, Cell, CellGroup, Button, List, PullRefresh} from 'vant';
import {phoneUser} from '@/api/phone'
Vue.use(ActionSheet, Checkbox, CheckboxGroup, Cell, CellGroup, Button, List, PullRefresh);
export default {
name: "phoneRole",
props: {
isShowPhone: {
type: Boolean,
default: false,
},
checkMore: {
type: Boolean,
default: false,
},
roleTitle: {
type: String,
},
resultList: { //
type: Array,
default: () => {
return []
}
}
},
data() {
return {
filterText: '',
isShowPhone2: false,
result: [],
phoneForm: {
name: '',
page: 1
},
roleList: [],
loading: false,
finished: false,
refreshing: false,
total: '',
}
},
watch: {
isShowPhone(val) {
this.isShowPhone2 = val
if (val) {
this.result = this.resultList
}
},
isShowPhone2(val) {
this.$emit('update:isShowPhone', val)
}
},
mounted() {
this.getPhoneData()
},
methods: {
/** 查询 */
queryPhone() {
this.getPhoneData()
this.finished = false
},
/** 获取人员数据 */
async getPhoneData() {
this.phoneForm.page = 1
this.roleList = []
phoneUser(this.phoneForm).then(res => {
if (res.ok) {
this.roleList = res.data
this.total = this.roleList[0].total
this.loading = false
if (this.total === this.roleList.length) {
this.finished = true
} else {
this.finished = false
}
this.refreshing = false
this.loading = false
}
})
},
toggle(index) {
if (!this.checkMore) {
this.result = []
this.$refs.checkbox[index].toggle();
} else {
this.$refs.checkbox[index].toggle();
}
},
roleSumit() {
let ids = ''
this.result.map(item => {
if (ids.length > 0) {
ids += ','
ids += item
} else {
ids = item
}
})
this.$http.get('SarInstitution/institution/getNextById', {
ids: ids
}, {
_this: this
}, res => {
this.$emit('checkedRole', res)
this.isShowPhone2 = false
this.phoneForm.name = ''
this.getPhoneData()
})
},
roleClear() {
this.result = []
this.isShowPhone2 = false
this.phoneForm.name = ''
this.getPhoneData()
},
//
onLoad() {
this.phoneForm.page++
phoneUser(this.phoneForm).then(res => {
this.roleList = this.roleList.concat(res.data)
this.total = this.roleList[0].total
this.loading = false
if (this.roleList.length < this.total) {
this.loading = false
} else {
this.finished = true
this.loading = true
}
})
},
//
onRefresh() {
this.getPhoneData()
}
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/phone';
.phoneRole {
.van-action-sheet {
height: 100%;
max-height: 100%;
}
.van-action-sheet__cancel {
border-radius: 5px;
background-color: #0c91e5;
color: #fff;
}
.van-action-sheet__content {
overflow-y: hidden;
}
.van-list {
//min-height: 9rem;
height: 9.5rem;
overflow-y: auto;
}
.van-popup--bottom.van-popup--round {
border-radius: 0;
}
.phoneBtn {
padding: 5px;
.van-button--info {
width: 49%;
float: right;
}
.van-button--default {
width: 49%;
float: left;
}
}
}
</style>
+115 -30
View File
@@ -10,11 +10,13 @@
ref="attributeEO"
class="label-input-form"
:inline="true"
@submit.native.prevent
>
<el-form-item class="form-item-disabled" style="margin: 10px;">
<el-input
v-model="filterText"
placeholder="请输入姓名"
@input="changeInput"
></el-input>
</el-form-item>
</el-form>
@@ -23,14 +25,15 @@
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
:class="treeClass"
icon-class="icon-tree"
@check-change="checkChange"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="false"
:expand-on-click-node="true"
show-checkbox
ref="tree"
:load="loadNode"
@@ -45,13 +48,15 @@
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
:data="treeData1"
:props="defaultProps"
@check-change="checkChange2"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="false"
:expand-on-click-node="true"
default-expand-all
show-checkbox
ref="tree">
@@ -62,6 +67,7 @@
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleTreeDrawerCancel">取消</el-button>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
@@ -70,6 +76,15 @@
</template>
<script>
function debounce(func, wait = 500){
let timeout;
return function(event){
clearTimeout(timeout)
timeout = setTimeout(()=>{
func.call(this, event)
},wait)
}
}
export default {
name: "roleTree",
props: {
@@ -113,29 +128,106 @@
}
},
methods: {
treeClass () {
changeInput:debounce(function (val) {
if (val.length) {
this.open1 = false
this.treeLoading = true
this.$http.get('SarInstitution/institution/institutionAndUser', {
userName: val
}, {}, res => {
this.treeData1 = res.data
this.treeLoading = false
})
} else {
this.open1 = true
}
}),
checkChange2 (row, type, c) {
if (this.checkBox) {
} else {
if (type) {
this.nodeList.push(row.id)
} else {
for (let a = 0; a < this.nodeList.length; a ++) {
if (row.id === this.nodeList[a]) {
this.nodeList.splice(a, 1)
}
}
}
}
},
checkChange (row, type, c) {
if (this.checkBox) {
} else {
if (type) {
this.nodeList.push(row.id)
} else {
for (let a = 0; a < this.nodeList.length; a ++) {
if (row.id === this.nodeList[a]) {
this.nodeList.splice(a, 1)
}
}
}
}
},
handleTreeDrawerCancel () {
this.filterText = ''
this.isVisible2 = false
this.open1 = true
},
saveUserInfo () {
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
if (this.checkBox) {
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
} else {
if (this.nodeList.length > 0 && this.nodeList[0].length !== 0) {
let ids = ''
this.nodeList.forEach(item => {
if (ids.length > 0) {
ids += ','
ids += item
} else {
ids = item
}
})
this.$http.get('SarInstitution/institution/getNextById', {
ids: ids
}, {
_this: this
}, res => {
this.isVisible2 = false
this.$emit('checkedRole', res)
})
} else {
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
}
}
this.open1 = true
},
drawerCheck (data) {
if (this.checkBox) {
if (this.checkBox) { //
//
var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
if(getlist.length == 1) {
this.roleRow = getlist[0]
}else {
this.$refs.tree.setCheckedKeys([data.id]);
this.roleRow = this.$refs.tree.getCheckedNodes()[0]
let getlist = this.$refs.tree.getCheckedNodes()
if (getlist.length > 1) {
this.$refs.tree.setCheckedKeys([])
this.$refs.tree.setCheckedKeys([data.id])
this.roleList = [data]
} else if (getlist.length === 0) {
this.roleList = [{}]
} else if (getlist.length === 1) {
this.roleList = [data]
}
this.roleList = [this.roleRow]
} else {
// var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
// if(getlist.length == 1) {
// this.roleRow = getlist[0]
// } else {
// this.$refs.tree.setCheckedKeys([data.id])
// this.roleRow = this.$refs.tree.getCheckedNodes()[0]
// }
// this.roleList = [this.roleRow]
} else { //
this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
}
},
@@ -147,7 +239,8 @@
},
getChildren (node, resolve) {
this.$http.get('SarInstitution/institution/getNext', {
institutionId: node.key
institutionId: node.key,
userName: this.filterText
}, {}, res => {
resolve(res)
})
@@ -167,20 +260,6 @@
isVisible2 (val) {
this.$emit('update:isVisible', val)
},
filterText (val) {
if (val.length) {
this.open1 = false
this.treeLoading = true
this.$http.get('SarInstitution/institution/institutionAndUser', {
userName: val
}, {}, res => {
this.treeData1 = res.data
this.treeLoading = false
})
} else {
this.open1 = true
}
},
},
mounted () {
this.getTree()
@@ -189,6 +268,12 @@
</script>
<style lang="less" scoped>
/deep/ .icon-tree {
margin: 0 5px 0 10px;
position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png');
background-size: 100% 100%;
}
/deep/.el-tree-node__content {
padding-left: 0px !important;
}
@@ -0,0 +1,324 @@
<template>
<el-drawer
class="org-tree"
:title="drawerTitle"
:visible.sync="modalShowFlag"
:size="width"
:append-to-body=true
:before-close="cancelUserInfo"
:show-checkbox="showCheckBox"
>
<el-tree class="common-tree" :style="style" ref="tree" :data="data" :props="defaultProps"
:load="loadNode"
:lazy="lazy"
:show-checkbox="multiple"
:node-key="nodeKey"
:check-strictly="checkStrictly"
:expand-on-click-node="false"
:default-checked-keys="defaultCheckedKeys"
:highlight-current="true"
@node-click="handleNodeClick"
@check-change="handleCheckChange">
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelUserInfo">取消</el-button>
</div>
</el-drawer>
</template>
<script>
// , vpps, (_;)()
export default {
name: "treeSelectModule",
props: {
//
data: {
type: Array,
default () {
return [];
}
},
url: {
type: String,
default () {
return "";
}
},
type: {
type: String,
default () {
return "";
}
},
urlChild: {
type: String,
default () {
return "";
}
},
params: {
type: Object,
default () {
return {};
}
},
defaultProps: {
type: Object,
default () {
return {};
}
},
//
multiple: {
type: Boolean,
default () {
return false;
}
},
lazy: {
type: Boolean,
default () {
return false;
}
},
nodeKey: {
type: String,
default () {
return 'id';
}
},
//
checkStrictly: {
type: Boolean,
default () {
return false;
}
},
disabled: {
type: Boolean,
default () {
return false;
}
},
// key
checkedKeys: {
type: Array,
default () {
return [];
}
},
width: {
type: String,
default () {
return "";
}
},
drawerTitle:{
type: String,
default () {
return '';
}
},
showCheckBox:{
type: Boolean,
default () {
return true;
}
},
//
modalShowFlag: {
type: Boolean,
default () {
return false;
}
},
},
data () {
return {
nodeList: [],
defaultCheckedKeys: [],
isShowSelect: false, //
options: [],
selectedData: [], //
style: 'width:' + this.width + 'px;' + '',
selectStyle: 'width:100%;',
checkedIds: [],
checkedData: [],
};
},
created(){
},
mounted () {
if (this.checkedKeys.length > 0) {
if (this.multiple) {
this.defaultCheckedKeys = this.checkedKeys;
this.getChildByIDSList(this.defaultCheckedKeys);
// this.selectedData = this.checkedKeys.map((item) => {
// var node = this.$refs.tree.getNode(item);
// return node.label;
// });
} else {
const item = this.checkedKeys[0];
this.getChildByIDSList(item);
// this.$refs.tree.setCurrentKey(item);
// var node = this.$refs.tree.getNode(item);
// this.selectedData = node.label;
}
}
},
methods: {
loadNode(node, resolve) {
const that = this;
if (node.level === 0) {
that.loadTreeData(resolve);
}
if (node.level >= 1) {
setTimeout(() => {
this.getChildByList(node.data.level,node.data.id,node.data.model, resolve);
}, 500);
return resolve([]); //
}
},
getChildByIDSList( _parentID) { //
let params = {ids : _parentID};
this.$http.get(this.urlChild, params, {
_this: this
}, res => {
if(res.data){
this.$emit('popoverHide', this.checkedIds, res.data,false);
}
})
},
getChildByList( level,id,model,resolve) { //
let params = {level : level,id :id,type : this.type,model :model};
this.$http.get(this.urlChild, params, {
_this: this
}, res => {
if(res.data){
resolve(res.data);
}else {
return false;
}
})
},
loadTreeData(resolve) {
// loadtreeData getChildByList
this.$http.get(this.url, {type : this.type}, {
_this: this
}, res => {
if(res.data){
resolve(res.data)
}else {
return false;
}
})
},
popoverHide () {
},
// ,
handleNodeClick (data, node) {
if (!this.multiple) {
let tmpMap = {};
tmpMap.value = node.key;
tmpMap.label = node.label;
this.options = [];
this.options.push(tmpMap);
this.selectedData = node.label;
this.isShowSelect = !this.isShowSelect;
}
},
//
getTreeData(data) {
// json
for (let i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// childrenchildrenundefined
delete data[i].children
} else {
// children
this.getTreeData(data[i].children)
}
}
return data
},
//
handleCheckChange () {
var checkedKeys = this.$refs.tree.getCheckedKeys(); // key
this.options = checkedKeys.map((item) => {
var node = this.$refs.tree.getNode(item); // node
let tmpMap = {};
tmpMap.value = node.key;
tmpMap.label = node.label;
return tmpMap;
});
this.selectedData = this.options.map((item) => {
return item.label;
});
},
saveUserInfo () {
if (this.multiple) {
this.checkedIds = this.$refs.tree.getCheckedKeys(); // key
this.checkedData = this.$refs.tree.getCheckedNodes(); //
} else {
this.checkedIds = this.$refs.tree.getCurrentKey();
this.checkedData = this.$refs.tree.getCurrentNode();
}
this.$emit('popoverHide', this.checkedIds, this.checkedData,false);
},
cancelUserInfo () {
this.$emit('popoverHideCancel', this.checkedIds, this.checkedData,false);
},
},
watch: {
}
}
</script>
<style lang="less" scoped>
/deep/ .expanded{
background-image: none !important;
background-size:100% 100%;
}
.el-drawer__body{
& > div:first-child{
display: flex;
flex: auto;
flex-direction: column;
}
}
::v-deep .el-drawer__header{
&>span:first-child{
outline: none!important;
}
}
::v-deep .el-drawer{
outline: none!important;
}
//#tree {
// .el-checkbox .el-checkbox__inner {
// display: none;
// }
// div[role="group"] {
// .el-checkbox .el-checkbox__inner {
// display: inline-block;
// }
// }
//}
//
//.el-tree-node {
// .is-leaf + .el-checkbox .el-checkbox__inner {
// display: inline-block;
// }
// .el-checkbox .el-checkbox__inner {
// display: none;
// }
//}
</style>
+35 -7
View File
@@ -18,7 +18,8 @@
:default-checked-keys="defaultCheckedKeys"
:highlight-current="true"
@node-click="handleNodeClick"
@check-change="handleCheckChange"></el-tree>
@check-change="handleCheckChange">
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelUserInfo">取消</el-button>
@@ -43,6 +44,12 @@
return "";
}
},
type: {
type: String,
default () {
return "";
}
},
urlChild: {
type: String,
default () {
@@ -133,7 +140,7 @@
isShowSelect: false, //
options: [],
selectedData: [], //
style: 'width:' + this.width + 'px;' + 'height:100%;',
style: 'width:' + this.width + 'px;' + '',
selectStyle: 'width:100%;',
checkedIds: [],
checkedData: [],
@@ -169,7 +176,7 @@
if (node.level >= 1) {
setTimeout(() => {
this.getChildByList(node.data.id, resolve);
this.getChildByList(node.data.level,node.data.id, resolve);
}, 500);
return resolve([]); //
}
@@ -186,8 +193,8 @@
}
})
},
getChildByList( _parentID,resolve) { //
let params = {ids : _parentID};
getChildByList( level,id,resolve) { //
let params = {level : level,id :id,type : this.type};
this.$http.get(this.urlChild, params, {
_this: this
}, res => {
@@ -200,7 +207,7 @@
},
loadTreeData(resolve) {
// loadtreeData getChildByList
this.$http.get(this.url, '', {
this.$http.get(this.url, {type : this.type}, {
_this: this
}, res => {
if(res.data){
@@ -264,7 +271,7 @@
this.$emit('popoverHide', this.checkedIds, this.checkedData,false);
},
cancelUserInfo () {
this.$emit('popoverHide', this.checkedIds, this.checkedData,false);
this.$emit('popoverHideCancel', this.checkedIds, this.checkedData,false);
},
},
watch: {
@@ -292,4 +299,25 @@
::v-deep .el-drawer{
outline: none!important;
}
//#tree {
// .el-checkbox .el-checkbox__inner {
// display: none;
// }
// div[role="group"] {
// .el-checkbox .el-checkbox__inner {
// display: inline-block;
// }
// }
//}
//
//.el-tree-node {
// .is-leaf + .el-checkbox .el-checkbox__inner {
// display: inline-block;
// }
// .el-checkbox .el-checkbox__inner {
// display: none;
// }
//}
</style>
@@ -0,0 +1,308 @@
<template>
<el-drawer
class="org-tree"
:title="drawerTitle"
:visible.sync="modalShowFlag"
:size="width"
:append-to-body=true
:before-close="cancelUserInfo"
:show-checkbox="showCheckBox"
>
<el-input
style="border-bottom: 1px #e5e5e5 solid"
placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-tree class="common-tree" :style="style" ref="tree" :data="data" :props="defaultProps"
:load="loadNode"
:lazy="lazy"
:show-checkbox="multiple"
:node-key="nodeKey"
:check-strictly="checkStrictly"
:expand-on-click-node="false"
:filter-node-method="filterNode"
:default-checked-keys="defaultCheckedKeys"
:highlight-current="true"
@node-click="handleNodeClick"
@check-change="handleCheckChange">
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelUserInfo">取消</el-button>
</div>
</el-drawer>
</template>
<script>
export default {
name: "treeSelectStand",
props: {
//
data: {
type: Array,
default () {
return [];
}
},
url: {
type: String,
default () {
return "";
}
},
type: {
type: String,
default () {
return "";
}
},
urlChild: {
type: String,
default () {
return "";
}
},
params: {
type: Object,
default () {
return {};
}
},
defaultProps: {
type: Object,
default () {
return {};
}
},
//
multiple: {
type: Boolean,
default () {
return false;
}
},
lazy: {
type: Boolean,
default () {
return false;
}
},
nodeKey: {
type: String,
default () {
return 'id';
}
},
//
checkStrictly: {
type: Boolean,
default () {
return false;
}
},
disabled: {
type: Boolean,
default () {
return false;
}
},
// key
checkedKeys: {
type: Array,
default () {
return [];
}
},
width: {
type: String,
default () {
return "";
}
},
drawerTitle:{
type: String,
default () {
return '';
}
},
showCheckBox:{
type: Boolean,
default () {
return true;
}
},
//
modalShowFlag: {
type: Boolean,
default () {
return false;
}
},
},
data () {
return {
filterText: '',
nodeList: [],
defaultCheckedKeys: [],
isShowSelect: false, //
options: [],
selectedData: [], //
style: 'width:' + this.width + 'px;' + 'height: 100%;',
selectStyle: 'width:100%;',
};
},
created(){
},
mounted () {
if (this.checkedKeys.length > 0) {
if (this.multiple) {
this.defaultCheckedKeys = this.checkedKeys;
this.getChildByIDSList(this.defaultCheckedKeys);
} else {
const item = this.checkedKeys[0];
this.getChildByIDSList(item);
}
}
},
methods: {
filterNode(value, data) {
if (!value) return true;
return data.menuName.indexOf(value) !== -1;
},
loadNode(node, resolve) {
const that = this;
if (node.level === 0) {
that.loadTreeData(resolve);
}
if (node.level >= 1) {
setTimeout(() => {
this.getChildByList(node.data.level,node.data.id, resolve);
}, 500);
return resolve([]); //
}
},
getChildByIDSList( _parentID) { //
let params = {ids : _parentID};
this.$http.get(this.urlChild, params, {
_this: this
}, res => {
if(res.data){
this.$emit('popoverHide', this.checkedIds, res.data,false);
}
})
},
getChildByList( level,id,resolve) { //
let params = {level : level,id :id,type : this.type};
this.$http.get(this.urlChild, params, {
_this: this
}, res => {
if(res.data){
resolve(res.data);
}else {
return false;
}
})
},
loadTreeData(resolve) {
// loadtreeData getChildByList
this.$http.get(this.url, {type : this.type}, {
_this: this
}, res => {
if(res.data){
resolve(res.data)
}else {
return false;
}
})
},
popoverHide () {
},
// ,
handleNodeClick (data, node) {
if (!this.multiple) {
let tmpMap = {};
tmpMap.value = node.key;
tmpMap.label = node.label;
this.options = [];
this.options.push(tmpMap);
this.selectedData = node.label;
this.isShowSelect = !this.isShowSelect;
}
},
//
getTreeData(data) {
// json
for (let i = 0; i < data.length; i++) {
if (data[i].children.length < 1) {
// childrenchildrenundefined
delete data[i].children
} else {
// children
this.getTreeData(data[i].children)
}
}
return data
},
//
handleCheckChange () {
var checkedKeys = this.$refs.tree.getCheckedKeys(); // key
this.options = checkedKeys.map((item) => {
var node = this.$refs.tree.getNode(item); // node
let tmpMap = {};
tmpMap.value = node.key;
tmpMap.label = node.label;
return tmpMap;
});
this.selectedData = this.options.map((item) => {
return item.label;
});
},
saveUserInfo () {
if (this.multiple) {
this.checkedIds = this.$refs.tree.getCheckedKeys(); // key
this.checkedData = this.$refs.tree.getCheckedNodes(); //
} else {
this.checkedIds = this.$refs.tree.getCurrentKey();
this.checkedData = this.$refs.tree.getCurrentNode();
}
this.$emit('popoverHide', this.checkedIds, this.checkedData,false);
},
cancelUserInfo () {
this.$emit('popoverHideCancel', this.checkedIds, this.checkedData,false);
},
},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
}
},
}
</script>
<style lang="less" scoped>
/deep/ .expanded{
background-image: none !important;
background-size:100% 100%;
}
.el-drawer__body{
/* & > div:first-child{
display: flex;
flex: auto;
flex-direction: column;
}*/
}
::v-deep .el-drawer__header{
&>span:first-child{
outline: none!important;
}
}
::v-deep .el-drawer{
outline: none!important;
}
</style>
+352
View File
@@ -0,0 +1,352 @@
<template>
<div class="roleTree">
<el-drawer
:title="isTitle"
:visible.sync="isVisible2"
:wrapperClosable="false"
@close="handleTreeDrawerCancel"
size="400px">
<el-form
ref="attributeEO"
class="label-input-form"
:inline="true"
@submit.native.prevent
>
<el-form-item class="form-item-disabled" style="margin: 10px;">
<el-input
v-model="filterText"
placeholder="请输入姓名"
@input="changeInput"
></el-input>
</el-form-item>
</el-form>
<el-tree
v-if="open1 && isVisible2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
@check-change="checkChange"
:data="treeData"
:props="defaultProps"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="true"
show-checkbox
ref="tree"
:load="loadNode"
lazy>
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span>
</span>
</el-tree>
<el-tree
v-if="!open1 && isVisible2"
node-key="id"
style="height: 100%; overflow: auto;"
class="filter-tree tree-line"
icon-class="icon-tree"
:data="treeData1"
:props="defaultProps"
@check-change="checkChange2"
:default-checked-keys="nodeList"
highlight-current
check-strictly
@check="drawerCheck"
:expand-on-click-node="true"
default-expand-all
show-checkbox
ref="tree">
<span class="custom-tree-node" slot-scope="{ node, data }">
<span :class="node.disabled ? 'is-show' : 'is-leaf-none'"></span>
<span> {{ node.label }} </span>
</span>
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveUserInfo">确定</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="handleTreeDrawerCancel">取消</el-button>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
</el-drawer>
</div>
</template>
<script>
function debounce(func, wait = 500){
let timeout;
return function(event){
clearTimeout(timeout)
timeout = setTimeout(()=>{
func.call(this, event)
},wait)
}
}
export default {
name: "workTree",
props: {
checkBox: { // /
type: Boolean,
default: false,
},
isTitle: { //
type: String
},
isVisible: { // drawer
type: Boolean,
default: false,
},
nodeList: { //
type: Array,
default: () => {
return []
}
}
},
data () {
return {
roleList: [],
isVisible2: false,
filterText: '',
defaultProps: {
children: 'children',
label: 'name',
isLeaf: (data, node) => {
if (!node.disabled) {
return true
}
}
},
treeData1: [],
treeData: [],
open1: true,
treeLoading: false,
roleRow: {}
}
},
methods: {
changeInput:debounce(function (val) {
if (val.length) {
this.open1 = false
this.treeLoading = true
this.$http.get('SarInstitution/institution/institutionAndUser', {
userName: val
}, {}, res => {
this.treeData1 = res.data
this.treeLoading = false
})
} else {
this.open1 = true
}
}),
checkChange2 (row, type, c) {
if (this.checkBox) {
} else {
if (type) {
this.nodeList.push(row.id)
} else {
for (let a = 0; a < this.nodeList.length; a ++) {
if (row.id === this.nodeList[a]) {
this.nodeList.splice(a, 1)
}
}
}
}
},
checkChange (row, type, c) {
if (this.checkBox) {
} else {
if (type) {
this.nodeList.push(row.id)
} else {
for (let a = 0; a < this.nodeList.length; a ++) {
if (row.id === this.nodeList[a]) {
this.nodeList.splice(a, 1)
}
}
}
}
},
handleTreeDrawerCancel () {
this.filterText = ''
this.isVisible2 = false
this.open1 = true
},
saveUserInfo () {
if (this.checkBox) {
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
} else {
if (this.nodeList.length > 0 && this.nodeList[0].length !== 0) {
let ids = ''
this.nodeList.forEach(item => {
if (ids.length > 0) {
ids += ','
ids += item
} else {
ids = item
}
})
this.$http.get('SarInstitution/institution/getNextById', {
ids: ids
}, {
_this: this
}, res => {
this.isVisible2 = false
this.$emit('checkedRole', res)
})
} else {
this.isVisible2 = false
this.$emit('checkedRole', this.roleList)
}
}
this.open1 = true
},
drawerCheck (data) {
if (this.checkBox) { //
//
let getlist = this.$refs.tree.getCheckedNodes()
if (getlist.length > 1) {
this.$refs.tree.setCheckedKeys([])
this.$refs.tree.setCheckedKeys([data.id])
this.roleList = [data]
} else if (getlist.length === 0) {
this.roleList = [{}]
} else if (getlist.length === 1) {
this.roleList = [data]
}
// var getlist = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes());
// if(getlist.length == 1) {
// this.roleRow = getlist[0]
// } else {
// this.$refs.tree.setCheckedKeys([data.id])
// this.roleRow = this.$refs.tree.getCheckedNodes()[0]
// }
// this.roleList = [this.roleRow]
} else { //
this.roleList = this.$refs.tree.getCheckedNodes().concat(this.$refs.tree.getHalfCheckedNodes())
}
},
loadNode(node, resolve) {
if (node.level === 0) {
return resolve(this.treeData);
}
this.getChildren(node, resolve)
},
getChildren (node, resolve) {
this.$http.get('SarInstitution/institution/getNext', {
institutionId: node.key,
userName: this.filterText
}, {}, res => {
resolve(res)
})
},
getTree () {
this.treeLoading = true
this.$http.get('SarInstitution/institution/getFirstInstitution', {}, {}, res=> {
this.treeData = res
this.treeLoading = false
})
}
},
watch: {
isVisible (val) {
this.isVisible2 = val
},
isVisible2 (val) {
this.$emit('update:isVisible', val)
},
},
mounted () {
this.getTree()
}
}
</script>
<style lang="less" scoped>
/deep/ .icon-tree {
margin: 0 5px 0 10px;
position: relative;
background: url('~@/assets/images/shangqi/img/tree-add.png');
background-size: 100% 100%;
}
/deep/.el-tree-node__content {
padding-left: 0px !important;
}
/deep/ .is-leaf{
background-image:none;
background-size:100% 100%;
}
/deep/ .is-leaf-none{
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background:url('~@/assets/images/shangqi/img/personnel.png');
background-size:100% 100%;
}
/deep/ .is-show{
position: relative;
display: inline-block;
width: 15px;
height: 15px;
background:url('~@/assets/images/shangqi/img/mechanism.png');
background-size:100% 100%;
}
/deep/.tree-line{
.el-tree-node {
position: relative;
padding-left: 0px; //
line-height: 30px;
}
.el-tree-node__children {
padding-left: 16px; //
}
// 线
.el-tree-node::before {
content: "";
height: 100%;
width: 1px;
position: absolute;
left: -3px;
top: -26px;
border-width: 1px;
border-left: 1px dashed #858990e0;
}
// 线
.el-tree-node:last-child::before {
height: 38px; //
}
// 线
.el-tree-node::after {
content: "";
width: 11px;
height: 20px;
position: absolute;
left: -3px;
top: 12px;
border-width: 1px;
border-top: 1px dashed #858990e0;
}
// 线
& > .el-tree-node::after {
border-top: none;
}
& > .el-tree-node::before {
border-left: none;
}
// icon
.el-tree-node__expand-icon{
font-size: 16px;
//
&.is-leaf{
color: transparent;
// display: none; //
}
}
}
</style>
+301 -1
View File
@@ -4,13 +4,13 @@ require('es6-promise').polyfill();
require('es6-promise/auto');
import Vue from 'vue'
import App from './App'
import router from './router'
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'
// jQuery
import $ from 'jquery'
// vuex
import store from './store'
import Axios from 'axios'
// 复制
import VueClipboard from 'vue-clipboard2'
// 全局样式文件
@@ -40,8 +40,307 @@ moment.suppressDeprecationWarnings = true;
// 右键菜单
import Contextmenu from 'vue-contextmenujs'
// vant
import vant from 'vant';
import 'vant/lib/index.css';
//vant
import animate from 'animate.css'
// 引入路由器
import router from './router'
// 路由解析器
import Re from 'path-to-regexp'
import { get_verify_by_instance,loginIdm,getMenu,loginMobile } from 'api/process'
import hwh5 from 'api/hwh5-cloudonline.js';
import { ssoLoginUrlDev,ssoLoginUrl,webLoginType,devWebUrl } from '@/sysConfig'
import { mapMutations, mapActions } from 'vuex'
import isMobile from "./store/isMobile";
// 路由拦截
router.beforeEach(function (to, from, next) {
let toName = to.name
let token = store.state.token
let path = to.path;
let requireAuth = to.meta.requireAuth;
let taskId = to.query.taskIds;
let prcId = to.query.prcId;
let prcNum = to.query.prcNum;
let prcName = to.query.prcName;
let prcType = to.query.prcType;
let routerType = to.query.routerType;
let param = "taskIds=" + taskId + "&prcId=" + prcId
+ "&prcNum=" + prcNum + "&prcName=" + prcName + "&prcType=" + prcType;
let param4 = {
path: path,
token: token,
taskId: taskId,
prcId: prcId,
prcNum: prcNum,
prcName: prcName,
prcType: prcType,
toName: toName
}
let url = window.location.search
let code = "";
if(url){
url = url.substr(1);
url = url.split('&');
let info = [];
let obj = {};
for (let i = 0,len = url.length; i < len; i++) {
info = url[i].split('=')
obj[info[0]] = decodeURI(info[1]);
url[i] = obj;
}
code = url[0].code
}
function extractedLocalStorage(url,param,param4) {
localStorage.removeItem("routerUrl")
localStorage.setItem('routerUrl', url)
localStorage.removeItem("routerParam")
localStorage.setItem('routerParam', param)
}
// 返回值为登录状态
/** 判断是不是在手机端操作 */
if (isMobile()) {
if(toName === 'processCenter'){
hwh5.close();
}else {
if ((token === null || token === '' ) && toName !== 'Login') {
if(toName !== 'phoneIndex'){
localStorage.removeItem("param");
localStorage.setItem('param',JSON.stringify(param4))
next('/phoneIndex')
}else {
next()
}
} else {
if (toName.slice(0,5) !== 'phone') {
if(toName === 'LoginVerify'){
next('/blankPage')
}else {
if(toName === 'blankPage' || toName === 'processedPage') {
next()
}else {
extractedVerify()
}
}
}else {
if(toName !== 'blankPage'){
if(to.matched.length === 0){
next('/blankPage')
}else {
next()
}
}else {
next()
}
}
}
}
} else {
if ((token === null || token === '' ) && toName !== 'Login') {
if(webLoginType != null && webLoginType === 'idm' ){
if(code){
next()
}else {
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
extractedVerify(token)
}else {
if(path === '/standardSearch/All'){
extractedLocalStorage('standardSearch/All','');
}else {
extractedLocalStorage('home2','');
}
// ssoLoginUrlDev 默认sso 地址
window.location.href = ssoLoginUrlDev
}
}
}else if(webLoginType != null && webLoginType === 'dev'){
if (isMobile()) {
extractedVerify(token)
} else {
next('/Login')
}
}
}else {
extractedVerify(token)
}
}
function extractedVerify() {
if (taskId !== undefined && taskId !== null && prcId !== undefined && prcId !== null) {
get_verify_by_instance({
taskId: taskId, // 任务id
pId: prcId // 流程实例
}).then(res => {
let hisCount = res.hisCount === undefined ? 0 : res.hisCount;
let commitStatus = res.commitStatus === undefined ? 0 : res.commitStatus;
let isNotFinished = res.isNotFinished === undefined ? 0 : res.isNotFinished;
if ((hisCount && hisCount > 0)) { // 业务系统 当前节点已完成
if(isMobile()){
next('/processedPage')
}else {
// 根据type判断跳转具体流程页面
if (prcType === '1') {
// 标准入库流程数据
extracted("bzrkStep5");
} else if (prcType === '4') {
//标准清单发布流程数据
extracted("bzqdfbStep1-4");
} else if (prcType === '5') {
//标准项目合规评估 标准维度
if (path === "/xmpgStep2" || path === "/xmpgStep1" || path === "/xmpgStep1-2") {
extracted("xmpgStep1-2");
} else {
extracted("xmpgStep1-7");
}
} else if (prcType === '6') {
//标准项目合规评估 项目维度
if (path === "/xmpg2Step1" || path === "/xmpg2Step2" || path === "/xmpg2Step1-2") {
extracted("xmpg2Step1-2");
} else {
extracted("xmpg2Step1-12");
}
} else if (prcType === '8') {
// 未符合项整改
extracted("wfhxzgStep5-1");
} else if (prcType === '9') {
extracted("bzjdStep1-6");
//标准调研流程
} else if (prcType === '2') {
extracted("bzdyStep1-9");
} else if (prcType === '3') {
//标准征求意见
extracted("bzzqyjStep1-9");
} else if (prcType === '10') {
//项目清单确认
extracted("xmqdqrStep1-3");
}
}
} else { // 业务系统 当前节点未完成
// commitStatus 大于0 表示当前节点存在未完成干活流程
// isNotFinished OA 系统显示接受任务 已置为已办
if (routerType && routerType === 'oa' &&isNotFinished && isNotFinished > 0 && commitStatus && commitStatus > 0) {
if(isMobile()) {
extractedIphone()
}else if (prcType === '3') {
//标准征求意见 接受节点 未完成 oa已办 跳转详情页面
if (path === '/bzzqyjStep3') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}else if (prcType === '5') {
if (path === '/xmpgStep4') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}else if (prcType === '2') {
if (path === '/bzdyStep3') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}else if (prcType === '9') {
if (path === '/bzjdStep3') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}else if (prcType === '6') {
if (path === '/xmpg2Step6') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}else if (prcType === '10') {
if (path === '/xmqdqrStep2') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}else if (prcType === '8') {
if (path === '/wfhxzgStep4') {
extracted2("processAcceptDetail","prcNum=" + prcNum + "&tabsName=AlreadyProcess");
}
}
} else {
if(isMobile()) {
extractedIphone()
}else{
extracted3()
}
}
}
function extracted(routerPath) {
if (token === null || token === '') {
extractedLocalStorage(routerPath,param);
// ssoLoginUrlDev 默认sso 地址
window.location.href = ssoLoginUrlDev
} else {
next({path: routerPath + '?' +param})
}
}
function extracted3() {
if (token === null || token === '') {
extractedLocalStorage(toName,param);
// ssoLoginUrlDev 默认sso 地址
window.location.href = ssoLoginUrlDev
} else {
next()
}
}
function extractedIphone() {
let paramPhone = 'taskIds=' + taskId + '&prcId=' + prcId + '&prcNum=' + prcNum +
'&taskAssignee=' + toName + '&prcName=' + prcName + '&prcType=' + prcType
let phoneRouter = 'phone' + toName.charAt(0).toUpperCase() + toName.slice(1)
next({path: phoneRouter + '?' + paramPhone})
}
function extracted2(routerPath,param2) {
if (token === null || token === '') {
extractedLocalStorage(routerPath,param2);
// ssoLoginUrlDev 默认sso 地址
window.location.href = ssoLoginUrlDev
} else {
next({path: routerPath + '?' + param2})
}
}
function extracted4(routerPath,param4) {
if (token === null || token === '') {
extractedLocalStorage(routerPath,param4);
// ssoLoginUrlDev 默认sso 地址
window.location.href = ssoLoginUrlDev
} else {
next({path: routerPath + '?' + param4})
}
}
})
}
if(path === '/loginVerify'){
if(webLoginType != null && webLoginType === 'dev'){
next('/Login')
}else {
next()
}
}else {
next()
}
}
})
// 设置用户信息
function setUserInfo (userInfo) {
const timeStamp = new Date().getTime().toString()
const _USERINFO = JSON.parse(userInfo)
_USERINFO.userId = _USERINFO.userId || _USERINFO.usId
_USERINFO.userName = _USERINFO.userName || _USERINFO.uName
try {
localStorage.setItem('userInfo', JSON.stringify(_USERINFO))
localStorage.setItem('userInfoModifyTime', timeStamp)
} catch (e) {}
}
Vue.config.productionTip = false
// jquery
Vue.prototype.$ = $
@@ -52,6 +351,7 @@ Vue.use(VueI18n)
Vue.use(VueClipboard)
Vue.use(Contextmenu)
Vue.use(animate)
Vue.use(vant)
// Vue.prototype.$echarts = echarts
// 原生axios
+35
View File
@@ -0,0 +1,35 @@
<template>
<div class="blankPage">
<van-icon name="clear" color="#dabb27" size="70"/>
<div style="font-size: 15px;margin-top: 20px;color: #8c939d">当前任务不支持手机端处理</div>
<el-button type="primary" size="small" style="margin-top: 30px;width: 270px;" @click="closeWindow()">返回</el-button>
</div>
</template>
<script>
import Vue from 'vue';
import { Icon } from 'vant';
import hwh5 from '../../api/hwh5-cloudonline.js';
Vue.use(Icon);
export default {
name: "blankPage",
data() {
return {}
},
methods: {
closeWindow(){
hwh5.close()
}
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/phone';
.blankPage {
text-align: center;
margin-top: 55%;
}
</style>
@@ -2,8 +2,8 @@
<template>
<div class="attribute-custom v-class">
<div class="action-bar1">
<el-button class="common-button-primary add-button" size="mini" v-btn-permission="'7UARYUBX8J8BX3ELZDH2'" type="primary" @click="showAddModel"><i class="iconfont">&#xe84e;</i>新增</el-button>
<el-button class="common-button-default" size="mini" v-btn-permission="'8QSDDR8R7UMDS9S6M2HU'" @click="showDisplayLocationDialog" >展示区域管理</el-button>
<el-button class="common-button-primary add-button" style="margin-right: 5px" size="mini" v-btn-permission="''" type="primary" @click="showAddModel">新增</el-button>
<el-button class="common-button-default" size="small" v-btn-permission="''" @click="showDisplayLocationDialog" >展示区域管理</el-button>
</div>
<loading :loading="attributeDataLoading">数据处理中</loading>
<div class="content">
@@ -77,7 +77,7 @@
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'18f50c76137df9b3112d07942b0d517f'">编辑</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.isEdit==='1'" v-btn-permission="'eca5a9d90a5de7bf86c349cd0e73b1cf'" :command="[scope.row, '删除']">删除</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.isEdit==='1'" v-btn-permission="'c157be4e073787ea6c4a04bd39686c2d'" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -2,8 +2,8 @@
<template>
<div class="attribute-custom v-class">
<div class="action-bar1">
<el-button class="common-button-primary add-button" size="mini" type="primary" v-btn-permission="'H9WU2ZJHG5WNTY5MDUXH'" @click="showAddModel"><i class="iconfont">&#xe84e;</i>新增</el-button>
<el-button class="common-button-default" size="mini" @click="showDisplayLocationDialog" v-btn-permission="'XT94XKWBCTELWNJQVYCU'">展示区域管理</el-button>
<el-button class="common-button-primary add-button" style="margin-right: 5px" size="mini" type="primary" v-btn-permission="''" @click="showAddModel">新增</el-button>
<el-button class="common-button-default" size="small" @click="showDisplayLocationDialog" v-btn-permission="''">展示区域管理</el-button>
</div>
<loading :loading="attributeDataLoading">数据处理中</loading>
<div class="content">
@@ -282,7 +282,7 @@
</template>
<script>
const sarType = 'FOREIGN_LAWS'
const sarType = 'LAWS_STAND'
export default {
name: 'attribute-custom',
data () {
@@ -352,7 +352,7 @@ export default {
showRegionId: '',
selVal: '',
isSearch: '1',
sarType: 'FOREIGN_LAWS',
sarType: 'LAWS_STAND',
isWarn: '1'
},
attrTypeOptions: [
@@ -367,12 +367,12 @@ export default {
],
sarTypeOptions: [
// { label: '', value: 'INLAND_LAWS' },
{ label: '国内外政策', value: 'FOREIGN_LAWS' }
{ label: '国内外政策', value: 'LAWS_STAND' }
// { label: '', value: 'LAWS' }
],
sarTypeLocationOptions: [
// { label: '', value: 'INLAND_LAWS' },
{ label: '国内外政策', value: 'FOREIGN_LAWS' }
{ label: '国内外政策', value: 'LAWS_STAND' }
],
isMustOptions: [
{ label: '是', value: '0' },
@@ -710,7 +710,7 @@ export default {
let texts = ''
if (type === 'INLAND_LAWS') {
texts = '国内政策'
} else if (type === 'FOREIGN_LAWS') {
} else if (type === 'LAWS_STAND') {
texts = '国内外政策'
} else if (type === 'LAWS') {
texts = '国内外通用政策'
@@ -0,0 +1,674 @@
<!-- 配置管理 - 属性自定义 - 其他 -->
<template>
<div class="attribute-custom v-class">
<div class="action-bar1">
<el-button class="common-button-primary add-button" size="mini" type="primary" v-btn-permission="''" @click="showAddModel"><i class="el-icon-plus"></i>新增</el-button>
</div>
<loading :loading="attributeDataLoading">数据处理中</loading>
<div class="content">
<el-table
style="width: 100%;"
:data="attributeList"
height="100%"
border
ref="selections"
:header-cell-style="{background: '#e8e8e8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@on-selection-change="handleSelectone"
>
<el-table-column
type="selection"
width="55"
align="center"
>
</el-table-column>
<el-table-column
prop="sarType"
label="所属模块"
width="140"
>
<template slot-scope="scope">
{{ getSarTypeText(scope.row.sarType) }}
</template>
</el-table-column>
<el-table-column
prop="attrField"
label="属性字段"
>
</el-table-column>
<el-table-column
prop="attrName"
label="属性名称"
>
</el-table-column>
<el-table-column
prop="attrType"
label="属性类型"
>
<template slot-scope="scope">
{{ getAttrTypeText(scope.row.attrType) }}
</template>
</el-table-column>
<el-table-column
prop="attrLen"
label="字段长度"
width="120"
>
</el-table-column>
<el-table-column
prop="orderNum"
label="展示顺序"
width="100"
>
</el-table-column>
<el-table-column label="操作" align="center" width="50" fixed="right">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item :command="[scope.row, '编辑']" v-btn-permission="'b1e60ec7b60389713bf5b450ec2d1115'">编辑</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.isEdit==='1'" v-btn-permission="'c157be4e073787ea6c4a04bd39686c2d'" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<pagination :total="total" :pageChange="pageNo" :pageSizeChange="pageSize" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<!-- 新建抽屉-->
<el-drawer
:title="attributeTitle"
:visible.sync="showInfoModal"
size="800px"
:styles="styles"
:wrapperClosable="false"
@close="cancelModel"
>
<div class="demo-drawer-content">
<el-form
ref="attributeEO"
:model="attributeEO"
:rules="attributeEOFormRules"
class="label-input-form"
label-width="150px"
>
<input v-model="attributeEO.id" v-show="false">
<el-form-item label="所属模块" prop="sarType" class="add-form-item" v-show="false">
<el-input v-model="attributeEO.sarType" ></el-input>
</el-form-item>
<el-form-item label="属性字段" prop="attrField" class="add-form-item" :class="{'form-item-disabled': addOrEdit === 'edit'}">
<el-input v-model.trim="attributeEO.attrField" :disabled="addOrEdit === 'edit'" placeholder="请输入属性字段" clearable/>
</el-form-item>
<el-form-item label="属性名称" prop="attrName" class="add-form-item">
<el-input v-model.trim="attributeEO.attrName" placeholder="请输入属性名称" clearable/>
</el-form-item>
<el-form-item label="属性类型" prop="attrType" class="add-form-item" :class="{'form-item-disabled': addOrEdit === 'edit'}">
<el-select v-model="attributeEO.attrType" placeholder="请选择" :disabled="addOrEdit === 'edit'" filterable>
<el-option
v-for="item in attrTypeOptions"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="选项值" prop="selVal" class="add-form-item" v-if="attributeEO.attrType === 'SEL_OPTION' || attributeEO.attrType === 'SEL_OPTS'">
<el-select v-model="attributeEO.selVal" placeholder="请选择" :disabled="addOrEdit === 'edit'" filterable>
<el-option
v-for="item in relateDicIdOptions"
:label="item.label"
:value="item.value"
:key="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="字段长度" prop="attrLen" class="add-form-item">
<el-input v-model.number="attributeEO.attrLen" :disabled="addOrEdit === 'edit'" placeholder="只允许输入正整数" number :maxlength="4"/>
</el-form-item>
<el-form-item label="展示顺序" prop="orderNum" class="add-form-item">
<el-input v-model.number="attributeEO.orderNum" placeholder="只允许输入正整数" number :maxlength="3"/>
</el-form-item>
<el-form-item label="是否必填" prop="isMust" class="add-form-item">
<el-select v-model="attributeEO.isMust">
<el-option v-for="opt in isMustOptions" :key="opt.value" :value="opt.value" :label="opt.label">{{ opt.label }}</el-option>
</el-select>
</el-form-item>
<el-form-item label="是否展示" prop="isShowImp" class="add-form-item">
<el-select v-model="attributeEO.isShowImp">
<el-option
v-for="opt in isMustOptions"
:key="opt.value"
:value="opt.value"
:label="opt.label"
></el-option>
</el-select>
</el-form-item>
</el-form>
</div>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="saveInfo()">提交</el-button>
<el-button class="common-button-default" icon="el-icon-close" @click="cancelModel">取消</el-button>
</div>
</el-drawer>
<!-- <el-dialog
destroy-on-close
:close-on-click-modal="false"
:close-on-press-escape="false"
:visible.sync="displayLocationFormDialogVisible"
:title="displayLocationFormDialogTilte"
@on-ok="handleDisplayLocationFormDialogSubmit('displayLocationDialogForm')"
@on-cancel="handleDisplayLocationFormDialogReset('displayLocationDialogForm')"
width="400px"
>
<el-form
ref="displayLocationDialogForm"
:model="displayLocationDialogFormData"
:rules="displayLocationDialogFormRules"
label-width="100px"
class="label-input-form"
>
<el-form-item label="区域名称" prop="areaName" class="add-form-item">
<el-input v-model="displayLocationDialogFormData.areaName" placeholder="请输入区域名称"></el-input>
</el-form-item>
<el-form-item label="所属模块" prop="sarType" class="add-form-item">
<el-select v-model="displayLocationDialogFormData.sarType" filterable>
<el-option
v-for="item in sarTypeLocationOptions"
:key="item.value"
:label="item.label"
:value="item.value"
></el-option>
</el-select>
</el-form-item>
<el-form-item label="排序号" prop="showIndex" class="add-form-item">
<el-input v-model.number="displayLocationDialogFormData.showIndex" placeholder="请输入排序号"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button class="common-button-default" @click="handleDisplayLocationFormDialogReset('displayLocationDialogForm')"> </el-button>
<el-button class="common-button-primary" type="primary" @click="handleDisplayLocationFormDialogSubmit('displayLocationDialogForm')"> </el-button>
</span>
</el-dialog>-->
</div>
</template>
<script>
const sarType = 'OTHER'
export default {
name: 'attribute-custom',
data () {
return {
sarType: sarType,
displayLocationDialogTableConfig: {
columns: [
{
title: '展示区域',
key: 'areaName'
},
{
title: '排序号',
key: 'showIndex'
},
{
title: '操作',
slot: 'operations'
}
],
page: {
pageSize: 100,
currentPage: 1,
total: 0
},
loading: false
},
displayLocationDialogTableData: [],
displayLocationDialogVisible: false,
displayLocationFormDialogVisible: false,
defaultDisplayLocationDialogFormData: {
areaName: '',
sarType: '',
showIndex: ''
},
displayLocationDialogFormData: {
areaName: '',
showIndex: ''
},
displayLocationDialogFormRules: {
areaName: [
{ required: true, message: '请输入展示区域', trigger: 'blur' },
{ type: 'string', max: 100, message: '最多输入100字', trigger: 'blur' }
],
sarType: [
{required: true, message: '所属模块不能为空', trigger: 'change'}
],
showIndex: [
{ type: 'number', required: true, message: '不能为空且为正整数', trigger: 'blur' },
{ type: 'number', min: 0, max: 999, message: '请输入0-999之间的整数', trigger: 'blur' }
]
},
attributeDataLoading: false,
attributeList: [],
total: 0,
pageNo: 1,
pageSize: this.$store.getters.userInfo.configContent,
attributeEO: {
id: '',
attrField: '',
attrName: '',
attrLen: '',
attrType: '',
orderNum: '',
isMust: '1',
isShowImp: '0',
selVal: '',
isSearch: '1',
sarType: 'OTHER',
isWarn: '1'
},
attrTypeOptions: [
{ label: '输入框(字符串)', value: 'INPUT_STR' },
{ label: '输入框(数字)', value: 'INPUT_NUM' },
{ label: '单选下拉框', value: 'SEL_OPTION' },
{ label: '多选下拉框', value: 'SEL_OPTS' },
{ label: '单日期选择', value: 'DATE_PICKER' },
{ label: '多日期选择', value: 'DATE_PIC_OPTS' },
{ label: '文件', value: 'FILE' },
{ label: '文本框', value: 'TEXTAREA' }
],
sarTypeLocationOptions: [
// { label: '', value: 'INLAND_LAWS' },
{ label: '国内外政策', value: 'Other' }
],
isMustOptions: [
{ label: '是', value: '0' },
{ label: '否', value: '1' }
],
showRegionOptions: [],
relateDicIdOptions: [],
attributeTitle: '',
showInfoModal: false,
attributeEOFormRules: {
sarType: [
{required: true, message: '所属模块不能为空', trigger: 'change'}
],
attrField: [
{required: true, message: '属性字段不能为空', trigger: 'blur'},
{type: 'string', max: 50, message: '最多输入50位', trigger: 'blur'},
{type: 'string', validator: this.verify.validFieldOracle, trigger: 'blur'}
],
attrName: [
{required: true, message: '属性名称不能为空', trigger: 'blur'},
{type: 'string', max: 100, message: '最多输入100位', trigger: 'blur'}
],
attrType: [
{required: true, message: '属性类型不能为空', trigger: 'change'}
],
attrLen: [
{type: 'number', required: true, message: '字段长度不能为空且为正整数', trigger: 'blur'},
{type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'}
],
orderNum: [
{type: 'number', required: true, message: '展示顺序不能为空且为正整数', trigger: 'blur'},
{type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'}
],
isMust: [
{required: true, message: '是否必填不能为空', trigger: 'change'}
],
isShowImp: [
{required: true, message: '是否展示必填不能为空', trigger: 'change'}
],
showRegionId:[
{required:true, message:'展示区域不能为空', trigger:'change'}
]
},
styles: {
height: 'calc(100% - 55px)',
overflow: 'auto',
paddingBottom: '53px',
position: 'static'
},
addOrEdit: '',
selectedList: []
}
},
computed: {
/*displayLocationFormDialogTilte () {
const formData = {...this.displayLocationDialogFormData}
const isEdit = !!formData.id
return isEdit ? '修改展示区域' : '新增展示区域'
}*/
},
methods: {
//
handleCommand (command) {
switch (command[1]) {
case '编辑':
this.handleTableEdit(command[0])
break
case '删除':
this.handleTableDelete(command[0])
break
}
},
//
handleCommand2 (command) {
switch (command[1]) {
case '修改':
this.showAddDisplayLocationDialog(command[0])
break
case '删除':
this.removeDisplayLocation(command[0])
break
}
},
removeDisplayLocation (data) {
this.$confirm('确认删除该条数据?', {
confirmButtonClass: 'common-button-primary',
roundButton: false,
title: '确认删除',
callback: (action, instance) => {
if (action === 'confirm') {
const {id} = data
this.$http.delete('lawssBase/utArea/deleteById', {
id,
sarType: this.sarType
}, {
_this: this
}, res => {
this.queryDisplayLocationDialogTableData()
}, e => {
console.log(e)
})
}
}
})
},
handleDisplayLocationFormDialogSubmit (name) {
this.$refs[name].validate((valid) => {
if (valid) {
const formData = {...this.displayLocationDialogFormData, sarType: this.sarType}
const isEdit = !!formData.id
const url = isEdit ? 'lawssBase/utArea/updateUtArea' : 'lawssBase/utArea/createUtArea'
const method = isEdit ? 'putData' : 'postData'
this.$http[method](url, formData, {
_this: this
}, res => {
this.displayLocationFormDialogVisible = false
this.queryDisplayLocationDialogTableData()
// this.displayLocationDialogTableData = res.data.list
// this.displayLocationDialogTableConfig.page.total = res.data.count
}, e => {
console.log(e)
})
} else {
// this.$message.error('Fail!')
}
})
},
handleDisplayLocationFormDialogReset (name) {
this.displayLocationFormDialogVisible = false
this.$nextTick(() => {
this.$refs.displayLocationDialogForm.resetFields()
})
},
/**
* 打开新增展示区域管理弹框
*/
showAddDisplayLocationDialog (data) {
if (data) {
//
this.displayLocationDialogFormData = {
areaName: data.areaName,
showIndex: data.showIndex,
id: data.id,
sarType: data.sarType
}
} else {
this.displayLocationDialogFormData = {...this.defaultDisplayLocationDialogFormData}
}
this.displayLocationFormDialogVisible = true
},
/**
* 查询展示区域管理弹框里的列表数据
*/
queryDisplayLocationDialogTableData () {
return new Promise((resolve, reject) => {
this.$http.get('lawssBase/utArea/page', {
page: this.displayLocationDialogTableConfig.page.currentPage,
pageSize: this.displayLocationDialogTableConfig.page.pageSize,
sarType: this.sarType
}, {
_this: this.displayLocationDialogTableConfig,
loading: 'loading'
}, res => {
this.displayLocationDialogTableData = res.data.list
this.displayLocationDialogTableConfig.page.total = res.data.count
resolve(res)
}, e => {
console.log(e)
reject(e)
})
})
},
/**
* 查询新增弹框里的列表数据
*/
queryDisplayLocationList (sarType) {
return new Promise((resolve, reject) => {
this.$http.get('lawssBase/utArea/getAreaList', {
sarType: sarType || this.sarType
}, {
_this: this
}, res => {
this.showRegionOptions = res.data || []
resolve(res)
}, e => {
console.log(e)
reject(e)
})
})
},
handleSelectone (data) {
this.selectedList = []
for (let i = 0; i < data.length; i++) {
this.selectedList.push(data[i].id)
}
},
pageChange (page) {
this.pageNo = page
this.getAttrByPage()
},
pageSizeChange (pageSize) {
this.pageSize = pageSize
this.getAttrByPage()
},
getAttrByPage () {
this.$http.get('lawss/sarStandAttrDetails/page', {
page: this.pageNo,
pageSize: this.pageSize,
sarType: this.sarType
}, {
_this: this,
loading: 'attributeDataLoading'
},
res => {
this.attributeList = res.data.list
this.total = res.data.count
}, e => {})
this.$refs.selections.clearSelection()
},
async showAddModel () {
await this.queryDisplayLocationList()
// this.$refs['attributeEO'] && this.$refs['attributeEO'].resetFields()
this.attributeEO.newWebSite = ''
this.addOrEdit = 'add'
this.attributeTitle = '新增'
this.showInfoModal = true
this.$nextTick(() => {
this.$refs['attributeEO'].resetFields()
})
},
saveInfo () {
this.$refs['attributeEO'].validate((valid) => {
if (valid) {
if ((this.attributeEO.attrType === 'SEL_OPTION' || this.attributeEO.attrType === 'SEL_OPTS') && (this.attributeEO.selVal == null || this.attributeEO.selVal === '')) {
this.$message.warning('下拉框类型字段,选项值不能为空')
} else {
if (this.addOrEdit === 'add') {
this.$http.postData('lawss/sarStandAttrDetails/createStandAttrDetails', this.attributeEO,
{
_this: this
}, res => {
if (res.ok) {
this.getAttrByPage()
this.showInfoModal = false
} else {
}
})
} else {
this.$http.putData('lawss/sarStandAttrDetails/updateStandAttrDetails', this.attributeEO,
{
_this: this
}, res => {
if (res.ok) {
this.getAttrByPage()
this.showInfoModal = false
} else {
}
})
}
}
}
})
},
cancelModel () {
this.showInfoModal = false
this.$refs['attributeEO'] && this.$refs['attributeEO'].resetFields()
},
deleteAttr () {
if (this.selectedList.length === 0) {
this.$message.error('请先选择要删除的数据!')
} else {
this.$confirm('确认删除选中数据?', {
title: '提示',
confirmButtonClass: 'common-button-primary',
roundButton: false,
callback: (action, instance) => {
if (action === 'confirm') {
this.$http.put('lawss/sarStandAttrDetails/deleteByIds', {
ids: this.selectedList.join(','),
sarType: this.sarType
}, {
_this: this
}, res => {
this.getAttrByPage()
}, e => {
})
}
}
})
}
},
getDictionarySelList () {
this.$http.get('sys/dictionary/getDictionaryCodeSelList', {
sarType: this.sarType
}, {
_this: this
},
res => {
this.relateDicIdOptions = res.data
}, e => {})
},
getAttrTypeText (type) {
let texts = ''
if (type === 'INPUT_STR') {
texts = '输入框(字符串)'
} else if (type === 'INPUT_NUM') {
texts = '输入框(数字)'
} else if (type === 'SEL_OPTION') {
texts = '单选下拉框'
} else if (type === 'SEL_OPTS') {
texts = '多选下拉框'
} else if (type === 'DATE_PICKER') {
texts = '单日期选择'
} else if (type === 'DATE_PIC_OPTS') {
texts = '多日期选择'
} else if (type === 'FILE') {
texts = '文件'
} else if (type === 'TEXTAREA') {
texts = '文本框'
}
return texts
},
getSarTypeText (type) {
let texts = ''
if (type === 'OTHER') {
texts = '其他'
}
return texts
},
async handleTableEdit (params) {
await this.queryDisplayLocationList(params.sarType)
// this.$refs['attributeEO'] && this.$refs['attributeEO'].resetFields()
this.addOrEdit = 'edit'
this.attributeTitle = '编辑'
this.showInfoModal = true
this.attributeEO = JSON.parse(JSON.stringify(params))
},
handleTableDelete (params) {
this.selectedList = []
this.selectedList.push(params.id)
this.deleteAttr()
},
async handleSarTypeChange (sarType) {
this.attributeEO.showRegionId = ''
await this.queryDisplayLocationList(sarType)
}
},
mounted () {
this.getAttrByPage()
this.getDictionarySelList()
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
.attribute-custom{
background: #FFF;
height: 100%;
position: relative;
display: flex;
flex-direction: column;
flex: auto;
.action-bar{
padding: 0;
}
.content {
padding: 0;
overflow-y: auto;
flex: auto;
display: flex;
flex-direction: column;
//height: calc(~'100% - 50px - 56px');
}
.pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
.modalStyle{
padding: 14px;
font-size: 15px;
}
.sysMenuTreeDiv{
height: 400px;
overflow-y: auto;
}
}
</style>
@@ -2,8 +2,8 @@
<template>
<div class="attribute-custom v-class">
<div class="action-bar1">
<el-button class="common-button-primary add-button" size="mini" v-btn-permission="''" type="primary" @click="showAddModel"><i class="iconfont">&#xe84e;</i>新增</el-button>
<el-button class="common-button-default" size="small" v-btn-permission="''" @click="showDisplayLocationDialog">展示区域管理</el-button>
<el-button size="mini" style="margin-right: 5px" class="common-button-primary add-button" type="primary" @click="showAddModel">新增</el-button>
<el-button size="small" class="common-button-default" @click="showDisplayLocationDialog">展示区域管理</el-button>
</div>
<loading :loading="attributeDataLoading">数据处理中</loading>
<div class="content">
@@ -74,16 +74,16 @@
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="''" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
<el-dropdown-item v-btn-permission="''" :disabled="scope.row.isEdit==='1'" :command="[scope.row, '删除']">删除</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '编辑']">编辑</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.isEdit==='1'" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</el-table>
</div>
<pagination :total="total" :pageChange="pageNo" :pageSizeChange="pageSize" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
<!-- 新建抽屉-->
@@ -188,8 +188,8 @@
</el-form>
</div>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="saveInfo()">提交</el-button>
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelModel">取消</el-button>
<el-button class="common-button-primary" icon="el-icon-check" type="primary" @click="saveInfo()">提交</el-button>
<el-button class="common-button-default" icon="el-icon-close" @click="cancelModel">取消</el-button>
</div>
</el-drawer>
@@ -199,7 +199,7 @@
width="400px"
>
<div style="margin-bottom: 10px;">
<el-button size="mini" class="common-button-primary add-button" v-btn-permission="'e128da8f053dd19113e75772f2c70f29'" type="primary" icon="add" @click="showAddDisplayLocationDialog(undefined)">新增</el-button>
<el-button class="common-button-primary add-button" type="primary" icon="add" @click="showAddDisplayLocationDialog(undefined)">新增</el-button>
</div>
<el-table
:loading="displayLocationDialogTableConfig.loading"
@@ -228,10 +228,10 @@
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand2">
<i class="iconfont">&#xe61e;</i>
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'2a788bca1cca66384e97f8ff722d4232'" :command="[scope.row, '修改']">修改</el-dropdown-item>
<el-dropdown-item v-btn-permission="'116a3f339f3600e639271d0073045912'" :disabled="scope.row.validFlag===1" :command="[scope.row, '删除']">删除</el-dropdown-item>
<el-dropdown-item :command="[scope.row, '修改']">修改</el-dropdown-item>
<el-dropdown-item :disabled="scope.row.validFlag===1" :command="[scope.row, '删除']">删除</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
@@ -261,7 +261,7 @@
<el-form-item label="所属模块" prop="sarType" class="add-form-item">
<el-select v-model="displayLocationDialogFormData.sarType" filterable>
<el-option
v-for="item in sarTypeLocationOptions"
v-for="item in sarTypeOptions"
:key="item.value"
:label="item.label"
:value="item.value"
@@ -269,12 +269,12 @@
</el-select>
</el-form-item>
<el-form-item label="排序号" prop="showIndex" class="add-form-item">
<el-input v-model="displayLocationDialogFormData.showIndex" placeholder="请输入排序号"></el-input>
<el-input v-model.number="displayLocationDialogFormData.showIndex" placeholder="请输入排序号"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button size="mini" class="common-button-default" @click="handleDisplayLocationFormDialogReset('displayLocationDialogForm')"> </el-button>
<el-button size="mini" class="common-button-primary" type="primary" @click="handleDisplayLocationFormDialogSubmit('displayLocationDialogForm')"> </el-button>
<el-button class="common-button-default" @click="handleDisplayLocationFormDialogReset('displayLocationDialogForm')"> </el-button>
<el-button class="common-button-primary" type="primary" @click="handleDisplayLocationFormDialogSubmit('displayLocationDialogForm')"> </el-button>
</span>
</el-dialog>
</div>
@@ -319,7 +319,6 @@ export default {
},
displayLocationDialogFormData: {
areaName: '',
sarType: '',
showIndex: ''
},
displayLocationDialogFormRules: {
@@ -331,9 +330,8 @@ export default {
{required: true, message: '所属模块不能为空', trigger: 'change'}
],
showIndex: [
{ required: true, message: '排序号不能为空且为正整数', trigger: 'blur'},
{ type: 'string', validator: this.verify.validStandNumInCompile2, trigger: 'blur'},
{ min: 0, max: 999, message: '请输入0-999之间的整数', trigger: 'blur' }
{ type: 'number', required: true, message: '请输入排序号', trigger: 'blur' },
{ type: 'number', min: 0, max: 999, message: '请输入0-999之间的整数', trigger: 'blur' }
]
},
attributeDataLoading: false,
@@ -353,7 +351,7 @@ export default {
showRegionId: '',
selVal: '',
isSearch: '1',
sarType: 'STAND',
sarType: '',
isWarn: '1'
},
attrTypeOptions: [
@@ -561,7 +559,7 @@ export default {
queryDisplayLocationList (sarType) {
return new Promise((resolve, reject) => {
this.$http.get('lawssBase/utArea/getAreaList', {
sarType: sarType
sarType: sarType || 'INLAND_STAND'
}, {
_this: this
}, res => {
@@ -589,17 +587,17 @@ export default {
},
getAttrByPage () {
this.$http.get('lawss/sarStandAttrDetails/page', {
page: this.pageNo,
pageSize: this.pageSize,
sarType: this.sarType
}, {
_this: this,
loading: 'attributeDataLoading'
},
res => {
this.attributeList = res.data.list
this.total = res.data.count
}, e => {})
page: this.pageNo,
pageSize: this.pageSize,
sarType: this.sarType
}, {
_this: this,
loading: 'attributeDataLoading'
},
res => {
this.attributeList = res.data.list
this.total = res.data.count
}, e => {})
this.$refs.selections.clearSelection()
},
async showAddModel () {
@@ -678,13 +676,13 @@ export default {
},
getDictionarySelList () {
this.$http.get('sys/dictionary/getDictionaryCodeSelList', {
sarType: this.sarType
}, {
_this: this
},
res => {
this.relateDicIdOptions = res.data
}, e => {})
sarType: this.sarType
}, {
_this: this
},
res => {
this.relateDicIdOptions = res.data
}, e => {})
},
getAttrTypeText (type) {
let texts = ''
@@ -724,7 +722,9 @@ export default {
this.addOrEdit = 'edit'
this.attributeTitle = '编辑'
this.showInfoModal = true
this.attributeEO = JSON.parse(JSON.stringify(params))
this.$nextTick(() => {
this.attributeEO = JSON.parse(JSON.stringify(params))
})
},
handleTableDelete (params) {
this.selectedList = []
@@ -6,16 +6,21 @@
<stand v-if="tabValue === 'stand'"></stand>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="国内外政策" name="laws">
<el-tab-pane label="国内外政策" name="laws">
<div style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;">
<laws v-if="tabValue === 'laws'"></laws>
</div>
</el-tab-pane>-->
</el-tab-pane>
<el-tab-pane label="企业标准库" name="buss">
<div style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;">
<buss v-if="tabValue === 'buss'"></buss>
</div>
</el-tab-pane>
<!-- <el-tab-pane label="其他" name="other">
<div style="position: absolute;top: 0;left: 0;right: 0;bottom: 0;">
<other v-if="tabValue === 'other'"></other>
</div>
</el-tab-pane>-->
</el-tabs>
</div>
</template>
@@ -24,12 +29,14 @@
import Laws from './components/laws'
import Stand from './components/stand'
import Buss from './components/buss'
/*import Other from './components/other'*/
export default {
name: 'index',
components: {
Laws,
Stand,
Buss
Buss,
// Other
},
data () {
return {
@@ -185,7 +185,7 @@ export default {
pubOrgName: '',
content: '',
linkUri: '',
uploadPath: 'uploadPath',
uploadPath: 'file',
resPk: '',
fileList: [],
picList: [],
@@ -174,7 +174,7 @@ export default {
pubOrgName: '',
content: '',
linkUri: '',
uploadPath: 'uploadPath',
uploadPath: 'file',
resPk: '',
fileList: [],
picList: [],
@@ -37,7 +37,7 @@
type="primary"
round
@click="openAddMSGModal"
v-btn-permission="'HJ9NVMRSUN'"><i class="iconfont">&#xe84e;</i>新增</el-button>
v-btn-permission="'HJ9NVMRSUN'"><i class="el-icon-plus"></i>新增</el-button>
<el-button class="common-button-default delete-button"
round
@click="batchMSGDel"
@@ -31,7 +31,7 @@
type="primary"
round
v-btn-permission="'QZL5DZDFNM'"
@click="openAddMSGModal(1)"><i class="iconfont">&#xe84e;</i>新增</el-button>
@click="openAddMSGModal(1)"><i class="el-icon-plus"></i>新增</el-button>
<el-button class="common-button-default delete-button"
round
v-btn-permission="'HVGR9K778X'"
@@ -5,7 +5,7 @@
<el-button class="common-button-primary add-button"
type="primary"
round
@click="openAddMSGModal(1)" v-btn-permission="'W8VY4K4XNPH6GABQBG82'"><i class="iconfont">&#xe84e;</i>新增</el-button>
@click="openAddMSGModal(1)" v-btn-permission="'W8VY4K4XNPH6GABQBG82'"><i class="el-icon-plus"></i>新增</el-button>
<el-button class="common-button-default delete-button"
round
@click="batchMSGDel(1)" v-btn-permission="'58URKBHGS4QDHSKXG4SS'"><i class="iconfont">&#xe61b;</i>批量删除</el-button>
@@ -8,7 +8,7 @@
<!-- class="common-button-primary add-button"-->
<!-- type="primary"-->
<!-- round-->
<!-- @click="clickAddTree"><i class="iconfont">&#xe84e;</i>新增</el-button>-->
<!-- @click="clickAddTree"><i class="el-icon-plus"></i>新增</el-button>-->
</span>
<div class="tree">
<laws-tree :zNodes="zNodes"
+57 -378
View File
@@ -1,389 +1,68 @@
<!-- 配置管理 - 链接管理 -->
<template>
<div id="post-manage">
<!-- 头部操作按钮-->
<div class="action-bar">
<el-button type="primary"
class="common-button-primary add-button"
@click="addLink"
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
size="mini">新增</el-button>
<!-- <el-button type="primary"-->
<!-- class="common-button-primary add-button"-->
<!-- @click="linkOrder"-->
<!-- v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"-->
<!-- size="mini">顺序调整</el-button>-->
<el-button type="primary"
class="common-button-primary add-button"
@click="deleteAllLink"
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
size="mini">删除</el-button>
</div>
<!-- 表格-->
<div class="content">
<el-table
:data="linkList"
tooltip-effect="dark"
border
style="width: 100%; flex: auto;"
class="drag-table"
height="100%"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="orderBy"
label="序号"
align="center"
width="50px">
</el-table-column>
<el-table-column
prop="name"
label="链接名称"
width="220px">
</el-table-column>
<el-table-column
label="链接">
<template slot-scope="scope" >
<span v-if="scope.row.url.slice(0,7) === 'http://'" @click="linkto(scope.row.url)" style="color: #0c91e5;cursor: pointer;text-decoration: underline">
{{ scope.row.url }}
</span>
<span v-else @click="linkto('http://' + scope.row.url)" style="color: #0c91e5;cursor: pointer;text-decoration: underline">{{ scope.row.url }}</span>
</template>
</el-table-column>
<el-table-column
label="操作"
width="50px">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'0fbb849e244e07433a90180fb314ad10'" :command="[scope.row, '删除']">删除</el-dropdown-item>
<el-dropdown-item v-btn-permission="'fa0846d977aeef07e9cb7faf648f8f7f'" :command="[scope.row, '编辑']">编辑</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<loading :loading="Loading">加载中...</loading>
<!-- 新增链接弹窗-->
<el-dialog
:title="dialogTitle"
:visible.sync="modalshowflag"
:wrapperClosable="false"
size="800px"
@close="resetForm"
>
<el-form
ref="sarStandardsInfoForm"
:model="sarStandardsInfoEO"
:rules="sarStandardsInfoRules"
class="label-input-form"
>
<el-form-item label="链接名称" prop="name" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.name"
placeholder="请输入链接名称"
clearable></el-input>
</el-form-item>
<el-form-item label="链接" prop="url" label-width="150px" class="add-form-item">
<el-input v-model="sarStandardsInfoEO.url"
placeholder="请输入链接">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="resetForm">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
<div class="data-link">
<el-tabs v-model="activeName">
<el-tab-pane label="第一行链接" name="firstLink">
<first-link v-if="activeName === 'firstLink'"></first-link>
</el-tab-pane>
<el-tab-pane label="第二行链接" name="secondLink">
<second-link v-if="activeName === 'secondLink'"></second-link>
</el-tab-pane>
</el-tabs>
</div>
</template>
<script>
import Sortable from 'sortablejs'
export default {
name: "linkManage",
data () {
return {
editId: '',
type: '', // 1 2
dialogTitle: '',
submitLoading: false,
// 使
data: [],
Loading: false,
modalshowflag: false,
//
order:[],
//
selectList:[],
selectId:[],
ids:'',
// 使
sarStandardsInfoEO: {
name: '',
url: '',
// sortId: ''
},
//
sarStandardsInfoRules: {
name: [
{ required: true, message: '请输入链接名称', trigger: 'blur' }
],
url: [
{ required: true, message: '请输入链接', trigger: 'blur' }
]
},
modalRole: false,
props: {
label: 'name',
children: 'children'
},
linkList: [],
sortData: [],
}
},
methods: {
//,http://xxxxxx
linkto(link_href){
window.open(link_href)
},
//
addLink () {
this.type = 1
this.dialogTitle = '新增链接'
this.modalshowflag = true
},
//
deleteLink (row) {
this.$confirm('此操作将删除该链接, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('sarUrl/tsUrl/delete', {
id: row.id
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('删除成功')
let arr = []
for (let a = 0; a < this.linkList.length; a++) {
if (this.linkList[a].id === row.id) {
this.linkList.splice(a, 1)
}
}
this.linkList.forEach((item, index) => {
let json = {}
json.id = item.id
json.orderBy = index + 1
arr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
this.getLink()
})
}else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//
deleteAllLink() {
this.selectId=[]
for (var i=0;i<this.selectList.length;i++){
this.selectId.push(this.selectList[i].id)
}
this.ids = this.selectId.join(",")
if (this.selectList.length === 0) {
this.$message.warning('请选择要删除的链接')
} else {
this.modalRole = true
this.$confirm('此操作将删除链接, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('sarUrl/tsUrl/deleteBatch', {
ids: this.ids
}, {}, res => {
if (res.ok) {
this.$message.success('删除成功')
let arr = this.linkList.filter(items => {
if (!this.ids.includes(items.id)) return items;
})
let newArr = []
arr.forEach((item, index) => {
let json = {}
json.id = item.id
json.orderBy = index + 1
newArr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(newArr), {}, res => {
this.getLink()
})
}else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
//
resetForm () {
this.$refs['sarStandardsInfoForm'].resetFields();
this.modalshowflag = false
},
//
submit () {
this.$refs['sarStandardsInfoForm'].validate((valid) => {
if (valid) {
if (this.type === 1) {
this.$http.postData('/sarUrl/tsUrl/add', {
...this.sarStandardsInfoEO,
}, {
_this: this,
loading: 'Loading'
}, res=> {
if (res.ok) {
this.$message.success('新增成功')
this.modalshowflag = false
this.getLink()
} else {
this.$message.warning(res.message)
}
})
} else {
//
this.$http.putData('/sarUrl/tsUrl/edit', {
id: this.editId,
name: this.sarStandardsInfoEO.name,
url: this.sarStandardsInfoEO.url,
}, {
_this: this,
loading: 'Loading'
}, res=> {
if (res.ok) {
this.$message.success('修改成功')
this.modalshowflag = false
this.getLink()
} else {
this.$message.warning(res.message)
}
})
}
} else {
return false;
}
});
},
//
handleCommand (command) {
switch (command[1]) {
case '删除':
this.deleteLink(command[0])
break
case '编辑':
this.editLink(command[0])
break
}
},
//
editLink (row) {
this.type = 2
this.editId = row.id
this.sarStandardsInfoEO.name = row.name
this.sarStandardsInfoEO.url = row.url
this.sarStandardsInfoEO.sortId = row.sortId
this.dialogTitle = '修改链接'
this.modalshowflag = true
},
//
handleSelectionChange (val) {
this.selectList = val
},
//
getLink () {
this.$http.get('sarUrl/tsUrl', {
}, {
_this: this,
loading: 'Loading'
}, res=> {
this.linkList = res.data
this.initSortable()
})
},
initSortable () {
this.sortData = [...this.linkList]
const el = document.querySelector('.el-table__body-wrapper tbody')
//
this.sortable = Sortable.create(el, {
sort: true, //
animation: 150,
onEnd: ({newIndex, oldIndex}) => {
const val = this.sortData[oldIndex]
this.sortData.splice(oldIndex, 1)
this.sortData.splice(newIndex, 0, val)
this.sortData.forEach((item, index) => {
item.orderBy = index + 1
})
let arr = []
this.sortData.forEach(item => {
let json = {}
json.id = item.id
json.orderBy = item.orderBy
arr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
if (res.ok) {
this.$message.success('保存成功')
} else {
this.$message.warning('保存失败!')
}
})
}
})
},
},
mounted() {
this.getLink();
}
import firstLink from "./linkType/firstLink";
import secondLink from "./linkType/secondLink";
export default {
name: "linkManage",
components: {
firstLink,
secondLink
},
data() {
return {
activeName: 'firstLink',
}
},
methods: {
},
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
#post-manage {
height: 100%;
.content {
height: calc(~'100% - 53px')
}
.filter-tree {
height: calc(~'100% - 50px')
}
@import '~@/assets/styles/mixins';
.data-link{
height: 100%;
padding: 0 10px;
background: #fff;
display: flex;
flex-direction: column;
/deep/ .el-tabs {
flex: auto;
display: flex;
flex-direction: column;
/deep/ .el-tabs__header {
margin: 0 !important;
}
.el-tabs__content {
height: 100% !important;
flex: auto;
position: relative;
display: flex;
flex-direction: column;
.el-tab-pane {
height: 100%;
flex: auto;
display: flex;
flex-direction: column;
}
}
}
}
</style>
@@ -0,0 +1,573 @@
<!-- 配置管理 - 链接管理 -->
<template>
<div id="post-manage">
<!-- 头部操作按钮-->
<div class="action-bar">
<el-button
type="primary"
class="common-button-primary add-button"
@click="addLink"
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
size="mini">新增
</el-button>
<!-- <el-button
type="primary"
class="common-button-primary add-button"
@click="linkOrder"
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
size="mini">顺序调整
</el-button>-->
<el-button
type="danger"
class="common-button-primary add-button"
@click="deleteAllLink"
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
size="mini">删除
</el-button>
</div>
<!-- 表格-->
<div class="content">
<el-table
:data="linkListFirst"
tooltip-effect="dark"
border
style="width: 100%; flex: auto;"
class="drag-table"
height="100%"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="orderBy"
label="序号"
align="center"
width="50px">
</el-table-column>
<el-table-column
prop="name"
label="链接名称">
</el-table-column>
<!-- <el-table-column
prop="icon"
label="链接图标">
<template slot-scope="scope">
<img v-if="scope.row.icon !== ''" style="height: 50px;width: 50px" :src="scope.row.icon">
<span v-else>{{ '-' }}</span>
</template>
</el-table-column>-->
<el-table-column
prop="url"
show-overflow-tooltip
label="链接">
<template slot-scope="scope">
<span v-if="scope.row.url.slice(0,7) === 'http://' || scope.row.url.slice(0,8) === 'https://'" @click="linkto(scope.row.url)" style="color: #0c91e5;cursor: pointer;text-decoration: underline">
{{ scope.row.url }}
</span>
<span v-else @click="linkto('http://' + scope.row.url)" style="color: #0c91e5;cursor: pointer;text-decoration: underline">
{{ 'http://' + scope.row.url }}
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
width="50px">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'0fbb849e244e07433a90180fb314ad10'" :command="[scope.row, '删除']">
删除
</el-dropdown-item>
<el-dropdown-item v-btn-permission="'fa0846d977aeef07e9cb7faf648f8f7f'" :command="[scope.row, '编辑']">
编辑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<loading :loading="Loading">加载中...</loading>
<!-- 新增链接弹窗-->
<el-dialog
:close-on-click-modal="false"
:title="dialogTitle"
:visible.sync="modalshowflag"
:wrapperClosable="false"
size="800px"
@close="resetForm"
>
<el-form
ref="sarStandardsInfoForm"
:model="sarStandardsInfoEO"
:rules="sarStandardsInfoRules"
class="label-input-form"
>
<el-form-item label="链接类型" prop="type" label-width="150px" class="add-form-item">
<el-input :disabled="true" v-if="sarStandardsInfoEO.type === 1" value="第一行链接"/>
</el-form-item>
<el-form-item label="链接名称" prop="name" label-width="150px" class="add-form-item">
<el-input
v-model="sarStandardsInfoEO.name"
placeholder="请输入链接名称"
maxlength="20"
show-word-limit
clearable></el-input>
</el-form-item>
<!-- <el-form-item label="链接图标" prop="icon" label-width="150px" class="add-form-item">
<el-upload
v-model="sarStandardsInfoEO.icon"
class="upload-demo"
:action="uploadUrl"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload"
>
<img width="100%" v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>-->
<el-form-item label="链接" prop="url" label-width="150px" class="add-form-item">
<el-input
v-model="sarStandardsInfoEO.url"
maxlength="100"
show-word-limit
placeholder="请输入链接">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="resetForm">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" :loading="subLoading" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Sortable from 'sortablejs'
import {getImg} from '@/api/linkApi.js'
export default {
name: "firstLink",
data() {
return {
editId: '',
type: '', // 1 2
dialogTitle: '',
submitLoading: false,
// 使
data: [],
Loading: false,
modalshowflag: false,
//
order: [],
//
selectList: [],
selectId: [],
ids: '',
// 使
sarStandardsInfoEO: {
name: '',
url: '',
icon: '',
type: 1,
// sortId: ''
},
//
sarStandardsInfoRules: {
name: [
{required: true, message: '请输入链接名称', trigger: 'blur'}
],
url: [
{required: true, message: '请输入链接', trigger: 'blur'}
]
},
modalRole: false,
props: {
label: 'name',
children: 'children'
},
linkListFirst: [],
linkList: [],
sortData: [],
imageUrl: '',
uploadUrl: 'api/att/attFile/upload',
subLoading: false
}
},
methods: {
//,http://xxxxxx
linkto(link_href) {
window.open(link_href)
},
//
addLink() {
this.type = 1
this.dialogTitle = '新增链接'
this.modalshowflag = true
},
//
deleteLink(row) {
this.$confirm('此操作将删除该链接, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('sarUrl/tsUrl/delete', {
id: row.id
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('删除成功')
let arr = []
for (let a = 0; a < this.linkList.length; a++) {
if (this.linkList[a].id === row.id) {
this.linkList.splice(a, 1)
}
}
this.linkList.forEach((item, index) => {
let json = {}
json.id = item.id
json.orderBy = index + 1
arr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
if (res.ok) {
this.linkListFirst = []
this.getLink()
}
})
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//
deleteAllLink() {
this.selectId = []
for (var i = 0; i < this.selectList.length; i++) {
this.selectId.push(this.selectList[i].id)
}
this.ids = this.selectId.join(",")
if (this.selectList.length === 0) {
this.$message.warning('请选择要删除的链接')
} else {
this.modalRole = true
this.$confirm('此操作将删除链接, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('sarUrl/tsUrl/deleteBatch', {
ids: this.ids
}, {}, res => {
if (res.ok) {
this.$message.success('删除成功')
let arr = this.linkList.filter(items => {
if (!this.ids.includes(items.id)) return items;
})
let newArr = []
arr.forEach((item, index) => {
let json = {}
json.id = item.id
json.orderBy = index + 1
newArr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(newArr), {}, res => {
if (res.ok) {
this.linkListFirst = []
this.getLink()
}
})
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
/** 链接图片上传 */
//
handleAvatarSuccess(res, file, fileList) {
if (res.ok) {
this.imageUrl = URL.createObjectURL(file.raw)
this.sarStandardsInfoEO.icon = res.data.attId
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
}
},
//
beforeAvatarUpload(file) {
const index = file.name.lastIndexOf('.')
const ext = file.name.substr(index + 1)
const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png');
const isType = (ext === 'jpg' || ext === 'png')
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG || !isType) {
this.$message.error('上传头像图片只能是 .jpg、.png 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M && isType;
},
//
resetForm() {
this.$refs['sarStandardsInfoForm'].resetFields();
this.imageUrl = ''
this.modalshowflag = false
},
//
submit() {
this.$refs['sarStandardsInfoForm'].validate((valid) => {
if (valid) {
this.subLoading = true
if (this.type === 1) {
this.$http.postData('sarUrl/tsUrl/add', {
...this.sarStandardsInfoEO,
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('新增成功')
this.subLoading = false
this.modalshowflag = false
this.imageUrl = ''
this.linkListFirst = []
this.getLink()
} else {
this.$message.warning(res.message)
this.subLoading = false
}
})
} else {
//
this.$http.putData('/sarUrl/tsUrl/edit', {
id: this.editId,
name: this.sarStandardsInfoEO.name,
type: this.sarStandardsInfoEO.type,
url: this.sarStandardsInfoEO.url,
icon: this.sarStandardsInfoEO.icon
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('修改成功')
this.subLoading = false
this.modalshowflag = false
this.linkListFirst = []
this.getLink()
} else {
this.$message.warning(res.message)
this.subLoading = false
}
})
}
} else {
return false;
}
});
},
//
handleCommand(command) {
switch (command[1]) {
case '删除':
this.deleteLink(command[0])
break
case '编辑':
this.editLink(command[0])
break
}
},
//
editLink(row) {
this.type = 2
this.editId = row.id
this.sarStandardsInfoEO.name = row.name
this.sarStandardsInfoEO.url = row.url
this.sarStandardsInfoEO.sortId = row.sortId
this.sarStandardsInfoEO.icon = row.icon
if (row.icon !== '') {
let imgId = {
id: row.id
}
// base64
getImg(imgId).then(res => {
if (res.ok) {
const src =
"data:image/png;base64," +
btoa(
new Uint8Array(res).reduce(
(data, byte) => data + String.fromCharCode(byte), "")
)
this.imageUrl = src
}
})
}
this.dialogTitle = '修改链接'
this.modalshowflag = true
},
//
handleSelectionChange(val) {
this.selectList = val
},
//
getLink() {
this.$http.get('sarUrl/tsUrl', {}, {
_this: this,
loading: 'Loading'
}, res => {
this.Loading = true
this.linkList = res.data
res.data.forEach(item => {
if (item.type === 1) {
this.linkListFirst.push(item)
}
})
if (this.linkListFirst.length === 0) {
this.Loading = false
}
this.linkListFirst.forEach(item => {
if (item.icon !== '') {
let imgId = {
id: item.id
}
// base64
getImg(imgId).then(res => {
const src =
"data:image/png;base64," +
btoa(
new Uint8Array(res).reduce(
(data, byte) => data + String.fromCharCode(byte), "")
)
item.icon = src
}, setTimeout(()=>{
this.Loading = false
},1200))
}
})
this.initSortable()
})
},
initSortable() {
this.sortData = [...this.linkListFirst]
const el = document.querySelector('.el-table__body-wrapper tbody')
//
this.sortable = Sortable.create(el, {
sort: true, //
animation: 150,
onEnd: ({newIndex, oldIndex}) => {
const val = this.sortData[oldIndex]
this.sortData.splice(oldIndex, 1)
this.sortData.splice(newIndex, 0, val)
this.sortData.forEach((item, index) => {
item.orderBy = index + 1
})
let arr = []
this.sortData.forEach(item => {
let json = {}
json.id = item.id
json.orderBy = item.orderBy
arr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
if (res.ok) {
this.$message.success('保存成功')
} else {
this.$message.warning('保存失败!')
}
})
}
})
},
},
mounted() {
this.getLink();
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
#post-manage {
height: 100%;
.content {
height: calc(~'100% - 53px')
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
margin-top: 10px;
border-color: #409EFF;
}
.avatar-uploader {
margin-top: 10px;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
.avatar {
width: 100px;
height: 100px;
display: block;
}
.filter-tree {
height: calc(~'100% - 50px')
}
/deep/ .el-input.is-disabled .el-input__inner {
background-color: #fff;
}
}
</style>
@@ -0,0 +1,571 @@
<!-- 配置管理 - 链接管理 -->
<template>
<div id="post-manage">
<!-- 头部操作按钮-->
<div class="action-bar">
<el-button
type="primary"
class="common-button-primary add-button"
@click="addLink"
v-btn-permission="'980cb239683de9e29ee5335cec98e5b4'"
size="mini">新增
</el-button>
<!-- <el-button
type="primary"
class="common-button-primary add-button"
@click="linkOrder"
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
size="mini">顺序调整
</el-button>-->
<el-button
type="danger"
class="common-button-primary add-button"
@click="deleteAllLink"
v-btn-permission="'779665b2e4bb20fc480cf9372a100f69'"
size="mini">删除
</el-button>
</div>
<!-- 表格-->
<div class="content">
<el-table
:data="linkListSecond"
tooltip-effect="dark"
border
style="width: 100%; flex: auto;"
class="drag-table"
height="100%"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}"
@selection-change="handleSelectionChange">
<el-table-column
type="selection"
width="55"
align="center">
</el-table-column>
<el-table-column
prop="orderBy"
label="序号"
align="center"
width="50px">
</el-table-column>
<el-table-column
prop="name"
label="链接名称">
</el-table-column>
<!-- <el-table-column
prop="icon"
label="链接图标">
<template slot-scope="scope">
<img v-if="scope.row.icon !== ''" style="height: 50px;width: 50px" :src="scope.row.icon">
<span v-else>{{ '-' }}</span>
</template>
</el-table-column>-->
<el-table-column
prop="url"
show-overflow-tooltip
label="链接">
<template slot-scope="scope">
<span v-if="scope.row.url.slice(0,7) === 'http://' || scope.row.url.slice(0,8) === 'https://'" @click="linkto(scope.row.url)" style="color: #0c91e5;cursor: pointer;text-decoration: underline">
{{ scope.row.url }}
</span>
<span v-else @click="linkto('http://' + scope.row.url)" style="color: #0c91e5;cursor: pointer;text-decoration: underline">
{{ 'http://' + scope.row.url }}
</span>
</template>
</el-table-column>
<el-table-column
label="操作"
width="50px">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'0fbb849e244e07433a90180fb314ad10'" :command="[scope.row, '删除']">
删除
</el-dropdown-item>
<el-dropdown-item v-btn-permission="'fa0846d977aeef07e9cb7faf648f8f7f'" :command="[scope.row, '编辑']">
编辑
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<loading :loading="Loading">加载中...</loading>
<!-- 新增链接弹窗-->
<el-dialog
:close-on-click-modal="false"
:title="dialogTitle"
:visible.sync="modalshowflag"
:wrapperClosable="false"
size="800px"
@close="resetForm"
>
<el-form
ref="sarStandardsInfoForm"
:model="sarStandardsInfoEO"
:rules="sarStandardsInfoRules"
class="label-input-form"
>
<el-form-item label="链接类型" prop="type" label-width="150px" class="add-form-item">
<el-input :disabled="true" v-if="sarStandardsInfoEO.type === 2" value="第二行链接"/>
</el-form-item>
<el-form-item label="链接名称" prop="name" label-width="150px" class="add-form-item">
<el-input
v-model="sarStandardsInfoEO.name"
placeholder="请输入链接名称"
maxlength="30"
show-word-limit
clearable></el-input>
</el-form-item>
<!-- <el-form-item label="链接图标" prop="icon" label-width="150px" class="add-form-item">
<el-upload
v-model="sarStandardsInfoEO.icon"
class="avatar-uploader"
:action="uploadUrl"
:show-file-list="false"
:on-success="handleAvatarSuccess"
:before-upload="beforeAvatarUpload">
<img v-if="imageUrl" :src="imageUrl" class="avatar">
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
</el-form-item>-->
<el-form-item label="链接" prop="url" label-width="150px" class="add-form-item">
<el-input
v-model="sarStandardsInfoEO.url"
maxlength="100"
show-word-limit
placeholder="请输入链接">
</el-input>
</el-form-item>
</el-form>
<span slot="footer" class="demo-drawer-footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="resetForm">取消</el-button>
<el-button type="primary" size="mini" class="common-button-primary" icon="el-icon-check" :loading="subLoading" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Sortable from 'sortablejs'
import {getImg} from '@/api/linkApi.js'
import listOfCost from "../../../../regulatoryRepository/dataStatis/page/listOfCost";
export default {
name: "secondLink",
data() {
return {
editId: '',
type: '', // 1 2
dialogTitle: '',
submitLoading: false,
// 使
data: [],
Loading: false,
modalshowflag: false,
//
order: [],
//
selectList: [],
selectId: [],
ids: '',
// 使
sarStandardsInfoEO: {
name: '',
url: '',
icon: '',
type: 2,
// sortId: ''
},
//
sarStandardsInfoRules: {
name: [
{required: true, message: '请输入链接名称', trigger: 'blur'}
],
url: [
{required: true, message: '请输入链接', trigger: 'blur'}
]
},
modalRole: false,
props: {
label: 'name',
children: 'children'
},
linkList: [],
linkListSecond: [],
sortData: [],
imageUrl: '',
uploadUrl: 'api/att/attFile/upload',
verifyImg: '',
subLoading: false
}
},
methods: {
//,http://xxxxxx
linkto(link_href) {
window.open(link_href)
},
//
addLink() {
this.type = 1
this.dialogTitle = '新增链接'
this.modalshowflag = true
},
//
deleteLink(row) {
this.$confirm('此操作将删除该链接, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('sarUrl/tsUrl/delete', {
id: row.id
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('删除成功')
let arr = []
for (let a = 0; a < this.linkList.length; a++) {
if (this.linkList[a].id === row.id) {
this.linkList.splice(a, 1)
}
}
this.linkList.forEach((item, index) => {
let json = {}
json.id = item.id
json.orderBy = index + 1
arr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
if (res.ok) {
this.linkListSecond = []
this.getLink()
}
})
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
},
//
deleteAllLink() {
this.selectId = []
for (var i = 0; i < this.selectList.length; i++) {
this.selectId.push(this.selectList[i].id)
}
this.ids = this.selectId.join(",")
if (this.selectList.length === 0) {
this.$message.warning('请选择要删除的链接')
} else {
this.modalRole = true
this.$confirm('此操作将删除链接, 是否继续?', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning'
}).then(() => {
this.$http.delete('sarUrl/tsUrl/deleteBatch', {
ids: this.ids
}, {}, res => {
if (res.ok) {
this.$message.success('删除成功')
let arr = this.linkList.filter(items => {
if (!this.ids.includes(items.id)) return items;
})
let newArr = []
arr.forEach((item, index) => {
let json = {}
json.id = item.id
json.orderBy = index + 1
newArr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(newArr), {}, res => {
if (res.ok) {
this.linkListSecond = []
this.getLink()
}
})
} else {
this.$message.warning(res.message)
}
})
}).catch(() => {
this.$message({
type: 'info',
message: '已取消删除'
});
});
}
},
/** 链接图片上传 */
//
handleAvatarSuccess(res, file, fileList) {
if (res.ok) {
this.imageUrl = URL.createObjectURL(file.raw)
this.sarStandardsInfoEO.icon = res.data.attId
this.$message({
showClose: true,
message: res.message,
type: 'success'
})
}
},
//
beforeAvatarUpload(file) {
const index = file.name.lastIndexOf('.')
const ext = file.name.substr(index + 1)
const isJPG = (file.type === 'image/jpeg' || file.type === 'image/png');
const isType = (ext === 'jpeg' || ext === 'jpg' || ext === 'png')
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isJPG || !isType) {
this.$message.error('上传头像图片只能是 .jpg、.jpeg、.png 格式!');
}
if (!isLt2M) {
this.$message.error('上传头像图片大小不能超过 2MB!');
}
return isJPG && isLt2M && isType;
},
//
resetForm() {
this.$refs['sarStandardsInfoForm'].resetFields();
this.imageUrl = ''
this.modalshowflag = false
},
//
submit() {
this.$refs['sarStandardsInfoForm'].validate((valid) => {
if (valid) {
this.subLoading = true
if (this.type === 1) {
this.$http.postData('sarUrl/tsUrl/add', {
...this.sarStandardsInfoEO,
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('新增成功')
this.subLoading = false
this.modalshowflag = false
this.linkListSecond = []
this.getLink()
} else {
this.$message.warning(res.message)
this.subLoading = false
}
})
} else {
//
this.$http.putData('/sarUrl/tsUrl/edit', {
id: this.editId,
type: this.sarStandardsInfoEO.type,
url: this.sarStandardsInfoEO.url,
icon: this.sarStandardsInfoEO.icon
}, {
_this: this,
loading: 'Loading'
}, res => {
if (res.ok) {
this.$message.success('修改成功')
this.subLoading = false
this.modalshowflag = false
this.linkListSecond = []
this.getLink()
} else {
this.$message.warning(res.message)
this.subLoading = false
}
})
}
} else {
return false;
}
});
},
//
handleCommand(command) {
switch (command[1]) {
case '删除':
this.deleteLink(command[0])
break
case '编辑':
this.editLink(command[0])
break
}
},
//
editLink(row) {
this.type = 2
this.editId = row.id
this.sarStandardsInfoEO.name = row.name
this.sarStandardsInfoEO.url = row.url
this.sarStandardsInfoEO.sortId = row.sortId
this.sarStandardsInfoEO.icon = row.icon
if (row.icon !== '') {
let imgId = {
id: row.id
}
// base64
getImg(imgId).then(res => {
const src =
"data:image/png;base64," +
btoa(
new Uint8Array(res).reduce(
(data, byte) => data + String.fromCharCode(byte), "")
)
this.imageUrl = src
})
}
this.dialogTitle = '修改链接'
this.modalshowflag = true
},
//
handleSelectionChange(val) {
this.selectList = val
},
//
getLink() {
this.$http.get('sarUrl/tsUrl', {}, {
_this: this,
loading: 'Loading'
}, res => {
this.Loading = true
this.linkList = res.data
res.data.forEach(item => {
if (item.type === 2) {
this.linkListSecond.push(item)
}
})
if (this.linkListSecond.length === 0) {
this.Loading = false
}
this.linkListSecond.forEach(item => {
if (item.icon !== '') {
let imgId = {
id: item.id
}
// base64
getImg(imgId).then(res => {
const src =
"data:image/png;base64," +
btoa(
new Uint8Array(res).reduce(
(data, byte) => data + String.fromCharCode(byte), "")
)
item.icon = src
}, setTimeout(()=>{
this.Loading = false
},1200))
}
})
this.initSortable()
})
},
initSortable() {
this.sortData = [...this.linkListSecond]
const el = document.querySelector('.el-table__body-wrapper tbody')
//
this.sortable = Sortable.create(el, {
sort: true, //
animation: 150,
onEnd: ({newIndex, oldIndex}) => {
const val = this.sortData[oldIndex]
this.sortData.splice(oldIndex, 1)
this.sortData.splice(newIndex, 0, val)
this.sortData.forEach((item, index) => {
item.orderBy = index + 1
})
let arr = []
this.sortData.forEach(item => {
let json = {}
json.id = item.id
json.orderBy = item.orderBy
arr.push(json)
})
this.$http.putData('sarUrl/tsUrl/updateOrder', JSON.stringify(arr), {}, res => {
if (res.ok) {
this.$message.success('保存成功')
} else {
this.$message.warning('保存失败!')
}
})
}
})
},
},
mounted() {
this.getLink();
}
}
</script>
<style lang="less" scoped>
@import '~@/assets/styles/mixins';
#post-manage {
height: 100%;
.content {
height: calc(~'100% - 53px')
}
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
margin-top: 10px;
border-color: #409EFF;
}
.avatar-uploader {
margin-top: 10px;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 100px;
height: 100px;
line-height: 100px;
text-align: center;
}
.avatar {
width: 100px;
height: 100px;
display: block;
}
.filter-tree {
height: calc(~'100% - 50px')
}
/deep/ .el-input.is-disabled .el-input__inner {
background-color: #fff;
}
}
</style>
+50 -344
View File
@@ -1,370 +1,76 @@
<!-- 配置管理 - 机构管理 -->
<!--未符合项整改-->
<template>
<div id="mechanism-manage" :class="{ 'tree-close': sideClose }" class="v-class">
<div class="tree-content" :class="{ 'tree-closed': sideClose }">
<div class="tree">
<el-input
class="filter-tree-input"
placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<el-tree
:data="treeData"
:props="defaultProps"
default-expand-all
:filter-node-method="filterNode"
highlight-current
ref="tree"
:expand-on-click-node="false"
@node-click="handleNodeClick">
</el-tree>
</div>
<div class="tree-collapse" @click="treeCollapse" :class="{ 'tree-close': sideClose }">
<!--切换折叠样式-->
<i class="el-icon-arrow-left" v-if="sideClose === false"></i>
<i class="el-icon-arrow-right" v-if="sideClose === true"></i>
</div>
<div id="mechanism" >
<div class="mechanism-content">
<el-tabs v-model="activeName" @tab-click="handleClick" style="height: 100%">
<el-tab-pane label="机构管理" name="mechanism">
<mechanism></mechanism>
</el-tab-pane>
<el-tab-pane label="工作组" name="workgroup">
<workgroup></workgroup>
</el-tab-pane>
</el-tabs>
</div>
<div class="tree-right">
<div class="content">
<el-table
ref="multipleTable"
:data="data"
tooltip-effect="dark"
border
style="width: 100%; flex: auto;"
class="drag-table"
height="100%"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column
prop="uname"
label="姓名"
width="170px">
</el-table-column>
<el-table-column
prop="sex"
label="性别"
width="170px">
<template slot-scope="scope">
<div v-if="scope.row.sex === '1'"></div>
<div v-if="scope.row.sex === '2'"></div>
</template>
</el-table-column>
<el-table-column
prop="phone"
label="电话"
width="170px">
</el-table-column>
<el-table-column
prop="email"
label="邮箱"
width="170px">
</el-table-column>
<el-table-column
prop="institutionName"
label="所属部门">
</el-table-column>
<el-table-column
prop="NameList"
label="所属岗位">
</el-table-column>
<el-table-column
label="状态"
width="170px">
<template slot-scope="scope">
<div v-if="scope.row.disableFlag === '1'">已禁用</div>
<div v-else>已启用</div>
</template>
</el-table-column>
<el-table-column
label="操作"
width="50px">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '1'" :command="[scope.row, '启用']">启用</el-dropdown-item>
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '0'" :command="[scope.row, '禁用']">禁用</el-dropdown-item>
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置岗位']">配置岗位</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<loading :loading="Loading">加载中...</loading>
<pagination :page="page" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
<el-drawer
title="配置岗位"
:visible.sync="modalPost"
:wrapperClosable="false"
size="800px"
@close="resetFormPost"
>
<el-tree
ref="tree2"
node-key="id"
class="filter-tree"
style="height: 100%; overflow: auto;"
v-if="modalPost"
:props="props"
:data="postList"
:default-checked-keys="nodeList"
highlight-current
check-strictly
default-expand-all
:expand-on-click-node="false"
show-checkbox>
</el-tree>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button
size="mini"
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="PostSubmit"
>确定</el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetFormPost">取消</el-button>
</div>
</el-drawer>
</div>
</template>
<script>
import workgroup from "@/pages/config/pages/mechanismManage/pages/workgroup";
import mechanism from "@/pages/config/pages/mechanismManage/pages/mechanism";
export default {
name: 'MechanismManage',
components: {
workgroup,
mechanism,
},
data () {
return {
userId: '',
postList: [],
props: {
children: 'children',
label: 'name'
},
nodeList: [],
modalPost: false,
filterText: '', //
defaultProps: {
children: 'children',
label: 'name'
},
treeData: [], //
page: 1,
total: 0,
pageSize: this.$store.getters.userInfo.configContent,
sideClose: false,
data: [], // table
treeLoading: false,
Loading: false,
id: ''
activeName: 'mechanism',
}
},
methods: {
resetFormPost () {
this.modalPost= false
handleClick(tab, event) {
},
PostSubmit () {
this.$http.postData('sarUser/user/position', {
positionIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.$message.success('配置岗位成功')
this.modalPost = false
this.getData()
}
})
},
handleCommand (command) {
switch (command[1]) {
case '启用':
this.disableFlagEdit(command[0], 0)
break
case '禁用':
this.disableFlagEdit(command[0], 1)
break
case '配置岗位':
this.postsConfigure(command[0])
break
getActiveName(){
if (this.$route.query.activeName){
this.activeName = this.$route.query.activeName
}
},
getTree2 () {
this.$http.get('sarPosition/position', {}, {
_this: this,
}, res=> {
this.postList = res.data
})
},
postsConfigure (row) {
var arr = []
this.userId = row.userId
row.positions.forEach((item) => {
arr.push(item.id)
})
this.nodeList = arr
this.modalPost= true
},
disableFlagEdit (row, type) {
let json = {}
json.userId = row.userId
json.disableFlag = type
this.$http.postData('sarUser/user/disable', json, {},
res => {
if (res.ok){
if (type === 0) {
this.$message.success('已启用')
} else {
this.$message.success('已禁用')
}
this.getData()
}
})
},
treeCollapse () {
this.sideClose = !this.sideClose
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
handleNodeClick (data) {
this.id = data.id
this.getData()
},
getTree () {
this.$http.get('SarInstitution/institution', {}, {
_this: this,
loading: 'treeLoading'
}, res => {
this.treeData = res.data
this.id = res.data[0].id
this.getData()
})
},
getData () {
this.$http.get('SarInstitution/institution/user', {
institutionId: this.id
}, {
_this: this,
loading: 'Loading'
}, res => {
res.data.forEach((item) => {
var NameList = ''
item.positions.forEach((items) => {
if (NameList.length > 0) {
NameList += ','
}
NameList += items.name
})
item.NameList = NameList
})
this.data = res.data
this.total = res.data.length
})
},
pageChange (page) {
this.page = page
this.getData()
},
pageSizeChange (pageSize) {
this.$store.getters.userInfo.configContent = pageSize
this.getData()
},
},
computed: {},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
if (this.$route.query.keynoteActiveName){
this.keynoteActiveName = this.$route.query.keynoteActiveName
}
console.log('35',this.keynoteActiveName)
}
},
mounted () {
//
this.getTree()
this.getTree2()
}
created() {
this.getActiveName()
},
watch: {},
mounted () {}
}
</script>
<style lang="less">
@import '~@/assets/styles/mixins';
#mechanism-manage {
<style lang="less" scoped>
#mechanism {
height: inherit;
display: flex;
height: 100%;
.tree-close{
.tree{
left: -200px !important;
}
.tree-right{
width: calc(~'100% - 15px') !important;
}
.side-bar-collapse{
background: #5596CC !important;
color: #FFF;
}
}
.tree-closed {
width: 15px !important;
}
.tree-content {
background: #fff;
width: 300px;
position: relative;
.tree {
width: 95%;
position: absolute;
left: 0;
}
.tree-collapse {
position: absolute;
right: 0;
}
}
.tree-right {
overflow-y: hidden;
padding:0;
position: relative;
width: 100%;
flex-direction: column;
background-color: #FFFFFF;
.mechanism-content {
padding: 0 10px;
height: 100%;
display: flex;
flex-direction: column;
.content{
padding: 0px;
/deep/ .el-tabs {
display: flex;
flex-direction: column;
position: relative;
flex: auto;
//height: calc(~'100% - 105px - 56px');
}
.pagination{
position: static;
width: 100% !important;
left: 0 !important;
height: 100%;
.el-tabs__content {
flex: 1;
overflow: hidden;
.el-tab-pane {
height: 100%;
}
}
}
}
.el-tabs__nav {
margin-left:20px;
}
}
</style>
<style lang="less" scoped>
/deep/.el-select__tags {
overflow-x: hidden;
}
/deep/.width-all{
width: 100%;
}
.filter-tree {
height: calc(~'100% - 50px')
}
.laws-tree{
/deep/.clearable {
top: 20px;
}
}
.add-form-item {
display: flex;
}
</style>
@@ -0,0 +1,663 @@
<!-- 配置管理 - 机构管理 -->
<template>
<div id="mechanism-manage" :class="{ 'tree-close': sideClose }" class="v-class">
<div class="tree-content" :class="{ 'tree-closed': sideClose }">
<div class="tree">
<!-- @keyup.enter.native="searchPeople"-->
<el-input
class="filter-tree-input"
placeholder="输入关键字进行过滤"
v-model="filterText">
</el-input>
<!-- <el-tree-->
<!-- node-key="id"-->
<!-- :data="treeData"-->
<!-- :props="defaultProps"-->
<!-- :default-checked-keys="nodeList"-->
<!-- :current-node-key="nodeKeyId"-->
<!-- highlight-current-->
<!-- check-strictly-->
<!-- :expand-on-click-node="false"-->
<!-- ref="tree"-->
<!-- :load="loadNode"-->
<!-- @node-click="handleNodeClick"-->
<!-- lazy>-->
<!-- </el-tree>-->
<el-tree
:data="treeData"
:props="defaultProps"
:current-node-key="nodeKeyId"
node-key="id"
:filter-node-method="filterNode"
highlight-current
ref="tree"
:expand-on-click-node="false"
@node-click="handleNodeClick">
</el-tree>
</div>
<div class="tree-collapse" @click="treeCollapse" :class="{ 'tree-close': sideClose }">
<!--切换折叠样式-->
<i class="el-icon-arrow-left" v-if="sideClose === false"></i>
<i class="el-icon-arrow-right" v-if="sideClose === true"></i>
</div>
</div>
<div class="tree-right">
<div class="content">
<!--搜索区域-->
<div class="search-area">
<el-form inline class="label-input-form" v-model="searchForm">
<el-form-item label="姓名" class="search-item">
<el-input placeholder="根据姓名查询" clearable v-model="searchForm.uname">
</el-input>
</el-form-item>
<el-form-item label="邮箱" class="search-item">
<el-input placeholder="根据邮箱查询" clearable v-model="searchForm.email">
</el-input>
</el-form-item>
<el-form-item>
<el-button type="primary" size="mini"
class="common-button-primary" @click="getDatas('1')">
查询
</el-button>
</el-form-item>
<el-form-item>
<el-button size="mini" class="common-button-default" @click="clearAllSearch">
清空
</el-button>
</el-form-item>
<el-form-item>
<el-button size="mini" type="primary" @click="selectEdit">
批量配置岗位
</el-button>
</el-form-item>
</el-form>
</div>
<el-table
ref="multipleTable"
:data="data"
tooltip-effect="dark"
border
style="width: 100%; flex: auto;"
class="drag-table"
height="100%"
@selection-change="selectedData"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column
type="selection"
width="55"
align="center"
/>
<el-table-column
prop="account"
label="账号"
width="100px">
</el-table-column>
<el-table-column
prop="uname"
label="姓名"
width="100px">
</el-table-column>
<el-table-column
prop="sex"
label="性别"
width="50px">
<template slot-scope="scope">
<div v-if="scope.row.sex === '1'"></div>
<div v-if="scope.row.sex === '2'"></div>
</template>
</el-table-column>
<el-table-column
prop="phone"
label="电话"
width="170px">
</el-table-column>
<el-table-column
prop="email"
label="邮箱"
width="170px">
</el-table-column>
<el-table-column
prop="institutionName"
label="所属部门">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
{{ scope.row.institutionName }}
<div slot="reference" class="name-wrapper">
<p v-if="!scope.row.institutionName || scope.row.institutionName.length<15">
{{ scope.row.institutionName }}
</p>
<p v-else> {{ scope.row.institutionName.substring(0, 15) }}...</p>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column
prop="NameList"
label="所属岗位">
<template slot-scope="scope">
<el-popover trigger="hover" placement="top">
{{ scope.row.NameList }}
<div slot="reference" class="name-wrapper">
<p v-if="!scope.row.institutionName ||scope.row.NameList.length<15">
{{ scope.row.NameList }}
</p>
<p v-else> {{ scope.row.NameList.substring(0, 15) }}...</p>
</div>
</el-popover>
</template>
</el-table-column>
<el-table-column
label="状态"
width="100px">
<template slot-scope="scope">
<div v-if="scope.row.disableFlag === '1'">已禁用</div>
<div v-else>已启用</div>
</template>
</el-table-column>
<el-table-column
label="操作"
width="50px">
<template slot-scope="scope">
<div @click.stop style="display: inline-block">
<el-dropdown trigger="click" @command="handleCommand">
<i class="iconfont">&#xe61e;</i>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '1'" :command="[scope.row, '启用']">
启用
</el-dropdown-item>
<el-dropdown-item v-btn-permission="'30db3b395deb5004266cd65d302c2776'" v-if="scope.row.disableFlag === '0'" :command="[scope.row, '禁用']">
禁用
</el-dropdown-item>
<el-dropdown-item v-btn-permission="'ce2d2b9bb8004e0d9efcabc42a9f354d'" :command="[scope.row, '配置岗位']">
配置岗位
</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
</div>
</template>
</el-table-column>
</el-table>
</div>
<loading :loading="Loading">加载中...</loading>
<pagination :page="page" :total="total" :pageSize="pageSize" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
<loading style="z-index: 2099;" :loading="treeLoading">导入中...</loading>
<el-drawer
class="postPage"
:title="drawerTitle"
:visible.sync="modalPost"
:wrapperClosable="false"
size="800px"
@close="resetFormPost"
>
<el-form ref="" :model="sarPost" inline>
<el-form-item class="search-item" style="padding-left: 25px">
<el-input v-model="sarPost.name"
size="small"
placeholder="岗位名称查找"
clearable></el-input>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-primary" type="primary" size="mini" @click="searchPostName"
v-btn-permission="">查询
</el-button>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-default" @click="resetSelect" size="mini"
v-btn-permission="">清空
</el-button>
</el-form-item>
</el-form>
<el-tree
ref="tree2"
node-key="id"
class="filter-tree"
style="height: 100%; overflow: auto;"
v-if="modalPost"
:props="props"
:data="postList"
:filter-node-method="filterNode"
:default-checked-keys="nodeList"
highlight-current
check-strictly
default-expand-all
:expand-on-click-node="false"
show-checkbox>
</el-tree>
<pagination :page="page" :pageSize="pageSize" :total="total2" @pageChange="pageChange2" @pageSizeChange="pageSizeChange2"></pagination>
<div id="roleFormButton" class="demo-drawer-footer">
<el-button
size="mini"
class="common-button-primary"
icon="el-icon-check"
type="primary"
@click="PostSubmit"
>确定
</el-button>
<el-button size="mini" class="common-button-default" icon="el-icon-close" @click="resetFormPost">取消</el-button>
</div>
</el-drawer>
</div>
</template>
<script>
export default {
name: 'mechanism',
data() {
return {
peopleType: '', //1 2
nodeKeyId: '',
searchForm: {
uname: "",
email: ""
},
userId: '',
postList: [],
props: {
children: 'children',
label: 'name'
},
nodeList: [],
modalPost: false,
sarPost: {
name: "", //
},
filterText: '', //
defaultProps: {
children: 'children',
label: 'name'
},
treeData: [], //
page: 1,
total: 0,
total2: 0,
pageSize: this.$store.getters.userInfo.configContent,
sideClose: false,
data: [], // table
treeLoading: false,
Loading: false,
id: '',
//
manageData: [],
drawerTitle: '配置岗位'
}
},
methods: {
clearAllSearch() {
this.searchForm = {
uname: "",
email: ""
}
this.page = 1
this.getData()
},
resetFormPost() {
this.modalPost = false
},
PostSubmit() {
if (this.drawerTitle === '配置岗位') {
this.$http.postData('sarUser/user/position', {
positionIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.$message.success('配置岗位成功')
this.modalPost = false
this.getData()
}
})
} else {
this.$http.postData('sarUser/user/positionBatch', {
positionIds: this.$refs.tree2.getCheckedKeys(),
userId: this.userId
}, {}, res => {
if (res.ok) {
this.$message.success('配置岗位成功')
this.modalPost = false
this.getData()
}
})
}
},
searchPostName() {
this.page = 1;
this.getTree2();
}, //
resetSelect() {
this.sarPost.name = "";
this.getTree2();
}, //
handleCommand(command) {
switch (command[1]) {
case '启用':
this.disableFlagEdit(command[0], 0)
break
case '禁用':
this.disableFlagEdit(command[0], 1)
break
case '配置岗位':
this.postsConfigure(command[0])
break
}
},
getTree2() {
this.$http.get('sarPosition/position', {
current: this.page,
pageSize: this.pageSize,
...this.sarPost,
}, {
_this: this,
}, res => {
this.postList = res.data.records
this.total2 = res.data.total
})
},
postsConfigure(row) {
var arr = []
this.userId = row.userId
row.positions.forEach((item) => {
arr.push(item.id)
})
this.nodeList = arr
this.modalPost = true
},
disableFlagEdit(row, type) {
let json = {}
json.userId = row.userId
json.disableFlag = type
this.$http.postData('sarUser/user/disable', json, {},
res => {
if (res.ok) {
if (type === 0) {
this.$message.success('已启用')
} else {
this.$message.success('已禁用')
}
this.getData()
}
})
},
treeCollapse() {
this.sideClose = !this.sideClose
},
filterNode(value, data) {
if (!value) return true;
return data.name.indexOf(value) !== -1;
},
handleNodeClick(data) {
this.id = data.id
this.page = 1
this.getData()
},
// searchPeople(){
// console.log(this.filterText);
// },
// loadNode(node, resolve) {
// if (node.level === 0) {
// return resolve(this.treeData);
// }
// this.getChildren(node, resolve)
// },
// getChildren (node, resolve) {
// this.id = node.key
// this.getData()
// this.$http.get('SarInstitution/institution/getNext', {
// institutionId: node.key
// }, {}, res => {
// let people = [];
// res.forEach(item => {
// if(item.disabled === true){
// people.push(item)
// }
// })
// resolve(people)
// })
// },
// getTree() {
// this.$http.get('SarInstitution/institution/getFirstInstitution', {}, {
// _this: this,
// loading: 'treeLoading'
// }, res => {
// this.treeData = res
// this.nodeKeyId = this.treeData[0].id
// this.treeLoading = false
// }, e => {
// })
// },
getTree() {
this.$http.get('SarInstitution/institution', {}, {
_this: this,
loading: 'treeLoading'
}, res => {
this.treeData = res.data
this.nodeKeyId = this.treeData[0].id
this.$nextTick(function () {
this.$refs.tree.setCurrentKey(this.nodeKeyId)
})
this.id = res.data[0].id
this.getData()
}, e => {
console.log(e);
})
},
getDatas(type) {
if (type === '1') {
this.page = 1
}
this.peopleType = 2;
this.$http.post('SarInstitution/institution/userUnderInstitution', {
current: this.page,
size: this.pageSize,
uname: this.searchForm.uname,
email: this.searchForm.email
}, {
_this: this,
loading: 'Loading'
}, res => {
res.data.records.forEach((item) => {
let NameList = ''
item.positions.forEach((items) => {
if (NameList.length > 0) {
NameList += ','
}
NameList += items.name
})
item.NameList = NameList
})
this.data = res.data.records
this.total = res.data.total
})
},
getData() {
this.peopleType = 1;
this.$http.post('SarInstitution/institution/userUnderInstitution', {
current: this.page,
size: this.pageSize,
institutionId: this.id,
uname: this.searchForm.uname,
email: this.searchForm.email
}, {
_this: this,
loading: 'Loading'
}, res => {
res.data.records.forEach((item) => {
let NameList = ''
item.positions.forEach((items) => {
if (NameList.length > 0) {
NameList += ','
}
NameList += items.name
})
item.NameList = NameList
})
this.data = res.data.records
this.total = res.data.total
})
},
pageChange(page) {
this.page = page
if(this.peopleType === 1){
this.getData()
}else{
this.getDatas()
}
},
pageSizeChange(pageSize) {
this.pageSize = pageSize
if(this.peopleType === 1){
this.getData()
}else{
this.getDatas()
}
},
pageChange2(page) {
this.page = page
this.getTree2()
},
pageSizeChange2(pageSize) {
this.pageSize = pageSize
this.getTree2()
},
/** 批量编辑岗位的勾选数据 */
selectedData(val) {
this.manageData = val
},
selectEdit() {
this.userId = []
this.manageData.forEach(item=>{
this.userId.push(item.userId)
})
this.drawerTitle = '批量配置岗位'
this.modalPost = true
},
},
computed: {},
watch: {
filterText(val) {
this.$refs.tree.filter(val);
},
},
mounted() {
//
this.getTree()
this.getTree2()
}
}
</script>
<style lang="less">
@import '~@/assets/styles/mixins';
#mechanism-manage {
display: flex;
height: 100%;
.tree-close {
.tree {
left: -200px !important;
}
.tree-right {
width: calc(~'100% - 15px') !important;
}
.side-bar-collapse {
background: #5596CC !important;
color: #FFF;
}
}
.tree-closed {
width: 15px !important;
}
.postPage {
.pagination {
position: initial;
}
}
.tree-content {
background: #fff;
width: 300px;
position: relative;
.tree {
width: 95%;
position: absolute;
left: 0;
}
.tree-collapse {
position: absolute;
right: 0;
}
}
.tree-right {
overflow-y: hidden;
padding: 0;
position: relative;
width: 100%;
height: 100%;
display: flex;
flex-direction: column;
.content {
padding: 0px;
display: flex;
flex-direction: column;
position: relative;
flex: auto;
//height: calc(~'100% - 105px - 56px');
}
.pagination {
position: static;
width: 100% !important;
left: 0 !important;
}
}
}
</style>
<style lang="less" scoped>
#mechanism-manage {
height: 100%;
.content {
height: calc(~'100% - 105px - 56px')
}
/deep/ .el-select__tags {
overflow-x: hidden;
}
/deep/ .width-all {
width: 100%;
}
.filter-tree {
height: calc(~'100% - 50px')
}
.laws-tree {
/deep/ .clearable {
top: 20px;
}
}
.add-form-item {
display: flex;
}
}
</style>
@@ -0,0 +1,556 @@
<template>
<div id="workgroup">
<div class="workgroup-content">
<div class="search-area">
<el-form :model="workSearch" inline class="label-input-form">
<el-form-item label="工作组" class="search-item">
<el-input
v-model="workSearch.workGroupName"
clearable
placeholder="根据工作组进行查找"
/>
</el-form-item>
<el-form-item label="工作组组长" class="search-item">
<el-input
v-model="workSearch.leaderName"
clearable
placeholder="根据工作组组长进行查找"
/>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-primary" type="primary" size="mini" @click="searchPostName"
v-btn-permission="">查询
</el-button>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-default" @click="resetSelect" size="mini"
v-btn-permission="">清空
</el-button>
</el-form-item>
</el-form>
</div>
<div class="table-content">
<div class="table-button">
<el-button type="primary" size="mini"
class="common-button-primary" @click="add">
新增
</el-button>
<el-button type="primary" size="mini"
class="common-button-primary" @click="edit">
编辑
</el-button>
<el-button type="primary" size="mini"
class="common-button-primary" @click="workDel">
批量删除
</el-button>
</div>
<el-table
ref="workGroup"
:data="workData"
tooltip-effect="dark"
border
style="width: 100%; flex: auto;"
class="drag-table"
height="100%"
@selection-change="workChange"
:header-cell-style="{background: '#E8E8E8', color: '#333333', fontSize: '16px',
fontWeight: 'bold', height: '48px'}">
<el-table-column
type="selection"
width="55"
align="center"
/>
<el-table-column
align="center"
prop="workGroup"
min-width="300"
label="工作组">
</el-table-column>
<el-table-column
align="center"
label="工作组组长"
min-width="400px">
<template slot-scope="scope">
<span v-if="scope.row.workLeaderGroup.length > 1" v-for="item in scope.row.workLeaderGroup"
:key="item.id">{{ item.name + "," }}</span>
<span v-else v-for="item in scope.row.workLeaderGroup" :key="item.id">{{ item.name }}</span>
</template>
</el-table-column>
<el-table-column
align="center"
label="工作组成员"
min-width="500px">
<template slot-scope="scope">
<span v-if="scope.row.workPeopleGroup.length > 1" v-for="item in scope.row.workPeopleGroup"
:key="item.id">{{ item.name + "," }}</span>
<span v-else v-for="item in scope.row.workPeopleGroup" :key="item.id">{{ item.name }}</span>
</template>
</el-table-column>
</el-table>
<loading :loading="Loading">加载中...</loading>
<pagination :page="page" :total="total" :pageSize="pageSize" @pageChange="pageChange"
@pageSizeChange="pageSizeChange"></pagination>
</div>
<el-dialog
:title="dialogTitle"
:visible.sync="addModel"
:wrapperClosable="false"
@close="cancelModel"
size="800px">
<div class="myDialog">
<el-form
ref="addForm"
:model="addForm"
:rules="addFormRules"
class="label-input-form"
>
<el-form-item label="工作组" prop="workGroup" label-width="100px" class="add-form-item">
<el-input v-model="addForm.workGroup"
placeholder="请输入工作组"
clearable></el-input>
</el-form-item>
<el-form-item label="工作组组长" prop="workLeader" label-width="100px" class="add-form-item">
<div class="tag-box">
<el-tag
:key="tag.id"
v-for="tag in addForm.workLeaderGroup"
closable
@close="handleCloseTag(tag)">
{{ tag.name }}
</el-tag>
<el-button size="small" @click="choiceRole('1')" type="primary">添加</el-button>
</div>
</el-form-item>
<el-form-item label="工作组组员" prop="workPeople" label-width="100px" class="add-form-item">
<div class="tag-box">
<el-tag
:key="tag.id"
v-for="tag in addForm.workPeopleGroup"
closable
@close="handleCloseTags(tag)">
{{ tag.name }}
</el-tag>
<el-button size="small" @click="choiceRole('2')" type="primary">添加</el-button>
</div>
</el-form-item>
</el-form>
</div>
<div slot="footer">
<el-button class="common-button-default" size="mini" icon="el-icon-close" @click="cancelModel">取消</el-button>
<el-button class="common-button-primary" size="mini" icon="el-icon-check" type="primary" @click="addOk">确定
</el-button>
</div>
</el-dialog>
<!-- 多选择责任人-->
<work-tree
:is-title="roleTitle"
:is-visible.sync="roleModal"
@checkedRole="checkedRole"
:nodeList="nodeList"
></work-tree>
<!-- 多选择责任人-->
<work-tree
:is-title="roleTitle2"
:is-visible.sync="roleModal2"
@checkedRole="checkedRole2"
:nodeList="nodeList2"
></work-tree>
</div>
</div>
</template>
<script>
import WorkTree from "@/components/workTree";
export default {
name: "workgroup",
components: { WorkTree },
data() {
return {
nodeList: [],
nodeList2: [],
roleTitle2: "",
roleModal2: false,
workChangeList: [],
defaultProps: {
children: "children",
label: "name"
},
roleType: "",
roleTitle: "",
roleModal: false,
dialogTitle: "",
addModel: false,
Loading: false,
page: 1,
pageSize: this.$store.getters.userInfo.configContent,
total: 0,
workData: [],
workSearch: {
leaderName: "",
workGroupName: "",
page: 1,
pageSize: this.$store.getters.userInfo.configContent
},
addForm: {
workGroup: "",
workLeader: "",
workLeaderId: "",
workPeople: "",
workPeopleId: "",
workPeopleGroup: [],
workLeaderGroup: []
},
addFormRules: {
workGroup: [
{ required: true, message: "请输入工作组", trigger: "blur" }
]
// workLeader: [
// { required: true, message: "", trigger: "change" }
// ],
// workPeople: [
// { required: true, message: "", trigger: "change" }
// ]
}
};
},
mounted() {
this.getWorkData();
},
methods: {
/**
* 删除工作组组长
* @param val
*/
handleCloseTag(val) {
this.addForm.workLeaderGroup.splice(this.addForm.workLeaderGroup.indexOf(val), 1);
this.nodeList.splice(this.nodeList.findIndex(item => {
return item === val.id;
}), 1);
},
/*
* 删除工作组成员
* */
handleCloseTags(tag) {
this.addForm.workPeopleGroup.splice(this.addForm.workPeopleGroup.indexOf(tag), 1);
this.nodeList2.splice(this.nodeList2.findIndex(item => {
return item === tag.id;
}), 1);
},
getWorkData() {
this.$http.get("workGroup/work-group", {
...this.workSearch
}, {
_this: this
}, res => {
res.data.records.map(item => {
item.workLeaderGroup = [];
item.workPeopleGroup = [];
var workLeaderArray = item.workLeader.split(",");
var workPeopleArray = item.workPeople.split(",");
var workLeaderIdArray = item.workLeaderId.split(",");
var workPeopleIdArray = item.workPeopleId.split(",");
for (var i = 0; i < workLeaderArray.length; i++) {
item.workLeaderGroup.push({ name: workLeaderArray[i], id: workLeaderIdArray[i] });
}
for (var j = 0; j < workPeopleArray.length; j++) {
item.workPeopleGroup.push({ name: workPeopleArray[j], id: workPeopleIdArray[j] });
}
});
this.workData = res.data.records;
this.total = res.data.total;
}, e => {
});
},
workChange(data) {
this.workChangeList = data;
},
//
searchPostName() {
this.page = 1;
this.getWorkData();
},
//
resetSelect() {
this.workSearch = {
leaderName: "",
workGroupName: "",
page: 1,
pageSize: this.$store.getters.userInfo.configContent
};
this.getWorkData();
},
//
add() {
this.dialogTitle = "新增工作组";
this.addModel = true;
},
//
edit() {
if (this.workChangeList.length < 1) {
this.$message.warning("请勾选一条数据进行编辑");
} else if (this.workChangeList.length > 1) {
this.$message.warning("您只能选择一条数据进行编辑");
} else {
this.nodeList = [];
this.nodeList2 = [];
this.workChangeList[0].workLeaderGroup.map(item => {
this.nodeList.push(item.id);
});
this.workChangeList[0].workPeopleGroup.map(item => {
this.nodeList2.push(item.id);
});
this.dialogTitle = "编辑工作组";
this.addForm = this.workChangeList[0];
this.addModel = true;
}
},
//
workDel() {
if (this.workChangeList.length) {
this.$confirm("您确认删除这些数据?", "提示", {
confirmButtonText: "确认",
confirmButtonClass: "common-button-primary",
cancelButtonText: "取消",
type: "warning"
}).then(() => {
let ids = ''
this.workChangeList.map(item => {
ids += item.id
ids += ','
})
this.$http.delete("workGroup/work-group", {
id: ids
}, {
_this: this
}, res => {
if (res.ok) {
this.$message.success("删除成功");
}
this.getWorkData();
});
this.$refs.workGroup.clearSelection();
}).catch(() => {
});
} else {
this.$message.warning("请至少选择一条数据进行删除");
}
},
//
cancelModel() {
this.addForm = {
workGroup: "",
workPeopleGroup: [],
workLeaderGroup: []
};
this.addModel = false;
},
//
addOk() {
this.$refs["addForm"].validate((valid) => {
if (valid) {
if (this.dialogTitle === "新增工作组") {
if (!this.addForm.workLeaderGroup.length) {
this.$message.warning("请选择工作组组长");
} else if (!this.addForm.workPeopleGroup.length) {
this.$message.warning("请选择工作组组员");
} else {
let workLeader = "", workLeaderId = "";
this.addForm.workLeaderGroup.map(item => {
workLeader += item.name;
workLeader += ",";
workLeaderId += item.id;
workLeaderId += ",";
});
let workPeople = "", workPeopleId = "";
this.addForm.workPeopleGroup.map(item => {
workPeople += item.name;
workPeople += ",";
workPeopleId += item.id;
workPeopleId += ",";
});
this.$http.post("workGroup/work-group", {
workGroup: this.addForm.workGroup,
workLeader: workLeader,
workLeaderId: workLeaderId,
workPeople: workPeople,
workPeopleId: workPeopleId
}, {
_this: this
}, res => {
this.$message.warning(res.message);
this.getWorkData();
}, e => {
});
this.addModel = false;
this.nodeList = [];
this.nodeList2 = [];
}
} else {
let workLeader = "";
let workLeaderId = "";
this.addForm.workLeaderGroup.map(item => {
workLeader += item.name;
workLeader += ",";
workLeaderId += item.id;
workLeaderId += ",";
});
let workPeople = "";
let workPeopleId = "";
this.addForm.workPeopleGroup.map(item => {
workPeople += item.name;
workPeople += ",";
workPeopleId += item.id;
workPeopleId += ",";
});
this.$http.put("workGroup/work-group", {
id: this.addForm.id,
workGroup: this.addForm.workGroup,
workLeader: workLeader,
workLeaderId: workLeaderId,
workPeople: workPeople,
workPeopleId: workPeopleId
}, {
_this: this
}, res => {
if (res.ok) {
} else {
this.$message.warning(res.message);
}
this.getWorkData();
});
this.addModel = false;
this.$refs.workGroup.clearSelection();
}
} else {
this.$message.warning("请填写整信息");
}
});
},
choiceRole(type) {
switch (type) {
case "1":
this.roleType = "1";
this.roleTitle = "选择工作组组长";
this.roleModal = true;
break;
case "2":
this.roleType = "2";
this.roleTitle2 = "选择工作组组员";
this.roleModal2 = true;
break;
}
},
checkedRole(data) {
this.addForm = {
workGroup: this.addForm.workGroup || "",
workPeopleGroup: this.addForm.workPeopleGroup || [],
workLeaderGroup: this.addForm.workLeaderGroup || []
};
data.forEach(item => {
if (this.addForm.workLeaderGroup.findIndex(item1 => {
return item1.id === item.id;
}) < 0) {
this.addForm.workLeaderGroup.push({
id: item.id,
name: item.name
});
}
});
this.roleModal = false
},
checkedRole2(data) {
this.addForm = {
workGroup: this.addForm.workGroup || "",
workPeopleGroup: this.addForm.workPeopleGroup || [],
workLeaderGroup: this.addForm.workLeaderGroup || []
};
data.forEach(item => {
if (this.addForm.workPeopleGroup.findIndex(item2 => {
return item2.id === item.id;
}) < 0) {
this.addForm.workPeopleGroup.push({
id: item.id,
name: item.name
});
}
});
this.roleModal2 = false
},
pageChange(page) {
this.page = page;
this.getWorkData()
},
pageSizeChange(pageSize) {
this.pageSize = pageSize;
this.getWorkData()
}
}
};
</script>
<style lang="less" scoped>
.workgroup-content {
height: 100%;
width: 100%;
.tag-box {
.el-tag {
margin: 0 5px 0 0;
}
}
}
.add-form-item {
/deep/ .el-form-item__content {
line-height: 50px !important;
}
}
.table-content {
height: 68.5vh;
width: 100%;
}
.table-button {
margin: 10px 0;
}
.standardForComments {
height: calc(~'100% - 56px');
background: #fff;
flex-direction: column;
.action-bar {
margin-bottom: 5px;
padding: 0;
}
.content {
flex: auto;
overflow: hidden;
display: flex;
flex-direction: column;
.table-wrap {
flex: auto;
overflow: hidden;
position: relative;
}
}
& > .pagination {
position: static;
/deep/ .pagination-slot {
padding: 0;
}
}
}
</style>
+1 -1
View File
@@ -21,7 +21,7 @@
class="common-button-primary add-button"
@click="Add"
size="mini">新增</el-button>
<el-button type="primary"
<el-button type="danger"
class="common-button-primary add-button"
@click="deleteList"
size="mini">删除</el-button>
+64 -6
View File
@@ -1,6 +1,30 @@
<!-- 配置管理 - 岗位管理 -->
<template>
<div id="post-manage">
<div class="search-area">
<div class="left">
<el-form ref="" :model="sarPost" inline>
<el-form-item label="岗位名称" class="search-item">
<el-input v-model="sarPost.name"
placeholder="岗位名称查找"
clearable></el-input>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-primary" type="primary" size="mini" @click="searchPostName"
v-btn-permission="">查询
</el-button>
</el-form-item>
<el-form-item label="" class="search-item btn-box">
<el-button class="common-button-default" @click="resetSelect" size="mini"
v-btn-permission="">清空
</el-button>
</el-form-item>
</el-form>
</div>
<div class="right">
</div>
</div>
<div class="action-bar">
<el-button type="primary"
class="common-button-primary add-button"
@@ -33,7 +57,7 @@
<el-table-column
prop="name"
label="岗位名称"
width="170px">
width="300px">
</el-table-column>
<el-table-column
prop="NameList"
@@ -65,6 +89,7 @@
</template>
</el-table-column>
</el-table>
<pagination :page="page" :pageSize="pageSize" :total="total" @pageChange="pageChange" @pageSizeChange="pageSizeChange"></pagination>
</div>
<loading :loading="Loading">加载中...</loading>
<el-dialog
@@ -133,7 +158,13 @@
name: 'PostManage',
data () {
return {
editId: '',
sarPost: {
name: "", //
},
pageSize: this.$store.getters.userInfo.configContent,
page: 1,
total: 0,
editId: '',
type: '', // 1 2
dialogTitle: '',
nodeList: [],
@@ -160,6 +191,24 @@
}
},
methods: {
searchPostName() {
this.page = 1;
this.getData();
}, //
pageChange(page) {
this.page = page;
this.getData();
},
pageSizeChange(pageSize) {
this.pageSize = pageSize;
this.getData();
},
//
resetSelect() {
this.sarPost.name = "";
this.getData();
}, //
handleCommand (command) {
switch (command[1]) {
case '删除':
@@ -177,7 +226,10 @@
if (res.ok) {
this.$message.success('删除成功')
this.getData()
} else {
this.$message.warning(res.message)
}
this.submitLoading = false
})
},
editData (row) {
@@ -225,11 +277,15 @@
}
},
getData () { //
this.$http.get('sarPosition/position', {}, {
this.$http.get('sarPosition/position', {
current: this.page,
pageSize: this.pageSize,
...this.sarPost,
}, {
_this: this,
loading: 'Loading'
}, res=> {
res.data.forEach((item)=>{
res.data.records.forEach((item)=>{
var idList = []
var NameList = ''
item.roles.forEach((items)=>{
@@ -242,7 +298,9 @@
item.idList = idList
item.NameList = NameList
})
this.data = res.data
// this.data = res.data
this.data = res.data.records
this.total = res.data.total
})
},
addModal () { //
@@ -317,7 +375,7 @@
#post-manage {
height: 100%;
.content {
height: calc(~'100% - 53px')
height: calc(~'100% - 105px - 56px')
}
.filter-tree {
height: calc(~'100% - 50px')
@@ -41,7 +41,7 @@
<!-- round-->
<!-- @click="addRow"-->
<!-- v-btn-permission="'XBRKH5BP5K'"-->
<!-- ><i class="iconfont">&#xe84e;</i>新增</el-button>-->
<!-- ><i class="el-icon-plus"></i>新增</el-button>-->
<!--</div>-->
<loading :loading="tableDataLoading">{{$t('m.dataProcessing')}}</loading>
<el-table
@@ -41,7 +41,7 @@
round
@click="addRow"
v-btn-permission="'XBRKH5BP5K'"
><i class="iconfont">&#xe84e;</i>新增</el-button>
><i class="el-icon-plus"></i>新增</el-button>
</div>
<loading :loading="tableDataLoading">{{$t('m.dataProcessing')}}</loading>
<el-table
File diff suppressed because it is too large Load Diff

Some files were not shown because too many files have changed in this diff Show More