瀏覽代碼

修改登录保密和其他问题

yuhan 1 年之前
父節點
當前提交
f5622ef010

+ 90 - 0
public/index.html

@@ -257,4 +257,94 @@
 
 </body>
 
+<!-- <script>
+  console.log(111111111111)
+  // var href = "http://www.baidu.com"
+  var href = "http://localhost:3000"
+  // 1.
+  // avueData()
+  // function avueData() {
+  //   console.log(11123686)
+
+  //   if (window.ActiveXObject === undefined) {// 不是ie浏览器,可直接打开
+  //     window.open(href, '_blank');
+  //   } else {// 是ie浏览器,跳转打开chrome
+  //     var objShell = new ActiveXObject("WScript.Shell");
+  //     objShell.Run("cmd.exe /c start chrome " + href, 0, true);
+  //   }
+  // }
+
+  // 2.
+  window.onload = function () {
+    var is_chrome = /chrome/.test(navigator.userAgent.toLowerCase());
+    // 判断是否谷歌浏览器
+    if (!is_chrome) {
+      console.log(!is_chrome)
+      console.log('1',href)
+      // setTimeout(toGG(href), 100);
+    } else {
+      console.log('2',href)
+      // window.location.replace(href)
+    }
+  }
+  function toGG(url) {
+    //创建ActiveXObject实例,只在IE下有效,才可以创建
+    var objShell = new ActiveXObject("WScript.Shell");
+    var x = getChromePath(objShell);
+    if (!x) {
+      alert("当前没有Chrome浏览器,请先安装Chrome浏览器");
+      return
+    }
+    /*
+    命令参数说明
+    cmd.exe /c dir 是执行完dir命令后关闭命令窗口。
+    cmd.exe /k dir 是执行完dir命令后不关闭命令窗口。
+    cmd.exe /c start dir 会打开一个新窗口后执行dir指令,原窗口会关闭。
+    cmd.exe /k start dir 会打开一个新窗口后执行dir指令,原窗口不会关闭。
+    这里的dir是start chrome www.baidu.com//用谷歌浏览器打开百度
+    */
+   console.log(url)
+    objShell.Run("cmd.exe /c start chrome " + url, 0, true);
+  }
+  function getChromePath(objShell) {
+    var regPath = ["HKEY_LOCAL_MACHINE\\SOFTWARE\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
+      "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
+      "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
+      "HKEY_CURRENT_USER\\Software\\WOW6432Node\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Google Chrome\\InstallLocation",
+      "HKEY_LOCAL_MACHINE\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\App Paths\chrome.exe\\Path",
+      "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\App Paths\\chrome.exe\\Path",
+    ];
+
+    // 判断是否安装谷歌浏览器
+    for (var i = 0; i < regPath.length; i++) {
+      try {
+        var x = objShell.regRead(regPath[i]);
+        if (x) {
+          return x;
+        }
+      } catch (e) { }
+    }
+    return undefined;
+  };
+
+  // 3.
+  // var objShell = new ActiveXObject("WScript.Shell");
+
+  // objShell.Run("cmd.exe /c start chrome http://192.168.31.43:3000", 0, true);
+
+  // function redirectToGoogle() {
+  //   var userAgent = window.navigator.userAgent;
+  //   var isChrome = /Chrome/.test(userAgent);
+  //   var ipAddress = '192.168.31.43:3000'; // 获取用户的IP地址,这部分需要借助服务器端的技术实现
+
+  //   if (isChrome && ipAddress) {
+  //     var googleURL = 'https://www.google.com' + '?ip=' + ipAddress;
+  //     window.location.href = googleURL;
+  //   }
+  // }
+
+  // redirectToGoogle();
+
+</script> -->
+
 </html>

+ 1 - 1
src/components/layouts/TabLayout.vue

