mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-10-29 22:10:49 +00:00
Merge branch 'v5.0.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v5.0.0dev
This commit is contained in:
commit
14a6c12b2d
@ -13,6 +13,7 @@ namespace app\adminapi\controller\v1\setting;
|
||||
|
||||
use app\adminapi\controller\AuthController;
|
||||
use app\services\system\SystemMenusServices;
|
||||
use app\services\system\SystemRouteCateServices;
|
||||
use app\services\system\SystemRouteServices;
|
||||
use think\facade\App;
|
||||
use think\facade\Route;
|
||||
@ -274,14 +275,21 @@ class SystemMenus extends AuthController
|
||||
public function ruleList()
|
||||
{
|
||||
//获取所有的路由
|
||||
$ruleList = app()->make(SystemRouteServices::class)->selectList(['app_name' => 'adminapi'], 'name,path,method,type,id')->toArray();
|
||||
$ruleList = app()->make(SystemRouteCateServices::class)->selectList(['app_name' => 'adminapi'], 'id,name', 0, 0, 'id asc,sort desc', ['children'])->toArray();
|
||||
$menuApiList = $this->services->getColumn(['auth_type' => 2, 'is_del' => 0], "concat(`api_url`,'_',lower(`methods`)) as rule");
|
||||
if ($menuApiList) $menuApiList = array_column($menuApiList, 'rule');
|
||||
$list = [];
|
||||
foreach ($ruleList as $item) {
|
||||
if ($item['type'] || !in_array($item['path'] . '_' . strtolower($item['method']), $menuApiList)) {
|
||||
$item['real_name'] = $item['name'] ?? '';
|
||||
$item['method'] = strtoupper($item['method']);
|
||||
$children = [];
|
||||
foreach ($item['children'] as $value) {
|
||||
if ($value['type'] || !in_array($value['path'] . '_' . strtolower($value['method']), $menuApiList)) {
|
||||
$value['real_name'] = $value['name'] ?? '';
|
||||
$value['method'] = strtoupper($value['method']);
|
||||
$children[] = $value;
|
||||
}
|
||||
}
|
||||
if ($children) {
|
||||
$item['children'] = $children;
|
||||
$list[] = $item;
|
||||
}
|
||||
}
|
||||
|
||||
@ -39,6 +39,6 @@ class SystemRouteCate extends BaseModel
|
||||
*/
|
||||
public function children()
|
||||
{
|
||||
return $this->hasMany(SystemRoute::class, 'cate_id', 'id')->field(['id', 'cate_id', 'name', 'path', 'method'])->order('add_time desc');
|
||||
return $this->hasMany(SystemRoute::class, 'cate_id', 'id')->field(['id', 'type', 'cate_id', 'name', 'name as real_name', 'path', 'method'])->order('add_time desc');
|
||||
}
|
||||
}
|
||||
|
||||
@ -103,7 +103,7 @@ class SystemRouteCateServices extends BaseServices
|
||||
}
|
||||
$options = $this->dao->selectList(['app_name' => $appName], 'name as label,id as value,id,pid')->toArray();
|
||||
$rule = [
|
||||
FormBuilder::cascader('path', '上级分类', $path)->data(get_tree_children($options)),
|
||||
// FormBuilder::cascader('path', '上级分类', $path)->data(get_tree_children($options)),
|
||||
FormBuilder::input('name', '分类名称', $cateInfo['name'] ?? '')->required(),
|
||||
FormBuilder::number('sort', '排序', (int)($cateInfo['sort'] ?? 0)),
|
||||
FormBuilder::hidden('app_name', $appName)
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
.card_box_cir1[data-v-f9f647ba] .ivu-icon{font-size:26px;color:#fff}.one[data-v-f9f647ba]{background:#e4ecff}.two[data-v-f9f647ba]{background:#fff3e0}.three[data-v-f9f647ba]{background:#eaf9e1}.four[data-v-f9f647ba]{background:#ffeaf4}.five[data-v-f9f647ba]{background:#f1e4ff}.one1[data-v-f9f647ba]{background:#4d7cfe}.two1[data-v-f9f647ba]{background:#ffab2b}.three1[data-v-f9f647ba]{background:#6dd230}.four1[data-v-f9f647ba]{background:#ff85c0}.five1[data-v-f9f647ba]{background:#b37feb}.card_box[data-v-f9f647ba]{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:25px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px}.card_box .card_box_cir[data-v-f9f647ba]{width:60px;height:60px;overflow:hidden;margin-right:20px}.card_box .card_box_cir .card_box_cir1[data-v-f9f647ba],.card_box .card_box_cir[data-v-f9f647ba]{border-radius:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.card_box .card_box_cir .card_box_cir1[data-v-f9f647ba]{width:48px;height:48px}.card_box .card_box_txt .sp1[data-v-f9f647ba]{display:block;color:#252631;font-size:24px}.card_box .card_box_txt .sp2[data-v-f9f647ba]{display:block;color:#98a9bc;font-size:12px}.cl[data-v-fa712ef4]{margin-right:20px}.code-row-bg[data-v-fa712ef4]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:nowrap;flex-wrap:nowrap}.code-row-bg .ivu-mt[data-v-fa712ef4]{width:100%;margin:0 5px}.ech-box[data-v-fa712ef4]{margin-top:10px}.change-style[data-v-fa712ef4]{border:1px solid #ccc;border-radius:15px;padding:0 10px;cursor:pointer}.table-head[data-v-fa712ef4]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.return[data-v-fa712ef4]{margin-bottom:6px}[data-v-fa712ef4] .ivu-tabs-nav-scroll{background-color:#fff;padding-top:5px}.tabBox_img[data-v-fa712ef4]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-fa712ef4]{width:100%;height:100%}
|
||||
@ -0,0 +1 @@
|
||||
.trees-coadd[data-v-fd00980a]{width:100%;height:500px;border-radius:4px;overflow:hidden}.scollhide[data-v-fd00980a]{width:100%;height:100%;overflow:auto;margin-left:18px;padding:10px 0 10px 0;-webkit-box-sizing:border-box;box-sizing:border-box}.content[data-v-fd00980a]{font-size:12px}.time[data-v-fd00980a]{font-size:12px;color:#2d8cf0}.icons-item[data-v-fd00980a]{float:left;margin:6px 6px 6px 0;width:53px;text-align:center;list-style:none;cursor:pointer;height:50px;color:#5c6b77;-webkit-transition:all .2s ease;transition:all .2s ease;position:relative;padding-top:10px}.icons-item .ivu-icon[data-v-fd00980a]{font-size:16px}.search-rule[data-v-fd00980a]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px;background-color:#f2f2f2}.rule[data-v-fd00980a]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-height:700px;overflow:scroll}.rule[data-v-fd00980a]::-webkit-scrollbar{width:10px;height:10px;background-color:#f5f5f5}.rule[data-v-fd00980a]::-webkit-scrollbar-track{border-radius:4px;background-color:#f5f5f5}.rule[data-v-fd00980a]::-webkit-scrollbar-thumb{border-radius:4px;background-color:#555}.rule-list[data-v-fd00980a]{background-color:#f8f5f5;width:32%;margin:5px;border-radius:3px;padding:10px;color:#333;cursor:pointer;-webkit-transition:all .1s;transition:all .1s}.rule-list[data-v-fd00980a]:hover{background-color:#c5d1dd}.rule-list div[data-v-fd00980a]{white-space:nowrap}.select-rule[data-v-fd00980a]{background-color:#c5d1dd}.add[data-v-fd00980a]{-webkit-box-align:center;-ms-flex-align:center;align-items:center}.add[data-v-fd00980a],.df[data-v-fd00980a]{display:-webkit-box;display:-ms-flexbox;display:flex}.df[data-v-fd00980a]{-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.vxeTable[data-v-1f21fc65] .vxe-table--header-wrapper{background:#fff!important}.rule[data-v-1f21fc65]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap;max-height:600px;overflow-y:scroll}.rule[data-v-1f21fc65]::-webkit-scrollbar{width:10px;height:10px;background-color:#f5f5f5}.rule[data-v-1f21fc65]::-webkit-scrollbar-track{border-radius:4px;background-color:#f5f5f5}.rule[data-v-1f21fc65]::-webkit-scrollbar-thumb{border-radius:4px;background-color:#ccc}.rule-list[data-v-1f21fc65]{background-color:#f2f2f2;width:32%;margin:5px;border-radius:3px;padding:10px;color:#333;cursor:pointer;-webkit-transition:all .1s;transition:all .1s}.rule-list[data-v-1f21fc65]:hover{background-color:#badbfb}.rule-list div[data-v-1f21fc65]{white-space:nowrap}.select-rule[data-v-1f21fc65]{background-color:#badbfb}
|
||||
@ -0,0 +1 @@
|
||||
.card_box_cir1[data-v-f9f647ba] .ivu-icon{font-size:26px;color:#fff}.one[data-v-f9f647ba]{background:#e4ecff}.two[data-v-f9f647ba]{background:#fff3e0}.three[data-v-f9f647ba]{background:#eaf9e1}.four[data-v-f9f647ba]{background:#ffeaf4}.five[data-v-f9f647ba]{background:#f1e4ff}.one1[data-v-f9f647ba]{background:#4d7cfe}.two1[data-v-f9f647ba]{background:#ffab2b}.three1[data-v-f9f647ba]{background:#6dd230}.four1[data-v-f9f647ba]{background:#ff85c0}.five1[data-v-f9f647ba]{background:#b37feb}.card_box[data-v-f9f647ba]{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:25px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px}.card_box .card_box_cir[data-v-f9f647ba]{width:60px;height:60px;overflow:hidden;margin-right:20px}.card_box .card_box_cir .card_box_cir1[data-v-f9f647ba],.card_box .card_box_cir[data-v-f9f647ba]{border-radius:50%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center}.card_box .card_box_cir .card_box_cir1[data-v-f9f647ba]{width:48px;height:48px}.card_box .card_box_txt .sp1[data-v-f9f647ba]{display:block;color:#252631;font-size:24px}.card_box .card_box_txt .sp2[data-v-f9f647ba]{display:block;color:#98a9bc;font-size:12px}.tab_data[data-v-582542c9] .ivu-form-item-content{margin-left:0!important}.table_box[data-v-582542c9] .ivu-divider-horizontal{margin-top:0!important}.table_box[data-v-582542c9] .ivu-form-item{margin-bottom:15px!important}.tabform[data-v-582542c9]{margin-bottom:10px}.Refresh[data-v-582542c9]{font-size:12px;color:#1890ff;cursor:pointer}.v-transfer-dom[data-v-306b6d59] .ivu-modal-content-drag{z-index:2!important}.radio[data-v-306b6d59]{margin-bottom:14px}.radio[data-v-306b6d59] .name{width:125px;text-align:right;padding-right:12px}img[data-v-faec86b6]{height:36px;display:block}.tabBox[data-v-faec86b6]{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;margin-bottom:2px}.tabBox .tabBox_img[data-v-faec86b6]{width:36px;height:36px}.tabBox .tabBox_img img[data-v-faec86b6]{width:100%;height:100%}.tabBox .tabBox_tit[data-v-faec86b6]{width:60%;font-size:12px!important;margin:0 10px 0 10px;letter-spacing:1px;padding:5px 0;-webkit-box-sizing:border-box;box-sizing:border-box}.orderData[data-v-faec86b6] .ivu-table-cell{padding-left:0!important}.vertical-center-modal[data-v-faec86b6]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center}.uid[data-v-faec86b6]{color:#2d8cf0}.pink_name[data-v-faec86b6]{color:#666}.img[data-v-faec86b6]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.img img[data-v-faec86b6]{width:30px;height:30px;margin-right:3px}.card_cent[data-v-0ba1d268] .ivu-card-body{width:100%;height:100%}.card_box[data-v-0ba1d268]{width:100%;height:100%;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;padding:25px;-webkit-box-sizing:border-box;box-sizing:border-box;border-radius:4px}.card_box .card_box_img[data-v-0ba1d268]{width:48px;height:48px;border-radius:50%;overflow:hidden;margin-right:20px}.card_box .card_box_img img[data-v-0ba1d268]{width:100%;height:100%}.card_box .card_box_txt .sp1[data-v-0ba1d268]{display:block;color:#252631;font-size:24px}.card_box .card_box_txt .sp2[data-v-0ba1d268]{display:block;color:#98a9bc;font-size:12px}.product_tabs[data-v-d3be6f7e] .ivu-page-header-breadcrumb,.product_tabs[data-v-d3be6f7e] .ivu-page-header-content,.product_tabs[data-v-d3be6f7e] .ivu-tabs-bar{margin-bottom:0!important}[data-v-d3be6f7e] .ivu-badge-count-alone{top:-7px;right:2px}.i-layout-page-header[data-v-d3be6f7e] .ivu-badge-count{line-height:14px;height:15px}
|
||||
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
.ivu-description-list-title[data-v-58881868]{margin-bottom:16px;color:#17233d;font-weight:500;font-size:14px}.logistics[data-v-58881868]{-webkit-box-align:center;-ms-flex-align:center;align-items:center;padding:10px 0}.logistics .logistics_img[data-v-58881868]{width:45px;height:45px;margin-right:12px}.logistics .logistics_img img[data-v-58881868]{width:100%;height:100%}.logistics .logistics_cent span[data-v-58881868]{display:block;font-size:12px}.trees-coadd[data-v-58881868]{width:100%;height:400px;border-radius:4px;overflow:hidden}.trees-coadd .scollhide[data-v-58881868]{width:100%;height:100%;overflow:auto;margin-left:18px;padding:10px 0 10px 0;-webkit-box-sizing:border-box;box-sizing:border-box}.trees-coadd .scollhide .content[data-v-58881868]{font-size:12px}.trees-coadd .scollhide .time[data-v-58881868]{font-size:12px;color:#2d8cf0}.order_box2[data-v-58881868]{position:absolute;z-index:999999999}.order_box[data-v-58881868] .ivu-modal-header{padding:30x 16px!important}.order_box[data-v-58881868] .ivu-card{font-size:12px!important}.fontColor1[data-v-58881868]{color:red!important}.fontColor2[data-v-58881868]{color:#733af9!important}.order_box[data-v-58881868] .ivu-description-detail,.order_box[data-v-58881868] .ivu-description-term{padding-bottom:10px!important}.order_box[data-v-58881868] .ivu-modal-body{padding:0 16px!important}.fontColor3[data-v-58881868]{color:#f1a417!important}.pic[data-v-58881868]{display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-wrap:wrap;flex-wrap:wrap}.img[data-v-58881868]{width:100px;height:100px;margin:10px 10px}.img img[data-v-58881868]{width:100%;height:100%}.ivu-table-wrapper[data-v-55a92d1e]{border-left:1px solid #dcdee2;border-top:1px solid #dcdee2}.order_box[data-v-55a92d1e] .ivu-table th{background:#f8f8f9!important}
|
||||
@ -0,0 +1 @@
|
||||
.expand-row[data-v-1a725052]{margin-bottom:16px}.labelInput[data-v-7f436d82]{border:1px solid #dcdee2;width:400px;padding:0 8px;border-radius:5px;min-height:30px;cursor:pointer}.labelInput .span[data-v-7f436d82]{color:#c5c8ce}.labelInput .iconxiayi[data-v-7f436d82]{font-size:12px}.ivu-form-item[data-v-7f436d82]{margin-bottom:10px}.form-sty[data-v-7f436d82]{width:400px!important}.addfont[data-v-7f436d82]{display:inline-block;font-size:13px;font-weight:400;color:#1890ff;margin-left:14px;cursor:pointer;margin-left:10px}.ivu-icon-ios-arrow-down[data-v-7f436d82]{font-size:14px}.tip[data-v-7f436d82]{color:#bbb}.sp[data-v-290dedde]{line-height:32px}.picBox[data-v-5577d074]{display:inline-block;cursor:pointer}.picBox .upLoad[data-v-5577d074]{width:58px;height:58px;line-height:58px;border:1px dotted rgba(0,0,0,.1);border-radius:4px;background:rgba(0,0,0,.02)}.picBox .pictrue[data-v-5577d074]{width:60px;height:60px;border:1px dotted rgba(0,0,0,.1);margin-right:10px}.picBox .pictrue img[data-v-5577d074]{width:100%;height:100%}.userFrom[data-v-5577d074] .ivu-form-item-content{margin-left:0!important}.userAlert[data-v-5577d074]{margin-top:20px}.userI[data-v-5577d074]{color:#1890ff;font-style:normal}img[data-v-5577d074]{height:36px;display:block}.tabBox_img[data-v-5577d074]{width:36px;height:36px;border-radius:4px;cursor:pointer}.tabBox_img img[data-v-5577d074]{width:100%;height:100%}.tabBox_tit[data-v-5577d074]{width:60%;font-size:12px!important;margin:0 2px 0 10px;letter-spacing:1px;padding:5px 0;-webkit-box-sizing:border-box;box-sizing:border-box}.modelBox[data-v-5577d074] .ivu-modal-body{padding:0 16px 16px 16px!important}.vipName[data-v-5577d074]{color:#dab176}.listbox[data-v-5577d074] .ivu-divider-horizontal{margin:0!important}.labelInput[data-v-5577d074]{border:1px solid #dcdee2;padding:0 6px;border-radius:5px;min-height:30px;cursor:pointer}.labelInput .span[data-v-5577d074]{color:#c5c8ce}.labelInput .ivu-icon-ios-arrow-down[data-v-5577d074]{font-size:14px;color:#808695}.demo-drawer-footer[data-v-5577d074]{width:100%;position:absolute;bottom:0;left:0;border-top:1px solid #e8e8e8;padding:10px 16px;text-align:right;background:#fff}
|
||||
@ -0,0 +1 @@
|
||||
[data-v-40417597] .diy-fullscreen{overflow:hidden}[data-v-40417597] .diy-fullscreen .ivu-modal{top:0;left:0;right:0;bottom:0;height:100%;width:100%!important}[data-v-40417597] .diy-fullscreen .ivu-modal .ivu-modal-content,[data-v-40417597] .diy-fullscreen .ivu-modal .ivu-modal-content .ivu-modal-body{height:100%}[data-v-40417597] .diy-fullscreen .ivu-modal .ivu-tabs .ivu-tabs-content-animated{height:92%;background-color:#2f2f2f!important}[data-v-40417597] .diy-fullscreen .ivu-modal .ivu-tabs-content{height:100%}[data-v-40417597] .diy-fullscreen .ivu-modal .ivu-tabs .ivu-tabs-tabpane{height:92%}.diy-header[data-v-40417597]{display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-align:center;-ms-flex-align:center;align-items:center;-webkit-box-pack:justify;-ms-flex-pack:justify;justify-content:space-between}.diy-header .diy-header-icon[data-v-40417597]{margin-right:30px;cursor:pointer}.diy-header .diy-header-icon[data-v-40417597]:hover{opacity:.8}[data-v-40417597] .ivu-modal{top:70px}.ivu-modal-content .ivu-modal-body[data-v-40417597]{min-height:632px;height:80vh;overflow:hidden}.ivu-tabs .ivu-tabs-content-animated[data-v-40417597],.ivu-tabs .ivu-tabs-tabpane[data-v-40417597]{min-height:560px;height:73vh;margin-top:-1px}.ivu-tabs-nav .ivu-tabs-tab .ivu-icon[data-v-40417597]{color:red}[data-v-40417597] body .ivu-select-dropdown .ivu-dropdown-transfer{background:red!important}.file-left[data-v-40417597] .ivu-select-dropdown.ivu-dropdown-transfer .ivu-dropdown-menu .ivu-dropdown-item:hover{background-color:#e5e5e5!important}[data-v-40417597] .ivu-tabs.ivu-tabs-card>.ivu-tabs-bar .ivu-tabs-nav-container{background-color:#fff}
|
||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@ -0,0 +1 @@
|
||||
.tableBox[data-v-3b385f76] .ivu-table-header table{border:none!important}
|
||||
@ -0,0 +1 @@
|
||||
.content_font[data-v-5fbe6be5]{color:#2b85e4}.search[data-v-5fbe6be5] .ivu-form-item-content{margin-left:0!important}.ivu-mt .Button .bnt[data-v-5fbe6be5]{margin-right:6px}.ivu-mt .ivu-table-row[data-v-5fbe6be5]{font-size:12px;color:rgba(0,0,0,.65)}.ivu-mt[data-v-5fbe6be5] .ivu-table-cell{padding:10px 0!important}.pictrue[data-v-5fbe6be5]{width:36px;height:36px;display:inline-block;cursor:pointer}.pictrue img[data-v-5fbe6be5]{width:100%;height:100%;display:block;-o-object-fit:cover;object-fit:cover}.ivu-mt .imgPic .info[data-v-5fbe6be5]{width:60%;margin-left:10px}.ivu-mt .picList .pictrue[data-v-5fbe6be5]{height:36px;margin:7px 3px 0 3px}.ivu-mt .picList .pictrue img[data-v-5fbe6be5]{height:100%;display:block}
|
||||
@ -0,0 +1 @@
|
||||
.form-width[data-v-4cd76107],.form-width[data-v-eae4886e]{width:500px}.item[data-v-eae4886e]{display:-webkit-box;display:-ms-flexbox;display:flex;margin-bottom:10px}.item .row[data-v-eae4886e]{width:140px;margin-right:10px}.ivu-steps .ivu-steps-title[data-v-47064b81]{line-height:26px}.btn[data-v-47064b81]{position:fixed;bottom:10px;display:-webkit-box;display:-ms-flexbox;display:flex;-webkit-box-pack:center;-ms-flex-pack:center;justify-content:center;-webkit-box-align:center;-ms-flex-align:center;align-items:center;width:85%}.tab-1[data-v-47064b81]{padding-bottom:100px}[data-v-47064b81] .el-input__inner{padding-left:7px}[data-v-47064b81] .ivu-form-item{margin-bottom:15px}[data-v-47064b81] .tip{color:#bbb;line-height:16px;padding-top:5px}
|
||||
1
crmeb/public/admin/system_static/js/app.31344de0.js
Normal file
1
crmeb/public/admin/system_static/js/app.31344de0.js
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
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
@ -198,12 +198,15 @@ export default {
|
||||
instance.confirmButtonLoading = true;
|
||||
instance.confirmButtonText = this.$t('message.user.logOutExit');
|
||||
AccountLogout().then((res) => {
|
||||
this.$Message.success('您已成功退出');
|
||||
this.$router.replace({ path: `${settings.routePre}/login` });
|
||||
this.$router.replace({ name: 'login' });
|
||||
this.$store.commit('clearAll');
|
||||
localStorage.clear();
|
||||
sessionStorage.clear();
|
||||
removeCookies('token');
|
||||
removeCookies('expires_time');
|
||||
removeCookies('uuid');
|
||||
// window.location.reload()
|
||||
this.$Message.success('您已成功退出');
|
||||
// this.$router.replace({ path: `${settings.routePre}/login` });
|
||||
done();
|
||||
setTimeout(() => {
|
||||
instance.confirmButtonLoading = false;
|
||||
|
||||
@ -331,8 +331,14 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style>
|
||||
html,
|
||||
body {
|
||||
font-size: 50px;
|
||||
}
|
||||
</style>
|
||||
<style scoped lang="stylus">
|
||||
|
||||
.chat-list {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
|
||||
@ -2,11 +2,11 @@
|
||||
<div>
|
||||
<Card :bordered="false" dis-hover class="ivu-mt">
|
||||
<Form
|
||||
ref="roleData"
|
||||
:model="roleData"
|
||||
:label-width="labelWidth"
|
||||
:label-position="labelPosition"
|
||||
@submit.native.prevent
|
||||
ref="roleData"
|
||||
:model="roleData"
|
||||
:label-width="labelWidth"
|
||||
:label-position="labelPosition"
|
||||
@submit.native.prevent
|
||||
>
|
||||
<Row type="flex" :gutter="24">
|
||||
<Col v-bind="grid">
|
||||
@ -19,29 +19,30 @@
|
||||
</Col>
|
||||
<Col v-bind="grid">
|
||||
<FormItem label="按钮名称:" prop="status2" label-for="status2">
|
||||
<Input v-model="roleData.keyword" search enter-button placeholder="请输入按钮名称" @on-search="getData" />
|
||||
<Input v-model="roleData.keyword" search enter-button placeholder="请输入按钮名称" @on-search="getData"/>
|
||||
</FormItem>
|
||||
</Col>
|
||||
</Row>
|
||||
<Row type="flex">
|
||||
<Col v-bind="grid">
|
||||
<Button v-auth="['setting-system_menus-add']" type="primary" @click="menusAdd('添加规则')" icon="md-add"
|
||||
>添加规则</Button
|
||||
>添加规则
|
||||
</Button
|
||||
>
|
||||
</Col>
|
||||
</Row>
|
||||
</Form>
|
||||
<vxe-table
|
||||
:border="false"
|
||||
class="vxeTable mt25"
|
||||
highlight-hover-row
|
||||
highlight-current-row
|
||||
:loading="loading"
|
||||
ref="xTable"
|
||||
header-row-class-name="false"
|
||||
:tree-config="tabconfig"
|
||||
:data="tableData"
|
||||
row-id="id"
|
||||
:border="false"
|
||||
class="vxeTable mt25"
|
||||
highlight-hover-row
|
||||
highlight-current-row
|
||||
:loading="loading"
|
||||
ref="xTable"
|
||||
header-row-class-name="false"
|
||||
:tree-config="tabconfig"
|
||||
:data="tableData"
|
||||
row-id="id"
|
||||
>
|
||||
<vxe-table-column field="id" title="ID" tooltip min-width="70"></vxe-table-column>
|
||||
<vxe-table-column field="menu_name" tree-node title="按钮名称" min-width="200"></vxe-table-column>
|
||||
@ -55,12 +56,12 @@
|
||||
<vxe-table-column field="flag" title="规则状态" min-width="120">
|
||||
<template v-slot="{ row }">
|
||||
<i-switch
|
||||
v-model="row.is_show"
|
||||
:value="row.is_show"
|
||||
:true-value="1"
|
||||
:false-value="0"
|
||||
@on-change="onchangeIsShow(row)"
|
||||
size="large"
|
||||
v-model="row.is_show"
|
||||
:value="row.is_show"
|
||||
:true-value="1"
|
||||
:false-value="0"
|
||||
@on-change="onchangeIsShow(row)"
|
||||
size="large"
|
||||
>
|
||||
<span slot="open">显示</span>
|
||||
<span slot="close">隐藏</span>
|
||||
@ -71,63 +72,62 @@
|
||||
<template v-slot="{ row, index }">
|
||||
<span v-auth="['setting-system_menus-add']">
|
||||
<a @click="addRoute(row)" v-if="row.auth_type === 1">添加权限</a>
|
||||
<Divider type="vertical" v-if="row.auth_type === 1" />
|
||||
<Divider type="vertical" v-if="row.auth_type === 1"/>
|
||||
<a @click="addE(row, '添加子菜单')" v-if="row.auth_type === 1">添加子菜单</a>
|
||||
<!-- <a @click="addE(row, '添加规则')" v-else>添加规则</a> -->
|
||||
</span>
|
||||
<Divider type="vertical" v-if="row.auth_type === 1" />
|
||||
<Divider type="vertical" v-if="row.auth_type === 1"/>
|
||||
<a @click="edit(row, '编辑')">编辑</a>
|
||||
<Divider type="vertical" />
|
||||
<Divider type="vertical"/>
|
||||
<a @click="del(row, '删除规则')">删除</a>
|
||||
</template>
|
||||
</vxe-table-column>
|
||||
</vxe-table>
|
||||
</Card>
|
||||
<menus-from
|
||||
:formValidate="formValidate"
|
||||
:titleFrom="titleFrom"
|
||||
@getList="getList"
|
||||
@changeMenu="getMenusUnique"
|
||||
ref="menusFrom"
|
||||
@clearFrom="clearFrom"
|
||||
:formValidate="formValidate"
|
||||
:titleFrom="titleFrom"
|
||||
@getList="getList"
|
||||
@changeMenu="getMenusUnique"
|
||||
ref="menusFrom"
|
||||
@clearFrom="clearFrom"
|
||||
></menus-from>
|
||||
<Modal
|
||||
v-model="ruleModal"
|
||||
scrollable
|
||||
width="1100"
|
||||
title="权限列表"
|
||||
@on-ok="addRouters"
|
||||
@on-cancel="ruleModal = false"
|
||||
@on-visible-change="modalchange"
|
||||
v-model="ruleModal"
|
||||
scrollable
|
||||
width="1100"
|
||||
title="权限列表"
|
||||
@on-ok="addRouters"
|
||||
@on-cancel="ruleModal = false"
|
||||
@on-visible-change="modalchange"
|
||||
>
|
||||
<div class="search-rule">
|
||||
<Alert>基础接口,可多选,并且添加后不会再展示出现;删除权限后才会出现;公共接口,可多选,并且添加后会继续展示;</Alert>
|
||||
<Input
|
||||
class="mr10"
|
||||
v-model="searchRule"
|
||||
placeholder="输入关键词搜索"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
ref="search"
|
||||
@on-enter="searchRules"
|
||||
@on-clear="searchRules"
|
||||
class="mr10"
|
||||
v-model="searchRule"
|
||||
placeholder="输入关键词搜索"
|
||||
clearable
|
||||
style="width: 300px"
|
||||
ref="search"
|
||||
@on-enter="searchRules"
|
||||
@on-clear="searchRules"
|
||||
/>
|
||||
<Button class="mr10" type="primary" @click="searchRules">搜索</Button>
|
||||
<Button @click="init">重置</Button>
|
||||
</div>
|
||||
|
||||
<Tabs v-model="routeType" @on-click="changTab">
|
||||
<TabPane label="公共接口" name="1"></TabPane>
|
||||
<TabPane label="基础接口" name="0"></TabPane>
|
||||
<TabPane :label="item.name" :name="''+index" v-for="(item,index) in foundationList"></TabPane>
|
||||
</Tabs>
|
||||
<div class="rule">
|
||||
<div
|
||||
class="rule-list"
|
||||
v-show="!arrs.length || arrs.includes(item.id)"
|
||||
:class="{ 'select-rule': seletRouteIds.includes(item.id) }"
|
||||
v-for="(item, index) in routeType == 1 ? foundationList : openList"
|
||||
:key="index"
|
||||
@click="selectRule(item)"
|
||||
class="rule-list"
|
||||
v-show="!arrs.length || arrs.includes(item.id)"
|
||||
:class="{ 'select-rule': seletRouteIds.includes(item.id) }"
|
||||
v-for="(item, index) in children"
|
||||
:key="index"
|
||||
@click="selectRule(item)"
|
||||
>
|
||||
<div>接口名称:{{ item.real_name }}</div>
|
||||
<div>请求方式:{{ item.method }}</div>
|
||||
@ -139,7 +139,7 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapState } from 'vuex';
|
||||
import {mapState} from 'vuex';
|
||||
import {
|
||||
getTable,
|
||||
menusDetailsApi,
|
||||
@ -151,13 +151,14 @@ import {
|
||||
} from '@/api/systemMenus';
|
||||
import formCreate from '@form-create/iview';
|
||||
import menusFrom from './components/menusFrom';
|
||||
import { formatFlatteningRoutes } from '@/libs/system';
|
||||
import {formatFlatteningRoutes} from '@/libs/system';
|
||||
|
||||
export default {
|
||||
name: 'systemMenus',
|
||||
data() {
|
||||
return {
|
||||
tabconfig: { children: 'children', reserve: true, accordion: true },
|
||||
children: [],
|
||||
tabconfig: {children: 'children', reserve: true, accordion: true},
|
||||
spinShow: false,
|
||||
ruleModal: false,
|
||||
searchRule: '',
|
||||
@ -179,7 +180,7 @@ export default {
|
||||
formValidate: {},
|
||||
titleFrom: '',
|
||||
modalTitleSs: '',
|
||||
routeType: '1',
|
||||
routeType: '0',
|
||||
arrs: [],
|
||||
foundationList: [], // 基础接口列表
|
||||
openList: [], // 公开接口列表
|
||||
@ -188,7 +189,7 @@ export default {
|
||||
menusId: 0, // 选中分类id
|
||||
};
|
||||
},
|
||||
components: { menusFrom, formCreate: formCreate.$form() },
|
||||
components: {menusFrom, formCreate: formCreate.$form()},
|
||||
computed: {
|
||||
...mapState('admin/layout', ['isMobile']),
|
||||
labelWidth() {
|
||||
@ -213,13 +214,13 @@ export default {
|
||||
menus: this.seletRoute,
|
||||
};
|
||||
menusBatch(data)
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.getData();
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
.then((res) => {
|
||||
console.log(res);
|
||||
this.getData();
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
},
|
||||
selectRule(data) {
|
||||
if (this.seletRouteIds.includes(data.id)) {
|
||||
@ -238,14 +239,16 @@ export default {
|
||||
}
|
||||
},
|
||||
changTab(name) {
|
||||
console.log(name);
|
||||
this.routeType = name;
|
||||
let index = parseInt(name)
|
||||
this.children = this.foundationList[index] ? this.foundationList[index].children : []
|
||||
this.searchRules();
|
||||
},
|
||||
// 搜索规则
|
||||
searchRules() {
|
||||
if (this.searchRule.trim()) {
|
||||
this.arrs = [];
|
||||
let arr = this.routeType == 1 ? this.foundationList : this.openList;
|
||||
let arr = this.foundationList;
|
||||
for (var i = 0; i < arr.length; i++) {
|
||||
if (arr[i].real_name.indexOf(this.searchRule) !== -1) {
|
||||
this.arrs.push(arr[i].id);
|
||||
@ -257,23 +260,19 @@ export default {
|
||||
},
|
||||
addRoute(row) {
|
||||
this.menusId = row.id;
|
||||
this.routeType = '0';
|
||||
this.getRuleList();
|
||||
},
|
||||
modalchange() {},
|
||||
modalchange() {
|
||||
},
|
||||
// 获取权限列表
|
||||
getRuleList() {
|
||||
getRuleList().then((res) => {
|
||||
this.foundationList = [];
|
||||
this.foundationList = res.data;
|
||||
this.children = this.foundationList[0] ? this.foundationList[0].children : []
|
||||
this.openList = [];
|
||||
this.seletRouteIds = [];
|
||||
this.seletRoute = [];
|
||||
res.data.map((e) => {
|
||||
if (e.type) {
|
||||
this.foundationList.push(e);
|
||||
} else {
|
||||
this.openList.push(e);
|
||||
}
|
||||
});
|
||||
this.ruleModal = true;
|
||||
});
|
||||
},
|
||||
@ -284,13 +283,13 @@ export default {
|
||||
is_show: row.is_show,
|
||||
};
|
||||
isShowApi(data)
|
||||
.then(async (res) => {
|
||||
this.$Message.success(res.msg);
|
||||
this.$store.dispatch('menus/getMenusNavList');
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
.then(async (res) => {
|
||||
this.$Message.success(res.msg);
|
||||
this.$store.dispatch('menus/getMenusNavList');
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
},
|
||||
// 请求列表
|
||||
getList() {
|
||||
@ -308,20 +307,20 @@ export default {
|
||||
let pid = row.id.toString();
|
||||
if (pid) {
|
||||
menusDetailsApi(row.id)
|
||||
.then(async (res) => {
|
||||
this.formValidate.path = res.data.path;
|
||||
this.formValidate.path.push(row.id);
|
||||
this.formValidate.pid = pid;
|
||||
this.$refs.menusFrom.modals = true;
|
||||
this.$refs.menusFrom.valids = false;
|
||||
this.titleFrom = title;
|
||||
this.formValidate.auth_type = 1;
|
||||
this.formValidate.is_show = 0;
|
||||
this.formValidate.is_show_path = 0;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
.then(async (res) => {
|
||||
this.formValidate.path = res.data.path;
|
||||
this.formValidate.path.push(row.id);
|
||||
this.formValidate.pid = pid;
|
||||
this.$refs.menusFrom.modals = true;
|
||||
this.$refs.menusFrom.valids = false;
|
||||
this.titleFrom = title;
|
||||
this.formValidate.auth_type = 1;
|
||||
this.formValidate.is_show = 0;
|
||||
this.formValidate.is_show_path = 0;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
} else {
|
||||
this.formValidate.pid = pid;
|
||||
this.$refs.menusFrom.modals = true;
|
||||
@ -348,25 +347,25 @@ export default {
|
||||
};
|
||||
|
||||
this.$modalSure(delfromData)
|
||||
.then((res) => {
|
||||
this.$Message.success(res.msg);
|
||||
this.getData();
|
||||
this.$store.dispatch('menus/getMenusNavList');
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
.then((res) => {
|
||||
this.$Message.success(res.msg);
|
||||
this.getData();
|
||||
this.$store.dispatch('menus/getMenusNavList');
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
},
|
||||
// 规则详情
|
||||
menusDetails(id) {
|
||||
menusDetailsApi(id)
|
||||
.then(async (res) => {
|
||||
this.formValidate = res.data;
|
||||
this.$refs.menusFrom.modals = true;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
.then(async (res) => {
|
||||
this.formValidate = res.data;
|
||||
this.$refs.menusFrom.modals = true;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
},
|
||||
// 编辑
|
||||
edit(row, title, index) {
|
||||
@ -404,14 +403,14 @@ export default {
|
||||
this.loading = true;
|
||||
this.roleData.is_show = this.roleData.is_show || '';
|
||||
getTable(this.roleData)
|
||||
.then(async (res) => {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.loading = false;
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
.then(async (res) => {
|
||||
this.tableData = res.data;
|
||||
this.loading = false;
|
||||
})
|
||||
.catch((res) => {
|
||||
this.loading = false;
|
||||
this.$Message.error(res.msg);
|
||||
});
|
||||
},
|
||||
getMenusUnique() {
|
||||
getMenusUnique().then((res) => {
|
||||
@ -429,7 +428,7 @@ export default {
|
||||
const cacheList = [];
|
||||
arr.forEach((v) => {
|
||||
if (v && v.meta && v.meta.keepAlive) {
|
||||
newArr.push({ ...v });
|
||||
newArr.push({...v});
|
||||
cacheList.push(v.name);
|
||||
this.$store.dispatch('keepAliveNames/setCacheKeepAlive', cacheList);
|
||||
}
|
||||
@ -446,10 +445,11 @@ export default {
|
||||
|
||||
<style scoped lang="scss">
|
||||
.vxeTable {
|
||||
>>> .vxe-table--header-wrapper {
|
||||
> > > .vxe-table--header-wrapper {
|
||||
background: #fff !important;
|
||||
}
|
||||
}
|
||||
|
||||
.rule {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
|
||||
@ -90,7 +90,7 @@
|
||||
{{ formValidate.name }}
|
||||
</div>
|
||||
<div>
|
||||
<Button type="primary" class="submission mr20" @click="debugging()">调试</Button>
|
||||
<!-- <Button type="primary" class="submission mr20" @click="debugging()">调试</Button> -->
|
||||
<Button v-if="formValidate.id" type="primary" class="submission mr20" @click="isEdit = !isEdit">{{
|
||||
isEdit ? '返回' : '编辑'
|
||||
}}</Button>
|
||||
|
||||
@ -42,7 +42,15 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="type" title="类型" width="120" :edit-render="{}">
|
||||
<template #default="{ row }">
|
||||
<vxe-select v-model="row.type" transfer>
|
||||
<vxe-select
|
||||
v-model="row.type"
|
||||
transfer
|
||||
@change="
|
||||
(val) => {
|
||||
handleChange(val, row, 'xTable');
|
||||
}
|
||||
"
|
||||
>
|
||||
<vxe-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -64,7 +72,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" v-if="row.type === 'array'" status="primary" @click="insertRow(row, 'xTable')"
|
||||
<vxe-button
|
||||
type="text"
|
||||
v-if="['array', 'object'].includes(row.type)"
|
||||
status="primary"
|
||||
@click="insertRow(row, 'xTable')"
|
||||
>插入</vxe-button
|
||||
>
|
||||
<vxe-button type="text" status="primary" @click="removeRow(row, 'xTable')">删除</vxe-button>
|
||||
@ -98,7 +110,15 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="type" title="类型" width="120" :edit-render="{}">
|
||||
<template #default="{ row }">
|
||||
<vxe-select v-model="row.type" transfer>
|
||||
<vxe-select
|
||||
v-model="row.type"
|
||||
transfer
|
||||
@change="
|
||||
(val) => {
|
||||
handleChange(val, row, 'yTable');
|
||||
}
|
||||
"
|
||||
>
|
||||
<vxe-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -120,7 +140,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="120">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" v-if="row.type === 'array'" status="primary" @click="insertRow(row, 'yTable')"
|
||||
<vxe-button
|
||||
type="text"
|
||||
v-if="['array', 'object'].includes(row.type)"
|
||||
status="primary"
|
||||
@click="insertRow(row, 'yTable')"
|
||||
>插入</vxe-button
|
||||
>
|
||||
<vxe-button type="text" status="primary" @click="removeRow(row, 'yTable')">删除</vxe-button>
|
||||
@ -154,7 +178,15 @@
|
||||
</vxe-column>
|
||||
<vxe-column field="type" title="类型" width="200" :edit-render="{}">
|
||||
<template #default="{ row }">
|
||||
<vxe-select v-model="row.type" transfer>
|
||||
<vxe-select
|
||||
v-model="row.type"
|
||||
transfer
|
||||
@change="
|
||||
(val) => {
|
||||
handleChange(val, row, 'zTable');
|
||||
}
|
||||
"
|
||||
>
|
||||
<vxe-option
|
||||
v-for="item in typeList"
|
||||
:key="item.value"
|
||||
@ -166,7 +198,11 @@
|
||||
</vxe-column>
|
||||
<vxe-column title="操作" width="100">
|
||||
<template #default="{ row }">
|
||||
<vxe-button type="text" v-if="row.type === 'array'" status="primary" @click="insertRow(row, 'zTable')"
|
||||
<vxe-button
|
||||
type="text"
|
||||
v-if="['array', 'object'].includes(row.type)"
|
||||
status="primary"
|
||||
@click="insertRow(row, 'zTable')"
|
||||
>插入</vxe-button
|
||||
>
|
||||
<vxe-button type="text" status="primary" @click="removeRow(row, 'zTable')">删除</vxe-button>
|
||||
@ -267,6 +303,21 @@ export default {
|
||||
},
|
||||
mounted() {},
|
||||
methods: {
|
||||
async handleChange(e, row, type) {
|
||||
console.log(type, row);
|
||||
if (e.value !== 'array' && e.value !== 'object') {
|
||||
if (row.children.length) {
|
||||
let arr = this.$refs[type].getTableData().tableData;
|
||||
let id = row.children[0].parentId;
|
||||
const $table = this.$refs[type];
|
||||
for (let i = 0; i < arr.length; i++) {
|
||||
if (arr[i].parentId == id) {
|
||||
await $table.remove(arr[i]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
insertCopy() {
|
||||
this.$copyText(this.codes)
|
||||
.then((message) => {
|
||||
@ -277,8 +328,6 @@ export default {
|
||||
});
|
||||
},
|
||||
async requestData() {
|
||||
console.log(this.$refs.xTable.getTableData().tableData);
|
||||
console.log(this.filtersData((await this.$refs.xTable.getTableData().tableData) || []));
|
||||
let url, method, params, body, headers;
|
||||
url = this.interfaceData.app_name + '/' + this.interfaceData.path;
|
||||
method = this.interfaceData.method;
|
||||
@ -286,7 +335,6 @@ export default {
|
||||
body = this.filtersData((await this.$refs.yTable.getTableData().tableData) || []);
|
||||
let h = this.filtersData((await this.$refs.zTable.getTableData().tableData) || []);
|
||||
let h1 = this.filtersData((await this.$refs.zaTable.getTableData().tableData) || []);
|
||||
console.log(this.interfaceData, h, h1);
|
||||
headers = {
|
||||
...h,
|
||||
...h1,
|
||||
@ -308,8 +356,16 @@ export default {
|
||||
if (!e.parentId) {
|
||||
for (let i in e) {
|
||||
if (i == 'attribute') {
|
||||
console.log(e);
|
||||
if (e.type !== 'array') {
|
||||
console.log(e.type);
|
||||
if (e.type === 'object') {
|
||||
let obj = {};
|
||||
|
||||
e.children.map((item, index) => {
|
||||
obj = this.filtersObj(item, 1);
|
||||
});
|
||||
console.log(obj, 'objobjobj');
|
||||
x[e[i]] = obj;
|
||||
} else if (e.type !== 'array') {
|
||||
x[e[i]] = e.value || '';
|
||||
} else {
|
||||
let arr = [];
|
||||
@ -327,12 +383,25 @@ export default {
|
||||
console.log(error);
|
||||
}
|
||||
},
|
||||
filtersObj(obj) {
|
||||
// type 1 为obj属性
|
||||
filtersObj(obj, type) {
|
||||
let x = {};
|
||||
for (let i in obj) {
|
||||
if (i == 'attribute') {
|
||||
if (obj.type !== 'array') {
|
||||
x[obj[i]] = obj.value || '';
|
||||
console.log(obj, 'obj111');
|
||||
if (obj.type === 'object') {
|
||||
let oj = {};
|
||||
obj.children.map((item, index) => {
|
||||
oj[obj.attribute] = this.filtersObj(item);
|
||||
});
|
||||
console.log(oj, 'oj');
|
||||
x = oj;
|
||||
} else if (obj.type !== 'array') {
|
||||
if (type) {
|
||||
x[obj.attribute] = obj.value || '';
|
||||
} else {
|
||||
x[obj[i]] = obj.value || '';
|
||||
}
|
||||
} else {
|
||||
let arr = [];
|
||||
obj.children.map((item, index) => {
|
||||
@ -346,8 +415,7 @@ export default {
|
||||
},
|
||||
changeTab(name) {
|
||||
if (name === 'Header') {
|
||||
console.log(this.interfaceData.headerData);
|
||||
if (!this.interfaceData.headerData) {
|
||||
if (!this.$refs.zTable.getTableData().tableData.length) {
|
||||
this.insertEvent('zTable', {
|
||||
attribute: 'Content-Type',
|
||||
value: 'application/x-www-form-urlencoded',
|
||||
|
||||
@ -470,6 +470,10 @@ export default {
|
||||
value: 'array',
|
||||
label: 'Array',
|
||||
},
|
||||
{
|
||||
value: 'object',
|
||||
label: 'Object',
|
||||
},
|
||||
{
|
||||
value: 'number',
|
||||
label: 'Number',
|
||||
@ -530,7 +534,7 @@ export default {
|
||||
this.methodColor = '#49cc90';
|
||||
} else if (method == 'PUT') {
|
||||
this.methodColor = '#fca130';
|
||||
} else if (method == 'DELETE') {
|
||||
} else if (method == 'DEL' || method == 'DELETE') {
|
||||
this.methodColor = '#f93e3e';
|
||||
}
|
||||
},
|
||||
@ -567,7 +571,7 @@ export default {
|
||||
return '#49cc90';
|
||||
} else if (method == 'PUT') {
|
||||
return '#fca130';
|
||||
} else if (method == 'DELETE') {
|
||||
} else if (method == 'DEL' || method == 'DELETE') {
|
||||
return '#f93e3e';
|
||||
}
|
||||
},
|
||||
@ -1070,6 +1074,7 @@ export default {
|
||||
|
||||
.text-area {
|
||||
white-space: pre-wrap;
|
||||
word-break: break-word;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -66,7 +66,7 @@ service.interceptors.response.use(
|
||||
}
|
||||
},
|
||||
(error) => {
|
||||
return Promise.reject(error);
|
||||
// return Promise.reject(error);
|
||||
},
|
||||
);
|
||||
export default service;
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div class="code-wapper">
|
||||
<div class="i-layout-page-header header-title">
|
||||
<div class="fl_header">
|
||||
<router-link :to="{ path: $routeProStr + '/system/code_generation_list' }"
|
||||
@ -31,7 +31,7 @@
|
||||
<StorageLoc :storage="formItem.storage" />
|
||||
</Card>
|
||||
</div>
|
||||
<Card :bordered="false" dis-hover class="btn">
|
||||
<Card :bordered="false" class="btn">
|
||||
<Button class="mr20" @click="beforeTab">上一步</Button>
|
||||
<Button type="primary" @click="nextTab">{{ currentTab == 1 ? '提交' : '下一步' }}</Button>
|
||||
</Card>
|
||||
@ -92,7 +92,10 @@ export default {
|
||||
if (this.$refs.Foundation.tableField.length)
|
||||
for (let i = 0; i < this.$refs.Foundation.tableField.length; i++) {
|
||||
const el = this.$refs.Foundation.tableField[i];
|
||||
if (['addSoftDelete','addTimestamps'].indexOf(el.field_type)=== -1 && (!el.field || !el.field_type || !el.comment)) {
|
||||
if (
|
||||
['addSoftDelete', 'addTimestamps'].indexOf(el.field_type) === -1 &&
|
||||
(!el.field || !el.field_type || !el.comment)
|
||||
) {
|
||||
return this.$Message.warning('请完善sql表数据');
|
||||
}
|
||||
}
|
||||
@ -144,13 +147,19 @@ export default {
|
||||
.ivu-steps .ivu-steps-title {
|
||||
line-height: 26px;
|
||||
}
|
||||
.code-wapper {
|
||||
padding-bottom: 90px;
|
||||
}
|
||||
.btn {
|
||||
position: fixed;
|
||||
bottom: 10px;
|
||||
height: 80px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
width: 85%;
|
||||
width: 88.7%;
|
||||
background-color: rgba(255, 255, 255, 0.6);
|
||||
backdrop-filter: blur(4px);
|
||||
}
|
||||
.tab-1 {
|
||||
padding-bottom: 100px;
|
||||
|
||||
@ -77,7 +77,7 @@ export default {
|
||||
},
|
||||
addTag(state, { route, type = 'unshift' }) {
|
||||
let router = getRouteTitleHandled(route);
|
||||
console.log(router,'routerrouterrouter')
|
||||
console.log(router, 'routerrouterrouter');
|
||||
if (!routeHasExist(state.tagNavList, router)) {
|
||||
if (type === 'push') state.tagNavList.push(router);
|
||||
else {
|
||||
@ -97,6 +97,9 @@ export default {
|
||||
setHasReadErrorLoggerStatus(state, status = true) {
|
||||
state.hasReadErrorPage = status;
|
||||
},
|
||||
clearAll(state) {
|
||||
state.tagNavList = [];
|
||||
},
|
||||
},
|
||||
actions: {
|
||||
addErrorLog({ commit, rootState }, info) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user