!71 前端代码优化

Merge pull request !71 from develop
This commit is contained in:
赵世界 2022-08-25 05:41:51 +00:00 committed by Gitee
commit 1dff0336c1
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
76 changed files with 2414 additions and 3446 deletions

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a[data-v-ef1e5d30]{text-decoration:none;color:#fff}.conent[data-v-ef1e5d30]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-ef1e5d30]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-ef1e5d30]{width:114px;height:44px;border-radius:3px}.table[data-v-ef1e5d30]{margin-top:20px}.block[data-v-ef1e5d30]{margin-top:30px}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}a[data-v-3a92b3e9]{text-decoration:none;color:#fff}.conent[data-v-3a92b3e9]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-3a92b3e9]{height:104px;border-radius:5px;display:flex;align-items:center}.el-button[data-v-3a92b3e9]{width:114px;height:44px;border-radius:3px}.table[data-v-3a92b3e9]{margin-top:20px}.block[data-v-3a92b3e9]{margin-top:30px}

View File

@ -0,0 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.table[data-v-825e6030]{background-color:#fff}.table ul[data-v-825e6030]{display:flex}.table ul li[data-v-825e6030]{padding:20px 10px}.table ul li .Navigation[data-v-825e6030]{display:flex}.table ul li .Navigation span[data-v-825e6030]{padding:5px 30px;border:1px solid #dcdfe6;font-size:14px;font-weight:500;color:#303133;border-radius:4px;cursor:pointer;margin-right:10px}.table ul li .Navigation .tab[data-v-825e6030]{margin-right:10px;flex-shrink:0}.table ul li .Navigation .red[data-v-825e6030]{color:#5470c6;border:1px solid #5470c6}.table ul li .Navigation .closure[data-v-825e6030]{display:inline-block;text-align:center;cursor:pointer;width:15px;height:15px;line-height:15px;background-color:#ddd;color:#000;border-radius:50%;font-size:12px}.table ul li .Navigation .red_1[data-v-825e6030]{background-color:#5470c6;color:#fff}.table ul li[data-v-825e6030]:nth-child(2){overflow-x:auto}.width[data-v-825e6030]{transition:all .3s;opacity:0;width:0!important}.width1[data-v-825e6030]{transition:all .3s;opacity:1;width:200px!important}.el-container[data-v-825e6030]{height:100vh}.el-header[data-v-825e6030]{background-color:#b3c0d1;color:#333;text-align:center}.el-aside[data-v-825e6030]{background-color:#d3dce6;color:#333;text-align:center;overflow-x:hidden}.el-aside[data-v-825e6030]::-webkit-scrollbar{width:8px}.el-aside[data-v-825e6030]::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.3);border-radius:20px}.el-main[data-v-825e6030]{background-color:#f0f2f5;color:#333;padding:0 0!important}.el-main[data-v-825e6030]::-webkit-scrollbar{width:10px}.el-main[data-v-825e6030]::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.3)}.box-card[data-v-825e6030]{background-color:#fff;min-height:calc(100vh - 200px);margin:10px;padding:20px}.add[data-v-825e6030]{cursor:pointer;font-size:25px;color:#606266}.head[data-v-825e6030]{padding:10px;background-color:#fff;border-bottom:1px solid #f6f6f6;box-shadow:0 1px 4px rgba(0,21,41,.08)}.head ul[data-v-825e6030]{display:flex;justify-content:space-between}.head ul li[data-v-825e6030]{display:flex;align-items:center}.head ul li .right[data-v-825e6030]{margin-left:20px}.head ul li .token[data-v-825e6030]{cursor:pointer}.el-aside[data-v-825e6030]{background:#282c34;box-shadow:2px 0 6px rgba(0,21,41,.35)}[data-v-825e6030] .el-menu{border:none}.el-menu-item[data-v-825e6030]:hover{outline:0!important;background:#5470c6!important;border-radius:5px!important}.el-menu-item.is-active[data-v-825e6030]{color:#fff!important;background:#5470c6!important;border-radius:5px!important}.el-menu-item-group__title[data-v-825e6030]{padding:0 0!important}

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-07117b7c]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-07117b7c]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-07117b7c]{width:114px;height:44px;border-radius:3px}.table[data-v-07117b7c]{margin-top:20px}.from-btn[data-v-07117b7c]{display:flex;justify-content:space-around;align-content:center}.block[data-v-07117b7c]{margin-top:30px}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-1fb2e4aa]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-1fb2e4aa]{height:104px;border-radius:5px;display:flex;align-items:center}.el-button[data-v-1fb2e4aa]{width:114px;height:44px;border-radius:3px}.table[data-v-1fb2e4aa]{margin-top:20px}.from-btn[data-v-1fb2e4aa]{display:flex;justify-content:space-around;align-content:center}.block[data-v-1fb2e4aa]{margin-top:30px}

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.el-upload--picture-card[data-v-6a2b83b4]{width:50px;height:50px}.el-form-item[data-v-6a2b83b4]{margin-left:60px}.addto[data-v-6a2b83b4]{display:inline-block;width:30px;height:30px;background-color:#00f;color:#fff;font-size:25px;text-align:center;line-height:30px;border-radius:5px;margin-top:4px}.avatar-uploader .el-upload[data-v-6a2b83b4]{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-6a2b83b4]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-6a2b83b4]{font-size:28px;color:#8c939d;width:148px;height:148px;line-height:148px;text-align:center}.avatar[data-v-6a2b83b4]{width:148px;height:148px;display:block}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.el-upload--picture-card[data-v-7edd9513]{width:50px;height:50px}.el-form-item[data-v-7edd9513]{margin-left:60px}.addto[data-v-7edd9513]{display:inline-block;width:30px;height:30px;background-color:#00f;color:#fff;font-size:25px;text-align:center;line-height:30px;border-radius:5px;margin-top:4px}.avatar-uploader .el-upload[data-v-7edd9513]{border:1px dashed #d9d9d9;border-radius:6px;cursor:pointer;position:relative;overflow:hidden}.avatar-uploader .el-upload[data-v-7edd9513]:hover{border-color:#409eff}.avatar-uploader-icon[data-v-7edd9513]{font-size:28px;color:#8c939d;width:148px;height:148px;line-height:148px;text-align:center}.avatar[data-v-7edd9513]{width:148px;height:148px;display:block}

View File

@ -0,0 +1 @@
.backimg[data-v-57f8ef7a]{width:100%;height:1080px;background-image:url(../img/组\ 32.1fba730a.png);background-repeat:no-repeat;background-size:100%;position:relative}.sign[data-v-57f8ef7a]{width:400px;height:500px;position:absolute;top:270px;right:300px}.sign input[data-v-57f8ef7a]{width:400px;height:51px;border:2px solid #bcbcbc;opacity:1;border-radius:5px;margin-bottom:25px}.sign .title[data-v-57f8ef7a]{width:125px;height:23px;font-size:22px;font-family:BigruixianBlackGBV1\.0;font-weight:400;line-height:23px;color:#2b53ec;opacity:1}.sign .manage[data-v-57f8ef7a]{margin-top:19px;margin-bottom:50px}.sign .manage img[data-v-57f8ef7a]{margin-right:20px}.sign .manage span[data-v-57f8ef7a]{width:340px;height:57px;font-size:54px;font-family:BigruixianBlackGBV1\.0;font-weight:400;line-height:57px;color:#2b53ec;opacity:1}.sign .title-1[data-v-57f8ef7a]{width:70px;height:35px;font-size:35px;font-family:Source Han Sans CN;font-weight:500;line-height:60px;color:#393939;opacity:1;margin-bottom:35px}.sign .el-button[data-v-57f8ef7a]{width:400px;height:58px;background:#2b53ec;border-radius:5px;margin-top:40px}.sign .el-checkbox[data-v-57f8ef7a]{color:#2b53ec}

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-4b3dc420]{width:100%;min-height:calc(100vh - 200px)}.btn[data-v-4b3dc420]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-4b3dc420]{width:114px;height:44px;border-radius:3px}.table[data-v-4b3dc420]{margin-top:20px}.from-btn[data-v-4b3dc420]{display:flex;justify-content:space-around;align-content:center}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-587f13f4]{width:100%;min-height:calc(100vh - 200px)}.btn[data-v-587f13f4]{height:104px;border-radius:5px;display:flex;align-items:center}.el-button[data-v-587f13f4]{width:114px;height:44px;border-radius:3px}.table[data-v-587f13f4]{margin-top:20px}.from-btn[data-v-587f13f4]{display:flex;justify-content:space-around;align-content:center}

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-312969d0]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-312969d0]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-312969d0]{width:114px;height:44px;border-radius:3px}.table[data-v-312969d0]{margin-top:20px}.block[data-v-312969d0]{margin-top:30px}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-0ee356ce]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-0ee356ce]{height:104px;border-radius:5px;display:flex;align-items:center}.el-button[data-v-0ee356ce]{width:114px;height:44px;border-radius:3px}.table[data-v-0ee356ce]{margin-top:20px}.block[data-v-0ee356ce]{margin-top:30px}

View File

@ -1 +0,0 @@
.backimg[data-v-4d3b70b5]{width:100%;height:1080px;background-image:url(../img/组\ 32.1fba730a.png);background-repeat:no-repeat;background-size:100%;position:relative}.sign[data-v-4d3b70b5]{width:400px;height:500px;position:absolute;top:270px;right:300px}.sign input[data-v-4d3b70b5]{width:400px;height:51px;border:2px solid #bcbcbc;opacity:1;border-radius:5px;margin-bottom:25px}.sign .title[data-v-4d3b70b5]{width:125px;height:23px;font-size:22px;font-family:BigruixianBlackGBV1\.0;font-weight:400;line-height:23px;color:#2b53ec;opacity:1}.sign .manage[data-v-4d3b70b5]{margin-top:19px;margin-bottom:50px}.sign .manage img[data-v-4d3b70b5]{margin-right:20px}.sign .manage span[data-v-4d3b70b5]{width:340px;height:57px;font-size:54px;font-family:BigruixianBlackGBV1\.0;font-weight:400;line-height:57px;color:#2b53ec;opacity:1}.sign .title-1[data-v-4d3b70b5]{width:70px;height:35px;font-size:35px;font-family:Source Han Sans CN;font-weight:500;line-height:60px;color:#393939;opacity:1;margin-bottom:35px}.sign .el-button[data-v-4d3b70b5]{width:400px;height:58px;background:#2b53ec;border-radius:5px;margin-top:40px}.sign .el-checkbox[data-v-4d3b70b5]{color:#2b53ec}

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-2bed7ffe]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-2bed7ffe]{height:104px;border-radius:5px;display:flex;align-items:center}.btn .el-button[data-v-2bed7ffe]{width:114px;height:44px;border-radius:3px}.table[data-v-2bed7ffe]{margin-top:20px}.block[data-v-2bed7ffe]{margin-top:30px}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.conent[data-v-1fb37ace]{width:100%;min-height:calc(100vh - 200px);position:relative}.btn[data-v-1fb37ace]{height:104px;border-radius:5px;display:flex;align-items:center}.el-button[data-v-1fb37ace]{width:114px;height:44px;border-radius:3px}.table[data-v-1fb37ace]{margin-top:20px}.block[data-v-1fb37ace]{margin-top:30px}

View File

