sasp-admin 0.2.57
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/index.js +227 -0
- package/package.json +19 -0
- package/router.js +83 -0
- package/src/assets/font/iconfont.css +1346 -0
- package/src/assets/font/iconfont.eot +0 -0
- package/src/assets/font/iconfont.js +1 -0
- package/src/assets/font/iconfont.svg +827 -0
- package/src/assets/font/iconfont.ttf +0 -0
- package/src/assets/font/iconfont.woff +0 -0
- package/src/assets/images/loading-bar.gif +0 -0
- package/src/assets/js/adminInstall.js +36 -0
- package/src/assets/js/api/apiAdmin.js +613 -0
- package/src/assets/js/global/dataGlobal.js +260 -0
- package/src/assets/js/global/logGlobal.js +22 -0
- package/src/assets/js/global/paramGlobal.js +67 -0
- package/src/assets/js/global/resGlobal.js +91 -0
- package/src/assets/js/global/userGlobal.js +283 -0
- package/src/components/complexViewRendering.vue +601 -0
- package/src/components/ifmLink.vue +71 -0
- package/src/components/public/data/plDataCascader.vue +85 -0
- package/src/components/public/data/plDataRadio.vue +73 -0
- package/src/components/public/data/plDataRadioGroup.vue +70 -0
- package/src/components/public/data/plDataSelect.vue +856 -0
- package/src/components/public/data/plDatePicker.vue +159 -0
- package/src/components/public/org/bg.png +0 -0
- package/src/components/public/org/sysOrgPosUserSelect.vue +1237 -0
- package/src/components/public/org/sysOrgPosUserSelectDark.vue +1402 -0
- package/src/components/public/org/sysOrgPosUserSelectNew.vue +1527 -0
- package/src/components/public/upload/images/compress.png +0 -0
- package/src/components/public/upload/images/emipty.png +0 -0
- package/src/components/public/upload/images/excel.png +0 -0
- package/src/components/public/upload/images/file.png +0 -0
- package/src/components/public/upload/images/pdf.png +0 -0
- package/src/components/public/upload/images/powerpoint.png +0 -0
- package/src/components/public/upload/images/project.png +0 -0
- package/src/components/public/upload/images/sound.png +0 -0
- package/src/components/public/upload/images/txt.png +0 -0
- package/src/components/public/upload/images/video.png +0 -0
- package/src/components/public/upload/images/visio.png +0 -0
- package/src/components/public/upload/images/word.png +0 -0
- package/src/components/public/upload/plImage.vue +287 -0
- package/src/components/public/upload/plImgUpload.vue +137 -0
- package/src/components/public/upload/plUpload.vue +1124 -0
- package/src/components/public/upload/uploadImg.js +8 -0
- package/src/main.js +0 -0
- package/src/views/VueMenuView.vue +143 -0
- package/src/views/cloudMenuView.vue +125 -0
- package/src/views/complex/config/complex.vue +501 -0
- package/src/views/complex/config/complexSetting.vue +1250 -0
- package/src/views/complex/rendering/complexShow.vue +16 -0
- package/src/views/data/dataManage.vue +560 -0
- package/src/views/data/sysData.vue +292 -0
- package/src/views/event/eventManager/vueEventDiy.vue +1184 -0
- package/src/views/event/eventManager/vueEventMain.vue +108 -0
- package/src/views/event/eventManager/vueEventSys.vue +296 -0
- package/src/views/event/js/apiEvent.js +22 -0
- package/src/views/fileLog/fileDownloadLog.vue +437 -0
- package/src/views/initData/initData.vue +4316 -0
- package/src/views/log/dblog/logdbDevelop.vue +306 -0
- package/src/views/log/dblog/logdbEnt.vue +331 -0
- package/src/views/log/dblog/logdbGov.vue +395 -0
- package/src/views/log/error/logError.vue +553 -0
- package/src/views/log/loginlog/logManageDevOrSup.vue +357 -0
- package/src/views/log/loginlog/logManageEnt.vue +343 -0
- package/src/views/log/loginlog/logManageGov.vue +328 -0
- package/src/views/log/sms/logSms.vue +308 -0
- package/src/views/menu/component/menuManageComponent.vue +2402 -0
- package/src/views/menu/component/menuModule.vue +449 -0
- package/src/views/menu/menuLocal.vue +223 -0
- package/src/views/menu/menuManage.vue +1135 -0
- package/src/views/menu/tenantMenuManage.vue +1132 -0
- package/src/views/menuRouter/cview/cviewShow.vue +18 -0
- package/src/views/menuRouter/cviewMenuRouter.vue +183 -0
- package/src/views/menuRouter/menuView.vue +132 -0
- package/src/views/menuRouter/urlMenuRouter.vue +160 -0
- package/src/views/org/entOrgTree.vue +1050 -0
- package/src/views/org/ownerMenu/ownerMenuTree.vue +269 -0
- package/src/views/org/safeValidate/safeValidate.vue +469 -0
- package/src/views/org/sysEntOrgUserDetail.vue +3390 -0
- package/src/views/org/sysOrgDimension.vue +832 -0
- package/src/views/org/sysOrgPosUserDetail.vue +1648 -0
- package/src/views/org/sysOrgPosUserTree.vue +1101 -0
- package/src/views/org/sysOrgTree.vue +864 -0
- package/src/views/param/sysParam.vue +987 -0
- package/src/views/preview/pdfViewer.vue +82 -0
- package/src/views/resources/js/resourcesCommon.js +137 -0
- package/src/views/resources/resRouter/resView.vue +161 -0
- package/src/views/resources/resourcesTabs.vue +82 -0
- package/src/views/resources/tabs/comp/pageResPreview.vue +309 -0
- package/src/views/resources/tabs/comp/pageResRegister.vue +1120 -0
- package/src/views/resources/tabs/dataResources.vue +843 -0
- package/src/views/resources/tabs/pageResources.vue +970 -0
- package/src/views/role/allowMenu.vue +148 -0
- package/src/views/role/authRole/authRole.vue +427 -0
- package/src/views/role/authRole/component/allocateSetting.vue +1056 -0
- package/src/views/role/authRole/component/authSetting.vue +1196 -0
- package/src/views/role/commonRole/commonRole.vue +677 -0
- package/src/views/role/commonRole/compoment/allocateRoleMenuSetting.vue +335 -0
- package/src/views/role/commonRole/compoment/authLinkMenuTree.vue +55 -0
- package/src/views/role/commonRole/compoment/authSettingNew.vue +190 -0
- package/src/views/role/commonRole/compoment/commonSetting.vue +1576 -0
- package/src/views/role/commonRole/compoment/commonSettingAdjust.vue +584 -0
- package/src/views/role/commonRole/compoment/commonSettingNew.vue +572 -0
- package/src/views/role/commonRole/compoment/roleMenuPower.vue +226 -0
- package/src/views/role/commonRole/compoment/roleMenuPowerSetting.vue +69 -0
- package/src/views/role/commonRole/compoment/roleMenuSetting.vue +365 -0
- package/src/views/role/commonRole/compoment/roleSourceSetting.vue +229 -0
- package/src/views/role/commonRole/tenantCommonRole.vue +768 -0
- package/src/views/role/role.vue +135 -0
- package/src/views/role/roleMenuOption.vue +898 -0
- package/src/views/role/roleSynchroRemind.vue +399 -0
- package/src/views/role/sysRole.vue +1525 -0
- package/src/views/role/viewMenuOptDetail.vue +182 -0
- package/src/views/sms/sendSms.vue +164 -0
- package/src/views/station/orgStation.vue +561 -0
- package/src/views/tenant/appContentManager.vue +938 -0
- package/src/views/tenant/appManager.vue +642 -0
- package/src/views/tenant/tenantRoleManager.vue +670 -0
- package/src/views/tenant/tenantUserManager.vue +615 -0
- package/src/views/threeinone/compoment/safeCascadeSelect.vue +327 -0
- package/src/views/threeinone/init/safeInitRegion.vue +203 -0
- package/src/views/threeinone/safeManager.vue +927 -0
- package/src/views/threeinone/safeMenuManage.vue +565 -0
- package/src/views/threeinone/safeOrgSpv.vue +364 -0
- package/src/views/threeinone/safeSpv/safeSpvLeftTree.vue +109 -0
- package/src/views/threeinone/safeSpv/safeSpvMain.vue +335 -0
- package/src/views/threeinone/safeSpvEconView.vue +569 -0
- package/src/views/threeinone/safeValidateRegion.vue +328 -0
- package/src/views/urlResource/urlResource.vue +856 -0
- package/src/views/user/empowerUser/empowerEntUserManage.vue +415 -0
- package/src/views/user/empowerUser/empowerOrgTree.vue +167 -0
- package/src/views/user/empowerUser/empowerUserList.vue +633 -0
- package/src/views/user/empowerUser/empowerUserListMenuDeatil.vue +656 -0
- package/src/views/user/empowerUser/empowerUserListViewMenuTree.vue +257 -0
- package/src/views/user/empowerUser/empowerUserManage.vue +99 -0
- package/src/views/user/stationUserManage.vue +934 -0
- package/src/views/user/userManage.vue +737 -0
- package/src/views/user/userMangement.vue +938 -0
- package/src/views/user/viewMenu/viewMenu.vue +113 -0
- package/src/views/versionupdatetool/versionUpdateTool.vue +225 -0
- package/src/views/versionupdatetool/versioninfomation/verisonInfomationManagement.vue +68 -0
|
@@ -0,0 +1,843 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container style="height: 100%">
|
|
3
|
+
<el-aside width="200px" style="position:relative;">
|
|
4
|
+
<div class="tree-box">
|
|
5
|
+
<el-input
|
|
6
|
+
placeholder="输入关键字进行过滤"
|
|
7
|
+
v-model="filterTreeText"></el-input>
|
|
8
|
+
<el-tree
|
|
9
|
+
class="filter-tree"
|
|
10
|
+
:data="resourceData"
|
|
11
|
+
:highlight-current="true"
|
|
12
|
+
:props="defaultProps"
|
|
13
|
+
node-key="id"
|
|
14
|
+
:expand-on-click-node="false"
|
|
15
|
+
@node-click="treeNodeClick"
|
|
16
|
+
:filter-node-method="filterNode"
|
|
17
|
+
:default-expanded-keys="treeDefaultExpandedKeys"
|
|
18
|
+
ref="tree">
|
|
19
|
+
</el-tree>
|
|
20
|
+
</div>
|
|
21
|
+
</el-aside>
|
|
22
|
+
<el-main style="padding:0;">
|
|
23
|
+
<el-container style="height: 100%">
|
|
24
|
+
<el-header style="height: auto;">
|
|
25
|
+
<div class="search-form-parent el-card">
|
|
26
|
+
<el-form :inline="true" :model="crud.searchForm" size="small" class="demo-form-inline"
|
|
27
|
+
@keyup.enter.native="crud.doSearch()" onSubmit="return false;">
|
|
28
|
+
<el-form-item label="资源名称">
|
|
29
|
+
<el-input v-model="crud.searchForm.rName" style="width:130px;"></el-input>
|
|
30
|
+
</el-form-item>
|
|
31
|
+
<el-form-item label="代理地址">
|
|
32
|
+
<el-input v-model="crud.searchForm.rAgentUrl" style="width:130px;"></el-input>
|
|
33
|
+
</el-form-item>
|
|
34
|
+
<el-form-item label="请求类型">
|
|
35
|
+
<el-select v-model="crud.searchForm.rDataReqType" style="width:90px;" >
|
|
36
|
+
<el-option v-for="item in rCommon.arrRDataReqType" :label="item.name" :value="item.id"
|
|
37
|
+
:key="item.id">
|
|
38
|
+
{{item.name}}
|
|
39
|
+
</el-option>
|
|
40
|
+
</el-select>
|
|
41
|
+
</el-form-item>
|
|
42
|
+
<el-form-item label="资源状态">
|
|
43
|
+
<el-select v-model="crud.searchForm.rStatus" style="width:90px;" >
|
|
44
|
+
<el-option v-for="item in rCommon.arrRStatus" :label="item.name" :value="item.id"
|
|
45
|
+
:key="item.id">
|
|
46
|
+
{{item.name}}
|
|
47
|
+
</el-option>
|
|
48
|
+
</el-select>
|
|
49
|
+
</el-form-item>
|
|
50
|
+
<el-form-item>
|
|
51
|
+
<el-button type="primary" icon="el-icon-search" @click="crud.doSearch()">查询</el-button>
|
|
52
|
+
<el-button icon="el-icon-close" @click="crud.resetSearch()">清空</el-button>
|
|
53
|
+
</el-form-item>
|
|
54
|
+
</el-form>
|
|
55
|
+
</div>
|
|
56
|
+
</el-header>
|
|
57
|
+
<el-main id="tableMain" style="height: 100%">
|
|
58
|
+
<el-container style="height:100%" class="table-list-container">
|
|
59
|
+
<el-header style="height: auto;" size="medium">
|
|
60
|
+
<!-- <el-button type="primary" size="mini" round icon="el-icon-circle-plus" @click="crud.add()">-->
|
|
61
|
+
<!-- 新增-->
|
|
62
|
+
<!-- </el-button>-->
|
|
63
|
+
<!-- <el-button type="danger" size="mini" round icon="el-icon-delete" @click="crud.remove()">删除-->
|
|
64
|
+
<!-- </el-button>-->
|
|
65
|
+
<!-- <div style="color:red;padding-top:10px;padding-left:3px;">-->
|
|
66
|
+
<!-- 说明:调用数据资源时,访问地址格式:【后台项目地址】/resView/【代理名称】-->
|
|
67
|
+
<!-- </div>-->
|
|
68
|
+
</el-header>
|
|
69
|
+
<el-main style="height: 100%;" ref="tableMain">
|
|
70
|
+
<el-table :data="crud.dataStore.records" :ref="crud.tableRef" stripe border height="100%"
|
|
71
|
+
style="width: 100%;">
|
|
72
|
+
<el-table-column type="selection" width="40" align="center"></el-table-column>
|
|
73
|
+
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
74
|
+
|
|
75
|
+
<el-table-column label="资源名称" prop="rname"></el-table-column>
|
|
76
|
+
<el-table-column label="代理地址" prop="ragentUrl"></el-table-column>
|
|
77
|
+
<el-table-column label="请求类型" align="center" prop="rdataReqType" width="120">
|
|
78
|
+
<template slot-scope="scope">
|
|
79
|
+
{{rCommon.objRDataReqType[scope.row.rdataReqType]}}
|
|
80
|
+
</template>
|
|
81
|
+
</el-table-column>
|
|
82
|
+
<el-table-column label="资源来源" align="center" prop="rsource" width="100">
|
|
83
|
+
<template slot-scope="scope">
|
|
84
|
+
{{rCommon.objRSource[scope.row.rsource]}}
|
|
85
|
+
</template>
|
|
86
|
+
</el-table-column>
|
|
87
|
+
<el-table-column label="资源分类" prop="rclass"></el-table-column>
|
|
88
|
+
<el-table-column label="资源状态" align="center" prop="rstatus" width="90">
|
|
89
|
+
<template slot-scope="scope">
|
|
90
|
+
<el-tag :type="rCommon.objRStatusTag[scope.row.rstatus]">
|
|
91
|
+
{{rCommon.objRStatus[scope.row.rstatus]}}
|
|
92
|
+
</el-tag>
|
|
93
|
+
</template>
|
|
94
|
+
</el-table-column>
|
|
95
|
+
|
|
96
|
+
<el-table-column label="操作" align="center" width="220">
|
|
97
|
+
<template slot-scope="scope">
|
|
98
|
+
<!-- <el-button size="mini" icon="el-icon-edit" type="primary"-->
|
|
99
|
+
<!-- @click="crud.update(scope.row)">-->
|
|
100
|
+
<!-- 修改-->
|
|
101
|
+
<!-- </el-button>-->
|
|
102
|
+
|
|
103
|
+
<el-button size="mini" icon="el-icon-view" type=""
|
|
104
|
+
@click="viewData(scope.row)">
|
|
105
|
+
查看
|
|
106
|
+
</el-button>
|
|
107
|
+
|
|
108
|
+
<!-- <el-button size="mini" icon="el-icon-discover" type="warning"-->
|
|
109
|
+
<!-- @click="testData(scope.row)">-->
|
|
110
|
+
<!-- 测试-->
|
|
111
|
+
<!-- </el-button>-->
|
|
112
|
+
|
|
113
|
+
<template v-if="scope.row.rstatus=='1'">
|
|
114
|
+
<el-popconfirm title="是否确定禁用此项资源?"
|
|
115
|
+
@confirm="switchStatus(scope.row.id, '0')">
|
|
116
|
+
<el-button size="mini" icon="el-icon-error" style="margin-left: 10px;"
|
|
117
|
+
slot="reference"
|
|
118
|
+
type="danger">
|
|
119
|
+
禁用
|
|
120
|
+
</el-button>
|
|
121
|
+
</el-popconfirm>
|
|
122
|
+
</template>
|
|
123
|
+
|
|
124
|
+
<template v-if="scope.row.rstatus=='0'">
|
|
125
|
+
<el-popconfirm title="是否确定启用此项资源?"
|
|
126
|
+
@confirm="switchStatus(scope.row.id,'1')">
|
|
127
|
+
<el-button size="mini" icon="el-icon-success" style="margin-left: 10px;"
|
|
128
|
+
type="primary"
|
|
129
|
+
slot="reference">
|
|
130
|
+
启用
|
|
131
|
+
</el-button>
|
|
132
|
+
</el-popconfirm>
|
|
133
|
+
</template>
|
|
134
|
+
|
|
135
|
+
</template>
|
|
136
|
+
</el-table-column>
|
|
137
|
+
</el-table>
|
|
138
|
+
</el-main>
|
|
139
|
+
</el-container>
|
|
140
|
+
</el-main>
|
|
141
|
+
<el-footer>
|
|
142
|
+
<el-pagination
|
|
143
|
+
:ref="crud.pageRef"
|
|
144
|
+
:page-sizes="crud.pageSizes"
|
|
145
|
+
:page-size="crud.pageSize"
|
|
146
|
+
:current-page="crud.page"
|
|
147
|
+
:total="crud.dataStore.total"
|
|
148
|
+
@size-change="crud.sizeChange()"
|
|
149
|
+
@current-change="crud.currentPage()"
|
|
150
|
+
layout="total, sizes, prev, pager, next, jumper">
|
|
151
|
+
</el-pagination>
|
|
152
|
+
</el-footer>
|
|
153
|
+
</el-container>
|
|
154
|
+
</el-main>
|
|
155
|
+
<!-- </el-main>-->
|
|
156
|
+
<el-dialog title="数据资源" :visible.sync="crud.dialogVisible"
|
|
157
|
+
:close-on-press-escape="false"
|
|
158
|
+
:close-on-click-modal="false" top="5vh" width="70%"
|
|
159
|
+
height="90%" lock-scroll>
|
|
160
|
+
<el-form :ref="crud.addFormRef" :model="crud.formData" label-width="120px"
|
|
161
|
+
:size="setting.formSize"
|
|
162
|
+
style="width:95%;">
|
|
163
|
+
<el-row>
|
|
164
|
+
<el-col :span="24">
|
|
165
|
+
<el-form-item label="资源名称" prop="rname">
|
|
166
|
+
<el-input v-model="crud.formData.rname"></el-input>
|
|
167
|
+
</el-form-item>
|
|
168
|
+
</el-col>
|
|
169
|
+
</el-row>
|
|
170
|
+
<el-row>
|
|
171
|
+
<el-col :span="12">
|
|
172
|
+
<el-form-item label="代理地址" prop="ragentUrl">
|
|
173
|
+
<el-input v-model="crud.formData.ragentUrl"></el-input>
|
|
174
|
+
</el-form-item>
|
|
175
|
+
</el-col>
|
|
176
|
+
<el-col :span="12">
|
|
177
|
+
<el-form-item label="资源方法" prop="rmethodName">
|
|
178
|
+
<el-input v-model="crud.formData.rmethodName"></el-input>
|
|
179
|
+
</el-form-item>
|
|
180
|
+
</el-col>
|
|
181
|
+
</el-row>
|
|
182
|
+
<el-row>
|
|
183
|
+
<el-col :span="24">
|
|
184
|
+
<el-form-item label="资源key" prop="rKey">
|
|
185
|
+
<el-input v-model="crud.formData.rKey"></el-input>
|
|
186
|
+
</el-form-item>
|
|
187
|
+
</el-col>
|
|
188
|
+
</el-row>
|
|
189
|
+
<el-row>
|
|
190
|
+
<el-col :span="12">
|
|
191
|
+
<el-form-item label="资源来源" prop="rsource">
|
|
192
|
+
<el-select v-model="crud.formData.rsource">
|
|
193
|
+
<el-option v-for="item in rCommon.arrRSource"
|
|
194
|
+
:label="item.name" :value="item.id"
|
|
195
|
+
:key="item.id">
|
|
196
|
+
{{item.name}}
|
|
197
|
+
</el-option>
|
|
198
|
+
</el-select>
|
|
199
|
+
</el-form-item>
|
|
200
|
+
</el-col>
|
|
201
|
+
|
|
202
|
+
<el-col :span="12">
|
|
203
|
+
<el-form-item label="请求类型" prop="rType">
|
|
204
|
+
<el-select v-model="crud.formData.rdataReqType">
|
|
205
|
+
<el-option v-for="item in rCommon.arrRDataReqType" :label="item.name" :value="item.id"
|
|
206
|
+
:key="item.id">
|
|
207
|
+
{{item.name}}
|
|
208
|
+
</el-option>
|
|
209
|
+
</el-select>
|
|
210
|
+
</el-form-item>
|
|
211
|
+
</el-col>
|
|
212
|
+
</el-row>
|
|
213
|
+
<el-row>
|
|
214
|
+
<el-col :span="12">
|
|
215
|
+
<el-form-item label="资源分类" prop="rclass">
|
|
216
|
+
<el-input v-model="crud.formData.rclass"></el-input>
|
|
217
|
+
</el-form-item>
|
|
218
|
+
</el-col>
|
|
219
|
+
<el-col :span="12">
|
|
220
|
+
<el-form-item label="资源分类ID" prop="rclassId">
|
|
221
|
+
<el-input v-model="crud.formData.rclassId"></el-input>
|
|
222
|
+
</el-form-item>
|
|
223
|
+
</el-col>
|
|
224
|
+
</el-row>
|
|
225
|
+
|
|
226
|
+
<el-row>
|
|
227
|
+
<el-col :span="24">
|
|
228
|
+
<el-form-item label="资源状态" prop="rType">
|
|
229
|
+
<el-radio-group v-model="crud.formData.rstatus">
|
|
230
|
+
<el-radio-button v-for="item in rCommon.arrRStatus"
|
|
231
|
+
:key="item.id" :label="item.id">
|
|
232
|
+
{{item.name}}
|
|
233
|
+
</el-radio-button>
|
|
234
|
+
</el-radio-group>
|
|
235
|
+
</el-form-item>
|
|
236
|
+
</el-col>
|
|
237
|
+
</el-row>
|
|
238
|
+
|
|
239
|
+
<el-row v-show="crud.formData.rdataReqType=='query'">
|
|
240
|
+
<el-col :span="24">
|
|
241
|
+
<h2 style="text-align: center;line-height: 50px;">权限信息</h2>
|
|
242
|
+
</el-col>
|
|
243
|
+
</el-row>
|
|
244
|
+
|
|
245
|
+
<el-row v-show="crud.formData.rdataReqType=='query'">
|
|
246
|
+
<el-col :span="24">
|
|
247
|
+
<el-form-item label="数据权限" prop="rDataAuthoritys">
|
|
248
|
+
<el-input v-model="crud.formData.rDataAuthoritys"
|
|
249
|
+
type="textarea" :rows="6"></el-input>
|
|
250
|
+
</el-form-item>
|
|
251
|
+
</el-col>
|
|
252
|
+
</el-row>
|
|
253
|
+
|
|
254
|
+
<el-row>
|
|
255
|
+
<el-col :span="24">
|
|
256
|
+
<h2 style="text-align: center;line-height: 50px;">参数信息</h2>
|
|
257
|
+
</el-col>
|
|
258
|
+
</el-row>
|
|
259
|
+
|
|
260
|
+
<el-row>
|
|
261
|
+
<el-col :span="24">
|
|
262
|
+
<el-form-item label="是否限制入参" prop="rifRestrictedParams">
|
|
263
|
+
<el-radio-group v-model="crud.formData.rifRestrictedParams">
|
|
264
|
+
<el-radio-button
|
|
265
|
+
v-for="item in rCommon.arrRIfRestrictedParams"
|
|
266
|
+
:key="item.id"
|
|
267
|
+
:label="item.id">
|
|
268
|
+
{{item.name}}
|
|
269
|
+
</el-radio-button>
|
|
270
|
+
</el-radio-group>
|
|
271
|
+
</el-form-item>
|
|
272
|
+
</el-col>
|
|
273
|
+
</el-row>
|
|
274
|
+
<el-row>
|
|
275
|
+
<el-col :span="24">
|
|
276
|
+
<el-form-item label="参数列表" prop="rParamLists">
|
|
277
|
+
<el-input v-model="crud.formData.rParamLists" type="textarea"
|
|
278
|
+
:rows="10"></el-input>
|
|
279
|
+
</el-form-item>
|
|
280
|
+
</el-col>
|
|
281
|
+
</el-row>
|
|
282
|
+
</el-form>
|
|
283
|
+
<div slot="footer" class="dialog-footer">
|
|
284
|
+
<el-button type="primary" @click="crud.formSubmit()">确 定</el-button>
|
|
285
|
+
<el-button @click="crud.dialogVisible = false">取 消</el-button>
|
|
286
|
+
</div>
|
|
287
|
+
</el-dialog>
|
|
288
|
+
|
|
289
|
+
|
|
290
|
+
<!-- 查看窗口 -->
|
|
291
|
+
<el-dialog :visible.sync="viewDialogVisible" top="5vh" width="80%"
|
|
292
|
+
height="90%" lock-scroll>
|
|
293
|
+
<span slot="title">
|
|
294
|
+
查看资源({{pageUrl(viewFormData)}})
|
|
295
|
+
</span>
|
|
296
|
+
<el-form label-width="120px" :disabled="true"
|
|
297
|
+
:size="setting.formSize"
|
|
298
|
+
style="width:100%;">
|
|
299
|
+
<el-row>
|
|
300
|
+
<el-col :span="24">
|
|
301
|
+
<el-form-item label="资源名称" prop="rname">
|
|
302
|
+
<el-input v-model="viewFormData.rname"></el-input>
|
|
303
|
+
</el-form-item>
|
|
304
|
+
</el-col>
|
|
305
|
+
</el-row>
|
|
306
|
+
<el-row>
|
|
307
|
+
<el-col :span="12">
|
|
308
|
+
<el-form-item label="代理地址" prop="ragentUrl">
|
|
309
|
+
<el-input v-model="viewFormData.ragentUrl"></el-input>
|
|
310
|
+
</el-form-item>
|
|
311
|
+
</el-col>
|
|
312
|
+
<el-col :span="12">
|
|
313
|
+
<el-form-item label="资源方法" prop="rmethodName">
|
|
314
|
+
<el-input v-model="viewFormData.rmethodName"></el-input>
|
|
315
|
+
</el-form-item>
|
|
316
|
+
</el-col>
|
|
317
|
+
</el-row>
|
|
318
|
+
<!-- <el-row>-->
|
|
319
|
+
<!-- <el-col :span="24">-->
|
|
320
|
+
<!-- <el-form-item label="资源key" prop="rKey">-->
|
|
321
|
+
<!-- <el-input v-model="viewFormData.rKey"></el-input>-->
|
|
322
|
+
<!-- </el-form-item>-->
|
|
323
|
+
<!-- </el-col>-->
|
|
324
|
+
<!-- </el-row>-->
|
|
325
|
+
<el-row>
|
|
326
|
+
<el-col :span="12">
|
|
327
|
+
<el-form-item label="资源来源" prop="rsource">
|
|
328
|
+
<el-select v-model="viewFormData.rsource">
|
|
329
|
+
<el-option v-for="item in rCommon.arrRSource"
|
|
330
|
+
:label="item.name" :value="item.id"
|
|
331
|
+
:key="item.id">
|
|
332
|
+
{{item.name}}
|
|
333
|
+
</el-option>
|
|
334
|
+
</el-select>
|
|
335
|
+
</el-form-item>
|
|
336
|
+
</el-col>
|
|
337
|
+
|
|
338
|
+
<el-col :span="12">
|
|
339
|
+
<el-form-item label="请求类型" prop="rType">
|
|
340
|
+
<el-select v-model="viewFormData.rdataReqType">
|
|
341
|
+
<el-option v-for="item in rCommon.arrRDataReqType" :label="item.name" :value="item.id"
|
|
342
|
+
:key="item.id">
|
|
343
|
+
{{item.name}}
|
|
344
|
+
</el-option>
|
|
345
|
+
</el-select>
|
|
346
|
+
</el-form-item>
|
|
347
|
+
</el-col>
|
|
348
|
+
</el-row>
|
|
349
|
+
<el-row>
|
|
350
|
+
<el-col :span="12">
|
|
351
|
+
<el-form-item label="请求方式" prop="rType">
|
|
352
|
+
{{viewFormData.rrequestType}}
|
|
353
|
+
</el-form-item>
|
|
354
|
+
</el-col>
|
|
355
|
+
<el-col :span="12">
|
|
356
|
+
<el-form-item label="资源分类" prop="rclass">
|
|
357
|
+
<el-input v-model="viewFormData.rclass"></el-input>
|
|
358
|
+
</el-form-item>
|
|
359
|
+
</el-col>
|
|
360
|
+
</el-row>
|
|
361
|
+
<el-row>
|
|
362
|
+
<el-col :span="24">
|
|
363
|
+
<el-form-item label="资源状态" prop="rType">
|
|
364
|
+
<!-- <el-radio-group v-model="viewFormData.rstatus">-->
|
|
365
|
+
<!-- <el-radio-button v-for="item in rCommon.arrRStatus"-->
|
|
366
|
+
<!-- :key="item.id" :label="item.id">-->
|
|
367
|
+
<!-- {{item.name}}-->
|
|
368
|
+
<!-- </el-radio-button>-->
|
|
369
|
+
<!-- </el-radio-group>-->
|
|
370
|
+
<el-tag :type="rCommon.objRStatusTag[viewFormData.rstatus]">
|
|
371
|
+
{{rCommon.objRStatus[viewFormData.rstatus]}}
|
|
372
|
+
</el-tag>
|
|
373
|
+
</el-form-item>
|
|
374
|
+
</el-col>
|
|
375
|
+
</el-row>
|
|
376
|
+
|
|
377
|
+
<el-row v-show="viewFormData.rdataReqType=='query'">
|
|
378
|
+
<el-col :span="24">
|
|
379
|
+
<h2 style="text-align: center;line-height: 50px;">权限信息</h2>
|
|
380
|
+
</el-col>
|
|
381
|
+
</el-row>
|
|
382
|
+
|
|
383
|
+
<el-row v-show="viewFormData.rdataReqType=='query'">
|
|
384
|
+
<el-col :span="24">
|
|
385
|
+
<el-form-item label="数据权限" prop="rDataAuthoritys">
|
|
386
|
+
<el-tag v-for="item in rCommon.getArrRDataAuthoritys(viewFormData)" :key="item.key"
|
|
387
|
+
type="danger"
|
|
388
|
+
style="margin-right:15px;">
|
|
389
|
+
{{`${item.key}-${item.name}`}}
|
|
390
|
+
</el-tag>
|
|
391
|
+
</el-form-item>
|
|
392
|
+
</el-col>
|
|
393
|
+
</el-row>
|
|
394
|
+
|
|
395
|
+
<el-row>
|
|
396
|
+
<el-col :span="24">
|
|
397
|
+
<h2 style="text-align: center;line-height: 50px;">参数信息</h2>
|
|
398
|
+
</el-col>
|
|
399
|
+
</el-row>
|
|
400
|
+
|
|
401
|
+
<el-row>
|
|
402
|
+
<el-col :span="24">
|
|
403
|
+
<el-form-item label="是否限制入参" prop="rifRestrictedParams">
|
|
404
|
+
<!-- <el-radio-group v-model="viewFormData.rifRestrictedParams">-->
|
|
405
|
+
<!-- <el-radio-button-->
|
|
406
|
+
<!-- v-for="item in rCommon.arrRIfRestrictedParams"-->
|
|
407
|
+
<!-- :key="item.id"-->
|
|
408
|
+
<!-- :label="item.id">-->
|
|
409
|
+
<el-tag type="default">
|
|
410
|
+
{{rCommon.objRIfRestrictedParams[viewFormData.rifRestrictedParams]}}
|
|
411
|
+
</el-tag>
|
|
412
|
+
|
|
413
|
+
<!-- </el-radio-button>-->
|
|
414
|
+
<!-- </el-radio-group>-->
|
|
415
|
+
</el-form-item>
|
|
416
|
+
</el-col>
|
|
417
|
+
</el-row>
|
|
418
|
+
<el-row>
|
|
419
|
+
<el-col :span="24">
|
|
420
|
+
|
|
421
|
+
<el-table :data="rCommon.getArrRParamLists(viewFormData)" stripe border height="100%"
|
|
422
|
+
style="width: 100%;">
|
|
423
|
+
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
424
|
+
<el-table-column label="参数名称" align="center" min-width="80" prop="fieldName"></el-table-column>
|
|
425
|
+
<el-table-column label="参数描述" align="center" min-width="80" prop="chfieldName"></el-table-column>
|
|
426
|
+
<!--<el-table-column label="对应列" align="center" min-width="80" prop="column"></el-table-column>-->
|
|
427
|
+
<el-table-column label="参数类型" align="center" min-width="100"
|
|
428
|
+
v-if="viewFormData.rdataReqType=='query'">
|
|
429
|
+
<template slot-scope="scope">
|
|
430
|
+
{{scope.row.fieldType ? fieldTypeObj[scope.row.fieldType] : ''}}
|
|
431
|
+
</template>
|
|
432
|
+
</el-table-column>
|
|
433
|
+
</el-table>
|
|
434
|
+
</el-col>
|
|
435
|
+
</el-row>
|
|
436
|
+
</el-form>
|
|
437
|
+
<div slot="footer" class="dialog-footer">
|
|
438
|
+
<!-- <el-button @click="testData(viewFormData)" type="primary">测 试</el-button>-->
|
|
439
|
+
<el-button @click="viewDialogVisible = false">关 闭</el-button>
|
|
440
|
+
</div>
|
|
441
|
+
</el-dialog>
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
<!-- 测试窗口 -->
|
|
445
|
+
<el-dialog :visible.sync="testDialogVisible" top="5vh" width="80%"
|
|
446
|
+
height="90%" lock-scroll>
|
|
447
|
+
<span slot="title">
|
|
448
|
+
{{testFormData.rname}}({{rCommon.objRDataReqType[testFormData.rdataReqType]}})
|
|
449
|
+
<template v-if="testFormData.rstatus=='0'">(<span style="color:red;">已禁用</span>)</template>
|
|
450
|
+
</span>
|
|
451
|
+
<el-form label-width="120px" ref="testFormEl"
|
|
452
|
+
:size="setting.formSize"
|
|
453
|
+
style="width:92%;margin:0 auto;">
|
|
454
|
+
<el-row>
|
|
455
|
+
<el-col :span="24">
|
|
456
|
+
<el-input v-model="testFormData.rFullReqUrl">
|
|
457
|
+
<el-button slot="append" icon="el-icon-s-promotion" @click="sendTest(testFormData)">发送
|
|
458
|
+
</el-button>
|
|
459
|
+
</el-input>
|
|
460
|
+
</el-col>
|
|
461
|
+
</el-row>
|
|
462
|
+
<el-row>
|
|
463
|
+
<el-col :span="24">
|
|
464
|
+
<el-card class="page-resources-auth-card" style="margin-top:20px;">
|
|
465
|
+
<div slot="header" class="clearfix">
|
|
466
|
+
<h3>请求参数({{testFormData.rIfRestrictedParams=='1'?'限制入参':'不限制入参'}})</h3>
|
|
467
|
+
</div>
|
|
468
|
+
|
|
469
|
+
<el-table :data="testFormData.arrRParamLists" stripe border height="100%"
|
|
470
|
+
style="width: 100%;">
|
|
471
|
+
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
472
|
+
|
|
473
|
+
<el-table-column label="参数名称" align="center" min-width="80"
|
|
474
|
+
prop="key"></el-table-column>
|
|
475
|
+
<el-table-column label="参数描述" align="center" min-width="80"
|
|
476
|
+
prop="name"></el-table-column>
|
|
477
|
+
<el-table-column label="对应列" align="center" min-width="80"
|
|
478
|
+
prop="column"></el-table-column>
|
|
479
|
+
<el-table-column label="参数类型" align="center" min-width="100"
|
|
480
|
+
v-if="testFormData.rdataReqType=='query'">
|
|
481
|
+
<template slot-scope="scope">
|
|
482
|
+
{{scope.row.mode}}({{scope.row.modeDesc}})
|
|
483
|
+
</template>
|
|
484
|
+
</el-table-column>
|
|
485
|
+
|
|
486
|
+
<el-table-column label="参数值" align="center" min-width="120">
|
|
487
|
+
<template slot-scope="scope">
|
|
488
|
+
<el-input v-model="scope.row.value" clearable></el-input>
|
|
489
|
+
</template>
|
|
490
|
+
</el-table-column>
|
|
491
|
+
</el-table>
|
|
492
|
+
</el-card>
|
|
493
|
+
</el-col>
|
|
494
|
+
</el-row>
|
|
495
|
+
|
|
496
|
+
<el-row>
|
|
497
|
+
<el-col :span="24">
|
|
498
|
+
<el-card class="page-resources-auth-card" style="margin-top:20px;">
|
|
499
|
+
<div slot="header" class="clearfix">
|
|
500
|
+
<h3>返回结果</h3>
|
|
501
|
+
</div>
|
|
502
|
+
<div style="overflow: auto;">
|
|
503
|
+
<pre>
|
|
504
|
+
{{testFormData.resData}}
|
|
505
|
+
</pre>
|
|
506
|
+
</div>
|
|
507
|
+
|
|
508
|
+
</el-card>
|
|
509
|
+
</el-col>
|
|
510
|
+
</el-row>
|
|
511
|
+
</el-form>
|
|
512
|
+
|
|
513
|
+
<div slot="footer" class="dialog-footer">
|
|
514
|
+
<el-button @click="testDialogVisible = false">关 闭</el-button>
|
|
515
|
+
</div>
|
|
516
|
+
</el-dialog>
|
|
517
|
+
</el-container>
|
|
518
|
+
</template>
|
|
519
|
+
|
|
520
|
+
<script>
|
|
521
|
+
import rCommon from "../js/resourcesCommon";
|
|
522
|
+
|
|
523
|
+
export default {
|
|
524
|
+
name: "data-resources",
|
|
525
|
+
props: {},
|
|
526
|
+
data() {
|
|
527
|
+
let vm = this;
|
|
528
|
+
return {
|
|
529
|
+
crud: new this.CrudUtil({
|
|
530
|
+
vue: this,
|
|
531
|
+
url: this.api.resources.url,
|
|
532
|
+
searchForm: {
|
|
533
|
+
rType: "data",
|
|
534
|
+
order:"R_SOURCE,R_CLASS"
|
|
535
|
+
},
|
|
536
|
+
noClearSearchColumns: ["rType","rClass","rSource","order"],
|
|
537
|
+
afterSubmit() {
|
|
538
|
+
vm.initRClassOptions();
|
|
539
|
+
},
|
|
540
|
+
afterRemoveSuccess() {
|
|
541
|
+
vm.initRClassOptions();
|
|
542
|
+
},
|
|
543
|
+
addDefaultData: {
|
|
544
|
+
rType: "data",
|
|
545
|
+
rstatus: "1",
|
|
546
|
+
rIfRestrictedParams: "0"
|
|
547
|
+
}
|
|
548
|
+
}),
|
|
549
|
+
viewDialogVisible: false,
|
|
550
|
+
testDialogVisible: false,
|
|
551
|
+
viewFormData: {},
|
|
552
|
+
testFormData: {},
|
|
553
|
+
projUrl: this.CTX,
|
|
554
|
+
rCommon: rCommon,
|
|
555
|
+
rClassOptions: [],
|
|
556
|
+
resourceData:[],
|
|
557
|
+
filterTreeText: "",//树搜索
|
|
558
|
+
treeDefaultExpandedKeys:[],
|
|
559
|
+
defaultProps:{"children":"children","label":"label"},//树数据显示配置
|
|
560
|
+
|
|
561
|
+
fieldTypeObj:{
|
|
562
|
+
"1": "字符串",
|
|
563
|
+
"6": "字符串",
|
|
564
|
+
"2": "字符串",
|
|
565
|
+
"3": "字符串",
|
|
566
|
+
"4": "字符串",
|
|
567
|
+
"10": "字符串",
|
|
568
|
+
"7": "字符串",
|
|
569
|
+
"5":"字符串",
|
|
570
|
+
"9":"整数"
|
|
571
|
+
},
|
|
572
|
+
};
|
|
573
|
+
},
|
|
574
|
+
|
|
575
|
+
created() {
|
|
576
|
+
this.init();
|
|
577
|
+
},
|
|
578
|
+
watch: {
|
|
579
|
+
filterTreeText(val) {
|
|
580
|
+
this.$refs.tree.filter(val);
|
|
581
|
+
},
|
|
582
|
+
},
|
|
583
|
+
methods: {
|
|
584
|
+
init() {
|
|
585
|
+
// this.initRClassOptions();
|
|
586
|
+
this.initResourceData();
|
|
587
|
+
},
|
|
588
|
+
filterNode(value, data) {
|
|
589
|
+
if (!value) return true;
|
|
590
|
+
return data.label.indexOf(value) !== -1;
|
|
591
|
+
},
|
|
592
|
+
/**
|
|
593
|
+
* 树节点点击事件
|
|
594
|
+
*
|
|
595
|
+
*/
|
|
596
|
+
treeNodeClick(data) {
|
|
597
|
+
let vm = this;
|
|
598
|
+
if(data.id == "all") {
|
|
599
|
+
delete this.crud.searchForm["rClass"];
|
|
600
|
+
delete this.crud.searchForm["rSource"];
|
|
601
|
+
}else{
|
|
602
|
+
if(data.parentId=="all"){
|
|
603
|
+
this.crud.searchForm["rSource"]=data["id"];
|
|
604
|
+
delete this.crud.searchForm["rClass"];
|
|
605
|
+
}else{
|
|
606
|
+
this.crud.searchForm["rSource"]=data["parentId"];
|
|
607
|
+
this.crud.searchForm["rClass"]=data["id"];
|
|
608
|
+
}
|
|
609
|
+
}
|
|
610
|
+
this.crud.doSearch();
|
|
611
|
+
},
|
|
612
|
+
initResourceData(){
|
|
613
|
+
let vm = this;
|
|
614
|
+
let param = Object.assign({},this.crud.searchForm);
|
|
615
|
+
param["groupField"]="R_SOURCE,R_CLASS";
|
|
616
|
+
this.axios.post(this.api.resources.find, param).then(res => {
|
|
617
|
+
if (res && res.data) {
|
|
618
|
+
let treeArr = [];
|
|
619
|
+
treeArr.push({"id": "all", "label": "全部", "value": "全部", "parentId": "-1"});
|
|
620
|
+
let treeData = res.data;
|
|
621
|
+
let treeDefineArr = ["rsource","rclass"];
|
|
622
|
+
let dataMap = {};
|
|
623
|
+
let fieldDataMap = {};
|
|
624
|
+
let fieldDataMapTemp = {};
|
|
625
|
+
for (let i = 0; i < treeDefineArr.length; i++) {
|
|
626
|
+
let cjmap = new Map();
|
|
627
|
+
for (let j = 0; j < treeData.length; j++) {
|
|
628
|
+
let label = "空";
|
|
629
|
+
let value = "eq(null)";
|
|
630
|
+
let tmpId = "";
|
|
631
|
+
if (treeData[j] && treeData[j][treeDefineArr[i]]) {
|
|
632
|
+
let val = treeData[j][treeDefineArr[i]];
|
|
633
|
+
tmpId = val;
|
|
634
|
+
if(treeDefineArr[i]=="rsource"){
|
|
635
|
+
val = vm.rCommon.objRSource[val]||val;
|
|
636
|
+
}
|
|
637
|
+
if (val.indexOf("nocombo") > -1) {
|
|
638
|
+
value = val.split(":")[2];
|
|
639
|
+
label = val.split(":")[1];
|
|
640
|
+
} else if (val.indexOf("combo") > -1) {
|
|
641
|
+
value = val;
|
|
642
|
+
label = val.split(":")[1];
|
|
643
|
+
} else {
|
|
644
|
+
label = val;
|
|
645
|
+
value = val;
|
|
646
|
+
}
|
|
647
|
+
}
|
|
648
|
+
let fieldmap = {};
|
|
649
|
+
fieldmap[treeDefineArr[i]] = value;
|
|
650
|
+
//第一轮,上级是all
|
|
651
|
+
if (i == 0) {
|
|
652
|
+
dataMap[j] = tmpId;
|
|
653
|
+
fieldDataMap[j] = Object.assign({}, fieldmap);
|
|
654
|
+
if ((i == 0 && !cjmap.has(value) || (i > 0 && !cjmap.has(dataMap[j] + "_" + tmpId)))) {
|
|
655
|
+
cjmap.set(value, j);
|
|
656
|
+
treeArr.push({
|
|
657
|
+
"id": tmpId,
|
|
658
|
+
"parentId": "all",
|
|
659
|
+
"label": label,
|
|
660
|
+
"value": value,
|
|
661
|
+
"field": treeDefineArr[i],
|
|
662
|
+
"fielddata": fieldmap
|
|
663
|
+
});
|
|
664
|
+
}
|
|
665
|
+
|
|
666
|
+
} else {
|
|
667
|
+
fieldDataMap[j] = Object.assign(fieldDataMap[j], fieldmap);
|
|
668
|
+
fieldDataMapTemp[j] = Object.assign({},fieldDataMap[j]);
|
|
669
|
+
|
|
670
|
+
if ((i == 0 && !cjmap.has(value) || (i > 0 && !cjmap.has(dataMap[j] + "_" + tmpId)))) {
|
|
671
|
+
cjmap.set(dataMap[j] + "_" + value, j);
|
|
672
|
+
if(label == "空"){
|
|
673
|
+
continue;
|
|
674
|
+
}
|
|
675
|
+
treeArr.push({
|
|
676
|
+
"id": tmpId,
|
|
677
|
+
"parentId": dataMap[j],
|
|
678
|
+
"label": label,
|
|
679
|
+
"value": value,
|
|
680
|
+
"field": treeDefineArr[i],
|
|
681
|
+
"fielddata": fieldDataMapTemp[j]
|
|
682
|
+
});
|
|
683
|
+
}
|
|
684
|
+
dataMap[j] = value;
|
|
685
|
+
}
|
|
686
|
+
}
|
|
687
|
+
}
|
|
688
|
+
vm.resourceData = vm.COMMON_FUNC.buildElTree(treeArr);
|
|
689
|
+
//默认展开根节点
|
|
690
|
+
vm.treeDefaultExpandedKeys.push(vm.resourceData[0].id);
|
|
691
|
+
}
|
|
692
|
+
});
|
|
693
|
+
},
|
|
694
|
+
initRClassOptions() {
|
|
695
|
+
this.axios.post(this.api.resources.getPageClass).then(res => {
|
|
696
|
+
let setSources = new Set();
|
|
697
|
+
let objSources = {};
|
|
698
|
+
res.data.forEach(data => {
|
|
699
|
+
setSources.add(data.rsource);
|
|
700
|
+
|
|
701
|
+
if (!objSources[data.rsource]) {
|
|
702
|
+
objSources[data.rsource] = [];
|
|
703
|
+
}
|
|
704
|
+
data.id = data.rclass;
|
|
705
|
+
data.name = data.rclass;
|
|
706
|
+
objSources[data.rsource].push(data);
|
|
707
|
+
});
|
|
708
|
+
let rClassOptions = [...this.rCommon.arrRSource];
|
|
709
|
+
for (let i = rClassOptions.length - 1; i >= 0; i--) {
|
|
710
|
+
if (!setSources.has(rClassOptions[i].id)) {
|
|
711
|
+
rClassOptions.splice(i, 1);
|
|
712
|
+
} else {
|
|
713
|
+
(objSources[rClassOptions[i].id]) && (rClassOptions[i].children = objSources[rClassOptions[i].id]);
|
|
714
|
+
}
|
|
715
|
+
}
|
|
716
|
+
|
|
717
|
+
this.rClassOptions = rClassOptions;
|
|
718
|
+
});
|
|
719
|
+
},
|
|
720
|
+
|
|
721
|
+
rSourceAndClassChange() {
|
|
722
|
+
this.crud.searchForm.rSourceAndClass = '';
|
|
723
|
+
if (this.crud.searchForm.rSourceAndClassArr.length > 0) {
|
|
724
|
+
this.crud.searchForm.rSourceAndClass = this.crud.searchForm.rSourceAndClassArr[this.crud.searchForm.rSourceAndClassArr.length - 1];
|
|
725
|
+
}
|
|
726
|
+
},
|
|
727
|
+
|
|
728
|
+
/**
|
|
729
|
+
* 切换资源状态
|
|
730
|
+
*/
|
|
731
|
+
switchStatus(id, rstatus) {
|
|
732
|
+
this.axios.post(this.api.resources.update, {"id":id, "rStatus":rstatus}).then(res => {
|
|
733
|
+
if (!res.data.operateSuccess) {
|
|
734
|
+
this.$message.error("修改失败");
|
|
735
|
+
return;
|
|
736
|
+
}
|
|
737
|
+
this.crud.search();
|
|
738
|
+
this.$message({
|
|
739
|
+
duration: 1000,
|
|
740
|
+
type: 'success',
|
|
741
|
+
message: `已${rstatus == '0' ? '禁用' : '启用'}资源`
|
|
742
|
+
});
|
|
743
|
+
});
|
|
744
|
+
},
|
|
745
|
+
|
|
746
|
+
/**
|
|
747
|
+
* 查看数据
|
|
748
|
+
* @param data
|
|
749
|
+
*/
|
|
750
|
+
viewData(data) {
|
|
751
|
+
this.viewFormData = data;
|
|
752
|
+
this.axios.post(this.api.resources.findResources,{'id':data.id}).then(res =>{ //获取绑定资源数据
|
|
753
|
+
if(res.data && res.data.operateObj&& res.data.operateObj.length>0){
|
|
754
|
+
this.viewFormData = res.data.operateObj[0];
|
|
755
|
+
let operatePermis = this.viewFormData.operatePermisList ||[]; //操作权限
|
|
756
|
+
let dataPermis = this.viewFormData.dataPermisList || []; //数据权限
|
|
757
|
+
let paramSetting = {};
|
|
758
|
+
paramSetting["id"] = "id";
|
|
759
|
+
paramSetting["parentTree"] = "parentTree";
|
|
760
|
+
paramSetting["pId"] = "parentId"; //上级数据
|
|
761
|
+
paramSetting["children"] = "children"; // 设置children可配置
|
|
762
|
+
this.viewFormData.rOperationAuthoritys = JSON.stringify(this.COMMON_FUNC.buildElTree(operatePermis,paramSetting)|| []);
|
|
763
|
+
this.viewFormData.rDataAuthoritys = JSON.stringify(this.COMMON_FUNC.buildElTree(dataPermis,paramSetting)|| []);
|
|
764
|
+
}
|
|
765
|
+
});
|
|
766
|
+
this.viewDialogVisible = true;
|
|
767
|
+
},
|
|
768
|
+
|
|
769
|
+
/**
|
|
770
|
+
* 测试数据
|
|
771
|
+
* @param data
|
|
772
|
+
*/
|
|
773
|
+
testData(data) {
|
|
774
|
+
data.rFullReqUrl = this.pageUrl(data);
|
|
775
|
+
data.resData = "";
|
|
776
|
+
data.arrRParamLists = this.rCommon.getArrRParamLists(data);
|
|
777
|
+
data.arrRParamLists.forEach(d => {
|
|
778
|
+
d.value = "";
|
|
779
|
+
});
|
|
780
|
+
this.testFormData = data;
|
|
781
|
+
this.testDialogVisible = true;
|
|
782
|
+
},
|
|
783
|
+
|
|
784
|
+
pageUrl(data) {
|
|
785
|
+
return this.projUrl + "/resView/" + data.ragentUrl;
|
|
786
|
+
},
|
|
787
|
+
|
|
788
|
+
/**
|
|
789
|
+
* 测试发送
|
|
790
|
+
* @param formData 数据
|
|
791
|
+
*/
|
|
792
|
+
sendTest(formData) {
|
|
793
|
+
let objParam = {};
|
|
794
|
+
formData.arrRParamLists.forEach(data => {
|
|
795
|
+
data.value && (objParam[data.key] = data.value);
|
|
796
|
+
});
|
|
797
|
+
|
|
798
|
+
|
|
799
|
+
let loading = this.$loading({
|
|
800
|
+
target: this.$refs["testFormEl"].$el,
|
|
801
|
+
lock: true,
|
|
802
|
+
text: '正在请求,请稍后...',
|
|
803
|
+
spinner: 'el-icon-loading',
|
|
804
|
+
background: 'rgba(0, 0, 0, 0.6)'
|
|
805
|
+
});
|
|
806
|
+
|
|
807
|
+
this.axios.post(formData.rFullReqUrl, objParam).then(res => {
|
|
808
|
+
loading.close();
|
|
809
|
+
this.$message({
|
|
810
|
+
duration: 1000,
|
|
811
|
+
message: "请求完成",
|
|
812
|
+
type: "success"
|
|
813
|
+
});
|
|
814
|
+
|
|
815
|
+
formData.resData = JSON.stringify(res.data, null, 4);
|
|
816
|
+
this.$forceUpdate();
|
|
817
|
+
});
|
|
818
|
+
}
|
|
819
|
+
|
|
820
|
+
}
|
|
821
|
+
}
|
|
822
|
+
</script>
|
|
823
|
+
|
|
824
|
+
<style scoped lang="scss">
|
|
825
|
+
.custom-tree-node {
|
|
826
|
+
flex: 1;
|
|
827
|
+
display: flex;
|
|
828
|
+
align-items: center;
|
|
829
|
+
justify-content: space-between;
|
|
830
|
+
font-size: 14px;
|
|
831
|
+
padding-right: 8px;
|
|
832
|
+
}
|
|
833
|
+
|
|
834
|
+
#leftTreeController {
|
|
835
|
+
border: 1px solid #ddd;
|
|
836
|
+
border-radius: 3px;
|
|
837
|
+
position: absolute;
|
|
838
|
+
top: 10px;
|
|
839
|
+
left: 10px;
|
|
840
|
+
right: 10px;
|
|
841
|
+
bottom: 10px;
|
|
842
|
+
}
|
|
843
|
+
</style>
|