钞小赢 лет назад: 3
Родитель
Сommit
d6513b816d

+ 3 - 0
.env

@@ -5,8 +5,11 @@ VUE_APP_TITLE=物联网平台
5
 
5
 
6
 # 网络请求公用地址
6
 # 网络请求公用地址
7
 VUE_APP_API=/api/
7
 VUE_APP_API=/api/
8
+
8
 # 测试
9
 # 测试
9
 #  VUE_APP_API=http://101.36.160.140:31005/smart-grp-basic
10
 #  VUE_APP_API=http://101.36.160.140:31005/smart-grp-basic
11
+#  VUE_APP_API=http://172.16.0.6:7070/smart-grp-basic
12
+#  VUE_APP_API=window.location.origin
10
 
13
 
11
 # //正式
14
 # //正式
12
 # VUE_APP_API=http://23.99.21.201:59887/smart-grp-basic
15
 # VUE_APP_API=http://23.99.21.201:59887/smart-grp-basic

+ 8 - 1
src/api/modules/login.api.js

@@ -14,7 +14,14 @@ export default ({
14
     })
14
     })
15
   },
15
   },
16
 
16
 
17
-
17
+//验证码
18
+seccode(){
19
+  return request({
20
+    url: '/userInfo/identifyImage',
21
+    method: 'get',
22
+ 
23
+  })
24
+}
18
 
25
 
19
 
26
 
20
 })
27
 })

BIN
src/assets/images/seccode.png


+ 2 - 1
src/main.js

@@ -27,7 +27,8 @@ import "./views/system/js/index"
27
 import "./views/system/js/jquery-1.8.3.min.js"
27
 import "./views/system/js/jquery-1.8.3.min.js"
28
 import "./views/system/css/globle.css"
28
 import "./views/system/css/globle.css"
29
 
29
 
30
-
30
+// const publicUrl=window.location.origin
31
+// console.log(publicUrl,'publicUrl')
31
 
32
 
32
 // 核心插件
33
 // 核心插件
33
 Vue.use(d2Admin)
34
 Vue.use(d2Admin)

+ 2 - 0
src/views/demo/alarmRecord/index.vue

@@ -214,6 +214,8 @@
214
                 >
214
                 >
215
                     <template slot-scope="scope">
215
                     <template slot-scope="scope">
216
                       {{scope.row.handleState==0?'待处理':scope.row.handleState==1?'已处理':scope.row.handleState}}
216
                       {{scope.row.handleState==0?'待处理':scope.row.handleState==1?'已处理':scope.row.handleState}}
217
+                      <!-- <span v-if="scope.row.handleState==0">待处理</span>
218
+                      <span v-if="scope.row.handleState==1">已处理</span> -->
217
                     </template>
219
                     </template>
218
                 </el-table-column>
220
                 </el-table-column>
219
                 <el-table-column align="center" label="操作" width="100">
221
                 <el-table-column align="center" label="操作" width="100">

+ 6 - 6
src/views/demo/equipmentManage/equipmentInfo/index.vue