@ -1 +1 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.loss[data-v-fcf5499a]{position:relative}.table[data-v-fcf5499a]{margin-top:40px;position:relative}.btn[data-v-fcf5499a]{float:right}[data-v-fcf5499a] .cell{display:flex;align-items:center}.commodityimg[data-v-fcf5499a]{width:59px;height:59px;background:hsla(0,0%,89%,.39);opacity:1;display:block;margin-right:12px}.Img[data-v-fcf5499a]{width:100%;height:100%}.confirmbtn[data-v-fcf5499a]{width:114px;height:44px;border-radius:3px;margin-top:21px;margin-bottom:8px}.import-right[data-v-fcf5499a]{margin-top:30px}.import-right a[data-v-fcf5499a]{text-decoration:none;color:#000}[data-v-fcf5499a] .btn11{padding:0;width:14px;height:14px}[data-v-fcf5499a] .btn11 img{width:100%;height:100%}.page[data-v-fcf5499a]{margin-top:20px}
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.loss[data-v-091c644d]{position:relative}.table[data-v-091c644d]{margin-top:40px;position:relative}.btn[data-v-091c644d]{float:right}[data-v-091c644d] .cell{display:flex;align-items:center}.commodityimg[data-v-091c644d]{width:59px;height:59px;background:hsla(0,0%,89%,.39);opacity:1;display:block;margin-right:12px}.Img[data-v-091c644d]{width:100%;height:100%}.confirmbtn[data-v-091c644d]{width:114px;height:44px;border-radius:3px;margin-top:21px;margin-bottom:8px}.import-right[data-v-091c644d]{margin-top:30px}.import-right a[data-v-091c644d]{text-decoration:none;color:#000}[data-v-091c644d] .btn11{padding:0;width:14px;height:14px}[data-v-091c644d] .btn11 img{width:100%;height:100%}.page[data-v-091c644d]{margin-top:20px}

View File

@ -1 +0,0 @@
#nprogress{pointer-events:none}#nprogress .bar{background:#29d;position:fixed;z-index:1031;top:0;left:0;width:100%;height:2px}#nprogress .peg{display:block;position:absolute;right:0;width:100px;height:100%;box-shadow:0 0 10px #29d,0 0 5px #29d;opacity:1;transform:rotate(3deg) translateY(-4px)}#nprogress .spinner{display:block;position:fixed;z-index:1031;top:15px;right:15px}#nprogress .spinner-icon{width:18px;height:18px;box-sizing:border-box;border:2px solid transparent;border-top-color:#29d;border-left-color:#29d;border-radius:50%;-webkit-animation:nprogress-spinner .4s linear infinite;animation:nprogress-spinner .4s linear infinite}.nprogress-custom-parent{overflow:hidden;position:relative}.nprogress-custom-parent #nprogress .bar,.nprogress-custom-parent #nprogress .spinner{position:absolute}@-webkit-keyframes nprogress-spinner{0%{-webkit-transform:rotate(0deg)}to{-webkit-transform:rotate(1turn)}}@keyframes nprogress-spinner{0%{transform:rotate(0deg)}to{transform:rotate(1turn)}}.table[data-v-90c69c32]{background-color:#fff}.table ul[data-v-90c69c32]{display:flex}.table ul li[data-v-90c69c32]{padding:20px 10px}.table ul li .Navigation[data-v-90c69c32]{display:flex}.table ul li .Navigation span[data-v-90c69c32]{padding:5px 30px;border:1px solid #dcdfe6;font-size:14px;font-weight:500;color:#303133;border-radius:4px;cursor:pointer;margin-right:10px}.table ul li .Navigation .tab[data-v-90c69c32]{margin-right:10px;flex-shrink:0}.table ul li .Navigation .red[data-v-90c69c32]{color:#5470c6;border:1px solid #5470c6}.table ul li .Navigation .closure[data-v-90c69c32]{display:inline-block;text-align:center;cursor:pointer;width:15px;height:15px;line-height:15px;background-color:#ddd;color:#000;border-radius:50%;font-size:12px}.table ul li .Navigation .red_1[data-v-90c69c32]{background-color:#5470c6;color:#fff}.table ul li[data-v-90c69c32]:nth-child(2){overflow-x:auto}.width[data-v-90c69c32]{transition:all .3s;opacity:0;width:0!important}.width1[data-v-90c69c32]{transition:all .3s;opacity:1;width:200px!important}.el-container[data-v-90c69c32]{height:100vh}.el-header[data-v-90c69c32]{background-color:#b3c0d1;color:#333;text-align:center}.el-aside[data-v-90c69c32]{background-color:#d3dce6;color:#333;text-align:center;overflow-x:hidden}.el-aside[data-v-90c69c32]::-webkit-scrollbar{width:8px}.el-aside[data-v-90c69c32]::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.3);border-radius:20px}.el-main[data-v-90c69c32]{background-color:#f0f2f5;color:#333;padding:0 0!important}.el-main[data-v-90c69c32]::-webkit-scrollbar{width:10px}.el-main[data-v-90c69c32]::-webkit-scrollbar-thumb{background-color:rgba(144,147,153,.3)}.box-card[data-v-90c69c32]{background-color:#fff;min-height:calc(100vh - 200px);margin:10px;padding:20px}.add[data-v-90c69c32]{cursor:pointer;font-size:25px;color:#606266}.head[data-v-90c69c32]{padding:10px;background-color:#fff;border-bottom:1px solid #f6f6f6;box-shadow:0 1px 4px rgba(0,21,41,.08)}.head ul[data-v-90c69c32]{display:flex;justify-content:space-between}.head ul li[data-v-90c69c32]{display:flex;align-items:center}.head ul li .right[data-v-90c69c32]{margin-left:20px}.head ul li .token[data-v-90c69c32]{cursor:pointer}.el-aside[data-v-90c69c32]{background:#282c34;box-shadow:2px 0 6px rgba(0,21,41,.35)}[data-v-90c69c32] .el-menu{border:none}.el-menu-item[data-v-90c69c32]:hover{outline:0!important;background:#5470c6!important;border-radius:5px!important}.el-menu-item.is-active[data-v-90c69c32]{color:#fff!important;background:#5470c6!important;border-radius:5px!important}.el-menu-item-group__title[data-v-90c69c32]{padding:0 0!important}

View File

@ -1 +1 @@
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>erp</title><link href="css/chunk-14bea2b5.9f545d19.css" rel="prefetch"><link href="css/chunk-3ad98ce0.c0acee9a.css" rel="prefetch"><link href="css/chunk-3c532032.e437602b.css" rel="prefetch"><link href="css/chunk-3e22dfcf.0c73552c.css" rel="prefetch"><link href="css/chunk-5ed10db2.12c276ba.css" rel="prefetch"><link href="css/chunk-62101cb8.67947a26.css" rel="prefetch"><link href="css/chunk-959f9a24.ed76f224.css" rel="prefetch"><link href="css/chunk-ba60ef82.e437602b.css" rel="prefetch"><link href="css/chunk-dce0c6c0.3d009b2d.css" rel="prefetch"><link href="css/chunk-dee9adee.5a9e4325.css" rel="prefetch"><link href="css/chunk-f60080c8.ff8f97f8.css" rel="prefetch"><link href="js/chunk-14bea2b5.c3dc2945.js" rel="prefetch"><link href="js/chunk-2d23156c.6af6d42e.js" rel="prefetch"><link href="js/chunk-3ad98ce0.d4852cea.js" rel="prefetch"><link href="js/chunk-3c532032.adbdd0d5.js" rel="prefetch"><link href="js/chunk-3e22dfcf.17a21be0.js" rel="prefetch"><link href="js/chunk-5ed10db2.f7bc8652.js" rel="prefetch"><link href="js/chunk-62101cb8.df8fe332.js" rel="prefetch"><link href="js/chunk-959f9a24.63a93281.js" rel="prefetch"><link href="js/chunk-ba60ef82.bd8a71c1.js" rel="prefetch"><link href="js/chunk-dce0c6c0.51e6f004.js" rel="prefetch"><link href="js/chunk-dee9adee.c53fcd10.js" rel="prefetch"><link href="js/chunk-f60080c8.789444a8.js" rel="prefetch"><link href="css/app.62fa08a2.css" rel="preload" as="style"><link href="css/chunk-vendors.a6a7f90c.css" rel="preload" as="style"><link href="js/app.cd30544f.js" rel="preload" as="script"><link href="js/chunk-vendors.dc4080e5.js" rel="preload" as="script"><link href="css/chunk-vendors.a6a7f90c.css" rel="stylesheet"><link href="css/app.62fa08a2.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but erp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.dc4080e5.js"></script><script src="js/app.cd30544f.js"></script></body></html>
<!DOCTYPE html><html lang=""><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><meta name="viewport" content="width=device-width,initial-scale=1"><link rel="icon" href="favicon.ico"><title>erp</title><link href="css/chunk-01b147f1.cec86515.css" rel="prefetch"><link href="css/chunk-046929c6.0080a3bb.css" rel="prefetch"><link href="css/chunk-0ab08886.0080a3bb.css" rel="prefetch"><link href="css/chunk-19797d59.4a709612.css" rel="prefetch"><link href="css/chunk-1c56d4e4.a81ac70a.css" rel="prefetch"><link href="css/chunk-2a2235b7.1a0ea8f6.css" rel="prefetch"><link href="css/chunk-3bcfd210.9c27e2c9.css" rel="prefetch"><link href="css/chunk-4546fe72.3bcd502b.css" rel="prefetch"><link href="css/chunk-5e1711e0.d4b94e52.css" rel="prefetch"><link href="css/chunk-7c135f6b.b66e0a3d.css" rel="prefetch"><link href="css/chunk-af147af4.34fd631a.css" rel="prefetch"><link href="js/chunk-01b147f1.411ddf4a.js" rel="prefetch"><link href="js/chunk-046929c6.45cea179.js" rel="prefetch"><link href="js/chunk-0ab08886.47a1307b.js" rel="prefetch"><link href="js/chunk-19797d59.521ebbb8.js" rel="prefetch"><link href="js/chunk-1c56d4e4.ceee754d.js" rel="prefetch"><link href="js/chunk-2a2235b7.b4b58aba.js" rel="prefetch"><link href="js/chunk-3bcfd210.374395ff.js" rel="prefetch"><link href="js/chunk-4546fe72.955bc949.js" rel="prefetch"><link href="js/chunk-5e1711e0.4eafce54.js" rel="prefetch"><link href="js/chunk-7c135f6b.7b5f30c1.js" rel="prefetch"><link href="js/chunk-af147af4.2c39028d.js" rel="prefetch"><link href="css/app.62fa08a2.css" rel="preload" as="style"><link href="css/chunk-vendors.a6a7f90c.css" rel="preload" as="style"><link href="js/app.b18c812e.js" rel="preload" as="script"><link href="js/chunk-vendors.dc4080e5.js" rel="preload" as="script"><link href="css/chunk-vendors.a6a7f90c.css" rel="stylesheet"><link href="css/app.62fa08a2.css" rel="stylesheet"></head><body><noscript><strong>We're sorry but erp doesn't work properly without JavaScript enabled. Please enable it to continue.</strong></noscript><div id="app"></div><script src="js/chunk-vendors.dc4080e5.js"></script><script src="js/app.b18c812e.js"></script></body></html>

2
public/dist/js/app.b18c812e.js vendored Normal file

File diff suppressed because one or more lines are too long

1
public/dist/js/app.b18c812e.js.map vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,4 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-19797d59"],{"0a5a":function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return a}));const r="admin_token";function s(){return localStorage.getItem("token")}function a(){return localStorage.removeItem(r)}},"1e4b":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-container",[t("el-aside",{class:e.show?"width":"width1"},[t("el-menu",{attrs:{router:"","background-color":"#282c34","text-color":"#fff","default-active":e.$route.path,"default-openeds":e.openeds}},e._l(e.menu,(function(n){return t("div",{key:n.id},[n.children?t("el-submenu",{attrs:{index:n.code}},[t("template",{slot:"title"},[t("span",[e._v(e._s(n.name))])]),e._l(n.children,(function(n){return t("el-menu-item",{key:n.id,attrs:{index:n.code}},[e._v(e._s(n.name)+" ")])}))],2):t("el-menu-item",{attrs:{index:n.code}},[t("span",[e._v(e._s(n.name))])])],1)})),0)],1),t("el-main",[t("div",{staticClass:"head"},[t("ul",[t("li",[t("div",{staticClass:"add",on:{click:e.add}},[e.show?t("i",{staticClass:"el-icon-s-unfold"}):t("i",{staticClass:"el-icon-s-fold"})]),t("div",{staticClass:"right"},[t("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.titie,(function(n,r){return t("el-breadcrumb-item",{key:r},[e._v(e._s(n.name))])})),1)],1)]),t("li",[t("div",{staticClass:"token",on:{click:e.hanleLogout}},[e._v("退出")])])])]),t("div",{staticClass:"box-card"},[t("router-view")],1)])],1)],1)],1)},s=[],a=n("0a5a"),i=n("adb5");function o(){return Object(i["a"])({url:"/api/menus",method:"get"})}var u={mounted(){o().then(e=>{this.menu=e.data.data})},data(){return{menu:[],show:!0,levelData:[],titie:[],head:"",onindex:0,openeds:["GOODS_MANAGE"]}},watch:{$route:{handler:function(e){this.titie=e.matched,this.head=e.name,this.levelData.push({name:e.name,path:e.path});const t=[],n={};for(var r=0;r<this.levelData.length;r++)n[this.levelData[r].name]||(t.push(this.levelData[r]),n[this.levelData[r].name]=!0);this.levelData=t},deep:!0,immediate:!0}},methods:{next(){this.hanletop()},hanletop(){document.getElementById("bottom").scrollIntoView({behavior:"smooth"})},hanlebottom(){document.getElementById("top").scrollIntoView({behavior:"smooth"})},hanleLogout(){Object(a["b"])(),this.$router.push({path:"/Login"})},handlerclick(e){this.$route.path!==e&&this.$router.push({path:e})},add(){this.show=!this.show},hanblDelete(e,t){var n=this.levelData[e].name;if(this.onindex=e,this.levelData.splice(this.onindex,1),t===this.head){var r,s;for(let e=0;e<this.levelData.length;e++)r=this.levelData[e].path,s=this.levelData[e].name;this.levelData.length&&s!==n&&this.$router.push({path:r})}}}},c=u,l=(n("4a02"),n("0b56")),d=Object(l["a"])(c,r,s,!1,null,"825e6030",null);t["default"]=d.exports},"38bc":function(e,t,n){var r,s;
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(a,i){r=i,s="function"===typeof r?r.call(t,n,t,e):r,void 0===s||(e.exports=s)})(0,(function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return 100*(-1+e)}function s(e,n,s){var a;return a="translate3d"===t.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"},a.transition="all "+n+"ms "+s,a}e.configure=function(e){var n,r;for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var o=e.isStarted();r=n(r,t.minimum,1),e.status=1===r?null:r;var u=e.render(!o),c=u.querySelector(t.barSelector),l=t.speed,d=t.easing;return u.offsetWidth,a((function(n){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),i(c,s(r,l,d)),1===r?(i(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){i(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){e.remove(),n()}),l)}),l)):setTimeout(n,l)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var r=e.status;return r?("number"!==typeof t&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&e.start(),t++,n++,r.always((function(){n--,0===n?(t=0,e.done()):e.set((t-n)/t)})),this):this}}(),e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.innerHTML=t.template;var a,o=s.querySelector(t.barSelector),c=n?"-100":r(e.status||0),l=document.querySelector(t.parent);return i(o,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),t.showSpinner||(a=s.querySelector(t.spinnerSelector),a&&d(a)),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(s),s},e.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var a=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),i=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;var r,s=e.length,a=t.charAt(0).toUpperCase()+t.slice(1);while(s--)if(r=e[s]+a,r in n)return r;return t}function s(e){return e=n(e),t[e]||(t[e]=r(e))}function a(e,t,n){t=s(t),e.style[t]=n}return function(e,t){var n,r,s=arguments;if(2==s.length)for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&a(e,n,r);else a(e,s[1],s[2])}}();function o(e,t){var n="string"==typeof e?e:l(e);return n.indexOf(" "+t+" ")>=0}function u(e,t){var n=l(e),r=n+t;o(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=l(e);o(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function l(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e}))},"4a02":function(e,t,n){"use strict";n("9aac")},"70e7":function(e,t,n){},"9aac":function(e,t,n){},adb5:function(e,t,n){"use strict";var r=n("4ff3"),s=n.n(r),a=n("0a5a"),i=n("38bc"),o=n.n(i),u=(n("70e7"),n("5422")),c=s.a.create({timeout:1e4});c.interceptors.request.use(e=>(e.headers.Authorization="Bearer "+Object(a["a"])(),o.a.start(),e),e=>Promise.reject(e)),c.interceptors.response.use(e=>{o.a.done();const t=e.status;if(200===t||201===t)return e},e=>(400===e.response.status&&Object(u["Message"])({message:e.response.data.errorMessage,type:"error"}),500===e.response.status&&Object(u["Message"])({message:e.response.data.message,type:"error"}),Promise.reject(e))),t["a"]=c}}]);
//# sourceMappingURL=chunk-19797d59.521ebbb8.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-2d23156c"],{efb7:function(t,n,e){"use strict";e.r(n);var u=function(){var t=this,n=t._self._c;return n("div",[t._v("权限管理(已废弃)")])},c=[],o={name:"GlxtAuthority",data(){return{}},mounted(){},methods:{}},r=o,a=e("0b56"),s=Object(a["a"])(r,u,c,!1,null,"9c10bb16",null);n["default"]=s.exports}}]);
//# sourceMappingURL=chunk-2d23156c.6af6d42e.js.map

View File

@ -1 +0,0 @@
{"version":3,"sources":["webpack:///./src/views/system/authority.vue","webpack:///src/views/system/authority.vue","webpack:///./src/views/system/authority.vue?38b8","webpack:///./src/views/system/authority.vue?8135"],"names":["render","_vm","this","_c","_self","_v","staticRenderFns","name","data","mounted","methods","component"],"mappings":"uHAAA,IAAIA,EAAS,WAAkB,IAAIC,EAAIC,KAAKC,EAAGF,EAAIG,MAAMD,GAAG,OAAOA,EAAG,MAAM,CAACF,EAAII,GAAG,gBAEhFC,EAAkB,GCGP,GACfC,qBAEAC,OACA,UAGAC,YAEAC,YCduc,I,YCOncC,EAAY,eACd,EACAX,EACAM,GACA,EACA,KACA,WACA,MAIa,aAAAK,E","file":"js/chunk-2d23156c.6af6d42e.js","sourcesContent":["var render = function render(){var _vm=this,_c=_vm._self._c;return _c('div',[_vm._v(\"权限管理(已废弃)\")])\n}\nvar staticRenderFns = []\n\nexport { render, staticRenderFns }","<template>\r\n <div>权限管理(已废弃)</div>\r\n</template>\r\n\r\n<script>\r\nexport default {\r\n name: \"GlxtAuthority\",\r\n\r\n data() {\r\n return {};\r\n },\r\n\r\n mounted() {},\r\n\r\n methods: {},\r\n};\r\n</script>\r\n\r\n<style lang=\"scss\" scoped></style>\r\n","import mod from \"-!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js??vue-loader-options!./authority.vue?vue&type=script&lang=js&\"; export default mod; export * from \"-!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--13-0!../../../node_modules/_thread-loader@2.1.3@thread-loader/dist/cjs.js!../../../node_modules/_babel-loader@8.2.5@babel-loader/lib/index.js!../../../node_modules/_cache-loader@4.1.0@cache-loader/dist/cjs.js??ref--1-0!../../../node_modules/_vue-loader@15.10.0@vue-loader/lib/index.js??vue-loader-options!./authority.vue?vue&type=script&lang=js&\"","import { render, staticRenderFns } from \"./authority.vue?vue&type=template&id=9c10bb16&scoped=true&\"\nimport script from \"./authority.vue?vue&type=script&lang=js&\"\nexport * from \"./authority.vue?vue&type=script&lang=js&\"\n\n\n/* normalize component */\nimport normalizer from \"!../../../node_modules/_vue-loader@15.10.0@vue-loader/lib/runtime/componentNormalizer.js\"\nvar component = normalizer(\n script,\n render,\n staticRenderFns,\n false,\n null,\n \"9c10bb16\",\n null\n \n)\n\nexport default component.exports"],"sourceRoot":""}

File diff suppressed because one or more lines are too long

View File

@ -0,0 +1,2 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-3bcfd210"],{a55b:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"backimg"},[t("div",{staticClass:"sign"},[t("span",{staticClass:"title"},[e._v("Hi 欢迎使用")]),e._m(0),t("p",{staticClass:"title-1"},[e._v("登录")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.name,expression:"form.name"}],attrs:{type:"text",placeholder:"请输入用户名"},domProps:{value:e.form.name},on:{input:function(t){t.target.composing||e.$set(e.form,"name",t.target.value)}}}),t("br"),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password,expression:"form.password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:e.form.password},on:{input:function(t){t.target.composing||e.$set(e.form,"password",t.target.value)}}}),t("br"),t("el-checkbox",{model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},[e._v("记住密码")]),t("br"),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.Login()}}},[e._v("登录")])],1)])},a=[function(){var e=this,t=e._self._c;return t("p",{staticClass:"manage"},[t("img",{attrs:{src:o("c663"),alt:""}}),t("span",[e._v("ERP管理系统")])])}],r=o("4ff3"),i=o.n(r),n={data(){return{checked:!1,form:{name:"",password:""}}},mounted(){this.getCookie()},methods:{Login(){!0===this.checked?this.setCookie(this.form.name,this.form.password,!0,7):this.clearCookie(),""===this.form.name||""===this.form.password?this.$message({message:"账号或密码不能为空",type:"error"}):i.a.post("/api/auth/login",this.form).then(e=>{let t=e.data;t.error&&(this.$message({message:"账号或密码错误,请重新输入",type:"error"}),this.form.name="",this.form.password="",this.checked=!1),t.token&&(this.form={},localStorage.setItem("token",t.token),this.$message({message:"成功登录,欢迎来到后台管理系统",type:"success"}),this.$router.push("/GOODS_LIST"))})},setCookie(e,t,o,s){const a=new Date;a.setTime(a.getTime()+864e5*s),window.document.cookie="name="+e+";path=/;expires="+a.toGMTString(),window.document.cookie="password="+t+";path=/;expires="+a.toGMTString(),window.document.cookie="state="+o+";path=/;expires="+a.toGMTString()},getCookie(){if(document.cookie.length>0){const e=document.cookie.split("; ");for(let t=0;t<e.length;t++){const o=e[t].split("=");"name"===o[0]?this.form.name=o[1]:"password"===o[0]?this.form.password=o[1]:"state"===o[0]&&(this.checked=Boolean(o[1]))}}},clearCookie:function(){this.setCookie("","",!1,-1)}}},c=n,m=(o("b26c"),o("0b56")),p=Object(m["a"])(c,s,a,!1,null,"57f8ef7a",null);t["default"]=p.exports},b26c:function(e,t,o){"use strict";o("db4d")},c663:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAIAAAADehTSAAAAAXNSR0IArs4c6QAABYhJREFUaN7tmv1PW1UYx/svAKIx8SUx+stM9FfdjIkJi/EHMzUzcbpf1LHNiUaX6UwBF8jI3Aiii04jExoGGmCLYhV5GWXjRbpSBCzv671toS29fbl9oW/33nNan0u7An2jve1Fm3DypGkPbe/nfs/3PM85p0jChdMke6x7rHuse6x5/K5Qsvb/YgUghrQ7Lw+vHW1befYr3WPndQ/V6B6vM5ZdsVf3BBcs+SKW5KhiYMpoPtxCllYRxZUQ5JaIviytpk50cNb13IklwkkxphuGyPurI5Tpw/BUfe4CSwSjOmr7yO1CposiqWHfBdbozIVWIgg07B1YJEoqs2DlQ2p+XQajIRZr0umMETK+8E2WoFEHB9QrorBGp86rP4IvMcvF+oOzZgGgkaAvDorFaj39K4wduM36wY0QjgrsblVBjzBWe+UfYrHaPpPHLuNuV0dYHef7iSKButo//1MsVk+7Oiah/ok6zuaFfntlDymU1fn1sFhzizO5IM/HJjLUIbgBuvGWQA8UVXr7F0XMA2tHWjdVfPAc5Mj1bo1A1geqkdMvYn7lU2lxlIwokoLhmLu27JMrHyvPNMIEFZEVY2w8+F3serpHaznbun7fFwJY195qS1VmoRv+5GW5v20uhcm24PTAdePenFHd8o+SRElVrFrSl29TJzuzN6sUElZSVuik/IEGjbasZ3y/fJSP30Yb/tEKYeUT7Zlu4p5HDU/XO+oGsi5aRZVumSoRFVzRu0q92KsEvijoRjz/+9j6lgKUBSv2s+bXmsG4G+smaSZrq/gokgYmVhIN1rSoPyDfRpkTa6QhT8B06KrQ6irVPVwD3xC31mhZMuxPBgoavzM8hQV4YFMGP2t592dQSIColvKOrf6D5916c1JFN1hHftGZQ7mw8lJwyHFpMLYRyDRKq2DFs3nPoVAXaXouFah89JUBlW+7AQSvX0O+oWXDkxdjeTeazh6phYxGFksTy5W9tjd077N+DtXPaA+kBoUYMtvyty8IhziHFxZfxH2bAlPHOxi9A7ZfWxSVwuhTJ7tgSRlZB09Y6TeHJtNQglMbNUTS1Ja1BzDCyO1nTTS7audsHr9SxxfhEp6YrldEchCUOuAzHvzecvSa5/o07AWgKSn64/HZuMSUCHphehklVIEs9gWc3eNTzLl+GLSf67JWyKjyJupYU/SxQhZQE+wK7RtcRt5gZM8Y203AM4s/0LK0ckQxuUE5kgoRHst6/rpOmlKB7rQmRDg4racvyakTV63lycNe1YkDTMwYiLYF7yhwkM9NhNv7yZ05SJPphYQp/1Kv8ksNQfkCQtYDcGfsmtNRLwfxUlFCUO81szrr1k9x5GJQNQRGgZcuhpUb1ho12rOq+eMj028oJg/1q17eiMM3J96+PfWpau7bOXLM4ghwKJPtuCT5OYrWYv3oGgxxalDeAN6bmriUyc4oWWI+3alRYmcu6yxEe22n29LIySt6rAnsG7eBDrFscLQPOe27d/bm6RxPq+iGTWtuxGy65SatjOpWLicAWbPS9fJ0ipY32c60c1Z3kg2PfpnVzuf3bHAHVm/fDJ+MkknLT7UKGUNSiUC8y6eVWDQDpJhbGAemdM4rA9T7LfGsp1qC88akymGOY9Qj4hkgXc7iJ7WRpk41byr6oSw4t5pqhJHTwd6dE88AO58PuFuHI36AnM8YbClR4MbIBeSi/7MzeCBDHr/7pzHvgAYH2DSaQTFlZtWiGiCT9UA4k4SN/T5Wt1QAv23wpdWow+vuwmBliQVRZ1X+WFmWM+oLgBUIOasZ+70F8Fscz2pZ3QVR88GKELKaw7vScmVFHhdmggXACiOPXI7wbrUcWUNI/LSaH1bMMiHEFQArv6VmgruTAfLAmvf/EBC9bu1a+xedeSGU5Z1AjAAAAABJRU5ErkJggg=="},db4d:function(e,t,o){}}]);
//# sourceMappingURL=chunk-3bcfd210.374395ff.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-5ed10db2"],{"067e":function(e,t,o){},6920:function(e,t,o){"use strict";o("067e")},a55b:function(e,t,o){"use strict";o.r(t);var s=function(){var e=this,t=e._self._c;return t("div",{staticClass:"backimg"},[t("div",{staticClass:"sign"},[t("span",{staticClass:"title"},[e._v("Hi 欢迎使用")]),e._m(0),t("p",{staticClass:"title-1"},[e._v("登录")]),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.name,expression:"form.name"}],attrs:{type:"text",placeholder:"请输入用户名"},domProps:{value:e.form.name},on:{input:function(t){t.target.composing||e.$set(e.form,"name",t.target.value)}}}),t("br"),t("input",{directives:[{name:"model",rawName:"v-model",value:e.form.password,expression:"form.password"}],attrs:{type:"password",placeholder:"请输入密码"},domProps:{value:e.form.password},on:{input:function(t){t.target.composing||e.$set(e.form,"password",t.target.value)}}}),t("br"),t("el-checkbox",{model:{value:e.checked,callback:function(t){e.checked=t},expression:"checked"}},[e._v("记住密码")]),t("br"),t("el-button",{attrs:{type:"primary"},on:{click:function(t){return e.Login()}}},[e._v("登录")])],1)])},a=[function(){var e=this,t=e._self._c;return t("p",{staticClass:"manage"},[t("img",{attrs:{src:o("c663"),alt:""}}),t("span",[e._v("ERP管理系统")])])}],r=o("4ff3"),i=o.n(r),n={data(){return{checked:!1,form:{name:"",password:""}}},mounted(){this.getCookie()},methods:{Login(){!0===this.checked?this.setCookie(this.form.name,this.form.password,!0,7):this.clearCookie(),""===this.form.name||""===this.form.password?this.$message({message:"账号或密码不能为空",type:"error"}):i.a.post("/api/auth/login",this.form).then(e=>{let t=e.data;console.log(t),t.error&&(this.$message({message:"账号或密码错误,请重新输入",type:"error"}),this.form.name="",this.form.password="",this.checked=!1),t.token&&(this.form={},localStorage.setItem("token",t.token),this.$message({message:"成功登录,欢迎来到后台管理系统",type:"success"}),this.$router.push("/GOODS_LIST"))})},setCookie(e,t,o,s){const a=new Date;a.setTime(a.getTime()+864e5*s),window.document.cookie="name="+e+";path=/;expires="+a.toGMTString(),window.document.cookie="password="+t+";path=/;expires="+a.toGMTString(),window.document.cookie="state="+o+";path=/;expires="+a.toGMTString()},getCookie(){if(document.cookie.length>0){const e=document.cookie.split("; ");for(let t=0;t<e.length;t++){const o=e[t].split("=");"name"===o[0]?this.form.name=o[1]:"password"===o[0]?this.form.password=o[1]:"state"===o[0]&&(this.checked=Boolean(o[1]))}}},clearCookie:function(){this.setCookie("","",!1,-1)}}},c=n,m=(o("6920"),o("0b56")),p=Object(m["a"])(c,s,a,!1,null,"4d3b70b5",null);t["default"]=p.exports},c663:function(e,t){e.exports="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADkAAAA5CAIAAAADehTSAAAAAXNSR0IArs4c6QAABYhJREFUaN7tmv1PW1UYx/svAKIx8SUx+stM9FfdjIkJi/EHMzUzcbpf1LHNiUaX6UwBF8jI3Aiii04jExoGGmCLYhV5GWXjRbpSBCzv671toS29fbl9oW/33nNan0u7An2jve1Fm3DypGkPbe/nfs/3PM85p0jChdMke6x7rHuse6x5/K5Qsvb/YgUghrQ7Lw+vHW1befYr3WPndQ/V6B6vM5ZdsVf3BBcs+SKW5KhiYMpoPtxCllYRxZUQ5JaIviytpk50cNb13IklwkkxphuGyPurI5Tpw/BUfe4CSwSjOmr7yO1CposiqWHfBdbozIVWIgg07B1YJEoqs2DlQ2p+XQajIRZr0umMETK+8E2WoFEHB9QrorBGp86rP4IvMcvF+oOzZgGgkaAvDorFaj39K4wduM36wY0QjgrsblVBjzBWe+UfYrHaPpPHLuNuV0dYHef7iSKButo//1MsVk+7Oiah/ok6zuaFfntlDymU1fn1sFhzizO5IM/HJjLUIbgBuvGWQA8UVXr7F0XMA2tHWjdVfPAc5Mj1bo1A1geqkdMvYn7lU2lxlIwokoLhmLu27JMrHyvPNMIEFZEVY2w8+F3serpHaznbun7fFwJY195qS1VmoRv+5GW5v20uhcm24PTAdePenFHd8o+SRElVrFrSl29TJzuzN6sUElZSVuik/IEGjbasZ3y/fJSP30Yb/tEKYeUT7Zlu4p5HDU/XO+oGsi5aRZVumSoRFVzRu0q92KsEvijoRjz/+9j6lgKUBSv2s+bXmsG4G+smaSZrq/gokgYmVhIN1rSoPyDfRpkTa6QhT8B06KrQ6irVPVwD3xC31mhZMuxPBgoavzM8hQV4YFMGP2t592dQSIColvKOrf6D5916c1JFN1hHftGZQ7mw8lJwyHFpMLYRyDRKq2DFs3nPoVAXaXouFah89JUBlW+7AQSvX0O+oWXDkxdjeTeazh6phYxGFksTy5W9tjd077N+DtXPaA+kBoUYMtvyty8IhziHFxZfxH2bAlPHOxi9A7ZfWxSVwuhTJ7tgSRlZB09Y6TeHJtNQglMbNUTS1Ja1BzDCyO1nTTS7audsHr9SxxfhEp6YrldEchCUOuAzHvzecvSa5/o07AWgKSn64/HZuMSUCHphehklVIEs9gWc3eNTzLl+GLSf67JWyKjyJupYU/SxQhZQE+wK7RtcRt5gZM8Y203AM4s/0LK0ckQxuUE5kgoRHst6/rpOmlKB7rQmRDg4racvyakTV63lycNe1YkDTMwYiLYF7yhwkM9NhNv7yZ05SJPphYQp/1Kv8ksNQfkCQtYDcGfsmtNRLwfxUlFCUO81szrr1k9x5GJQNQRGgZcuhpUb1ho12rOq+eMj028oJg/1q17eiMM3J96+PfWpau7bOXLM4ghwKJPtuCT5OYrWYv3oGgxxalDeAN6bmriUyc4oWWI+3alRYmcu6yxEe22n29LIySt6rAnsG7eBDrFscLQPOe27d/bm6RxPq+iGTWtuxGy65SatjOpWLicAWbPS9fJ0ipY32c60c1Z3kg2PfpnVzuf3bHAHVm/fDJ+MkknLT7UKGUNSiUC8y6eVWDQDpJhbGAemdM4rA9T7LfGsp1qC88akymGOY9Qj4hkgXc7iJ7WRpk41byr6oSw4t5pqhJHTwd6dE88AO58PuFuHI36AnM8YbClR4MbIBeSi/7MzeCBDHr/7pzHvgAYH2DSaQTFlZtWiGiCT9UA4k4SN/T5Wt1QAv23wpdWow+vuwmBliQVRZ1X+WFmWM+oLgBUIOasZ+70F8Fscz2pZ3QVR88GKELKaw7vScmVFHhdmggXACiOPXI7wbrUcWUNI/LSaH1bMMiHEFQArv6VmgruTAfLAmvf/EBC9bu1a+xedeSGU5Z1AjAAAAABJRU5ErkJggg=="}}]);
//# sourceMappingURL=chunk-5ed10db2.f7bc8652.js.map

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,4 +0,0 @@
(window["webpackJsonp"]=window["webpackJsonp"]||[]).push([["chunk-f60080c8"],{"0a5a":function(e,t,n){"use strict";n.d(t,"a",(function(){return s})),n.d(t,"b",(function(){return i}));const r="admin_token";function s(){return localStorage.getItem("token")}function i(){return localStorage.removeItem(r)}},"1e4b":function(e,t,n){"use strict";n.r(t);var r=function(){var e=this,t=e._self._c;return t("div",[t("el-container",[t("el-container",[t("el-aside",{class:e.show?"width":"width1"},[t("el-menu",{attrs:{router:"","background-color":"#282c34","text-color":"#fff","default-active":e.$route.path,"default-openeds":e.openeds}},e._l(e.menu,(function(n){return t("div",{key:n.id},[n.children?t("el-submenu",{attrs:{index:n.code}},[t("template",{slot:"title"},[t("span",[e._v(e._s(n.name))])]),e._l(n.children,(function(n){return t("el-menu-item",{key:n.id,attrs:{index:n.code}},[e._v(e._s(n.name))])}))],2):t("el-menu-item",{attrs:{index:n.code}},[t("span",[e._v(e._s(n.name))])])],1)})),0)],1),t("el-main",[t("div",{staticClass:"head"},[t("ul",[t("li",[t("div",{staticClass:"add",on:{click:e.add}},[e.show?t("i",{staticClass:"el-icon-s-unfold"}):t("i",{staticClass:"el-icon-s-fold"})]),t("div",{staticClass:"right"},[t("el-breadcrumb",{attrs:{"separator-class":"el-icon-arrow-right"}},e._l(e.titie,(function(n,r){return t("el-breadcrumb-item",{key:r},[e._v(e._s(n.name))])})),1)],1)]),t("li",[t("div",{staticClass:"token",on:{click:e.hanleLogout}},[e._v("退出")])])])]),t("div",{staticClass:"box-card"},[t("router-view")],1)])],1)],1)],1)},s=[],i=n("0a5a"),a=n("adb5");function o(){return Object(a["a"])({url:"/api/menus",method:"get"})}var u={mounted(){o().then(e=>{this.menu=e.data.data,console.log(this.menu)})},data(){return{menu:[],show:!0,levelData:[],titie:[],head:"",onindex:0,openeds:["GOODS_MANAGE"]}},watch:{$route:{handler:function(e){this.titie=e.matched,this.head=e.name,this.levelData.push({name:e.name,path:e.path});const t=[],n={};for(var r=0;r<this.levelData.length;r++)n[this.levelData[r].name]||(t.push(this.levelData[r]),n[this.levelData[r].name]=!0);this.levelData=t},deep:!0,immediate:!0}},methods:{next(){this.hanletop()},hanletop(){document.getElementById("bottom").scrollIntoView({behavior:"smooth"})},hanlebottom(){document.getElementById("top").scrollIntoView({behavior:"smooth"})},hanleLogout(){Object(i["b"])(),this.$router.push({path:"/Login"})},handlerclick(e){this.$route.path!==e&&this.$router.push({path:e})},add(){this.show=!this.show},hanblDelete(e,t){var n=this.levelData[e].name;if(this.onindex=e,this.levelData.splice(this.onindex,1),t===this.head){var r,s;for(let e=0;e<this.levelData.length;e++)r=this.levelData[e].path,s=this.levelData[e].name;this.levelData.length&&s!==n&&this.$router.push({path:r})}}}},c=u,l=(n("4c50"),n("0b56")),d=Object(l["a"])(c,r,s,!1,null,"90c69c32",null);t["default"]=d.exports},"38bc":function(e,t,n){var r,s;
/* NProgress, (c) 2013, 2014 Rico Sta. Cruz - http://ricostacruz.com/nprogress
* @license MIT */(function(i,a){r=a,s="function"===typeof r?r.call(t,n,t,e):r,void 0===s||(e.exports=s)})(0,(function(){var e={version:"0.2.0"},t=e.settings={minimum:.08,easing:"ease",positionUsing:"",speed:200,trickle:!0,trickleRate:.02,trickleSpeed:800,showSpinner:!0,barSelector:'[role="bar"]',spinnerSelector:'[role="spinner"]',parent:"body",template:'<div class="bar" role="bar"><div class="peg"></div></div><div class="spinner" role="spinner"><div class="spinner-icon"></div></div>'};function n(e,t,n){return e<t?t:e>n?n:e}function r(e){return 100*(-1+e)}function s(e,n,s){var i;return i="translate3d"===t.positionUsing?{transform:"translate3d("+r(e)+"%,0,0)"}:"translate"===t.positionUsing?{transform:"translate("+r(e)+"%,0)"}:{"margin-left":r(e)+"%"},i.transition="all "+n+"ms "+s,i}e.configure=function(e){var n,r;for(n in e)r=e[n],void 0!==r&&e.hasOwnProperty(n)&&(t[n]=r);return this},e.status=null,e.set=function(r){var o=e.isStarted();r=n(r,t.minimum,1),e.status=1===r?null:r;var u=e.render(!o),c=u.querySelector(t.barSelector),l=t.speed,d=t.easing;return u.offsetWidth,i((function(n){""===t.positionUsing&&(t.positionUsing=e.getPositioningCSS()),a(c,s(r,l,d)),1===r?(a(u,{transition:"none",opacity:1}),u.offsetWidth,setTimeout((function(){a(u,{transition:"all "+l+"ms linear",opacity:0}),setTimeout((function(){e.remove(),n()}),l)}),l)):setTimeout(n,l)})),this},e.isStarted=function(){return"number"===typeof e.status},e.start=function(){e.status||e.set(0);var n=function(){setTimeout((function(){e.status&&(e.trickle(),n())}),t.trickleSpeed)};return t.trickle&&n(),this},e.done=function(t){return t||e.status?e.inc(.3+.5*Math.random()).set(1):this},e.inc=function(t){var r=e.status;return r?("number"!==typeof t&&(t=(1-r)*n(Math.random()*r,.1,.95)),r=n(r+t,0,.994),e.set(r)):e.start()},e.trickle=function(){return e.inc(Math.random()*t.trickleRate)},function(){var t=0,n=0;e.promise=function(r){return r&&"resolved"!==r.state()?(0===n&&e.start(),t++,n++,r.always((function(){n--,0===n?(t=0,e.done()):e.set((t-n)/t)})),this):this}}(),e.render=function(n){if(e.isRendered())return document.getElementById("nprogress");u(document.documentElement,"nprogress-busy");var s=document.createElement("div");s.id="nprogress",s.innerHTML=t.template;var i,o=s.querySelector(t.barSelector),c=n?"-100":r(e.status||0),l=document.querySelector(t.parent);return a(o,{transition:"all 0 linear",transform:"translate3d("+c+"%,0,0)"}),t.showSpinner||(i=s.querySelector(t.spinnerSelector),i&&d(i)),l!=document.body&&u(l,"nprogress-custom-parent"),l.appendChild(s),s},e.remove=function(){c(document.documentElement,"nprogress-busy"),c(document.querySelector(t.parent),"nprogress-custom-parent");var e=document.getElementById("nprogress");e&&d(e)},e.isRendered=function(){return!!document.getElementById("nprogress")},e.getPositioningCSS=function(){var e=document.body.style,t="WebkitTransform"in e?"Webkit":"MozTransform"in e?"Moz":"msTransform"in e?"ms":"OTransform"in e?"O":"";return t+"Perspective"in e?"translate3d":t+"Transform"in e?"translate":"margin"};var i=function(){var e=[];function t(){var n=e.shift();n&&n(t)}return function(n){e.push(n),1==e.length&&t()}}(),a=function(){var e=["Webkit","O","Moz","ms"],t={};function n(e){return e.replace(/^-ms-/,"ms-").replace(/-([\da-z])/gi,(function(e,t){return t.toUpperCase()}))}function r(t){var n=document.body.style;if(t in n)return t;var r,s=e.length,i=t.charAt(0).toUpperCase()+t.slice(1);while(s--)if(r=e[s]+i,r in n)return r;return t}function s(e){return e=n(e),t[e]||(t[e]=r(e))}function i(e,t,n){t=s(t),e.style[t]=n}return function(e,t){var n,r,s=arguments;if(2==s.length)for(n in t)r=t[n],void 0!==r&&t.hasOwnProperty(n)&&i(e,n,r);else i(e,s[1],s[2])}}();function o(e,t){var n="string"==typeof e?e:l(e);return n.indexOf(" "+t+" ")>=0}function u(e,t){var n=l(e),r=n+t;o(n,t)||(e.className=r.substring(1))}function c(e,t){var n,r=l(e);o(e,t)&&(n=r.replace(" "+t+" "," "),e.className=n.substring(1,n.length-1))}function l(e){return(" "+(e.className||"")+" ").replace(/\s+/gi," ")}function d(e){e&&e.parentNode&&e.parentNode.removeChild(e)}return e}))},"4c50":function(e,t,n){"use strict";n("b345")},"70e7":function(e,t,n){},adb5:function(e,t,n){"use strict";var r=n("4ff3"),s=n.n(r),i=n("0a5a"),a=n("38bc"),o=n.n(a),u=(n("70e7"),n("5422")),c=(n("a18c"),s.a.create({timeout:1e4}));c.interceptors.request.use(e=>(e.headers.Authorization="Bearer "+Object(i["a"])(),o.a.start(),e),e=>(console.log(e,"222222"),Promise.reject(e))),c.interceptors.response.use(e=>{o.a.done();const t=e.status;if(200===t||201===t)return e},e=>(400===e.response.status&&Object(u["Message"])({message:e.response.data.errorMessage,type:"error"}),500===e.response.status&&Object(u["Message"])({message:e.response.data.message,type:"error"}),Promise.reject(e))),t["a"]=c},b345:function(e,t,n){}}]);
//# sourceMappingURL=chunk-f60080c8.789444a8.js.map

File diff suppressed because one or more lines are too long

View File

@ -7,14 +7,9 @@
</div>
</template>
<script>
// import { getToken } from "@/util/auth";
export default {
// created() {
// if (!getToken()) {
// this.$router.push({ name: "Login" });
// }
// },
};
export default {
};
</script>
<style lang="scss"></style>
<style lang="scss"></style>

View File

@ -1,9 +0,0 @@
<template>
<div>
<UploadExcel :on-success="handleSuccess" :before-upload="beforeUpload" />
</div>
</template>
<script>
</script>

View File

@ -1,215 +0,0 @@
<!--
* @Description:头像上传组件
* @Author: czw (725551805@qq.com)
* @Date: 2022-03-03 18:50:30
* @LastEditors: czw (725551805@qq.com)
* @LastEditTime: 2022-03-14 09:14:24
* @FilePath: /glxt/src/views/home/home/index.vue
-->
<template>
<div>
<el-upload
name="image"
:action="uploadAction"
:headers="uploadHeaders"
:on-preview="handleChange"
:on-remove="beforeRemove"
:on-success="good"
:file-list="img"
:limit="number"
:before-upload="handleBeforeUpload"
:on-change="handleEditChange"
accept=".png,.jpg"
list-type="picture-card"
:class="hideUploadEdit ? 'hide' : ''"
:show-file-list="true"
>
<i class="el-icon-plus"></i>
</el-upload>
<div class="demo-image__preview" v-if="imageUrl">
<el-image
class="hidden__el-image"
ref="elImage"
:src="imageUrl"
:preview-src-list="previewSrcList"
>
</el-image>
</div>
</div>
</template>
<script>
import { getToken } from "@/util/auth";
export default {
name: "", //
components: {}, //
props: {
//
number: {
type: Number,
default: 1,
},
file: {
type: Array,
default: () => [],
},
}, //
data() {
return {
hideUploadEdit: false, //
url: "/api/upload", //
imageUrl: "", //
previewSrcList: [], //
list: [], //
img: [], //
};
},
computed: {
//
uploadAction() {
return "https://ct-upimg.yx090.com" + this.url;
},
//
uploadHeaders() {
return {
// authorization: 'Bearer' + getToken(),
"Content-Type": "multipart/form-data",
};
},
}, // data
watch: {
file: {
handler(val) {
if (val) {
// console.log(val, 'ppp')
var imges = [];
val.forEach((element) => {
imges = element.url.split(",");
this.list = imges;
});
imges.forEach((element) => {
this.img.push({ url: this.computedGetPictureSrc(element) });
});
const previewSrcList = imges.map((ele) => {
return this.computedGetPictureSrc(ele);
});
this.previewSrcList = previewSrcList;
if (val.length === this.number) {
this.hideUploadEdit = true;
}
}
},
deep: true,
immediate: true,
},
}, // data
methods: {
computedGetPictureSrc(src) {
return "https://ct-upimg.yx090.com/" + src;
},
/**
* @author: czw (725551805@qq.com)
* @description: 判断显示图片上传限制隐藏
* @param {*} file
* @param {*} fileList
* @return {*}
* @Date: 2022-03-03 21:16:54
*/
handleEditChange(file, fileList) {
if (fileList.length === this.number) {
this.hideUploadEdit = true;
}
},
/**
* @author: czw (725551805@qq.com)
* @description: 上传成功
* @param {*}
* @return {*}
* @Date: 2022-03-03 19:59:45
*/
good(file, fileList) {
this.previewSrcList.push(fileList.url);
console.log(this.previewSrcList, "------");
// file.data.forEach((element) => {
// this.list.push(element.url)
// })
this.$emit("urlimg", fileList.url);
},
/**
* @author: czw (725551805@qq.com)
* @description: 点击放大
* @param {*}
* @return {*}
* @Date: 2022-03-03 18:59:28
*/
handleChange(file) {
this.imageUrl = file.url;
this.$nextTick(() => {
this.$refs.elImage.clickHandler();
});
},
/**
* @author: czw (725551805@qq.com)
* @description:删除
* @param {*}
* @return {*}
* @Date: 2022-03-03 18:59:40
*/
beforeRemove(file, fileList) {
if (fileList.length === this.number) {
this.hideUploadEdit = true;
} else {
this.hideUploadEdit = false;
}
if (file.response) {
file.response.data.forEach((element) => {
for (var i = 0; i < this.list.length; i++) {
if (element.url === this.list[i]) {
this.list.splice(i, 1);
}
}
});
} else {
console.log(file, "iiii");
for (var i = 0; i < this.list.length; i++) {
if (file.url === this.computedGetPictureSrc(this.list[i])) {
this.list.splice(i, 1);
}
}
}
},
/**
* @author: czw (725551805@qq.com)
* @description:自动删除
* @param {*}
* @return {*}
* @Date: 2022-03-03 19:53:25
*/
handleBeforeUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
return false;
}
},
}, //
};
</script>
<style lang="scss">
.demo-image__preview {
height: 0;
}
.hidden__el-image {
width: 0;
height: 0;
::v-deep .el-image__preview {
display: none;
}
}
.hide .el-upload--picture-card {
display: none;
}
</style>

