@sugarat/easypicker2-client 2.4.1

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 (145) hide show
  1. package/.env +6 -0
  2. package/.env.production +3 -0
  3. package/.env.test +4 -0
  4. package/.eslintignore +0 -0
  5. package/.eslintrc.json +57 -0
  6. package/.github/workflows/main.yml +61 -0
  7. package/.prettierrc.js +9 -0
  8. package/LICENSE +21 -0
  9. package/README.md +86 -0
  10. package/auto-imports.d.ts +6 -0
  11. package/components.d.ts +56 -0
  12. package/docker/ep_backup/easypicker2.sql +214 -0
  13. package/docker/ep_backup/mongodb/easypicker2/action.bson +0 -0
  14. package/docker/ep_backup/mongodb/easypicker2/action.metadata.json +1 -0
  15. package/docker/ep_backup/mongodb/easypicker2/log.bson +0 -0
  16. package/docker/ep_backup/mongodb/easypicker2/log.metadata.json +1 -0
  17. package/docker/ep_backup/user-config.json +176 -0
  18. package/docs/.env +1 -0
  19. package/docs/.env.production +2 -0
  20. package/docs/.vitepress/config.ts +204 -0
  21. package/docs/.vitepress/theme/bg.png +0 -0
  22. package/docs/.vitepress/theme/index.scss +41 -0
  23. package/docs/.vitepress/theme/index.ts +5 -0
  24. package/docs/author.md +24 -0
  25. package/docs/auto-imports.d.ts +6 -0
  26. package/docs/components.d.ts +17 -0
  27. package/docs/deploy/design/api.md +3 -0
  28. package/docs/deploy/design/db.md +3 -0
  29. package/docs/deploy/design/index.md +3 -0
  30. package/docs/deploy/design/shell.md +9 -0
  31. package/docs/deploy/faq.md +86 -0
  32. package/docs/deploy/index.md +9 -0
  33. package/docs/deploy/local.md +275 -0
  34. package/docs/deploy/online-new.md +610 -0
  35. package/docs/deploy/online.md +683 -0
  36. package/docs/deploy/qiniu.md +183 -0
  37. package/docs/index.md +40 -0
  38. package/docs/introduction/about/code.md +26 -0
  39. package/docs/introduction/about/index.md +33 -0
  40. package/docs/introduction/feature/index.md +3 -0
  41. package/docs/plan/log.md +333 -0
  42. package/docs/plan/todo.md +127 -0
  43. package/docs/plan/wish.md +29 -0
  44. package/docs/praise/index.md +45 -0
  45. package/docs/public/favicon.ico +0 -0
  46. package/docs/public/logo.png +0 -0
  47. package/docs/public/robots.txt +2 -0
  48. package/docs/src/apis/ajax.ts +66 -0
  49. package/docs/src/apis/index.ts +1 -0
  50. package/docs/src/apis/modules/wish.ts +20 -0
  51. package/docs/src/components/Avatar.vue +60 -0
  52. package/docs/src/components/Home.vue +85 -0
  53. package/docs/src/components/Picture.vue +13 -0
  54. package/docs/src/components/Praise.vue +52 -0
  55. package/docs/src/components/WishBtn.vue +98 -0
  56. package/docs/src/components/WishPanel.vue +170 -0
  57. package/docs/src/components/callme/index.vue +72 -0
  58. package/docs/vite.config.ts +42 -0
  59. package/index.html +127 -0
  60. package/package.json +52 -0
  61. package/public/favicon.ico +0 -0
  62. package/public/logo.png +0 -0
  63. package/scripts/deploy/docs.mjs +24 -0
  64. package/scripts/deploy/prod.mjs +24 -0
  65. package/scripts/deploy/test.mjs +26 -0
  66. package/src/@types/ajax.d.ts +5 -0
  67. package/src/@types/api.d.ts +305 -0
  68. package/src/@types/lib.d.ts +26 -0
  69. package/src/@types/page.d.ts +18 -0
  70. package/src/App.vue +36 -0
  71. package/src/apis/ajax.ts +70 -0
  72. package/src/apis/index.ts +20 -0
  73. package/src/apis/modules/action.ts +17 -0
  74. package/src/apis/modules/category.ts +20 -0
  75. package/src/apis/modules/config.ts +19 -0
  76. package/src/apis/modules/file.ts +150 -0
  77. package/src/apis/modules/people.ts +81 -0
  78. package/src/apis/modules/public.ts +49 -0
  79. package/src/apis/modules/super/overview.ts +56 -0
  80. package/src/apis/modules/super/user.ts +62 -0
  81. package/src/apis/modules/task.ts +67 -0
  82. package/src/apis/modules/user.ts +56 -0
  83. package/src/apis/modules/wish.ts +31 -0
  84. package/src/assets/i/EasyPicker.png +0 -0
  85. package/src/assets/logo.png +0 -0
  86. package/src/assets/styles/app.css +69 -0
  87. package/src/components/HomeFooter/index.vue +134 -0
  88. package/src/components/HomeHeader/index.vue +156 -0
  89. package/src/components/InfosForm/index.vue +73 -0
  90. package/src/components/MessageList/index.vue +155 -0
  91. package/src/components/MessagePanel/index.vue +42 -0
  92. package/src/components/Praise/index.vue +102 -0
  93. package/src/components/QrCode.vue +44 -0
  94. package/src/components/linkDialog.vue +104 -0
  95. package/src/components/loginPanel.vue +92 -0
  96. package/src/constants/index.ts +83 -0
  97. package/src/env.d.ts +8 -0
  98. package/src/main.ts +19 -0
  99. package/src/pages/404/index.vue +59 -0
  100. package/src/pages/about/index.vue +152 -0
  101. package/src/pages/callme/index.vue +155 -0
  102. package/src/pages/dashboard/config/index.vue +264 -0
  103. package/src/pages/dashboard/files/index.vue +1152 -0
  104. package/src/pages/dashboard/index.vue +335 -0
  105. package/src/pages/dashboard/manage/config/index.vue +97 -0
  106. package/src/pages/dashboard/manage/index.vue +105 -0
  107. package/src/pages/dashboard/manage/overview/index.vue +488 -0
  108. package/src/pages/dashboard/manage/user/index.vue +679 -0
  109. package/src/pages/dashboard/manage/wish/index.vue +257 -0
  110. package/src/pages/dashboard/tasks/components/CategoryPanel.vue +208 -0
  111. package/src/pages/dashboard/tasks/components/CreateTask.vue +93 -0
  112. package/src/pages/dashboard/tasks/components/TaskInfo.vue +129 -0
  113. package/src/pages/dashboard/tasks/components/infoPanel/ddl.vue +96 -0
  114. package/src/pages/dashboard/tasks/components/infoPanel/file.vue +175 -0
  115. package/src/pages/dashboard/tasks/components/infoPanel/info.vue +477 -0
  116. package/src/pages/dashboard/tasks/components/infoPanel/people.vue +567 -0
  117. package/src/pages/dashboard/tasks/components/infoPanel/template.vue +146 -0
  118. package/src/pages/dashboard/tasks/components/infoPanel/tip.vue +55 -0
  119. package/src/pages/dashboard/tasks/components/infoPanel/tipInfo.vue +196 -0
  120. package/src/pages/dashboard/tasks/index.vue +302 -0
  121. package/src/pages/dashboard/tasks/public.ts +32 -0
  122. package/src/pages/disabled/index.vue +47 -0
  123. package/src/pages/feedback/index.vue +5 -0
  124. package/src/pages/home/index.vue +72 -0
  125. package/src/pages/login/index.vue +270 -0
  126. package/src/pages/register/index.vue +211 -0
  127. package/src/pages/reset/index.vue +186 -0
  128. package/src/pages/task/index.vue +897 -0
  129. package/src/pages/wish/index.vue +152 -0
  130. package/src/router/Interceptor/index.ts +112 -0
  131. package/src/router/index.ts +13 -0
  132. package/src/router/routes/index.ts +197 -0
  133. package/src/shims-vue.d.ts +6 -0
  134. package/src/store/index.ts +17 -0
  135. package/src/store/modules/category.ts +44 -0
  136. package/src/store/modules/public.ts +27 -0
  137. package/src/store/modules/task.ts +55 -0
  138. package/src/store/modules/user.ts +57 -0
  139. package/src/utils/elementUI.ts +8 -0
  140. package/src/utils/networkUtil.ts +236 -0
  141. package/src/utils/other.ts +25 -0
  142. package/src/utils/regExp.ts +11 -0
  143. package/src/utils/stringUtil.ts +242 -0
  144. package/tsconfig.json +24 -0
  145. package/vite.config.ts +55 -0
