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.
Files changed (141) hide show
  1. package/index.js +227 -0
  2. package/package.json +19 -0
  3. package/router.js +83 -0
  4. package/src/assets/font/iconfont.css +1346 -0
  5. package/src/assets/font/iconfont.eot +0 -0
  6. package/src/assets/font/iconfont.js +1 -0
  7. package/src/assets/font/iconfont.svg +827 -0
  8. package/src/assets/font/iconfont.ttf +0 -0
  9. package/src/assets/font/iconfont.woff +0 -0
  10. package/src/assets/images/loading-bar.gif +0 -0
  11. package/src/assets/js/adminInstall.js +36 -0
  12. package/src/assets/js/api/apiAdmin.js +613 -0
  13. package/src/assets/js/global/dataGlobal.js +260 -0
  14. package/src/assets/js/global/logGlobal.js +22 -0
  15. package/src/assets/js/global/paramGlobal.js +67 -0
  16. package/src/assets/js/global/resGlobal.js +91 -0
  17. package/src/assets/js/global/userGlobal.js +283 -0
  18. package/src/components/complexViewRendering.vue +601 -0
  19. package/src/components/ifmLink.vue +71 -0
  20. package/src/components/public/data/plDataCascader.vue +85 -0
  21. package/src/components/public/data/plDataRadio.vue +73 -0
  22. package/src/components/public/data/plDataRadioGroup.vue +70 -0
  23. package/src/components/public/data/plDataSelect.vue +856 -0
  24. package/src/components/public/data/plDatePicker.vue +159 -0
  25. package/src/components/public/org/bg.png +0 -0
  26. package/src/components/public/org/sysOrgPosUserSelect.vue +1237 -0
  27. package/src/components/public/org/sysOrgPosUserSelectDark.vue +1402 -0
  28. package/src/components/public/org/sysOrgPosUserSelectNew.vue +1527 -0
  29. package/src/components/public/upload/images/compress.png +0 -0
  30. package/src/components/public/upload/images/emipty.png +0 -0
  31. package/src/components/public/upload/images/excel.png +0 -0
  32. package/src/components/public/upload/images/file.png +0 -0
  33. package/src/components/public/upload/images/pdf.png +0 -0
  34. package/src/components/public/upload/images/powerpoint.png +0 -0
  35. package/src/components/public/upload/images/project.png +0 -0
  36. package/src/components/public/upload/images/sound.png +0 -0
  37. package/src/components/public/upload/images/txt.png +0 -0
  38. package/src/components/public/upload/images/video.png +0 -0
  39. package/src/components/public/upload/images/visio.png +0 -0
  40. package/src/components/public/upload/images/word.png +0 -0
  41. package/src/components/public/upload/plImage.vue +287 -0
  42. package/src/components/public/upload/plImgUpload.vue +137 -0
  43. package/src/components/public/upload/plUpload.vue +1124 -0
  44. package/src/components/public/upload/uploadImg.js +8 -0
  45. package/src/main.js +0 -0
  46. package/src/views/VueMenuView.vue +143 -0
  47. package/src/views/cloudMenuView.vue +125 -0
  48. package/src/views/complex/config/complex.vue +501 -0
  49. package/src/views/complex/config/complexSetting.vue +1250 -0
  50. package/src/views/complex/rendering/complexShow.vue +16 -0
  51. package/src/views/data/dataManage.vue +560 -0
  52. package/src/views/data/sysData.vue +292 -0
  53. package/src/views/event/eventManager/vueEventDiy.vue +1184 -0
  54. package/src/views/event/eventManager/vueEventMain.vue +108 -0
  55. package/src/views/event/eventManager/vueEventSys.vue +296 -0
  56. package/src/views/event/js/apiEvent.js +22 -0
  57. package/src/views/fileLog/fileDownloadLog.vue +437 -0
  58. package/src/views/initData/initData.vue +4316 -0
  59. package/src/views/log/dblog/logdbDevelop.vue +306 -0
  60. package/src/views/log/dblog/logdbEnt.vue +331 -0
  61. package/src/views/log/dblog/logdbGov.vue +395 -0
  62. package/src/views/log/error/logError.vue +553 -0
  63. package/src/views/log/loginlog/logManageDevOrSup.vue +357 -0
  64. package/src/views/log/loginlog/logManageEnt.vue +343 -0
  65. package/src/views/log/loginlog/logManageGov.vue +328 -0
  66. package/src/views/log/sms/logSms.vue +308 -0
  67. package/src/views/menu/component/menuManageComponent.vue +2402 -0
  68. package/src/views/menu/component/menuModule.vue +449 -0
  69. package/src/views/menu/menuLocal.vue +223 -0
  70. package/src/views/menu/menuManage.vue +1135 -0
  71. package/src/views/menu/tenantMenuManage.vue +1132 -0
  72. package/src/views/menuRouter/cview/cviewShow.vue +18 -0
  73. package/src/views/menuRouter/cviewMenuRouter.vue +183 -0
  74. package/src/views/menuRouter/menuView.vue +132 -0
  75. package/src/views/menuRouter/urlMenuRouter.vue +160 -0
  76. package/src/views/org/entOrgTree.vue +1050 -0
  77. package/src/views/org/ownerMenu/ownerMenuTree.vue +269 -0
  78. package/src/views/org/safeValidate/safeValidate.vue +469 -0
  79. package/src/views/org/sysEntOrgUserDetail.vue +3390 -0
  80. package/src/views/org/sysOrgDimension.vue +832 -0
  81. package/src/views/org/sysOrgPosUserDetail.vue +1648 -0
  82. package/src/views/org/sysOrgPosUserTree.vue +1101 -0
  83. package/src/views/org/sysOrgTree.vue +864 -0
  84. package/src/views/param/sysParam.vue +987 -0
  85. package/src/views/preview/pdfViewer.vue +82 -0
  86. package/src/views/resources/js/resourcesCommon.js +137 -0
  87. package/src/views/resources/resRouter/resView.vue +161 -0
  88. package/src/views/resources/resourcesTabs.vue +82 -0
  89. package/src/views/resources/tabs/comp/pageResPreview.vue +309 -0
  90. package/src/views/resources/tabs/comp/pageResRegister.vue +1120 -0
  91. package/src/views/resources/tabs/dataResources.vue +843 -0
  92. package/src/views/resources/tabs/pageResources.vue +970 -0
  93. package/src/views/role/allowMenu.vue +148 -0
  94. package/src/views/role/authRole/authRole.vue +427 -0
  95. package/src/views/role/authRole/component/allocateSetting.vue +1056 -0
  96. package/src/views/role/authRole/component/authSetting.vue +1196 -0
  97. package/src/views/role/commonRole/commonRole.vue +677 -0
  98. package/src/views/role/commonRole/compoment/allocateRoleMenuSetting.vue +335 -0
  99. package/src/views/role/commonRole/compoment/authLinkMenuTree.vue +55 -0
  100. package/src/views/role/commonRole/compoment/authSettingNew.vue +190 -0
  101. package/src/views/role/commonRole/compoment/commonSetting.vue +1576 -0
  102. package/src/views/role/commonRole/compoment/commonSettingAdjust.vue +584 -0
  103. package/src/views/role/commonRole/compoment/commonSettingNew.vue +572 -0
  104. package/src/views/role/commonRole/compoment/roleMenuPower.vue +226 -0
  105. package/src/views/role/commonRole/compoment/roleMenuPowerSetting.vue +69 -0
  106. package/src/views/role/commonRole/compoment/roleMenuSetting.vue +365 -0
  107. package/src/views/role/commonRole/compoment/roleSourceSetting.vue +229 -0
  108. package/src/views/role/commonRole/tenantCommonRole.vue +768 -0
  109. package/src/views/role/role.vue +135 -0
  110. package/src/views/role/roleMenuOption.vue +898 -0
  111. package/src/views/role/roleSynchroRemind.vue +399 -0
  112. package/src/views/role/sysRole.vue +1525 -0
  113. package/src/views/role/viewMenuOptDetail.vue +182 -0
  114. package/src/views/sms/sendSms.vue +164 -0
  115. package/src/views/station/orgStation.vue +561 -0
  116. package/src/views/tenant/appContentManager.vue +938 -0
  117. package/src/views/tenant/appManager.vue +642 -0
  118. package/src/views/tenant/tenantRoleManager.vue +670 -0
  119. package/src/views/tenant/tenantUserManager.vue +615 -0
  120. package/src/views/threeinone/compoment/safeCascadeSelect.vue +327 -0
  121. package/src/views/threeinone/init/safeInitRegion.vue +203 -0
  122. package/src/views/threeinone/safeManager.vue +927 -0
  123. package/src/views/threeinone/safeMenuManage.vue +565 -0
  124. package/src/views/threeinone/safeOrgSpv.vue +364 -0
  125. package/src/views/threeinone/safeSpv/safeSpvLeftTree.vue +109 -0
  126. package/src/views/threeinone/safeSpv/safeSpvMain.vue +335 -0
  127. package/src/views/threeinone/safeSpvEconView.vue +569 -0
  128. package/src/views/threeinone/safeValidateRegion.vue +328 -0
  129. package/src/views/urlResource/urlResource.vue +856 -0
  130. package/src/views/user/empowerUser/empowerEntUserManage.vue +415 -0
  131. package/src/views/user/empowerUser/empowerOrgTree.vue +167 -0
  132. package/src/views/user/empowerUser/empowerUserList.vue +633 -0
  133. package/src/views/user/empowerUser/empowerUserListMenuDeatil.vue +656 -0
  134. package/src/views/user/empowerUser/empowerUserListViewMenuTree.vue +257 -0
  135. package/src/views/user/empowerUser/empowerUserManage.vue +99 -0
  136. package/src/views/user/stationUserManage.vue +934 -0
  137. package/src/views/user/userManage.vue +737 -0
  138. package/src/views/user/userMangement.vue +938 -0
  139. package/src/views/user/viewMenu/viewMenu.vue +113 -0
  140. package/src/views/versionupdatetool/versionUpdateTool.vue +225 -0
  141. package/src/views/versionupdatetool/versioninfomation/verisonInfomationManagement.vue +68 -0
