From 3457bf08eae9d9453c88dd62991c3e286eb1df4b Mon Sep 17 00:00:00 2001
From: 田源 <tianyuan@vci-tech.com>
Date: 星期四, 26 十二月 2024 10:53:52 +0800
Subject: [PATCH] 个人信息页面&&管理功能模块图标更改

---
 Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue        |  103 +++++++
 /dev/null                                                            |   94 -------
 Source/plt-web/plt-web-ui/src/views/system/user/index.vue            |    3 
 Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue   |  228 +++++++++++++++++
 Source/plt-web/plt-web-ui/package.json                               |    1 
 Source/plt-web/plt-web-ui/src/styles/ui.scss                         |    3 
 Source/plt-web/plt-web-ui/src/router/views/index.js                  |    2 
 Source/plt-web/plt-web-ui/src/views/system/user/option.js            |   11 
 Source/plt-web/plt-web-ui/src/option/user/info.js                    |  137 ++++++----
 Source/plt-web/plt-web-ui/src/page/index/top/index.vue               |  129 +--------
 Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue |   10 
 11 files changed, 456 insertions(+), 265 deletions(-)

diff --git a/Source/plt-web/plt-web-ui/package.json b/Source/plt-web/plt-web-ui/package.json
index 6dc84a0..df7f0b8 100644
--- a/Source/plt-web/plt-web-ui/package.json
+++ b/Source/plt-web/plt-web-ui/package.json
@@ -30,6 +30,7 @@
     "v-charts": "^1.19.0",
     "vue": "^2.6.10",
     "vue-axios": "^2.1.2",
+    "vue-cropper": "^0.6.5",
     "vue-echarts": "5.0.0-beta.0",
     "vue-flowchart-editor": "1.0.2",
     "vue-i18n": "^8.7.0",
diff --git a/Source/plt-web/plt-web-ui/src/option/user/info.js b/Source/plt-web/plt-web-ui/src/option/user/info.js
index d2fcbe0..84c5dff 100644
--- a/Source/plt-web/plt-web-ui/src/option/user/info.js
+++ b/Source/plt-web/plt-web-ui/src/option/user/info.js
@@ -5,67 +5,94 @@
     {
       label: '涓汉淇℃伅',
       prop: 'info',
-      column: [{
-        label: '澶村儚',
-        type: 'upload',
-        listType: 'picture-img',
-        propsHttp: {
-          res: 'data',
-          url: 'link',
+      column: [
+        {
+          label: '澶村儚',
+          prop: 'avatar',
+          formslot: true,
+          span: 24,
         },
-        canvasOption: {
-          text: ' ',
-          ratio: 0.1
+        {
+          label: '鐢ㄦ埛鍚�',
+          span: 12,
+          row: true,
+          prop: 'userId',
+          readonly:true
         },
-        action: '/api/blade-resource/oss/endpoint/put-file',
-        tip: '鍙兘涓婁紶jpg/png鐢ㄦ埛澶村儚锛屼笖涓嶈秴杩�500kb',
-        span: 12,
-        row: true,
-        prop: 'avatar'
-      }, {
-        label: '濮撳悕',
-        span: 12,
-        row: true,
-        prop: 'realName'
-      }, {
-        label: '鐢ㄦ埛鍚�',
-        span: 12,
-        row: true,
-        prop: 'name'
-      }, {
-        label: '鎵嬫満鍙�',
-        span: 12,
-        row: true,
-        prop: 'phone'
-      }, {
-        label: '閭',
-        prop: 'email',
-        span: 12,
-        row: true,
-      }]
+        {
+          label: '濮撳悕',
+          span: 12,
+          row: true,
+          prop: 'userName'
+        },
+        {
+          label: '褰撳墠瑙掕壊',
+          span: 12,
+          row: true,
+          prop: 'personName',
+          readonly:true,
+        },
+        {
+          label: '褰撳墠瀵嗙骇',
+          span: 12,
+          row: true,
+          prop: 'userSecretText',
+          readonly:true,
+        },
+        {
+          label: '閭',
+          prop: 'email',
+          span: 12,
+          row: true,
+        }]
     },
     {
       label: '淇敼瀵嗙爜',
       prop: 'password',
-      column: [{
-        label: '鍘熷瘑鐮�',
-        span: 12,
-        row: true,
-        type: 'password',
-        prop: 'oldPassword'
-      }, {
-        label: '鏂板瘑鐮�',
-        span: 12,
-        row: true,
-        type: 'password',
-        prop: 'newPassword'
-      }, {
-        label: '纭瀵嗙爜',
-        span: 12,
-        row: true,
-        type: 'password',
-        prop: 'newPassword1'
-      }]
+      column: [
+        {
+          label: '鐧婚檰瀵嗙爜',
+          prop: 'oldPassword',
+          span: 24,
+          labelWidth: "7%",
+          type: 'password',
+          rules: [
+            {
+              required: true,
+              message: '璇疯緭鍏ョ櫥闄嗗瘑鐮�',
+              trigger: 'blur'
+            }
+          ]
+        },
+        {
+          label: '鏂扮櫥闄嗗瘑鐮�',
+          prop: 'password',
+          span: 24,
+          labelWidth: "7%",
+          type: 'password',
+          rules: [
+            {
+              required: true,
+              message: '璇疯緭鍏ユ柊鐧婚檰瀵嗙爜',
+              trigger: 'blur'
+            }
+          ]
+        },
+        {
+          label: '鏂板瘑鐮佺櫥闄嗙‘璁�',
+          prop: 'confirmPassword',
+          span: 24,
+          labelWidth: "7%",
+          type: 'password',
+          rules: [
+            {
+              required: true,
+              message: '璇风‘璁ょ櫥闄嗗瘑鐮�',
+              trigger: 'blur'
+            }
+          ]
+        }
+      ]
     }
   ],
 }