@@ -663,11 +663,11 @@ export default {
663
     connect() {
663
     connect() {
664
       let options = {
664
       let options = {
665
         //本地
665
         //本地
666
-        username: "admin",
667
-        password: "public",
666
+        // username: "admin",
667
+        // password: "public",
668
         //测试
668
         //测试
669
-        //    username: "admin",
670
-        // password: "admin@123",
669
+           username: "admin",
670
+        password: "admin@123",
671
         //生产
671
         //生产
672
         // username: "admin",
672
         // username: "admin",
673
         // password: "admin@2Ld&DDrsk",
673
         // password: "admin@2Ld&DDrsk",
@@ -677,9 +677,9 @@ export default {
677
         connectTimeout: 4000,
677
         connectTimeout: 4000,
678
       };
678
       };
679
       //本地开发环境
679
       //本地开发环境
680
-      this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
680
+      // this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
681
       //测试环境
681
       //测试环境
682
-      //  this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
682
+       this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
683
       //正式环境
683
       //正式环境
684
       // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
684
       // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
685
       this.client.on("connect", (e) => {
685
       this.client.on("connect", (e) => {

+ 8 - 3
src/views/demo/productManage/compontents/addDialog.vue

@@ -12,10 +12,10 @@
12
         ref="addForm"
12
         ref="addForm"
13
         label-width="120px"
13
         label-width="120px"
14
       >
14
       >
15
-        <el-form-item label="产品图标:" prop="proIcons">
15
+        <!-- <el-form-item label="产品图标:" prop="proIcons">
16
           <el-upload
16
           <el-upload
17
             class="avatar-uploader"
17
             class="avatar-uploader"
18
-            action="smart-grp-basic/minio/testupload"
18
+            :action="imgAction"
19
             :show-file-list="false"
19
             :show-file-list="false"
20
             :on-success="handleAvatarSuccess"
20
             :on-success="handleAvatarSuccess"
21
           >
21
           >
@@ -26,7 +26,7 @@
26
             />
26
             />
27
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
27
             <i v-else class="el-icon-plus avatar-uploader-icon"></i>
28
           </el-upload>
28
           </el-upload>
29
-        </el-form-item>
29
+        </el-form-item> -->
30
         <el-form-item label="产品ID:" prop="proCode">
30
         <el-form-item label="产品ID:" prop="proCode">
31
           <el-input
31
           <el-input
32
             style="width: 220px"
32
             style="width: 220px"
@@ -107,6 +107,8 @@ export default {
107
   },
107
   },
108
   data() {
108
   data() {
109
     return {
109
     return {
110
+      //  imgAction:window.location.origin+'/smart-grp-basic/minio/testupload',
111
+      imgAction:'http://101.36.160.140:31005/smart-grp-basic/minio/testupload',
110
       defaultProps: {
112
       defaultProps: {
111
         children: "children",
113
         children: "children",
112
         label: "productCategoryName",
114
         label: "productCategoryName",
@@ -241,6 +243,9 @@ export default {
241
       });
243
       });
242
     },
244
     },
243
   },
245
   },
246
+  mounted(){
247
+    console.log(window.location.host,"kkk")
248
+  }
244
 };
249
 };
245
 </script>
250
 </script>
246
 <style lang="scss" scoped>
251
 <style lang="scss" scoped>

+ 6 - 6
src/views/demo/productManage/productInfo/realTime/index.vue

@@ -164,11 +164,11 @@ export default {
164
     connect() {
164
     connect() {
165
       let options = {
165
       let options = {
166
         //本地
166
         //本地
167
-        username: "admin",
168
-        password: "public",
169
-        //测试
170
         // username: "admin",
167
         // username: "admin",
171
-        // password: "admin@123",
168
+        // password: "public",
169
+        //测试
170
+        username: "admin",
171
+        password: "admin@123",
172
         //生产
172
         //生产
173
         // username: "admin",
173
         // username: "admin",
174
         // password: "admin@2Ld&DDrsk",
174
         // password: "admin@2Ld&DDrsk",
@@ -178,9 +178,9 @@ export default {
178
         connectTimeout: 4000,
178
         connectTimeout: 4000,
179
       };
179
       };
180
       //本地开发环境
180
       //本地开发环境
181
-      this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
181
+      // this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
182
       //测试环境
182
       //测试环境
183
-      // this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
183
+      this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
184
       //正式环境
184
       //正式环境
185
       // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
185
       // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
186
       this.client.on("connect", (e) => {
186
       this.client.on("connect", (e) => {

+ 27 - 6
src/views/system/login/page.vue

@@ -44,6 +44,17 @@
44
                     <i slot="prepend" class="fa fa-lock"></i>
44
                     <i slot="prepend" class="fa fa-lock"></i>
45
                   </el-input>
45
                   </el-input>
46
                 </el-form-item>
46
                 </el-form-item>
47
+                <el-form-item prop="seccode">
48
+                  <el-input
49
+              
50
+                    style="width:60%"
51
+                    v-model="formLogin.seccode"
52
+                    placeholder="验证码">
53
+                    <i slot="prepend" class="el-icon-s-ticket"></i>
54
+                  </el-input>
55
+                  <span @click="seccodeImgClick" style="display:inline-block;margin-left:15px;margin-top:12px"><img :src="seccodeImg" alt=""></span>
56
+
57
+                </el-form-item>
47
                
58
                
48
                 <el-button
59
                 <el-button
49
                   size="default"
60
                   size="default"
@@ -81,7 +92,8 @@ export default {
81
   data () {
92
   data () {
82
     return {
93
     return {
83
   
94
   
84
-     
95
+      // seccodeImg:window.location.origin+'/smart-grp-basic/userInfo/identifyImage',
96
+      seccodeImg:'http://101.36.160.140:31005/smart-grp-basic/userInfo/identifyImage',
85
     
97
     
86
       // 快速选择用户
98
       // 快速选择用户
87
       dialogVisible: false,
99
       dialogVisible: false,
@@ -124,7 +136,8 @@ export default {
124
             trigger: 'blur'
136
             trigger: 'blur'
125
           }
137
           }
126
         ],
138
         ],
127
-        code: [
139
+
140
+        seccode: [
128
           {
141
           {
129
             required: true,
142
             required: true,
130
             message: '请输入验证码',
143
             message: '请输入验证码',
@@ -136,11 +149,13 @@ export default {
136
     }
149
     }
137
   },
150
   },
138
   mounted () {
151
   mounted () {
139
-   
152
+
140
   },
153
   },
141
   created(){
154
   created(){
142
     //开启监听键盘按下事件
155
     //开启监听键盘按下事件
143
     window.addEventListener("keydown",this.handleKeyDown,true);
156
     window.addEventListener("keydown",this.handleKeyDown,true);
157
+    console.log(this.formLogin.seccode,"首次this.formLogin.seccode")
158
+   
144
   },
159
   },
145
   beforeDestroy () {
160
   beforeDestroy () {
146
  
161
  
@@ -165,7 +180,8 @@ export default {
165
    loginBtn(){
180
    loginBtn(){
166
      let data={
181
      let data={
167
        userName:this.formLogin.username,
182
        userName:this.formLogin.username,
168
-       userPassword:this.formLogin.password
183
+       userPassword:this.formLogin.password,
184
+       identifyCode:this.formLogin.seccode
169
      }
185
      }
170
      api.login(data)
186
      api.login(data)
171
      .then(res=>{
187
      .then(res=>{
@@ -188,10 +204,15 @@ export default {
188
               
204
               
189
               
205
               
190
        }else if(res.code==600){
206
        }else if(res.code==600){
191
-          this.$message.error('账号或密码错误');
207
+          this.$message.error(res.msg);
192
        }
208
        }
193
      })
209
      })
194
    },
210
    },
211
+   seccodeImgClick(){
212
+ 
213
+    this.seccodeImg=this.seccodeImg+'?'+Math.random()
214
+  
215
+   },
195
   
216
   
196
     // 提交登录信息
217
     // 提交登录信息
197
     submit () {
218
     submit () {
@@ -280,7 +301,7 @@ export default {
280
   // 登录表单
301
   // 登录表单
281
   .page-login--form {
302
   .page-login--form {
282
     width: 26.06vw;
303
     width: 26.06vw;
283
-    height: 20.21vw;
304
+    height: 25.21vw;
284
     background-image: url("./image/dengluk.png");
305
     background-image: url("./image/dengluk.png");
285
     background-repeat: no-repeat;
306
     background-repeat: no-repeat;
286
     background-size: 100% 100%;
307
     background-size: 100% 100%;

+ 6 - 6
src/views/system/visualized/index.vue

@@ -442,11 +442,11 @@ export default {
442
     connect() {
442
     connect() {
443
       let options = {
443
       let options = {
444
         //本地
444
         //本地
445
-        username: "admin",
446
-        password: "public",
447
-        //测试
448
         // username: "admin",
445
         // username: "admin",
449
-        // password: "admin@123",
446
+        // password: "public",
447
+        //测试
448
+        username: "admin",
449
+        password: "admin@123",
450
         //生产
450
         //生产
451
         // username: "admin",
451
         // username: "admin",
452
         // password: "admin@2Ld&DDrsk",
452
         // password: "admin@2Ld&DDrsk",
@@ -456,9 +456,9 @@ export default {
456
         connectTimeout: 4000,
456
         connectTimeout: 4000,
457
       };
457
       };
458
       //本地开发环境
458
       //本地开发环境
459
-      this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
459
+      // this.client = mqtt.connect("ws://192.168.50.169:8083/mqtt", options);
460
       //测试环境
460
       //测试环境
461
-      // this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
461
+      this.client = mqtt.connect('ws://172.16.0.5:8083/mqtt',options);
462
       //正式环境
462
       //正式环境
463
       // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
463
       // this.client = mqtt.connect('ws://10.105.101.61:8083/mqtt',options);
464
       this.client.on("connect", (e) => {
464
       this.client.on("connect", (e) => {

+ 4 - 1
vue.config.js

@@ -15,7 +15,7 @@ process.env.VUE_APP_BUILD_TIME = require('dayjs')().format('YYYY-M-D HH:mm:ss')
15
 
15
 
16
 // 基础路径 注意发布之前要先修改这里
16
 // 基础路径 注意发布之前要先修改这里
17
 const publicPath = process.env.VUE_APP_PUBLIC_PATH || '/'
17
 const publicPath = process.env.VUE_APP_PUBLIC_PATH || '/'
18
-
18
+console.log(publicPath,"publicPath")
19
 // 设置不参与构建的库
19
 // 设置不参与构建的库
20
 const externals = {}
20
 const externals = {}
21
 cdnDependencies.forEach(pkg => { externals[pkg.name] = pkg.library })
21
 cdnDependencies.forEach(pkg => { externals[pkg.name] = pkg.library })
@@ -45,6 +45,8 @@ module.exports = {
45
       '/api': {
45
       '/api': {
46
         //测试
46
         //测试
47
         target: 'http://101.36.160.140:31005/smart-grp-basic',
47
         target: 'http://101.36.160.140:31005/smart-grp-basic',
48
+        // target: 'http://172.16.0.6:7070/smart-grp-basic',
49
+       
48
         //生产
50
         //生产
49
         // target:"http://23.99.21.201:59887/smart-grp-basic",
51
         // target:"http://23.99.21.201:59887/smart-grp-basic",
50
         // target: 'http://112.51.248.191:7070',
52
         // target: 'http://112.51.248.191:7070',
@@ -124,6 +126,7 @@ module.exports = {
124
 
126
 
125
 
127
 
126
       config.plugin('provide').use(webpack.ProvidePlugin,[{
128
       config.plugin('provide').use(webpack.ProvidePlugin,[{
129
+         
127
         $:"jquery",
130
         $:"jquery",
128
         jquery:"jquery",
131
         jquery:"jquery",
129
         jQuery:"jquery",
132
         jQuery:"jquery",