Merge branch 'dev'
Showing
6 changed files
with
414 additions
and
247 deletions
1 | /* | 1 | /* |
2 | * @Description: | 2 | * @Description: |
3 | * @Autor: renchao | 3 | * @Autor: renchao |
4 | * @LastEditTime: 2023-09-15 09:32:40 | 4 | * @LastEditTime: 2024-05-16 09:23:43 |
5 | */ | 5 | */ |
6 | import request from '@/utils/request' | 6 | import request from '@/utils/request' |
7 | import { log } from 'bpmn-js-token-simulation' | ||
8 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | 7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) |
9 | /** | 8 | /** |
10 | * @description: 添加补录记录 | 9 | * @description: 添加补录记录 | ... | ... |
src/api/dzqm.js
0 → 100644
1 | /* | ||
2 | * @Description: | ||
3 | * @Autor: renchao | ||
4 | * @LastEditTime: 2024-05-16 09:23:47 | ||
5 | */ | ||
6 | import request from '@/utils/request' | ||
7 | let SERVER = window.config ? window.config : JSON.parse(localStorage.getItem('ApiUrl')) | ||
8 | /** | ||
9 | * @description: 上传电子签名 | ||
10 | * @param {*} data | ||
11 | * @author: renchao | ||
12 | */ | ||
13 | export function dzqmUpload (data) { | ||
14 | return request({ | ||
15 | url: SERVER.SERVERAPI + '/rest/system/dzqm/upload', | ||
16 | method: 'post', | ||
17 | data | ||
18 | }) | ||
19 | } | ||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -21,3 +21,17 @@ export function upload (data) { | ... | @@ -21,3 +21,17 @@ export function upload (data) { |
21 | data | 21 | data |
22 | }) | 22 | }) |
23 | } | 23 | } |
24 | |||
25 | /** | ||
26 | * @description: 上传电子签名 | ||
27 | * @param {*} data | ||
28 | * @author: renchao | ||
29 | */ | ||
30 | export function uploaddzqm (data) { | ||
31 | return request({ | ||
32 | url: SERVER.SERVERAPI + '/rest/system/dzqm', | ||
33 | method: 'post', | ||
34 | data | ||
35 | }) | ||
36 | } | ||
37 | ... | ... |
... | @@ -17,309 +17,324 @@ | ... | @@ -17,309 +17,324 @@ |
17 | }}</span> | 17 | }}</span> |
18 | <span style="padding-right: 10px">{{ userInfo.name }}</span> | 18 | <span style="padding-right: 10px">{{ userInfo.name }}</span> |
19 | </p> | 19 | </p> |
20 | <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" /> | 20 | <el-dropdown> |
21 | <span class="el-dropdown-link"> | ||
22 | <img :src="avatar + '?imageView2/1/w/80/h/80'" class="user-avatar" /> | ||
23 | </span> | ||
24 | <el-dropdown-menu slot="dropdown"> | ||
25 | <el-dropdown-item command="user" @click.native="handleGetUser">用户信息</el-dropdown-item> | ||
26 | </el-dropdown-menu> | ||
27 | </el-dropdown> | ||
21 | </div> | 28 | </div> |
22 | <svg-icon | 29 | <svg-icon |
23 | class="shutdown" | 30 | class="shutdown" |
24 | @click.native="logout" | 31 | @click.native="logout" |
25 | icon-class="shutdown" | 32 | icon-class="shutdown" /> |
26 | /> | ||
27 | </div> | 33 | </div> |
28 | </div> | 34 | </div> |
29 | <NoticeBar | 35 | <NoticeBar |
30 | class="NoticeBar" | 36 | class="NoticeBar" |
31 | :noticeList="noticeList" | 37 | :noticeList="noticeList" |
32 | v-if="noticeList.length > 0" | 38 | v-if="noticeList.length > 0" /> |
33 | /> | ||
34 | </div> | 39 | </div> |
35 | </template> | 40 | </template> |
36 | <script> | 41 | <script> |
37 | import axios from "axios"; | 42 | import axios from "axios"; |
38 | import Cookies from "js-cookie"; | 43 | import Cookies from "js-cookie"; |
39 | import { mapGetters } from "vuex"; | 44 | import { mapGetters } from "vuex"; |
40 | import NoticeBar from "@/components/NoticeBar/index"; | 45 | import NoticeBar from "@/components/NoticeBar/index"; |
41 | import { getHomeNoticeList } from "@/api/home"; | 46 | import { getHomeNoticeList } from "@/api/home"; |
42 | import { setToken } from "@/utils/util"; | 47 | import { setToken } from "@/utils/util"; |
43 | export default { | 48 | export default { |
44 | components: { | 49 | components: { |
45 | NoticeBar, | 50 | NoticeBar, |
46 | }, | ||
47 | computed: { | ||
48 | ...mapGetters(["sidebar", "avatar", "name", "userInfo"]), | ||
49 | baseUrl() { | ||
50 | return window._config.baseUrl; | ||
51 | }, | 51 | }, |
52 | }, | 52 | computed: { |
53 | data() { | 53 | ...mapGetters(["sidebar", "avatar", "name", "userInfo"]), |
54 | return { | 54 | baseUrl () { |
55 | logo: require("../../image/bdclogo.png"), | 55 | return window._config.baseUrl; |
56 | noticeList: [], | 56 | }, |
57 | }; | 57 | }, |
58 | }, | 58 | data () { |
59 | created() { | 59 | return { |
60 | this.queryNoticeList(); | 60 | logo: require("../../image/bdclogo.png"), |
61 | }, | 61 | noticeList: [], |
62 | mounted() { | 62 | }; |
63 | let that = this; | 63 | }, |
64 | window.addEventListener("message", function (messageEvent) { | 64 | created () { |
65 | if (messageEvent.data.update) { | 65 | this.queryNoticeList(); |
66 | that.queryNoticeList(); | 66 | }, |
67 | } | 67 | mounted () { |
68 | }); | 68 | let that = this; |
69 | }, | 69 | window.addEventListener("message", function (messageEvent) { |
70 | destroyed() { | 70 | if (messageEvent.data.update) { |
71 | window.removeEventListener("message"); | 71 | that.queryNoticeList(); |
72 | }, | ||
73 | methods: { | ||
74 | /** | ||
75 | * @description: queryNoticeList | ||
76 | * @author: renchao | ||
77 | */ | ||
78 | queryNoticeList() { | ||
79 | getHomeNoticeList().then((res) => { | ||
80 | if (res.result) { | ||
81 | this.noticeList = res.result.noticeList; | ||
82 | } | 72 | } |
83 | }); | 73 | }); |
84 | }, | 74 | }, |
85 | /** | 75 | destroyed () { |
86 | * @description: logout | 76 | window.removeEventListener("message"); |
87 | * @author: renchao | ||
88 | */ | ||
89 | logout() { | ||
90 | axios | ||
91 | .post(window._config.services.management + "/management/logout") | ||
92 | .then(() => { | ||
93 | setToken(undefined); | ||
94 | sessionStorage.removeItem("token"); | ||
95 | localStorage.setItem("dj-location", window.location.href); | ||
96 | window.location.href = | ||
97 | window._config.casBaseURL + | ||
98 | "/logout?service=" + | ||
99 | encodeURIComponent(window.location.href); | ||
100 | }); | ||
101 | }, | 77 | }, |
78 | methods: { | ||
102 | 79 | ||
103 | /** | 80 | /** |
104 | * @description: themeChange | 81 | * @description: 获取用户信息 |
105 | * @param {*} val | 82 | * @author: renchao |
106 | * @author: renchao | 83 | */ |
107 | */ | 84 | handleGetUser () { |
108 | themeChange(val) { | 85 | this.$popupDialog('用户信息', 'system/userInfo/index', {}, '80%', true); |
109 | this.$store.dispatch("app/updateTheme", val); | 86 | }, |
110 | }, | 87 | /** |
111 | searchMessageCenter() { | 88 | * @description: queryNoticeList |
112 | this.$router.push({ name: "messagecenter" }); | 89 | * @author: renchao |
113 | }, | 90 | */ |
114 | /** | 91 | queryNoticeList () { |
115 | * @description: handleCommand | 92 | getHomeNoticeList().then((res) => { |
116 | * @param {*} command | 93 | if (res.result) { |
117 | * @author: renchao | 94 | this.noticeList = res.result.noticeList; |
118 | */ | 95 | } |
119 | handleCommand(command) { | 96 | }); |
120 | if (command == "a") { | 97 | }, |
121 | //个人中心 | 98 | /** |
122 | this.$router.push({ name: "personal" }); | 99 | * @description: logout |
123 | } | 100 | * @author: renchao |
101 | */ | ||
102 | logout () { | ||
103 | axios | ||
104 | .post(window._config.services.management + "/management/logout") | ||
105 | .then(() => { | ||
106 | setToken(undefined); | ||
107 | sessionStorage.removeItem("token"); | ||
108 | localStorage.setItem("dj-location", window.location.href); | ||
109 | window.location.href = | ||
110 | window._config.casBaseURL + | ||
111 | "/logout?service=" + | ||
112 | encodeURIComponent(window.location.href); | ||
113 | }); | ||
114 | }, | ||
115 | |||
116 | /** | ||
117 | * @description: themeChange | ||
118 | * @param {*} val | ||
119 | * @author: renchao | ||
120 | */ | ||
121 | themeChange (val) { | ||
122 | this.$store.dispatch("app/updateTheme", val); | ||
123 | }, | ||
124 | searchMessageCenter () { | ||
125 | this.$router.push({ name: "messagecenter" }); | ||
126 | }, | ||
127 | /** | ||
128 | * @description: handleCommand | ||
129 | * @param {*} command | ||
130 | * @author: renchao | ||
131 | */ | ||
132 | handleCommand (command) { | ||
133 | if (command == "a") { | ||
134 | //个人中心 | ||
135 | this.$router.push({ name: "personal" }); | ||
136 | } | ||
137 | }, | ||
124 | }, | 138 | }, |
125 | }, | 139 | }; |
126 | }; | ||
127 | </script> | 140 | </script> |
128 | <style lang="scss" scoped> | 141 | <style lang="scss" scoped> |
129 | .navbar-con { | 142 | .navbar-con { |
130 | position: relative; | 143 | position: relative; |
131 | } | ||
132 | |||
133 | .NoticeBar { | ||
134 | position: absolute; | ||
135 | bottom: 0; | ||
136 | } | ||
137 | |||
138 | .el-dropdown-menu { | ||
139 | padding: 0 !important; | ||
140 | border: 1px solid #ebeef5; | ||
141 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); | ||
142 | border-radius: 4px 0 0 4px 4px; | ||
143 | |||
144 | .el-dropdown-menu__item { | ||
145 | text-align: center; | ||
146 | margin-top: 0 !important; | ||
147 | font-size: 14px; | ||
148 | font-family: PingFangSC-Regular, PingFang SC; | ||
149 | font-weight: 400; | ||
150 | color: #4a4a4a; | ||
151 | width: 140px; | ||
152 | height: 36px; | ||
153 | line-height: 36px; | ||
154 | } | 144 | } |
155 | 145 | /deep/.el-dropdown { | |
156 | .el-dropdown-menu__item:nth-child(6) { | 146 | height: 32px; |
157 | border-top: 1px solid #ebeef5; | ||
158 | } | 147 | } |
159 | 148 | .NoticeBar { | |
160 | .popper__arrow { | 149 | position: absolute; |
161 | top: -11px !important; | 150 | bottom: 0; |
162 | left: 110px !important; | ||
163 | transform: rotate(0deg) scale(2); | ||
164 | } | 151 | } |
165 | 152 | ||
166 | .el-dropdown-menu__item:not(.is-disabled):hover, | 153 | .el-dropdown-menu { |
167 | .el-dropdown-menu__item:focus { | 154 | padding: 0 !important; |
168 | background: #f6f7f9; | 155 | border: 1px solid #ebeef5; |
169 | color: #4a4a4a; | 156 | box-shadow: 0 2px 10px 0 rgba(0, 0, 0, 0.12); |
170 | } | 157 | border-radius: 4px 0 0 4px 4px; |
171 | } | ||
172 | 158 | ||
173 | .navbar { | 159 | .el-dropdown-menu__item { |
174 | height: $headerHeight; | 160 | text-align: center; |
175 | overflow: hidden; | 161 | margin-top: 0 !important; |
176 | position: relative; | 162 | font-size: 14px; |
177 | background: #fff; | 163 | font-family: PingFangSC-Regular, PingFang SC; |
178 | // background: linear-gradient(270deg, #148CEE 0%, #1870E3 100%); //默认颜色 | 164 | font-weight: 400; |
179 | box-shadow: 0 1px 0px rgba(0, 21, 41, 0.08); | 165 | color: #4a4a4a; |
180 | display: flex; | 166 | width: 140px; |
181 | align-items: center; | 167 | height: 36px; |
182 | padding: 0 20px; | 168 | line-height: 36px; |
183 | justify-content: space-between; | ||
184 | |||
185 | .logo { | ||
186 | // margin-top: -20px; | ||
187 | .header-logo { | ||
188 | width: 40px; | ||
189 | float: left; | ||
190 | vertical-align: middle; | ||
191 | } | ||
192 | h4 { | ||
193 | float: left; | ||
194 | vertical-align: middle; | ||
195 | line-height: 40px; | ||
196 | font-size: 22px; | ||
197 | color: #fff; | ||
198 | text-indent: 6px; | ||
199 | letter-spacing: 2px; | ||
200 | font-family: albbsht; | ||
201 | } | 169 | } |
202 | } | ||
203 | |||
204 | .backdrop { | ||
205 | flex: 1; | ||
206 | width: 60%; | ||
207 | background: url("../../image/backdrop.png"); | ||
208 | background-size: 100% 100%; | ||
209 | height: $headerHeight; | ||
210 | } | ||
211 | 170 | ||
212 | .hamburger-container { | 171 | .el-dropdown-menu__item:nth-child(6) { |
213 | line-height: 43px; | 172 | border-top: 1px solid #ebeef5; |
214 | height: 100%; | 173 | } |
215 | float: left; | ||
216 | cursor: pointer; | ||
217 | transition: background 0.3s; | ||
218 | -webkit-tap-highlight-color: transparent; | ||
219 | 174 | ||
220 | &:hover { | 175 | .popper__arrow { |
221 | background: rgba(0, 0, 0, 0.025); | 176 | top: -11px !important; |
177 | left: 110px !important; | ||
178 | transform: rotate(0deg) scale(2); | ||
222 | } | 179 | } |
223 | } | ||
224 | 180 | ||
225 | .breadcrumb-container { | 181 | .el-dropdown-menu__item:not(.is-disabled):hover, |
226 | float: left; | 182 | .el-dropdown-menu__item:focus { |
183 | background: #f6f7f9; | ||
184 | color: #4a4a4a; | ||
185 | } | ||
227 | } | 186 | } |
228 | 187 | ||
229 | .right-menu { | 188 | .navbar { |
230 | float: right; | 189 | height: $headerHeight; |
231 | height: 100%; | 190 | overflow: hidden; |
232 | line-height: 50px; | 191 | position: relative; |
192 | background: #fff; | ||
193 | // background: linear-gradient(270deg, #148CEE 0%, #1870E3 100%); //默认颜色 | ||
194 | box-shadow: 0 1px 0px rgba(0, 21, 41, 0.08); | ||
233 | display: flex; | 195 | display: flex; |
234 | align-items: center; | 196 | align-items: center; |
197 | padding: 0 20px; | ||
198 | justify-content: space-between; | ||
235 | 199 | ||
236 | .function { | 200 | .logo { |
237 | margin: 0 15px; | 201 | // margin-top: -20px; |
238 | cursor: pointer; | 202 | .header-logo { |
203 | width: 40px; | ||
204 | float: left; | ||
205 | vertical-align: middle; | ||
206 | } | ||
207 | h4 { | ||
208 | float: left; | ||
209 | vertical-align: middle; | ||
210 | line-height: 40px; | ||
211 | font-size: 22px; | ||
212 | color: #fff; | ||
213 | text-indent: 6px; | ||
214 | letter-spacing: 2px; | ||
215 | font-family: albbsht; | ||
216 | } | ||
217 | } | ||
218 | |||
219 | .backdrop { | ||
220 | flex: 1; | ||
221 | width: 60%; | ||
222 | background: url("../../image/backdrop.png"); | ||
223 | background-size: 100% 100%; | ||
224 | height: $headerHeight; | ||
239 | } | 225 | } |
240 | 226 | ||
241 | .shutdown { | 227 | .hamburger-container { |
242 | font-size: 20px; | 228 | line-height: 43px; |
243 | margin-left: 15px; | 229 | height: 100%; |
230 | float: left; | ||
244 | cursor: pointer; | 231 | cursor: pointer; |
232 | transition: background 0.3s; | ||
233 | -webkit-tap-highlight-color: transparent; | ||
234 | |||
235 | &:hover { | ||
236 | background: rgba(0, 0, 0, 0.025); | ||
237 | } | ||
245 | } | 238 | } |
246 | 239 | ||
247 | .organization-item { | 240 | .breadcrumb-container { |
248 | margin-right: 40px; | 241 | float: left; |
249 | margin-top: -40px !important; | ||
250 | } | 242 | } |
251 | 243 | ||
252 | .item { | 244 | .right-menu { |
253 | margin-right: 40px; | 245 | float: right; |
254 | margin-top: -20px; | 246 | height: 100%; |
255 | line-height: 18.4px; | 247 | line-height: 50px; |
256 | cursor: pointer; | 248 | display: flex; |
257 | position: relative; | 249 | align-items: center; |
258 | 250 | ||
259 | .item-box { | 251 | .function { |
260 | position: absolute; | 252 | margin: 0 15px; |
261 | top: -5px; | ||
262 | left: 3px; | ||
263 | width: 100%; | ||
264 | min-width: 25px; | ||
265 | height: 25px; | ||
266 | cursor: pointer; | 253 | cursor: pointer; |
267 | z-index: 100; | ||
268 | } | 254 | } |
269 | } | ||
270 | 255 | ||
271 | &:focus { | 256 | .shutdown { |
272 | outline: none; | 257 | font-size: 20px; |
273 | } | 258 | margin-left: 15px; |
259 | cursor: pointer; | ||
260 | } | ||
274 | 261 | ||
275 | .right-menu-item { | 262 | .organization-item { |
276 | display: inline-block; | 263 | margin-right: 40px; |
277 | font-size: 18px; | 264 | margin-top: -40px !important; |
278 | color: #fff; | 265 | } |
279 | vertical-align: text-bottom; | ||
280 | 266 | ||
281 | &.hover-effect { | 267 | .item { |
268 | margin-right: 40px; | ||
269 | margin-top: -20px; | ||
270 | line-height: 18.4px; | ||
282 | cursor: pointer; | 271 | cursor: pointer; |
283 | transition: background 0.3s; | 272 | position: relative; |
284 | display: flex; | ||
285 | align-items: center; | ||
286 | 273 | ||
287 | &:hover { | 274 | .item-box { |
288 | background: rgba(0, 0, 0, 0.025); | 275 | position: absolute; |
276 | top: -5px; | ||
277 | left: 3px; | ||
278 | width: 100%; | ||
279 | min-width: 25px; | ||
280 | height: 25px; | ||
281 | cursor: pointer; | ||
282 | z-index: 100; | ||
289 | } | 283 | } |
290 | } | 284 | } |
291 | } | ||
292 | 285 | ||
293 | .avatar-wrapper { | 286 | &:focus { |
294 | position: relative; | 287 | outline: none; |
295 | display: flex; | ||
296 | height: 40px; | ||
297 | align-items: center; | ||
298 | color: #ffffff; | ||
299 | p { | ||
300 | font-size: 14px; | ||
301 | height: 40px; | ||
302 | span { | ||
303 | display: block; | ||
304 | line-height: 20px; | ||
305 | text-align: right; | ||
306 | } | ||
307 | } | 288 | } |
308 | .user-avatar { | 289 | |
309 | cursor: pointer; | 290 | .right-menu-item { |
310 | width: 35px; | 291 | display: inline-block; |
311 | height: 35px; | 292 | font-size: 18px; |
312 | border-radius: 50%; | 293 | color: #fff; |
294 | vertical-align: text-bottom; | ||
295 | |||
296 | &.hover-effect { | ||
297 | cursor: pointer; | ||
298 | transition: background 0.3s; | ||
299 | display: flex; | ||
300 | align-items: center; | ||
301 | |||
302 | &:hover { | ||
303 | background: rgba(0, 0, 0, 0.025); | ||
304 | } | ||
305 | } | ||
313 | } | 306 | } |
314 | 307 | ||
315 | .el-icon-caret-bottom { | 308 | .avatar-wrapper { |
316 | cursor: pointer; | 309 | position: relative; |
317 | position: absolute; | 310 | display: flex; |
318 | right: -15px; | 311 | height: 40px; |
319 | top: 17px; | 312 | align-items: center; |
320 | font-size: 12px; | 313 | color: #ffffff; |
314 | p { | ||
315 | font-size: 14px; | ||
316 | height: 40px; | ||
317 | span { | ||
318 | display: block; | ||
319 | line-height: 20px; | ||
320 | text-align: right; | ||
321 | } | ||
322 | } | ||
323 | .user-avatar { | ||
324 | cursor: pointer; | ||
325 | width: 35px; | ||
326 | height: 35px; | ||
327 | border-radius: 50%; | ||
328 | } | ||
329 | |||
330 | .el-icon-caret-bottom { | ||
331 | cursor: pointer; | ||
332 | position: absolute; | ||
333 | right: -15px; | ||
334 | top: 17px; | ||
335 | font-size: 12px; | ||
336 | } | ||
321 | } | 337 | } |
322 | } | 338 | } |
323 | } | 339 | } |
324 | } | ||
325 | </style> | 340 | </style> | ... | ... |
src/views/system/userInfo/index.vue
0 → 100644
1 | <template> | ||
2 | <div class="from-clues"> | ||
3 | <!-- 表单部分 --> | ||
4 | <div class="from-clues-header"> | ||
5 | <el-form :model="ruleForm" label-width="100px"> | ||
6 | <el-row> | ||
7 | <el-col :span="6"> | ||
8 | <el-form-item label="用户名称:"> | ||
9 | {{ruleForm.name}} | ||
10 | </el-form-item> | ||
11 | </el-col> | ||
12 | <el-col :span="6"> | ||
13 | <el-form-item label="组织机构:"> | ||
14 | {{ruleForm.organizationName}} | ||
15 | </el-form-item> | ||
16 | </el-col> | ||
17 | <el-col :span="6"> | ||
18 | <el-form-item label="部门:"> | ||
19 | {{ruleForm.departmentName}} | ||
20 | </el-form-item> | ||
21 | </el-col> | ||
22 | </el-row> | ||
23 | <el-row> | ||
24 | <el-col :span="24"> | ||
25 | <el-form-item label="签名路径:"> | ||
26 | <img :src="ruleForm.dzqmurl" class="signature-image"> | ||
27 | </el-form-item> | ||
28 | </el-col> | ||
29 | </el-row> | ||
30 | </el-form> | ||
31 | </div> | ||
32 | |||
33 | <el-upload | ||
34 | class="upload-demo" | ||
35 | action="" | ||
36 | :limit="1" | ||
37 | multiple | ||
38 | :key="key" | ||
39 | :auto-upload="false" | ||
40 | accept=".jpg, .png, .jpeg" | ||
41 | :on-change="handleChange" | ||
42 | :before-upload="beforeUpload" | ||
43 | :show-file-list="false" | ||
44 | drag> | ||
45 | <i class="el-icon-upload"></i> | ||
46 | <div class="el-upload__text">将图片拖到此处,或<em>点击上传</em></div> | ||
47 | <div class="el-upload__tip" slot="tip">只能上传jpg/png文件,且不超过5MB</div> | ||
48 | </el-upload> | ||
49 | <!-- 表格 --> | ||
50 | </div> | ||
51 | </template> | ||
52 | <script> | ||
53 | import { dzqmUpload } from '@/api/dzqm' | ||
54 | import { getUserInfo } from '@/api/user' | ||
55 | export default { | ||
56 | name: "dzqm", | ||
57 | data () { | ||
58 | return { | ||
59 | ruleForm: {}, | ||
60 | key: 0, | ||
61 | } | ||
62 | }, | ||
63 | mounted () { | ||
64 | this.getUserInfo() | ||
65 | }, | ||
66 | methods: { | ||
67 | async getUserInfo () { | ||
68 | let res = await getUserInfo() | ||
69 | this.ruleForm = res.result | ||
70 | }, | ||
71 | beforeUpload (file) { | ||
72 | this.files = file; | ||
73 | const allowedExtensions = ['jpg', 'jpeg', 'png']; | ||
74 | const maxFileSizeMB = 5; | ||
75 | |||
76 | const extension = allowedExtensions.includes(file.name.split('.').pop().toLowerCase()); | ||
77 | const isLt5M = file.size / 1024 / 1024 < maxFileSizeMB; | ||
78 | |||
79 | if (!extension) { | ||
80 | this.$message.warning('上传模板只能是 jpg、jpeg、png 格式!'); | ||
81 | } else if (!isLt5M) { | ||
82 | this.$message.warning(`上传模板大小不能超过 ${maxFileSizeMB}MB!`); | ||
83 | } | ||
84 | |||
85 | return extension && isLt5M; | ||
86 | }, | ||
87 | async handleChange (file) { | ||
88 | var formdata = new FormData(); | ||
89 | formdata.append("file", file.raw); | ||
90 | dzqmUpload(formdata).then(res => { | ||
91 | if (res.code == 200) { | ||
92 | this.$message({ | ||
93 | message: '上传成功!', | ||
94 | type: 'success' | ||
95 | }) | ||
96 | this.key++ | ||
97 | this.ruleForm.dzqmurl = res.message | ||
98 | } | ||
99 | }) | ||
100 | } | ||
101 | } | ||
102 | }; | ||
103 | </script> | ||
104 | <style scoped lang="scss"> | ||
105 | @import "~@/styles/public.scss"; | ||
106 | .signature-image { | ||
107 | width: 100%; | ||
108 | max-height: 360px; | ||
109 | object-fit: contain; | ||
110 | } | ||
111 | </style> | ||
112 | |||
... | \ No newline at end of file | ... | \ No newline at end of file |
... | @@ -50,6 +50,14 @@ class data extends filter { | ... | @@ -50,6 +50,14 @@ class data extends filter { |
50 | // } | 50 | // } |
51 | // }, | 51 | // }, |
52 | { | 52 | { |
53 | label: "流程状态", | ||
54 | width: '80', | ||
55 | render: (h, scope) => { | ||
56 | return <div >完结</div> | ||
57 | } | ||
58 | }, | ||
59 | |||
60 | { | ||
53 | label: "业务号", | 61 | label: "业务号", |
54 | width: '110', | 62 | width: '110', |
55 | render: (h, scope) => { | 63 | render: (h, scope) => { | ... | ... |
-
Please register or sign in to post a comment