@@ -0,0 +1,642 @@
1
+ <template>
2
+ <el-container class='appList-box'>
3
+ <el-header style="height: auto;">
4
+ <div class="appheader">
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.appName" placeholder="请输入"></el-input>
8
+ </el-form-item>
9
+ <!-- <el-form-item label="关联菜单">-->
10
+ <!-- <el-select v-model="formAppSearchData.linkMenu" placeholder="菜单">-->
11
+ <!-- <el-option label="区域一" value="shanghai"></el-option>-->
12
+ <!-- <el-option label="区域二" value="beijing"></el-option>-->
13
+ <!-- </el-select>-->
14
+ <!-- </el-form-item>-->
15
+ <el-form-item>
16
+ <el-button type="primary" icon="el-icon-search" @click="crud.doSearch()">查询</el-button>
17
+ <el-button icon="el-icon-close" @click="crud.resetSearch()">清空</el-button>
18
+ </el-form-item>
19
+ </el-form>
20
+ </div>
21
+ </el-header>
22
+ <el-main style="height: 100%;padding: 0 10px;">
23
+ <el-container style="height: 100%">
24
+ <el-header style="height: auto;padding: 10px 0">
25
+ <div class='tb-header-box'>
26
+ <!-- <el-button size="medium" type="primary" icon="el-icon-circle-plus-outline" @click="appAdd()">新增</el-button>-->
27
+ <el-button size="small" round type="danger" icon="el-icon-delete" @click='appDelete()'>删除
28
+ </el-button>
29
+ </div>
30
+ </el-header>
31
+ <el-main style="height: 100%;padding: 0">
32
+ <el-table :ref="crud.tableRef" :data="crud.dataStore.records" stripe border height="100%"
33
+ style="width: 100%"
34
+ :header-cell-style="getRowClass">
35
+ <!-- @selection-change=""-->
36
+ <el-table-column type="index" width="50"></el-table-column>
37
+ <el-table-column type="selection" width="55"></el-table-column>
38
+ <el-table-column prop="appName" label="应用名称" width="160">
39
+ </el-table-column>
40
+ <el-table-column prop="appMark" label="应用说明" show-overflow-tooltip></el-table-column>
41
+ <el-table-column prop="linkMenu" label="关联菜单" width="180"
42
+ show-overflow-tooltip></el-table-column>
43
+ <el-table-column label="是否已上架" width="100" align="center">
44
+ <template slot-scope="scope">
45
+ <el-tag effect="dark" type="info" v-if="scope.row.shelf === '0'">
46
+ {{ scope.row.shelf === '0' ? '否' : '是' }}
47
+ </el-tag>
48
+ <el-tag effect="dark" type="success" v-if="scope.row.shelf === '1'">
49
+ {{ scope.row.shelf === '0' ? '否' : '是' }}
50
+ </el-tag>
51
+ </template>
52
+ </el-table-column>
53
+ <el-table-column label="是否付费" width="100" align="center">
54
+ <template slot-scope="scope">
55
+ <el-tag effect="dark" type="info" v-if="scope.row.pay === '0'">
56
+ {{ scope.row.pay === '0' ? '否' : '是' }}
57
+ </el-tag>
58
+ <el-tag effect="dark" type="success" v-if="scope.row.pay === '1'">
59
+ {{ scope.row.pay === '0' ? '否' : '是' }}
60
+ </el-tag>
61
+ </template>
62
+ </el-table-column>
63
+ <el-table-column prop="version" label="版本号" width="80" align="center"></el-table-column>
64
+ <el-table-column label="操作" align="center" width="280">
65
+ <template slot-scope="scope">
66
+ <el-button size="small" icon="el-icon-view" type="primary" @click="viewApp(scope.row)">
67
+ 查看
68
+ </el-button>
69
+ <el-button size="small" icon="el-icon-edit-outline" type="primary"
70
+ style="margin-right: 10px;"
71
+ @click="editApp(scope.row)">
72
+ 修改
73
+ </el-button>
74
+ <el-popconfirm
75
+ confirm-button-text='确定'
76
+ cancel-button-text='取消'
77
+ icon="el-icon-info"
78
+ icon-color="red"
79
+ :title="appTypeTitle"
80
+ @confirm='changeAppType(scope.row.id,scope.row.shelf)'>
81
+ <el-button slot="reference" size="small" type="info" v-if="scope.row.shelf === '1'"
82
+ @click="changeAppTitle(scope.row.shelf)">
83
+ {{ scope.row.shelf === '0' ? '上架' : '下架' }}
84
+ </el-button>
85
+ <el-button slot="reference" size="small" type="success" v-else
86
+ @click="changeAppTitle(scope.row.shelf)">
87
+ {{ scope.row.shelf === '0' ? '上架' : '下架' }}
88
+ </el-button>
89
+ </el-popconfirm>
90
+ </template>
91
+ </el-table-column>
92
+ </el-table>
93
+ </el-main>
94
+ </el-container>
95
+ </el-main>
96
+ <el-footer style="height: 60px; padding: 16px 10px;">
97
+ <el-pagination
98
+ :ref="crud.pageRef"
99
+ :page-sizes="crud.pageSizes"
100
+ :page-size="crud.pageSize"
101
+ :current-page="crud.page"
102
+ :total="crud.dataStore.total"
103
+ @size-change="crud.sizeChange()"
104
+ @current-change="crud.currentPage()"
105
+ layout="total, sizes, prev, pager, next, jumper">
106
+ </el-pagination>
107
+ </el-footer>
108
+ <!-- 新增或修改app列表信息 -->
109
+ <el-dialog :title="dialogTitle" :visible.sync="addAppVisible" v-if="addAppVisible" :close-on-click-modal=false
110
+ height="70%"
111
+ top="12vh" width="50%" center @close="closeAppDialogBox()">
112
+ <div style="width: 100%;height: 340px;padding-left: 10px;padding-right: 10px;padding-top: 10px">
113
+ <!-- 修改form表单 -->
114
+ <el-form label-width="110px" :model="appObjData" class="dialogForm" ref="editFormDataRef" :rules="operate != 'view'?rules:null" :disabled='isDisabled'>
115
+ <el-row>
116
+ <el-col :span="12">
117
+ <el-form-item label="相同应用标记" prop="appKey" :class="operate == 'view'?'source-mark-class':''">
118
+ <el-select v-model="appObjData.appKey" filterable clearable @change="changeAppKey()"
119
+ v-if="operate != 'view'"
120
+ style="width: 100%">
121
+ <el-option v-for="application in applicationArr" :key="application.id"
122
+ :label="application.appName"
123
+ :value="application.id">
124
+ </el-option>
125
+ </el-select>
126
+ <el-tooltip effect="dark" content="选择历史打包应用用于平滑升级" placement="top" v-if="operate != 'view'">
127
+ <i class="el-icon-info" style="position:absolute;top: 10px;right:-15px;
128
+ font-size: 16px;cursor: pointer;color: #5cb6ff;"></i>
129
+ </el-tooltip>
130
+ <div v-if="operate == 'view'" class="cloud-div" style="margin-top: 0px;overflow-y: auto;">
131
+ {{ (applicationObj[appObjData.appKey] || {}).appName || ''}}
132
+ </div>
133
+ </el-form-item>
134
+ </el-col>
135
+ <el-col :span="12">
136
+ <el-form-item label="应用名称" prop="appName" :rules="operate != 'view'?plValidate('required'):null" :class="operate == 'view'?'source-mark-class':''">
137
+ <el-input v-model="appObjData.appName" v-if="operate != 'view'"></el-input>
138
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
139
+ {{appObjData.appName}}
140
+ </div>
141
+ </el-form-item>
142
+ </el-col>
143
+ </el-row>
144
+ <el-row>
145
+ <el-col :span="12">
146
+ <el-form-item label="应用版本" prop="version" :class="operate == 'view'?'source-mark-class':''" :rules="operate != 'view'? applicationVersionValidator:null">
147
+ <el-input v-model="appObjData.version" v-if="operate != 'view'"></el-input>
148
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
149
+ {{appObjData.version}}
150
+ </div>
151
+ </el-form-item>
152
+ </el-col>
153
+ <el-col :span="12">
154
+ <el-form-item label="应用图标" prop="appIcon">
155
+ <el-input v-model="appObjData.appIcon" style="display: none"></el-input>
156
+ <el-button @click="iconDialog = true">
157
+ <i :class="(currentIcon || '').indexOf('saspiconfont') > -1 ? currentIcon : 'saspiconfont pl-icon-tuxiang'"
158
+ style="font-size:16px"></i></el-button>
159
+ <el-button @click="clearIcon()" v-if="operate != 'view'">清空</el-button>
160
+ </el-form-item>
161
+ </el-col>
162
+ </el-row>
163
+ <el-row>
164
+ <el-col :span="12">
165
+ <el-form-item label="应用类型" prop="appType" :class="operate == 'view'?'source-mark-class':''">
166
+ <el-radio-group v-model="appObjData.appType" v-if="operate != 'view'">
167
+ <el-radio :label="key" v-for="(value,key) in appTypeObj" :key="key">
168
+ {{value}}
169
+ </el-radio>
170
+ </el-radio-group>
171
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
172
+ {{appTypeObj[appObjData.appType]}}
173
+ </div>
174
+ </el-form-item>
175
+ </el-col>
176
+ <el-col :span="12">
177
+ <el-form-item label="应用分类" prop="appClassfily"
178
+ :class="operate == 'view'?'source-mark-class':''"
179
+ :rules="operate != 'view'? plValidate('required'):null">
180
+ <el-select v-model="appObjData.appClassfily" placeholder="请选择"
181
+ v-if="operate != 'view'"
182
+ :filterable='true' allow-create style='width:100%'>
183
+ <el-option
184
+ v-for="item in appClassfilyOptions"
185
+ :key="item.value"
186
+ :label="item.label"
187
+ :value="item.value"
188
+ :disabled="item.disabled">
189
+ </el-option>
190
+ </el-select>
191
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
192
+ {{appObjData.appClassfily || '暂无'}}
193
+ </div>
194
+ </el-form-item>
195
+ </el-col>
196
+ </el-row>
197
+ <el-row>
198
+ <el-col :span="12">
199
+ <el-form-item label="是否上架" prop="shelf" :class="operate == 'view'?'source-mark-class':''">
200
+ <el-radio-group v-model="appObjData.shelf" v-if="operate != 'view'">
201
+ <el-radio :label="key" v-for="(value,key) in shelfObj" :key="key">
202
+ {{value}}
203
+ </el-radio>
204
+ </el-radio-group>
205
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
206
+ {{shelfObj[appObjData.shelf]}}
207
+ </div>
208
+ </el-form-item>
209
+ </el-col>
210
+ <el-col :span="12">
211
+ <el-form-item label="是否付费" prop="pay" :class="operate == 'view'?'source-mark-class':''">
212
+ <el-radio-group v-model="appObjData.pay" v-if="operate != 'view'">
213
+ <el-radio :label="key" v-for="(value,key) in payObj" :key="key">
214
+ {{value}}
215
+ </el-radio>
216
+ </el-radio-group>
217
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
218
+ {{payObj[appObjData.pay]}}
219
+ </div>
220
+ </el-form-item>
221
+ </el-col>
222
+ <el-col :span="12" v-if="appObjData.pay == '1'">
223
+ <el-form-item label="付费价格" prop="price" :class="operate == 'view'?'source-mark-class':''">
224
+ <el-input v-model="appObjData.price" v-if="operate != 'view'">
225
+ <template slot="append">元</template>
226
+ </el-input>
227
+ <div v-else class="cloud-div" style="margin-top: 0px;overflow-y: auto;">
228
+ {{payObj[appObjData.price]}}
229
+ </div>
230
+ </el-form-item>
231
+ </el-col>
232
+ <el-col :span="12" v-if="appObjData.pay == '1'">
233
+ <el-form-item label="支持试用" prop="trail" :class="operate == 'view'?'source-mark-class':''">
234
+ <el-radio-group v-model="appObjData.trail" v-if="operate != 'view'">
235
+ <el-radio :label="key" v-for="(value,key) in trailObj" :key="key">
236
+ {{value}}
237
+ </el-radio>
238
+ </el-radio-group>
239
+ <div v-else class="cloud-div" style="min-height:20px;margin-top: 0px;overflow-y: auto;">
240
+ {{trailObj[appObjData.trail]}}
241
+ </div>
242
+ </el-form-item>
243
+ </el-col>
244
+ <el-col :span="12" v-if="appObjData.trail == '1'">
245
+ <el-form-item label="试用时长" prop="trailTime" :class="operate == 'view'?'source-mark-class':''">
246
+ <el-input placeholder="请输入内容" v-model="appObjData.trailTime" v-if="operate != 'view'">
247
+ <template slot="append">天</template>
248
+ </el-input>
249
+ <div v-else class="cloud-div" style="margin-top: 0px;overflow-y: auto;">
250
+ {{appObjData.trailTime+'天'}}
251
+ </div>
252
+ </el-form-item>
253
+ </el-col>
254
+ </el-row>
255
+
256
+ <el-row>
257
+ <el-col :span="24">
258
+ <el-form-item label="应用说明" prop="appMark" :class="operate == 'view'?'source-mark-class':''">
259
+ <el-input v-model="appObjData.appMark" :rows="4" type="textarea" v-if="operate != 'view'"
260
+ placeholder="请输入信息"></el-input>
261
+ <div v-else class="cloud-div" style="margin-top: 0px;overflow-y: auto;">
262
+ {{appObjData.appMark}}
263
+ </div>
264
+ </el-form-item>
265
+ </el-col>
266
+ </el-row>
267
+
268
+ </el-form>
269
+ </div>
270
+ <div slot="footer" class="dialog-footer" align="center">
271
+ <el-button type="primary" @click="appSubmit()" size="small" icon="el-icon-success" v-if="operate === 'update'">确定</el-button>
272
+ <el-button @click="addAppVisible = false" size="small" icon="el-icon-error" v-if="operate === 'view'">关闭</el-button>
273
+ <el-button @click="closeAppDialog()" size="small" icon="el-icon-error" v-else>取消</el-button>
274
+ </div>
275
+ </el-dialog>
276
+ <!-- 应用图标-->
277
+ <el-dialog :close-on-click-modal=false :visible.sync="iconDialog" class="font-dialog" title="选择图标" width="70%"
278
+ height="80%" top="10vh">
279
+ <font-icon :callback="getmenuIcon"></font-icon>
280
+ </el-dialog>
281
+ </el-container>
282
+ </template>
283
+ <script>
284
+ import {FontIcon} from 'sasp-base';
285
+
286
+ export default {
287
+ name: "appManager",
288
+ components: {FontIcon},
289
+ data() {
290
+ /**
291
+ * 应用版本
292
+ * @param rule
293
+ * @param value
294
+ * @param callback
295
+ * @returns {*}
296
+ */
297
+ let versionValidator =(rule,value,callback) =>{
298
+ if(!value){
299
+ callback();
300
+ }else {
301
+ let regFd = /^\d+(\.\d+)?$/; //非负浮点数
302
+ if(!regFd.test(value)){
303
+ return callback(new Error('请输入正确的应用版本'));
304
+ }else {
305
+ //判断版本长度
306
+ let suffix = value.split(".")[1];
307
+ if(suffix.length > 2){
308
+ return callback(new Error('版本号最多为两位小数'));
309
+ }else if(Number(value) <= (Number(this.oldApplicationVersion)) && Number(value) > 1.0){
310
+ //比较上一个版本
311
+ return callback(new Error('应用版本必须比上一个版本'+this.oldApplicationVersion+'大'));
312
+ }else if(Number(value) < 1.0){
313
+ return callback(new Error('应用版本最小为1.0'));
314
+ }else {
315
+ callback();
316
+ }
317
+ }
318
+ }
319
+ };
320
+ return {
321
+ currentIcon: "", // tab页图标
322
+ appListData: [],//app列表数据
323
+ operate: 'add', //操作类型
324
+ dialogTitle: '应用信息',
325
+ appTypeTitle: '确定要下架应用吗?',
326
+ isDisabled: false, //是否禁用表单
327
+ //app列表每一行数据
328
+ appId: '',
329
+ appObjData: {
330
+ appName: '',
331
+ appMark: '',
332
+ appType: 'group',
333
+ linkmenu: '',
334
+ appIcon: '',
335
+ shelf: '1',
336
+ pay: '1',
337
+ version: '',
338
+ trail: '1',
339
+ trailTime: '30',
340
+ appKey: '应用key1',
341
+ appClassfily: '工作管理'
342
+ },
343
+ appKeyOptions: [],
344
+ appClassfilyOptions: [{
345
+ value: '工作管理',
346
+ label: '工作管理'
347
+ }, {
348
+ value: '项目管理',
349
+ label: '项目管理',
350
+ }, {
351
+ value: '行政管理',
352
+ label: '行政管理'
353
+ }],
354
+ addAppVisible: false,
355
+ iconDialog: false,
356
+ rules: {
357
+ appType: {required: true, message: '该输入项为必输项', trigger: 'blur'},
358
+ shelf: {required: true, message: '该输入项为必输项', trigger: 'blur'},
359
+ pay: {required: true, message: '该输入项为必输项', trigger: 'blur'},
360
+ trail: {required: true, message: '该输入项为必输项', trigger: 'blur'},
361
+ trailTime: [{required: true, message: '该输入项为必输项', trigger: 'blur'},
362
+ {
363
+ pattern: /^([0-9]|[1-9][0-9]|[1-2][0-9][0-9]|[3][0-5][0-9]|(360|361|363|362|364|365))$/,
364
+ message: "请填写正确的天数"
365
+ }],
366
+ appMark: {required: true, message: '该输入项为必输项', trigger: 'blur'},
367
+ },
368
+ crud: new this.CrudUtil({
369
+ vue: this,
370
+ entityName: "sysApplication",
371
+ url: this.api.sysApplication.url,
372
+ searchUrl: this.api.sysApplication.findPage,
373
+ addUrl: this.api.sysApplication.add,
374
+ updateUrl: this.api.sysApplication.update,
375
+ deleteUrl: this.api.sysApplication.delete,
376
+ searchForm: {order: "CREATE_TIME DESC"},
377
+ noClearSearchColumns: ["created"],
378
+ // afterRemoveSuccess: this.afterRemoveSuccess
379
+ }),
380
+
381
+ applicationArr:[], //应用数组
382
+ applicationObj:{}, //应用对象
383
+ oldApplicationVersion:'1.0', //上一个版本
384
+ applicationVersionValidator:[
385
+ {required: true, message: '该输入项为必输项'},
386
+ {validator:versionValidator,trigger:'blur'},
387
+ ],
388
+ appTypeObj:{ //i应用类型
389
+ "group":"团体",
390
+ "person":"个人"
391
+ },
392
+ shelfObj:{//是否上架
393
+ "1":"上架",
394
+ "0":"下架"
395
+ },
396
+ payObj:{//支持付费
397
+ "1":"是",
398
+ "0":"否"
399
+ },
400
+ trailObj:{ //支持试用
401
+ "1":"是",
402
+ "0":"否"
403
+ },
404
+ }
405
+ },
406
+ created() {
407
+ // this.getAppListData();
408
+ this.crud.search();
409
+ },
410
+ mounted() {
411
+ },
412
+ methods: {
413
+ //改变上下架提示标题
414
+ changeAppTitle(status){
415
+ this.appTypeTitle = status === '0' ? '确定要上架应用吗?' : '确定要下架应用吗?';
416
+ },
417
+ //改变上下架状态;0:‘下架’,1:‘上架’
418
+ changeAppType(id,status) {
419
+ let shelf = status === '0' ? '1' : '0';
420
+ this.axios.post(this.api.sysApplication.update, {id, shelf}).then(res => {
421
+ if (res.data.operateSuccess) {
422
+ this.$message({
423
+ message: res.data.operateMessage,
424
+ type: "success",
425
+ });
426
+ this.crud.search();
427
+ } else {
428
+ this.$message.error("修改失败~");
429
+ }
430
+ })
431
+ },
432
+ //新增
433
+ // appAdd(){
434
+ // this.operate = 'add';
435
+ // this.dialogTitle = '新增应用信息';
436
+ // this.appObjData.appName = '';
437
+ // this.appObjData.version = '';
438
+ // this.appObjData.appMark = '';
439
+ // this.addAppVisible = true;
440
+ // },
441
+ //修改保存
442
+ appSubmit() {
443
+ this.$refs['editFormDataRef'].validate((valid) => {
444
+ if (valid) {
445
+ this.axios.post(this.api.sysApplication.update, {id: this.appId, ...this.appObjData}).then(res => {
446
+ if (res.data.operateSuccess) {
447
+ this.$message({
448
+ message: res.data.operateMessage,
449
+ type: "success",
450
+ });
451
+ this.addAppVisible = false;
452
+ this.currentIcon = '';
453
+ // this.crud.search();
454
+ // this.$refs[formName].resetFields();
455
+ } else {
456
+ this.$message.error("修改失败~");
457
+ }
458
+ })
459
+ } else {
460
+ this.$message({
461
+ message: "验证不通过",
462
+ type: "error",
463
+ });
464
+ return false;
465
+ }
466
+ });
467
+ },
468
+ //选择删除
469
+ appDelete() {
470
+ let selection = this.$refs[this.crud.tableRef].selection;
471
+ this.crud.remove();
472
+ },
473
+
474
+ /**
475
+ * 请求app列表数据(查询app列表)
476
+ */
477
+ // getAppListData() {
478
+ // this.axios.post(this.api.sysApplication.find).then(res => {
479
+ // console.log(res.data)
480
+ // })
481
+ // },
482
+
483
+ //点击查看按钮
484
+ viewApp(row){
485
+ this.isDisabled = true;
486
+ this.appObjData = row;
487
+ this.currentIcon = row.appIcon;
488
+ this.operate = 'view';
489
+ this.dialogTitle = '查看应用信息'
490
+ this.applicationArr = [];
491
+ this.applicationObj = {};
492
+ this.axios.post(this.api.sysApplication.find).then(res => {
493
+ this.applicationArr = res && res.data ? (res.data || []) : [];
494
+ this.applicationArr.forEach(item => {
495
+ this.applicationObj[item.id] = item;
496
+ });
497
+ this.addAppVisible = true;
498
+ });
499
+ },
500
+ //编辑数据(修改按钮)
501
+ editApp(row) {
502
+ this.isDisabled = false;
503
+ this.appId = row.id;
504
+ this.oldApplicationVersion = row.version; //上一个版本
505
+ this.appObjData = JSON.parse(JSON.stringify(row));
506
+ this.currentIcon = row.appIcon;
507
+ this.operate = 'update';
508
+ this.dialogTitle = '编辑应用信息';
509
+ this.applicationArr = [];
510
+ this.applicationObj = {};
511
+ this.axios.post(this.api.sysApplication.find).then(res => {
512
+ this.applicationArr = res && res.data ? (res.data || []) : [];
513
+ this.applicationArr.forEach(item => {
514
+ this.applicationObj[item.id] = item;
515
+ });
516
+ this.addAppVisible = true;
517
+ });
518
+
519
+ },
520
+ //判断当前点击是修改还是查看
521
+ closeAppDialogBox(){
522
+ if (this.operate === 'update'){
523
+ this.closeAppDialog();
524
+ }else {
525
+ this.addAppVisible = false;
526
+ }
527
+ },
528
+ //关闭
529
+ closeAppDialog() {
530
+ this.addAppVisible = true;
531
+ this.$confirm('是否确认取消?若继续操作,本次修改未保存内容将会丢失', '提示', {
532
+ confirmButtonText: '确定',
533
+ cancelButtonText: '取消',
534
+ type: 'warning'
535
+ }).then(() => {
536
+ this.addAppVisible = false;
537
+ }).catch(() => {
538
+
539
+ });
540
+ },
541
+ /**
542
+ * 设置tab页图标
543
+ * @param icon 图标
544
+ */
545
+ getmenuIcon(icon) {
546
+ if (icon.startsWith("el-icon-")) {
547
+ this.appObjData.appIcon = icon;
548
+ this.currentIcon = icon;
549
+ } else {
550
+ this.appObjData.appIcon = 'saspiconfont ' + icon;
551
+ this.currentIcon = 'saspiconfont ' + icon;
552
+ }
553
+ this.iconDialog = false;
554
+ },
555
+ /**
556
+ * 清除icon图标
557
+ */
558
+ clearIcon() {
559
+ let vm = this;
560
+ vm.appObjData.appIcon = '';
561
+ vm.currentIcon = '';
562
+ },
563
+ /**
564
+ * 修改讨论列表表格表头
565
+ *
566
+ */
567
+ getRowClass({row, column, rowIndex, columnIndex}) {
568
+ if (rowIndex === 0) {
569
+ return 'background-color:#F2F2F2;color:#000;font-size:15px;font-weight:600;'
570
+ } else {
571
+ return ''
572
+ }
573
+ },
574
+
575
+ /**
576
+ * 切换应用标识
577
+ */
578
+ changeAppKey(){
579
+ if(this.appObjData.appKey && this.applicationObj[this.appObjData.appKey]){
580
+ //赋值默认版本 在历史版本上 + 0.01
581
+ let obj = this.applicationObj[this.appObjData.appKey];
582
+ //赋值当前打包对象默认值
583
+ this.$set(this.appObjData,'appName',obj.appName);
584
+ this.$set(this.appObjData,'appIcon',obj.appIcon);
585
+ this.appObjData.appKey = obj.id; //赋值
586
+ //版本
587
+ this.$set(this.appObjData,'version',(Number(obj.version) + 0.01) +"");
588
+ if(this.appObjData.version.indexOf(".") == -1){
589
+ this.appObjData.version = this.appObjData.version+".0"; //整数情况赋值小数点
590
+ }
591
+ this.appObjData.appMark = '';
592
+ }
593
+ },
594
+
595
+ }
596
+ }
597
+ </script>
598
+
599
+ <style scoped lang='scss'>
600
+ .appList-box {
601
+ width: 100%;
602
+ height: 100%;
603
+
604
+ .appheader {
605
+ margin-top: 10px;
606
+ padding: 15px 20px 15px 20px;
607
+ border: 1px solid #EBEEF5;
608
+ border-radius: 4px;
609
+
610
+ /deep/ .el-form {
611
+ .el-form-item {
612
+ margin-bottom: 0;
613
+ }
614
+ }
615
+ }
616
+
617
+ /deep/ .el-table-column--selection .cell {
618
+ padding-left: 10px;
619
+ }
620
+
621
+ /deep/ .el-tag {
622
+ padding: 0 20px;
623
+ }
624
+ /deep/ .el-dialog__title{
625
+ font-size: 16px;
626
+ }
627
+ .source-mark-class /deep/ label{
628
+ position: relative;
629
+ top: 0px;
630
+ }
631
+ .cloud-div{
632
+ border: 1px dashed #e6e6e6;padding: 0px 10px;box-sizing: border-box;min-height: 42px;
633
+ }
634
+
635
+ }
636
+
637
+ </style>
638
+ <style lang='scss'>
639
+ /deep/ .el-popconfirm__main{
640
+ margin: 10px 0 !important;
641
+ }
642
+ </style>