Procházet zdrojové kódy

fix:替换图标

luzhixia před 1 týdnem
rodič
revize
0e8f4013d5

+ 120 - 99
src/components/layouts/HtAvatar/index.vue

@@ -36,7 +36,8 @@
 
         <el-dropdown-item command="personalInfo">
           <div class="icon-item">
-            <i class="iconfont icon-user-info"></i>
+            <!-- <i class="iconfont icon-user-info"></i> -->
+            <i class="iconfont-5039297 icon-gerenxinxi"></i>
             <span>个人信息</span>
           </div>
         </el-dropdown-item>
@@ -95,7 +96,9 @@
             </el-dropdown-menu>
           </el-dropdown>
         </el-dropdown-item>
-        <el-dropdown-item v-if="templateList.length > 1 && this.$store.state.user.showCustomPage">
+        <el-dropdown-item
+          v-if="templateList.length > 1 && $store.state.user.showCustomPage"
+        >
           <el-dropdown placement="left-start" @command="handleTemplateChange">
             <div class="icon-item switch-position">
               <ht-icon class="iconfont" name="block" />
@@ -127,14 +130,16 @@
 
         <el-dropdown-item command="modifyPassword">
           <div class="icon-item">
-            <i class="iconfont icon-user-pwd-modify"></i>
+            <!-- <i class="iconfont icon-user-pwd-modify"></i> -->
+            <i class="iconfont-5039297 icon-xiugaimima"></i>
             <span>修改密码</span>
           </div>
         </el-dropdown-item>
 
         <el-dropdown-item command="logout" divided>
           <div class="user-logout icon-item">
-            <i class="iconfont icon-user-logout"></i>
+            <!-- <i class="iconfont icon-user-logout"></i> -->
+            <i class="iconfont-5039297 icon-tuichuxitong"></i>
             <span>退出登录</span>
           </div>
         </el-dropdown-item>
@@ -166,7 +171,13 @@
   import req from '@/utils/request'
   import { getFiles } from '@/api/base.js'
   import { setCookie } from '@/api/newApi'
-  import { getLayoutTemplates, getBpmDataTemplateInfo, getLayoutDetail,saveTemplate, delTemplateUser } from '@/api/portal.js'
+  import {
+    getLayoutTemplates,
+    getBpmDataTemplateInfo,
+    getLayoutDetail,
+    saveTemplate,
+    delTemplateUser,
+  } from '@/api/portal.js'
   export default {
     name: 'HtAvatar',
     components: {
@@ -315,59 +326,68 @@
           }
         })
       },