@@ -165,7 +165,7 @@
       // 将首页添加到第一位
       addIndexToFirst() {
         this.pageList.splice(0, 0, {
-          name: 'dashboard-Analysis',
+          name: 'dashboardAnalysis',
           path: indexKey,
           fullPath: indexKey,
           meta: {

+ 1 - 1
src/components/tools/Breadcrumb.vue

@@ -26,7 +26,7 @@ export default {
       console.log('this.$route.matched', this.$route.matched)
 
       this.breadList = []
-      this.breadList.push({ name: 'dashboard-Analysis', path: '/dashboard/analysis', meta: { title: '管理驾驶舱' } })
+      this.breadList.push({ name: 'dashboardAnalysis', path: '/dashboard/analysis', meta: { title: '管理驾驶舱' } })
 
       this.name = this.$route.name
       this.$route.matched.forEach((item) => {

+ 3 - 1
src/config/router.config.js

@@ -8,7 +8,9 @@ export const asyncRouterMap = [
 
   {
     path: '/',
-    name: 'dashboard',
+    // 修改框架-首页
+    name: 'dashboardAnalysis',
+    // name: 'dashboard',
     component: TabLayout,
     meta: { title: '管理驾驶舱' },
     // meta: { title: '首页' },

+ 3 - 1
src/defaultSettings.js

@@ -27,6 +27,8 @@ export default {
   storageOptions: {
     namespace: 'pro__', // key prefix
     name: 'ls', // name variable Vue.[ls] or this.[$ls],
-    storage: 'local', // storage name session, local, memory
+    // 框架修改-登录
+    storage: 'session', // storage name session, local, memory
+    // storage: 'local', // storage name session, local, memory
   }
 }

+ 1 - 1
src/views/module_kzks/costModelClPrice/CostModelClPriceList.vue

@@ -174,7 +174,7 @@
             dataIndex: 'pici'
           },
           {
-            title:'单价',
+            title:'单价(元)',
             align:"center",
             dataIndex: 'danjia'
           },

+ 7 - 3
src/views/module_kzks/dashboard/Analysis.vue

@@ -132,14 +132,14 @@
             <a-tab-pane loading="true" tab="下达部门指标排行" key="1">
               <a-row>
                 <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
-                  <deptZbphTable :dataSource="zbPhDataSource.jycsCharts" class="dept-zbph-table"></deptZbphTable>
+                  <deptZbphTable :dataSource="zbPhDataSource.jycsCharts" :loading="zhbLoading" class="dept-zbph-table"></deptZbphTable>
                 </a-col>
               </a-row>
             </a-tab-pane>
             <a-tab-pane loading="true" tab="责任部门指标排行" key="2">
               <a-row>
                 <a-col :xl="24" :lg="24" :md="24" :sm="24" :xs="24">
-                  <deptZbphTable :dataSource="zbPhDataSource.zrbmCharts" class="dept-zbph-table"></deptZbphTable>
+                  <deptZbphTable :dataSource="zbPhDataSource.zrbmCharts" :loading="zhbLoading" class="dept-zbph-table"></deptZbphTable>
                 </a-col>
               </a-row>
             </a-tab-pane>
@@ -222,7 +222,7 @@
     { name: '工资费', value: 'gzjlwf' },
   ]
   export default {
-    name: "dashboard-Analysis",
+    name: "dashboardAnalysis",
     components: {
       ChartCard,
       Trend,
@@ -317,6 +317,7 @@
         // 排行
 
         // 部门指标排行
+        zhbLoading: true,
         zbPhParams: {
           beginDate: null,
           yearValue: null, // 因为dataPick是moment格式,所以加一个进行转化显示用
@@ -626,14 +627,17 @@
       },
       // 获取部门指标排行数据
       deptZhibiaoPaihang(){
+        this.zhbLoading = true
         deptZhibiaoPaihang(this.zbPhParams).then(res => {
           if (res.success) {
             console.log(res)
             this.zbPhDataSource = res.result
             // this.$message.success(res.message)
             // this.$emit('ok')
+            this.zhbLoading = false
           } else {
             this.$message.warning(res.message)
+            this.zhbLoading = false
           }
         }).finally(() => {
         })

+ 14 - 1
src/views/module_kzks/dashboard/components/deptZbphTable.vue

@@ -7,8 +7,8 @@
     rowKey="id"
     :columns="columns"
     :dataSource="dataSource"
+    :loading="loading"
     class="j-table-force-nowrap">
-    <!-- :loading="loading" -->
     <!-- :pagination="ipagination" -->
     
   </a-table>
@@ -25,6 +25,10 @@
       dataSource: {
         type: Array,
         default: []
+      },
+      loading: {
+        type: Boolean,
+        default: true
       }
     },
     data () {
@@ -88,6 +92,15 @@
     },
     created() {
     },
+    // watch: {
+    //   dataSource: {
+    //     handler(newV, oldV){
+    //       console.log(newV, oldV)
+    //       this.loading = false
+    //     },
+    //     immediate: true
+    //   }
+    // },
     methods: {
       initDictConfig(){
       },

+ 2 - 1
src/views/module_kzks/projectCostList/ProjectCostList.vue

@@ -923,13 +923,14 @@ import { number } from 'echarts';
           return
         }
         this.$refs.proCostDetail.taskno = record.taskno
-        if(record.status === '1'){
+        if(record.status === '1' && columnValue === 'clf'){
           // 批产参数
           this.$refs.proCostDetail.pichanInfo = {
             pccode: record.pccode,
             proportion: record.proportion,
             columnValue: columnValue,
           }
+          console.log(columnValue)
           this.$refs.proCostDetail.columnValue = 'pichanTask'
           this.$refs.proCostDetail.title = columnTitle + '批产明细'
         } else {

+ 32 - 5
src/views/user/LoginAccount.vue

@@ -2,12 +2,16 @@
     <div>
       <a-form-model ref="form" :model="model" :rules="validatorRules">
         <a-form-model-item required prop="username">
-          <a-input v-model="model.username" size="large" placeholder="请输入帐户名 / admin">
+          <!-- 修改框架-登录 -->
+          <a-input v-model="model.username" size="large" placeholder="请输入帐户名">
+          <!-- <a-input v-model="model.username" size="large" placeholder="请输入帐户名 / admin"> -->
             <a-icon slot="prefix" type="user" :style="{ color: 'rgba(0,0,0,.25)' }"/>
           </a-input>
         </a-form-model-item>
         <a-form-model-item required prop="password">
-          <a-input v-model="model.password" size="large" type="password" autocomplete="false" placeholder="请输入密码 / 123456">
+          <!-- 修改框架-登录 -->
+          <a-input v-model="model.password" size="large" type="password" autocomplete="false" placeholder="请输入密码">
+          <!-- <a-input v-model="model.password" size="large" type="password" autocomplete="false" placeholder="请输入密码 / 123456"> -->
             <a-icon slot="prefix" type="lock" :style="{ color: 'rgba(0,0,0,.25)' }"/>
           </a-input>
         </a-form-model-item>
@@ -44,8 +48,11 @@
         currdatetime: '',
         loginType: 0,
         model:{
-          username: 'admin',
-          password: '123456',
+          username: '',
+          password: '',
+          // 修改框架-登录
+          // username: 'admin',
+          // password: '123456',
           // inputCode: ''
         },
         validatorRules:{
@@ -136,7 +143,27 @@
             }
             console.log("登录参数", loginParams)
             this.Login(loginParams).then((res) => {
-              this.$emit('success', res.result)
+              // 修改框架-默认密码提示修改
+              console.log(res)
+              if(res.result && this.model.password === ('123456' || '513513')){
+                var _this = this
+                this.$warning({
+                  title: '当前密码为默认初始密码,存在保密隐患,请进入系统后修改密码!',
+                  // content: '当前密码为默认初始密码,存在安全问题,请进入系统后修改。',
+                  content: (
+                    <div>
+                      {/* <p>当前密码为默认初始密码,存在安全问,请进入系统后修改。</p> */}
+                      <p>操作提示:进入系统后点击右上角头像-密码修改</p>
+                    </div>
+                  ),
+                  onOk() {
+                    _this.$emit('success', res.result)
+                  },
+                });
+              }
+              if(res.result && this.model.password !== ('123456' || '513513')){
+                this.$emit('success', res.result)
+              }
             }).catch((err) => {
               //update-begin-author: taoyan date:20220425 for: 登录页面,当输入验证码错误时,验证码图片要刷新一下,而不是保持旧的验证码图片不变 #41
               if(err && err.code===412){