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,938 @@
|
|
|
1
|
+
<template>
|
|
2
|
+
<el-container class="form-list" style="height: 100%;">
|
|
3
|
+
<el-header style="height: auto;">
|
|
4
|
+
<div class="search-form-parent el-card">
|
|
5
|
+
<el-form :inline="true" size="small" class="demo-form-inline" onSubmit="return false;">
|
|
6
|
+
<el-form-item label="内容名称">
|
|
7
|
+
<el-input v-model="crud.searchForm.contentName"></el-input>
|
|
8
|
+
</el-form-item>
|
|
9
|
+
<el-form-item>
|
|
10
|
+
<el-button type="primary" icon="el-icon-search" @click="crud.doSearch()">查询</el-button>
|
|
11
|
+
<el-button icon="el-icon-close" @click="crud.resetSearch()">清空</el-button>
|
|
12
|
+
</el-form-item>
|
|
13
|
+
</el-form>
|
|
14
|
+
</div>
|
|
15
|
+
</el-header>
|
|
16
|
+
<el-main style="padding:10px 0 0 0;height: 100%;">
|
|
17
|
+
<el-container style="height: 100%;">
|
|
18
|
+
<el-header style="height: auto;">
|
|
19
|
+
<el-button type="danger" size="small" round icon="el-icon-delete" @click="crud.remove()">删除</el-button>
|
|
20
|
+
<el-button type="success" size="small" round @click="appPacking()">应用打包</el-button>
|
|
21
|
+
<span style="margin-left: 50px;color: red;font-size: 15px">开启应用打包后,点击列表行可选择应用进行打包生成应用</span>
|
|
22
|
+
<el-button type="primary" size="small" round @click="changeOrderWay()" style="float: right;margin-right: 100px">{{orderWayObj[orderWay]}}</el-button>
|
|
23
|
+
</el-header>
|
|
24
|
+
<el-main style="padding-top:10px;height: 100%;">
|
|
25
|
+
<el-table :data="crud.dataStore.records" :ref="crud.tableRef" stripe border height="100%" style="width: 100%;"
|
|
26
|
+
:header-cell-style="headerCellStyle"
|
|
27
|
+
@row-click="rowClick">
|
|
28
|
+
<el-table-column type="selection" width="40" align="center"></el-table-column>
|
|
29
|
+
<el-table-column type="index" label="序号" align="center" width="60"></el-table-column>
|
|
30
|
+
<el-table-column label="内容名称" prop="contentName" align="center" width="150" show-overflow-tooltip></el-table-column>
|
|
31
|
+
<el-table-column label="内容说明" prop="contentMark" align="center" min-width="200" show-overflow-tooltip></el-table-column>
|
|
32
|
+
<el-table-column label="关联菜单" prop="linkMenuName" align="center" width="150" show-overflow-tooltip>
|
|
33
|
+
</el-table-column>
|
|
34
|
+
<el-table-column label="版本号" prop="contentVersion" align="center" width="150">
|
|
35
|
+
</el-table-column>
|
|
36
|
+
<el-table-column label="操作" align="center" width="410">
|
|
37
|
+
<template slot-scope="scope">
|
|
38
|
+
<el-button size="mini" icon="el-icon-view"
|
|
39
|
+
type="primary" @click="view(scope.row)" >查看</el-button>
|
|
40
|
+
<el-button size="mini" icon="el-icon-edit"
|
|
41
|
+
type="primary" @click="update(scope.row)" >修改</el-button>
|
|
42
|
+
</template>
|
|
43
|
+
</el-table-column>
|
|
44
|
+
</el-table>
|
|
45
|
+
</el-main>
|
|
46
|
+
<el-footer style="height: 40px">
|
|
47
|
+
<el-pagination
|
|
48
|
+
:ref="crud.pageRef"
|
|
49
|
+
:page-sizes="crud.pageSizes"
|
|
50
|
+
:page-size="crud.pageSize"
|
|
51
|
+
:current-page="crud.page"
|
|
52
|
+
:total="crud.dataStore.total"
|
|
53
|
+
@size-change="crud.sizeChange()"
|
|
54
|
+
@current-change="crud.currentPage()"
|
|
55
|
+
layout="total, sizes, prev, pager, next, jumper">
|
|
56
|
+
</el-pagination>
|
|
57
|
+
</el-footer>
|
|
58
|
+
</el-container>
|
|
59
|
+
</el-main>
|
|
60
|
+
|
|
61
|
+
<el-dialog :close-on-click-modal=false :title="dialogTitle" top="10vh"
|
|
62
|
+
:visible.sync="crud.dialogVisible"
|
|
63
|
+
width="6+0%"
|
|
64
|
+
height="70%"
|
|
65
|
+
v-loading="loading"
|
|
66
|
+
element-loading-text="请稍后..."
|
|
67
|
+
element-loading-spinner="el-icon-loading"
|
|
68
|
+
element-loading-background="rgba(0, 0, 0, 0.4)"
|
|
69
|
+
append-to-body>
|
|
70
|
+
<el-form :model="crud.formData" :ref="crud.addFormRef" label-width="110px" :disabled="operate == 'view'" style="height: 100%;width: 100%;overflow-y: hidden">
|
|
71
|
+
<el-row>
|
|
72
|
+
<el-col :span="12">
|
|
73
|
+
<el-form-item label="关联菜单" prop="linkMenuName" >
|
|
74
|
+
<el-input v-model="crud.formData.linkMenuName" disabled ></el-input>
|
|
75
|
+
</el-form-item>
|
|
76
|
+
</el-col>
|
|
77
|
+
<el-col :span="12">
|
|
78
|
+
<el-form-item label="推送类型" prop="pushType" style="width: 100%" :class="operate == 'view'?'source-mark-class':''">
|
|
79
|
+
<el-radio-group v-model="crud.formData.pushType" disabled v-if="operate != 'view'">
|
|
80
|
+
<el-radio :label="key" v-for="(value,key) in pushTypeObj" :key="key">
|
|
81
|
+
{{value}}
|
|
82
|
+
</el-radio>
|
|
83
|
+
</el-radio-group>
|
|
84
|
+
<div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
|
|
85
|
+
{{pushTypeObj[crud.formData.pushType]}}
|
|
86
|
+
</div>
|
|
87
|
+
</el-form-item>
|
|
88
|
+
</el-col>
|
|
89
|
+
</el-row>
|
|
90
|
+
<el-row>
|
|
91
|
+
<el-col :span="12">
|
|
92
|
+
<el-form-item label="内容名称" prop="contentName" style="width: 100%"
|
|
93
|
+
:class="operate == 'view'?'source-mark-class':''"
|
|
94
|
+
:rules="operate == 'update'?plValidate('required') : null">
|
|
95
|
+
<el-input v-model="crud.formData.contentName" maxlength="100" show-word-limit v-if="operate != 'view'"></el-input>
|
|
96
|
+
<div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
|
|
97
|
+
{{crud.formData.contentName}}
|
|
98
|
+
</div>
|
|
99
|
+
</el-form-item>
|
|
100
|
+
</el-col>
|
|
101
|
+
<el-col :span="12">
|
|
102
|
+
<el-form-item label="内容版本" prop="contentVersion"
|
|
103
|
+
:class="operate == 'view'?'source-mark-class':''"
|
|
104
|
+
style="width: calc(100% - 10px);">
|
|
105
|
+
<el-input v-model="crud.formData.contentVersion" disabled v-if="operate != 'view'"></el-input>
|
|
106
|
+
<div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
|
|
107
|
+
{{crud.formData.contentVersion}}
|
|
108
|
+
</div>
|
|
109
|
+
</el-form-item>
|
|
110
|
+
</el-col>
|
|
111
|
+
</el-row>
|
|
112
|
+
<el-form-item label="内容说明" prop="contentMark" style="width: 100%" :rules="operate == 'update'?plValidate('required'):null">
|
|
113
|
+
<el-input size="small" type="textarea" v-model="crud.formData.contentMark"
|
|
114
|
+
:rows="8" resize="none" style="margin-bottom: 7px;" maxlength="500" show-word-limit></el-input>
|
|
115
|
+
</el-form-item>
|
|
116
|
+
</el-form>
|
|
117
|
+
<div slot="footer" class="dialog-footer">
|
|
118
|
+
<el-button v-if="operate != 'view'" type="primary" @click="submitForm()" :disabled="loading" size="small" icon="el-icon-success">确 定</el-button>
|
|
119
|
+
<el-button @click="crud.dialogVisible = false" size="small" :disabled="loading" icon="el-icon-error">{{operate == 'view'? '关 闭':'取 消'}}</el-button>
|
|
120
|
+
</div>
|
|
121
|
+
</el-dialog>
|
|
122
|
+
|
|
123
|
+
<!--右侧抽屉打包-->
|
|
124
|
+
<el-drawer :show-close="true"
|
|
125
|
+
:wrapperClosable="false"
|
|
126
|
+
:visible.sync="packingDrawer"
|
|
127
|
+
:close-on-press-escape="false"
|
|
128
|
+
:modal-append-to-body="false"
|
|
129
|
+
:title="packingTitle"
|
|
130
|
+
:modal="false"
|
|
131
|
+
size="100%"
|
|
132
|
+
style="margin-top: 5px; height: 95%;right: 0px"
|
|
133
|
+
:before-close="handleClose"
|
|
134
|
+
@opened="openedDrawer"
|
|
135
|
+
@close="closeDrawer"
|
|
136
|
+
:class="sourceDrawerClass">
|
|
137
|
+
<div style="width: 100%;height: 100%;box-sizing: border-box;padding: 10px 10px 300px;">
|
|
138
|
+
<div style="height: 100%;overflow-y: auto">
|
|
139
|
+
<div v-for="(item,index) in packingArr" class="shop-item">
|
|
140
|
+
<div style="border: 1px solid rgba(230, 230, 230, 1);width: 80%;margin-bottom: 10px;display: inline-block;margin-bottom: 10px">
|
|
141
|
+
<div style="width: 50px;line-height: 32px;height:32px;text-align: center;border-right: 1px solid rgba(230, 230, 230, 1);display: inline-block;float: left">{{index + 1}}</div>
|
|
142
|
+
<div style="height: 100%;text-align: center;border-right: 1px solid rgba(230, 230, 230, 1);">{{item.contentName+item.contentVersion}}</div></div>
|
|
143
|
+
<el-button type="danger" size="small" icon="el-icon-delete" style="position: relative;top: -2px" @click="removePacking(index)">删除</el-button>
|
|
144
|
+
</div>
|
|
145
|
+
</div>
|
|
146
|
+
<div style="box-sizing: border-box;position: absolute;width: 100%;bottom: 20px;text-align: center">
|
|
147
|
+
<el-button type="primary" style="background-color:#1975ff;width: 130px;
|
|
148
|
+
margin-right: 10px;
|
|
149
|
+
margin-top: 10px;font-weight: bolder" @click="openPacking()">
|
|
150
|
+
打包
|
|
151
|
+
</el-button>
|
|
152
|
+
<el-button type="inf0" @click="closePackingDraw()" style="width: 130px;margin-top: 10px; margin-left: 10px;
|
|
153
|
+
background-color: #f0f1f2;color: #333;font-weight: bolder">
|
|
154
|
+
取消
|
|
155
|
+
</el-button>
|
|
156
|
+
</div>
|
|
157
|
+
</div>
|
|
158
|
+
</el-drawer>
|
|
159
|
+
|
|
160
|
+
|
|
161
|
+
<el-dialog :close-on-click-modal=false title="应用信息" top="5vh"
|
|
162
|
+
:visible.sync="packingDialogVisable"
|
|
163
|
+
width="40%"
|
|
164
|
+
height="90%"
|
|
165
|
+
v-loading="packingLoading"
|
|
166
|
+
element-loading-text="请稍后..."
|
|
167
|
+
element-loading-spinner="el-icon-loading"
|
|
168
|
+
element-loading-background="rgba(0, 0, 0, 0.4)"
|
|
169
|
+
append-to-body>
|
|
170
|
+
<el-form :model="packingApplicationObj" ref="packingFormRef" label-width="110px" style="height: 100%;width: 100%;overflow: hidden">
|
|
171
|
+
<el-row>
|
|
172
|
+
<el-col :span="12">
|
|
173
|
+
<el-form-item label="相同应用标记" prop="appKey" style="width: calc(100% - 10px);">
|
|
174
|
+
<el-select v-model="packingApplicationObj.appKey" style="width: 100%" filterable clearable @change="changeAppKey()">
|
|
175
|
+
<el-option v-for="application in applicationArr" :key="application.id"
|
|
176
|
+
:label="application.appName"
|
|
177
|
+
:value="application.id">
|
|
178
|
+
</el-option>
|
|
179
|
+
</el-select>
|
|
180
|
+
<el-tooltip effect="dark" content="选择历史打包应用用于平滑升级" placement="top">
|
|
181
|
+
<i class="el-icon-info" style="position:absolute;top: 10px;right:-20px;
|
|
182
|
+
font-size: 16px;cursor: pointer;color: #5cb6ff;"></i>
|
|
183
|
+
</el-tooltip>
|
|
184
|
+
</el-form-item>
|
|
185
|
+
</el-col>
|
|
186
|
+
<el-col :span="12">
|
|
187
|
+
<el-form-item label="应用名称" prop="appName" :rules="plValidate('required')">
|
|
188
|
+
<el-input v-model="packingApplicationObj.appName" ></el-input>
|
|
189
|
+
</el-form-item>
|
|
190
|
+
</el-col>
|
|
191
|
+
</el-row>
|
|
192
|
+
<el-row>
|
|
193
|
+
<el-col :span="12">
|
|
194
|
+
<el-form-item label="应用版本" prop="version" style="width: calc(100% - 10px);" :rules="applicationVersion">
|
|
195
|
+
<el-input v-model="packingApplicationObj.version" ></el-input>
|
|
196
|
+
<el-tooltip effect="dark" content="内容版本默认为1.0,如果选择相同应用标记则默认为上次版本+0.01,小数位最高.99" placement="top">
|
|
197
|
+
<i class="el-icon-info" style="position:absolute;top: 10px;right:-20px;
|
|
198
|
+
font-size: 16px;cursor: pointer;color: #5cb6ff;"></i>
|
|
199
|
+
</el-tooltip>
|
|
200
|
+
</el-form-item>
|
|
201
|
+
</el-col>
|
|
202
|
+
<el-col :span="12">
|
|
203
|
+
<el-form-item label="应用图标" prop="contentName" >
|
|
204
|
+
<el-input v-model="packingApplicationObj.appIcon" style="display: none"></el-input>
|
|
205
|
+
<el-button @click="appIconDialog = true">
|
|
206
|
+
<i :class="(currentIcon || '').indexOf('saspiconfont') > -1 ? currentIcon : 'saspiconfont pl-icon-tuxiang'"
|
|
207
|
+
style="font-size:16px"></i></el-button>
|
|
208
|
+
<el-button @click="clearIcon()">清空</el-button>
|
|
209
|
+
</el-form-item>
|
|
210
|
+
</el-col>
|
|
211
|
+
</el-row>
|
|
212
|
+
<el-row>
|
|
213
|
+
<el-col :span="12">
|
|
214
|
+
<el-form-item label="应用类型" prop="appType" style="width: calc(100% - 10px);">
|
|
215
|
+
<el-radio-group v-model="packingApplicationObj.appType">
|
|
216
|
+
<el-radio :label="key" v-for="(value,key) in appTypeObj" :key="key">
|
|
217
|
+
{{value}}
|
|
218
|
+
</el-radio>
|
|
219
|
+
</el-radio-group>
|
|
220
|
+
</el-form-item>
|
|
221
|
+
</el-col>
|
|
222
|
+
<el-col :span="12">
|
|
223
|
+
<el-form-item label="应用分类" prop="appClassfily" :rules="plValidate('required')">
|
|
224
|
+
<el-select v-model="packingApplicationObj.appClassfily" placeholder="请选择"
|
|
225
|
+
:filterable='true' allow-create style='width:100%'>
|
|
226
|
+
<el-option
|
|
227
|
+
v-for="item in appClassfilyOptions"
|
|
228
|
+
:key="item.value"
|
|
229
|
+
:label="item.label"
|
|
230
|
+
:value="item.value">
|
|
231
|
+
</el-option>
|
|
232
|
+
</el-select>
|
|
233
|
+
</el-form-item>
|
|
234
|
+
</el-col>
|
|
235
|
+
</el-row>
|
|
236
|
+
<el-row>
|
|
237
|
+
<el-col :span="12">
|
|
238
|
+
<el-form-item label="是否上架" prop="shelf" style="width: calc(100% - 10px);">
|
|
239
|
+
<el-radio-group v-model="packingApplicationObj.shelf">
|
|
240
|
+
<el-radio :label="key" v-for="(value,key) in shelfObj" :key="key">
|
|
241
|
+
{{value}}
|
|
242
|
+
</el-radio>
|
|
243
|
+
</el-radio-group>
|
|
244
|
+
</el-form-item>
|
|
245
|
+
</el-col>
|
|
246
|
+
<el-col :span="12">
|
|
247
|
+
<el-form-item label="是否付费" prop="pay" :rules="plValidate('required')">
|
|
248
|
+
<el-radio-group v-model="packingApplicationObj.pay">
|
|
249
|
+
<el-radio :label="key" v-for="(value,key) in payObj" :key="key">
|
|
250
|
+
{{value}}
|
|
251
|
+
</el-radio>
|
|
252
|
+
</el-radio-group>
|
|
253
|
+
</el-form-item>
|
|
254
|
+
</el-col>
|
|
255
|
+
|
|
256
|
+
<el-col :span="12" v-if="packingApplicationObj.pay == '1'">
|
|
257
|
+
<el-form-item label="付费价格" prop="price" :rules="plValidate('required','intNotZero')">
|
|
258
|
+
<el-input v-model="packingApplicationObj.price" >
|
|
259
|
+
<template slot="append">元</template>
|
|
260
|
+
</el-input>
|
|
261
|
+
</el-form-item>
|
|
262
|
+
</el-col>
|
|
263
|
+
|
|
264
|
+
<el-col :span="12" v-if="packingApplicationObj.pay == '1'">
|
|
265
|
+
<el-form-item label="支持试用" prop="trail" style="width: calc(100% - 10px);">
|
|
266
|
+
<el-radio-group v-model="packingApplicationObj.trail">
|
|
267
|
+
<el-radio :label="key" v-for="(value,key) in trailObj" :key="key">
|
|
268
|
+
{{value}}
|
|
269
|
+
</el-radio>
|
|
270
|
+
</el-radio-group>
|
|
271
|
+
</el-form-item>
|
|
272
|
+
</el-col>
|
|
273
|
+
<el-col :span="12" v-if="packingApplicationObj.trail == '1'">
|
|
274
|
+
<el-form-item label="试用时长" prop="trailTime" :rules="plValidate('required')" v-if="packingApplicationObj.trail == '1'">
|
|
275
|
+
<el-input placeholder="请输入内容" v-model="packingApplicationObj.trailTime">
|
|
276
|
+
<template slot="append">天</template>
|
|
277
|
+
</el-input>
|
|
278
|
+
</el-form-item>
|
|
279
|
+
</el-col>
|
|
280
|
+
</el-row>
|
|
281
|
+
|
|
282
|
+
<el-form-item label="应用说明" prop="appMark" style="width: 100%" :rules="plValidate('required')">
|
|
283
|
+
<el-input size="small" type="textarea" v-model="packingApplicationObj.appMark"
|
|
284
|
+
:rows="8" resize="none" style="margin-bottom: 7px;" maxlength="500" show-word-limit></el-input>
|
|
285
|
+
</el-form-item>
|
|
286
|
+
</el-form>
|
|
287
|
+
<div slot="footer" class="dialog-footer">
|
|
288
|
+
<el-button type="primary" @click="startPacking()" :disabled="packingLoading" size="small" icon="el-icon-success">开始打包</el-button>
|
|
289
|
+
<el-button @click="packingDialogVisable = false" size="small" :disabled="packingLoading" icon="el-icon-error">取 消</el-button>
|
|
290
|
+
</div>
|
|
291
|
+
</el-dialog>
|
|
292
|
+
|
|
293
|
+
<!--应用图标-->
|
|
294
|
+
<!-- 应用图标-->
|
|
295
|
+
<el-dialog :close-on-click-modal=false :visible.sync="appIconDialog" class="font-dialog" title="选择图标" width="70%"
|
|
296
|
+
height="80%" top="10vh">
|
|
297
|
+
<font-icon :callback="getAppIconBack"></font-icon>
|
|
298
|
+
</el-dialog>
|
|
299
|
+
|
|
300
|
+
</el-container>
|
|
301
|
+
|
|
302
|
+
|
|
303
|
+
</template>
|
|
304
|
+
|
|
305
|
+
<script>
|
|
306
|
+
//应用内容管理
|
|
307
|
+
import CommonTree from "../../../../sasp-base/src/components/public/plTree";
|
|
308
|
+
import {FontIcon} from 'sasp-base';
|
|
309
|
+
export default {
|
|
310
|
+
name: "appContentManager",
|
|
311
|
+
components: {FontIcon, CommonTree},
|
|
312
|
+
data(){
|
|
313
|
+
|
|
314
|
+
/**
|
|
315
|
+
* 应用版本
|
|
316
|
+
* @param rule
|
|
317
|
+
* @param value
|
|
318
|
+
* @param callback
|
|
319
|
+
* @returns {*}
|
|
320
|
+
*/
|
|
321
|
+
let versionValidator =(rule,value,callback) =>{
|
|
322
|
+
if(!value){
|
|
323
|
+
callback();
|
|
324
|
+
}else {
|
|
325
|
+
let regFd = /^\d+(\.\d+)?$/; //非负浮点数
|
|
326
|
+
if(!regFd.test(value)){
|
|
327
|
+
return callback(new Error('请输入正确的应用版本'));
|
|
328
|
+
}else {
|
|
329
|
+
//判断版本长度
|
|
330
|
+
let suffix = value.split(".")[1];
|
|
331
|
+
if(suffix.length > 2){
|
|
332
|
+
return callback(new Error('版本号最多为两位小数'));
|
|
333
|
+
}else if(Number(value) <= (Number(this.oldApplicationVersion)) && Number(value) > 1.0){
|
|
334
|
+
//比较上一个版本
|
|
335
|
+
return callback(new Error('应用版本必须比上一个版本'+this.oldApplicationVersion+'大'));
|
|
336
|
+
}else if(Number(value) < 1.0){
|
|
337
|
+
return callback(new Error('应用版本最小为1.0'));
|
|
338
|
+
}else {
|
|
339
|
+
callback();
|
|
340
|
+
}
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
};
|
|
344
|
+
|
|
345
|
+
return{
|
|
346
|
+
orderWay:'CREATE_TIME', //排序方式默认 创建时间
|
|
347
|
+
crud: new this.CrudUtil({
|
|
348
|
+
vue: this,
|
|
349
|
+
entityName: "sysAppContent",
|
|
350
|
+
url: this.api.sysAppContent.url,
|
|
351
|
+
searchUrl:this.api.sysAppContent.findAppContentPage,
|
|
352
|
+
searchForm: {order: "TB.CREATE_TIME DESC TB.CONTENT_VERSION+0 DESC"},
|
|
353
|
+
noClearSearchColumns:["order"],
|
|
354
|
+
}),
|
|
355
|
+
orderWayObj:{
|
|
356
|
+
"CREATE_TIME":"创建时间排序",
|
|
357
|
+
"LINK_MENU":"相同内容排序",
|
|
358
|
+
},
|
|
359
|
+
tenantTypeObj:{
|
|
360
|
+
"group":"团体",
|
|
361
|
+
"person":"个人"
|
|
362
|
+
},
|
|
363
|
+
operate:'add', //操作类型
|
|
364
|
+
|
|
365
|
+
dialogTitle:'',
|
|
366
|
+
oldTenantAccount:'',//修改前手机号码
|
|
367
|
+
oldTenantLoginCode:'',//修改前 登录标识
|
|
368
|
+
tenantPageArr:[], //登录页
|
|
369
|
+
tenantThemeArr:[], //主题配置
|
|
370
|
+
tenantAuthArr:[], //租户权限
|
|
371
|
+
paramFieldArr:["tenantName","tenantAccount","tenantType","tenantPage","tenantTheme","tenantAuth","tenantLogincode"],
|
|
372
|
+
loading:false,//加载
|
|
373
|
+
|
|
374
|
+
treeShow:false,
|
|
375
|
+
menuInitparam:{},
|
|
376
|
+
defaultProps: {
|
|
377
|
+
children: 'children',
|
|
378
|
+
label: 'menuName'
|
|
379
|
+
},
|
|
380
|
+
filterText:'',//搜索菜单的参数
|
|
381
|
+
oldRoleName:'', //原角色名
|
|
382
|
+
roleStatusTextObj:{
|
|
383
|
+
"1":"正常",
|
|
384
|
+
"0":"禁用",
|
|
385
|
+
"":"正常"
|
|
386
|
+
},
|
|
387
|
+
roleStatusTypeObj:{
|
|
388
|
+
"1":"success",
|
|
389
|
+
"0":"danger",
|
|
390
|
+
"":"success"
|
|
391
|
+
},
|
|
392
|
+
empowermentClick:false,
|
|
393
|
+
|
|
394
|
+
pushTypeObj:{
|
|
395
|
+
"add":"新增",
|
|
396
|
+
"upgrade":"升级",
|
|
397
|
+
},
|
|
398
|
+
|
|
399
|
+
packingTitle:'应用打包',
|
|
400
|
+
packingDrawer:false, //打包
|
|
401
|
+
packingArr:[], //打包的数据
|
|
402
|
+
sourceDrawerClass:'source-close-drawer',
|
|
403
|
+
packingDialogVisable:false, //应用打包弹窗
|
|
404
|
+
packingApplicationObj:{
|
|
405
|
+
appKey:'', //相同应用标记
|
|
406
|
+
appName:'', //应用名称
|
|
407
|
+
version:'1.0',//版本
|
|
408
|
+
appIcon:'',//应用图标
|
|
409
|
+
appType:'group',//应用类型 group 团体 person 个人
|
|
410
|
+
trail: '0',//支持使用
|
|
411
|
+
pay:'0', //1、付费 0、免费
|
|
412
|
+
shelf:'1',//1、上架 0 、下架
|
|
413
|
+
trailTime:'30', //使用时长
|
|
414
|
+
appMark:'',//应用说明
|
|
415
|
+
}, //打包应用对象
|
|
416
|
+
applicationArr:[], //应用数组
|
|
417
|
+
applicationObj:{}, //应用对象
|
|
418
|
+
oldApplicationVersion:'1.0',
|
|
419
|
+
applicationVersion:[
|
|
420
|
+
{required: true, message: '该输入项为必输项'},
|
|
421
|
+
{validator:versionValidator,trigger:'blur'},
|
|
422
|
+
],
|
|
423
|
+
appIconDialog:false,
|
|
424
|
+
currentIcon:'', //当前选择图表
|
|
425
|
+
appTypeObj:{ //i应用类型
|
|
426
|
+
"group":"团体",
|
|
427
|
+
"person":"个人"
|
|
428
|
+
},
|
|
429
|
+
appClassfilyOptions: [{
|
|
430
|
+
value: '工作管理',
|
|
431
|
+
label: '工作管理'
|
|
432
|
+
}, {
|
|
433
|
+
value: '项目管理',
|
|
434
|
+
label: '项目管理',
|
|
435
|
+
}, {
|
|
436
|
+
value: '行政管理',
|
|
437
|
+
label: '行政管理'
|
|
438
|
+
}],
|
|
439
|
+
shelfObj:{//是否上架
|
|
440
|
+
"1":"上架",
|
|
441
|
+
"0":"下架"
|
|
442
|
+
},
|
|
443
|
+
payObj:{//支持付费
|
|
444
|
+
"1":"是",
|
|
445
|
+
"0":"否"
|
|
446
|
+
},
|
|
447
|
+
trailObj:{ //支持试用
|
|
448
|
+
"1":"是",
|
|
449
|
+
"0":"否"
|
|
450
|
+
},
|
|
451
|
+
packingLoading:false,
|
|
452
|
+
}
|
|
453
|
+
},
|
|
454
|
+
|
|
455
|
+
created(){
|
|
456
|
+
|
|
457
|
+
},
|
|
458
|
+
methods:{
|
|
459
|
+
|
|
460
|
+
addTenantRole(){
|
|
461
|
+
this.operate = "add";
|
|
462
|
+
this.dialogTitle = "租户权限设置";
|
|
463
|
+
|
|
464
|
+
this.initMenuData();
|
|
465
|
+
|
|
466
|
+
//获取最新租户权限配置
|
|
467
|
+
this.crud.add();
|
|
468
|
+
this.$set(this.crud.formData,'tenantType','group'); //默认团体用户
|
|
469
|
+
this.$set(this.crud.formData,'tenantPage','default'); //默认登录页
|
|
470
|
+
this.$set(this.crud.formData,'tenantTheme','default'); //默认主题
|
|
471
|
+
//生成数据标识
|
|
472
|
+
this.$nextTick(() => {
|
|
473
|
+
this.$refs[this.crud.addFormRef].clearValidate(); //刷新校验
|
|
474
|
+
});
|
|
475
|
+
},
|
|
476
|
+
|
|
477
|
+
/**
|
|
478
|
+
* 应用打包
|
|
479
|
+
*/
|
|
480
|
+
appPacking(){
|
|
481
|
+
this.packingDrawer = true;
|
|
482
|
+
},
|
|
483
|
+
|
|
484
|
+
/**
|
|
485
|
+
* 切换排序方式
|
|
486
|
+
*/
|
|
487
|
+
changeOrderWay(){
|
|
488
|
+
let way = this.orderWay == "CREATE_TIME" ? "LINK_MENU":"CREATE_TIME";
|
|
489
|
+
this.orderWay = way;
|
|
490
|
+
this.$set(this.crud.searchForm,'order',"TB."+this.orderWay +" DESC TB.CONTENT_VERSION+0 DESC");
|
|
491
|
+
//重新查询
|
|
492
|
+
this.crud.doSearch();
|
|
493
|
+
},
|
|
494
|
+
|
|
495
|
+
|
|
496
|
+
/**
|
|
497
|
+
* 查看应用内容
|
|
498
|
+
*/
|
|
499
|
+
view(row){
|
|
500
|
+
this.operate = "view"; //查看
|
|
501
|
+
this.dialogTitle = "应用内容查看";
|
|
502
|
+
let editObj = JSON.parse(JSON.stringify(row));
|
|
503
|
+
this.crud.update(editObj);
|
|
504
|
+
this.$nextTick(() => {
|
|
505
|
+
this.$refs[this.crud.addFormRef].clearValidate(); //刷新校验
|
|
506
|
+
});
|
|
507
|
+
},
|
|
508
|
+
|
|
509
|
+
/**
|
|
510
|
+
* 修改应用内容
|
|
511
|
+
*/
|
|
512
|
+
update(row){
|
|
513
|
+
this.oldRoleName = row.roleName;
|
|
514
|
+
this.operate = "update";
|
|
515
|
+
this.dialogTitle = "应用内容修改";
|
|
516
|
+
let editObj = JSON.parse(JSON.stringify(row));
|
|
517
|
+
this.crud.update(editObj);
|
|
518
|
+
this.$nextTick(() => {
|
|
519
|
+
this.$refs[this.crud.addFormRef].clearValidate(); //刷新校验
|
|
520
|
+
});
|
|
521
|
+
},
|
|
522
|
+
|
|
523
|
+
|
|
524
|
+
/**
|
|
525
|
+
* 自动生成登录标识
|
|
526
|
+
*/
|
|
527
|
+
getLoginCode(){
|
|
528
|
+
this.$set(this.crud.formData,'tenantLogincode',this.COMMON_FUNC.getUuidByParams(32));
|
|
529
|
+
},
|
|
530
|
+
|
|
531
|
+
/**
|
|
532
|
+
* 生成数据标识并判断是否重复
|
|
533
|
+
*/
|
|
534
|
+
getDatacode(datacode){
|
|
535
|
+
return new Promise(resolve => {
|
|
536
|
+
this.axios.post(this.api.SysTenant.find,{tenantDatacode:'TEN_'+datacode}).then(res =>{
|
|
537
|
+
if((res.data ||[]).length == 0){
|
|
538
|
+
resolve(datacode)
|
|
539
|
+
}else {
|
|
540
|
+
this.getDatacode(this.COMMON_FUNC.getUuidByParams(8).toUpperCase()); //递归判断
|
|
541
|
+
}
|
|
542
|
+
});
|
|
543
|
+
})
|
|
544
|
+
},
|
|
545
|
+
|
|
546
|
+
|
|
547
|
+
/**
|
|
548
|
+
* 初始化树
|
|
549
|
+
*/
|
|
550
|
+
initCallBack(nodeTree){
|
|
551
|
+
//禁用状态
|
|
552
|
+
if(this.operate == 'view'){ //查看状态
|
|
553
|
+
this.disabelTree(nodeTree.data || []);
|
|
554
|
+
}
|
|
555
|
+
},
|
|
556
|
+
/**
|
|
557
|
+
* 禁用树
|
|
558
|
+
*/
|
|
559
|
+
disabelTree(treeData){
|
|
560
|
+
treeData.forEach(item =>{
|
|
561
|
+
this.$set(item,'disabled',true);
|
|
562
|
+
if(item.children && item.children.length > 0){
|
|
563
|
+
let arr = item.children;
|
|
564
|
+
this.disabelTree(arr);
|
|
565
|
+
}
|
|
566
|
+
});
|
|
567
|
+
},
|
|
568
|
+
|
|
569
|
+
/**
|
|
570
|
+
* 渲染树
|
|
571
|
+
*/
|
|
572
|
+
renderContent(h, {node, data, store}) {
|
|
573
|
+
if (node.data.menuIsUse == "N") {
|
|
574
|
+
return (
|
|
575
|
+
<span class={node.level === 1 ? 'model-color' : ''}
|
|
576
|
+
style={node.level === 1 ? 'letter-spacing:1px' : ''}>
|
|
577
|
+
<i class={data.menuIcon}></i>
|
|
578
|
+
<span
|
|
579
|
+
style={node.level === 2 ? 'font-weight:bold;text-decoration:line-through;font-style:italic;color:#ccc;'
|
|
580
|
+
: "text-decoration:line-through;font-style:italic;color:#ccc;"}>{node.label}</span>
|
|
581
|
+
</span>
|
|
582
|
+
);
|
|
583
|
+
}
|
|
584
|
+
return (
|
|
585
|
+
<span class={node.level === 1 ? 'model-color' : ''}
|
|
586
|
+
style={node.level === 1 ? 'letter-spacing:1px' : ''}>
|
|
587
|
+
<i class={data.menuIcon}></i>
|
|
588
|
+
<span style={node.level === 2 ? 'font-weight:bold' : ""}>{node.label}</span>
|
|
589
|
+
</span>
|
|
590
|
+
);
|
|
591
|
+
},
|
|
592
|
+
|
|
593
|
+
|
|
594
|
+
/**
|
|
595
|
+
* 保存租户信息
|
|
596
|
+
*/
|
|
597
|
+
submitForm(){
|
|
598
|
+
this.$refs[this.crud.addFormRef].validate(validate => {
|
|
599
|
+
if(!validate){
|
|
600
|
+
return;
|
|
601
|
+
}
|
|
602
|
+
this.loading = true; //防止重复点击
|
|
603
|
+
//执行修改
|
|
604
|
+
let paramObj = {};
|
|
605
|
+
paramObj["contentMark"] = this.crud.formData.contentMark;
|
|
606
|
+
paramObj["contentName"] = this.crud.formData.contentName;
|
|
607
|
+
paramObj["id"] = this.crud.formData.id;
|
|
608
|
+
this.axios.post(this.api.sysAppContent.update,paramObj).then(res =>{
|
|
609
|
+
if(res.data && res.data.operateSuccess){
|
|
610
|
+
this.$message({
|
|
611
|
+
type:"success",
|
|
612
|
+
message:"修改成功!"
|
|
613
|
+
})
|
|
614
|
+
this.crud.dialogVisible = false;
|
|
615
|
+
this.crud.search();
|
|
616
|
+
}else {
|
|
617
|
+
this.$message({
|
|
618
|
+
type:"error",
|
|
619
|
+
message:"推送失败!"
|
|
620
|
+
})
|
|
621
|
+
}
|
|
622
|
+
this.loading = false;
|
|
623
|
+
})
|
|
624
|
+
|
|
625
|
+
});
|
|
626
|
+
},
|
|
627
|
+
|
|
628
|
+
/**
|
|
629
|
+
* 格式化菜单名称
|
|
630
|
+
* @param menuName
|
|
631
|
+
* @returns {*}
|
|
632
|
+
*/
|
|
633
|
+
formatterMenuName(menuName){
|
|
634
|
+
if(menuName && menuName.startsWith("、")){
|
|
635
|
+
return menuName.substring(1);
|
|
636
|
+
}else {
|
|
637
|
+
return menuName;
|
|
638
|
+
}
|
|
639
|
+
},
|
|
640
|
+
|
|
641
|
+
|
|
642
|
+
/**
|
|
643
|
+
* 切换角色状态
|
|
644
|
+
* @param row
|
|
645
|
+
*/
|
|
646
|
+
changeRoleStatus(row){
|
|
647
|
+
let roleStatus = row.roleStatus;
|
|
648
|
+
let message = roleStatus == '1' ? '确定禁用该角色?':'确定启用该角色?';
|
|
649
|
+
let updateRoleStatus = roleStatus == '1'? '0' : '1';
|
|
650
|
+
this.$confirm(message, '警告', {
|
|
651
|
+
confirmButtonText: '确定',
|
|
652
|
+
cancelButtonText: '取消',
|
|
653
|
+
}).then(()=> {
|
|
654
|
+
//执行更新
|
|
655
|
+
this.axios.post(this.api.SysTenantRole.update,{id:row.id,roleStatus:updateRoleStatus}).then(res =>{
|
|
656
|
+
if(res.data && res.data.operateSuccess){
|
|
657
|
+
this.crud.search();
|
|
658
|
+
}else {
|
|
659
|
+
this.$message("未知错误!");
|
|
660
|
+
}
|
|
661
|
+
});
|
|
662
|
+
});
|
|
663
|
+
},
|
|
664
|
+
|
|
665
|
+
/**
|
|
666
|
+
* 角色启用与禁用
|
|
667
|
+
* @param roleStatus
|
|
668
|
+
*/
|
|
669
|
+
changeSelectRoleStatus(roleStatus){
|
|
670
|
+
let selection = this.$refs[this.crud.tableRef].selection || [];
|
|
671
|
+
if(selection.length == 0){
|
|
672
|
+
this.$message({
|
|
673
|
+
duration: 1500,
|
|
674
|
+
type: 'info',
|
|
675
|
+
message: '请至少选择一条数据!'})
|
|
676
|
+
return;
|
|
677
|
+
}
|
|
678
|
+
let message = roleStatus == '0' ? '确定禁用勾选的'+selection.length+'个角色?':'确定启用'+selection.length+'个角色?';
|
|
679
|
+
let roleIdArr = [];
|
|
680
|
+
selection.forEach(item =>{
|
|
681
|
+
roleIdArr.push(item.id);
|
|
682
|
+
});
|
|
683
|
+
this.$confirm(message, '警告', {
|
|
684
|
+
confirmButtonText: '确定',
|
|
685
|
+
cancelButtonText: '取消',
|
|
686
|
+
}).then(()=> {
|
|
687
|
+
this.axios.post(this.api.SysTenantRole.bantchChangeRoleStatus,{roleIds:roleIdArr.join(","),roleStatus:roleStatus}).then(res =>{
|
|
688
|
+
if(res.data && res.data.requestStatus == '1'){
|
|
689
|
+
this.crud.search();
|
|
690
|
+
}else {
|
|
691
|
+
this.$message("未知错误!");
|
|
692
|
+
}
|
|
693
|
+
});
|
|
694
|
+
});
|
|
695
|
+
},
|
|
696
|
+
|
|
697
|
+
/**
|
|
698
|
+
* 快速赋权和解权
|
|
699
|
+
* @param roleId 角色id
|
|
700
|
+
* @param tenantIds 租户ids
|
|
701
|
+
* @param type
|
|
702
|
+
*/
|
|
703
|
+
rapidEmpowerment(row,tenantIds,type){
|
|
704
|
+
//校验
|
|
705
|
+
let roleId = row.id;
|
|
706
|
+
if(this.$refs['dataStoreRef']){
|
|
707
|
+
this.$refs['dataStoreRef'].validate(validate => {
|
|
708
|
+
if (!validate){
|
|
709
|
+
return;
|
|
710
|
+
}
|
|
711
|
+
//执行快速赋权
|
|
712
|
+
let tenantUserIds = "";
|
|
713
|
+
if(tenantIds && tenantIds.length > 0){
|
|
714
|
+
tenantUserIds = tenantIds.join(",");
|
|
715
|
+
}
|
|
716
|
+
this.axios.post(this.api.SysTenant.fastEmpower,{authId:roleId,tenantUserIds:tenantUserIds,type}).then(res =>{
|
|
717
|
+
if(res.data && res.data.requestStatus == '1'){
|
|
718
|
+
this.$message({
|
|
719
|
+
type:'success',
|
|
720
|
+
message:res.data.message
|
|
721
|
+
})
|
|
722
|
+
this.crud.search();
|
|
723
|
+
}else {
|
|
724
|
+
this.$message({
|
|
725
|
+
type:'error',
|
|
726
|
+
message:'操作失败!'
|
|
727
|
+
})
|
|
728
|
+
}
|
|
729
|
+
})
|
|
730
|
+
|
|
731
|
+
});
|
|
732
|
+
}
|
|
733
|
+
},
|
|
734
|
+
|
|
735
|
+
/**
|
|
736
|
+
* 关闭打包
|
|
737
|
+
*/
|
|
738
|
+
closePackingDraw(){
|
|
739
|
+
this.packingDrawer = false;
|
|
740
|
+
|
|
741
|
+
},
|
|
742
|
+
|
|
743
|
+
/**
|
|
744
|
+
* 打开打包
|
|
745
|
+
*/
|
|
746
|
+
openPacking(){
|
|
747
|
+
//遍历 packingArr
|
|
748
|
+
//加载应用管理中的存在的数据
|
|
749
|
+
if(this.packingArr.length == 0){
|
|
750
|
+
this.$message({type:'warning',message:'请选择需要打包的应用!'});
|
|
751
|
+
return;
|
|
752
|
+
}
|
|
753
|
+
this.applicationArr = [];
|
|
754
|
+
this.applicationObj = {};
|
|
755
|
+
this.axios.post(this.api.sysApplication.find).then(res =>{
|
|
756
|
+
this.applicationArr = res && res.data ? (res.data || []) :[];
|
|
757
|
+
this.applicationArr.forEach(item=>{
|
|
758
|
+
this.applicationObj[item.id] = item;
|
|
759
|
+
});
|
|
760
|
+
this.packingDialogVisable = true;
|
|
761
|
+
|
|
762
|
+
this.$nextTick(() => {
|
|
763
|
+
this.$refs['packingFormRef'].clearValidate(); //刷新校验
|
|
764
|
+
});
|
|
765
|
+
});
|
|
766
|
+
},
|
|
767
|
+
|
|
768
|
+
/**
|
|
769
|
+
* 关闭
|
|
770
|
+
*/
|
|
771
|
+
handleClose(){
|
|
772
|
+
this.packingDrawer = false;
|
|
773
|
+
},
|
|
774
|
+
|
|
775
|
+
/**
|
|
776
|
+
* 打开执行
|
|
777
|
+
*/
|
|
778
|
+
openedDrawer(){
|
|
779
|
+
this.sourceDrawerClass = 'source-drawer';
|
|
780
|
+
},
|
|
781
|
+
closeDrawer(){
|
|
782
|
+
this.sourceDrawerClass = "source-close-drawer";
|
|
783
|
+
},
|
|
784
|
+
|
|
785
|
+
/**
|
|
786
|
+
* 行点击事件
|
|
787
|
+
* @param row
|
|
788
|
+
*/
|
|
789
|
+
rowClick(row) { // table行点击事件
|
|
790
|
+
if(!this.packingDrawer){
|
|
791
|
+
return;
|
|
792
|
+
}
|
|
793
|
+
let arr = this.packingArr.filter(each => {
|
|
794
|
+
return each.id == row.id;
|
|
795
|
+
})
|
|
796
|
+
if(arr.length == 0){
|
|
797
|
+
this.packingArr.push(row);
|
|
798
|
+
}
|
|
799
|
+
},
|
|
800
|
+
|
|
801
|
+
/**
|
|
802
|
+
* 删除打包
|
|
803
|
+
* @param rowIndex
|
|
804
|
+
*/
|
|
805
|
+
removePacking(rowIndex){
|
|
806
|
+
this.packingArr.splice(rowIndex,1);
|
|
807
|
+
},
|
|
808
|
+
|
|
809
|
+
/**
|
|
810
|
+
* 切换应用标识
|
|
811
|
+
*/
|
|
812
|
+
changeAppKey(){
|
|
813
|
+
if(this.packingApplicationObj.appKey && this.applicationObj[this.packingApplicationObj.appKey]){
|
|
814
|
+
//赋值默认版本 在历史版本上 + 0.01
|
|
815
|
+
let obj = this.applicationObj[this.packingApplicationObj.appKey];
|
|
816
|
+
this.oldApplicationVersion = obj.version;
|
|
817
|
+
//赋值当前打包对象默认值
|
|
818
|
+
this.$set(this.packingApplicationObj,'appName',obj.appName);
|
|
819
|
+
this.$set(this.packingApplicationObj,'appIcon',obj.appIcon);
|
|
820
|
+
this.packingApplicationObj.appKey = obj.id; //赋值
|
|
821
|
+
//版本
|
|
822
|
+
this.$set(this.packingApplicationObj,'version',(Number(this.oldApplicationVersion) + 0.01) +"");
|
|
823
|
+
if(this.packingApplicationObj.version.indexOf(".") == -1){
|
|
824
|
+
this.packingApplicationObj.version = this.packingApplicationObj.version+".0"; //整数情况赋值小数点
|
|
825
|
+
}
|
|
826
|
+
this.packingApplicationObj.appMark = '';
|
|
827
|
+
}else {
|
|
828
|
+
this.oldApplicationVersion = '1.0';
|
|
829
|
+
}
|
|
830
|
+
},
|
|
831
|
+
|
|
832
|
+
/**
|
|
833
|
+
* 清空图标
|
|
834
|
+
*/
|
|
835
|
+
clearIcon(){
|
|
836
|
+
this.packingApplicationObj.appIcon = '';
|
|
837
|
+
this.currentIcon = '';
|
|
838
|
+
},
|
|
839
|
+
/**
|
|
840
|
+
* 返回app图标
|
|
841
|
+
*/
|
|
842
|
+
getAppIconBack(icon){
|
|
843
|
+
if (icon.startsWith("el-icon-")) {
|
|
844
|
+
this.$set(this.packingApplicationObj,'appIcon',icon);
|
|
845
|
+
this.currentIcon = icon;
|
|
846
|
+
} else {
|
|
847
|
+
this.$set(this.packingApplicationObj,'appIcon', 'saspiconfont ' + icon);
|
|
848
|
+
this.currentIcon = 'saspiconfont ' + icon;
|
|
849
|
+
}
|
|
850
|
+
this.appIconDialog = false; //关闭
|
|
851
|
+
},
|
|
852
|
+
|
|
853
|
+
/**
|
|
854
|
+
* 执行打包
|
|
855
|
+
*/
|
|
856
|
+
startPacking(){
|
|
857
|
+
this.$refs.packingFormRef.validate(validate => {
|
|
858
|
+
if(!validate){
|
|
859
|
+
return;
|
|
860
|
+
}
|
|
861
|
+
this.packingLoading = true;
|
|
862
|
+
//开始执行保存
|
|
863
|
+
this.axios.post(this.api.sysApplication.add, this.packingApplicationObj).then(res => {
|
|
864
|
+
if (res.data && res.data.operateSuccess) {
|
|
865
|
+
this.$message({
|
|
866
|
+
message: '打包成功!',
|
|
867
|
+
type: "success",
|
|
868
|
+
});
|
|
869
|
+
this.packingLoading = false;
|
|
870
|
+
this.currentIcon = '';
|
|
871
|
+
this.packingDialogVisable = false;
|
|
872
|
+
} else {
|
|
873
|
+
this.$message.error("打包失败!");
|
|
874
|
+
}
|
|
875
|
+
})
|
|
876
|
+
|
|
877
|
+
});
|
|
878
|
+
},
|
|
879
|
+
headerCellStyle({row, column, rowIndex, columnIndex}){
|
|
880
|
+
if (rowIndex === 0) {
|
|
881
|
+
return 'background-color:#F2F2F2;color:#000;font-size:15px;font-weight:600;'
|
|
882
|
+
} else {
|
|
883
|
+
return ''
|
|
884
|
+
}
|
|
885
|
+
}
|
|
886
|
+
}
|
|
887
|
+
}
|
|
888
|
+
</script>
|
|
889
|
+
|
|
890
|
+
<style scoped lang="scss">
|
|
891
|
+
|
|
892
|
+
.treeClass {
|
|
893
|
+
overflow-y: auto;
|
|
894
|
+
width: 100% !important;
|
|
895
|
+
height: calc(100% - 90px);
|
|
896
|
+
}
|
|
897
|
+
|
|
898
|
+
.treeClass /deep/ .el-tree > .el-tree-node > .el-tree-node__content { /* 选中第一级菜单 */
|
|
899
|
+
background-color: #1A598A;
|
|
900
|
+
text-decoration: none;
|
|
901
|
+
border: 1px silver solid;
|
|
902
|
+
color: #fff;
|
|
903
|
+
text-align: center;
|
|
904
|
+
height: 35px;
|
|
905
|
+
}
|
|
906
|
+
|
|
907
|
+
.source-drawer{
|
|
908
|
+
/*width: 400px;*/
|
|
909
|
+
width: 400px;
|
|
910
|
+
margin-left: calc(100% - 420px);
|
|
911
|
+
box-shadow: -0.3px 0.3px 0.3px #888888;
|
|
912
|
+
border: 1px solid #ccc;
|
|
913
|
+
}
|
|
914
|
+
.source-close-drawer{
|
|
915
|
+
width: 400px;
|
|
916
|
+
margin-left: calc(100% - 420px);
|
|
917
|
+
}
|
|
918
|
+
|
|
919
|
+
.shop-item{
|
|
920
|
+
position: relative;
|
|
921
|
+
box-sizing: border-box;
|
|
922
|
+
width: 100%;
|
|
923
|
+
height: 32px;
|
|
924
|
+
border-bottom: 1px solid #fff;
|
|
925
|
+
line-height: 32px;
|
|
926
|
+
margin-bottom: 10px;
|
|
927
|
+
}
|
|
928
|
+
|
|
929
|
+
.source-mark-class /deep/ label{
|
|
930
|
+
position: relative;
|
|
931
|
+
top: 0px;
|
|
932
|
+
}
|
|
933
|
+
.cloud-div{
|
|
934
|
+
border: 1px dashed #e6e6e6;padding: 0px 10px;box-sizing: border-box;
|
|
935
|
+
}
|
|
936
|
+
|
|
937
|
+
|
|
938
|
+
</style>
|