diff --git a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
index 4f38b79..7d9e532 100644
--- a/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
+++ b/Source/plt-web/plt-web-ui/src/page/index/top/index.vue
@@ -78,27 +78,30 @@
       </el-tooltip>
       <img :src="userInfo.avatar"
            class="top-bar__img">
-      <el-dropdown>
+      <div>
+        <el-dropdown style="height: 40px">
         <span class="el-dropdown-link">
           {{ userInfo.userName }}
           <i class="el-icon-arrow-down el-icon--right"></i>
         </span>
-        <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item>
-            <router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
-          </el-dropdown-item>
-          <el-dropdown-item @click.native="changePasswordHandler">
-            <!--            <router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>-->
-            淇敼瀵嗙爜
-          </el-dropdown-item>
-          <el-dropdown-item v-if="this.website.switchMode" @click.native="switchDept"
-          >{{ $t('navbar.switchDept') }}
-          </el-dropdown-item>
-          <el-dropdown-item divided
-                            @click.native="logout">{{ $t('navbar.logOut') }}
-          </el-dropdown-item>
-        </el-dropdown-menu>
-      </el-dropdown>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>
+              <router-link to="/">{{ $t('navbar.dashboard') }}</router-link>
+            </el-dropdown-item>
+            <el-dropdown-item>
+              <router-link to="/info/index">{{ $t('navbar.userinfo') }}</router-link>
+              <!--            淇敼瀵嗙爜-->
+            </el-dropdown-item>
+            <el-dropdown-item v-if="this.website.switchMode" @click.native="switchDept"
+            >{{ $t('navbar.switchDept') }}
+            </el-dropdown-item>
+            <el-dropdown-item divided
+                              @click.native="logout">{{ $t('navbar.logOut') }}
+            </el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </div>
+
       <el-dialog :visible.sync="userBox"
                  append-to-body
                  title="鐢ㄦ埛淇℃伅閫夋嫨"
@@ -106,23 +109,11 @@
         <avue-form ref="form" v-model="userForm" :option="userOption" @submit="submitSwitch"/>
       </el-dialog>
 
-      <!-- 淇敼瀵嗙爜瀵硅瘽妗�     -->
-      <el-dialog
-        v-dialogDrag
-        :visible.sync="passwordVisible"
-        append-to-body="true"
-        class="avue-dialog"
-        style="margin-top: -15vh"
-        title="淇敼瀵嗙爜"
-        width="50%"
-        @close="passwordClose">
-        <avue-form ref="form" v-model="passwordForm" :option="passwordOption" @submit="submitSwitch"/>
-      </el-dialog>
     </div>
   </div>
 </template>
 <script>
-import {resetRouter} from '@/router/router'
+import {resetRouter} from '../../../router/router'
 import {mapGetters, mapState} from "vuex";
 import {fullscreenToggel, listenfullscreen} from "@/util/util";
 import topLock from "./top-lock";
