Commit 5ed26527347d43442229eb19a545f3b171fb7ff6
1 parent
ed244fda
1
Showing
7 changed files
with
33 additions
and
9 deletions
src/assets/images/user.png
0 → 100644
5.11 KB
src/store/modules/user.js
| @@ -3,8 +3,6 @@ import { getToken, setToken, removeToken } from '@/utils/auth' | @@ -3,8 +3,6 @@ import { getToken, setToken, removeToken } from '@/utils/auth' | ||
| 3 | import { resetRouter } from '@/router' | 3 | import { resetRouter } from '@/router' |
| 4 | import md5 from "js-md5"; // 密码加密 | 4 | import md5 from "js-md5"; // 密码加密 |
| 5 | const define = require('@/utils/define') | 5 | const define = require('@/utils/define') |
| 6 | -import qs from 'qs' | ||
| 7 | - | ||
| 8 | 6 | ||
| 9 | const user = { | 7 | const user = { |
| 10 | state: { | 8 | state: { |
| @@ -82,7 +80,10 @@ const user = { | @@ -82,7 +80,10 @@ const user = { | ||
| 82 | return new Promise((resolve, reject) => { | 80 | return new Promise((resolve, reject) => { |
| 83 | getInfo().then((res) => { | 81 | getInfo().then((res) => { |
| 84 | let { menuList, userInfo, permissionList } = res.data | 82 | let { menuList, userInfo, permissionList } = res.data |
| 85 | - const avatar = (userInfo.headIcon == "" || userInfo.headIcon == null) || require("@/assets/images/user.jpg"); | 83 | + const avatar = (userInfo.headIcon == '/api/File/Image/userAvatar/') ? require("@/assets/images/user.png") : userInfo.headIcon; |
| 84 | + // const avatar = (userInfo.headIcon == "" || userInfo.headIcon == null) || require("@/assets/images/user.jpg"); | ||
| 85 | + console.log(avatar); | ||
| 86 | + | ||
| 86 | if (!menuList.length) { | 87 | if (!menuList.length) { |
| 87 | reject('您的权限不足,请联系管理员') | 88 | reject('您的权限不足,请联系管理员') |
| 88 | commit('SET_LOGIN_LOADING', false) | 89 | commit('SET_LOGIN_LOADING', false) |
src/views/DisposalSuggestions/Form.vue
| @@ -109,7 +109,7 @@ | @@ -109,7 +109,7 @@ | ||
| 109 | <div class="text">{{ dataForm.areaName || "--" }}</div> | 109 | <div class="text">{{ dataForm.areaName || "--" }}</div> |
| 110 | </div> | 110 | </div> |
| 111 | </el-col> | 111 | </el-col> |
| 112 | - <el-col :span="24" v-for="(v, i) in dataForm.judgmentOpinions" :key="i" style="border: #f6f6f6 solid 1px; border-radius: 10px; padding: 8px; margin-bottom: 5px;"> | 112 | + <el-col :span="24" v-for="(v, i) in dataForm.judgmentOpinions" :key="i + 'judgmentOpinions'" style="border: #f6f6f6 solid 1px; border-radius: 10px; padding: 8px; margin-bottom: 5px;"> |
| 113 | <div class="title">研判信息{{ i + 1 }}</div> | 113 | <div class="title">研判信息{{ i + 1 }}</div> |
| 114 | <div class="form-item"> | 114 | <div class="form-item"> |
| 115 | <div class="label w-120">处置类型:</div> | 115 | <div class="label w-120">处置类型:</div> |
| @@ -120,7 +120,7 @@ | @@ -120,7 +120,7 @@ | ||
| 120 | <div class="text">{{ v.judgmentOpinion }}</div> | 120 | <div class="text">{{ v.judgmentOpinion }}</div> |
| 121 | </div> | 121 | </div> |
| 122 | </el-col> | 122 | </el-col> |
| 123 | - <el-col :span="24" v-for="(v, index) in dataForm.disposalSuggestions" :key="index" style="border: #f6f6f6 solid 1px; border-radius: 10px; padding: 8px; margin-bottom: 5px;"> | 123 | + <el-col :span="24" v-for="(v, index) in dataForm.disposalSuggestions" :key="index + 'disposalSuggestions'" style="border: #f6f6f6 solid 1px; border-radius: 10px; padding: 8px; margin-bottom: 5px;"> |
| 124 | <div class="title">处置信息{{ index + 1 }}</div> | 124 | <div class="title">处置信息{{ index + 1 }}</div> |
| 125 | <div class="form-item"> | 125 | <div class="form-item"> |
| 126 | <div class="label w-120">处置结果:</div> | 126 | <div class="label w-120">处置结果:</div> |
src/views/baseCaseHandling/Form.vue
| @@ -620,6 +620,9 @@ export default { | @@ -620,6 +620,9 @@ export default { | ||
| 620 | // this.companyChange(res.data.registeredEntity, 'change'); | 620 | // this.companyChange(res.data.registeredEntity, 'change'); |
| 621 | this.dataForm = res.data; | 621 | this.dataForm = res.data; |
| 622 | this.loading = false; | 622 | this.loading = false; |
| 623 | + this.$nextTick(() => { | ||
| 624 | + this.getSystemSelect(res.data.registeredEntity) | ||
| 625 | + }) | ||
| 623 | }).catch(() => { | 626 | }).catch(() => { |
| 624 | this.loading = false; | 627 | this.loading = false; |
| 625 | }); | 628 | }); |
src/views/baseSystemInfo/DetailForm.vue
| @@ -35,7 +35,7 @@ | @@ -35,7 +35,7 @@ | ||
| 35 | <p class="text">{{ dataForm.systemClass | dynamicTextClassName(systemClassOptions) }}</p> | 35 | <p class="text">{{ dataForm.systemClass | dynamicTextClassName(systemClassOptions) }}</p> |
| 36 | </div> | 36 | </div> |
| 37 | </el-col> | 37 | </el-col> |
| 38 | - <el-col :span="24"> | 38 | + <el-col :span="24" v-if="dataForm.systemType != '580634746028033285'"> |
| 39 | <div class="form-item"> | 39 | <div class="form-item"> |
| 40 | <div class="label w-120">备案号:</div> | 40 | <div class="label w-120">备案号:</div> |
| 41 | <p class="text">{{ dataForm.systemRecordNumber || "--" }}</p> | 41 | <p class="text">{{ dataForm.systemRecordNumber || "--" }}</p> |
| @@ -299,8 +299,11 @@ import { getSystemDetail, getUpdataRecord } from "@/api/baseData/info"; | @@ -299,8 +299,11 @@ import { getSystemDetail, getUpdataRecord } from "@/api/baseData/info"; | ||
| 299 | import { getCompanyInfoById } from "@/api/baseData/company"; | 299 | import { getCompanyInfoById } from "@/api/baseData/company"; |
| 300 | import HandForm from '@/views/baseCaseHandling/Form.vue' // 案件处理 | 300 | import HandForm from '@/views/baseCaseHandling/Form.vue' // 案件处理 |
| 301 | import ReportForm from '@/views/baseInspectionReport/Form.vue' // 案件处理 | 301 | import ReportForm from '@/views/baseInspectionReport/Form.vue' // 案件处理 |
| 302 | +import infoMixin from "@/mixins/info"; | ||
| 303 | + | ||
| 302 | export default { | 304 | export default { |
| 303 | components: {HandForm, ReportForm}, | 305 | components: {HandForm, ReportForm}, |
| 306 | + mixins: [infoMixin], | ||
| 304 | props: ['areaOptions'], | 307 | props: ['areaOptions'], |
| 305 | data() { | 308 | data() { |
| 306 | return { | 309 | return { |
| @@ -346,6 +349,7 @@ export default { | @@ -346,6 +349,7 @@ export default { | ||
| 346 | stateOptions: [], | 349 | stateOptions: [], |
| 347 | HandFormVisible: false, | 350 | HandFormVisible: false, |
| 348 | ReportFormVisible: false, | 351 | ReportFormVisible: false, |
| 352 | + specialRecordTypeOption: [], | ||
| 349 | }; | 353 | }; |
| 350 | }, | 354 | }, |
| 351 | computed: { | 355 | computed: { |
| @@ -357,9 +361,10 @@ export default { | @@ -357,9 +361,10 @@ export default { | ||
| 357 | } | 361 | } |
| 358 | }, | 362 | }, |
| 359 | watch: {}, | 363 | watch: {}, |
| 360 | - created() { | 364 | + async created() { |
| 361 | this.initStateTypeOption(); | 365 | this.initStateTypeOption(); |
| 362 | this.initSystemTypeList(); | 366 | this.initSystemTypeList(); |
| 367 | + await this.initSpecialRecordTypeOption(); | ||
| 363 | }, | 368 | }, |
| 364 | mounted() {}, | 369 | mounted() {}, |
| 365 | methods: { | 370 | methods: { |
| @@ -411,6 +416,7 @@ export default { | @@ -411,6 +416,7 @@ export default { | ||
| 411 | await this.initSystemClassList(data.systemType); | 416 | await this.initSystemClassList(data.systemType); |
| 412 | this.dataForm = data; | 417 | this.dataForm = data; |
| 413 | this.dataForm.companyName = companyName; | 418 | this.dataForm.companyName = companyName; |
| 419 | + this.dataForm.specialRecordType && (this.dataForm.specialRecordType = this.specialRecordTypeOption.find(v => v.id == this.dataForm.specialRecordType).fullName); | ||
| 414 | this.loading = false; | 420 | this.loading = false; |
| 415 | }, | 421 | }, |
| 416 | async initSystemTypeList() { | 422 | async initSystemTypeList() { |
src/views/homePage/components/Header.vue
| @@ -21,7 +21,7 @@ | @@ -21,7 +21,7 @@ | ||
| 21 | </el-dropdown-menu> | 21 | </el-dropdown-menu> |
| 22 | </el-dropdown> | 22 | </el-dropdown> |
| 23 | </div> | 23 | </div> |
| 24 | - <UserInfoPage ref="UserInfoPage" v-if="visbleUserInfo" @refresh="() => this.visbleUserInfo = false"/> | 24 | + <UserInfoPage ref="UserInfoPage" v-if="visbleUserInfo" @refresh="visbleUserInfoRefresh"/> |
| 25 | </header> | 25 | </header> |
| 26 | </template> | 26 | </template> |
| 27 | 27 | ||
| @@ -39,6 +39,10 @@ export default { | @@ -39,6 +39,10 @@ export default { | ||
| 39 | }, | 39 | }, |
| 40 | mounted() {}, | 40 | mounted() {}, |
| 41 | methods: { | 41 | methods: { |
| 42 | + visbleUserInfoRefresh() { | ||
| 43 | + this.avatar = process.env.VUE_APP_BASE_API + this.$store.state.user.avatar; | ||
| 44 | + this.visbleUserInfo = false; | ||
| 45 | + }, | ||
| 42 | async logout() { | 46 | async logout() { |
| 43 | await this.$store.dispatch("LogOut"); | 47 | await this.$store.dispatch("LogOut"); |
| 44 | this.$router.push({ path: "/login" }); | 48 | this.$router.push({ path: "/login" }); |
src/views/homePage/components/UserInfoPage.vue
| @@ -38,7 +38,7 @@ | @@ -38,7 +38,7 @@ | ||
| 38 | 38 | ||
| 39 | <span slot="footer" class="dialog-footer"> | 39 | <span slot="footer" class="dialog-footer"> |
| 40 | <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保存</el-button> | 40 | <el-button type="primary" @click="dataFormSubmit()" :loading="btnLoading">保存</el-button> |
| 41 | - <el-button type="danger" @click="visible = false">关闭</el-button> | 41 | + <el-button type="danger" @click="close()">关闭</el-button> |
| 42 | </span> | 42 | </span> |
| 43 | </el-dialog> | 43 | </el-dialog> |
| 44 | </template> | 44 | </template> |
| @@ -95,6 +95,8 @@ export default { | @@ -95,6 +95,8 @@ export default { | ||
| 95 | handleSuccess(res, file) { | 95 | handleSuccess(res, file) { |
| 96 | if (res.code == 200) { | 96 | if (res.code == 200) { |
| 97 | this.updateAvatar(res.data); | 97 | this.updateAvatar(res.data); |
| 98 | + this.$emit('changeAvatar', res.data); | ||
| 99 | + // this.logout(); | ||
| 98 | } else { | 100 | } else { |
| 99 | this.$message({ | 101 | this.$message({ |
| 100 | message: "上传失败", | 102 | message: "上传失败", |
| @@ -103,6 +105,10 @@ export default { | @@ -103,6 +105,10 @@ export default { | ||
| 103 | }); | 105 | }); |
| 104 | } | 106 | } |
| 105 | }, | 107 | }, |
| 108 | + async logout() { | ||
| 109 | + await this.$store.dispatch("LogOut"); | ||
| 110 | + this.$router.push({ path: "/login" }); | ||
| 111 | + }, | ||
| 106 | updateAvatar(data) { | 112 | updateAvatar(data) { |
| 107 | UpdateAvatar(data.name).then((res) => { | 113 | UpdateAvatar(data.name).then((res) => { |
| 108 | this.user.avatar = data.url; | 114 | this.user.avatar = data.url; |
| @@ -136,6 +142,10 @@ export default { | @@ -136,6 +142,10 @@ export default { | ||
| 136 | }) | 142 | }) |
| 137 | 143 | ||
| 138 | }, | 144 | }, |
| 145 | + close() { | ||
| 146 | + this.visible = false; | ||
| 147 | + this.$emit("refresh"); | ||
| 148 | + } | ||
| 139 | }, | 149 | }, |
| 140 | }; | 150 | }; |
| 141 | </script> | 151 | </script> |