View File

@ -41,11 +41,6 @@ const list = [
name: "角色管理",
component: () => import("../views/system/role.vue"),
},
{
path: "PERMISSION_MANAGE",
name: "权限管理",
component: () => import("../views/system/authority.vue"),
},
{
path: "SYSTEM_LOG",
name: "系统日志",
@ -67,10 +62,6 @@ const list = [
},
],
},
// {
// path: "/",
// redirect: "/index",
// },
];
export default list;

View File

@ -9,10 +9,7 @@
import router from './index'
import Home from './index1'
// console.log(...Home);
Home.forEach(element => {
router.addRoute(element) // 动态添加更多的路由规则
})
// 菜单路由数据

View File

@ -3,7 +3,6 @@ import { getToken } from "@/util/auth";
import NProgress from "nprogress";
import "nprogress/nprogress.css";
import { Message } from "element-ui";
import router from "@/router";
var instance = axios.create({
timeout: 10000,
});
@ -18,13 +17,10 @@ instance.interceptors.request.use(
// config.headers['content-type'] = 'application/json'
config.headers.Authorization = "Bearer " + getToken(); // 请求头
NProgress.start();
// console.log(config, '1111') // for debug
return config;
},
(error) => {
// 对请求错误做些什么
console.log(error, "222222"); // for debug
return Promise.reject(error);
}
);
@ -35,7 +31,6 @@ instance.interceptors.response.use(
NProgress.done();
const res = response.status;
// 对响应数据做点什么
// console.log(response, '33333') // for debug
if (res === 200 || res === 201) {
return response;
}
@ -55,21 +50,6 @@ instance.interceptors.response.use(
type: "error",
});
}
// console.log(error, "44444"); // for debug
// if (error.response.status === 401) {
// Message({
// message: '账户登录过期,请重新登录',
// type: 'error'
// })
// router.push('/login')
// } else {
// Message({
// message: error.response || 'Error',
// type: 'error'
// })
// }
return Promise.reject(error);
}
);

