Forráskód Böngészése

adm:feat > 完善扫楼功能不全

shaun-sheep 4 éve
szülő
commit
d9a103b75c

+ 4 - 3
config/index.js

@@ -291,7 +291,8 @@ module.exports = {
       '/scanbuilding': {
         // 目标 API 地址
         // target: 'http://192.168.12.238:8080/',
-        target: 'http://60.205.177.43:28888',
+        // target: 'http://60.205.177.43:28888',
+        target: 'http://192.168.64.14:28888',
         // 如果要代理 websockets
         ws: true,
         // 将主机标头的原点更改为目标URL
@@ -360,8 +361,8 @@ module.exports = {
     // Paths
     assetsRoot: path.resolve(__dirname, '../dist'),
     assetsSubDirectory: 'static',
-    // assetsPublicPath: '/adm/',// 39 配置
-    assetsPublicPath: '/',
+    assetsPublicPath: '/adm/',// 39 配置
+    // assetsPublicPath: '/',
 
     /**
      * Source Maps

+ 4 - 3
config/prod.env.js

@@ -1,10 +1,11 @@
 'use strict'
 module.exports = {
   NODE_ENV: '"production"',
-  BASE_URL: '"http://192.168.64.14"', //测试iframe地址
-  // BASE_URL: '"http://39.102.40.239"', //测试iframe地址
+  // BASE_URL: '"http://192.168.64.14"', //测试iframe地址
+  BASE_URL: '"http://39.102.40.239"', //测试iframe地址
   SSO_SERVER: '"http://mbi.sagacloud.cn"', //测试环境
-  MQTT_SERVICE: '"ws://39.102.40.239:61614/stomp/"' //MQ测试环境地址
+  // MQTT_SERVICE: '"ws://39.102.40.239:61614/stomp/"' //MQ测试环境地址
+  MQTT_SERVICE: '"ws://192.168.64.14:61614/stomp/"' //MQ测试环境地址
   // SSO_SERVER: '"http://172.16.44.235:8081"', //测试环境
   // BASE_URL: '"http://192.168.20.236"', //(新)测试iframe地址
   // SSO_SERVER: '"http://192.168.20.236:8086"', //(新)测试环境

+ 3 - 3
src/api/scan/request.js

@@ -81,19 +81,19 @@ export function getUser(param, success) {
 
 //修改扫楼用户
 export function loadUser(param, success) {
-  let url = `${api1}/service/user/update`;
+  let url = `${scan}/service/user/update`;
   http.postJson(url, param, success)
 }
 
 //删除扫楼用户
 export function delUser(param, success) {
-  let url = `${api1}/service/user/delete`;
+  let url = `${scan}/service/user/delete`;
   http.postJson(url, param, success)
 }
 
 //添加扫楼用户
 export function addUser(param, success) {
-  let url = `${api1}/service/user/create`;
+  let url = `${scan}/service/user/create`;
   http.postJson(url, param, success)
 }
 

+ 77 - 77
src/framework/layout/layout-store.js

@@ -23,38 +23,6 @@ export default {
       "system:role:setOpts": true
     },
     projectId: 'Pj1101051029',
-    projects: [
-      {
-        id: "Pj1101051029",
-        name: "北京万达广场",
-        pwd: "saga123456"
-      },
-      {
-        id: "Pj1101050029",
-        name: "东坝万达广场",
-        pwd: "saga123456"
-      },
-      {
-        id: "Pj4403070003",
-        name: "深圳龙岗万达广场",
-        pwd: "saga123456"
-      },
-      {
-        id: "Pj5001120003",
-        name: "香港置地约克北郡",
-        pwd: "saga123456"
-      },
-
-      {
-        id: "Pj1101050013",
-        name: "BIM测试项目_亚投行",
-        pwd: "saga123456"
-      },
-      {
-        id: "Pj1101080259",
-        name: "博锐尚格北京总部办公楼",
-        pwd: "saga123456"
-      },], // 14 全平台测试环境
     // projects: [
     //   {
     //     id: "Pj1101051029",
@@ -71,29 +39,12 @@ export default {
     //     name: "深圳龙岗万达广场",
     //     pwd: "saga123456"
     //   },
-    //   //   {
-    //   //     id: "Pj4403050019",
-    //   //     name: "招商深圳太子广场汇港二期",
-    //   //     pwd: "saga123456"
-    //   //   },
     //   {
     //     id: "Pj5001120003",
     //     name: "香港置地约克北郡",
     //     pwd: "saga123456"
     //   },
-    //   //   {
-    //   //     id: "Pj3201110003",
-    //   //     name: "弘阳集团弘云智慧管理平台",
-    //   //     pwd: "saga123456"
-    //   //   }, {
-    //   //     id: "Pj3702020002",
-    //   //     name: "青岛海天中心",
-    //   //     pwd: "saga123456"
-    //   //   }, {
-    //   //     id: "Pj1101010006",
-    //   //     name: "亚投行",
-    //   //     pwd: "saga123456"
-    //   //   },
+    //
     //   {
     //     id: "Pj1101050013",
     //     name: "BIM测试项目_亚投行",
@@ -103,33 +54,82 @@ export default {
     //     id: "Pj1101080259",
     //     name: "博锐尚格北京总部办公楼",
     //     pwd: "saga123456"
-    //   },
-    //   //   {
-    //   //     id: "Pj1101150002",
-    //   //     name: "华润生命科学园",
-    //   //     pwd: "saga123456"
-    //   //   },{
-    //   //     id: "Pj3101150007",
-    //   //     name: "招商上海森兰花园城",
-    //   //     pwd: "saga123456"
-    //   //   },{
-    //   //     id: "Pj5101080004",
-    //   //     name: "成都招商花园城",
-    //   //     pwd: "saga123456"
-    //   //   },{
-    //   //     id: "Pj3201130004",
-    //   //     name: "招商南京燕子矶花园城",
-    //   //     pwd: "saga123456"
-    //   //   },{
-    //   //     id: "Pj3702120001",
-    //   //     name: "金融中心",
-    //   //     pwd: "saga123456"
-    //   //   },{
-    //   //     id: "Pj1101051130",
-    //   //     name: "万达模型测试项目2",
-    //   //     pwd: "saga123456"
-    //   //   }
-    // ],  // 39环境
+    //   },], // 14 全平台测试环境
+    projects: [
+      {
+        id: "Pj1101051029",
+        name: "北京万达广场",
+        pwd: "saga123456"
+      },
+      {
+        id: "Pj1101050029",
+        name: "东坝万达广场",
+        pwd: "saga123456"
+      },
+      {
+        id: "Pj4403070003",
+        name: "深圳龙岗万达广场",
+        pwd: "saga123456"
+      },
+        {
+          id: "Pj4403050019",
+          name: "招商深圳太子广场汇港二期",
+          pwd: "saga123456"
+        },
+      {
+        id: "Pj5001120003",
+        name: "香港置地约克北郡",
+        pwd: "saga123456"
+      },
+        {
+          id: "Pj3201110003",
+          name: "弘阳集团弘云智慧管理平台",
+          pwd: "saga123456"
+        }, {
+          id: "Pj3702020002",
+          name: "青岛海天中心",
+          pwd: "saga123456"
+        }, {
+          id: "Pj1101010006",
+          name: "亚投行",
+          pwd: "saga123456"
+        },
+      {
+        id: "Pj1101050013",
+        name: "BIM测试项目_亚投行",
+        pwd: "saga123456"
+      },
+      {
+        id: "Pj1101080259",
+        name: "博锐尚格北京总部办公楼",
+        pwd: "saga123456"
+      },
+        {
+          id: "Pj1101150002",
+          name: "华润生命科学园",
+          pwd: "saga123456"
+        },{
+          id: "Pj3101150007",
+          name: "招商上海森兰花园城",
+          pwd: "saga123456"
+        },{
+          id: "Pj5101080004",
+          name: "成都招商花园城",
+          pwd: "saga123456"
+        },{
+          id: "Pj3201130004",
+          name: "招商南京燕子矶花园城",
+          pwd: "saga123456"
+        },{
+          id: "Pj3702120001",
+          name: "金融中心",
+          pwd: "saga123456"
+        },{
+          id: "Pj1101051130",
+          name: "万达模型测试项目2",
+          pwd: "saga123456"
+        }
+    ],  // 39环境
     breadcrumb: [],
     uploaderList: [], //当前上传文件列表
     secret: "saga123456", //项目密码

+ 34 - 35
src/views/ready/appuser/Edit.vue

@@ -2,15 +2,15 @@
     <el-dialog :title='isEdit?"编辑用户":"添加用户"' :visible.sync='dialogVisible' width='500px'>
         <div class='edit-box'>
             <el-form ref='form' :model='form' :rules='rules' label-width='80px'>
-                <el-form-item label='姓名' prop='UserName'>
-                    <el-input v-model.trim='form.UserName'></el-input>
-                </el-form-item>
-                <el-form-item label='联系电话' prop='Phone'>
-                    <el-input v-model.trim='form.Phone'></el-input>
-                </el-form-item>
-                <el-form-item label='备注'>
-                    <el-input v-model.trim='form.Note'></el-input>
-                </el-form-item>
+              <el-form-item label='姓名' prop='userName'>
+                <el-input v-model.trim='form.userName'></el-input>
+              </el-form-item>
+              <el-form-item label='联系电话' prop='phone'>
+                <el-input v-model.trim='form.phone'></el-input>
+              </el-form-item>
+              <el-form-item label='备注'>
+                <el-input v-model.trim='form.note'></el-input>
+              </el-form-item>
             </el-form>
         </div>
         <span slot='footer' class='dialog-footer'>
@@ -21,20 +21,20 @@
 </template>
 
 <script>
-  import {addUser, loadUser} from '@/api/scan/request'
-  import {mapGetters} from 'vuex'
+import {addUser, loadUser} from '@/api/scan/request'
+import {mapGetters} from 'vuex'
 
-  export default {
-    data() {
-      var validatePhone = (rule, value, callback) => {
-        let reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/
-        if (reg.test(value)) {
-          callback()
-        } else {
-          callback(new Error('手机格式不正确'))
-        }
+export default {
+  data() {
+    var validatePhone = (rule, value, callback) => {
+      let reg = /^(13[0-9]|14[579]|15[0-3,5-9]|16[6]|17[0135678]|18[0-9]|19[89])\d{8}$/
+      if (reg.test(value)) {
+        callback()
+      } else {
+        callback(new Error('手机格式不正确'))
       }
-      return {
+    }
+    return {
         dialogVisible: false,
         isEdit: false,
         form: {
@@ -43,8 +43,8 @@
           Note: ''
         },
         rules: {
-          UserName: [{required: true, message: '请输入姓名', trigger: 'blur'}],
-          Phone: [
+          userName: [{required: true, message: '请输入姓名', trigger: 'blur'}],
+          phone: [
             {required: true, message: '请输入联系电话', trigger: 'blur'},
             {validator: validatePhone, trigger: 'blur'}
           ]
@@ -62,14 +62,13 @@
             if (row) {
                 this.isEdit = true
                 this.form = {
-                    Note: row.Note,
-                    Phone: row.Phone,
-                    UserName: row.UserName,
-                    UserId: row.UserId,
-                    ProjId: row.ProjId
+                  note: row.note,
+                  phone: row.phone,
+                  userName: row.userName,
+                  userId: row.userId,
+                  projId: row.projId
                 }
             }
-          console.log(this.form)
         },
         save() {
             this.$refs['form'].validate(valid => {
@@ -87,13 +86,13 @@
         },
       addSave(val) {
         let param = {
-          ProjId: this.projectId,
-          UserId: this.form.UserId || this.userId,
-          Phone: this.form.Phone,
-          UserName: this.form.UserName,
-          Note: this.form.Note || undefined
+          projId: this.projectId,
+          userId: this.form.userId || this.userId,
+          phone: this.form.phone,
+          userName: this.form.userName,
+          note: this.form.note || undefined
         }
-        let Content = {Content: [param]}
+        let Content = {content: [param]}
         if (val == 'add') {
           addUser(Content, res => {
             this.$message.success('保存成功')

+ 25 - 24
src/views/ready/appuser/index.vue

@@ -7,7 +7,7 @@
                       v-model.trim='searchValue'
                       class='margin-right'
                       style='width: 300px; margin-right: 10px;'
-                      placeholder='姓名、联系电话、登录名、备注'
+                      placeholder='姓名、联系电话、备注'
                       @change='searchChange'
                     ></el-input>
                 </p>
@@ -31,11 +31,11 @@
               @selection-change='handleSelectionChange'
             >
               <!-- <el-table-column type='selection' width='55' align='center'></el-table-column> -->
-              <el-table-column prop='UserName' label='姓名' width='100' header-align='center'
+              <el-table-column prop='userName' label='姓名' width='100' header-align='center'
                                align='center'></el-table-column>
-              <el-table-column prop='Phone' label='联系电话/登录名' width='120' header-align='center'
+              <el-table-column prop='phone' label='联系电话/登录名' width='120' header-align='center'
                                align='center'></el-table-column>
-              <el-table-column prop='Note' label='备注' header-align='center'></el-table-column>
+              <el-table-column prop='note' label='备注' header-align='center'></el-table-column>
               <el-table-column label='操作' width='150' header-align='center' class="btn">
                 <template slot-scope='scope'>
                   <el-button type='primary' plain size='mini' @click='editUser(scope.row)'>编辑</el-button>
@@ -53,22 +53,22 @@
 </template>
 
 <script>
-  import {mapGetters} from 'vuex'
-  import {delUser, getUser} from '@/api/scan/request'
-  //component
-  import SagaEdit from './Edit'
+import {mapGetters} from 'vuex'
+import {delUser, getUser} from '@/api/scan/request'
+//component
+import SagaEdit from './Edit'
 
-  export default {
-    name: 'floor-user',
-    data() {
-      return {
-        searchValue: '',
-        loading: false,
-        tableData: [],
-        checkedArr: [],
-        pageNum: 1,
-        pageSize: 10,
-        total: 0
+export default {
+  name: 'floor-user',
+  data() {
+    return {
+      searchValue: '',
+      loading: false,
+      tableData: [],
+      checkedArr: [],
+      pageNum: 1,
+      pageSize: 10,
+      total: 0
       }
     },
     components: {
@@ -94,7 +94,6 @@
         this.$refs['edit'].show()
       },
       editUser(row) {
-        console.log(row,'===============')
         this.$refs['edit'].show(row)
       },
       del(row) {
@@ -138,14 +137,16 @@
       getUserList() {
         this.loading = true
         let param = {
+          filters: this.searchValue ? `userName contain '${this.searchValue}' or phone contain '${this.searchValue}'or note contain '${this.searchValue}'` : undefined,
+          // filter: this.searchValue || undefined,
           projectId: this.projectId,
-          PageNumber: this.pageNum,
-          PageSize: this.pageSize,
+          pageNumber: this.pageNum,
+          pageSize: this.pageSize,
         }
         getUser(param, res => {
           this.loading = false
-          this.tableData = res.Content
-          this.total = res.Count
+          this.tableData = res.content
+          this.total = res.count
         })
 
       },

+ 20 - 19
src/views/ready/appuser/index1.vue

@@ -112,20 +112,21 @@ export default {
         filter: this.filter,
         pageNum: this.pageNum,
         pageSize: this.pageSize,
-        ProjId: this.projectId,
-        UserId: this.userId
+        projId: this.projectId,
+        userId: this.userId
       };
 
       getUser(param).then(result => {
-        this.userData = result.data.UserList;
-        this.pageCount = result.data.Count;
+
+        this.userData = result.data.userList;
+        this.pageCount = result.data.count;
         this.loading = false;
         //存储一个数组防止删除操作找寻不到删除的该数组
-        this.deepArr = this.deepCopy(result.data.UserList);
+        this.deepArr = this.deepCopy(result.data.userList);
         if (this.userData.length) {
           this.noData = false;
           if (this.myHot) {
-            this.myHot.loadData(result.data.UserList);
+            this.myHot.loadData(result.data.userList);
           } else {
             this.populateHot();
           }
@@ -142,12 +143,12 @@ export default {
     //删除用户
     delUser(UserList) {
       let param = {
-        ProjId: this.projectId,
-        UserId: this.userId,
-        UserList: UserList
+        projId: this.projectId,
+        userId: this.userId,
+        userList: UserList
       };
       delUser(param).then(result => {
-        if (result.data.Result == "success") {
+        if (result.data.result == "success") {
           this.getUserTable();
           return;
         } else {
@@ -160,12 +161,12 @@ export default {
     //更新用户
     loadUser(UserList) {
       let param = {
-        ProjId: this.projectId,
-        UserId: this.userId,
-        UserList: UserList
+        projId: this.projectId,
+        userId: this.userId,
+        userList: UserList
       };
       loadUser(param).then(result => {
-        if (result.data.Result == "success") {
+        if (result.data.result == "success") {
           return;
         } else {
           this.msg = "请求出错";
@@ -177,13 +178,13 @@ export default {
     //请求接口添加用户
     addUser(User) {
       let param = {
-        ProjId: this.projectId,
-        UserId: this.userId,
-        User: User
+        projId: this.projectId,
+        userId: this.userId,
+        user: User
       };
       addUser(param).then(result => {
-        if (result.data.Result == "success") {
-          this.userData[0].UserId = result.data.UserId;
+        if (result.data.result == "success") {
+          this.userData[0].UserId = result.data.userId;
           this.userData[0].ProjId = this.projectId;
           return;
         } else {