@@ -133,8 +124,6 @@
 import topColor from "./top-color";
 import topNotice from './top-notice'
 import topLang from "./top-lang";
-import {changePassword} from "@/api/user"
-import func from "@/util/func";
 
 export default {
   components: {
@@ -150,55 +139,6 @@
   name: "top",
   data() {
     return {
-      passwordVisible: false,
-      passwordForm: {},
-      passwordOption: {
-        submitText: '淇濆瓨',
-        column: [
-          {
-            label: '鐧婚檰瀵嗙爜',
-            prop: 'oldPassword',
-            span: 24,
-            labelWidth: "15%",
-            type: 'password',
-            rules: [
-              {
-                required: true,
-                message: '璇疯緭鍏ョ櫥闄嗗瘑鐮�',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '鏂扮櫥闄嗗瘑鐮�',
-            prop: 'password',
-            span: 24,
-            labelWidth: "15%",
-            type: 'password',
-            rules: [
-              {
-                required: true,
-                message: '璇疯緭鍏ユ柊鐧婚檰瀵嗙爜',
-                trigger: 'blur'
-              }
-            ]
-          },
-          {
-            label: '鏂板瘑鐮佺櫥闄嗙‘璁�',
-            prop: 'confirmPassword',
-            span: 24,
-            labelWidth: "15%",
-            type: 'password',
-            rules: [
-              {
-                required: true,
-                message: '璇风‘璁ょ櫥闄嗗瘑鐮�',
-                trigger: 'blur'
-              }
-            ]
-          }
-        ]
-      },
       userBox: false,
       userForm: {
         deptId: '',
@@ -277,10 +217,6 @@
     ])
   },
   methods: {
-    // 淇敼瀵嗙爜
-    changePasswordHandler() {
-      this.passwordVisible = true;
-    },
     handleScreen() {
       fullscreenToggel();
     },
@@ -299,29 +235,6 @@
       roleColumn.dicUrl = `/api/blade-system/role/select?userId=${userId}`;
       roleColumn.display = true;
       this.userBox = true;
-    },
-    submitSwitch(form, done) {
-      let userInfo = JSON.parse(localStorage.getItem('saber-userInfo'));
-      let params = {
-        userName: userInfo.content.userId,
-        oldPassword: func.encryptData(form.oldPassword, 'daliantan0v0vcip'),
-        password: func.encryptData(form.password, 'daliantan0v0vcip'),
-        confirmPassword: func.encryptData(form.confirmPassword, 'daliantan0v0vcip'),
-
-      }
-      changePassword(params).then(res => {
-        if (res.data.code === 200) {
-          this.$message.success(res.data.msg);
-          this.passwordVisible = false;
-          this.$store.dispatch("LogOut").then(() => {
-            resetRouter();
-            this.$router.push({path: "/login"});
-          });
-        }
-      }).catch(err => {
-        console.log(err);
-      })
-      done();
     },
 
     // 鍏抽棴淇敼瀵嗙爜瀵硅瘽妗�
diff --git a/Source/plt-web/plt-web-ui/src/router/views/index.js b/Source/plt-web/plt-web-ui/src/router/views/index.js
index 385dd98..1b41673 100644
--- a/Source/plt-web/plt-web-ui/src/router/views/index.js
+++ b/Source/plt-web/plt-web-ui/src/router/views/index.js
@@ -80,7 +80,7 @@
       i18n: 'info'
     },
     component: () =>
-      import( /* webpackChunkName: "views" */ '@/views/system/userinfo')
+      import( /* webpackChunkName: "views" */ '@/views/system/userInfo/index')
   }]
 }, {
   path: '/work/process/leave',
diff --git a/Source/plt-web/plt-web-ui/src/styles/ui.scss b/Source/plt-web/plt-web-ui/src/styles/ui.scss
index 3e7bc10..ab4ac8f 100644
--- a/Source/plt-web/plt-web-ui/src/styles/ui.scss
+++ b/Source/plt-web/plt-web-ui/src/styles/ui.scss
@@ -536,6 +536,9 @@
   height: 20px;
   line-height: 20px;
 }
