fei.wang
2025-03-17 afedb522ac910d1e5265ad93b9bacb1da41cfefb
src/views/equipment/monitoring.vue
@@ -243,8 +243,16 @@
    search() {
      this.listLoading = true
      searchEquipment(this.listQuery).then(response => {
        this.list = response.data.records
        this.total = response.data.total
        if (response.data!=null) {
          this.list = response.data.records
          this.total = response.data.total
        }else{
          this.$message({
            message: '未搜索到数据',
            type: 'error'
          })
        }
        this.listLoading = false
      })
    },
@@ -286,7 +294,18 @@
      this.resetTemp()
      this.dialogVisible = true
      this.dialogType = 'modify'
      console.log(scope.row);
      // this.temp = Object.assign({}, _temp)
      console.log(this.temp);
      console.log(deepClone(scope.row));
      // this.temp.anchorname = scope.row.anchorname
      // this.temp.id = scope.row.id
      // this.temp.needbaseid = scope.row.needbaseid
      // this.temp.tagid = scope.row.tagid
      // this.temp.type = scope.row.type
      this.temp = deepClone(scope.row)
      // this.temp.companyid = scope.row.companyid
      this.disabled=true
      // this.$nextTick(() => {
      //   this.$refs['dataForm'].clearValidate()
@@ -313,7 +332,7 @@
          this.list.splice(scope.$index, 1)
          delEquipment(params).then(response => {
            this.temp.adminname = localStorage.getItem('username') || '';
            const params = { name:  this.temp.adminname, content: '删除了一个基准站,该编号为:'+scope.row.tagid };
            const params = { name:  this.temp.adminname, content: '删除了一个监测站,该编号为:'+scope.row.tagid };
            addSystemOperationLog(params).then(response => {
                        })
@@ -330,20 +349,22 @@
      if (this.loading) {
        return
      }
      this.temp.companyid=this.temp.company
      this.temp.companyid=this.temp.companyid
      this.$refs[this.temp].validate((valid) => {
          if (valid) {
            this.loading = true
            console.log(this.temp);
      addorupEquipment(this.temp).then(() => {
        if (this.temp.id=="") {
          this.temp.adminname = localStorage.getItem('username') || '';
            const params = { name:  this.temp.adminname, content: '新增了一个基准站,该编号为:'+this.temp.tagid };
            const params = { name:  this.temp.adminname, content: '新增了一个监测站,该编号为:'+this.temp.tagid };
            addSystemOperationLog(params).then(response => {
                        })
        } else {
          this.temp.adminname = localStorage.getItem('username') || '';
            const params = { name:  this.temp.adminname, content: '修改了一个基准站,该编号为:'+this.temp.tagid };
            const params = { name:  this.temp.adminname, content: '修改了一个监测站,该编号为:'+this.temp.tagid };
            addSystemOperationLog(params).then(response => {
                        })