v1.5 beta版发布,详细查看发行版说明
16
src/api/genConfig.js
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function get() {
|
||||||
|
return request({
|
||||||
|
url: 'api/genConfig',
|
||||||
|
method: 'get'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function update(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/genConfig',
|
||||||
|
data,
|
||||||
|
method: 'put'
|
||||||
|
})
|
||||||
|
}
|
||||||
9
src/api/generator.js
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function generator(data, tableName) {
|
||||||
|
return request({
|
||||||
|
url: 'api/generator?tableName=' + tableName,
|
||||||
|
data,
|
||||||
|
method: 'post'
|
||||||
|
})
|
||||||
|
}
|
||||||
24
src/api/myTest.js
Normal file
@@ -0,0 +1,24 @@
|
|||||||
|
import request from '@/utils/request'
|
||||||
|
|
||||||
|
export function add(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/myTest',
|
||||||
|
method: 'post',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function del(id) {
|
||||||
|
return request({
|
||||||
|
url: 'api/myTest/' + id,
|
||||||
|
method: 'delete'
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function edit(data) {
|
||||||
|
return request({
|
||||||
|
url: 'api/myTest',
|
||||||
|
method: 'put',
|
||||||
|
data
|
||||||
|
})
|
||||||
|
}
|
||||||
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1545655517713" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2733" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M909.7 132.6v620H114.3v-620h795.4m50-50H64.3v720h895.5v-720h-0.1zM317.9 208.3L150.8 407.4l0.2 0.2 167.1 199.2 38.3-32.1-140.3-167.3 140.2-167-38.4-32.1z m389 0l-38.3 32.1 140.2 167-140.4 167.3 38.3 32.1 167.1-199.2 0.2-0.2-167.1-199.1z m-143.5 1.2l-149 403.4 46.9 17.3 149-403.4-46.9-17.3zM957 855.8H67v50h890v-50z" fill="" p-id="2734"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547360688278" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6717" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M890 120H134a70 70 0 0 0-70 70v500a70 70 0 0 0 70 70h756a70 70 0 0 0 70-70V190a70 70 0 0 0-70-70z m-10 520a40 40 0 0 1-40 40H712V448a40 40 0 0 0-80 0v232h-80V368a40 40 0 0 0-80 0v312h-80V512a40 40 0 0 0-80 0v168H184a40 40 0 0 1-40-40V240a40 40 0 0 1 40-40h656a40 40 0 0 1 40 40zM696 824H328a40 40 0 0 0 0 80h368a40 40 0 0 0 0-80z" fill="#bfbfbf" p-id="6718"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 757 B |
1
src/icons/svg/develop.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547195013953" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="2807" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M529.0496 527.616l-30.7712-30.7456 85.0688-85.0944 30.7712 30.7712z" p-id="2808" fill="#cdcdcd"></path><path d="M0 340.48l427.52 256 248.32 427.52L1024 0l-1024 340.48zM665.6 921.6l-207.36-355.84-355.84-212.48L911.36 81.92l-243.2 243.2 30.72 30.72 243.2-243.2L665.6 921.6z" p-id="2809" fill="#cdcdcd"></path></svg>
|
||||||
|
After Width: | Height: | Size: 699 B |
1
src/icons/svg/error.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547360570987" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5914" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M234.27218 32h58.36780969v179.99999344h-58.36874719V32zM583.99997844 32h58.27218562v179.99999344H583.99997844V32zM175.99999437 331.99998875h524.59216688v59.99999719H175.99999437v-59.99999719z m0 179.9999925h291.40780125v59.99999812H175.99999437v-59.99999812z m352.55998594 383.999985H32V79.99999812h767.99997v381.6477975C911.16871531 492.99216969 991.9999625 597.1043525 991.9999625 721.99997281c0 149.99999437-116.59218281 269.99998969-262.27217719 269.99998969a258.38436469 258.38436469 0 0 1-201.1199925-95.99999625z m212.35217906-443.75998312V138.31999625H91.08781062v699.35997188H492.36873219A277.72780125 277.72780125 0 0 1 467.40779562 721.99997281c0-149.99999437 116.59218281-269.99998969 262.31998969-269.99998875 3.744375 0 7.4878125 0.095625 11.18437407 0.23999906zM175.99999437 691.99997469h233.13561563v59.99999719H175.99999437v-59.99999719z m553.72779094-179.99999344c-110.73562031 0-203.9999925 95.99999625-203.9999925 209.99999156s93.26437125 209.99999156 203.9999925 209.9999925 203.9999925-95.99999625 203.99999156-209.9999925-93.26343375-209.99999156-203.99999156-209.99999156zM703.99997375 559.99997938h59.75999812v203.99999249H703.99997375V559.99997938z m59.75999812 239.99999062v59.75999812H703.99997375V799.99997h59.75999812z" p-id="5915" fill="#bfbfbf"></path></svg>
|
||||||
|
After Width: | Height: | Size: 1.6 KiB |
@@ -1 +0,0 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1546567963456" class="icon" style="" viewBox="0 0 1028 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3728" xmlns:xlink="http://www.w3.org/1999/xlink" width="200.78125" height="200"><defs><style type="text/css"></style></defs><path d="M320.747082 1024H0V0h1024v501.540856h-69.727626V69.727626H69.727626v884.544748h251.019456z" p-id="3729" fill="#bfbfbf"></path><path d="M903.171984 669.385214L786.228794 786.228794h87.657587c0 96.722179-78.592996 175.315175-175.315175 175.315175-28.588327 0.099611-56.678599-6.972763-81.780545-20.420234l-42.633463 42.633463c37.154864 23.707393 80.385992 36.258366 124.513619 36.258366C827.766537 1020.015564 932.357977 915.424125 932.357977 786.228794h87.657587L903.171984 669.385214zM523.256031 786.228794c0-96.722179 78.592996-175.315175 175.315175-175.315175 29.484825 0 57.575097 7.271595 81.780545 20.420233l42.633463-42.633463c-37.154864-23.707393-80.385992-36.258366-124.513619-36.258366-129.195331 0-233.78677 104.59144-233.78677 233.786771h-87.657588L494.070039 903.171984l116.84358-116.843579h-87.657588v-0.099611zM806.848249 241.357198H139.455253V295.844358h667.392996zM517.976654 482.814008H139.455253v54.387548h378.521401zM309.789883 724.171206H139.455253v54.48716h170.33463z" p-id="3730" fill="#bfbfbf"></path></svg>
|
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB |
1
src/icons/svg/java.svg
Normal file
@@ -0,0 +1 @@
|
|||||||
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547192680027" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="749" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M377.596784 791.989528s-39.199482 22.799699 27.799633 30.399598c81.198926 9.199878 122.598379 7.999894 211.997197-8.999881 0 0 23.599688 14.799804 56.399254 27.599635C473.395518 926.787745 220.198866 835.988946 377.596784 791.989528m-24.399677-112.198517s-43.799421 32.399572 23.199693 39.399479c86.598855 8.999881 155.197948 9.599873 273.596382-13.199825 0 0 16.399783 16.599781 42.199442 25.599661-242.596792 70.999061-512.593222 5.799923-338.995517-51.799315m206.397271-190.197485c49.399347 56.799249-12.999828 107.998572-12.999828 107.998572s125.398342-64.799143 67.799103-145.798072c-53.799289-75.599-94.998744-113.198503 128.198305-242.596792 0.199997 0-350.395367 87.598842-182.99758 280.396292m265.196493 385.194907s28.999617 23.799685-31.799579 42.399439c-115.798469 34.999537-481.593632 45.599397-583.192289 1.399982-36.599516-15.799791 31.999577-37.999498 53.599291-42.599437 22.399704-4.799937 35.399532-3.999947 35.399532-3.999947-40.599463-28.599622-262.596528 56.199257-112.798508 80.398937 408.3946 66.399122 744.790152-29.799606 638.791553-77.598974M396.396536 563.592548s-186.197538 44.199416-65.999128 60.199204c50.799328 6.79991 151.99799 5.199931 246.196745-2.599966 76.998982-6.399915 154.397958-20.39973 154.397958-20.39973s-27.19964 11.599847-46.799381 24.999669c-188.997501 49.799342-553.992675 26.599648-448.994063-24.19968 88.998823-42.799434 161.197869-37.999498 161.197869-37.999497m333.995583 186.597532c192.197459-99.79868 103.198635-195.797411 41.199456-182.797582-15.199799 3.199958-21.999709 5.999921-21.999709 5.99992s5.599926-8.799884 16.399783-12.599833c122.598379-43.199429 216.997131 127.198318-39.599477 194.597427 0-0.199997 2.99996-2.799963 3.999947-5.199932M614.393653 0s106.398593 106.398593-100.998664 269.99643c-166.197802 131.198265-37.999498 206.197274 0 291.596144-96.998717-87.598842-168.197776-164.597824-120.398408-236.396874C463.195652 220.197088 657.393085 168.997765 614.393653 0m-198.997369 1020.786502c184.397562 11.799844 467.593817-6.599913 474.19373-93.798759 0 0-12.799831 32.999564-152.397985 59.399214-157.397919 29.599609-351.595351 26.199654-466.59383 7.199905 0-0.199997 23.599688 19.399743 144.798085 27.19964" fill="#bfbfbf" p-id="750"></path></svg>
|
||||||
|
After Width: | Height: | Size: 2.5 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1544607474278" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="5709" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M856.96 115.904H222.144v105.472h-77.44c-14.528 0-28.544 10.368-28.544 24.96v52.48c0 14.528 14.016 28.032 28.544 28.032H222.08v52.992H144.704c-14.528 0-28.544 10.368-28.544 24.96v52.992c0 14.528 14.016 28.032 28.544 28.032H222.08v51.968H144.704c-14.528 0-28.544 10.368-28.544 24.96v52.992c0 14.528 14.016 28.032 28.544 28.032H222.08v52.992H144.704c-14.528 0-28.544 10.368-28.544 24.96v52.992c0 14.528 14.016 28.032 28.544 28.032H222.08v105.472h634.816c29.12 0 50.88-25.472 50.88-54.528V167.872c0.064-30.144-21.76-51.968-50.816-51.968zM380.032 854.08H274.624v-52.992h28.544c14.528 0 24.384-13.504 24.384-28.032v-52.992c0-14.528-9.856-24.96-24.384-24.96h-28.544v-52.992h28.544c14.528 0 24.384-13.504 24.384-28.032v-51.456c0-14.528-9.856-24.96-24.384-24.96h-28.544v-52.928h28.544c14.528 0 24.384-13.504 24.384-28.032v-52.48c0-14.528-9.856-24.96-24.384-24.96h-28.544v-52.48h28.544c14.528 0 24.384-13.504 24.384-28.032V245.76c0-14.528-9.856-24.96-24.384-24.96h-28.544v-52.48h105.472l-0.064 685.76z" fill="#bfbfbf" p-id="5710"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547360510388" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="4026" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M787.692308 275.692308V78.769231c0-43.323077-35.446154-78.769231-78.769231-78.769231H78.769231C35.446154 0 0 35.446154 0 78.769231v866.461538c0 43.323077 35.446154 78.769231 78.769231 78.769231h354.461538v-39.384615H78.769231c-19.692308 0-39.384615-15.753846-39.384616-39.384616V78.769231c0-23.630769 15.753846-39.384615 39.384616-39.384616h630.153846c19.692308 0 39.384615 15.753846 39.384615 39.384616v196.923077h39.384616z" fill="#bfbfbf" p-id="4027"></path><path d="M137.846154 472.615385h196.923077c11.815385 0 19.692308 7.876923 19.692307 19.692307s-7.876923 19.692308-19.692307 19.692308h-196.923077c-11.815385 0-19.692308-7.876923-19.692308-19.692308s7.876923-19.692308 19.692308-19.692307zM137.846154 669.538462h118.153846c11.815385 0 19.692308 7.876923 19.692308 19.692307s-7.876923 19.692308-19.692308 19.692308h-118.153846c-11.815385 0-19.692308-7.876923-19.692308-19.692308s7.876923-19.692308 19.692308-19.692307zM137.846154 275.692308h354.461538c11.815385 0 19.692308 7.876923 19.692308 19.692307s-7.876923 19.692308-19.692308 19.692308h-354.461538c-11.815385 0-19.692308-7.876923-19.692308-19.692308s7.876923-19.692308 19.692308-19.692307zM716.8 433.230769c7.876923 0 19.692308 0 31.507692 3.938462 0 3.938462 3.938462 11.815385 3.938462 19.692307 3.938462 23.630769 11.815385 63.015385 55.138461 78.769231 7.876923 3.938462 15.753846 3.938462 19.692308 3.938462 31.507692 0 51.2-19.692308 66.953846-35.446154l11.815385-11.815385c43.323077 19.692308 66.953846 51.2 70.892308 98.461539-3.938462 3.938462-11.815385 7.876923-19.692308 7.876923-15.753846 7.876923-51.2 27.569231-51.2 70.892308s39.384615 63.015385 63.015384 74.830769c3.938462 3.938462 11.815385 7.876923 19.692308 7.876923-3.938462 47.261538-27.569231 74.830769-74.830769 98.461538l-11.815385-11.815384c-15.753846-15.753846-35.446154-31.507692-66.953846-31.507693-7.876923 0-15.753846 0-23.630769 3.938462-43.323077 11.815385-51.2 51.2-55.138462 74.830769 0 3.938462-3.938462 11.815385-3.938461 15.753846-11.815385 0-19.692308 3.938462-31.507692 3.938462-35.446154 0-63.015385-11.815385-86.646154-39.384616 0-3.938462 3.938462-11.815385 7.876923-15.753846 11.815385-23.630769 31.507692-59.076923 3.938461-94.523077-7.876923-11.815385-27.569231-27.569231-63.015384-27.56923-11.815385 0-19.692308 0-31.507693 3.938461-7.876923 0-15.753846 3.938462-19.692307 3.938462-23.630769-43.323077-23.630769-78.769231 0-122.092308 3.938462 0 11.815385 0 19.692307 3.938462 7.876923 0 19.692308 3.938462 31.507693 3.938461 31.507692 0 51.2-15.753846 63.015384-27.569231 27.569231-35.446154 7.876923-74.830769-3.938461-94.523077-3.938462-3.938462-7.876923-11.815385-7.876923-15.753846 23.630769-39.384615 51.2-51.2 82.707692-51.2m0-39.384615c-47.261538 0-82.707692 19.692308-118.153846 55.138461-27.569231 31.507692 35.446154 78.769231 11.815384 110.276923-7.876923 11.815385-19.692308 11.815385-31.507692 11.815385-15.753846 0-35.446154-3.938462-51.2-3.938461-11.815385 0-23.630769 3.938462-31.507692 15.753846-31.507692 55.138462-31.507692 110.276923 0 169.353846 7.876923 11.815385 19.692308 15.753846 31.507692 15.753846 15.753846 0 35.446154-3.938462 51.2-3.938462 11.815385 0 23.630769 3.938462 31.507692 11.815385 23.630769 35.446154-43.323077 78.769231-11.815384 110.276923 35.446154 39.384615 74.830769 55.138462 122.092308 55.138462 11.815385 0 27.569231 0 43.323076-3.938462 43.323077-7.876923 19.692308-78.769231 59.076924-94.523077h7.876923c31.507692 0 51.2 47.261538 78.76923 47.261539 3.938462 0 7.876923 0 11.815385-3.938462 63.015385-27.569231 94.523077-70.892308 102.4-133.907692 3.938462-43.323077-78.769231-43.323077-78.769231-82.707692 0-43.323077 82.707692-39.384615 78.769231-82.707693-7.876923-63.015385-39.384615-110.276923-102.4-133.907692-3.938462 0-7.876923-3.938462-11.815385-3.938462-31.507692 0-51.2 51.2-82.707692 51.2h-7.876923c-39.384615-11.815385-15.753846-86.646154-59.076923-98.461538-15.753846-7.876923-27.569231-7.876923-43.323077-7.876923z" fill="#bfbfbf" p-id="4028"></path><path d="M748.307692 590.769231c43.323077 0 78.769231 35.446154 78.769231 78.769231s-35.446154 78.769231-78.769231 78.76923-78.769231-35.446154-78.76923-78.76923 35.446154-78.769231 78.76923-78.769231m0-39.384616c-66.953846 0-118.153846 51.2-118.153846 118.153847s51.2 118.153846 118.153846 118.153846 118.153846-51.2 118.153846-118.153846-51.2-118.153846-118.153846-118.153847z" fill="#bfbfbf" p-id="4029"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 4.7 KiB |
@@ -1 +1 @@
|
|||||||
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1544607289981" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="1034" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M578.587 758.356c-54.18 28.236-84.020 27.89-126.836 7.46-42.582-20.431-398.41-169.075-398.41-169.075v0 107.78c0 9.3 12.972 19.054 37.076 30.644 48.668 23.306 318.752 132.227 361.219 152.775 42.586 20.431 72.657 20.547 126.836-7.46 54.175-28.236 307.728-132.345 356.742-158.057v0c24.908-12.966 35.925-23.186 35.925-32.254v-106.401h-0.115c-0.115-0.114-338.495 146.234-392.438 174.587v0zM578.587 758.356z" p-id="1035"></path><path d="M578.587 606.954c-54.18 28.236-84.020 27.89-126.836 7.46-42.582-20.547-398.41-169.303-398.41-169.303v0 107.787c0 9.292 12.972 19.054 37.076 30.644 48.668 23.414 318.752 132.345 361.219 152.889 42.586 20.431 72.657 20.547 126.836-7.46 54.175-28.236 307.728-132.345 356.742-158.057 24.908-12.97 35.925-23.184 35.925-32.253v-106.405h-0.115c-0.115-0.001-338.495 146.348-392.438 174.698v0zM578.587 606.954z" p-id="1036"></path><path d="M971.251 290.388c0.46-9.3-11.936-17.565-36.386-26.519-47.749-17.559-299.923-117.884-348.246-135.556-48.439-17.68-68.066-16.875-124.769 3.328-56.703 20.203-325.297 125.689-373.047 144.396-24.103 9.414-35.81 18.255-35.121 27.663v-0.114 106.060c0 0 355.598 149.792 398.41 170.223 42.581 20.431 72.657 20.547 126.836-7.46 54.060-28.467 392.668-177.223 392.668-177.223l-0.343-104.797zM852.457 293.254l-139.463 54.979-125.682-49.698 139.229-55.099 125.917 49.818zM594.883 345.48l-64.393 94.24-148.304-61.525 212.698-32.715zM483.197 202.233l-20.547-37.995 64.169 25.025 60.377-19.858-16.415 39.138 61.634 23.186-79.542 8.151-17.909 43.046-28.69-47.87-91.829-8.15 68.755-24.674zM324.801 255.604c62.784 0 113.746 19.627 113.746 44.076 0 24.22-50.961 44.076-113.746 44.076-62.788 0-113.749-19.626-113.749-44.076 0.114-24.103 50.96-44.076 113.749-44.076v0zM324.801 255.604z" p-id="1037"></path></svg>
|
<?xml version="1.0" standalone="no"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd"><svg t="1547360607827" class="icon" style="" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="6287" xmlns:xlink="http://www.w3.org/1999/xlink" width="200" height="200"><defs><style type="text/css"></style></defs><path d="M900.512 388.751V287.87L512.708 63.967 124.904 287.87v240.093c-23.42 6.798-40.924 27.562-40.924 53.144s17.504 46.346 40.924 53.144v101.424l387.804 223.862 387.804-223.862V494.761c23.13-6.979 40.345-27.642 40.345-52.984 0-25.376-17.215-46.047-40.345-53.026zM114.87 581.107c0-13.999 11.356-25.355 25.355-25.355 13.958 0 25.314 11.356 25.314 25.355s-11.356 25.355-25.314 25.355c-13.999 0-25.355-11.356-25.355-25.355z m754.753 136.729L512.708 923.858 155.793 717.836v-83.638c23.265-6.883 40.635-27.603 40.635-53.09 0-25.487-17.37-46.207-40.635-53.09V305.709L512.708 99.646l356.915 206.063v82.856c-23.585 6.692-41.254 27.513-41.254 53.212 0 25.665 17.669 46.48 41.254 53.17v222.889z m14.99-250.745c-13.999 0-25.355-11.356-25.355-25.314 0-13.999 11.356-25.355 25.355-25.355s25.355 11.356 25.355 25.355c0 13.958-11.356 25.314-25.355 25.314z m-184.631-117.32c-5.947-2.271-12.678-0.661-17.014 4.047L511.841 542.29 338.029 357.576c-4.295-4.666-10.985-6.153-16.931-3.758a15.428 15.428 0 0 0-9.746 14.329v315.867h30.889V407.089l158.574 168.526a15.404 15.404 0 0 0 11.232 4.873c3.469-0.289 8.507-1.9 11.439-5.079l155.477-171.251v279.817h30.889v-319.79a15.492 15.492 0 0 0-9.87-14.414z" fill="#bfbfbf" p-id="6288"></path></svg>
|
||||||
|
Before Width: | Height: | Size: 2.1 KiB After Width: | Height: | Size: 1.6 KiB |
@@ -3,7 +3,7 @@ import { initData } from '@/api/data'
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
loading: true, data: [], page: 0, size: 10, total: 0, url: '', params: {}, query: {}
|
loading: true, data: [], page: 0, size: 10, total: 0, url: '', params: {}, query: {}, time: 170
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
@@ -18,7 +18,7 @@ export default {
|
|||||||
this.data = res.content
|
this.data = res.content
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
}, 230)
|
}, this.time)
|
||||||
resolve(res)
|
resolve(res)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
|
|||||||
@@ -1,9 +1,8 @@
|
|||||||
import router from './router'
|
import router from './router'
|
||||||
import store from './store'
|
import store from './store'
|
||||||
import { Message } from 'element-ui'
|
|
||||||
import NProgress from 'nprogress' // progress bar
|
import NProgress from 'nprogress' // progress bar
|
||||||
import 'nprogress/nprogress.css'// progress bar style
|
import 'nprogress/nprogress.css'// progress bar style
|
||||||
import { getToken } from '@/utils/auth' // getToken from cookie
|
import { getToken, getStorageToken } from '@/utils/auth' // getToken from cookie
|
||||||
import { buildMenus } from '@/api/menu'
|
import { buildMenus } from '@/api/menu'
|
||||||
import { filterAsyncRouter } from './store/modules/permission'
|
import { filterAsyncRouter } from './store/modules/permission'
|
||||||
|
|
||||||
@@ -11,16 +10,9 @@ NProgress.configure({ showSpinner: false })// NProgress Configuration
|
|||||||
|
|
||||||
const whiteList = ['/login']// no redirect whitelist
|
const whiteList = ['/login']// no redirect whitelist
|
||||||
|
|
||||||
// auth judge function
|
|
||||||
function hasPermission(roles, permissionRoles) {
|
|
||||||
if (roles.indexOf('ADMIN') >= 0) return true // admin auth passed directly
|
|
||||||
if (!permissionRoles) return true
|
|
||||||
return roles.some(role => permissionRoles.indexOf(role) >= 0)
|
|
||||||
}
|
|
||||||
|
|
||||||
router.beforeEach((to, from, next) => {
|
router.beforeEach((to, from, next) => {
|
||||||
NProgress.start() // start progress bar
|
NProgress.start() // start progress bar
|
||||||
if (getToken()) {
|
if (getToken() || getStorageToken()) {
|
||||||
// 已登录且要跳转的页面是登录页
|
// 已登录且要跳转的页面是登录页
|
||||||
if (to.path === '/login') {
|
if (to.path === '/login') {
|
||||||
next({ path: '/' })
|
next({ path: '/' })
|
||||||
@@ -37,18 +29,13 @@ router.beforeEach((to, from, next) => {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
}).catch((err) => {
|
}).catch((err) => {
|
||||||
|
console.log(err)
|
||||||
store.dispatch('LogOut').then(() => {
|
store.dispatch('LogOut').then(() => {
|
||||||
Message.error(err || 'Verification failed, please login again')
|
location.reload() // 为了重新实例化vue-router对象 避免bug
|
||||||
next({ path: '/' })
|
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
// 没有动态改变权限的需求可直接next() 删除下方权限判断 ↓
|
|
||||||
if (hasPermission(store.getters.roles, to.meta.roles)) {
|
|
||||||
next()
|
next()
|
||||||
} else {
|
|
||||||
next({ path: '/401', replace: true, query: { noGoBack: true }})
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
import { login, getInfo } from '@/api/login'
|
import { login, getInfo } from '@/api/login'
|
||||||
import { getToken, setToken, removeToken } from '@/utils/auth'
|
import { getToken, setToken, setStorageToken, removeToken } from '@/utils/auth'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
|
|
||||||
const user = {
|
const user = {
|
||||||
@@ -36,11 +36,16 @@ const user = {
|
|||||||
actions: {
|
actions: {
|
||||||
// 登录
|
// 登录
|
||||||
Login({ commit }, userInfo) {
|
Login({ commit }, userInfo) {
|
||||||
const username = userInfo.username.trim()
|
const username = userInfo.username
|
||||||
|
const password = userInfo.password
|
||||||
|
const rememberMe = userInfo.rememberMe
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
login(username, userInfo.password).then(res => {
|
login(username, password).then(res => {
|
||||||
setToken(res.token)
|
setToken(res.token)
|
||||||
commit('SET_TOKEN', res.token)
|
commit('SET_TOKEN', res.token)
|
||||||
|
if (rememberMe) {
|
||||||
|
setStorageToken(res.token)
|
||||||
|
}
|
||||||
resolve()
|
resolve()
|
||||||
}).catch(error => {
|
}).catch(error => {
|
||||||
reject(error)
|
reject(error)
|
||||||
@@ -49,7 +54,7 @@ const user = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 获取用户信息
|
// 获取用户信息
|
||||||
GetInfo({ commit, state }) {
|
GetInfo({ commit }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
getInfo().then(res => {
|
getInfo().then(res => {
|
||||||
commit('SET_ROLES', res.roles)
|
commit('SET_ROLES', res.roles)
|
||||||
@@ -65,7 +70,7 @@ const user = {
|
|||||||
},
|
},
|
||||||
|
|
||||||
// 登出
|
// 登出
|
||||||
LogOut({ commit, state }) {
|
LogOut({ commit }) {
|
||||||
return new Promise((resolve, reject) => {
|
return new Promise((resolve, reject) => {
|
||||||
commit('SET_TOKEN', '')
|
commit('SET_TOKEN', '')
|
||||||
commit('SET_ROLES', [])
|
commit('SET_ROLES', [])
|
||||||
|
|||||||
@@ -126,18 +126,3 @@ a:hover {
|
|||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
border-radius: 16px;
|
border-radius: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.badge {
|
|
||||||
position: relative;
|
|
||||||
display: inline-block;
|
|
||||||
padding: 0 6px;
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: center;
|
|
||||||
background-color: #2F4056;
|
|
||||||
color: #fff;
|
|
||||||
border-radius: 2px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.badge-bg-orange {
|
|
||||||
background-color: #FF5722!important;
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -1,15 +1,25 @@
|
|||||||
import Cookies from 'js-cookie'
|
import Cookies from 'js-cookie'
|
||||||
|
|
||||||
const TokenKey = 'Admin-Token'
|
const TokenKey = 'Admin-Token'
|
||||||
|
const storageTokenKey = 'EL_ADMIN_COOKIE_TOKEN'
|
||||||
|
|
||||||
export function getToken() {
|
export function getToken() {
|
||||||
return Cookies.get(TokenKey)
|
return Cookies.get(TokenKey)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function getStorageToken() {
|
||||||
|
return localStorage.getItem(storageTokenKey)
|
||||||
|
}
|
||||||
|
|
||||||
export function setToken(token) {
|
export function setToken(token) {
|
||||||
return Cookies.set(TokenKey, token)
|
return Cookies.set(TokenKey, token)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function setStorageToken(token) {
|
||||||
|
return localStorage.setItem(storageTokenKey, token)
|
||||||
|
}
|
||||||
|
|
||||||
export function removeToken() {
|
export function removeToken() {
|
||||||
|
localStorage.removeItem(storageTokenKey)
|
||||||
return Cookies.remove(TokenKey)
|
return Cookies.remove(TokenKey)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,7 +2,7 @@ import axios from 'axios'
|
|||||||
import router from '@/router'
|
import router from '@/router'
|
||||||
import { Notification, MessageBox } from 'element-ui'
|
import { Notification, MessageBox } from 'element-ui'
|
||||||
import store from '../store'
|
import store from '../store'
|
||||||
import { getToken } from '@/utils/auth'
|
import { getToken, getStorageToken } from '@/utils/auth'
|
||||||
|
|
||||||
// 创建axios实例
|
// 创建axios实例
|
||||||
const service = axios.create({
|
const service = axios.create({
|
||||||
@@ -13,8 +13,10 @@ const service = axios.create({
|
|||||||
// request拦截器
|
// request拦截器
|
||||||
service.interceptors.request.use(
|
service.interceptors.request.use(
|
||||||
config => {
|
config => {
|
||||||
if (store.getters.token) {
|
if (getToken()) {
|
||||||
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
config.headers['Authorization'] = 'Bearer ' + getToken() // 让每个请求携带自定义token 请根据实际情况自行修改
|
||||||
|
} else if (getStorageToken()) {
|
||||||
|
config.headers['Authorization'] = 'Bearer ' + getStorageToken()
|
||||||
}
|
}
|
||||||
config.headers['Content-Type'] = 'application/json'
|
config.headers['Content-Type'] = 'application/json'
|
||||||
return config
|
return config
|
||||||
@@ -54,8 +56,8 @@ service.interceptors.response.use(
|
|||||||
}
|
}
|
||||||
if (code === 401) {
|
if (code === 401) {
|
||||||
MessageBox.confirm(
|
MessageBox.confirm(
|
||||||
'登录状态已失效,你可以取消继续留在该页面,或者重新登录',
|
'登录状态过期了哦,您可以继续留在该页面,或者重新登录',
|
||||||
'提示',
|
'系统提示',
|
||||||
{
|
{
|
||||||
confirmButtonText: '重新登录',
|
confirmButtonText: '重新登录',
|
||||||
cancelButtonText: '取消',
|
cancelButtonText: '取消',
|
||||||
|
|||||||
62
src/views/generator/index.vue
Normal file
@@ -0,0 +1,62 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<eHeader :query="query"/>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;">
|
||||||
|
<el-table-column label="序号" width="80" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.$index + 1 }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="tableName" label="表名"/>
|
||||||
|
<el-table-column prop="createTime" label="创建日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="操作" width="160px" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<Generator :name="scope.row.tableName"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!--分页组件-->
|
||||||
|
<el-pagination
|
||||||
|
:total="total"
|
||||||
|
style="margin-top: 8px;"
|
||||||
|
layout="total, prev, pager, next, sizes"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@current-change="pageChange"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import initData from '@/mixins/initData'
|
||||||
|
import { parseTime } from '@/utils/index'
|
||||||
|
import eHeader from './module/header'
|
||||||
|
import Generator from './module/generator'
|
||||||
|
export default {
|
||||||
|
components: { eHeader, Generator },
|
||||||
|
mixins: [initData],
|
||||||
|
created() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
parseTime,
|
||||||
|
beforeInit() {
|
||||||
|
this.url = 'api/generator/tables'
|
||||||
|
const query = this.query
|
||||||
|
const name = query.name
|
||||||
|
this.params = { page: this.page, size: this.size }
|
||||||
|
if (name) { this.params['name'] = name }
|
||||||
|
return true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
99
src/views/generator/module/form.vue
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
<template>
|
||||||
|
<el-dialog :append-to-body="true" :visible.sync="dialog" title="生成器配置" width="550px">
|
||||||
|
<el-form ref="form" :model="form" :rules="rules" size="small" label-width="78px">
|
||||||
|
<el-form-item label="作者名称" prop="author">
|
||||||
|
<el-input v-model="form.author" style="width: 420px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="至于包下" prop="pack">
|
||||||
|
<el-input v-model="form.pack" style="width: 420px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="模块名称" prop="moduleName">
|
||||||
|
<el-input v-model="form.moduleName" style="width: 420px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="前端路径" prop="path">
|
||||||
|
<el-input v-model="form.path" style="width: 420px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="API路径" prop="apiPath">
|
||||||
|
<el-input v-model="form.apiPath" style="width: 420px;"/>
|
||||||
|
</el-form-item>
|
||||||
|
<el-form-item label="是否覆盖" prop="cover">
|
||||||
|
<el-radio v-model="form.cover" label="true">是</el-radio>
|
||||||
|
<el-radio v-model="form.cover" label="false">否</el-radio>
|
||||||
|
</el-form-item>
|
||||||
|
</el-form>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="cancel">取消</el-button>
|
||||||
|
<el-button :loading="loading" type="primary" @click="doSubmit">确认</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { update } from '@/api/genConfig'
|
||||||
|
export default {
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
loading: false, dialog: false,
|
||||||
|
form: { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '' },
|
||||||
|
rules: {
|
||||||
|
author: [
|
||||||
|
{ required: true, message: '作者不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
pack: [
|
||||||
|
{ required: true, message: '包路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
moduleName: [
|
||||||
|
{ required: true, message: '包路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
path: [
|
||||||
|
{ required: true, message: '前端代码生成路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
apiPath: [
|
||||||
|
{ required: true, message: '前端Api文件生成路径不能为空', trigger: 'blur' }
|
||||||
|
],
|
||||||
|
cover: [
|
||||||
|
{ required: true, message: '不能为空', trigger: 'blur' }
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
cancel() {
|
||||||
|
this.resetForm()
|
||||||
|
},
|
||||||
|
doSubmit() {
|
||||||
|
this.$refs['form'].validate((valid) => {
|
||||||
|
if (valid) {
|
||||||
|
this.loading = true
|
||||||
|
this.doUpdate()
|
||||||
|
} else {
|
||||||
|
return false
|
||||||
|
}
|
||||||
|
})
|
||||||
|
},
|
||||||
|
doUpdate() {
|
||||||
|
update(this.form).then(res => {
|
||||||
|
this.resetForm()
|
||||||
|
this.$notify({
|
||||||
|
title: '更新成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2500
|
||||||
|
})
|
||||||
|
this.loading = false
|
||||||
|
}).catch(err => {
|
||||||
|
this.loading = false
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
},
|
||||||
|
resetForm() {
|
||||||
|
this.dialog = false
|
||||||
|
this.$refs['form'].resetFields()
|
||||||
|
this.form = { author: '', pack: '', path: '', moduleName: '', cover: 'false', apiPath: '' }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
113
src/views/generator/module/generator.vue
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-button v-if="checkPermission(['ADMIN','JOB_ALL','JOB_EDIT'])" type="success" size="mini" @click="to">生成代码</el-button>
|
||||||
|
<el-dialog :append-to-body="true" :visible.sync="dialog" title="代码生成配置" width="800px">
|
||||||
|
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;">
|
||||||
|
<el-table-column label="序号" width="80" align="center">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div>{{ scope.$index + 1 }}</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="columnName" label="字段名称"/>
|
||||||
|
<el-table-column prop="columnType" label="字段类型"/>
|
||||||
|
<el-table-column prop="columnComment" label="字段标题">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-input v-model="data[scope.$index].columnComment" class="edit-input"/>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="查询方式">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-select v-model="data[scope.$index].columnQuery" class="edit-input" clearable placeholder="请选择">
|
||||||
|
<el-option
|
||||||
|
label="模糊查询"
|
||||||
|
value="1"/>
|
||||||
|
<el-option
|
||||||
|
label="精确查询"
|
||||||
|
value="2"/>
|
||||||
|
</el-select>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column align="center" prop="columnShow" label="列表显示">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-tooltip :content="scope.row.columnShow === 'true' ?'显示':'不显示'" placement="top">
|
||||||
|
<el-switch
|
||||||
|
v-model="data[scope.$index].columnShow"
|
||||||
|
active-color="#13ce66"
|
||||||
|
inactive-color="#ff4949"
|
||||||
|
active-value="true"
|
||||||
|
inactive-value="false"/>
|
||||||
|
</el-tooltip>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<div slot="footer" class="dialog-footer">
|
||||||
|
<el-button type="text" @click="cancel">取消</el-button>
|
||||||
|
<el-button :loading="genLoading" type="primary" @click="doSubmit">生成</el-button>
|
||||||
|
</div>
|
||||||
|
</el-dialog>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import checkPermission from '@/utils/permission'
|
||||||
|
import initData from '@/mixins/initData'
|
||||||
|
import { generator } from '@/api/generator'
|
||||||
|
export default {
|
||||||
|
name: 'Generator',
|
||||||
|
mixins: [initData],
|
||||||
|
props: {
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
genLoading: false, dialog: false, columnQuery: ''
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
checkPermission,
|
||||||
|
to() {
|
||||||
|
this.dialog = true
|
||||||
|
this.time = 130
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
beforeInit() {
|
||||||
|
this.url = 'api/generator/columns'
|
||||||
|
const tableName = this.name
|
||||||
|
this.params = { tableName }
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
cancel() {
|
||||||
|
this.dialog = false
|
||||||
|
},
|
||||||
|
doSubmit() {
|
||||||
|
this.genLoading = true
|
||||||
|
generator(this.data, this.name).then(res => {
|
||||||
|
this.$notify({
|
||||||
|
title: '生成成功',
|
||||||
|
type: 'success',
|
||||||
|
duration: 2500
|
||||||
|
})
|
||||||
|
this.dialog = false
|
||||||
|
this.genLoading = false
|
||||||
|
}).catch(err => {
|
||||||
|
this.dialog = false
|
||||||
|
this.genLoading = false
|
||||||
|
console.log(err.response.data.message)
|
||||||
|
})
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
|
.edit-input {
|
||||||
|
.el-input__inner {
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</style>
|
||||||
45
src/views/generator/module/header.vue
Normal file
@@ -0,0 +1,45 @@
|
|||||||
|
<template>
|
||||||
|
<div class="head-container">
|
||||||
|
<el-input v-model="query.name" clearable placeholder="请输入表名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||||
|
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||||
|
<!-- 新增 -->
|
||||||
|
<div style="display: inline-block;margin: 0px 2px;">
|
||||||
|
<el-button
|
||||||
|
class="filter-item"
|
||||||
|
size="mini"
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-setting"
|
||||||
|
@click="to">生成器配置</el-button>
|
||||||
|
<eForm ref="form"/>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { get } from '@/api/genConfig'
|
||||||
|
import eForm from './form'
|
||||||
|
// 查询条件
|
||||||
|
export default {
|
||||||
|
components: { eForm },
|
||||||
|
props: {
|
||||||
|
query: {
|
||||||
|
type: Object,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
toQuery() {
|
||||||
|
this.$parent.page = 0
|
||||||
|
this.$parent.init()
|
||||||
|
},
|
||||||
|
to() {
|
||||||
|
const _this = this.$refs.form
|
||||||
|
get().then(data => {
|
||||||
|
_this.form = data
|
||||||
|
_this.form.cover = _this.form.cover.toString()
|
||||||
|
})
|
||||||
|
_this.dialog = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
@@ -1,32 +1,20 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="login-container">
|
<div class="login">
|
||||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
|
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" label-position="left" label-width="0px" class="login-form">
|
||||||
<div class="title-container">
|
<h3 class="title">el-admin 后台管理系统</h3>
|
||||||
<h3 class="title">欢 迎 登 录</h3>
|
|
||||||
</div>
|
|
||||||
<el-form-item prop="username">
|
<el-form-item prop="username">
|
||||||
<span class="svg-container">
|
<el-input v-model="loginForm.username" type="text" auto-complete="off" placeholder="账号">
|
||||||
<svg-icon icon-class="user" />
|
<svg-icon slot="prefix" icon-class="user" class="el-input__icon" style="height: 39px;width: 13px;margin-left: 2px;" />
|
||||||
</span>
|
</el-input>
|
||||||
<el-input v-model="loginForm.username" name="username" type="text" auto-complete="on" placeholder="username" />
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item prop="password">
|
<el-form-item prop="password">
|
||||||
<span class="svg-container">
|
<el-input v-model="loginForm.password" type="password" auto-complete="off" placeholder="密码">
|
||||||
<svg-icon icon-class="password" />
|
<svg-icon slot="prefix" icon-class="password" class="el-input__icon" style="height: 39px;width: 13px;margin-left: 2px;" />
|
||||||
</span>
|
</el-input>
|
||||||
<el-input
|
|
||||||
:type="pwdType"
|
|
||||||
v-model="loginForm.password"
|
|
||||||
name="password"
|
|
||||||
auto-complete="on"
|
|
||||||
placeholder="password"
|
|
||||||
@keyup.enter.native="handleLogin" />
|
|
||||||
<span class="show-pwd" @click="showPwd">
|
|
||||||
<svg-icon icon-class="eye" />
|
|
||||||
</span>
|
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 35px 0px;">记住密码</el-checkbox>
|
||||||
<el-button :loading="loading" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
<el-form-item style="width:100%;">
|
||||||
|
<el-button :loading="loading" size="medium" type="primary" style="width:100%;" @click.native.prevent="handleLogin">
|
||||||
<span v-if="!loading">登 录</span>
|
<span v-if="!loading">登 录</span>
|
||||||
<span v-else>登 录 中...</span>
|
<span v-else>登 录 中...</span>
|
||||||
</el-button>
|
</el-button>
|
||||||
@@ -41,9 +29,11 @@ export default {
|
|||||||
name: 'Login',
|
name: 'Login',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
checked: false,
|
||||||
loginForm: {
|
loginForm: {
|
||||||
username: 'admin',
|
username: 'admin',
|
||||||
password: '123456'
|
password: '123456',
|
||||||
|
rememberMe: false
|
||||||
},
|
},
|
||||||
loginRules: {
|
loginRules: {
|
||||||
username: [{ required: true, trigger: 'blur', message: '用户名不能为空' }],
|
username: [{ required: true, trigger: 'blur', message: '用户名不能为空' }],
|
||||||
@@ -72,7 +62,7 @@ export default {
|
|||||||
},
|
},
|
||||||
handleLogin() {
|
handleLogin() {
|
||||||
this.$refs.loginForm.validate(valid => {
|
this.$refs.loginForm.validate(valid => {
|
||||||
const user = { username: this.loginForm.username, password: md5(this.loginForm.password) }
|
const user = { username: this.loginForm.username, password: md5(this.loginForm.password), rememberMe: this.loginForm.rememberMe }
|
||||||
if (valid) {
|
if (valid) {
|
||||||
this.loading = true
|
this.loading = true
|
||||||
this.$store.dispatch('Login', user).then(() => {
|
this.$store.dispatch('Login', user).then(() => {
|
||||||
@@ -92,113 +82,29 @@ export default {
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss">
|
<style rel="stylesheet/scss" lang="scss">
|
||||||
/* 修复input 背景不协调 和光标变色 */
|
.login {
|
||||||
/* Detail see https://github.com/PanJiaChen/vue-element-admin/pull/927 */
|
display: flex;
|
||||||
$bg:#283443;
|
justify-content: center;
|
||||||
$light_gray:#eee;
|
align-items: center;
|
||||||
$cursor: #fff;
|
background-image:url( https://aurora-1255840532.cos.ap-chengdu.myqcloud.com/1547428971990.jpg);
|
||||||
@supports (-webkit-mask: none) and (not (cater-color: $cursor)) {
|
|
||||||
.login-container .el-input input{
|
|
||||||
color: $cursor;
|
|
||||||
&::first-line {
|
|
||||||
color: $light_gray;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
/* reset element-ui css */
|
|
||||||
.login-container {
|
|
||||||
.el-input {
|
|
||||||
display: inline-block;
|
|
||||||
height: 47px;
|
|
||||||
width: 85%;
|
|
||||||
input {
|
|
||||||
background: transparent;
|
|
||||||
border: 0px;
|
|
||||||
-webkit-appearance: none;
|
|
||||||
border-radius: 0px;
|
|
||||||
padding: 12px 5px 12px 15px;
|
|
||||||
color: $light_gray;
|
|
||||||
height: 47px;
|
|
||||||
caret-color: $cursor;
|
|
||||||
&:-webkit-autofill {
|
|
||||||
-webkit-box-shadow: 0 0 0px 1000px $bg inset !important;
|
|
||||||
-webkit-text-fill-color: $cursor !important;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.el-form-item {
|
|
||||||
border: 1px solid rgba(255, 255, 255, 0.1);
|
|
||||||
background: rgba(0, 0, 0, 0.1);
|
|
||||||
border-radius: 5px;
|
|
||||||
color: #454545;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</style>
|
|
||||||
|
|
||||||
<style rel="stylesheet/scss" lang="scss" scoped>
|
|
||||||
$bg:#2d3a4b;
|
|
||||||
$dark_gray:#889aa4;
|
|
||||||
$light_gray:#eee;
|
|
||||||
.login-container {
|
|
||||||
position: fixed;
|
|
||||||
height: 100%;
|
height: 100%;
|
||||||
width: 100%;
|
|
||||||
background-color: $bg;
|
|
||||||
.login-form {
|
|
||||||
position: absolute;
|
|
||||||
left: 0;
|
|
||||||
right: 0;
|
|
||||||
width: 420px;
|
|
||||||
max-width: 100%;
|
|
||||||
padding: 35px 35px 15px 35px;
|
|
||||||
margin: 120px auto;
|
|
||||||
}
|
}
|
||||||
.tips {
|
|
||||||
font-size: 14px;
|
|
||||||
color: #fff;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
span {
|
|
||||||
&:first-of-type {
|
|
||||||
margin-right: 16px;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
.svg-container {
|
|
||||||
padding: 6px 5px 6px 15px;
|
|
||||||
color: $dark_gray;
|
|
||||||
vertical-align: middle;
|
|
||||||
width: 30px;
|
|
||||||
display: inline-block;
|
|
||||||
}
|
|
||||||
.title-container {
|
|
||||||
position: relative;
|
|
||||||
.title {
|
.title {
|
||||||
font-size: 26px;
|
|
||||||
color: $light_gray;
|
|
||||||
margin: 0px auto 40px auto;
|
margin: 0px auto 40px auto;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
font-weight: bold;
|
color: #555;
|
||||||
}
|
}
|
||||||
.set-language {
|
|
||||||
color: #fff;
|
.login-form {
|
||||||
position: absolute;
|
border-radius: 6px;
|
||||||
top: 5px;
|
background: #ffffff;
|
||||||
right: 0px;
|
width: 365px;
|
||||||
|
padding: 25px 25px 5px 25px;
|
||||||
|
.el-input {
|
||||||
|
height: 38px;
|
||||||
|
input {
|
||||||
|
height: 38px;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
.show-pwd {
|
|
||||||
position: absolute;
|
|
||||||
right: 10px;
|
|
||||||
top: 7px;
|
|
||||||
font-size: 16px;
|
|
||||||
color: $dark_gray;
|
|
||||||
cursor: pointer;
|
|
||||||
user-select: none;
|
|
||||||
}
|
|
||||||
.thirdparty-button {
|
|
||||||
position: absolute;
|
|
||||||
right: 35px;
|
|
||||||
bottom: 28px;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
77
src/views/monitor/log/errorLog.vue
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
<template>
|
||||||
|
<div class="app-container">
|
||||||
|
<eHeader :query="query"/>
|
||||||
|
<!--表格渲染-->
|
||||||
|
<el-table v-loading="loading" :data="data" size="small" border style="width: 100%;">
|
||||||
|
<el-table-column prop="username" label="用户名"/>
|
||||||
|
<el-table-column prop="requestIp" label="IP"/>
|
||||||
|
<el-table-column prop="description" label="描述"/>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="method" label="方法名称"/>
|
||||||
|
<el-table-column :show-overflow-tooltip="true" prop="params" label="参数"/>
|
||||||
|
<el-table-column prop="createTime" label="创建日期">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="createTime" label="异常详情" width="120px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button size="mini" type="text" @click="info(scope.row.exceptionDetail)">查看详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<el-dialog :visible.sync="dialog" style="margin-left: 100px" title="异常详情" top="0" width="85%">
|
||||||
|
<span>
|
||||||
|
{{ errorInfo }}
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
|
<!--分页组件-->
|
||||||
|
<el-pagination
|
||||||
|
:total="total"
|
||||||
|
style="margin-top: 8px;"
|
||||||
|
layout="total, prev, pager, next, sizes"
|
||||||
|
@size-change="sizeChange"
|
||||||
|
@current-change="pageChange"/>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import initData from '@/mixins/initData'
|
||||||
|
import { parseTime } from '@/utils/index'
|
||||||
|
import eHeader from './module/header'
|
||||||
|
export default {
|
||||||
|
components: { eHeader },
|
||||||
|
mixins: [initData],
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
errorInfo: '', dialog: false
|
||||||
|
}
|
||||||
|
},
|
||||||
|
created() {
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.init()
|
||||||
|
})
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
parseTime,
|
||||||
|
beforeInit() {
|
||||||
|
this.url = 'api/logs/error'
|
||||||
|
const sort = 'id,desc'
|
||||||
|
const query = this.query
|
||||||
|
const username = query.username
|
||||||
|
const logType = query.logType
|
||||||
|
this.params = { page: this.page, size: this.size, sort: sort }
|
||||||
|
if (username && username) { this.params['username'] = username }
|
||||||
|
if (logType !== '' && logType !== null) { this.params['logType'] = logType }
|
||||||
|
return true
|
||||||
|
},
|
||||||
|
info(errorInfo) {
|
||||||
|
this.errorInfo = errorInfo
|
||||||
|
this.dialog = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<style scoped>
|
||||||
|
|
||||||
|
</style>
|
||||||
@@ -8,7 +8,6 @@
|
|||||||
<el-table-column prop="description" label="描述"/>
|
<el-table-column prop="description" label="描述"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="method" label="方法名称"/>
|
<el-table-column :show-overflow-tooltip="true" prop="method" label="方法名称"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="params" label="参数"/>
|
<el-table-column :show-overflow-tooltip="true" prop="params" label="参数"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="exceptionDetail" label="异常堆栈信息"/>
|
|
||||||
<el-table-column prop="time" label="请求耗时" align="center">
|
<el-table-column prop="time" label="请求耗时" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
|
<el-tag v-if="scope.row.time <= 300">{{ scope.row.time }}ms</el-tag>
|
||||||
@@ -16,12 +15,6 @@
|
|||||||
<el-tag v-else type="danger">{{ scope.row.time }}ms</el-tag>
|
<el-tag v-else type="danger">{{ scope.row.time }}ms</el-tag>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column prop="logType" label="日志类型" width="100px" align="center">
|
|
||||||
<template slot-scope="scope">
|
|
||||||
<span v-if="scope.row.logType === 'ERROR'" class="badge badge-bg-orange">{{ scope.row.logType }}</span>
|
|
||||||
<span v-else class="badge">{{ scope.row.logType }}</span>
|
|
||||||
</template>
|
|
||||||
</el-table-column>
|
|
||||||
<el-table-column prop="createTime" label="创建日期" width="180px">
|
<el-table-column prop="createTime" label="创建日期" width="180px">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span>{{ parseTime(scope.row.createTime) }}</span>
|
<span>{{ parseTime(scope.row.createTime) }}</span>
|
||||||
@@ -39,7 +32,7 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
import eHeader from './module/header'
|
import eHeader from './module/header'
|
||||||
export default {
|
export default {
|
||||||
@@ -57,10 +50,8 @@ export default {
|
|||||||
const sort = 'id,desc'
|
const sort = 'id,desc'
|
||||||
const query = this.query
|
const query = this.query
|
||||||
const username = query.username
|
const username = query.username
|
||||||
const logType = query.logType
|
|
||||||
this.params = { page: this.page, size: this.size, sort: sort }
|
this.params = { page: this.page, size: this.size, sort: sort }
|
||||||
if (username && username) { this.params['username'] = username }
|
if (username && username) { this.params['username'] = username }
|
||||||
if (logType !== '' && logType !== null) { this.params['logType'] = logType }
|
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,6 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="head-container">
|
<div class="head-container">
|
||||||
<el-input v-model="query.username" clearable placeholder="用户名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
<el-input v-model="query.username" clearable placeholder="用户名" style="width: 200px;" class="filter-item" @keyup.enter.native="toQuery"/>
|
||||||
<el-select v-model="query.logType" placeholder="日志类型" clearable class="filter-item" style="width: 110px" @change="toQuery">
|
|
||||||
<el-option v-for="item in enabledTypeOptions" :key="item.key" :label="item.display_name" :value="item.key"/>
|
|
||||||
</el-select>
|
|
||||||
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
<el-button class="filter-item" size="mini" type="primary" icon="el-icon-search" @click="toQuery">搜索</el-button>
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
@@ -18,11 +15,7 @@ export default {
|
|||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
downloadLoading: false,
|
downloadLoading: false
|
||||||
enabledTypeOptions: [
|
|
||||||
{ key: 'INFO', display_name: 'INFO' },
|
|
||||||
{ key: 'ERROR', display_name: 'ERROR' }
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|||||||
@@ -8,22 +8,34 @@
|
|||||||
<div>{{ scope.$index + 1 }}</div>
|
<div>{{ scope.$index + 1 }}</div>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="key" label="KEY"/>
|
<el-table-column prop="key" label="KEY">
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="value" label="VALUE"/>
|
<template slot-scope="scope">
|
||||||
|
<div style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
|
||||||
|
{{ scope.row.key }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column prop="value" label="VALUE">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<div style="word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;">
|
||||||
|
{{ scope.row.value }}
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150px" align="center">
|
<el-table-column label="操作" width="150px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<edit v-if="checkPermission(['ADMIN','REDIS_ALL','REDIS_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
|
<edit v-if="checkPermission(['ADMIN','REDIS_ALL','REDIS_EDIT'])" :data="scope.row" :sup_this="sup_this"/>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','REDIS_ALL','REDIS_DELETE'])"
|
v-if="checkPermission(['ADMIN','REDIS_ALL','REDIS_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.$index"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="180">
|
width="180">
|
||||||
<p>确定删除本条数据吗?</p>
|
<p>确定删除本条数据吗?</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.$index].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -40,10 +52,9 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del } from '@/api/redis'
|
import { del } from '@/api/redis'
|
||||||
import { getPermissionTree } from '@/api/permission'
|
import { getPermissionTree } from '@/api/permission'
|
||||||
import { parseTime } from '@/utils/index'
|
|
||||||
import eHeader from './module/header'
|
import eHeader from './module/header'
|
||||||
import edit from './module/edit'
|
import edit from './module/edit'
|
||||||
export default {
|
export default {
|
||||||
@@ -78,7 +89,7 @@ export default {
|
|||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.key).then(res => {
|
del(row.key).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[index].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -87,13 +98,10 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[index].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
time(time) {
|
|
||||||
return parseTime(time)
|
|
||||||
},
|
|
||||||
getPermissions() {
|
getPermissions() {
|
||||||
getPermissionTree().then(res => {
|
getPermissionTree().then(res => {
|
||||||
this.permissions = res
|
this.permissions = res
|
||||||
|
|||||||
@@ -31,15 +31,15 @@
|
|||||||
<edit v-if="checkPermission(['ADMIN','MENU_ALL','MENU_EDIT'])" :roles="roles" :menus="menus" :data="scope.row" :sup_this="sup_this"/>
|
<edit v-if="checkPermission(['ADMIN','MENU_ALL','MENU_EDIT'])" :roles="roles" :menus="menus" :data="scope.row" :sup_this="sup_this"/>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','MENU_ALL','MENU_DELETE'])"
|
v-if="checkPermission(['ADMIN','MENU_ALL','MENU_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="200">
|
width="200">
|
||||||
<p>确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!</p>
|
<p>确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -51,7 +51,7 @@
|
|||||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||||
import { getRoleTree } from '@/api/role'
|
import { getRoleTree } from '@/api/role'
|
||||||
import treeTable from '@/components/TreeTable'
|
import treeTable from '@/components/TreeTable'
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del, getMenusTree } from '@/api/menu'
|
import { del, getMenusTree } from '@/api/menu'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
import eHeader from './module/header'
|
import eHeader from './module/header'
|
||||||
@@ -89,11 +89,11 @@ export default {
|
|||||||
if (value) { this.params['name'] = value }
|
if (value) { this.params['name'] = value }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -102,7 +102,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -117,10 +117,8 @@ export default {
|
|||||||
duration: 2500
|
duration: 2500
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
setTimeout(() => {
|
|
||||||
this.$parent.$parent.init()
|
this.$parent.$parent.init()
|
||||||
this.$parent.$parent.getMenus()
|
this.$parent.$parent.getMenus()
|
||||||
}, 200)
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
@@ -135,10 +133,8 @@ export default {
|
|||||||
duration: 2500
|
duration: 2500
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
setTimeout(() => {
|
|
||||||
this.sup_this.init()
|
this.sup_this.init()
|
||||||
this.sup_this.getMenus()
|
this.sup_this.getMenus()
|
||||||
}, 200)
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
|
|||||||
@@ -13,15 +13,15 @@
|
|||||||
<edit v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_EDIT'])" :permissions="permissions" :data="scope.row" :sup_this="sup_this"/>
|
<edit v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_EDIT'])" :permissions="permissions" :data="scope.row" :sup_this="sup_this"/>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_DELETE'])"
|
v-if="checkPermission(['ADMIN','PERMISSION_ALL','PERMISSION_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="200">
|
width="200">
|
||||||
<p>确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!</p>
|
<p>确定删除吗,如果存在下级节点则一并删除,此操作不能撤销!</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -32,7 +32,7 @@
|
|||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||||
import treeTable from '@/components/TreeTable'
|
import treeTable from '@/components/TreeTable'
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del } from '@/api/permission'
|
import { del } from '@/api/permission'
|
||||||
import { getPermissionTree } from '@/api/permission'
|
import { getPermissionTree } from '@/api/permission'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
@@ -74,11 +74,11 @@ export default {
|
|||||||
if (value) { this.params['name'] = value }
|
if (value) { this.params['name'] = value }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -87,7 +87,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -77,10 +77,8 @@ export default {
|
|||||||
duration: 2500
|
duration: 2500
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
setTimeout(() => {
|
|
||||||
this.$parent.$parent.init()
|
this.$parent.$parent.init()
|
||||||
this.$parent.$parent.getPermissions()
|
this.$parent.$parent.getPermissions()
|
||||||
}, 200)
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
@@ -95,10 +93,8 @@ export default {
|
|||||||
duration: 2500
|
duration: 2500
|
||||||
})
|
})
|
||||||
this.loading = false
|
this.loading = false
|
||||||
setTimeout(() => {
|
|
||||||
this.sup_this.init()
|
this.sup_this.init()
|
||||||
this.sup_this.getPermissions()
|
this.sup_this.getPermissions()
|
||||||
}, 200)
|
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.loading = false
|
this.loading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
|
|||||||
@@ -12,18 +12,18 @@
|
|||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" width="150px" align="center">
|
<el-table-column label="操作" width="150px" align="center">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<edit v-if="checkPermission(['ADMIN','ROLE_ALL','ROLE_EDIT'])" :permissions="permissions" :data="scope.row" :sup_this="sup_this"/>
|
<edit v-if="checkPermission(['ADMIN','ROLES_ALL','ROLES_EDIT'])" :permissions="permissions" :data="scope.row" :sup_this="sup_this"/>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','ROLE_ALL','ROLE_DELETE'])"
|
v-if="checkPermission(['ADMIN','ROLES_ALL','ROLES_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="180">
|
width="180">
|
||||||
<p>确定删除本条数据吗?</p>
|
<p>确定删除本条数据吗?</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -40,7 +40,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission'
|
import checkPermission from '@/utils/permission'
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del } from '@/api/role'
|
import { del } from '@/api/role'
|
||||||
import { getPermissionTree } from '@/api/permission'
|
import { getPermissionTree } from '@/api/permission'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
@@ -72,11 +72,11 @@ export default {
|
|||||||
if (value) { this.params['name'] = value }
|
if (value) { this.params['name'] = value }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -85,7 +85,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
<!-- 新增 -->
|
<!-- 新增 -->
|
||||||
<div style="display: inline-block;margin: 0px 2px;">
|
<div style="display: inline-block;margin: 0px 2px;">
|
||||||
<el-button
|
<el-button
|
||||||
v-if="checkPermission(['ADMIN','ROLE_ALL','ROLE_CREATE'])"
|
v-if="checkPermission(['ADMIN','ROLES_ALL','ROLES_CREATE'])"
|
||||||
class="filter-item"
|
class="filter-item"
|
||||||
size="mini"
|
size="mini"
|
||||||
type="primary"
|
type="primary"
|
||||||
|
|||||||
@@ -28,15 +28,15 @@
|
|||||||
</el-button>
|
</el-button>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','JOB_ALL','JOB_DELETE'])"
|
v-if="checkPermission(['ADMIN','JOB_ALL','JOB_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="200">
|
width="200">
|
||||||
<p>确定停止并删除该任务吗?</p>
|
<p>确定停止并删除该任务吗?</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" type="text" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" type="text" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -53,7 +53,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission'
|
import checkPermission from '@/utils/permission'
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del, updateIsPause, execution } from '@/api/timing'
|
import { del, updateIsPause, execution } from '@/api/timing'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
import eHeader from './module/header'
|
import eHeader from './module/header'
|
||||||
@@ -106,11 +106,11 @@ export default {
|
|||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -119,7 +119,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -15,7 +15,11 @@
|
|||||||
<el-table-column :show-overflow-tooltip="true" prop="methodName" width="80px" label="执行方法"/>
|
<el-table-column :show-overflow-tooltip="true" prop="methodName" width="80px" label="执行方法"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="params" width="80px" label="参数"/>
|
<el-table-column :show-overflow-tooltip="true" prop="params" width="80px" label="参数"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="cronExpression" width="100px" label="cron表达式"/>
|
<el-table-column :show-overflow-tooltip="true" prop="cronExpression" width="100px" label="cron表达式"/>
|
||||||
<el-table-column :show-overflow-tooltip="true" prop="exceptionDetail" width="90px" label="异常详情"/>
|
<el-table-column prop="createTime" label="异常详情" width="90px">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<el-button v-show="scope.row.exceptionDetail" size="mini" type="text" @click="info(scope.row.exceptionDetail)">查看详情</el-button>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column :show-overflow-tooltip="true" align="center" prop="time" width="100px" label="耗时(毫秒)"/>
|
<el-table-column :show-overflow-tooltip="true" align="center" prop="time" width="100px" label="耗时(毫秒)"/>
|
||||||
<el-table-column align="center" prop="isSuccess" width="80px" label="状态">
|
<el-table-column align="center" prop="isSuccess" width="80px" label="状态">
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
@@ -29,6 +33,11 @@
|
|||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-dialog :visible.sync="errorDialog" append-to-body style="margin-left: 100px" title="异常详情" width="85%">
|
||||||
|
<span>
|
||||||
|
{{ errorInfo }}
|
||||||
|
</span>
|
||||||
|
</el-dialog>
|
||||||
<!--分页组件-->
|
<!--分页组件-->
|
||||||
<el-pagination
|
<el-pagination
|
||||||
:total="total"
|
:total="total"
|
||||||
@@ -42,12 +51,13 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission'
|
import checkPermission from '@/utils/permission'
|
||||||
import initData from '../../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
export default {
|
export default {
|
||||||
mixins: [initData],
|
mixins: [initData],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
errorInfo: '', errorDialog: false,
|
||||||
dialog: false, delLoading: false, sup_this: this,
|
dialog: false, delLoading: false, sup_this: this,
|
||||||
enabledTypeOptions: [
|
enabledTypeOptions: [
|
||||||
{ key: 'true', display_name: '成功' },
|
{ key: 'true', display_name: '成功' },
|
||||||
@@ -78,6 +88,10 @@ export default {
|
|||||||
if (value) { this.params['jobName'] = value }
|
if (value) { this.params['jobName'] = value }
|
||||||
if (isSuccess !== '' && isSuccess !== null) { this.params['isSuccess'] = isSuccess }
|
if (isSuccess !== '' && isSuccess !== null) { this.params['isSuccess'] = isSuccess }
|
||||||
return true
|
return true
|
||||||
|
},
|
||||||
|
info(errorInfo) {
|
||||||
|
this.errorInfo = errorInfo
|
||||||
|
this.errorDialog = true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -104,6 +104,7 @@ export default {
|
|||||||
}
|
}
|
||||||
}, 1000)
|
}, 1000)
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
|
this.resetForm()
|
||||||
this.codeLoading = false
|
this.codeLoading = false
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -25,15 +25,15 @@
|
|||||||
<edit v-if="checkPermission(['ADMIN','USER_ALL','USER_EDIT'])" :data="scope.row" :roles="roles" :sup_this="sup_this"/>
|
<edit v-if="checkPermission(['ADMIN','USER_ALL','USER_EDIT'])" :data="scope.row" :roles="roles" :sup_this="sup_this"/>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','USER_ALL','USER_DELETE'])"
|
v-if="checkPermission(['ADMIN','USER_ALL','USER_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="180">
|
width="180">
|
||||||
<p>确定删除本条数据吗?</p>
|
<p>确定删除本条数据吗?</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" :disabled="scope.row.id === 1" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission'
|
import checkPermission from '@/utils/permission'
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del } from '@/api/user'
|
import { del } from '@/api/user'
|
||||||
import { getRoleTree } from '@/api/role'
|
import { getRoleTree } from '@/api/role'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
@@ -85,11 +85,11 @@ export default {
|
|||||||
if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled }
|
if (enabled !== '' && enabled !== null) { this.params['enabled'] = enabled }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -98,7 +98,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -22,15 +22,15 @@
|
|||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','PICTURE_ALL','PICTURE_DELETE'])"
|
v-if="checkPermission(['ADMIN','PICTURE_ALL','PICTURE_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="180">
|
width="180">
|
||||||
<p>确定删除本条数据吗?</p>
|
<p>确定删除本条数据吗?</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -47,7 +47,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||||
import initData from '../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del } from '@/api/picture'
|
import { del } from '@/api/picture'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
import eHeader from './module/header'
|
import eHeader from './module/header'
|
||||||
@@ -76,11 +76,11 @@ export default {
|
|||||||
if (value) { this.params['filename'] = value }
|
if (value) { this.params['filename'] = value }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -89,7 +89,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -25,15 +25,15 @@
|
|||||||
@click="download(scope.row.id)">下载</el-button>
|
@click="download(scope.row.id)">下载</el-button>
|
||||||
<el-popover
|
<el-popover
|
||||||
v-if="checkPermission(['ADMIN','PICTURE_ALL','PICTURE_DELETE'])"
|
v-if="checkPermission(['ADMIN','PICTURE_ALL','PICTURE_DELETE'])"
|
||||||
v-model="scope.row.delPopover"
|
:ref="scope.row.id"
|
||||||
placement="top"
|
placement="top"
|
||||||
width="180">
|
width="180">
|
||||||
<p>确定删除本条数据吗?</p>
|
<p>确定删除本条数据吗?</p>
|
||||||
<div style="text-align: right; margin: 0">
|
<div style="text-align: right; margin: 0">
|
||||||
<el-button size="mini" type="text" @click="scope.row.delPopover = false">取消</el-button>
|
<el-button size="mini" type="text" @click="$refs[scope.row.id].doClose()">取消</el-button>
|
||||||
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.$index, scope.row)">确定</el-button>
|
<el-button :loading="delLoading" type="primary" size="mini" @click="subDelete(scope.row.id)">确定</el-button>
|
||||||
</div>
|
</div>
|
||||||
<el-button slot="reference" type="danger" size="mini" @click="scope.row.delPopover = true">删除</el-button>
|
<el-button slot="reference" type="danger" size="mini">删除</el-button>
|
||||||
</el-popover>
|
</el-popover>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
import checkPermission from '@/utils/permission' // 权限判断函数
|
import checkPermission from '@/utils/permission' // 权限判断函数
|
||||||
import initData from '../../../../mixins/initData'
|
import initData from '@/mixins/initData'
|
||||||
import { del, download } from '@/api/qiniu'
|
import { del, download } from '@/api/qiniu'
|
||||||
import { parseTime } from '@/utils/index'
|
import { parseTime } from '@/utils/index'
|
||||||
import eHeader from './module/header'
|
import eHeader from './module/header'
|
||||||
@@ -93,11 +93,11 @@ export default {
|
|||||||
if (value) { this.params['key'] = value }
|
if (value) { this.params['key'] = value }
|
||||||
return true
|
return true
|
||||||
},
|
},
|
||||||
subDelete(index, row) {
|
subDelete(id) {
|
||||||
this.delLoading = true
|
this.delLoading = true
|
||||||
del(row.id).then(res => {
|
del(id).then(res => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
this.init()
|
this.init()
|
||||||
this.$notify({
|
this.$notify({
|
||||||
title: '删除成功',
|
title: '删除成功',
|
||||||
@@ -106,7 +106,7 @@ export default {
|
|||||||
})
|
})
|
||||||
}).catch(err => {
|
}).catch(err => {
|
||||||
this.delLoading = false
|
this.delLoading = false
|
||||||
row.delPopover = false
|
this.$refs[id].doClose()
|
||||||
console.log(err.response.data.message)
|
console.log(err.response.data.message)
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
|||||||