Bladeren bron

RCB600液氮罐修改

hanmj 6 jaren geleden
bovenliggende
commit
bcb7bedb77

File diff suppressed because it is too large
+ 143 - 1037
src/dashoo.cn/frontend_animal/src/pages/equipment/_opera/manage_new.vue


+ 14 - 15
src/dashoo.cn/frontend_animal/src/pages/equipment/_opera/operation.vue

@@ -149,7 +149,7 @@
   export default {
     name: 'makerTemplatesEdit',
 
-    data() {
+    data () {
       var checkvalue = (rule, value, callback) => {
         if (!isNaN(parseFloat(value)) && !isNaN(value)) {
           callback()
@@ -251,7 +251,7 @@
         equipid: 0 // 柴新增,设备id
       }
     },
-    created() {
+    created () {
       this.remoteurl = process.env.imgserverhost
       let eid = this.$route.params.opera
       this.equipid = eid // 未进行变量优化
@@ -269,7 +269,7 @@
       }
     },
     methods: {
-      getbrand(brand) {
+      getbrand (brand) {
         // toggle loading
         let _this = this
         // request
@@ -293,7 +293,7 @@
             this.loading = false
           })
       },
-      getsensorsbyequid(equid) {
+      getsensorsbyequid (equid) {
         // toggle loading
         let _this = this
         // request
@@ -309,7 +309,7 @@
             console.error(err)
           })
       },
-      selectDModel(value) {
+      selectDModel (value) {
         // toggle loading
         let _this = this
         this.modeloptions = []
@@ -338,7 +338,7 @@
             this.loading = false
           })
       },
-      selectPhoto(value) {
+      selectPhoto (value) {
         let _this = this
         this.$axios.get('/equipment/getbydmodel/' + value, {})
           .then(res => {
@@ -379,7 +379,7 @@
                     break
                   case 24:
                     _this.formmodel.RowNum = '26'
-                    _this.formmodel.ColumnNum = '8'
+                    _this.formmodel.ColumnNum = '1'
                     _this.haveshelf = true
                     _this.showdchdcj = false
                     break
@@ -405,7 +405,7 @@
           })
       },
       // 全选框控制
-      handleCheckAllChange(val) {
+      handleCheckAllChange (val) {
         this.checkedsampetype = []
         if (val) {
           for (var i = 0; i < this.sampelist.length; i++) {
@@ -414,12 +414,12 @@
         }
         this.issampetypecheckedall = false
       },
-      handlecheckedsampetypeChange(value) {
+      handlecheckedsampetypeChange (value) {
         let checkedCount = value.length
         this.checkAll = checkedCount === this.sampelist.length
         this.issampetypecheckedall = checkedCount > 0 && checkedCount < this.sampelist.length
       },
-      getmodel(opera) {
+      getmodel (opera) {
         // toggle loading
         let _this = this
         // request
@@ -467,7 +467,7 @@
             this.loading = false
           })
       },
-      isesedshelf(opera) {
+      isesedshelf (opera) {
         // 是否有冻存架使用
         let _this = this
         // request
@@ -483,7 +483,7 @@
             this.loading = false
           })
       },
-      getType() {
+      getType () {
         let _this = this
         _this.$axios.get('/sampletype/list', {})
           .then(res => {
@@ -513,7 +513,7 @@
             }
           })
       },
-      savedata() {
+      savedata () {
         let _this = this
         this.$refs['deviceform'].validate((valid) => {
           if (valid) {
@@ -564,7 +564,7 @@
           }
         })
       },
-      goback() {
+      goback () {
         if (this.$route.query.size) {
           this.$router.push({
             name: this.$route.query.pname,
@@ -579,7 +579,6 @@
       }
     }
   }
-
 </script>
 <style type="text/css">
   .deviceaddsamptype {

+ 28 - 22
src/dashoo.cn/frontend_animal/src/pages/equipment/index.vue

@@ -42,8 +42,8 @@
                 <p class="devplab" style="height:17px;overflow:hidden;white-space:nowrap;" :title="v.Equipment.Brand">品牌:{{v.Equipment.Brand}}</p>
                 <p class="devplab" style="height:17px;overflow:hidden;white-space:nowrap;" :title="v.Equipment.ModelVersion">型号:{{v.Equipment.ModelVersion}}</p>
                 <p class="devplab">样本的数量:{{v.SampleCount}}</p>
-                <p class="devplab">冻存架数量:{{v.Equipment.ModelVersion === "Cryobiobank13K_NewModel" ? 42 : (v.Equipment.ModelVersion === "RCB600" ? 126 : v.ShelfCount)}}</p>
-                <p class="devplab">冻存盒数量:{{v.Equipment.ModelVersion === "Cryobiobank13K_NewModel" ? 546 : (v.Equipment.ModelVersion === "RCB600" ? 1208 : v.BoxCount)}}</p>
+                <p class="devplab">冻存架数量:{{v.Equipment.ModelVersion === "Cryobiobank13K_NewModel" ? 42  : v.ShelfCount}}</p>
+                <p class="devplab">冻存盒数量:{{v.Equipment.ModelVersion === "Cryobiobank13K_NewModel" ? 546 : v.BoxCount}}</p>
               </el-col>
               <el-col :span="9">
                 <router-link :to="'/equipment/' + v.Equipment.Id + '/manage_new?name=' + v.Equipment.Name + '&pname=equipment&size='+size+'&currentPage='+currentPage">
@@ -94,7 +94,7 @@
   export default {
     name: 'equipmanage',
 
-    data() {
+    data () {
       return {
         remoteurl: '',
         isnodata: false,
@@ -108,7 +108,7 @@
         downloading: true
       }
     },
-    created() {
+    created () {
       this.remoteurl = process.env.imgserverhost
       if (this.$route.query.size && this.$route.query.currentPage) {
         this.size = parseInt(this.$route.query.size)
@@ -118,7 +118,7 @@
       this.initData()
     },
     methods: {
-      initData() {
+      initData () {
         let _this = this
         const params = {
           _currentPage: this.currentPage,
@@ -126,11 +126,12 @@
           searchkey: this.keyword
         }
         this.$axios.get('/equipment/list', {
-            params
-          })
+          params
+        })
           .then(res => {
             _this.downloading = false
             _this.list = res.data.items
+            // console.log(111, _this.list)
             if (_this.list === null || _this.list.length === 0) {
               _this.isnodata = true
             } else {
@@ -144,41 +145,46 @@
             _this.downloading = false
           })
       },
-      loadsensordata(code, i, j) {
+      loadsensordata (code, i, j) {
         let _this = this
         return _this.$axios.get('/channels/datavalue/' + code, null)
           .then(res => {
             _this.list[i].SensorData[j].Temperature = res.data.Temp + '  ℃'
           })
       },
-      loadsensordataall() {
-        for (let i = 0; i < this.list.length; i++) {
-          if (this.list[i].SensorData && this.list[i].SensorData.length > 0) {
-            for (let j = 0; j < this.list[i].SensorData.length; j++) {
-              this.loadsensordata(this.list[i].SensorData[j].SensorNo, i, j)
+      loadsensordataall () {
+        // console.log(222, this.list)
+        if (this.list === null || this.list.length === 0) {
+  
+        } else {
+          for (let i = 0; i < this.list.length; i++) {
+            if (this.list[i].SensorData && this.list[i].SensorData.length > 0) {
+              for (let j = 0; j < this.list[i].SensorData.length; j++) {
+                this.loadsensordata(this.list[i].SensorData[j].SensorNo, i, j)
+              }
             }
           }
         }
       },
-      handleSizeChange(value) {
+      handleSizeChange (value) {
         this.size = value
         this.currentPage = 1
         this.initData()
       },
-      handleCurrentChange(value) {
+      handleCurrentChange (value) {
         this.currentPage = value
         this.initData()
       },
-      seachdata() {
+      seachdata () {
         this.currentPage = 1
         this.initData()
       },
-      toeditdevice(opera) {
+      toeditdevice (opera) {
         this.$router.push({
           path: '/equipment/' + opera + '/operation?pname=equipment&size=' + this.size + '&currentPage=' + this.currentPage
         })
       },
-      deletedata(val, name) {
+      deletedata (val, name) {
         let _this = this
         _this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
           confirmButtonText: '确定',
@@ -207,13 +213,14 @@
             })
         }).catch(() => {})
       },
-      copy(val, code) {
+      copy (val, code) {
         let _this = this
         _this.$confirm('确认复制此设备所有数据吗, 是否继续?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
+          console.log(333, code.length)
           if (code.length >= 40) {
             this.$message({
               type: 'warning',
@@ -245,18 +252,17 @@
         }).catch(() => {})
       },
 
-      searchCommand(command) {
+      searchCommand (command) {
         if (command == 'clear') {
           this.clearSearch()
         }
       },
-      clearSearch(){
+      clearSearch () {
         this.keyword = ''
         this.seachdata()
       }
     }
   }
-
 </script>
 
 <style>

Some files were not shown because too many files changed in this diff