HOME\tianlin01 11 meses atrás
pai
commit
e472e14db3

+ 15 - 0
.env.development

@@ -0,0 +1,15 @@
+ENV = 'development'
+
+# 关闭菜单权限控制
+VUE_APP_DISABLE_AUTH = 0
+
+# base api
+#媒资api
+ #VUE_APP_BASE_API = 'https://imedia-test.inspuriit.com/admin/'
+
+#VUE_APP_BASE_API = 'http://idmlab.kmdns.net:12000/admin/'
+VUE_APP_BASE_API = 'http://127.0.0.1:8081/admin/'
+
+# VUE_APP_BASE_API = 'http://192.168.22.62:80/admin/'
+# VUE_APP_BASE_API = 'http://117.73.254.119:8002'
+# VUE_APP_BASE_API = 'http://10.202.16.6:8081/admin'

+ 39 - 0
.gitignore

@@ -0,0 +1,39 @@
+# Node.js
+node_modules/
+npm-debug.log
+yarn-error.log
+
+# Build output
+dist/
+build/
+
+# Local env files
+.env
+.env.local
+.env.*.local
+
+# IDEs and editors
+.vscode/
+.idea/
+*.sublime-workspace
+*.sublime-project
+
+# Operating system files
+.DS_Store
+Thumbs.db
+
+# Logs
+logs/
+*.log
+
+# Temporary files
+tmp/
+temp/
+
+# Coverage
+coverage/
+
+# Test output
+junit.xml
+test-results/
+

+ 8 - 0
.idea/.gitignore

@@ -0,0 +1,8 @@
+# Default ignored files
+/shelf/
+/workspace.xml
+# Editor-based HTTP Client requests
+/httpRequests/
+# Datasource local storage ignored files
+/dataSources/
+/dataSources.local.xml

+ 9 - 0
.idea/elevator-web.iml

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<module type="JAVA_MODULE" version="4">
+  <component name="NewModuleRootManager" inherit-compiler-output="true">
+    <exclude-output />
+    <content url="file://$MODULE_DIR$" />
+    <orderEntry type="inheritedJdk" />
+    <orderEntry type="sourceFolder" forTests="false" />
+  </component>
+</module>

+ 13 - 0
.idea/libraries/lib.xml

@@ -0,0 +1,13 @@
+<component name="libraryTable">
+  <library name="lib">
+    <CLASSES>
+      <root url="jar://$PROJECT_DIR$/public/UEditor/jsp/lib/ueditor-1.1.2.jar!/" />
+      <root url="jar://$PROJECT_DIR$/public/UEditor/jsp/lib/commons-io-2.4.jar!/" />
+      <root url="jar://$PROJECT_DIR$/public/UEditor/jsp/lib/json.jar!/" />
+      <root url="jar://$PROJECT_DIR$/public/UEditor/jsp/lib/commons-codec-1.9.jar!/" />
+      <root url="jar://$PROJECT_DIR$/public/UEditor/jsp/lib/commons-fileupload-1.3.1.jar!/" />
+    </CLASSES>
+    <JAVADOC />
+    <SOURCES />
+  </library>
+</component>

+ 7 - 0
.idea/misc.xml

@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="WebPackConfiguration">
+    <option name="mode" value="MANUAL" />
+    <option name="path" value="$PROJECT_DIR$/alais.config.js" />
+  </component>
+</project>

+ 8 - 0
.idea/modules.xml

@@ -0,0 +1,8 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="ProjectModuleManager">
+    <modules>
+      <module fileurl="file://$PROJECT_DIR$/.idea/elevator-web.iml" filepath="$PROJECT_DIR$/.idea/elevator-web.iml" />
+    </modules>
+  </component>
+</project>

+ 6 - 0
.idea/vcs.xml

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project version="4">
+  <component name="VcsDirectoryMappings">
+    <mapping directory="" vcs="Git" />
+  </component>
+</project>

+ 13 - 0
alais.config.js

@@ -0,0 +1,13 @@
+const path = require('path')
+
+function resolve (dir) {
+    return path.join(__dirname, dir)
+}
+
+module.exports = {
+    resolve: {
+        alias: {
+            '@': resolve('src')
+        }
+    }
+}