@@ -0,0 +1,264 @@
1
+ <template>
2
+ <div class="user">
3
+ <div class="panel">
4
+ <!-- 服务概况 -->
5
+ <div>
6
+ <h1>
7
+ <span>服务概况</span>
8
+ <el-icon :class="{
9
+ loading,
10
+ }" @click="refreshStatus" style="cursor:pointer;margin-left: 10px;">
11
+ <Refresh />
12
+ </el-icon>
13
+ <span v-show="loading">数据加载中...</span>
14
+ </h1>
15
+ <Tip>查看各个服务的运行情况</Tip>
16
+ <div class="service-list">
17
+ <div v-for="service in serviceList" :key="service.key" class="service-item">
18
+ <img :src="service.logo" :alt="service.name">
19
+ <!-- <p>{{ service.name }}</p> -->
20
+ <p>
21
+ <Tip>{{ service.des }}</Tip>
22
+ </p>
23
+ <el-button v-if="service.status" type="success" size="small" :icon="Select" circle />
24
+ <el-button v-else type="danger" size="small" :icon="CloseBold" circle />
25
+ <p v-if="!service.status && service.error">
26
+ <Tip>{{ service.error }}</Tip>
27
+ </p>
28
+ </div>
29
+ </div>
30
+ </div>
31
+ <div v-show="showErrorList.length" class="error-panel">
32
+ <h1>错误信息</h1>
33
+ <p v-for="err in showErrorList" :key="err.key"><strong>{{ err.name }}:</strong> <span class="error">{{
34
+ err.errMsg
35
+ }}</span></p>
36
+ </div>
37
+ <div>
38
+ <h1>
39
+ 服务相关配置
40
+ </h1>
41
+ <Tip>
42
+ 在此面板,配置服务器运行相关参数
43
+ <!-- TODO:待补齐地址 -->
44
+ <el-button type="primary" link="">配置手册?</el-button>
45
+ </Tip>
46
+ </div>
47
+ <div class="config-container">
48
+ <div class="config-panel" v-for="serverItem in serverConfig" :key="serverItem.title">
49
+ <h2>
50
+ {{ serverItem.title }}
51
+ </h2>
52
+ <el-form :label-position="'right'" label-width="100px" style="max-width: 400px;margin: 0 auto;;">
53
+ <el-form-item :label-width="'auto'" v-for="cfgItem in serverItem.data" :label="cfgItem.label || cfgItem.key"
54
+ :key="cfgItem.key">
55
+ <div class="flex" style="flex:1">
56
+ <el-input :disabled="cfgItem.disabled" v-model="cfgItem.value" />
57
+ <el-button v-if="cfgItem.disabled" @click="cfgItem.disabled = false" type="primary" text>更新</el-button>
58
+ <el-button v-else @click="updateCfg(cfgItem)" type="success" text>完成</el-button>
59
+ </div>
60
+ </el-form-item>
61
+ </el-form>
62
+ </div>
63
+ </div>
64
+ </div>
65
+ </div>
66
+ </template>
67
+ <script lang="ts" setup>
68
+ import { ElMessage } from 'element-plus'
69
+ import {
70
+ computed, onMounted, reactive, ref,
71
+ } from 'vue'
72
+ import { useStore } from 'vuex'
73
+ import { Select, CloseBold, Refresh } from '@element-plus/icons-vue'
74
+ import { ConfigServiceAPI } from '@/apis'
75
+ import Tip from '../tasks/components/infoPanel/tip.vue'
76
+
77
+ const serviceList = reactive([
78
+ {
79
+ name: 'MySQL',
80
+ key: 'mysql',
81
+ logo: 'https://img.cdn.sugarat.top/mdImg/MTY1NzM1OTAyMjIwNA==657359022204',
82
+ status: false,
83
+ des: '存储用户数据',
84
+ errMsg: '',
85
+ },
86
+ {
87
+ name: '七牛云',
88
+ key: 'qiniu',
89
+ logo: 'https://img.cdn.sugarat.top/mdImg/MTY1NzM1ODcyODM0Mg==657358728342',
90
+ status: false,
91
+ des: '文件存储',
92
+ },
93
+ {
94
+ name: 'MongoDB',
95
+ key: 'mongodb',
96
+ logo: 'https://img.cdn.sugarat.top/mdImg/MTY1NzM1OTA4OTc3Nw==657359089777',
97
+ status: false,
98
+ des: '用户数据与日志',
99
+ },
100
+ {
101
+ name: 'Redis',
102
+ key: 'redis',
103
+ logo: 'https://img.cdn.sugarat.top/mdImg/MTY1NzM1ODgyNzM1MA==657358827350',
104
+ status: false,
105
+ des: '持久化缓存数据',
106
+ error: '确保安装redis,且监听端口6379',
107
+ },
108
+ {
109
+ name: '腾讯云',
110
+ key: 'tx',
111
+ logo: 'https://img.cdn.sugarat.top/mdImg/MTY1NzM1OTE1MzQzOQ==657359153439',
112
+ status: false,
113
+ des: '短信服务',
114
+ },
115
+ ])
116
+ const $store = useStore()
117
+ const loading = ref(false)
118
+ const showErrorList = computed(() => serviceList.filter((item) => item.errMsg))
119
+ const refreshStatus = () => {
120
+ if (loading.value) return
121
+ loading.value = true
122
+ ConfigServiceAPI
123
+ .getServiceOverview()
124
+ .then((v) => {
125
+ const { data } = v
126
+ serviceList.forEach((item) => {
127
+ const { status, errMsg } = data[item.key]
128
+ item.status = status
129
+ item.errMsg = errMsg
130
+ })
131
+ ElMessage.success('服务状态刷新完成')
132
+ loading.value = false
133
+ })
134
+ }
135
+
136
+ const serverConfig = ref([])
137
+ const getServiceConfig = () => {
138
+ ConfigServiceAPI
139
+ .getServiceConfig()
140
+ .then((v) => {
141
+ // console.log(v.data)
142
+ v.data.forEach((v) => {
143
+ v.data.forEach((v) => {
144
+ v.disabled = true
145
+ })
146
+ })
147
+ serverConfig.value = v.data
148
+ })
149
+ }
150
+ const updateCfg = (item: ConfigServiceAPITypes.ServiceConfigItem) => {
151
+ ConfigServiceAPI
152
+ .updateCfg(item)
153
+ .then(() => {
154
+ item.disabled = true
155
+ ElMessage.success('更新成功')
156
+ refreshStatus()
157
+ })
158
+ }
159
+ onMounted(() => {
160
+ refreshStatus()
161
+ getServiceConfig()
162
+ })
163
+ const isMobile = computed(() => $store.getters['public/isMobile'])
164
+
165
+ </script>
166
+
167
+ <style scoped lang="scss">
168
+ @media screen and (max-width: 700px) {
169
+ .user {
170
+ margin-top: 40px !important;
171
+ }
172
+ }
173
+
174
+ .user {
175
+ margin: 0 auto;
176
+ }
177
+
178
+ .panel {
179
+ max-width: 1256px;
180
+ padding: 1em;
181
+ background-color: #fff;
182
+ margin: 10px auto;
183
+ box-sizing: border-box;
184
+ box-shadow: 0 2px 12px 0 rgb(0 0 0 / 10%);
185
+ border-radius: 4px;
186
+ }
187
+
188
+ h1 {
189
+ margin: 0;
190
+ padding: 10px 0;
191
+ font-size: 20px;
192
+ font-weight: bold;
193
+ text-align: center;
194
+ display: flex;
195
+ justify-content: center;
196
+ align-items: center;
197
+ }
198
+
199
+ .service-list {
200
+ display: flex;
201
+ flex-wrap: wrap;
202
+ justify-content: space-around;
203
+ }
204
+
205
+ .service-item {
206
+ display: flex;
207
+ flex-direction: column;
208
+ justify-content: center;
209
+ align-items: center;
210
+ margin: 10px;
211
+ min-width: 120px;
212
+
213
+ img {
214
+ width: 80px;
215
+ }
216
+
217
+ p {
218
+ text-align: center;
219
+ padding-top: 10px;
220
+ font-size: 14px;
221
+ }
222
+ }
223
+
224
+ @keyframes rotate {
225
+ 0% {
226
+ transform: rotate(0deg);
227
+ }
228
+
229
+ 100% {
230
+ transform: rotate(360deg);
231
+ }
232
+ }
233
+
234
+ .loading {
235
+ margin-left: 10px;
236
+ animation: rotate 1s linear infinite;
237
+ }
238
+
239
+ .error-panel {
240
+ padding: 0 20px;
241
+
242
+ p {
243
+ .error {
244
+ color: red;
245
+ }
246
+
247
+ margin-bottom: 10px;
248
+ }
249
+ }
250
+
251
+ .config-container {
252
+ display: flex;
253
+ justify-content: space-around;
254
+ flex-wrap: wrap;
255
+ }
256
+
257
+ .config-panel {
258
+ h2 {
259
+ text-align: center;
260
+ font-size: 16px;
261
+ margin-bottom: 10px;
262
+ }
263
+ }
264
+ </style>