+.el-menu--popup-right-start{
+  margin-left: 1px;
+}
 
 .font14{font-size: 14px;width: 12px;height: 12px;display: inline-block;}
 .font16{font-size: 16px;width: 14px;height: 14px;display: inline-block;}
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
index 619be75..cd3253f 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/index.vue
@@ -238,9 +238,10 @@
       this.tableLoading = true;
       getDataUsers(this.page.currentPage, this.page.pageSize, this.searchParams).then(res => {
         const data = res.data.data;
+        data.map(item => {item.secretGrade = item.secretGrade.toString()})
         this.tableData = data;
         this.page.total = res.data.total;
-        this.tableLoading = false;
+        this.tableLoading = false;s
       })
       this.departmentQueryOnLoad()
     },
diff --git a/Source/plt-web/plt-web-ui/src/views/system/user/option.js b/Source/plt-web/plt-web-ui/src/views/system/user/option.js
index 32672fc..a673315 100644
--- a/Source/plt-web/plt-web-ui/src/views/system/user/option.js
+++ b/Source/plt-web/plt-web-ui/src/views/system/user/option.js
@@ -84,6 +84,7 @@
     align:'center',
     type:'tree',
     dicData: [],
+    hide:true,
     props: {
       label: 'name',
       value: 'oid'
@@ -94,6 +95,16 @@
     width:200,
   },
   {
+    label: '鎵�灞為儴闂�',
+    prop: 'pkDepartmentName',
+    align:'center',
+    display: false,
+    search:true,
+    sortable:true,
+    overHidden: true,
+    width:200,
+  },
+  {
     label: '涓撲笟',
     prop: 'specialties',
     sortable:true,
diff --git a/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue b/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue
new file mode 100644
index 0000000..f8250e3
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/system/userInfo/index.vue
@@ -0,0 +1,103 @@
+<template>
+  <div>
+    <basic-container>
+      <avue-form
+        ref="form"
+        v-model="form"
+        :option="option"
+        @submit="handleSubmit"
+        @tab-click="handleTabClick">
+        <template slot="avatar" slot-scope="{disabled,size}">
+          <div>
+            <userAvatar :avatar="form.avatar"/>
+          </div>
+        </template>
+      </avue-form>
+    </basic-container>
+  </div>
+</template>
+
+<script>
+import option from "@/option/user/info";
+import {getUserInfo, updateInfo, updatePassword} from "@/api/system/user";
+import func from "../../../util/func";
+import {changePassword} from "../../../api/user"
+import userAvatar from "./userAvatar";
+import {resetRouter} from '../../../router/router'
+import {mapGetters} from "vuex";
+
+export default {
+  components: {userAvatar,},
+  data() {
+    return {
+      index: 0,
+      option: option,
+      form: {}
+    };
+  },
+  computed: {
+    ...mapGetters(["userInfo"]),
+  },
+  created() {
+    this.handleWitch();
+  },
+  methods: {
+    handleSubmit(form, done) {
+      if (this.index === 0) {
+        updateInfo(form).then(res => {
+          if (res.data.success) {
+            this.$message({
+              type: "success",
+              message: "淇敼淇℃伅鎴愬姛!"
+            });
+          } else {
+            this.$message({
+              type: "error",
+              message: res.data.msg
+            });
+          }
+          done();
+        }, error => {
+          window.console.log(error);
+          done();
+        })
+      } else {
+        let userInfo = JSON.parse(localStorage.getItem('saber-userInfo'));
+        let params = {
+          userName: userInfo.content.userId,
+          oldPassword: func.encryptData(form.oldPassword, 'daliantan0v0vcip'),
+          password: func.encryptData(form.password, 'daliantan0v0vcip'),
+          confirmPassword: func.encryptData(form.confirmPassword, 'daliantan0v0vcip'),
+
+        }
+        changePassword(params).then(res => {
+          if (res.data.code === 200) {
+            this.$message.success(res.data.msg);
+            this.passwordVisible = false;
+            this.$store.dispatch("LogOut").then(() => {
+              resetRouter();
+              this.$router.push({path: "/login"});
+            });
+          }
+        }).catch(err => {
+          console.log(err);
+        })
+      }
+    },
+    handleWitch() {
+      if (this.index === 0) {
+        this.form = {...this.userInfo};
+        console.log(this.form);
+      }
+    },
+    handleTabClick(tabs) {
+      this.index = func.toInt(tabs.index);
+      this.handleWitch();
+      this.$refs.form.resetFields();
+    }
+  }
+};
+</script>
+
+<style>
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue b/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue
new file mode 100644
index 0000000..1ee2aea
--- /dev/null
+++ b/Source/plt-web/plt-web-ui/src/views/system/userInfo/userAvatar.vue
@@ -0,0 +1,228 @@
+<template>
+  <div>
+    <div class="user-info-head" @click="editCropper()">
+      <div class="circular-upload-box" v-if="!options.img">
+        <i class="el-icon-plus" style="font-size: 16px"></i>
+      </div>
+      <img v-else v-bind:src="options.img"  class="img-circle img-lg" />
+    </div>
+    <el-dialog :title="title" :visible.sync="open" width="800px" append-to-body @opened="modalOpened"  @close="closeDialog">
+      <el-row>
+        <el-col :xs="24" :md="12" :style="{height: '350px'}">
+          <vue-cropper
+            ref="cropper"
+            :img="options.img"
+            :info="true"
+            :autoCrop="options.autoCrop"
+            :autoCropWidth="options.autoCropWidth"
+            :autoCropHeight="options.autoCropHeight"
+            :fixedBox="options.fixedBox"
+            :outputType="options.outputType"
+            @realTime="realTime"
+            v-if="visible"
+          />
+        </el-col>
+        <el-col :xs="24" :md="12" :style="{height: '350px'}">
+          <div class="avatar-upload-preview">
+            <img :src="previews.url" :style="previews.img" />
+          </div>
+        </el-col>
+      </el-row>
+      <br />
+      <el-row>
+        <el-col :lg="2" :sm="3" :xs="3">
+          <el-upload action="#" :http-request="requestUpload" :show-file-list="false" :before-upload="beforeUpload">
+            <el-button size="small">
+              閫夋嫨
+              <i class="el-icon-upload el-icon--right"></i>
+            </el-button>
+          </el-upload>
+        </el-col>
+        <el-col :lg="{span: 1, offset: 2}" :sm="2" :xs="2">
+          <el-button icon="el-icon-plus" size="small" @click="changeScale(1)"></el-button>
+        </el-col>
+        <el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
+          <el-button icon="el-icon-minus" size="small" @click="changeScale(-1)"></el-button>
+        </el-col>
+        <el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
+          <el-button icon="el-icon-refresh-left" size="small" @click="rotateLeft()"></el-button>
+        </el-col>
+        <el-col :lg="{span: 1, offset: 1}" :sm="2" :xs="2">
+          <el-button icon="el-icon-refresh-right" size="small" @click="rotateRight()"></el-button>
+        </el-col>
+        <el-col :lg="{span: 2, offset: 6}" :sm="2" :xs="2">
+          <el-button type="primary" size="small" @click="uploadImg()">鎻� 浜�</el-button>
+        </el-col>
+      </el-row>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import store from "@/store";
+import { VueCropper } from "vue-cropper";
+import { uploadAvatar } from "@/api/system/user";
+
+export default {
+  components: { VueCropper },
+  props:['avatar'],
+  data() {
+    return {
+      // 鏄惁鏄剧ず寮瑰嚭灞�
+      open: false,
+      // 鏄惁鏄剧ずcropper
+      visible: false,
+      // 寮瑰嚭灞傛爣棰�
+      title: "淇敼澶村儚",
+      options: {
+        img: this.avatar,  //瑁佸壀鍥剧墖鐨勫湴鍧�
+        autoCrop: true,             // 鏄惁榛樿鐢熸垚鎴浘妗�
+        autoCropWidth: 200,         // 榛樿鐢熸垚鎴浘妗嗗搴�
+        autoCropHeight: 200,        // 榛樿鐢熸垚鎴浘妗嗛珮搴�
+        fixedBox: true,             // 鍥哄畾鎴浘妗嗗ぇ灏� 涓嶅厑璁告敼鍙�
+        outputType:"png",           // 榛樿鐢熸垚鎴浘涓篜NG鏍煎紡
+        filename: 'avatar'          // 鏂囦欢鍚嶇О
+      },
+      previews: {},
+      resizeHandler: null
+    };
+  },
+  methods: {
+    // 缂栬緫澶村儚
+    editCropper() {
+      this.open = true;
+    },
+    // 鎵撳紑寮瑰嚭灞傜粨鏉熸椂鐨勫洖璋�
+    modalOpened() {
+      this.visible = true;
+      if (!this.resizeHandler) {
+        this.resizeHandler = debounce(() => {
+          this.refresh()
+        }, 100)
+      }
+      window.addEventListener("resize", this.resizeHandler)
+    },
+    // 鍒锋柊缁勪欢
+    refresh() {
+      this.$refs.cropper.refresh();
+    },
+    // 瑕嗙洊榛樿鐨勪笂浼犺涓�
+    requestUpload() {
+    },
+    // 鍚戝乏鏃嬭浆
+    rotateLeft() {
+      this.$refs.cropper.rotateLeft();
+    },
+    // 鍚戝彸鏃嬭浆
+    rotateRight() {
+      this.$refs.cropper.rotateRight();
+    },
+    // 鍥剧墖缂╂斁
+    changeScale(num) {
+      num = num || 1;
+      this.$refs.cropper.changeScale(num);
+    },
+    // 涓婁紶棰勫鐞�
+    beforeUpload(file) {
+      if (file.type.indexOf("image/") == -1) {
+        this.$modal.msgError("鏂囦欢鏍煎紡閿欒锛岃涓婁紶鍥剧墖绫诲瀷,濡傦細JPG锛孭NG鍚庣紑鐨勬枃浠躲��");
+      } else {
+        const reader = new FileReader();
+        reader.readAsDataURL(file);
+        reader.onload = () => {
+          this.options.img = reader.result;
+          this.options.filename = file.name;
+        };
+      }
+    },
+    // 涓婁紶鍥剧墖
+    uploadImg() {
+      this.$refs.cropper.getCropBlob(data => {
+        let formData = new FormData();
+        formData.append("avatarfile", data, this.options.filename);
+        uploadAvatar(formData).then(response => {
+          this.open = false;
+          this.options.img = process.env.VUE_APP_BASE_API + response.imgUrl;
+          store.commit('SET_AVATAR', this.options.img);
+          this.$modal.msgSuccess("淇敼鎴愬姛");
+          this.visible = false;
+        });
+      });
+    },
+    // 瀹炴椂棰勮
+    realTime(data) {
+      this.previews = data;
+    },
+    // 鍏抽棴绐楀彛
+    closeDialog() {
+      this.options.img = store.getters.avatar
+      this.visible = false;
+      window.removeEventListener("resize", this.resizeHandler)
+    }
+  }
+};
+</script>
+<style scoped lang="scss">
+.user-info-head {
+  position: relative;
+  display: inline-block;
+  height: 120px;
+}
+
+.user-info-head:hover:after {
+  content: '+';
+  position: absolute;
+  left: 50%;
+  top: 50%;
+  transform: translate(-50%, -50%); /* 浣垮姞鍙峰湪涓績鐐� */
+  color: #eee;
+  background: rgba(0, 0, 0, 0.5);
+  font-size: 24px;
+  font-style: normal;
+  -webkit-font-smoothing: antialiased;
+  -moz-osx-font-smoothing: grayscale;
+  cursor: pointer;
+  width: 120px; /* 璁剧疆瀹藉害 */
+  height: 120px; /* 璁剧疆楂樺害 */
+  border-radius: 50%; /* 淇濇寔鍦嗗舰 */
+  display: flex; /* 浣跨敤flexbox鏉ュ眳涓� */
+  align-items: center; /* 鍨傜洿灞呬腑 */
+  justify-content: center; /* 姘村钩灞呬腑 */
+}
+.avatar-upload-preview {
+  position: relative;
+  top: 50%;
+  left: 50%;
+  transform: translate(-50%, -50%);
+  width: 200px;
+  height: 200px;
+  border-radius: 50%;
+  box-shadow: 0 0 4px #ccc;
+  overflow: hidden;
+}
+.img-circle {
+  border-radius: 50%;
+}
+.img-lg {
+  width: 120px;
+  height: 120px;
+}
+
+.circular-upload-box {
+  width: 120px;
+  height: 120px;
+  border-radius: 50%;
+  background-color: #f3f4f6;
+  display: flex;
+  flex-direction: column;
+  align-items: center;
+  justify-content: center;
+  cursor: pointer;
+  transition: background-color 0.3s ease;
+}
+
+.circular-upload-box:hover {
+  background-color: #e5e7eb;
+}
+
+</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/system/userinfo.vue b/Source/plt-web/plt-web-ui/src/views/system/userinfo.vue
deleted file mode 100644
index 6c985b5..0000000
--- a/Source/plt-web/plt-web-ui/src/views/system/userinfo.vue
+++ /dev/null
@@ -1,94 +0,0 @@
-<template>
-  <div>
-    <basic-container>
-      <avue-form :option="option"
-                 v-model="form"
-                 @tab-click="handleTabClick"
-                 @submit="handleSubmit"></avue-form>
-    </basic-container>
-  </div>
-</template>
-
-<script>
-  import option from "@/option/user/info";
-  import {getUserInfo, updateInfo, updatePassword} from "@/api/system/user";
-  import md5 from 'js-md5';
-  import func from "@/util/func";
-
-
-  export default {
-    data() {
-      return {
-        index: 0,
-        option: option,
-        form: {}
-      };
-    },
-    created() {
-      this.handleWitch();
-    },
-    methods: {
-      handleSubmit(form, done) {
-        if (this.index === 0) {
-          updateInfo(form).then(res => {
-            if (res.data.success) {
-              this.$message({
-                type: "success",
-                message: "淇敼淇℃伅鎴愬姛!"
-              });
-            } else {
-              this.$message({
-                type: "error",
-                message: res.data.msg
-              });
-            }
-            done();
-          }, error => {
-            window.console.log(error);
-            done();
-          })
-        } else {
-          updatePassword(md5(form.oldPassword), md5(form.newPassword), md5(form.newPassword1)).then(res => {
-            if (res.data.success) {
-              this.$message({
-                type: "success",
-                message: "淇敼瀵嗙爜鎴愬姛!"
-              });
-            } else {
-              this.$message({
-                type: "error",
-                message: res.data.msg
-              });
-            }
-            done();
-          }, error => {
-            window.console.log(error);
-            done();
-          })
-        }
-      },
-      handleWitch() {
-        if (this.index === 0) {
-          getUserInfo().then(res => {
-            const user = res.data.data;
-            this.form = {
-              id: user.id,
-              avatar: user.avatar,
-              name: user.name,
-              realName: user.realName,
-              phone: user.phone,
-              email: user.email,
-            }
-          });
-        }
-      },
-      handleTabClick(tabs) {
-        this.index = func.toInt(tabs.index);
-        this.handleWitch();
-      }
-    }
-  };
-</script>
-
-<style>
-</style>
diff --git a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
index b8a67d3..ce496d7 100644
--- a/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
+++ b/Source/plt-web/plt-web-ui/src/views/systemModel/mangeModel/index.vue
@@ -7,7 +7,8 @@
                      @node-click="nodeClick">
           <span slot-scope="{ node, data }" class="el-tree-node__label">
            <span>
-              <i :class="data.icon"></i>
+<!--              <i :class="data.icon"></i>-->
+             <icon-show :name="data.icon"></icon-show>
                 {{ (node || {}).label }}
             </span>
           </span>
@@ -94,9 +95,8 @@
                       placeholder="鏁板瓧锛屾弿杩拌妯″潡鍦ㄥ叾鐖舵ā鍧椾笅鐨勬樉绀洪『搴�"></el-input>
           </el-form-item>
           <el-form-item label="鍥炬爣锛�">
-              <avue-input-icon v-model="form.source" :disabled="!editStatus && !addStatus" :icon-list="iconList"
-                               placeholder="璇烽�夋嫨鍥炬爣">
-              </avue-input-icon>
+              <input-icon v-model="form.source" :disabled="!editStatus && !addStatus" placeholder="璇烽�夋嫨鍥炬爣">
+              </input-icon>
           </el-form-item>
           <el-form-item label="鎻忚堪锛�">
             <el-input v-model="form.remark" :disabled="!editStatus && !addStatus" :rows="3" placeholder="璇疯緭鍏ユ弿杩�"
@@ -192,13 +192,11 @@
 } from "@/api/systemModel/mangeModel/api"
 import func from "@/util/func";
 import basicOption from "@/util/basic-option";
-import iconList from "@/config/iconList";
 
 export default {
   name: "index",
   data() {
     return {
-      iconList: iconList,
       tipList: [],
       upFileType: ['xls', 'xlsx'],
       fileUrl: 'api/hmSysModConfigController/importModule',

--
Gitblit v1.9.3