+ 4 - 0
package-lock.json

@@ -8079,6 +8079,7 @@
       "version": "2.3.3",
       "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
       "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+      "dev": true,
       "hasInstallScript": true,
       "optional": true,
       "os": [
@@ -19914,6 +19915,7 @@
       "integrity": "sha512-VCNRiAt2P/bLo09rYt3DLe6xXUMlhJwrvU18Ddd/lYJgC7s8+wvhgYs+MTx4OiAXdu58drGwSBO9SPx7C6J82Q==",
       "dev": true,
       "requires": {
+        "@babel/core": "^7.11.0",
         "@babel/helper-compilation-targets": "^7.9.6",
         "@babel/helper-module-imports": "^7.8.3",
         "@babel/plugin-proposal-class-properties": "^7.8.3",
@@ -19926,6 +19928,7 @@
         "@vue/babel-plugin-jsx": "^1.0.3",
         "@vue/babel-preset-jsx": "^1.2.4",
         "babel-plugin-dynamic-import-node": "^2.3.3",
+        "core-js": "^3.6.5",
         "core-js-compat": "^3.6.5",
         "semver": "^6.1.0"
       },
@@ -24405,6 +24408,7 @@
       "version": "2.3.3",
       "resolved": "https://registry.npmmirror.com/fsevents/-/fsevents-2.3.3.tgz",
       "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==",
+      "dev": true,
       "optional": true
     },
     "function-bind": {

+ 2 - 1
public/config.js

@@ -1,6 +1,7 @@
 const apiPath = 'http://idmlab.kmdns.net:12000/admin/';
 
-const filePath = 'http://idmlab.kmdns.net:12000';
+// const filePath = 'http://idmlab.kmdns.net:12000';
+const filePath = 'http://localhost:12000';
 
 // 平台部署到省级,则inProvince 设置true, 如果是部署到市级,则inProvince 设置false
 const platformLevel = 'province'; // province, city, county

+ 8 - 0
src/api/login-base.js

@@ -25,6 +25,14 @@ export function login(data) {
   })
 }
 
