Commit f0de95cf authored by dlkong's avatar dlkong
Browse files

12.12

parent a75175ab
Loading
Loading
Loading
Loading
+59 −9
Original line number Diff line number Diff line
@@ -161,10 +161,11 @@
      </div>
    </el-dialog>
     <el-dialog title="选择隐患清单库" :visible.sync="patrolLibraryOpen" width="60%" append-to-body>
        <el-table :data="libraryList" @selection-change="handleSelectionChange" ref="libraryListTabel" :key="isUpdate">
        <el-table :data="libraryList" @selection-change="handleSelectionChange" ref="libraryListTabel" :key="isUpdate" row-key="id">
           <el-table-column
              type="selection"
              width="55">
              width="55"
              :reserve-selection="true">
            </el-table-column>
            <el-table-column
              label="场所位置"
@@ -361,6 +362,10 @@ export default {
        currentRiskTypeList:[]
      } 
      this.listUserTabel = []
      this.libraryParams = {
        pageNum: 1,
        pageSize: 10,
      }
    },
    /** 搜索按钮操作 */
    handleQuery() {
@@ -419,7 +424,7 @@ export default {
              })
              params.list = arr
            }
            console.log('params==>>',params)
            // console.log('params==>>',params)
          if (this.form.id != null) {
            params.id = this.form.id
            saveCurrentPost(params).then(response => {
@@ -461,7 +466,7 @@ export default {
             }
             this.listUserTabel.push(data)
          })
          console.log('this.listUserTabel==>>',this.listUserTabel)
          // console.log('this.listUserTabel==>>',this.listUserTabel)
      }
    },
    // 一岗一人巡查模式 清单库
@@ -476,13 +481,45 @@ export default {
           item.cycle = '0'
        })
        this.libraryTotal = response.total;
        
        // if (this.listForm.postState == '0') {
        //   console.log('翻页postList==>>',this.postList)
        //   this.$nextTick(()=>{
        //     for (let i = 0; i < this.libraryList.length; i++) {
        //       for (let j = 0; j <this.postList.length; j++) {
        //         //两个数组做比对,选中的做勾选
        //         if(this.libraryList[i].id===this.postList[j].id)
        //         {
        //           this.$refs.libraryListTabel.toggleRowSelection(this.libraryList[i]);
        //         }
        //       }
        //     }
        //   })
        // }else{
        //   this.$nextTick(()=>{
        //     for (let i = 0; i < this.libraryList.length; i++) {
        //       for (let j = 0; j <this.listUserTabel[this.userIndex].postName.length; j++) {
        //         //两个数组做比对,选中的做勾选
        //         if(this.libraryList[i].id===this.listUserTabel[this.userIndex].postName[j].id)
        //         {
        //           this.$refs.libraryListTabel.toggleRowSelection(this.libraryList[i]);
        //         }
        //       }
        //     }
        //   })
        // }
      });
    },
    // 选择清单库确定
    patrolLibrarySubmit(){
       if (this.listForm.postState == '0') {
          this.postList = []
           this.listForm.currentRiskTypeList = []
      this.patrolLibraryOpen = false
       }else{
        this.listUserTabel[this.userIndex].postName = []
        this.listUserTabel[this.userIndex].postNameShow = []
       }
      console.log('this.multipleSelection==>>',this.multipleSelection)
      this.multipleSelection.forEach((item) => {
        if (this.listForm.postState == '0') { // 一岗一人巡查模式
          let data = {
@@ -493,6 +530,7 @@ export default {
          if(!this.listForm.currentRiskTypeList.some( items => items.type === item.type)){
              this.listForm.currentRiskTypeList.push(item)
          }
          // console.log('清单库确定postList==>>',this.postList)
        }else{ // 一岗多人巡查模式
           let data = {
            id: item.id,
@@ -504,9 +542,12 @@ export default {
          if(!this.listUserTabel[this.userIndex].postNameShow.some( items => items.type === item.type)){
              this.listUserTabel[this.userIndex].postNameShow.push(item)
          }
          // console.log('清单库确定listUserTabel==>>',this.listUserTabel)
        }
      })
      // console.log('listUserTabel==>>',this.listUserTabel)
      this.$refs.libraryListTabel.clearSelection()
      this.patrolLibraryOpen = false
      
    },
    // 状态切换
    statusChange(num, e){
@@ -527,6 +568,11 @@ export default {
      this.userId = row.userId
      this.userIndex = index
      this.userStatus = row.status
      this.multipleSelection = []
      this.libraryParams = {
        pageNum: 1,
        pageSize: 10,
      }
      this.getlibraryList()
    },
    // tabs切换
@@ -550,6 +596,8 @@ export default {
       getCurrentRiskPatrol(params).then(response => {
        
        if (this.listForm.postState == '0') { // 一岗一人巡查模式
          this.postList = []
          this.listForm.currentRiskTypeList = []
          response.rows.forEach((item) => {
             let data = {
              id: item.currentRiskId,
@@ -560,8 +608,10 @@ export default {
              this.listForm.currentRiskTypeList.push(item)
            }
          })
          console.log('==>>',this.listForm.currentRiskTypeList)
          // console.log('postList==>>',this.postList)
        }else{ // 一岗多人巡查模式
          this.listUserTabel = []
          // this.listUserTabel[this.userIndex].postNameShow = []s
          let arr = this.form.nickName.split(',')
          arr.forEach((item, index) => {
             let data = {
+2 −2
Original line number Diff line number Diff line
@@ -37,10 +37,10 @@ module.exports = {
      // detail: https://cli.vuejs.org/config/#devserver-proxy
      [process.env.VUE_APP_BASE_API]: {
        // target: "http://192.168.10.137:8080/",
        target: `http://192.168.4.232:8080`, //服务器地址
        // target: `http://192.168.4.232:8080`, //服务器地址
        // target: `http://192.168.15.230:8081`, //晓晋本地地址
        // target: `http://192.168.15.152:8081`, //鲍德本地地址
        // target: `http://127.0.0.1:8080`, //本地地址
        target: `http://127.0.0.1:8080`, //本地地址
        changeOrigin: true,
        pathRewrite: {
          ["^" + process.env.VUE_APP_BASE_API]: "",