shihang %!s(int64=6) %!d(string=hai) anos
pai
achega
55a69ba3e9

+ 73 - 82
src/dashoo.cn/backend/api/controllers/equipment/equipment.go

@@ -11,7 +11,8 @@ import (
 	"dashoo.cn/backend/api/business/currboxcapacity"
 	"dashoo.cn/backend/api/business/equipment"
 	"dashoo.cn/backend/api/business/lastordernum"
-	"dashoo.cn/backend/api/business/role"
+	"github.com/tealeg/xlsx"
+
 	"dashoo.cn/backend/api/business/samplesinfo"
 	"dashoo.cn/backend/api/business/shelfset"
 	. "dashoo.cn/backend/api/controllers"
@@ -132,28 +133,6 @@ func (this *EquipmentController) List() {
 	this.ServeJSON()
 }
 
-// @Title 容器列表
-// @Description 容器列表所有容器数据
-// @Success 200 {object} business.device.DeviceChannels
-// @router /equipalllist [get]
-func (this *EquipmentController) EquipAllList() {
-	svc := equipment.GetEquipmentService(utils.DBE)
-	svcrole := role.GetRoleService(utils.DBE)
-	roleids := svcrole.GetRoleidsByuid(utils.ToStr(this.User.Id))
-	where := " a.AccCode = '" + this.User.AccCode + "'"
-	where = where + " and (a.CreateUserId=" + utils.ToStr(this.User.Id) + " or a.Id in (select EquipmentId Id FROM Base_RoleEquipment where RoleId in (" + strings.Join(roleids, ",") + ")))"
-	Name := this.GetString("Name")
-	if Name != "" {
-		where = where + " and Name like '%" + Name + "%' "
-	}
-	total, list := svc.GetEquipmenViewtList(0, 0, "a.Id desc", where)
-	var datainfo DataInfo
-	datainfo.Items = list
-	datainfo.CurrentItemCount = total
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
-}
-
 // @Title 名字id列表
 // @Description 获取设备的名字与id列表
 // @Success 200 {object} business.device.DeviceChannels
@@ -700,14 +679,14 @@ func (this *EquipmentController) AddEquipment() {
 		num_lastdata_box, _ := utils.StrTo(lastdata_box[1:]).Int64()
 		for i := 1; i <= equip.RowNum; i++ {
 			for j := 1; j <= equip.ColumnNum; j++ {
-				if i == 2 || i == 5{	//其他为大型格10x10冻存盒
+				if i == 2 || i == 5 { //其他为大型格10x10冻存盒
 					box_x_int = 10
 					box_y_int = 10
 				} else {
-					if j == 1|| j == 2 || j == 3 || j == 4 {	//第1,2,3,4个为小型格5x5冻存盒
+					if j == 1 || j == 2 || j == 3 || j == 4 { //第1,2,3,4个为小型格5x5冻存盒
 						box_x_int = 5
 						box_y_int = 5
-					} else {	//其他为大型格10x10冻存盒
+					} else { //其他为大型格10x10冻存盒
 						box_x_int = 10
 						box_y_int = 10
 					}
@@ -1160,59 +1139,71 @@ func (this *EquipmentController) GetEquipmentByOrganId() {
 	this.ServeJSON()
 }
 
-// @Title 样本库获取容器列表
-// @Description BioBank获取设备的名字与id、层数列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /equipmentlist [get]
-//func (this *EquipmentController) NameIdRowList() {
-//	svc := equipment.GetEquipmentService(utils.DBE)
-//	svcrole := role.GetRoleService(utils.DBE)
-//	roleids := svcrole.GetRoleidsByuid(utils.ToStr(this.User.Id))
-//	where := " a.AccCode = '" + this.User.AccCode + "'"
-//	where = where + " and (a.CreateUserId=" + utils.ToStr(this.User.Id) + " or a.Id in (select EquipmentId Id FROM Base_RoleEquipment where RoleId in (" + strings.Join(roleids, ",") + ")))"
-//	var list []string
-//	_, entities := svc.GetEquipmenViewtList(0, 0, "a.Id desc", where)
-//	for i := 0; i < len(entities); i++ {
-//		list = append(list, entities[i].Name)
-//		list = append(list, utils.ToStr(entities[i].Id))
-//		list = append(list, utils.ToStr(entities[i].RowNum))
-//		list = append(list, utils.ToStr(entities[i].ColumnNum))
-//		list = append(list, utils.ToStr(entities[i].DItem))
-//	}
-//	var datainfo DataInfo
-//	datainfo.Items = list
-//	this.Data["json"] = &datainfo
-//	this.ServeJSON()
-//}
-
-// @Title 样本库获取Shelf列表
-// @Description BioBank获取设备的名字与id、层数列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /shelflist [get]
-//func (this *EquipmentController) Shelflist() {
-//	EquipmentId := this.GetString("EquipmentId")
-//	var list []shelfset.Shelf
-//	svc := equipment.GetEquipmentService(utils.DBE)
-//	where := " EquipmentId ='" + EquipmentId + "'"
-//	svc.GetEntitysByWhere(ShelfName, where, &list)
-//	var datainfo DataInfo
-//	datainfo.Items = list
-//	this.Data["json"] = &datainfo
-//	this.ServeJSON()
-//}
-
-// @Title 样本库获取Box列表
-// @Description BioBank获取设备的名字与id、层数列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /boxlist [get]
-//func (this *EquipmentController) Boxlist() {
-//	Shelf := this.GetString("Shelf")
-//	var list []shelfset.Box
-//	svc := equipment.GetEquipmentService(utils.DBE)
-//	where := " ShelfId ='" + Shelf + "'"
-//	svc.GetEntitysByWhere(BoxName, where, &list)
-//	var datainfo DataInfo
-//	datainfo.Items = list
-//	this.Data["json"] = &datainfo
-//	this.ServeJSON()
-//}
+// @Title get 容器导出
+// @Description get SampleType by token
+// @Success 200 {object} sampletype.SampleType
+// @router /exportexcel [get]
+func (this *EquipmentController) ListToExcel() {
+	var title []string
+	titlestring := "容器名称,容器品牌,容器型号,层数,列数,宽度,深度,高度,冻存架数量,冻存盒数量,样本数量"
+	title = strings.Split(titlestring, ",")
+	svc := equipment.GetEquipmentService(utils.DBE)
+	svcPermission := permission.GetPermissionService(utils.DBE)
+
+	eids := svcPermission.GetEquipmentIdById(utils.ToStr(this.User.Id))
+	where := " a.AccCode = '" + this.User.AccCode + "'"
+	if eids != "" {
+		where = where + " and (a.CreateUserId= " + utils.ToStr(this.User.Id) + " or a.Id in (" + eids + "))"
+	} else {
+		where = where + "and a.CreateUserId= " + utils.ToStr(this.User.Id)
+	}
+
+	_, list := svc.GetEquipmenViewtList(1, 500, "a.Id desc", where)
+
+	var datas []EquipmentInfo
+	for i := 0; i < len(list); i++ {
+		var equipmentsinfo EquipmentInfo
+		equipmentsinfo.Equipment = list[i]
+		//样本总数
+		svcsample := samplesinfo.GetSamplesInfoService(utils.DBE)
+		tblsample := this.User.AccCode + SamplesDetailtbName
+		wheresample := " IState=1 and DeletionStateCode=0 and EquipmentId = " + utils.ToStr(list[i].Id)
+		samplenum := svcsample.GetSampleOwnCount(tblsample, wheresample)
+		equipmentsinfo.SampleCount = samplenum
+		//冻存架总数
+		whereshelf := " AccCode='" + this.User.AccCode + "' and EquipmentId = " + utils.ToStr(list[i].Id)
+		svcshelf := shelfset.GetshelfsetService(utils.DBE)
+		equipmentsinfo.ShelfCount = svcshelf.GetShelfCount(whereshelf)
+		//冻存盒总数
+		equipmentsinfo.BoxCount = svcshelf.GetBoxCount(whereshelf)
+
+		datas = append(datas, equipmentsinfo)
+	}
+
+	f := xlsx.NewFile()
+	this.DaySaveXlsxExport("容器导出信息", title, datas, f)
+
+	SaveDirectory("static/file/excel/report/" + this.GetAccode())
+	f.Save("static/file/excel/report/" + this.GetAccode() + "/" + utils.TimeFormat(time.Now(), "200612") + "容器导出信息.xlsx")
+	this.Ctx.WriteString("/static/file/excel/report/" + this.GetAccode() + "/" + utils.TimeFormat(time.Now(), "200612") + "容器导出信息.xlsx")
+}
+func (this *EquipmentController) DaySaveXlsxExport(name string, title []string, datas []EquipmentInfo, f *xlsx.File) {
+
+	sheet, _ := f.AddSheet(name)
+	rowhead := sheet.AddRow()
+	rowhead.WriteSlice(&title, -1)
+
+	for _, v := range datas {
+		datastring := v.Equipment.Name + "," + v.Equipment.Brand + "," + v.Equipment.ModelVersion + "," + strconv.Itoa(v.Equipment.RowNum) + "," + strconv.Itoa(v.Equipment.ColumnNum) + "," + strconv.FormatFloat(float64(v.Equipment.Width), 'f', 6, 64) + "," + strconv.FormatFloat(float64(v.Equipment.Depth), 'f', 6, 64) + "," + strconv.FormatFloat(float64(v.Equipment.Height), 'f', 6, 64) + "," + strconv.FormatInt(v.ShelfCount, 10) + "," + strconv.FormatInt(v.BoxCount, 10) + "," + strconv.Itoa(v.SampleCount)
+		cellname := strings.Split(datastring, ",")
+		row := sheet.AddRow()
+		row.WriteSlice(&cellname, -1)
+	}
+	sheet.Cols[0].Width = 20
+	sheet.Cols[1].Width = 20
+	sheet.Cols[2].Width = 20
+	sheet.Cols[3].Width = 20
+	sheet.Cols[4].Width = 15
+	sheet.Cols[8].Width = 20
+	sheet.Cols[9].Width = 20
+}

+ 10 - 44
src/dashoo.cn/frontend_animal/src/pages/equipment/_opera/manage_new.vue

@@ -265,28 +265,21 @@
                     <label><strong>备注信息 :</strong> {{ sampleForm.Remark }} </label>
                   </el-col>
                   <el-col :span="24">
-                    <el-form-item label="附件上传:" style="font-weight:bolder">
-                      <el-upload style="margin-top: 10px;" action="" ref="refuploadattach" multiple
-                        :http-request="uploadrequest" class="attach-uploader" :show-file-list="true"
-                        :before-upload="beforeAvatarUpload">
-                        <i class="el-icon-plus attach-uploader-icon"></i>
-                      </el-upload>
+                    <el-form-item label="附件列表:" style="font-weight:bolder">
+                      <el-row>
+                        <el-col :span="6" v-for="item in achmentlist" :key="item">
+                          <a @click="clickachment(item.Host, item.FileId)">{{item.FileName}}</a>
+                        </el-col>
+                      </el-row>
                     </el-form-item>
                   </el-col>
                   <el-col :span="24">
                     <label><strong>附件说明 :</strong> {{ sampleForm.uploadedremark }} </label>
-                    <el-row>
-                      <el-col :span="6" v-for="item in achmentlist" :key="item">
-                        <a @click="clickachment(item.Host, item.FileId)">{{item.FileName}}</a></el-col>
-                    </el-row>
                   </el-col>
                 </el-row>
 
                 <el-tabs tab-position="top" v-model="Tabs" v-show="extendList.length > 0">
                   <el-tab-pane :label="groupname" :name="groupname" :key="groupname" v-for="groupname in groupnameList">
-                    <!-- <div slot="header">
-                      <i class="icon icon-paragraph-justify"> 样本扩展 / {{groupname}}</i>
-                    </div> -->
                     <div class="sampleInfo">
                       <el-row>
                         <template v-for="(item, index) in extendList">
@@ -423,10 +416,10 @@
           </el-col>
           <el-col :span="16">
             <el-form-item label="附件上传">
-              <el-upload style="margin-top: 10px;" action="" ref="refuploadattach" multiple
-                :http-request="uploadrequest" class="attach-uploader" :show-file-list="true"
-                :before-upload="beforeAvatarUpload">
+              <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
+                :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
                 <i class="el-icon-plus attach-uploader-icon"></i>
+                <div slot="tip" class="el-upload__tip">大小为512KB-50MB</div>
               </el-upload>
             </el-form-item>
           </el-col>
@@ -2957,7 +2950,7 @@
       beforeAvatarUpload(file) {
         let isLt50m = file.size / 1024 / 1024 / 50 < 1
         if (!isLt50m) {
-          this.$message.error('上传打印模板大小不能超过 50MB!')
+          this.$message.error('上传文件大小不能超过 5MB!')
           return false
         }
         return true
@@ -3948,33 +3941,6 @@
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
-      uploadrequest(option) {
-        let _this = this
-        axios.post(process.env.upfilehost, {})
-          .then(function (res) {
-            if (res.data && res.data.fid && res.data.fid !== '') {
-              option.action = `http://${res.data.url}/${res.data.fid}`
-              _this.uploadimg = {
-                uid: option.file.uid,
-                url: res.data.publicUrl,
-                fid: res.data.fid
-              }
-              uploadajax(option)
-            } else {
-              _this.$message({
-                type: 'warning',
-                message: '未上传成功!请刷新界面重新上传!'
-              })
-            }
-          })
-          .catch(function (error) {
-            console.log(error)
-            _this.$message({
-              type: 'warning',
-              message: '未上传成功!请重新上传!'
-            })
-          })
-      },
       handleAvatarSuccess(res, file) {
         for (var i = 0; i < this.animalextends.length; i++) {
           if (this.animalextends[i].Id == this.extendId) {

+ 4 - 3
src/dashoo.cn/frontend_web/nuxt.config.js

@@ -159,8 +159,8 @@ module.exports = {
   },
 
   axios: {
-    // baseURL: '//localhost:9081/api/' // 本机开发使用
-    baseURL: '//47.92.238.200:9081/api/' // BioBank on ALi发布使用
+    baseURL: '//localhost:9081/api/' // 本机开发使用
+    // baseURL: '//47.92.238.200:9081/api/' // BioBank on ALi发布使用
     // baseURL: '//188.188.30.89:9081/api/' //临沂使用
     // baseURL: '//api09.labsop.cn/api/'
     // baseURL: '//192.168.0.211:10091/api/' // 花生所系统
@@ -175,7 +175,8 @@ module.exports = {
   env: {
     appclient: 'biobank', //因顿LIMS:lims,样本库:biobank,细胞制备:cellbank,样本搜索判断,登录跳转判断
 
-    imgserverhost: 'http://47.92.238.200:9081', // BioBank服务地址,图片上传文件
+    imgserverhost: 'http://localhost:9081', // BioBank服务地址,图片上传文件
+    //imgserverhost: 'http://47.92.238.200:9081', // BioBank服务地址,图片上传文件
     upfilehost: 'http://weed1.labsop.cn:9333/dir/assign', // 附件上传
 
     //imgserverhost: 'http://188.188.30.89:9081', // 临沂服务地址,图片上传文件

+ 36 - 28
src/dashoo.cn/frontend_web/src/layouts/default.vue

@@ -1,48 +1,56 @@
-
 <template>
-	<div class="wrapper">
-	<headbar></headbar>
-	<section class="main">
+  <div class="wrapper">
+    <headbar></headbar>
+    <section class="main">
       <sidebar></sidebar>
       <main class="content">
         <nuxt class="inner" style="height: calc(100vh - 90px);"></nuxt>
       </main>
+
     </section>
     <div>
       <img src="/img/cryobiobank97K.png" style="width: 300px; height: 300px;display: none;" id="cryobiobank97Kimg">
-      <img src="/img/cryobiobank97K_bloodbag.png" style="width: 300px; height: 300px;display: none;" id="cryobiobank97K_bloodbagimg">
+      <img src="/img/cryobiobank97K_bloodbag.png" style="width: 300px; height: 300px;display: none;"
+        id="cryobiobank97K_bloodbagimg">
+      <img src="/img/cryobiobank97K_newmodel.jpg" style="width: 300px; height: 300px;display: none;"
+           id="cryobiobank97K_newmodelimg">
       <div id="divmenudiv" onmouseover="onoverdivmenu()" onmouseout="onoutdivmenu()" class="menudiv">
         <div class="menutext" style="display:none;" id="divmenutext">
         </div>
       </div>
     </div>
-	</div>
+  </div>
 </template>
 3
 <script>
-import { mapGetters } from 'vuex'
-// import Navbar from '@/components/Navbar'
-import Headbar from '@/components/Headbar'
-import Sidebar from '@/components/Sidebar'
+  import {
+    mapGetters
+  } from 'vuex'
+  // import Navbar from '@/components/Navbar'
+  import Headbar from '@/components/Headbar'
+  import Sidebar from '@/components/Sidebar'
 
-export default {
-  components: {
-    Headbar,
-		Sidebar
-  },
-  computed: {
-    ...mapGetters(['isMenuHidden'])
-  },
-  mounted() {
-    let _this = this
-    window.clickmenulink = function(val) {
-      _this.clickmenulink(val)
-    }
-  },
-  methods: {
-    clickmenulink(val) {
-      this.$router.push({path: val})
+  export default {
+    components: {
+      Headbar,
+      Sidebar
+    },
+    computed: {
+      ...mapGetters(['isMenuHidden'])
+    },
+    mounted() {
+      let _this = this
+      window.clickmenulink = function (val) {
+        _this.clickmenulink(val)
+      }
+    },
+    methods: {
+      clickmenulink(val) {
+        this.$router.push({
+          path: val
+        })
+      }
     }
   }
-}
+
 </script>

+ 0 - 2
src/dashoo.cn/frontend_web/src/pages/biobank/sampleRK/_opera/operation.vue

@@ -465,10 +465,8 @@
       // 获取容器列表
       getEquiplist() {
         let _this = this
-        // request
         _this.$axios.get('/equipment/elist', {})
           .then(res => {
-            // response
             for (var i = 0; i < res.data.items.length / 2; i++) {
               _this.equipmentList.push({
                 label: res.data.items[2 * i],

+ 462 - 98
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/manage_new.vue

@@ -265,28 +265,25 @@
                     <label><strong>备注信息 :</strong> {{ sampleForm.Remark }} </label>
                   </el-col>
                   <el-col :span="24">
-                    <el-form-item label="附件上传:" style="font-weight:bolder">
-                      <el-upload style="margin-top: 10px;" action="" ref="refuploadattach" multiple
-                        :http-request="uploadrequest" class="attach-uploader" :show-file-list="true"
-                        :before-upload="beforeAvatarUpload">
-                        <i class="el-icon-plus attach-uploader-icon"></i>
-                      </el-upload>
+                    <el-form-item label="附件列表:" style="font-weight:bolder">
+                      <el-row>
+                        <el-col :span="6" v-for="item in achmentlist" :key="item">
+                          <a @click="clickachment(item.Host, item.FileId)">{{item.FileName}}</a>
+                        </el-col>
+                      </el-row>
                     </el-form-item>
                   </el-col>
                   <el-col :span="24">
                     <label><strong>附件说明 :</strong> {{ sampleForm.uploadedremark }} </label>
-                    <el-row>
+                    <!-- <el-row>
                       <el-col :span="6" v-for="item in achmentlist" :key="item">
                         <a @click="clickachment(item.Host, item.FileId)">{{item.FileName}}</a></el-col>
-                    </el-row>
+                    </el-row> -->
                   </el-col>
                 </el-row>
 
                 <el-tabs tab-position="top" v-model="Tabs" v-show="extendList.length > 0">
                   <el-tab-pane :label="groupname" :name="groupname" :key="groupname" v-for="groupname in groupnameList">
-                    <!-- <div slot="header">
-                      <i class="icon icon-paragraph-justify"> 样本扩展 / {{groupname}}</i>
-                    </div> -->
                     <div class="sampleInfo">
                       <el-row>
                         <template v-for="(item, index) in extendList">
@@ -410,7 +407,7 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="16">
+          <!-- <el-col :span="16">
             <el-form-item label="附件上传">
               <el-upload style="margin-top: 10px;" action="" ref="refuploadattach" multiple
                 :http-request="uploadrequest" class="attach-uploader" :show-file-list="true"
@@ -418,6 +415,15 @@
                 <i class="el-icon-plus attach-uploader-icon"></i>
               </el-upload>
             </el-form-item>
+          </el-col> -->
+          <el-col :span="16">
+            <el-form-item label="附件上传">
+              <el-upload multiple style="margin-top: 10px;" action="" ref="refuploadattach"
+                :http-request="uploadrequest" class="attach-uploader" :before-upload="beforeAvatarUpload">
+                <i class="el-icon-plus attach-uploader-icon"></i>
+                <div slot="tip" class="el-upload__tip">大小为512KB-50MB</div>
+              </el-upload>
+            </el-form-item>
           </el-col>
           <el-col :span="16">
             <el-form-item>
@@ -2221,6 +2227,386 @@
             type: 2
           }
         ],
+        yedanguanrongqiarr_newmodel: [ // 21:贝尔最新型号液氮罐,type:1规则图形,2不规则图形
+          {
+            XStation: 1,
+            YStation: 1,
+            x: 135,
+            y: 35,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 1,
+            x: 170,
+            y: 30,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 1,
+            x: 198,
+            y: 30,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 1,
+            x: 77,
+            y: 97,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 5,
+            YStation: 1,
+            x: 110,
+            y: 65,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 6,
+            YStation: 1,
+            x: 168,
+            y: 65,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 2,
+            x: 50,
+            y: 130,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 2,
+            x: 106,
+            y: 130,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 2,
+            x: 166,
+            y: 130,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 2,
+            x: 30,
+            y: 195,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 5,
+            YStation: 2,
+            x: 86,
+            y: 195,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 6,
+            YStation: 2,
+            x: 150,
+            y: 195,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 7,
+            YStation: 2,
+            x: 50,
+            y: 258,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 8,
+            YStation: 2,
+            x: 106,
+            y: 258,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 9,
+            YStation: 2,
+            x: 166,
+            y: 258,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 3,
+            x: 78,
+            y: 321,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 3,
+            x: 136,
+            y: 384,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 3,
+            x: 169,
+            y: 384,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 3,
+            x: 200,
+            y: 384,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 5,
+            YStation: 3,
+            x: 110,
+            y: 321,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 6,
+            YStation: 3,
+            x: 170,
+            y: 321,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 4,
+            x: 348,
+            y: 321,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 4,
+            x: 230,
+            y: 384,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 4,
+            x: 260,
+            y: 384,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 4,
+            x: 289,
+            y: 384,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 5,
+            YStation: 4,
+            x: 230,
+            y: 321,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 6,
+            YStation: 4,
+            x: 289,
+            y: 321,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 5,
+            x: 230,
+            y: 130,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 5,
+            x: 290,
+            y: 130,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 5,
+            x: 348,
+            y: 130,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 5,
+            x: 250,
+            y: 195,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 5,
+            YStation: 5,
+            x: 310,
+            y: 195,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 6,
+            YStation: 5,
+            x: 368,
+            y: 195,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 7,
+            YStation: 5,
+            x: 231,
+            y: 258,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 8,
+            YStation: 5,
+            x: 290,
+            y: 258,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 9,
+            YStation: 5,
+            x: 350,
+            y: 258,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 1,
+            YStation: 6,
+            x: 232,
+            y: 30,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 2,
+            YStation: 6,
+            x: 260,
+            y: 30,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 3,
+            YStation: 6,
+            x: 290,
+            y: 35,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 4,
+            YStation: 6,
+            x: 348,
+            y: 97,
+            width: 28,
+            height: 28,
+            type: 1
+          },
+          {
+            XStation: 5,
+            YStation: 6,
+            x: 230,
+            y: 65,
+            width: 56,
+            height: 56,
+            type: 1
+          },
+          {
+            XStation: 6,
+            YStation: 6,
+            x: 290,
+            y: 65,
+            width: 56,
+            height: 56,
+            type: 1
+          }
+        ],
         waituploads: [], // 等待上传的附件列表
         downloadTemplates: [{
           Name: "默认模版"
@@ -2292,8 +2678,10 @@
               let yedanguandatarrtrmp = []
               if (_this.yedanguanitem === 20) {
                 yedanguandatarrtrmp = _this.yedanguanrongqiarr_13kbloodbag
-              } else {
+              } else if (_this.yedanguanitem === 19) {
                 yedanguandatarrtrmp = _this.yedanguanrongqiarr
+              } else {
+                yedanguandatarrtrmp = _this.yedanguanrongqiarr_newmodel
               }
               for (let i = 0; i < yedanguandatarrtrmp.length; i++) {
                 if ((yedanguandatarrtrmp[i].XStation + '') === stationarr[0] && (yedanguandatarrtrmp[i].YStation +
@@ -2328,11 +2716,16 @@
                 x: 211,
                 y: 107
               })
-            } else {
+            } else if (_this.yedanguanitem === 19) {
               _this.drawyedanguancavans({
                 x: 135,
                 y: 46
               })
+            } else if (_this.yedanguanitem === 21) {
+              _this.drawyedanguancavans({
+                x: 135,
+                y: 35
+              })
             }
           }
         }
@@ -2404,12 +2797,14 @@
               _this.showtsyedanguan = false
               _this.showcgshebei = true
               _this.fridgebottomimg = _this.filehost + '/static/img/sampletypeimg/bottomydg.png'
-            } else if (res.data && (res.data.DItem === 19 || res.data.DItem === 20)) {
+            } else if (res.data && (res.data.DItem === 19 || res.data.DItem === 20 || res.data.DItem === 21)) {
               _this.yedanguanitem = res.data.DItem
               if (res.data.DItem === 19) {
                 _this.yeshuyedanguanimgid = 'cryobiobank97Kimg'
-              } else {
+              } else if (res.data.DItem === 20) {
                 _this.yeshuyedanguanimgid = 'cryobiobank97K_bloodbagimg'
+              } else {
+                _this.yeshuyedanguanimgid = 'cryobiobank97K_newmodelimg'
               }
               // 加载特殊液氮罐
               _this.drawyedanguancanvasbgimg()
@@ -2444,13 +2839,15 @@
         let yedanguandatarrtrmp = []
         if (_this.yedanguanitem === 20) {
           yedanguandatarrtrmp = _this.yedanguanrongqiarr_13kbloodbag
-        } else {
+        } else if (_this.yedanguanitem === 19){
           yedanguandatarrtrmp = _this.yedanguanrongqiarr
+        } else {
+          yedanguandatarrtrmp = _this.yedanguanrongqiarr_newmodel
         }
         yedanguandatarrtrmp.forEach(function (v) {
           // 绘制颜色快
           if (v.type === 1) { // 标准四边形
-            _this.yedanguanctx.strokeStyle = 'white'
+            _this.yedanguanctx.fillStyle = 'white'
             _this.yedanguanctx.beginPath()
             _this.yedanguanctx.rect(v.x, v.y, v.width, v.height)
             _this.yedanguanctx.stroke()
@@ -2545,7 +2942,6 @@
             }
           })
           .catch(function (error) {
-            console.log(error)
             _this.$message({
               type: 'warning',
               message: '未上传成功!请重新上传!'
@@ -2555,7 +2951,7 @@
       beforeAvatarUpload(file) {
         let isLt50m = file.size / 1024 / 1024 / 50 < 1
         if (!isLt50m) {
-          this.$message.error('上传打印模板大小不能超过 50MB!')
+          this.$message.error('上传文件大小不能超过 5MB!')
           return false
         }
         return true
@@ -2604,8 +3000,8 @@
             _this.boxSample = res.data.Boxsample
             _this.TableHeight = _this.selectedBox.RowNum
             _this.TableWidth = _this.selectedBox.ColumnNum
-            for (var i = 0 ; i < this.boxSample.length; i ++){
-              if (this.boxSample[i].Position == this.ytable + ';' + this.xtable){
+            for (var i = 0; i < this.boxSample.length; i++) {
+              if (this.boxSample[i].Position == this.ytable + ';' + this.xtable) {
                 this.tableclk(this.boxSample[i], this.xtable, this.ytable)
               }
             }
@@ -2656,6 +3052,7 @@
           this.extendList = []
           if (this.Apply_flag == true) {
             this.sampleTitle = '新增样本'
+           // this.$refs.refuploadattach.clearFiles()
             this.sampleInfoDialog = true
           }
         }
@@ -2810,13 +3207,11 @@
           samplecode: samplecode,
           barcode: barcode
         }
-        console.log("111111111111111111111111",params)
         this.$axios.get('/sampleoperation/getattachmentbysamplecode', {
             params
           })
           .then(res => {
             _this.achmentlist = res.data
-            console.log("2222222222222222222222222222",res.data)
           }).catch(() => {})
       },
       clickachment(host, fid) {
@@ -3033,7 +3428,6 @@
                 }
                 _this.GroupName = tempOfficers.join(',');
               }
-              console.log("wwwwwwwwwwwwwwwwwww",params)
               _this.$axios.post('/sampleoperation?groupid=' + _this.GroupId + '&groupname=' + _this.GroupName,
                   params)
                 .then(res => {
@@ -3043,56 +3437,55 @@
                       message: res.data.message
                     })
                     _this.shelfs = _this.samplelist[0]
-                    _this.handleclk(_this.xbox-1, _this.ybox-1, _this.xshelf, _this.yshelf)
-                   
+                    _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
+
+                    // 清空上传附件
+                    // _this.$refs.refuploadattach.clearFiles()
+                    // 获取附件信息
+                    _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
+                    //清空缓存数据
+                    _this.batchstorages = []
+                    store.set('batchstorages', _this.batchstorages)
+                  } else if (res.data.code === 10 || res.data.code === 11) { // 保存成功后打印
+                    this.$message({
+                      type: 'success',
+                      message: res.data.message
+                    })
+                    _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
+                    // 自动打印
+                    if (res.data.item.Printmsg !== '') {
+                      let printparams = res.data.item.Printmsg.split(',')
+                      if (printparams.length === 3 && printparams[0] !== '' && printparams[1] !== '' &&
+                        printparams[2] !== '') {
+                        window.PrintReport(printparams[1], `samples,${printparams[2]},${printparams[0]}`)
+                      }
+                    }
+                    // 清空上传附件
+                    // _this.$refs.refuploadattach.clearFiles()
+                    // 获取附件信息
+                    _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
+                    //清空缓存数据
+                    _this.batchstorages = []
+                    store.set('batchstorages', _this.batchstorages)
+                  } else if (res.data.code === 20) {
+                    this.$message({
+                      type: 'error',
+                      message: res.data.message
+                    })
+                    _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
                     // 清空上传附件
-                    _this.$refs.refuploadattach.clearFiles()
+                    //_this.$refs.refuploadattach.clearFiles()
                     // 获取附件信息
                     _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
                     //清空缓存数据
                     _this.batchstorages = []
                     store.set('batchstorages', _this.batchstorages)
+                  } else {
+                    this.$message({
+                      type: 'warning',
+                      message: res.data.message
+                    })
                   }
-                  //  else if (res.data.code === 10 || res.data.code === 11) { // 保存成功后打印
-                  //   this.$message({
-                  //     type: 'success',
-                  //     message: res.data.message
-                  //   })
-                  //   _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
-                  //   // 自动打印
-                  //   if (res.data.item.Printmsg !== '') {
-                  //     let printparams = res.data.item.Printmsg.split(',')
-                  //     if (printparams.length === 3 && printparams[0] !== '' && printparams[1] !== '' &&
-                  //       printparams[2] !== '') {
-                  //       window.PrintReport(printparams[1], `samples,${printparams[2]},${printparams[0]}`)
-                  //     }
-                  //   }
-                  //   // 清空上传附件
-                  //   _this.$refs.refuploadattach.clearFiles()
-                  //   // 获取附件信息
-                  //   _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
-                  //   //清空缓存数据
-                  //   _this.batchstorages = []
-                  //   store.set('batchstorages', _this.batchstorages)
-                  // } else if (res.data.code === 20) {
-                  //   this.$message({
-                  //     type: 'error',
-                  //     message: res.data.message
-                  //   })
-                  //   _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
-                  //   // 清空上传附件
-                  //   _this.$refs.refuploadattach.clearFiles()
-                  //   // 获取附件信息
-                  //   _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
-                  //   //清空缓存数据
-                  //   _this.batchstorages = []
-                  //   store.set('batchstorages', _this.batchstorages)
-                  // } else {
-                  //   this.$message({
-                  //     type: 'warning',
-                  //     message: res.data.message
-                  //   })
-                  // }
                   _this.sampleInfoDialog = false
                 })
                 .catch(err => {
@@ -3144,7 +3537,7 @@
                 message: res.data.message
               })
               // 清空上传附件
-              _this.$refs.refuploadattach.clearFiles()
+              // _this.$refs.refuploadattach.clearFiles()
               // 获取附件信息
               _this.getattachment(_this.sampleForm.BarCode, _this.sampleForm.SampleCode)
             } else {
@@ -3313,8 +3706,6 @@
           // 清空特有扩展
           this.sampleForm.extendList = []
           this.$refs['sampleForm'].resetFields()
-          // 清空上传数据
-          this.$refs.refuploadattach.clearFiles()
           this.achmentlist = []
         }
       },
@@ -3545,33 +3936,6 @@
         this.dialogImageUrl = file.url;
         this.dialogVisible = true;
       },
-      uploadrequest(option) {
-        let _this = this
-        axios.post(process.env.upfilehost, {})
-          .then(function (res) {
-            if (res.data && res.data.fid && res.data.fid !== '') {
-              option.action = `http://${res.data.url}/${res.data.fid}`
-              _this.uploadimg = {
-                uid: option.file.uid,
-                url: res.data.publicUrl,
-                fid: res.data.fid
-              }
-              uploadajax(option)
-            } else {
-              _this.$message({
-                type: 'warning',
-                message: '未上传成功!请刷新界面重新上传!'
-              })
-            }
-          })
-          .catch(function (error) {
-            console.log(error)
-            _this.$message({
-              type: 'warning',
-              message: '未上传成功!请重新上传!'
-            })
-          })
-      },
       handleAvatarSuccess(res, file) {
         for (var i = 0; i < this.animalextends.length; i++) {
           if (this.animalextends[i].Id == this.extendId) {

+ 40 - 50
src/dashoo.cn/frontend_web/src/pages/report/equipment.vue

@@ -10,7 +10,8 @@
           <el-breadcrumb-item>容器统计</el-breadcrumb-item>
         </el-breadcrumb>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="initData(1)">导出</el-button>
+          <el-button type="primary" size="mini" style="margin-left:10px; margin-top: -4px;" @click="exportExcel()">导出
+          </el-button>
         </span>
         <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
           <el-form-item label="容器名称">
@@ -28,24 +29,17 @@
       </div>
 
       <el-table :data="list" bordertooltip-effect="dark" border height="calc(100vh - 230px)" style="width: 100%;">
-        <el-table-column label="容器名称" align="center" prop="Name"></el-table-column>
-        <el-table-column prop="Brand" align="center" label="容器品牌"></el-table-column>
-        <el-table-column prop="ModelVersion" align="center" label="容器型号"></el-table-column>
-        <el-table-column prop="RowNum" align="center" label="层数"></el-table-column>
-        <el-table-column prop="ColumnNum" align="center" label="列数"></el-table-column>
-        <el-table-column prop="Width" align="center" label="宽度"></el-table-column>
-        <el-table-column prop="Depth" align="center" label="深度"></el-table-column>
-        <el-table-column prop="Height" align="center" label="高度"></el-table-column>
-        <el-table-column prop="ProduceDate" sortable label="生产日期" align="center" width="130">
-          <template slot-scope="scope">
-            {{ jstimehandle(scope.row.ProduceDate)}}
-          </template>
-        </el-table-column>
-        <el-table-column prop="ValidityDate" sortable label="有效日期" align="center" width="130">
-          <template slot-scope="scope">
-            {{ jstimehandle(scope.row.ValidityDate)}}
-          </template>
-        </el-table-column>
+        <el-table-column prop="Equipment.Name" label="容器名称" align="center" min-width="90"></el-table-column>
+        <el-table-column prop="Equipment.Brand" align="center" label="容器品牌" min-width="80"></el-table-column>
+        <el-table-column prop="Equipment.ModelVersion" align="center" label="容器型号" min-width="160"></el-table-column>
+        <el-table-column prop="Equipment.RowNum" align="center" label="层数"></el-table-column>
+        <el-table-column prop="Equipment.ColumnNum" align="center" label="列数"></el-table-column>
+        <el-table-column prop="Equipment.Width" align="center" label="宽度"></el-table-column>
+        <el-table-column prop="Equipment.Depth" align="center" label="深度"></el-table-column>
+        <el-table-column prop="Equipment.Height" align="center" label="高度"></el-table-column>
+        <el-table-column prop="ShelfCount" align="center" label="冻存架数量"></el-table-column>
+        <el-table-column prop="BoxCount" align="center" label="冻存盒数量"></el-table-column>
+        <el-table-column prop="SampleCount" align="center" label="样本数量"></el-table-column>
       </el-table>
     </el-card>
   </div>
@@ -60,12 +54,13 @@
         searchform: {
           name: ''
         },
-        list: []
+        list: [],
+        filehost: ''
       }
     },
     created() {
-      // initial data
       this.initData(0)
+      this.filehost = process.env.imgserverhost
     },
     methods: {
       initData(val) {
@@ -73,43 +68,38 @@
         let params = {
           Name: _this.searchform.name
         }
-        // request
-        this.$axios.get('equipment/equipalllist', {
+        this.$axios.get('equipment/list', {
             params
           })
           .then(res => {
-            // response
-            if (val === 0) {
-              _this.list = res.data.items
-            } else {
-              if (res.data.code === 0) {
-                this.$message({
-                  type: 'success',
-                  message: '操作成功!'
-                })
-              }
-              window.location.href = 'http://' + res.data.message
-            }
-            // toggle loading
-            // _this.loading = false
-            // _this.currentItemCount = res.data.currentItemCount
+            _this.list = res.data.items
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
-      jstimehandle(val) {
-        if (val === '') {
-          return '----'
-        } else if (val === '0001-01-01T08:00:00+08:00') {
-          return '----'
-        } else if (val === '5000-01-01T23:59:59+08:00') {
-          return '永久'
-        } else {
-          val = val.replace('T', ' ')
-          return val.substring(0, 10)
-        }
+      exportExcel() {
+        let _this = this
+        _this.$confirm("此操作将导出所有数据, 是否继续?", "提示", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: 'info'
+        }).then(() => {
+          _this.exportloading = true
+          _this.$axios.get('/equipment/exportexcel', {})
+            .then(res => {
+              _this.exportloading = false
+              window.location = this.filehost + res.data
+            })
+            .catch(err => {
+              _this.$message({
+                type: 'warning',
+                message: '导出数据出错,请重新操作!'
+              })
+              _this.exportloading = false
+              console.error(err)
+            })
+        }).catch(() => {})
       },
       searchCommand(command) {
         if (command == 'search') {

BIN=BIN
src/dashoo.cn/frontend_web/src/static/img/cryobiobank97K_newmodel.jpg