View File

@ -3,9 +3,7 @@
<div class="sign">
<span class="title">Hi 欢迎使用</span>
<p class="manage">
<img src="../css/img/养花人2_画板 1 副本 15.png" alt="" /><span
>ERP管理系统</span
>
<img src="../css/img/养花人2_画板 1 副本 15.png" alt="" /><span>ERP管理系统</span>
</p>
<p class="title-1">登录</p>
<input type="text" placeholder="请输入用户名" v-model="form.name" />
@ -20,169 +18,174 @@
</template>
<script>
import axios from "axios";
export default {
data() {
return {
checked: false, //
form: {
//
name: "",
password: "",
},
};
},
mounted() {
this.getCookie();
},
methods: {
Login() {
// cookie
if (this.checked === true) {
this.setCookie(this.form.name, this.form.password, true, 7);
} else {
this.clearCookie();
}
//
if (this.form.name === "" || this.form.password === "") {
this.$message({
message: "账号或密码不能为空",
type: "error",
});
} else {
// let token = localStorage.getItem("token");
axios.post("/api/auth/login", this.form).then((res) => {
let data = res.data;
console.log(data);
if (data.error) {
this.$message({
message: "账号或密码错误,请重新输入",
type: "error",
});
this.form.name = "";
this.form.password = "";
this.checked = false;
}
import axios from "axios";
export default {
data() {
return {
checked: false, //
form: {
//
name: "",
password: "",
},
};
},
mounted() {
this.getCookie();
},
methods: {
Login() {
// cookie
if (this.checked === true) {
this.setCookie(this.form.name, this.form.password, true, 7);
} else {
this.clearCookie();
}
//
if (this.form.name === "" || this.form.password === "") {
this.$message({
message: "账号或密码不能为空",
type: "error",
});
} else {
axios.post("/api/auth/login", this.form).then((res) => {
let data = res.data;
if (data.error) {
this.$message({
message: "账号或密码错误,请重新输入",
type: "error",
});
this.form.name = "";
this.form.password = "";
this.checked = false;
}
if (data.token) {
this.form = {};
localStorage.setItem("token", data.token);
this.$message({
message: "成功登录,欢迎来到后台管理系统",
type: "success",
});
this.$router.push("/GOODS_LIST");
}
});
}
},
// cookie
setCookie(c_name, c_pwd, c_state, exdays) {
const exdate = new Date();
exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays); //
window.document.cookie =
"name" + "=" + c_name + ";path=/;expires=" + exdate.toGMTString();
window.document.cookie =
"password" + "=" + c_pwd + ";path=/;expires=" + exdate.toGMTString();
window.document.cookie =
"state" + "=" + c_state + ";path=/;expires=" + exdate.toGMTString();
},
// cookie
getCookie() {
if (document.cookie.length > 0) {
const arr = document.cookie.split("; ");
for (let i = 0; i < arr.length; i++) {
const arr2 = arr[i].split("=");
// console.log(arr[2]);
if (arr2[0] === "name") {
this.form.name = arr2[1];
} else if (arr2[0] === "password") {
this.form.password = arr2[1];
} else if (arr2[0] === "state") {
this.checked = Boolean(arr2[1]);
if (data.token) {
this.form = {};
localStorage.setItem("token", data.token);
this.$message({
message: "成功登录,欢迎来到后台管理系统",
type: "success",
});
this.$router.push("/GOODS_LIST");
}
});
}
},
// cookie
setCookie(c_name, c_pwd, c_state, exdays) {
const exdate = new Date();
exdate.setTime(exdate.getTime() + 24 * 60 * 60 * 1000 * exdays); //
window.document.cookie =
"name" + "=" + c_name + ";path=/;expires=" + exdate.toGMTString();
window.document.cookie =
"password" + "=" + c_pwd + ";path=/;expires=" + exdate.toGMTString();
window.document.cookie =
"state" + "=" + c_state + ";path=/;expires=" + exdate.toGMTString();
},
// cookie
getCookie() {
if (document.cookie.length > 0) {
const arr = document.cookie.split("; ");
for (let i = 0; i < arr.length; i++) {
const arr2 = arr[i].split("=");
if (arr2[0] === "name") {
this.form.name = arr2[1];
} else if (arr2[0] === "password") {
this.form.password = arr2[1];
} else if (arr2[0] === "state") {
this.checked = Boolean(arr2[1]);
}
}
}
}
},
// cookie
clearCookie: function () {
this.setCookie("", "", false, -1);
},
},
// cookie
clearCookie: function () {
this.setCookie("", "", false, -1);
},
},
};
};
</script>
<style lang="scss" scoped>
.backimg {
width: 100%;
height: 1080px;
background-image: url("./../css/img/组 32.png");
background-repeat: no-repeat;
background-size: 100%;
position: relative;
}
.backimg {
width: 100%;
height: 1080px;
background-image: url("./../css/img/组 32.png");
background-repeat: no-repeat;
background-size: 100%;
position: relative;
}
.sign {
width: 400px;
height: 500px;
position: absolute;
top: 270px;
right: 300px;
input {
.sign {
width: 400px;
height: 51px;
border: 2px solid #bcbcbc;
opacity: 1;
border-radius: 5px;
margin-bottom: 25px;
}
.title {
width: 125px;
height: 23px;
font-size: 22px;
font-family: "BigruixianBlackGBV1.0";
font-weight: 400;
line-height: 23px;
color: #2b53ec;
opacity: 1;
}
.manage {
margin-top: 19px;
margin-bottom: 50px;
img {
margin-right: 20px;
height: 500px;
position: absolute;
top: 270px;
right: 300px;
input {
width: 400px;
height: 51px;
border: 2px solid #bcbcbc;
opacity: 1;
border-radius: 5px;
margin-bottom: 25px;
}
span {
width: 340px;
height: 57px;
font-size: 54px;
.title {
width: 125px;
height: 23px;
font-size: 22px;
font-family: "BigruixianBlackGBV1.0";
font-weight: 400;
line-height: 57px;
line-height: 23px;
color: #2b53ec;
opacity: 1;
}
.manage {
margin-top: 19px;
margin-bottom: 50px;
img {
margin-right: 20px;
}
span {
width: 340px;
height: 57px;
font-size: 54px;
font-family: "BigruixianBlackGBV1.0";
font-weight: 400;
line-height: 57px;
color: #2b53ec;
opacity: 1;
}
}
.title-1 {
width: 70px;
height: 35px;
font-size: 35px;
font-family: Source Han Sans CN;
font-weight: 500;
line-height: 60px;
color: #393939;
opacity: 1;
margin-bottom: 35px;
}
.el-button {
width: 400px;
height: 58px;
background: rgba(43, 83, 236);
border-radius: 5px;
margin-top: 40px;
}
.el-checkbox {
color: rgba(43, 83, 236);
}
}
.title-1 {
width: 70px;
height: 35px;
font-size: 35px;
font-family: Source Han Sans CN;
font-weight: 500;
line-height: 60px;
color: #393939;
opacity: 1;
margin-bottom: 35px;
}
.el-button {
width: 400px;
height: 58px;
background: rgba(43, 83, 236);
border-radius: 5px;
margin-top: 40px;
}
.el-checkbox {
color: rgba(43, 83, 236);
}
}
</style>
</style>

View File

@ -6,34 +6,21 @@
</div>
<!-- 列表 -->
<div class="table">
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="name" label="商品品牌"> </el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)"
>编辑</el-button
>
<el-button type="danger" @click="handdel(scope.row.id)"
>删除</el-button
>
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)">编辑</el-button>
<el-button type="danger" @click="handdel(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 新增品牌对话框 -->
<el-dialog
title="新增品牌"
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
>
<el-dialog title="新增品牌" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form">
<el-form-item label="商品品牌" :label-width="formLabelWidth">
<el-input v-model="form.kindName"></el-input>
@ -46,11 +33,7 @@
</el-dialog>
<!-- 编辑 -->
<el-dialog
title="编辑"
:visible.sync="dialogFormVisible1"
:close-on-click-modal="false"
>
<el-dialog title="编辑" :visible.sync="dialogFormVisible1" :close-on-click-modal="false">
<el-form :model="form1">
<el-form-item label="编辑品牌" :label-width="formLabelWidth1">
<el-input v-model="form1.kindName1"></el-input>
@ -64,171 +47,165 @@
<!-- 分页功能 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-sizes="[15, 50, 100]"
:page-size="per_page"
layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total"
>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import {
Brand_goods_types,
DelBrand_goods_types,
AddBrandgoods_types,
editBrand_types,
} from "../../api/rankingData";
// import axios from "axios";
export default {
data() {
return {
id: "", //id
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
dialogFormVisible1: false,
form: {
kindName: "", //
},
form1: {
kindName1: "", //
},
formLabelWidth: "120px",
formLabelWidth1: "120px",
newKind: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
created() {
this.getGoods_types();
},
methods: {
//
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
import {
Brand_goods_types,
DelBrand_goods_types,
AddBrandgoods_types,
editBrand_types,
} from "../../api/rankingData";
export default {
data() {
return {
id: "", //id
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
dialogFormVisible1: false,
form: {
kindName: "", //
},
form1: {
kindName1: "", //
},
formLabelWidth: "120px",
formLabelWidth1: "120px",
newKind: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
//
handleSizeChange(val) {
//
this.per_page = val;
created() {
this.getGoods_types();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getGoods_types();
},
//
handAdd() {
this.form.kindName = "";
this.dialogFormVisible = true;
},
//
addSubmit() {
var string;
string = this.form.kindName.replace(/\s/g, ",").split(",");
console.log(string, "lkkkk");
AddBrandgoods_types({
names: string,
}).then((res) => {
this.$message({
type: "success",
message: "添加成功",
});
methods: {
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getGoods_types();
});
this.dialogFormVisible = false;
},
//
handEdit(id, item) {
this.id = id;
// console.log("item", item);
this.form1.kindName1 = item.name;
this.dialogFormVisible1 = true;
},
//
EditSubmit() {
editBrand_types(this.id, {
name: this.form1.kindName1,
}).then((res) => {
this.$message({
type: "success",
message: "编辑成功",
});
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getGoods_types();
});
this.dialogFormVisible1 = false;
},
//
handdel(id) {
this.$confirm("确定删除此条商品品牌吗?", "确认删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
DelBrand_goods_types(id).then((res) => {
this.getGoods_types();
});
},
//
handAdd() {
this.form.kindName = "";
this.dialogFormVisible = true;
},
//
addSubmit() {
var string;
string = this.form.kindName.replace(/\s/g, ",").split(",");
AddBrandgoods_types({
names: string,
}).then((res) => {
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
message: "添加成功",
});
this.getGoods_types();
});
this.dialogFormVisible = false;
},
//
handEdit(id, item) {
this.id = id;
this.form1.kindName1 = item.name;
this.dialogFormVisible1 = true;
},
//
EditSubmit() {
editBrand_types(this.id, {
name: this.form1.kindName1,
}).then((res) => {
this.$message({
type: "success",
message: "编辑成功",
});
this.getGoods_types();
});
this.dialogFormVisible1 = false;
},
//
handdel(id) {
this.$confirm("确定删除此条商品品牌吗?", "确认删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
DelBrand_goods_types(id).then((res) => {
this.getGoods_types();
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
getGoods_types() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
Brand_goods_types(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
//
getGoods_types() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
Brand_goods_types(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
};
};
</script>
<style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>

View File

@ -7,34 +7,21 @@
<!-- 列表 -->
<div class="table">
<el-table
ref="multipleTable"
:data="tableData"
tooltip-effect="dark"
style="width: 100%"
@selection-change="handleSelectionChange"
>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" style="width: 100%"
@selection-change="handleSelectionChange">
<el-table-column type="selection" width="55"> </el-table-column>
<el-table-column prop="name" label="商品种类"> </el-table-column>
<el-table-column prop="" label="操作">
<template slot-scope="scope">
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)"
>编辑</el-button
>
<el-button type="danger" @click="handdel(scope.row.id)"
>删除</el-button
>
<el-button type="primary" @click="handEdit(scope.row.id, scope.row)">编辑</el-button>
<el-button type="danger" @click="handdel(scope.row.id)">删除</el-button>
</template>
</el-table-column>
</el-table>
</div>
<!-- 新增种类对话框 -->
<el-dialog
title="新增"
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
>
<el-dialog title="新增" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form">
<el-form-item label="商品种类" :label-width="formLabelWidth">
<el-input v-model="form.kindName" autocomplete="off"></el-input>
@ -47,11 +34,7 @@
</el-dialog>
<!-- 编辑 -->
<el-dialog
title="编辑"
:visible.sync="dialogFormVisible1"
:close-on-click-modal="false"
>
<el-dialog title="编辑" :visible.sync="dialogFormVisible1" :close-on-click-modal="false">
<el-form :model="form1">
<el-form-item label="编辑种类" :label-width="formLabelWidth1">
<el-input v-model="form1.kindName1" autocomplete="off"></el-input>
@ -65,171 +48,165 @@
<!-- 分页功能 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-sizes="[15, 50, 100]"
:page-size="per_page"
layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total"
>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import {
goods_types,
Delgoods_types,
Addgoods_types,
editGoods_types,
} from "../../api/rankingData";
// import axios from "axios";
export default {
data() {
return {
id: "", //id
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
dialogFormVisible1: false,
form: {
kindName: "", //
},
form1: {
kindName1: "", //
},
formLabelWidth: "120px",
formLabelWidth1: "120px",
newKind: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
mounted() {
this.getGoods_types();
},
methods: {
//
handleSelectionChange(val) {
console.log(val);
this.multipleSelection = val;
import {
goods_types,
Delgoods_types,
Addgoods_types,
editGoods_types,
} from "../../api/rankingData";
export default {
data() {
return {
id: "", //id
tableData: [],
multipleSelection: [],
dialogFormVisible: false,
dialogFormVisible1: false,
form: {
kindName: "", //
},
form1: {
kindName1: "", //
},
formLabelWidth: "120px",
formLabelWidth1: "120px",
newKind: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
mounted() {
this.getGoods_types();
},
methods: {
//
handleSelectionChange(val) {
this.multipleSelection = val;
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getGoods_types();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getGoods_types();
},
//
handAdd() {
this.form.kindName = "";
this.dialogFormVisible = true;
},
//
addSubmit() {
var string;
string = this.form.kindName.replace(/\s/g, ",").split(",");
console.log(string, "lkkkk");
Addgoods_types({
names: string,
}).then((res) => {
this.$message({
type: "success",
message: "添加成功",
});
//
handleSizeChange(val) {
//
this.per_page = val;
this.getGoods_types();
});
this.dialogFormVisible = false;
},
//
handEdit(id, item) {
this.id = id;
// console.log("item", item);
this.form1.kindName1 = item.name;
this.dialogFormVisible1 = true;
},
//
EditSubmit() {
editGoods_types(this.id, {
name: this.form1.kindName1,
}).then((res) => {
this.$message({
type: "success",
message: "编辑成功",
});
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getGoods_types();
});
this.dialogFormVisible1 = false;
},
//
handdel(id) {
this.$confirm("确定删除此条商品种类吗?", "确认删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
Delgoods_types(id).then((res) => {
this.getGoods_types();
});
},
//
handAdd() {
this.form.kindName = "";
this.dialogFormVisible = true;
},
//
addSubmit() {
var string;
string = this.form.kindName.replace(/\s/g, ",").split(",");
Addgoods_types({
names: string,
}).then((res) => {
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
message: "添加成功",
});
this.getGoods_types();
});
this.dialogFormVisible = false;
},
//
handEdit(id, item) {
this.id = id;
this.form1.kindName1 = item.name;
this.dialogFormVisible1 = true;
},
//
EditSubmit() {
editGoods_types(this.id, {
name: this.form1.kindName1,
}).then((res) => {
this.$message({
type: "success",
message: "编辑成功",
});
this.getGoods_types();
});
this.dialogFormVisible1 = false;
},
//
handdel(id) {
this.$confirm("确定删除此条商品种类吗?", "确认删除", {
confirmButtonText: "确定",
cancelButtonText: "取消",
type: "warning",
})
.then(() => {
Delgoods_types(id).then((res) => {
this.getGoods_types();
});
this.$message({
type: "success",
message: "删除成功!",
});
})
.catch(() => {
this.$message({
type: "info",
message: "已取消删除",
});
});
},
//
getGoods_types() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
goods_types(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
//
getGoods_types() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
goods_types(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
};
};
</script>
<style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>

View File

@ -1,31 +0,0 @@
<!--
* @Description:
* @Author: czw (725551805@qq.com)
* @Date: 2022-04-12 15:15:08
* @LastEditors: czw (725551805@qq.com)
* @LastEditTime: 2022-04-12 15:16:41
* @FilePath: /glxt/src/views/home/home/cesi.vue
-->
<template>
<div></div>
</template>
<script>
export default {
data() {
return {};
},
created() {},
mounted() {},
methods: {
//
preventRepeatClick() {
this.isDisabled = true;
setTimeout(() => {
this.isDisabled = false;
}, 1000);
},
},
};
</script>

View File

@ -1,216 +0,0 @@
<!--
* @Description:头像上传组件
* @Author: czw (725551805@qq.com)
* @Date: 2022-03-03 18:50:30
* @LastEditors: czw (725551805@qq.com)
* @LastEditTime: 2022-03-14 09:14:24
* @FilePath: /glxt/src/views/home/home/index.vue
-->
<template>
<div>
<el-upload
name="image"
:action="uploadAction"
:headers="uploadHeaders"
:on-preview="handleChange"
:on-remove="beforeRemove"
:on-success="good"
:file-list="img"
:limit="number"
:before-upload="handleBeforeUpload"
:on-change="handleEditChange"
accept=".png,.jpg"
list-type="picture-card"
:class="hideUploadEdit ? 'hide' : ''"
:show-file-list="true"
>
<i class="el-icon-plus"></i>
</el-upload>
<div class="demo-image__preview" v-if="imageUrl">
<el-image
class="hidden__el-image"
ref="elImage"
:src="imageUrl"
:preview-src-list="previewSrcList"
>
</el-image>
</div>
{{ list }}
</div>
</template>
<script>
import { getToken } from "@/util/auth";
export default {
name: "", //
components: {}, //
props: {
//
number: {
type: Number,
default: 1,
},
file: {
type: Array,
default: () => [],
},
}, //
data() {
return {
hideUploadEdit: false, //
url: "/qiniuupload", //
imageUrl: "", //
previewSrcList: [], //
list: [], //
img: [], //
};
},
computed: {
// 
uploadAction() {
return "https://dev.zonmind.com/home" + this.url;
},
// 
uploadHeaders() {
return {
authorization: "Bearer" + getToken(),
};
},
}, // data
watch: {
file: {
handler(val) {
if (val) {
// console.log(val, "ppp");
var imges = [];
val.forEach((element) => {
imges = element.url.split(",");
this.list = imges;
});
imges.forEach((element) => {
this.img.push({ url: this.computedGetPictureSrc(element) });
});
const previewSrcList = imges.map((ele) => {
return this.computedGetPictureSrc(ele);
});
this.previewSrcList = previewSrcList;
if (val.length === this.number) {
this.hideUploadEdit = true;
}
}
},
deep: true,
immediate: true,
},
}, // data
created() {}, // -(访this)
mounted() {}, // -(访DOM)
methods: {
computedGetPictureSrc(src) {
return "https://devcdn.zonmind.com" + src;
},
/**
* @author: czw (725551805@qq.com)
* @description: 判断显示图片上传限制隐藏
* @param {*} file
* @param {*} fileList
* @return {*}
* @Date: 2022-03-03 21:16:54
*/
handleEditChange(file, fileList) {
if (fileList.length === this.number) {
this.hideUploadEdit = true;
}
},
/**
* @author: czw (725551805@qq.com)
* @description: 上传成功
* @param {*}
* @return {*}
* @Date: 2022-03-03 19:59:45
*/
good(file, fileList) {
this.previewSrcList.push(fileList.url);
file.data.forEach((element) => {
this.list.push(element.url);
});
this.$emit("urlimg", this.list);
},
/**
* @author: czw (725551805@qq.com)
* @description: 点击放大
* @param {*}
* @return {*}
* @Date: 2022-03-03 18:59:28
*/
handleChange(file) {
this.imageUrl = file.url;
this.$nextTick(() => {
this.$refs.elImage.clickHandler();
});
},
/**
* @author: czw (725551805@qq.com)
* @description:删除
* @param {*}
* @return {*}
* @Date: 2022-03-03 18:59:40
*/
beforeRemove(file, fileList) {
if (fileList.length === this.number) {
this.hideUploadEdit = true;
} else {
this.hideUploadEdit = false;
}
if (file.response) {
file.response.data.forEach((element) => {
for (var i = 0; i < this.list.length; i++) {
if (element.url === this.list[i]) {
this.list.splice(i, 1);
}
}
});
} else {
console.log(file, "iiii");
for (var i = 0; i < this.list.length; i++) {
if (file.url === this.computedGetPictureSrc(this.list[i])) {
this.list.splice(i, 1);
}
}
}
},
/**
* @author: czw (725551805@qq.com)
* @description:自动删除
* @param {*}
* @return {*}
* @Date: 2022-03-03 19:53:25
*/
handleBeforeUpload(file) {
const isLt2M = file.size / 1024 / 1024 < 2;
if (!isLt2M) {
this.$message.error("上传头像图片大小不能超过 2MB!");
return false;
}
},
}, //
};
</script>
<style lang="scss">
.demo-image__preview {
height: 0;
}
.hidden__el-image {
width: 0;
height: 0;
::v-deep .el-image__preview {
display: none;
}
}
.hide .el-upload--picture-card {
display: none;
}
</style>

View File

@ -3,13 +3,8 @@
<el-container>
<el-container>
<el-aside :class="show ? 'width' : 'width1'">
<el-menu
router
background-color="#282c34"
text-color="#fff"
:default-active="$route.path"
:default-openeds="openeds"
>
<el-menu router background-color="#282c34" text-color="#fff" :default-active="$route.path"
:default-openeds="openeds">
<div v-for="item in menu" :key="item.id">
<el-menu-item :index="item.code" v-if="!item.children">
<span>{{ item.name }}</span>
@ -18,12 +13,8 @@
<template slot="title">
<span>{{ item.name }}</span>
</template>
<el-menu-item
:index="items.code"
:key="items.id"
v-for="items in item.children"
>{{ items.name }}</el-menu-item
>
<el-menu-item :index="items.code" :key="items.id" v-for="items in item.children">{{ items.name }}
</el-menu-item>
</el-submenu>
</div>
</el-menu>
@ -39,11 +30,7 @@
</div>
<div class="right">
<el-breadcrumb separator-class="el-icon-arrow-right">
<el-breadcrumb-item
v-for="(item, index) in titie"
:key="index"
>{{ item.name }}</el-breadcrumb-item
>
<el-breadcrumb-item v-for="(item, index) in titie" :key="index">{{ item.name }}</el-breadcrumb-item>
</el-breadcrumb>
</div>
</li>
@ -62,289 +49,317 @@
</div>
</template>
<script>
import { removeToken } from "@/util/auth";
import { getMenu } from "../api/menu.js";
export default {
mounted() {
getMenu().then((res) => {
this.menu = res.data.data;
console.log(this.menu);
});
},
data() {
return {
menu: [], //
show: true, //
levelData: [], // table
titie: [], // 线
head: "", // name
onindex: 0, //
openeds: ["GOODS_MANAGE"],
};
},
watch: {
// table
$route: {
handler: function (val) {
// console.log("0.0", val);
this.titie = val.matched;
this.head = val.name;
this.levelData.push({ name: val.name, path: val.path });
const newArr = [];
const obj = {};
for (var i = 0; i < this.levelData.length; i++) {
if (!obj[this.levelData[i].name]) {
newArr.push(this.levelData[i]);
obj[this.levelData[i].name] = true;
import { removeToken } from "@/util/auth";
import { getMenu } from "../api/menu.js";
export default {
mounted() {
getMenu().then((res) => {
this.menu = res.data.data;
});
},
data() {
return {
menu: [], //
show: true, //
levelData: [], // table
titie: [], // 线
head: "", // name
onindex: 0, //
openeds: ["GOODS_MANAGE"],
};
},
watch: {
// table
$route: {
handler: function (val) {
this.titie = val.matched;
this.head = val.name;
this.levelData.push({ name: val.name, path: val.path });
const newArr = [];
const obj = {};
for (var i = 0; i < this.levelData.length; i++) {
if (!obj[this.levelData[i].name]) {
newArr.push(this.levelData[i]);
obj[this.levelData[i].name] = true;
}
}
}
this.levelData = newArr;
// console.log("table", this.levelData);
this.levelData = newArr;
},
deep: true,
immediate: true,
},
deep: true,
immediate: true,
},
},
methods: {
/**
* @author: czw (725551805@qq.com)
* @description: 滚动条下一个
* @param {*}
* @return {*}
* @Date: 2022-03-02 19:50:50
*/
next() {
this.hanletop();
},
/**
* @author: czw (725551805@qq.com)
* @description: 滚动最底部
* @param {*}
* @return {*}
* @Date: 2022-03-02 19:51:03
*/
hanletop() {
document.getElementById("bottom").scrollIntoView({ behavior: "smooth" });
},
/**
* @author: czw (725551805@qq.com)
* @description: 滚动最顶部
* @param {*}
* @return {*}
* @Date: 2022-03-02 19:51:07
*/
hanlebottom() {
document.getElementById("top").scrollIntoView({ behavior: "smooth" });
},
/**
* @author: czw (725551805@qq.com)
* @description: 退出登录
* @param {*}
* @return {*}
* @Date: 2022-03-02 09:41:37
*/
hanleLogout() {
removeToken();
this.$router.push({ path: "/Login" });
},
/**
* @author: czw (725551805@qq.com)
* @description: table页跳转
* @param {*}
* @return {*}
* @Date: 2022-03-01 22:27:27
*/
handlerclick(e) {
if (this.$route.path !== e) {
this.$router.push({ path: e });
}
},
/**
* @author: czw (725551805@qq.com)
* @description: 导航栏折叠
* @param {*}
* @return {*}
* @Date: 2022-03-01 22:25:47
*/
add() {
this.show = !this.show;
},
/**
* @author: czw (725551805@qq.com)
* @description: 删除
* @param {*}
* @return {*}
* @Date: 2022-03-01 16:53:49
*/
hanblDelete(index, titie) {
var list = this.levelData[index].name;
this.onindex = index;
this.levelData.splice(this.onindex, 1);
if (titie === this.head) {
var item;
var name;
for (let i = 0; i < this.levelData.length; i++) {
item = this.levelData[i].path;
name = this.levelData[i].name;
methods: {
/**
* @author: czw (725551805@qq.com)
* @description: 滚动条下一个
* @param {*}
* @return {*}
* @Date: 2022-03-02 19:50:50
*/
next() {
this.hanletop();
},
/**
* @author: czw (725551805@qq.com)
* @description: 滚动最底部
* @param {*}
* @return {*}
* @Date: 2022-03-02 19:51:03
*/
hanletop() {
document.getElementById("bottom").scrollIntoView({ behavior: "smooth" });
},
/**
* @author: czw (725551805@qq.com)
* @description: 滚动最顶部
* @param {*}
* @return {*}
* @Date: 2022-03-02 19:51:07
*/
hanlebottom() {
document.getElementById("top").scrollIntoView({ behavior: "smooth" });
},
/**
* @author: czw (725551805@qq.com)
* @description: 退出登录
* @param {*}
* @return {*}
* @Date: 2022-03-02 09:41:37
*/
hanleLogout() {
removeToken();
this.$router.push({ path: "/Login" });
},
/**
* @author: czw (725551805@qq.com)
* @description: table页跳转
* @param {*}
* @return {*}
* @Date: 2022-03-01 22:27:27
*/
handlerclick(e) {
if (this.$route.path !== e) {
this.$router.push({ path: e });
}
if (this.levelData.length) {
if (name !== list) {
this.$router.push({ path: item });
},
/**
* @author: czw (725551805@qq.com)
* @description: 导航栏折叠
* @param {*}
* @return {*}
* @Date: 2022-03-01 22:25:47
*/
add() {
this.show = !this.show;
},
/**
* @author: czw (725551805@qq.com)
* @description: 删除
* @param {*}
* @return {*}
* @Date: 2022-03-01 16:53:49
*/
hanblDelete(index, titie) {
var list = this.levelData[index].name;
this.onindex = index;
this.levelData.splice(this.onindex, 1);
if (titie === this.head) {
var item;
var name;
for (let i = 0; i < this.levelData.length; i++) {
item = this.levelData[i].path;
name = this.levelData[i].name;
}
if (this.levelData.length) {
if (name !== list) {
this.$router.push({ path: item });
}
}
}
}
},
},
},
};
};
</script>
<style scoped lang="scss">
.table {
background-color: #fff;
ul {
li {
padding: 20px 10px;
.Navigation {
display: flex;
span {
padding: 5px 30px;
border: 1px solid #dcdfe6;
font-size: 14px;
font-weight: 500;
color: #303133;
border-radius: 4px;
cursor: pointer;
margin-right: 10px;
}
.tab {
margin-right: 10px;
flex-shrink: 0;
}
.table {
background-color: #fff;
.red {
color: #5470c6;
border: 1px solid #5470c6;
}
.closure {
display: inline-block;
text-align: center;
cursor: pointer;
width: 15px;
height: 15px;
line-height: 15px;
background-color: #ddd;
color: #000;
border-radius: 50%;
font-size: 12px;
}
.red_1 {
background-color: #5470c6;
color: #fff;
ul {
li {
padding: 20px 10px;
.Navigation {
display: flex;
span {
padding: 5px 30px;
border: 1px solid #dcdfe6;
font-size: 14px;
font-weight: 500;
color: #303133;
border-radius: 4px;
cursor: pointer;
margin-right: 10px;
}
.tab {
margin-right: 10px;
flex-shrink: 0;
}
.red {
color: #5470c6;
border: 1px solid #5470c6;
}
.closure {
display: inline-block;
text-align: center;
cursor: pointer;
width: 15px;
height: 15px;
line-height: 15px;
background-color: #ddd;
color: #000;
border-radius: 50%;
font-size: 12px;
}
.red_1 {
background-color: #5470c6;
color: #fff;
}
}
}
}
li:nth-child(2) {
overflow-x: auto;
}
display: flex;
}
}
.width {
transition: all 0.3s;
opacity: 0;
width: 0px !important;
}
.width1 {
transition: all 0.3s;
opacity: 1;
width: 200px !important;
}
.el-container {
height: 100vh;
}
.el-header {
background-color: #b3c0d1;
color: #333;
text-align: center;
}
.el-aside {
background-color: #d3dce6;
color: #333;
text-align: center;
overflow-x: hidden;
}
.el-aside::-webkit-scrollbar {
width: 8px; /*对垂直流动条有效*/
}
.el-aside::-webkit-scrollbar-thumb {
background-color: rgba(144, 147, 153, 0.3);
border-radius: 20px;
}
.el-main {
background-color: #f0f2f5;
color: #333;
padding: 0 0 !important;
}
.el-main::-webkit-scrollbar {
width: 10px; /*对垂直流动条有效*/
}
.el-main::-webkit-scrollbar-thumb {
background-color: rgba(144, 147, 153, 0.3);
}
.box-card {
background-color: #fff;
min-height: calc(100vh - 200px);
margin: 10px;
padding: 20px;
}
.add {
cursor: pointer;
font-size: 25px;
color: #606266;
}
.head {
padding: 10px;
background-color: #fff;
border-bottom: 1px solid #f6f6f6;
box-shadow: 0 1px 4px rgb(0 21 41 / 8%);
ul {
display: flex;
justify-content: space-between;
li {
li:nth-child(2) {
overflow-x: auto;
}
display: flex;
align-items: center;
.right {
margin-left: 20px;
}
.token {
cursor: pointer;
}
}
.width {
transition: all 0.3s;
opacity: 0;
width: 0px !important;
}
.width1 {
transition: all 0.3s;
opacity: 1;
width: 200px !important;
}
.el-container {
height: 100vh;
}
.el-header {
background-color: #b3c0d1;
color: #333;
text-align: center;
}
.el-aside {
background-color: #d3dce6;
color: #333;
text-align: center;
overflow-x: hidden;
}
.el-aside::-webkit-scrollbar {
width: 8px;
/*对垂直流动条有效*/
}
.el-aside::-webkit-scrollbar-thumb {
background-color: rgba(144, 147, 153, 0.3);
border-radius: 20px;
}
.el-main {
background-color: #f0f2f5;
color: #333;
padding: 0 0 !important;
}
.el-main::-webkit-scrollbar {
width: 10px;
/*对垂直流动条有效*/
}
.el-main::-webkit-scrollbar-thumb {
background-color: rgba(144, 147, 153, 0.3);
}
.box-card {
background-color: #fff;
min-height: calc(100vh - 200px);
margin: 10px;
padding: 20px;
}
.add {
cursor: pointer;
font-size: 25px;
color: #606266;
}
.head {
padding: 10px;
background-color: #fff;
border-bottom: 1px solid #f6f6f6;
box-shadow: 0 1px 4px rgb(0 21 41 / 8%);
ul {
display: flex;
justify-content: space-between;
li {
display: flex;
align-items: center;
.right {
margin-left: 20px;
}
.token {
cursor: pointer;
}
}
}
}
}
.el-aside {
background: #282c34;
box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
}
::v-deep .el-menu {
border: none;
}
// .el-menu-item {
// margin: 0 20px 10px;
// }
.el-menu-item:hover {
outline: 0 !important;
background: #5470c6 !important;
border-radius: 5px !important;
}
.el-menu-item.is-active {
color: #fff !important;
background: #5470c6 !important;
border-radius: 5px !important;
}
.el-menu-item-group__title {
padding: 0 0 !important;
}
</style>
.el-aside {
background: #282c34;
box-shadow: 2px 0 6px rgb(0 21 41 / 35%);
}
::v-deep .el-menu {
border: none;
}
// .el-menu-item {
// margin: 0 20px 10px;
// }
.el-menu-item:hover {
outline: 0 !important;
background: #5470c6 !important;
border-radius: 5px !important;
}
.el-menu-item.is-active {
color: #fff !important;
background: #5470c6 !important;
border-radius: 5px !important;
}
.el-menu-item-group__title {
padding: 0 0 !important;
}
</style>

View File

@ -6,35 +6,19 @@
<el-form ref="form" :inline="true" :model="form">
<el-form-item label="查询类别:">
<el-select v-model="form.targetField" placeholder="全部">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="操作用户">
<el-select v-model="form.userId" placeholder="输入操作用户">
<el-option
v-for="item in options1"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-option v-for="item in options1" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="操作时间:">
<el-date-picker
v-model="value1"
type="datetimerange"
range-separator="-"
start-placeholder="起"
end-placeholder="止"
value-format="yyyy-MM-dd HH:mm:ss"
>
<el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder=""
end-placeholder="止" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item>
@ -63,148 +47,139 @@
<!-- 分页功能 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-sizes="[15, 50, 100]"
:page-size="per_page"
layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total"
>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import { userList } from "../../api/user";
import { recordList } from "../../api/record";
export default {
data() {
return {
options: [
{
value: "cost",
label: "成本",
import { userList } from "../../api/user";
import { recordList } from "../../api/record";
export default {
data() {
return {
options: [
{
value: "cost",
label: "成本",
},
{
value: "stock",
label: "库存",
},
{
value: "inventory",
label: "库存盘点",
},
{
value: "status",
label: "状态",
},
{
value: "set",
label: "设置",
},
], //
options1: [], //
form: {
targetField: "",
userId: "",
},
{
value: "stock",
label: "库存",
},
{
value: "inventory",
label: "库存盘点",
},
{
value: "status",
label: "状态",
},
{
value: "set",
label: "设置",
},
], //
options1: [], //
form: {
targetField: "",
userId: "",
value1: "", //
tableData: [], //
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
moudule: "goods",
};
},
methods: {
//
getList() {
let queryData = {
userId: this.form.userId,
target_field: this.form.targetField,
moudule: this.moudule,
target_id: this.$route.query.id,
startTime: this.value1[0],
endTime: this.value1[1],
page: this.current_page,
per_page: this.per_page,
};
recordList(queryData).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
value1: "", //
tableData: [], //
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
moudule: "goods",
};
},
methods: {
//
getList() {
let queryData = {
userId: this.form.userId,
target_field: this.form.targetField,
moudule: this.moudule,
target_id: this.$route.query.id,
startTime: this.value1[0],
endTime: this.value1[1],
page: this.current_page,
per_page: this.per_page,
};
recordList(queryData).then((res) => {
console.log(1111, res);
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.query();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.query();
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.query();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.query();
},
//
getUser() {
userList().then((res) => {
this.options1 = res.data.data;
console.log("我是用户", this.options1);
});
},
//
getUser() {
userList().then((res) => {
this.options1 = res.data.data;
});
},
//
query() {
console.log(this.form.userId, this.form.targetField);
let queryData = {
userId: this.form.userId,
target_field: this.form.targetField,
page: this.current_page,
per_page: this.per_page,
moudule: this.moudule,
target_id: this.$route.query.id,
startTime: this.value1[0],
endTime: this.value1[1],
};
//
query() {
let queryData = {
userId: this.form.userId,
target_field: this.form.targetField,
page: this.current_page,
per_page: this.per_page,
moudule: this.moudule,
target_id: this.$route.query.id,
startTime: this.value1[0],
endTime: this.value1[1],
};
//
const newObj = filterParams(queryData);
function filterParams(obj) {
const _newPar = {};
for (const key in obj) {
// 0
if (
(obj[key] === 0 || obj[key]) &&
obj[key].toString().replace(/(^\s*)|(\s*$)/g, "") !== ""
) {
//
_newPar[key] = obj[key];
//
const newObj = filterParams(queryData);
function filterParams(obj) {
const _newPar = {};
for (const key in obj) {
// 0
if (
(obj[key] === 0 || obj[key]) &&
obj[key].toString().replace(/(^\s*)|(\s*$)/g, "") !== ""
) {
//
_newPar[key] = obj[key];
}
}
//
return _newPar;
}
//
return _newPar;
}
recordList(newObj).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
recordList(newObj).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
},
},
mounted() {
this.getList();
this.getUser();
},
};
mounted() {
this.getList();
this.getUser();
},
};
</script>
<style>
.block {
margin-top: 30px;
}
</style>
.block {
margin-top: 30px;
}
</style>

View File

@ -6,35 +6,19 @@
<el-form ref="form" :inline="true" :model="form">
<el-form-item label="查询类别:">
<el-select v-model="form.targetField" placeholder="全部">
<el-option
v-for="item in options"
:key="item.value"
:label="item.label"
:value="item.value"
>
<el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="操作用户">
<el-select v-model="form.userId" placeholder="输入操作用户">
<el-option
v-for="item in options1"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-option v-for="item in options1" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="操作时间:">
<el-date-picker
v-model="value1"
type="datetimerange"
range-separator="-"
start-placeholder="起"
end-placeholder="止"
value-format="yyyy-MM-dd HH:mm:ss"
>
<el-date-picker v-model="value1" type="datetimerange" range-separator="-" start-placeholder=""
end-placeholder="止" value-format="yyyy-MM-dd HH:mm:ss">
</el-date-picker>
</el-form-item>
<el-form-item>
@ -58,142 +42,133 @@
<!-- 分页功能 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-sizes="[15, 50, 100]"
:page-size="per_page"
layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total"
>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import { recordList } from "../../api/record";
import { userList } from "../../api/user";
export default {
data() {
return {
options: [
{
value: "cost",
label: "成本",
import { recordList } from "../../api/record";
import { userList } from "../../api/user";
export default {
data() {
return {
options: [
{
value: "cost",
label: "成本",
},
{
value: "stock",
label: "库存",
},
{
value: "inventory",
label: "库存盘点",
},
{
value: "status",
label: "状态",
},
{
value: "set",
label: "设置",
},
], //
options1: [], //
form: {
targetField: "",
userId: "",
},
{
value: "stock",
label: "库存",
},
{
value: "inventory",
label: "库存盘点",
},
{
value: "status",
label: "状态",
},
{
value: "set",
label: "设置",
},
], //
options1: [], //
form: {
targetField: "",
userId: "",
value1: "", //
tableData: [], //
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
methods: {
//
getList() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
recordList(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
value1: "", //
tableData: [], //
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
methods: {
//
getList() {
// let token = localStorage.getItem("token");
let page = {
page: this.current_page,
per_page: this.per_page,
};
recordList(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
//
getUser() {
userList().then((res) => {
this.options1 = res.data.data;
});
},
//
getUser() {
userList().then((res) => {
this.options1 = res.data.data;
console.log("我是用户", this.options1);
});
},
//
query() {
let queryData = {
userId: this.form.userId,
target_field: this.form.targetField,
page: this.current_page,
per_page: this.per_page,
moudule: this.moudule,
target_id: this.$route.query.id,
startTime: this.value1[0],
endTime: this.value1[1],
};
//
query() {
console.log(this.form.userId, this.form.targetField);
let queryData = {
userId: this.form.userId,
target_field: this.form.targetField,
page: this.current_page,
per_page: this.per_page,
moudule: this.moudule,
target_id: this.$route.query.id,
startTime: this.value1[0],
endTime: this.value1[1],
};
//
const newObj = filterParams(queryData);
function filterParams(obj) {
const _newPar = {};
for (const key in obj) {
// 0
if (
(obj[key] === 0 || obj[key]) &&
obj[key].toString().replace(/(^\s*)|(\s*$)/g, "") !== ""
) {
//
_newPar[key] = obj[key];
//
const newObj = filterParams(queryData);
function filterParams(obj) {
const _newPar = {};
for (const key in obj) {
// 0
if (
(obj[key] === 0 || obj[key]) &&
obj[key].toString().replace(/(^\s*)|(\s*$)/g, "") !== ""
) {
//
_newPar[key] = obj[key];
}
}
//
return _newPar;
}
//
return _newPar;
}
recordList(newObj).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
recordList(newObj).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.query();
//
handleSizeChange(val) {
//
this.per_page = val;
this.query();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.query();
},
},
handleCurrentChange(val) {
//
this.current_page = val;
this.query();
mounted() {
this.getList();
this.getUser();
},
},
mounted() {
this.getList();
this.getUser();
},
};
};
</script>
<style>
.block {
margin-top: 30px;
}
</style>
.block {
margin-top: 30px;
}
</style>

View File

@ -13,33 +13,24 @@
<el-table-column prop="plat_id" label="所属平台"></el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
<el-button type="danger" v-if="scope.row.status === '未授权'"
><a
:href="scope.row.authUrl"
target="_blank"
rel="noopener noreferrer"
>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a
></el-button
>
<el-button type="danger" v-if="scope.row.status === '未授权'"><a :href="scope.row.authUrl" target="_blank"
rel="noopener noreferrer">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</a></el-button>
<div v-if="scope.row.status === '已授权'">
<el-button type="success" :disabled="true">{{
scope.row.status
}}</el-button>
}}</el-button>
<el-button @click="download(scope.row)">下载商品</el-button>
</div>
<div v-if="scope.row.status === '重新授权'">
<el-button type="danger" target="_blank"
><a :href="scope.row.authUrl" rel="noopener noreferrer"
>重新授权</a
></el-button
>
<el-button type="danger" target="_blank"><a :href="scope.row.authUrl" rel="noopener noreferrer">重新授权</a>
</el-button>
<el-button @click="download(scope.row)">下载商品</el-button>
</div>
<div v-if="scope.row.status === '无需授权'">
<el-button type="success" :disabled="true">{{
scope.row.status
}}</el-button>
}}</el-button>
<el-button @click="download(scope.row)">下载商品</el-button>
</div>
</template>
@ -48,23 +39,14 @@
</div>
<!-- 新增店铺 -->
<el-dialog
title="新增店铺"
:visible.sync="dialogFormVisible"
:close-on-click-modal="false"
>
<el-dialog title="新增店铺" :visible.sync="dialogFormVisible" :close-on-click-modal="false">
<el-form :model="form">
<el-form-item label="店铺名称">
<el-input v-model="form.name" placeholder="输入店铺名称"></el-input>
</el-form-item>
<el-form-item label="店铺平台">
<el-select v-model="form.plat_id" placeholder="输入店铺平台">
<el-option
v-for="(item, index) in storeId"
:key="index"
:label="item"
:value="index"
>
<el-option v-for="(item, index) in storeId" :key="index" :label="item" :value="index">
</el-option>
</el-select>
</el-form-item>
@ -77,134 +59,130 @@
<!-- 分页功能 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-sizes="[15, 50, 100]"
:page-size="per_page"
layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total"
>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import { shopListId, shopAdd, storeList, downloadGoods } from "../../api/shop";
export default {
data() {
return {
dialogFormVisible: false,
form: {
name: "",
plat_id: "",
},
storeId: [], // id
tableData: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
},
mounted() {
//
this.getStoreList();
},
methods: {
//
handAdd() {
this.form.name = "";
this.form.plat_id = "";
this.dialogFormVisible = true;
this.getshop();
},
//
addSubmit() {
const datas = this.form;
shopAdd(datas).then((res) => {
if (res.status == 200) {
this.$message({
type: "success",
message: "添加成功",
});
}
this.getStoreList();
});
this.dialogFormVisible = false;
},
//
getStoreList() {
let page = {
page: this.current_page,
per_page: this.per_page,
import { shopListId, shopAdd, storeList, downloadGoods } from "../../api/shop";
export default {
data() {
return {
dialogFormVisible: false,
form: {
name: "",
plat_id: "",
},
storeId: [], // id
tableData: [],
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
};
storeList(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
console.log(111111, this.tableData);
});
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getStoreList();
},
handleCurrentChange(val) {
//
this.current_page = val;
mounted() {
//
this.getStoreList();
},
methods: {
//
handAdd() {
this.form.name = "";
this.form.plat_id = "";
this.dialogFormVisible = true;
this.getshop();
},
//
getshop() {
shopListId().then((res) => {
this.storeId = res.data.data;
});
},
//
addSubmit() {
const datas = this.form;
shopAdd(datas).then((res) => {
if (res.status == 200) {
this.$message({
type: "success",
message: "添加成功",
});
}
this.getStoreList();
});
this.dialogFormVisible = false;
},
//
download(row) {
// console.log(row);
downloadGoods(row.id).then((res) => {
console.log(res);
});
//
getStoreList() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
storeList(page).then((res) => {
this.tableData = res.data.data;
this.Paginationdata = res.data.meta;
});
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getStoreList();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getStoreList();
},
//
getshop() {
shopListId().then((res) => {
this.storeId = res.data.data;
});
},
//
download(row) {
downloadGoods(row.id).then((res) => {
});
},
},
},
};
};
</script>
<style lang="scss" scoped>
a {
text-decoration: none;
color: white;
}
a {
text-decoration: none;
color: white;
}
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>

View File

@ -1,19 +0,0 @@
<template>
<div>权限管理已废弃</div>
</template>
<script>
export default {
name: "GlxtAuthority",
data() {
return {};
},
mounted() {},
methods: {},
};
</script>
<style lang="scss" scoped></style>

View File

@ -7,21 +7,14 @@
<!-- 点击新增弹出表单 -->
<div class="from">
<el-dialog
title="新增角色"
:visible.sync="dialogVisible2"
width="30%"
:close-on-click-modal="false"
>
<el-dialog title="新增角色" :visible.sync="dialogVisible2" width="30%" :close-on-click-modal="false">
<div>
<el-form label-width="80px">
<el-form-item label="角色名称">
<el-input v-model="newrole"></el-input>
</el-form-item>
<div class="from-btn">
<el-button type="danger" @click="dialogVisible2 = false"
>取消</el-button
>
<el-button type="danger" @click="dialogVisible2 = false">取消</el-button>
<el-button @click="onSubmit">确认</el-button>
</div>
</el-form>
@ -36,9 +29,7 @@
<el-table-column prop="name" label="角色名称"> </el-table-column>
<el-table-column label="权限内容">
<template slot-scope="scope">
<span v-for="item in scope.row.permissions" :key="item.id"
>{{ item.name }}&nbsp;&nbsp;</span
>
<span v-for="item in scope.row.permissions" :key="item.id">{{ item.name }}&nbsp;</span>
</template>
</el-table-column>
<el-table-column label="操作">
@ -50,24 +41,9 @@
</div>
<!-- 点击编辑弹出权限框 -->
<el-dialog
title="编辑权限"
:visible.sync="dialogVisible"
width="30%"
:close-on-click-modal="false"
>
<el-tree
v-if="isShowtree"
:data="Role_Permission"
show-checkbox
:default-expand-all="false"
node-key="id"
ref="tree"
highlight-current
:props="defaultProps"
:default-checked-keys="chekedKeys"
v-model="permissionIds"
>
<el-dialog title="编辑权限" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
<el-tree v-if="isShowtree" :data="Role_Permission" show-checkbox :default-expand-all="false" node-key="id"
ref="tree" highlight-current :props="defaultProps" :default-checked-keys="chekedKeys" v-model="permissionIds">
</el-tree>
<span slot="footer" class="dialog-footer">
<el-button @click="cancel()"> </el-button>
@ -78,134 +54,136 @@
</template>
<script>
import {
roleList,
roleAdd,
jurisdiction,
jurisdictionEdit,
} from "../../api/role.js";
export default {
data() {
return {
id: "", //id
tableList: [], //
rolePermissions: [],
newrole: "", //input
dialogVisible: false, //
dialogVisible2: false, //
permissionIds: [], //ID
allpermissionIds: {}, //id
Role_Permission: [], //
defaultProps: {
children: "children",
label: "name",
import {
roleList,
roleAdd,
jurisdiction,
jurisdictionEdit,
} from "../../api/role.js";
export default {
data() {
return {
id: "", //id
tableList: [], //
rolePermissions: [],
newrole: "", //input
dialogVisible: false, //
dialogVisible2: false, //
permissionIds: [], //ID
allpermissionIds: {}, //id
Role_Permission: [], //
defaultProps: {
children: "children",
label: "name",
},
isShowtree: false,
chekedKeys: [],
};
},
mounted() {
this.getroleList();
this.getJurisdiction();
},
methods: {
//
getroleList() {
roleList().then((res) => {
this.tableList = res.data.data;
});
},
isShowtree: false,
chekedKeys: [],
};
},
mounted() {
this.getroleList();
this.getJurisdiction();
},
methods: {
//
getroleList() {
roleList().then((res) => {
this.tableList = res.data.data;
console.log("我是角色权限", this.tableList);
});
},
//
getJurisdiction() {
jurisdiction().then((res) => {
this.Role_Permission = res.data.data;
});
},
//
getJurisdiction() {
jurisdiction().then((res) => {
this.Role_Permission = res.data.data;
console.log("我是所有权限", this.Role_Permission);
});
},
//
onSubmit() {
let roleName = {
name: this.newrole,
};
roleAdd(roleName).then((res) => {
this.dialogVisible2 = false;
this.getroleList();
if (res.status == 201) {
this.$message({
message: "角色添加成功!",
type: "success",
});
}
});
},
//
onEdit(row) {
this.id = row.id;
console.log(row);
let arr = row.permissions.map((item) => {
return item.id;
});
this.chekedKeys = arr;
this.dialogVisible = true;
this.isShowtree = true;
},
//
cancel() {
this.dialogVisible = false;
this.isShowtree = false;
},
//
getCheckedKeys() {
let id = this.id; //ID
this.permissionIds = this.$refs.tree.getCheckedKeys(); //ID
this.allpermissionIds = {
permissionIds: this.permissionIds,
};
jurisdictionEdit(id, this.allpermissionIds).then((res) => {
if (res.status === 200) {
this.dialogVisible = false;
//
onSubmit() {
let roleName = {
name: this.newrole,
};
roleAdd(roleName).then((res) => {
this.dialogVisible2 = false;
this.getroleList();
this.$message({
message: "权限修改成功!",
type: "success",
});
}
});
if (res.status == 201) {
this.$message({
message: "角色添加成功!",
type: "success",
});
}
});
},
//
onEdit(row) {
this.id = row.id;
let arr = row.permissions.map((item) => {
return item.id;
});
this.chekedKeys = arr;
this.dialogVisible = true;
this.isShowtree = true;
},
//
cancel() {
this.dialogVisible = false;
this.isShowtree = false;
},
//
getCheckedKeys() {
let id = this.id; //ID
this.permissionIds = this.$refs.tree.getCheckedKeys(); //ID
this.allpermissionIds = {
permissionIds: this.permissionIds,
};
jurisdictionEdit(id, this.allpermissionIds).then((res) => {
if (res.status === 200) {
this.dialogVisible = false;
this.getroleList();
this.$message({
message: "权限修改成功!",
type: "success",
});
}
});
},
},
},
};
};
</script>
<style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.conent {
width: 100%;
min-height: calc(100vh - 200px);
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
</style>
.table {
margin-top: 20px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
</style>

View File

@ -7,12 +7,7 @@
<!-- 点击新增弹出表单 -->
<div class="from">
<el-dialog
title="新增用户"
:visible.sync="dialogVisible"
width="30%"
:close-on-click-modal="false"
>
<el-dialog title="新增用户" :visible.sync="dialogVisible" width="30%" :close-on-click-modal="false">
<div>
<el-form label-width="80px">
<el-form-item label="姓名">
@ -25,23 +20,15 @@
<el-input v-model="from.password_confirmation"></el-input>
</el-form-item>
<el-form-item label="角色">
<!-- <el-input v-model="from.role_name"></el-input> -->
<template>
<el-select v-model="value" placeholder="请选择">
<el-option
v-for="item in roleOptions"
:key="item.value"
:label="item.name"
:value="item.name"
>
<el-option v-for="item in roleOptions" :key="item.value" :label="item.name" :value="item.name">
</el-option>
</el-select>
</template>
</el-form-item>
<div class="from-btn">
<el-button type="danger" @click="dialogVisible = false"
>取消</el-button
>
<el-button type="danger" @click="dialogVisible = false">取消</el-button>
<el-button @click="onSubmit">确认</el-button>
</div>
</el-form>
@ -51,12 +38,7 @@
<!-- 点击编辑弹出表单信息 -->
<div class="edit_from">
<el-dialog
title="编辑"
:visible.sync="editVisible"
width="30%"
:close-on-click-modal="false"
>
<el-dialog title="编辑" :visible.sync="editVisible" width="30%" :close-on-click-modal="false">
<div>
<el-form label-width="80px">
<el-form-item label="ID">
@ -71,12 +53,7 @@
<el-form-item label="角色">
<template>
<el-select v-model="edit_from.role_name" placeholder="请选择">
<el-option
v-for="item in roleOptions"
:key="item.value"
:label="item.name"
:value="item.name"
>
<el-option v-for="item in roleOptions" :key="item.value" :label="item.name" :value="item.name">
</el-option>
</el-select>
</template>
@ -88,9 +65,7 @@
<el-input v-model="edit_from.password_confirmation"></el-input>
</el-form-item>
<div class="from-btn">
<el-button type="danger" @click="editVisible = false"
>取消</el-button
>
<el-button type="danger" @click="editVisible = false">取消</el-button>
<el-button @click="onEdit()">确认</el-button>
</div>
</el-form>
@ -107,7 +82,7 @@
<el-table-column label="角色">
<template slot-scope="scope">{{
scope.row.roles[0].name
}}</template>
}}</template>
</el-table-column>
<el-table-column label="操作">
<template slot-scope="scope">
@ -121,171 +96,167 @@
<!-- 分页功能 -->
<div class="block">
<el-pagination
@size-change="handleSizeChange"
@current-change="handleCurrentChange"
:current-page="current_page"
:page-sizes="[15, 50, 100]"
:page-size="per_page"
layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total"
>
<el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="current_page"
:page-sizes="[15, 50, 100]" :page-size="per_page" layout="total, sizes, prev, pager, next, jumper"
:total="Paginationdata.total">
</el-pagination>
</div>
</div>
</template>
<script>
import {
userList,
userAdd,
userEdit,
userConfirm,
roleList,
} from "../../api/user";
export default {
data() {
return {
id: "",
dialogVisible: false, //
editVisible: false, //
tableList: [], //
from: {
//
name: "",
password: "",
password_confirmation: "",
role_name: "",
},
edit_from: {
//
created_at: "",
deleted_at: null,
email: "",
import {
userList,
userAdd,
userEdit,
userConfirm,
roleList,
} from "../../api/user";
export default {
data() {
return {
id: "",
name: "",
password: "",
password_confirmation: "",
role_name: "",
},
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
roleOptions: [], //
value: "", //
};
},
mounted() {
this.getList(); //
this.getrole(); //
},
methods: {
//
getrole() {
roleList().then((res) => {
this.roleOptions = res.data.data;
console.log(this.roleOptions);
});
},
//
getList() {
let page = {
page: this.current_page,
per_page: this.per_page,
dialogVisible: false, //
editVisible: false, //
tableList: [], //
from: {
//
name: "",
password: "",
password_confirmation: "",
role_name: "",
},
edit_from: {
//
created_at: "",
deleted_at: null,
email: "",
id: "",
name: "",
password: "",
password_confirmation: "",
role_name: "",
},
Paginationdata: {}, //
current_page: 1, //
per_page: 15, //
roleOptions: [], //
value: "", //
};
userList(page).then((res) => {
this.tableList = res.data.data;
this.Paginationdata = res.data.meta;
});
},
//
onSubmit() {
this.from.role_name = this.value;
let from = this.from;
userAdd(from).then((res) => {
this.tableList = [...this.tableList, res.data.data];
this.dialogVisible = false;
this.getList();
this.from = {};
this.$message({
message: "账号添加成功!",
type: "success",
mounted() {
this.getList(); //
this.getrole(); //
},
methods: {
//
getrole() {
roleList().then((res) => {
this.roleOptions = res.data.data;
});
});
},
},
//
openEdit(e) {
this.editVisible = true;
let id = e.id;
this.id = e.id;
// id
userEdit(id).then((res) => {
this.edit_from = res.data.data;
console.log(this.edit_from);
});
},
//
getList() {
let page = {
page: this.current_page,
per_page: this.per_page,
};
userList(page).then((res) => {
this.tableList = res.data.data;
this.Paginationdata = res.data.meta;
});
},
//
onEdit() {
userConfirm(this.id, this.edit_from).then((res) => {
this.tableList = [...this.tableList, res.data.data];
//
onSubmit() {
this.from.role_name = this.value;
let from = this.from;
userAdd(from).then((res) => {
this.tableList = [...this.tableList, res.data.data];
this.dialogVisible = false;
this.getList();
this.from = {};
this.$message({
message: "账号添加成功!",
type: "success",
});
});
},
//
openEdit(e) {
this.editVisible = true;
let id = e.id;
this.id = e.id;
// id
userEdit(id).then((res) => {
this.edit_from = res.data.data;
});
},
//
onEdit() {
userConfirm(this.id, this.edit_from).then((res) => {
this.tableList = [...this.tableList, res.data.data];
this.editVisible = false;
this.getList();
this.$message({
message: "账号修改成功!",
type: "success",
});
});
this.editVisible = false;
this.getList();
this.$message({
message: "账号修改成功!",
type: "success",
});
});
this.editVisible = false;
},
},
//
handleSizeChange(val) {
//
this.per_page = val;
this.getList();
//
handleSizeChange(val) {
//
this.per_page = val;
this.getList();
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getList();
},
},
handleCurrentChange(val) {
//
this.current_page = val;
this.getList();
},
},
};
};
</script>
<style lang="scss" scoped>
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
.conent {
width: 100%;
min-height: calc(100vh - 200px);
position: relative;
}
.btn {
height: 104px;
border-radius: 5px;
display: flex;
align-items: center;
}
.el-button {
width: 114px;
height: 44px;
border-radius: 3px;
}
}
.table {
margin-top: 20px;
}
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
.table {
margin-top: 20px;
}
.block {
margin-top: 30px;
}
</style>
.from-btn {
display: flex;
justify-content: space-around;
align-content: center;
}
.block {
margin-top: 30px;
}
</style>

View File

@ -2,38 +2,17 @@
<div>
<el-card class="box-card">
<div class="goods" style="margin: 20px">
<div
class="add-item-info"
style="margin-bottom: 10px; margin-left: 52px"
>
<div class="add-item-info" style="margin-bottom: 10px; margin-left: 52px">
<div>
<div style="font-size: 14px">商品列表</div>
<el-select
v-model="lid"
placeholder="选择商品"
@change="onchange"
filterable
>
<el-option
v-for="item in goodschoose"
:key="item.id"
:label="item.title"
:value="item.id"
>
<el-select v-model="lid" placeholder="选择商品" @change="onchange" filterable>
<el-option v-for="item in goodschoose" :key="item.id" :label="item.title" :value="item.id">
</el-option>
</el-select>
</div>
<span style="font-size: 14px"
>商品图片
<el-upload
class="avatar-uploader"
action="#"
:limit="1"
:auto-upload="false"
:show-file-list="true"
list-type="picture-card"
:on-change="handleAvatarSuccess"
>
<span style="font-size: 14px">商品图片
<el-upload class="avatar-uploader" action="#" :limit="1" :auto-upload="false" :show-file-list="true"
list-type="picture-card" :on-change="handleAvatarSuccess">
<img v-if="imageUrl" :src="imageUrl" class="avatar" />
<i v-else class="el-icon-plus avatar-uploader-icon"></i>
</el-upload>
@ -44,54 +23,27 @@
<el-form ref="form" :inline="true" :model="form" v-if="goodsData != ''">
<div>
<el-form-item label="商品名称:">
<el-input
placeholder="商品名称"
v-model="goodsData.goods.title"
></el-input>
<el-input placeholder="商品名称" v-model="goodsData.goods.title"></el-input>
</el-form-item>
<el-form-item label="商品编码:">
<el-input
placeholder="商品编码"
v-model="goodsData.goods.goods_code"
></el-input>
<el-input placeholder="商品编码" v-model="goodsData.goods.goods_code"></el-input>
</el-form-item>
<el-form-item label="商品种类:">
<el-select
v-model="goodsData.goods.type_id"
placeholder="商品种类"
filterable
>
<el-option
v-for="item in cate"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-select v-model="goodsData.goods.type_id" placeholder="商品种类" filterable>
<el-option v-for="item in cate" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品品牌:">
<el-select
v-model="goodsData.goods.brand_id"
placeholder="商品品牌"
filterable
>
<el-option
v-for="item in brand"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-select v-model="goodsData.goods.brand_id" placeholder="商品品牌" filterable>
<el-option v-for="item in brand" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
</div>
<div>
<el-form-item label="商品规格:">
<el-input
placeholder="商品规格"
v-model="goodsData.title"
></el-input>
<el-input placeholder="商品规格" v-model="goodsData.title"></el-input>
</el-form-item>
<el-form-item label="规格编码:">
<el-input v-model="goodsData.sku_code" placeholder="商品编码">
@ -99,12 +51,7 @@
</el-form-item>
<el-form-item label="商品状态:">
<el-select v-model="goodsData.status">
<el-option
v-for="item in options"
:key="item.id"
:label="item.label"
:value="item.id"
>
<el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -131,84 +78,22 @@
<el-form ref="form" :inline="true" :model="form" v-if="goodsData == ''">
<div>
<el-form-item label="商品名称:">
<el-input
placeholder="商品名称"
v-model="form.title"
:disabled="true"
v-if="isShow"
></el-input>
<el-input
placeholder="商品名称"
v-model="form.title"
v-else
></el-input>
<el-input placeholder="商品名称" v-model="form.title" :disabled="true" v-if="isShow"></el-input>
<el-input placeholder="商品名称" v-model="form.title" v-else></el-input>
</el-form-item>
<el-form-item label="商品编码:">
<el-input
placeholder="商品编码"
v-model="form.goods_code"
:disabled="true"
v-if="isShow"
></el-input>
<el-input
placeholder="商品编码"
v-model="form.goods_code"
v-else
></el-input>
<el-input placeholder="商品编码" v-model="form.goods_code" :disabled="true" v-if="isShow"></el-input>
<el-input placeholder="商品编码" v-model="form.goods_code" v-else></el-input>
</el-form-item>
<el-form-item label="商品种类:">
<!-- <el-select
v-model="form.type_id"
placeholder="商品种类"
v-if="isShow"
>
<el-option
v-for="item in cate"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> -->
<el-select
v-model="form.type_id"
placeholder="商品种类"
filterable
>
<el-option
v-for="item in cate"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-select v-model="form.type_id" placeholder="商品种类" filterable>
<el-option v-for="item in cate" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
<el-form-item label="商品品牌:">
<!-- <el-select
v-model="form.brand_id"
placeholder="商品品牌1"
v-if="isShow"
>
<el-option
v-for="item in brand"
:key="item.id"
:label="item.name"
:value="item.id"
>
</el-option>
</el-select> -->
<el-select
v-model="form.brand_id"
placeholder="商品品牌"
filterable
>
<el-option
v-for="item in brand"
:key="item.id"
:label="item.name"
:value="item.id"
>
<el-select v-model="form.brand_id" placeholder="商品品牌" filterable>
<el-option v-for="item in brand" :key="item.id" :label="item.name" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -216,10 +101,7 @@
<div v-for="(item, i) in skus" :key="i">
<span style="margin-right: -15px">{{ i + 1 }}.</span>
<el-form-item label="商品规格:">
<el-input
placeholder="商品规格"
v-model="skus[i].title"
></el-input>
<el-input placeholder="商品规格" v-model="skus[i].title"></el-input>
</el-form-item>
<span class="addto" @click="handleAdd()">+</span>
<el-form-item label="规格编码:">
@ -228,12 +110,7 @@
</el-form-item>
<el-form-item label="商品状态:">
<el-select v-model="skus[i].reserve" placeholder="下架(默认)">
<el-option
v-for="item in options"
:key="item.id"
:label="item.label"
:value="item.id"
>
<el-option v-for="item in options" :key="item.id" :label="item.label" :value="item.id">
</el-option>
</el-select>
</el-form-item>
@ -246,9 +123,7 @@
<el-input v-model="skus[i].cost" placeholder="商品成本">
</el-input>
</el-form-item>
<el-button type="primary" @click="handleDelete(i)"
>删除</el-button
>
<el-button type="primary" @click="handleDelete(i)">删除</el-button>
</div>
</div>
<div class="btn">
@ -264,352 +139,334 @@
</template>
<script>
// import UploadTem from "../../../components/upload/index.vue";
import {
addGoods,
checkGoods,
goodsList,
updateGoods,
imgUpload,
} from "../../../api/goods.js";
import { goods_types, Brand_goods_types } from "../../../api/rankingData.js";
export default {
// components: {
// UploadTem,
// },
data() {
return {
imgs: [],
gallery: "",
imageUrl: "",
lid: "", // id
gid: "", // id
brand: [], //
cate: [], //
goodschoose: [], //
goodsID: "", //id
goodsData: [], //
//
skus: [
{
import {
addGoods,
checkGoods,
goodsList,
updateGoods,
imgUpload,
} from "../../../api/goods.js";
import { goods_types, Brand_goods_types } from "../../../api/rankingData.js";
export default {
data() {
return {
imgs: [],
gallery: "",
imageUrl: "",
lid: "", // id
gid: "", // id
brand: [], //
cate: [], //
goodschoose: [], //
goodsID: "", //id
goodsData: [], //
//
skus: [
{
title: "",
sku_code: "",
status: "0",
num: "0",
cost: "0",
reserve: "0",
},
],
//
form: {
goods_id: "",
title: "",
img_url: "",
type_id: "",
brand_id: "",
goods_code: "",
},
//
options: [
{
id: "0",
label: "下架",
},
{
id: "1",
label: "在售",
},
{
id: "2",
label: "预警",
},
],
file: [],
isShow: false,
URL: "",
};
},
watch: {
lid: {
handler(newVal, oldVal) {
if (newVal) {
this.goodschoose.forEach((item) => {
if (item.id == newVal) {
this.form = { ...item };
}
});
}
},
deep: true, //
immediate: true, //
},
},
methods: {
//
handleAvatarSuccess(res, files) {
let formData = new FormData();
files.forEach((file) => {
formData.append("uploadFile", file.raw); //
});
let requestConfig = {
headers: {
"Content-Type": "multipart/form-data",
},
};
imgUpload(formData, requestConfig).then((res) => {
this.form.img_url = res.data.resource;
if (this.goodsData.length !== 0) {
this.goodsData.goods.img_url = res.data.resource;
}
});
},
//
handleUpdate() {
this.gid = this.$route.query;
if (this.gid.id) {
checkGoods(this.gid.id).then((res) => {
const data = res.data.data;
const sku = this.skus[0];
const list = {};
Object.keys(data).map((key) => {
Object.keys(sku).map((i) => {
if (key == i) {
list[i] = data[key];
}
});
});
});
}
},
//
handleList() {
goodsList().then((res) => {
this.goodschoose = res.data.data;
this.goodschoose = [
{
title: "",
id: "",
},
...this.goodschoose,
];
});
},
//
handleSave() {
const goods = this.form;
const skus = this.skus;
const updata = {
...goods,
goods_id: this.lid,
skus: skus,
};
addGoods(updata).then((res) => {
if (res.statusText === "OK") {
this.$message({
message: "商品添加成功!",
type: "success",
});
this.updateForm();
this.$router.push("/GOODS_LIST");
}
});
},
//
updateForm() {
this.form = {
title: "",
img_url: "abc.jpg",
type_id: "",
brand_id: "",
goods_code: "",
};
this.skus = [
{
title: "",
sku_code: "",
status: "",
num: "",
cost: "",
},
];
},
//
handleAdd() {
this.skus.push({
title: "",
sku_code: "",
status: "0",
num: "0",
cost: "0",
reserve: "0",
},
],
//
form: {
goods_id: "",
title: "",
img_url: "",
type_id: "",
brand_id: "",
goods_code: "",
},
//
options: [
{
id: "0",
label: "下架",
},
{
id: "1",
label: "在售",
},
{
id: "2",
label: "预警",
},
],
file: [],
isShow: false,
URL: "",
};
},
watch: {
lid: {
handler(newVal, oldVal) {
if (newVal) {
this.goodschoose.forEach((item) => {
if (item.id == newVal) {
this.form = { ...item };
}
});
}
},
deep: true, //
immediate: true, //
},
},
methods: {
//
handleAvatarSuccess(res, files) {
let formData = new FormData();
files.forEach((file) => {
formData.append("uploadFile", file.raw); //
});
let requestConfig = {
headers: {
"Content-Type": "multipart/form-data",
},
};
imgUpload(formData, requestConfig).then((res) => {
console.log(res);
this.form.img_url = res.data.resource;
this.goodsData.goods.img_url = res.data.resource;
});
},
//
handleUpdate() {
this.gid = this.$route.query;
if (this.gid.id) {
checkGoods(this.gid.id).then((res) => {
console.log(res.data.data, "oooppuu");
const data = res.data.data;
const sku = this.skus[0];
const list = {};
Object.keys(data).map((key) => {
Object.keys(sku).map((i) => {
if (key == i) {
list[i] = data[key];
}
});
});
});
}
},
//
handleList() {
goodsList().then((res) => {
this.goodschoose = res.data.data;
this.goodschoose = [
{
title: "",
id: "",
},
...this.goodschoose,
];
});
},
//
handleSave() {
const goods = this.form;
const skus = this.skus;
const updata = {
...goods,
goods_id: this.lid,
skus: skus,
};
addGoods(updata).then((res) => {
if (res.statusText === "OK") {
this.$message({
message: "商品添加成功!",
type: "success",
});
this.updateForm();
this.$router.push("/GOODS_LIST");
}
});
},
//
updateForm() {
this.form = {
title: "",
img_url: "abc.jpg",
type_id: "",
brand_id: "",
goods_code: "",
};
this.skus = [
{
title: "",
sku_code: "",
status: "",
num: "",
cost: "",
},
];
},
//
handleAdd() {
this.skus.push({
title: "",
sku_code: "",
status: "0",
num: "",
cost: "",
});
console.log(this.skus);
},
//
handleDelete(index) {
this.skus.splice(index, 1);
},
hanleurlimg(val) {
console.log(val, "=+++++++++");
},
//
successUpload(file, fileList) {
console.log(file, fileList, 5555);
},
errorUpload(file, fileList) {
console.log(file, fileList, 5555);
},
//
getgoodsidData() {
let id = this.bigID;
checkGoods(id).then((res) => {
this.goodsData = res.data.data;
console.log(this.goodsData);
});
},
//
Edititem() {
let id = this.bigID;
// console.log("ID", id);
// console.log("goodsid", this.goodsData.goods_id);
let goods = {
title: this.goodsData.goods.title,
img_url: this.goodsData.goods.img_url,
// ? this.goodsData.goods.img_url
// : "",
type_id: this.goodsData.goods.type_id,
brand_id: this.goodsData.goods.brand_id,
goods_code: this.goodsData.goods.goods_code,
};
let sku = {
title: this.goodsData.title,
sku_code: this.goodsData.sku_code,
status: this.goodsData.status,
num: this.goodsData.num,
cost: this.goodsData.cost,
};
if (sku.status == "下架") {
sku.status = 0;
} else if (sku.status == "在售") {
sku.status = 1;
} else if (sku.status == "预警") {
sku.status = 2;
}
let updateData = {
goods_id: this.goodsData.goods_id,
goods,
sku,
};
updateGoods(id, updateData).then((res) => {
this.$router.push("/GOODS_LIST");
this.$message({
message: "商品编辑成功!",
type: "success",
});
},
//
handleDelete(index) {
this.skus.splice(index, 1);
},
//
getgoodsidData() {
let id = this.bigID;
checkGoods(id).then((res) => {
this.goodsData = res.data.data;
});
},
//
Edititem() {
let id = this.bigID;
let goods = {
title: this.goodsData.goods.title,
img_url: this.goodsData.goods.img_url,
type_id: this.goodsData.goods.type_id,
brand_id: this.goodsData.goods.brand_id,
goods_code: this.goodsData.goods.goods_code,
};
let sku = {
title: this.goodsData.title,
sku_code: this.goodsData.sku_code,
status: this.goodsData.status,
num: this.goodsData.num,
cost: this.goodsData.cost,
};
if (sku.status == "下架") {
sku.status = 0;
} else if (sku.status == "在售") {
sku.status = 1;
} else if (sku.status == "预警") {
sku.status = 2;
}
let updateData = {
goods_id: this.goodsData.goods_id,
goods,
sku,
};
updateGoods(id, updateData).then((res) => {
this.$router.push("/GOODS_LIST");
this.$message({
message: "商品编辑成功!",
type: "success",
});
});
},
//
cancel() {
this.$router.push("/GOODS_LIST");
},
onchange(value) {
if (value !== "") {
this.isShow = true;
}
if (value === "") {
this.isShow = false;
this.form = {};
}
},
},
created() {
this.goodsID = sessionStorage.getItem("商品ID");
this.bigID = sessionStorage.getItem("ID");
},
mounted() {
this.gid = this.$route.query;
//
goods_types().then((res) => {
this.cate = res.data.data;
});
//
Brand_goods_types().then((res) => {
this.brand = res.data.data;
});
this.handleList();
this.handleUpdate();
this.getgoodsidData();
},
//
cancel() {
this.$router.push("/GOODS_LIST");
beforeDestroy() {
sessionStorage.removeItem("商品ID"); //ID
sessionStorage.removeItem("ID"); //ID
},
onchange(value) {
console.log(value);
if (value !== "") {
this.isShow = true;
}
if (value === "") {
this.isShow = false;
this.form = {};
}
},
},
created() {
this.goodsID = sessionStorage.getItem("商品ID");
this.bigID = sessionStorage.getItem("ID");
},
mounted() {
this.gid = this.$route.query;
//
goods_types().then((res) => {
this.cate = res.data.data;
});
//
Brand_goods_types().then((res) => {
this.brand = res.data.data;
});
this.handleList();
this.handleUpdate();
this.getgoodsidData();
},
beforeDestroy() {
sessionStorage.removeItem("商品ID"); //ID
sessionStorage.removeItem("ID"); //ID
},
};
};
</script>
<style scoped>
.el-upload--picture-card {
width: 50px;
height: 50px;
}
.el-form-item {
margin-left: 60px;
}
.addto {
display: inline-block;
width: 30px;
height: 30px;
background-color: blue;
color: #fff;
font-size: 25px;
text-align: center;
line-height: 30px;
border-radius: 5px;
margin-top: 4px;
}
.el-upload--picture-card {
width: 50px;
height: 50px;
}
/* 分割 */
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 148px;
height: 148px;
line-height: 148px;
text-align: center;
}
.avatar {
width: 148px;
height: 148px;
display: block;
}
</style>
.el-form-item {
margin-left: 60px;
}
.addto {
display: inline-block;
width: 30px;
height: 30px;
background-color: blue;
color: #fff;
font-size: 25px;
text-align: center;
line-height: 30px;
border-radius: 5px;
margin-top: 4px;
}
/* 分割 */
.avatar-uploader .el-upload {
border: 1px dashed #d9d9d9;
border-radius: 6px;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload:hover {
border-color: #409eff;
}
.avatar-uploader-icon {
font-size: 28px;
color: #8c939d;
width: 148px;
height: 148px;
line-height: 148px;
text-align: center;
}
.avatar {
width: 148px;
height: 148px;
display: block;
}
</style>

File diff suppressed because it is too large Load Diff