-      getBpmDataTemplateInfo(){
+      getBpmDataTemplateInfo() {
         let param = {
-          alias: 'mhmb'
+          alias: 'mhmb',
         }
-        getBpmDataTemplateInfo(param).then(res=>{
-          if(res.code === 200){
+        getBpmDataTemplateInfo(param).then((res) => {
+          if (res.code === 200) {
             this.modeltemplateId = res.value.id
             this.getTemplates('init')
           }
         })
-
       },
-      getTemplates(type, item){
+      getTemplates(type, item) {
         let param = {
           templateId: this.modeltemplateId,
           queryFilter: {
-            pageBean:{},
-            querys:[{property: "F_zzid", value: this.userDetail.curOrgId, group: "main", operation: "EQUAL", relation: "AND"}],
-            sorter:[]
-          }
+            pageBean: {},
+            querys: [
+              {
+                property: 'F_zzid',
+                value: this.userDetail.curOrgId,
+                group: 'main',
+                operation: 'EQUAL',
+                relation: 'AND',
+              },
+            ],
+            sorter: [],
+          },
         }
-        getLayoutTemplates(param).then(res=>{
-          const _this = this
-          if(res.rows.length){
-            let arr = []
-            res.rows.forEach(item=>{
-              if(item.sfqy === '1'){
-                arr.push(item)
-              }
-            })
-            this.templateList = arr
-            this.templateList.forEach(item=>{
-              this.$set(item, 'selected', false)
-            })
-            if(type === 'init'){
-              this.getCurrenTemplate('init')
-            } else if(type === 'change'){
-              if(this.compareTemplateList(item.mbmc) === -1){
-                this.$message.error('该门户模板已禁用')
-              } else {
-                this.saveTemplate(item)
+        getLayoutTemplates(param)
+          .then((res) => {
+            const _this = this
+            if (res.rows.length) {
+              let arr = []
+              res.rows.forEach((item) => {
+                if (item.sfqy === '1') {
+                  arr.push(item)
+                }
+              })
+              this.templateList = arr
+              this.templateList.forEach((item) => {
+                this.$set(item, 'selected', false)
+              })
+              if (type === 'init') {
+                this.getCurrenTemplate('init')
+              } else if (type === 'change') {
+                if (this.compareTemplateList(item.mbmc) === -1) {
+                  this.$message.error('该门户模板已禁用')
+                } else {
+                  this.saveTemplate(item)
+                }
               }
+            } else {
+              this.$store.state.user.templateLoading = false
             }
-          } else {
-            this.$store.state.user.templateLoading = false
-          }
-        }).finally(()=>{
-          this.loading = false
-        })
+          })
+          .finally(() => {
+            this.loading = false
+          })
       },
-      compareTemplateList(name){
+      compareTemplateList(name) {
         let templateNames = []
-        this.templateList.forEach(item=>{
+        this.templateList.forEach((item) => {
           templateNames.push(item.mbmc)
         })
         const result = templateNames.indexOf(name)
@@ -376,59 +396,59 @@
       getCurrenTemplate(type) {
         let param = {
           userId: this.userDetail.user.userId,
-          orgId: this.userDetail.curOrgId
+          orgId: this.userDetail.curOrgId,
         }
-        getLayoutDetail(param).then(res=>{
-          if(res.code === 200){
-            let selectTemplate = ''
-            let result = ''
-            if(res.value){
-              result = res.value.templateName
-              if (this.compareTemplateList(result) === -1){
-                this.$store.state.user.nowTemplate = ''
-                this.delTemplate()
-                return
-              }
-            } else {
-              if(this.$store.state.user.nowTemplate){
-                result = this.$store.state.user.nowTemplate
+        getLayoutDetail(param)
+          .then((res) => {
+            if (res.code === 200) {
+              let selectTemplate = ''
+              let result = ''
+              if (res.value) {
+                result = res.value.templateName
+                if (this.compareTemplateList(result) === -1) {
+                  this.$store.state.user.nowTemplate = ''
+                  this.delTemplate()
+                  return
+                }
               } else {
-                if(this.templateList.length){
-                  result = this.templateList[0].mbmc
+                if (this.$store.state.user.nowTemplate) {
+                  result = this.$store.state.user.nowTemplate
                 } else {
-                  result = '模板A'
+                  if (this.templateList.length) {
+                    result = this.templateList[0].mbmc
+                  } else {
+                    result = '模板A'
+                  }
                 }
               }
-
+              this.templateList.forEach((item) => {
+                if (item.mbmc === result) {
+                  this.$set(item, 'selected', true)
+                  selectTemplate = item.mbmc
+                }
+              })
+              this.$store.state.user.nowTemplate = result
             }
-            this.templateList.forEach(item=>{
-              if(item.mbmc === result){
-                this.$set(item, 'selected', true)
-                selectTemplate = item.mbmc
-              }
-            })
-            this.$store.state.user.nowTemplate = result
-          }
-        }).finally(()=>{
-          if(type === 'init'){
-            this.$store.state.user.templateLoading = false
-          }
-        })
-
+          })
+          .finally(() => {
+            if (type === 'init') {
+              this.$store.state.user.templateLoading = false
+            }
+          })
       },
-      delTemplate(){
+      delTemplate() {
         let param = {
           userId: this.userDetail.user.userId,
-          orgId: this.userDetail.curOrgId
+          orgId: this.userDetail.curOrgId,
         }
-        delTemplateUser(param).then(res=>{
-          if(res.code === 200){
+        delTemplateUser(param).then((res) => {
+          if (res.code === 200) {
             this.getCurrenTemplate()
           }
         })
       },
-      handleTemplateChange(item){
-        if(item.mbmc === this.$store.state.user.nowTemplate){
+      handleTemplateChange(item) {
+        if (item.mbmc === this.$store.state.user.nowTemplate) {
           return
         } else {
           this.$confirm('是否切换门户模板?', '提示', {
@@ -441,28 +461,29 @@
             this.getTemplates('change', item)
           })
         }
-
       },
-      saveTemplate(item){
+      saveTemplate(item) {
         let param = {
           userId: this.userDetail.user.userId,
           orgId: this.userDetail.curOrgId,
-          templateName: item.mbmc
+          templateName: item.mbmc,
         }
-        saveTemplate(param).then(res=>{
-          if(res.code === 200){
-            this.templateList.forEach(template=>{
-              if (template.mbmc === item.mbmc){
-                this.$set(template, 'selected', true)
-                this.$store.state.user.nowTemplate = item.mbmc
-              } else {
-                this.$set(template, 'selected', false)
-              }
-            })
-          }
-        }).finally(()=>{
-          this.$store.state.user.templateLoading = false
-        })
+        saveTemplate(param)
+          .then((res) => {
+            if (res.code === 200) {
+              this.templateList.forEach((template) => {
+                if (template.mbmc === item.mbmc) {
+                  this.$set(template, 'selected', true)
+                  this.$store.state.user.nowTemplate = item.mbmc
+                } else {
+                  this.$set(template, 'selected', false)
+                }
+              })
+            }
+          })
+          .finally(() => {
+            this.$store.state.user.templateLoading = false
+          })
       },
       handleLangChange(lang) {
         this.setDefaultLang(lang)

+ 26 - 5
src/icon/font_5039297_dxnqahvyn47/iconfont.css

@@ -1,9 +1,9 @@
 @font-face {
   font-family: "iconfont-5039297"; /* Project id 5039297 */
-  src: url('iconfont.woff2?t=1764915437264') format('woff2'),
-       url('iconfont.woff?t=1764915437264') format('woff'),
-       url('iconfont.ttf?t=1764915437264') format('truetype'),
-       url('iconfont.svg?t=1764915437264#iconfont') format('svg');
+  src: url('iconfont.woff2?t=1765420803788') format('woff2'),
+       url('iconfont.woff?t=1765420803788') format('woff'),
+       url('iconfont.ttf?t=1765420803788') format('truetype'),
+       url('iconfont.svg?t=1765420803788#iconfont') format('svg');
 }
 
 .iconfont-5039297 {
@@ -14,6 +14,26 @@
   -moz-osx-font-smoothing: grayscale;
 }
 
+.icon-xiugaimima:before {
+  content: "\e680";
+}
+
+.icon-tuichuxitong:before {
+  content: "\e681";
+}
+
+.icon-wenjian:before {
+  content: "\e67d";
+}
+
+.icon-tuichu:before {
+  content: "\e67e";
+}
+
+.icon-gerenxinxi:before {
+  content: "\e67f";
+}
+
 .icon-shangchuan:before {
   content: "\e67c";
 }
@@ -436,4 +456,5 @@
 
 .icon-weishenhe:before {
   content: "\e620";
-}
+}
+

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 0 - 0
src/icon/font_5039297_dxnqahvyn47/iconfont.js


+ 35 - 0
src/icon/font_5039297_dxnqahvyn47/iconfont.json

@@ -6,6 +6,41 @@
   "description": "应用端、管理端的图票",
   "glyphs": [
     {
+      "icon_id": "46323578",
+      "name": "修改密码",
+      "font_class": "xiugaimima",
+      "unicode": "e680",
+      "unicode_decimal": 59008
+    },
+    {
+      "icon_id": "46323577",
+      "name": "退出系统",
+      "font_class": "tuichuxitong",
+      "unicode": "e681",
+      "unicode_decimal": 59009
+    },
+    {
+      "icon_id": "46323581",
+      "name": "附件",
+      "font_class": "wenjian",
+      "unicode": "e67d",
+      "unicode_decimal": 59005
+    },
+    {
+      "icon_id": "46323579",
+      "name": "退出",
+      "font_class": "tuichu",
+      "unicode": "e67e",
+      "unicode_decimal": 59006
+    },
+    {
+      "icon_id": "46323580",
+      "name": "个人信息",
+      "font_class": "gerenxinxi",
+      "unicode": "e67f",
+      "unicode_decimal": 59007
+    },
+    {
       "icon_id": "46277234",
       "name": "上传",
       "font_class": "shangchuan",

Rozdílová data souboru nebyla zobrazena, protože soubor je příliš velký
+ 4 - 0
src/icon/font_5039297_dxnqahvyn47/iconfont.svg


binární
src/icon/font_5039297_dxnqahvyn47/iconfont.ttf


binární
src/icon/font_5039297_dxnqahvyn47/iconfont.woff


binární
src/icon/font_5039297_dxnqahvyn47/iconfont.woff2


Některé soubory nejsou zobrazeny, neboť je v těchto rozdílových datech změněno mnoho souborů