+export function resetPass(data) {
+  return request({
+    url: 'pass/forget/reset',
+    method: 'post',
+    data
+  })
+}
+
 //菜单权限
 export function menuAuth() {
   return request({

+ 42 - 8
src/layout/index.vue

@@ -1,8 +1,14 @@
 <template>
   <el-container class="app-wrapper">
     <el-header class="app-header" style="height: 48px;line-height: 48px;border-bottom: 1px solid #E1E4EA;">
-      <div class="logo-title" style="display: inline-flex; align-items: center">
-        <img style="width: 132px; height: 35px;transform: translateY(2px);" src="../assets/logo3.png" />
+      <div class="logo-title" style="display: inline-flex; align-items: center;">
+<!--        <img style="width: 132px; height: 35px;transform: translateY(2px);" src="../assets/logo3.png" />-->
+        <el-image
+            v-if="titleLogo"
+            style="margin-right: 16px; width: 132px; height: 35px"
+            :src="filePath + titleLogo"
+        ></el-image>
+        <span class="title">{{ title }}</span>
       </div>
       <div class="tags" style="position: relative;">
         <!-- <TagsView style="position:absolute;bottom:0"></TagsView> -->
@@ -144,8 +150,8 @@ export default {
     };
     return {
       filePath: filePath,
-      title: this.$store.state.settings.title,
-      titleLogo: this.$store.state.settings.titleLogo,
+      title: this.$store.state.user.companyInfo.companyName,
+      titleLogo: this.$store.state.user.companyInfo.companyLogo,
       sysIcon: require('@/assets/search/sys-icon.svg'),
       headImg: require('@/assets/total_bg.jpg'),
       bgStyle: {},
@@ -181,9 +187,23 @@ export default {
     };
   },
   watch: {
-    // formData(val) {
-    //   console.log(val)
-    // }
+    watch: {
+      '$store.state.user.companyInfo.companyName': {
+        handler: function (nv, ov) {
+          this.title = nv;
+        },
+        immediate: true
+      },
+      '$store.state.user.companyInfo.companyLogo': {
+        handler: function (nv, ov) {
+          this.titleLogo = nv;
+        },
+        immediate: true
+      }
+    },
+  },
+  mounted(){
+    console.log("mounted:",this.$store.state.user.companyInfo);
   },
   computed: {},
   methods: {
@@ -300,6 +320,20 @@ export default {
   }
 }
 
+.title {
+  display: flex;
+  /* height: 27px; */
+  font-size: 14px;
+  font-family: MicrosoftYaHei-Bold, MicrosoftYaHei;
+  font-weight: bold;
+  color: #333333;
+  /* line-height: 27px; */
+  letter-spacing: 1px;
+  align-items: center;
+  //padding-bottom: 8px;
+}
+
+
 .headImg {
   width: 18px;
   height: 18px;
@@ -318,7 +352,7 @@ export default {
 }
 
 .logo-title {
-  flex: 0 0 260px;
+  //flex: 0 0 260px;
 }
 
 .tags {

+ 2 - 1
src/store/modules/user.js

@@ -1,4 +1,4 @@
-import { login, key, menuAuth, logout } from '@/api/login-base'
+import { login,resetPass, key, menuAuth, logout } from '@/api/login-base'
 import { getToken, setToken, removeToken } from '@/utils/auth'
 import { getData, setData } from "@/utils/data-cache";
 import router, { resetRouter } from '@/router'
@@ -93,6 +93,7 @@ const actions = {
         companyName: info.companyName,
         companyId: info.companyId,
         companyType: info.companyType,
+        companyLogo: info.companyLogo,
       });
       return info;
     } catch (e) {

+ 1 - 0
src/views/elevator-sys-org/unit-mgt/components/ItemDetail.vue

@@ -59,6 +59,7 @@ const defaultNewCompanyData = {
               dataStatus: { label: '单位状态', value: 1, type: 'switch', text:['启用', '禁用'], width: '50%', rightGap:'10px', leftGap: '10px'},
               website: { label: '单位官网', value: '', placeholder: '请输入', type: 'input', width: '50%', rightGap:'10px', leftGap: '10px'},
               systemName: { label: '系统名称', value: '', placeholder: '请输入', type: 'input', width: '50%', rightGap:'10px', leftGap: '10px',required:true},
+              companyLogo: { label: '单位Logo', value: '', actionUrl: basePath + 'common/file', type: 'singleImgUpload', width: '50%', rightGap: '10px', leftGap: '10px'},
               attachmentFileUrl: { label: '单位附件', value: '', type: 'uploadFormItem', actionUrl: "datarecord/file", width: '100%', rightGap:'10px', leftGap: '10px'},
               businessScope: { label: '经营范围', value: '', placeholder: '请输入', type: 'textarea', width: '100%', rightGap:'10px', leftGap: '10px'},
             }

+ 25 - 3
src/views/login/index.vue

@@ -53,9 +53,8 @@
           font-size: 12px;
         "
       >
-        <!-- © 2023 Inspur 使用浪潮媒资搜索引擎必读 浪潮版权声明 -->
-      {{ copyright }}
-    </div> -->
+         © 2023 Inspur 使用浪潮媒资搜索引擎必读 浪潮版权声明
+      {{ copyright }}</div> -->
   </div>
   </div>
 </template>
@@ -112,6 +111,29 @@ export default {
         this.loginForm.verify = '';
       });
     },
+    handleReset() {
+      this.$refs.loginForm.validate(valid => {
+        if (valid) {
+          this.loading = true;
+          this.$store
+              .dispatch('user/login', this.loginForm)
+              .then(() => {
+                this.$router.push({
+                  path: this.redirect || '/',
+                  query: this.otherQuery
+                });
+                this.loading = false;
+              })
+              .catch(() => {
+                this.loading = false;
+                this.getVerifyImg();
+              });
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
     handleLogin() {
       this.$refs.loginForm.validate(valid => {
         if (valid) {