|
|
@@ -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+'¤tPage='+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 + '¤tPage=' + 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>
|