Browse Source

设备树形结构

shihang 7 years ago
parent
commit
fd6246836a

+ 12 - 6
src/dashoo.cn/backend/api/conf/app.conf

@@ -7,8 +7,8 @@ copyrequestbody = true
 EnableDocs = true
 
 [server]
-apiurl=http://121.42.244.228:10015/v1
-dataapiurl=http://121.42.244.228:18010/v1
+apiurl=http://47.92.238.200:10015/v1
+dataapiurl=http://47.92.238.200:18010/v1
 orderurl=http://uid.labsop.cn:8182/worker/2
 
 #临沂
@@ -56,7 +56,13 @@ type=mysql
 
 #本地测试服务器
 name=casbin
-host=mydb01.cnbkzlqg5w7l.rds.cn-north-1.amazonaws.com.cn
-user=mydb01_user
-pwd=mydb01_user58717168
-domain=biobank
+host=47.92.238.200
+user=casbin_user
+pwd=xaBoDu3ehu2i
+domain=biobank
+
+#name=casbin
+#host=mydb01.cnbkzlqg5w7l.rds.cn-north-1.amazonaws.com.cn
+#user=mydb01_user
+#pwd=mydb01_user58717168
+#domain=biobank

+ 99 - 101
src/dashoo.cn/backend/api/controllers/equipment/shelfset.go

@@ -70,36 +70,8 @@ type BoxModel struct {
 	Boxyvalue  int    `json:"boxyvalue,omitempty"`  // 冻存盒y大小
 }
 
-// @Title 报警项目列表
-// @Description 报警项目列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /equipmentinfo/:eid [get]
-func (this *ShelfSetController) EquipmentInfo() {
-	eid := this.Ctx.Input.Param(":eid")
-	svc := currboxcapacity.GetCurrboxcapacityService(utils.DBE)
-	data := svc.GetCurrboxcapacityByid(eid)
-	fmt.Println("=========================datattatat:", data)
-	//	dataStyleScheme := svc.GetStyleScheme("1")
-	svcequipment := equipment.GetEquipmentService(utils.DBE)
-	equipmentdata := svcequipment.GetInfoById(eid)
-	map_list := make(map[string]string)
-	sample_type := sampletype.GetSampleTypeService(utils.DBE)
-	where := " AccCode='" + this.User.AccCode + "'"
-	sample_type_list := sample_type.ListSampleType(where)
-	for i := 0; i < len(sample_type_list); i++ {
-		map_list[utils.ToStr(sample_type_list[i].Id)] = sample_type_list[i].Photo
-	}
-	this.Data["entitySampleType"] = sample_type_list
-	this.Data["map_list"] = map_list
-	this.Data["equipmentdata"] = equipmentdata
-	this.Data["equipmentName"] = equipmentdata.Name
-	this.Data["IsLargeSpec"] = equipmentdata.IsLargeSpec
-	this.Data["json"] = &equipmentdata
-	this.ServeJSON()
-}
-
-// @Title 报警项目列表
-// @Description 报警项目列表
+// @Title 获取设备结构
+// @Description 获取设备结构
 // @Success 200 {object} business.device.DeviceChannels
 // @router /equipmentdraw/:eid [get]
 func (this *ShelfSetController) EquipmentDraw() {
@@ -120,76 +92,6 @@ func (this *ShelfSetController) EquipmentDraw() {
 	this.ServeJSON()
 }
 
-// @Title 报警项目列表
-// @Description 报警项目列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /boxdraw/:inputstr [get]
-func (this *ShelfSetController) BoxDraw() {
-	// 读取参数和初始服务
-	var boxdata BoxData
-	inputstr := this.Ctx.Input.Param(":inputstr")
-	serials := strings.Split(inputstr, ",")
-	id := serials[0]
-	x := serials[1]
-	y := serials[2]
-	x_box := serials[3]
-	y_box := serials[4]
-	svs := shelfset.GetshelfsetService(utils.DBE)
-	// 获取选中box
-	svc := currboxcapacity.GetCurrboxcapacityService(utils.DBE)
-	svc.GetBox(&boxdata.Boxshelf, id, x, y, x_box, y_box)
-	boxdata.Boxsample = nil
-	// 获取样本, where语句IState部分未经修改
-	if boxdata.Boxshelf.Id != 0 {
-		where := " IState in (1,5,10,99) and DeletionStateCode=0 and BoxId = " + utils.ToStr(boxdata.Boxshelf.Id)
-		svc1 := samplesinfo.GetSamplesInfoService(utils.DBE)
-		boxdata.Boxsample = svc1.QuerySampleList(this.User.AccCode, where)
-	}
-	// 获取冻存架
-	svs.GetEntityByEquipmentId(id, x, y, &boxdata.Shelfbox)
-	// 回传数据
-	this.Data["json"] = boxdata
-	this.ServeJSON()
-}
-
-// @Title 报警项目列表
-// @Description 报警项目列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /getorgan [get]
-func (this *ShelfSetController) GetOrgan() {
-	svo := sampleorgan.GetSampleOrganService(utils.DBE)
-	var list []sampleorgan.SampleOrgan
-	where := " AccCode='" + this.User.AccCode + "' and TNodeParent != ''"
-	list = svo.GetEntityListByWhere(where)
-
-	var datainfo DataInfo
-	datainfo.Items = list
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
-}
-
-// @Title 报警项目列表
-// @Description 报警项目列表
-// @Success 200 {object} business.device.DeviceChannels
-// @router /getpos/:inputstr [get]
-func (this *ShelfSetController) GetPosition() {
-	inputstr := this.Ctx.Input.Param(":inputstr")
-	serial := strings.Split(inputstr, "_")
-	for i := 0; i < len(serial); i++ {
-		//		println("sdfasdf=f-======", serial[i])
-	}
-	svs := shelfset.GetshelfsetService(utils.DBE)
-	shelf := svs.GetShelfByid(serial[7])
-	box := svs.GetBoxByid(serial[8])
-
-	posarr := [4]int{shelf[0].XStation, shelf[0].YStation, box[0].XStation, box[0].YStation}
-	var datainfo DataInfo
-	datainfo.Items = posarr
-	this.Data["json"] = &datainfo
-	this.ServeJSON()
-
-}
-
 // @Title 添加冻存盒或冻存架
 // @Description 添加冻存盒或冻存架
 // @Success 200 {object} business.device.DeviceChannels
@@ -214,7 +116,6 @@ func (this *ShelfSetController) AddforEquipment() {
 	if serial[1] == "1" {
 		// 更新日志
 		svss.UpdateBoxNum(lastnum, this.User.AccCode)
-
 		svss.GetEntityByEquipmentId(serial[0], utils.ToStr(model.XShelf), utils.ToStr(model.YShelf), &shelf)
 		box.AccCode = this.User.AccCode
 		box.BarCode = model.BarCode
@@ -292,6 +193,103 @@ func (this *ShelfSetController) AddforEquipment() {
 
 }
 
+// @Title 报警项目列表
+// @Description 报警项目列表
+// @Success 200 {object} business.device.DeviceChannels
+// @router /equipmentinfo/:eid [get]
+func (this *ShelfSetController) EquipmentInfo() {
+	eid := this.Ctx.Input.Param(":eid")
+	//	svc := currboxcapacity.GetCurrboxcapacityService(utils.DBE)
+	//	data := svc.GetCurrboxcapacityByid(eid)
+	//	dataStyleScheme := svc.GetStyleScheme("1")
+	svcequipment := equipment.GetEquipmentService(utils.DBE)
+	equipmentdata := svcequipment.GetInfoById(eid)
+	map_list := make(map[string]string)
+	sample_type := sampletype.GetSampleTypeService(utils.DBE)
+	where := " AccCode='" + this.User.AccCode + "'"
+	sample_type_list := sample_type.ListSampleType(where)
+	for i := 0; i < len(sample_type_list); i++ {
+		map_list[utils.ToStr(sample_type_list[i].Id)] = sample_type_list[i].Photo
+	}
+	this.Data["entitySampleType"] = sample_type_list
+	this.Data["map_list"] = map_list
+	this.Data["equipmentdata"] = equipmentdata
+	this.Data["equipmentName"] = equipmentdata.Name
+	this.Data["IsLargeSpec"] = equipmentdata.IsLargeSpec
+	this.Data["json"] = &equipmentdata
+	this.ServeJSON()
+}
+
+// @Title 报警项目列表
+// @Description 报警项目列表
+// @Success 200 {object} business.device.DeviceChannels
+// @router /boxdraw/:inputstr [get]
+func (this *ShelfSetController) BoxDraw() {
+	// 读取参数和初始服务
+	var boxdata BoxData
+	inputstr := this.Ctx.Input.Param(":inputstr")
+	serials := strings.Split(inputstr, ",")
+	id := serials[0]
+	x := serials[1]
+	y := serials[2]
+	x_box := serials[3]
+	y_box := serials[4]
+	svs := shelfset.GetshelfsetService(utils.DBE)
+	// 获取选中box
+	svc := currboxcapacity.GetCurrboxcapacityService(utils.DBE)
+	svc.GetBox(&boxdata.Boxshelf, id, x, y, x_box, y_box)
+	boxdata.Boxsample = nil
+	// 获取样本, where语句IState部分未经修改
+	if boxdata.Boxshelf.Id != 0 {
+		where := " IState in (1,5,10,99) and DeletionStateCode=0 and BoxId = " + utils.ToStr(boxdata.Boxshelf.Id)
+		svc1 := samplesinfo.GetSamplesInfoService(utils.DBE)
+		boxdata.Boxsample = svc1.QuerySampleList(this.User.AccCode, where)
+	}
+	// 获取冻存架
+	svs.GetEntityByEquipmentId(id, x, y, &boxdata.Shelfbox)
+	// 回传数据
+	this.Data["json"] = boxdata
+	this.ServeJSON()
+}
+
+// @Title 报警项目列表
+// @Description 报警项目列表
+// @Success 200 {object} business.device.DeviceChannels
+// @router /getorgan [get]
+func (this *ShelfSetController) GetOrgan() {
+	svo := sampleorgan.GetSampleOrganService(utils.DBE)
+	var list []sampleorgan.SampleOrgan
+	where := " AccCode='" + this.User.AccCode + "' and TNodeParent != ''"
+	list = svo.GetEntityListByWhere(where)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
+// @Title 报警项目列表
+// @Description 报警项目列表
+// @Success 200 {object} business.device.DeviceChannels
+// @router /getpos/:inputstr [get]
+func (this *ShelfSetController) GetPosition() {
+	inputstr := this.Ctx.Input.Param(":inputstr")
+	serial := strings.Split(inputstr, "_")
+	for i := 0; i < len(serial); i++ {
+		//		println("sdfasdf=f-======", serial[i])
+	}
+	svs := shelfset.GetshelfsetService(utils.DBE)
+	shelf := svs.GetShelfByid(serial[7])
+	box := svs.GetBoxByid(serial[8])
+
+	posarr := [4]int{shelf[0].XStation, shelf[0].YStation, box[0].XStation, box[0].YStation}
+	var datainfo DataInfo
+	datainfo.Items = posarr
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+
+}
+
 // @Title 编辑冻存盒或冻存架
 // @Description 编辑冻存盒或冻存架
 // @Success	200	{object} controllers.Request

+ 303 - 302
src/dashoo.cn/backend/api/controllers/home.go

@@ -7,22 +7,23 @@ import (
 	"strings"
 	"time"
 
-	"github.com/astaxie/beego"
+	//	"github.com/astaxie/beego"
 
-	"dashoo.cn/cellbank/backend/api/business/cellscollection"
-	"dashoo.cn/cellbank/backend/api/business/cellscontract"
-	"dashoo.cn/cellbank/backend/api/business/coderule"
-	"dashoo.cn/cellbank/backend/api/business/donorsinfo"
-	"dashoo.cn/cellbank/backend/api/business/lastordernum"
-	"dashoo.cn/cellbank/backend/api/business/limsdeliver"
-	"dashoo.cn/cellbank/backend/api/business/limsentrust"
-	"dashoo.cn/cellbank/backend/api/business/limspreparation"
-	"dashoo.cn/cellbank/backend/api/business/lissystem"
-	"dashoo.cn/cellbank/backend/api/business/material"
-	"dashoo.cn/cellbank/backend/api/business/sampleorgan"
-	"dashoo.cn/cellbank/backend/api/business/samplesfileinfo"
-	"dashoo.cn/cellbank/backend/api/business/samplesinfo"
-	"dashoo.cn/cellbank/backend/api/business/sampletype"
+	//"dashoo.cn/backend/api/business/cellscollection"
+	//"dashoo.cn/backend/api/business/cellscontract"
+	"dashoo.cn/backend/api/business/coderule"
+	"dashoo.cn/backend/api/business/donorsinfo"
+	"dashoo.cn/backend/api/business/lastordernum"
+
+	//	"dashoo.cn/backend/api/business/limsdeliver".
+	//"dashoo.cn/backend/api/business/limsentrust"
+	//"dashoo.cn/backend/api/business/limspreparation"
+	//	"dashoo.cn/backend/api/business/lissystem"
+	"dashoo.cn/backend/api/business/material"
+	"dashoo.cn/backend/api/business/sampleorgan"
+	"dashoo.cn/backend/api/business/samplesfileinfo"
+	"dashoo.cn/backend/api/business/samplesinfo"
+	"dashoo.cn/backend/api/business/sampletype"
 	"dashoo.cn/utils"
 )
 
@@ -128,15 +129,15 @@ func sampleBarcodeprint(param string) (it samplesinfo.SamplesInfoShow, datas []s
 	return
 }
 
-func sampleListeprint(param string) (it cellscollection.CellsCollectionDetail, datas []cellscollection.CellsCollectionDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	accode := params[1]
-	detailid := params[2]
-	svc := cellscollection.GetCellscollectionService(utils.DBE)
-	svc.GetEntitysByWhere(accode+CellsCollectionDetailName, "SampleFromItem=2 and PreparationDetailId="+detailid, &datas)
-	return
-}
+//func sampleListeprint(param string) (it cellscollection.CellsCollectionDetail, datas []cellscollection.CellsCollectionDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	accode := params[1]
+//	detailid := params[2]
+//	svc := cellscollection.GetCellscollectionService(utils.DBE)
+//	svc.GetEntitysByWhere(accode+CellsCollectionDetailName, "SampleFromItem=2 and PreparationDetailId="+detailid, &datas)
+//	return
+//}
 
 //预录入、已录入、待复存样本条码批量打印
 func sampleBarcodeprintbatch(param string) (it samplesinfo.SamplesInfoShow, datas []samplesinfo.SamplesInfoShow) {
@@ -668,248 +669,248 @@ func lablepreprintnotinsertsample(param string) (it LablePrePrint, datas []Lable
 	return
 }
 
-//实验结果打印
-func testResultprint(param string) (it lissystem.TestInfoPrintModel, datas []*lissystem.TestInfoPrintModel) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	if len(params) < 6 {
-		return
-	}
-	beego.Debug(params)
-	inspectionNum := params[1]
-	acccode := params[2]
-	labName := params[3]
-	itemName := params[4]
-	hospital := params[5]
+////实验结果打印
+//func testResultprint(param string) (it lissystem.TestInfoPrintModel, datas []*lissystem.TestInfoPrintModel) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	if len(params) < 6 {
+//		return
+//	}
+//	beego.Debug(params)
+//	inspectionNum := params[1]
+//	acccode := params[2]
+//	labName := params[3]
+//	itemName := params[4]
+//	hospital := params[5]
 
-	svc := lissystem.GetTestLabInfoService(utils.DBE)
-	datas = svc.TestInfoDetailPrint(acccode, inspectionNum, labName, itemName, hospital)
-	svc.AddLabInfoPrintTime(acccode, inspectionNum)
+//	svc := lissystem.GetTestLabInfoService(utils.DBE)
+//	datas = svc.TestInfoDetailPrint(acccode, inspectionNum, labName, itemName, hospital)
+//	svc.AddLabInfoPrintTime(acccode, inspectionNum)
 
-	return
-}
+//	return
+//}
 
 //LIS申请单信息打印
-func testApplyprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	ApplyNum := params[1]
-	acccode := params[2]
-	where := ""
-	if ApplyNum != "" {
-		where = where + " a.ApplyNum=" + ApplyNum + ""
-	}
-	svc := lissystem.GetTestApplicationService(utils.DBE)
-	datas = svc.TestApplicationPrint(acccode, where)
-	return
-}
+//func testApplyprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	ApplyNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if ApplyNum != "" {
+//		where = where + " a.ApplyNum=" + ApplyNum + ""
+//	}
+//	svc := lissystem.GetTestApplicationService(utils.DBE)
+//	datas = svc.TestApplicationPrint(acccode, where)
+//	return
+//}
 
 //爱萨尔 样本采集申请单信息打印
-func testCollectionprint(param string) (it cellscollection.CellsCollectionandDonorsInfo, datas []cellscollection.CellsCollectionandDonorsInfo) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	ApplyNum := params[1]
-	acccode := params[2]
-	where := ""
-	if ApplyNum != "" {
-		where = where + " c.CollectionNo=" + ApplyNum + ""
-	}
-	svc := cellscollection.GetCellscollectionService(utils.DBE)
-	datas = svc.TestCellscollectionPrint(acccode, where)
-	return
-}
+//func testCollectionprint(param string) (it cellscollection.CellsCollectionandDonorsInfo, datas []cellscollection.CellsCollectionandDonorsInfo) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	ApplyNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if ApplyNum != "" {
+//		where = where + " c.CollectionNo=" + ApplyNum + ""
+//	}
+//	svc := cellscollection.GetCellscollectionService(utils.DBE)
+//	datas = svc.TestCellscollectionPrint(acccode, where)
+//	return
+//}
 
 //爱萨尔 合同信息打印
-func testContractprint(param string) (it cellscontract.CellsContract, datas []cellscontract.CellsContract) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	PId := params[1]
-	acccode := params[2]
-	where := ""
-	if PId != "" {
-		where = where + " Id=" + PId + ""
-	}
-	svc := cellscontract.GetCellscontractService(utils.DBE)
-	datas = svc.TestCellsContractPrint(acccode+CellsContractName, where)
-	return
-}
+//func testContractprint(param string) (it cellscontract.CellsContract, datas []cellscontract.CellsContract) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	PId := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if PId != "" {
+//		where = where + " Id=" + PId + ""
+//	}
+//	svc := cellscontract.GetCellscontractService(utils.DBE)
+//	datas = svc.TestCellsContractPrint(acccode+CellsContractName, where)
+//	return
+//}
 
 //LIMS 委托信息打印
-func testEntrustprint(param string) (it limsentrust.LimsEntrustMain, datas []limsentrust.LimsEntrustMain) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	Id := params[1]
-	acccode := params[2]
-	where := ""
-	if Id != "" {
-		where = where + " Id=" + Id + ""
-	}
-	svc := limsentrust.GetLimsEnturstService(utils.DBE)
-	datas = svc.TestLimsEntrustPrint(acccode+LimsEntrustMainName, where)
-	return
-}
+//func testEntrustprint(param string) (it limsentrust.LimsEntrustMain, datas []limsentrust.LimsEntrustMain) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	Id := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if Id != "" {
+//		where = where + " Id=" + Id + ""
+//	}
+//	svc := limsentrust.GetLimsEnturstService(utils.DBE)
+//	datas = svc.TestLimsEntrustPrint(acccode+LimsEntrustMainName, where)
+//	return
+//}
 
 //LIMS 样品交接信息打印
-func testDeliverprint(param string) (it limsdeliver.LimsDeliverDetail, datas []limsdeliver.LimsDeliverDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	Id := params[1]
-	acccode := params[2]
-	where := ""
-	if Id != "" {
-		where = where + " EId=" + Id + ""
-	}
-	svc := limsdeliver.GetLimsDeliverService(utils.DBE)
-	datas = svc.TestLimsDeliverPrint(acccode+LimsDeliverName, acccode+LimsDeliverDetailName, where)
-	return
-}
+//func testDeliverprint(param string) (it limsdeliver.LimsDeliverDetail, datas []limsdeliver.LimsDeliverDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	Id := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if Id != "" {
+//		where = where + " EId=" + Id + ""
+//	}
+//	svc := limsdeliver.GetLimsDeliverService(utils.DBE)
+//	datas = svc.TestLimsDeliverPrint(acccode+LimsDeliverName, acccode+LimsDeliverDetailName, where)
+//	return
+//}
 
 //LIMS制备后样品条码打印
-func PreparedBarCode(param string) (it limspreparation.LimsPreparation, datas []limspreparation.LimsPreparation) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	fmt.Println("11111111111111", param)
-	acccode := params[1]
-	codes := params[2]
-	fmt.Println(acccode)
-	fmt.Println(codes)
-	codess := strings.Split(codes, ";")
-	where := ""
-	if len(codess) > 0 {
-		where = where + " Id in ( "
-		for i := 0; i < len(codess); i++ {
-			if codess[i] != "" {
-				if i == len(codess)-1 {
-					where = where + codess[i] + ""
-				} else {
-					where = where + "" + codess[i] + ","
-				}
-			}
-		}
-		where = where + " ) "
-	}
-	svc := limspreparation.GetLimsPreparationService(utils.DBE)
-	datas = svc.QuerySampleList(acccode, where)
-	return
-}
+//func PreparedBarCode(param string) (it limspreparation.LimsPreparation, datas []limspreparation.LimsPreparation) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	fmt.Println("11111111111111", param)
+//	acccode := params[1]
+//	codes := params[2]
+//	fmt.Println(acccode)
+//	fmt.Println(codes)
+//	codess := strings.Split(codes, ";")
+//	where := ""
+//	if len(codess) > 0 {
+//		where = where + " Id in ( "
+//		for i := 0; i < len(codess); i++ {
+//			if codess[i] != "" {
+//				if i == len(codess)-1 {
+//					where = where + codess[i] + ""
+//				} else {
+//					where = where + "" + codess[i] + ","
+//				}
+//			}
+//		}
+//		where = where + " ) "
+//	}
+//	svc := limspreparation.GetLimsPreparationService(utils.DBE)
+//	datas = svc.QuerySampleList(acccode, where)
+//	return
+//}
 
 //LIS室间交接条码打印
-func testTransferBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	TransferNum := params[1]
-	acccode := params[2]
-	where := ""
-	if TransferNum != "" {
-		where = where + " a.TransferNum=" + TransferNum + ""
-	}
-	svc := lissystem.GetTestTransferService(utils.DBE)
-	datas = svc.TestTransferBarCodePrint(acccode, where)
-	return
-}
+//func testTransferBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	TransferNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if TransferNum != "" {
+//		where = where + " a.TransferNum=" + TransferNum + ""
+//	}
+//	svc := lissystem.GetTestTransferService(utils.DBE)
+//	datas = svc.TestTransferBarCodePrint(acccode, where)
+//	return
+//}
 
 //LIS业务申请条码打印
-func testApplyBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	ApplyNum := params[1]
-	acccode := params[2]
-	where := ""
-	if ApplyNum != "" {
-		where = where + " a.ApplyNum=" + ApplyNum + ""
-	}
-	svc := lissystem.GetTestTransferService(utils.DBE)
-	datas = svc.TestTransferBarCodePrint(acccode, where)
-	return
-}
+//func testApplyBarCodeprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	ApplyNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if ApplyNum != "" {
+//		where = where + " a.ApplyNum=" + ApplyNum + ""
+//	}
+//	svc := lissystem.GetTestTransferService(utils.DBE)
+//	datas = svc.TestTransferBarCodePrint(acccode, where)
+//	return
+//}
 
 //爱萨尔样本采集条码打印
-func cellscollectionBarCodeprint(param string) (it cellscollection.CellsCollectionandDonorsInfo, datas []cellscollection.CellsCollectionandDonorsInfo) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	ApplyNum := params[1]
-	acccode := params[2]
-	where := ""
-	if ApplyNum != "" {
-		where = where + " c.CollectionNo=" + ApplyNum + ""
-	}
-	svc := cellscollection.GetCellscollectionService(utils.DBE)
-	datas = svc.TestCellscollectionPrint(acccode, where)
-	return
-}
+//func cellscollectionBarCodeprint(param string) (it cellscollection.CellsCollectionandDonorsInfo, datas []cellscollection.CellsCollectionandDonorsInfo) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	ApplyNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if ApplyNum != "" {
+//		where = where + " c.CollectionNo=" + ApplyNum + ""
+//	}
+//	svc := cellscollection.GetCellscollectionService(utils.DBE)
+//	datas = svc.TestCellscollectionPrint(acccode, where)
+//	return
+//}
 
 //阳性报告打印
-func testPositiveReport(param string) (it lissystem.LaboratoryReportModel, datas []lissystem.LaboratoryReportModel) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	CreateOnstart, _ := strconv.ParseInt(params[1], 10, 64)
-	CreateOnend, _ := strconv.ParseInt(params[2], 10, 64)
-	acccode := params[3]
-	testlistid := params[4]
-	where := " 1=1 and e.CheckStatus=2  and c.id=" + testlistid
-	if CreateOnstart != 0 {
-		where = where + " and  b.CollectDate>'" + time.Unix(CreateOnstart, 0).Format("2006-01-02") + "'"
-	}
-	if CreateOnend != 0 {
-		where = where + " and b.CollectDate <'" + time.Unix(CreateOnend, 0).Format("2006-01-02") + " 23:59:59'"
-	}
-	svc := lissystem.GetLaboratoryReportService(utils.DBE)
-	datas = svc.TestPositiveReport(acccode, where)
-	return
-}
+//func testPositiveReport(param string) (it lissystem.LaboratoryReportModel, datas []lissystem.LaboratoryReportModel) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	CreateOnstart, _ := strconv.ParseInt(params[1], 10, 64)
+//	CreateOnend, _ := strconv.ParseInt(params[2], 10, 64)
+//	acccode := params[3]
+//	testlistid := params[4]
+//	where := " 1=1 and e.CheckStatus=2  and c.id=" + testlistid
+//	if CreateOnstart != 0 {
+//		where = where + " and  b.CollectDate>'" + time.Unix(CreateOnstart, 0).Format("2006-01-02") + "'"
+//	}
+//	if CreateOnend != 0 {
+//		where = where + " and b.CollectDate <'" + time.Unix(CreateOnend, 0).Format("2006-01-02") + " 23:59:59'"
+//	}
+//	svc := lissystem.GetLaboratoryReportService(utils.DBE)
+//	datas = svc.TestPositiveReport(acccode, where)
+//	return
+//}
 
 //LIS室间交接信息打印
-func testTransferprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	TransferNum := params[1]
-	acccode := params[2]
-	where := ""
-	if TransferNum != "" {
-		where = where + " a.TransferNum=" + TransferNum + ""
-	}
-	svc := lissystem.GetTestTransferService(utils.DBE)
-	datas = svc.TestTransferPrint(acccode, where)
-	return
-}
+//func testTransferprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	TransferNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if TransferNum != "" {
+//		where = where + " a.TransferNum=" + TransferNum + ""
+//	}
+//	svc := lissystem.GetTestTransferService(utils.DBE)
+//	datas = svc.TestTransferPrint(acccode, where)
+//	return
+//}
 
 //医院结果信息打印
-func hospitalResultprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	InspectionNum := params[1]
-	acccode := params[2]
-	where := ""
-	if InspectionNum != "" {
-		where = where + " a.InspectionNum='" + InspectionNum + "'"
-	}
-	svc := lissystem.GetTestLabInfoService(utils.DBE)
-	datas = svc.HospitalResultPrint(acccode, where)
-	return
-}
+//func hospitalResultprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	InspectionNum := params[1]
+//	acccode := params[2]
+//	where := ""
+//	if InspectionNum != "" {
+//		where = where + " a.InspectionNum='" + InspectionNum + "'"
+//	}
+//	svc := lissystem.GetTestLabInfoService(utils.DBE)
+//	datas = svc.HospitalResultPrint(acccode, where)
+//	return
+//}
 
 //套餐结果信息打印
-func packageResultprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
-	param = Base64Decode(param)
-	params := strings.Split(param, ",")
-	SampleCode := params[1]
-	PackageId := params[2]
-	acccode := params[3]
-	var testinfos []lissystem.TestInfo
-	var where string
-	svc := lissystem.GetTestLabInfoService(utils.DBE)
-	where_testinfo := " SampleCode='" + SampleCode + "' and PackageId=" + PackageId
-	svc.GetEntitysByWhere(acccode+TestInfoName, where_testinfo, &testinfos)
-	for i := 0; i < len(testinfos); i++ {
-		if i == 0 {
-			where = "a.InspectionNum = '" + testinfos[i].InspectionNum + "' "
-		} else {
-			where = where + " or a.InspectionNum = '" + testinfos[i].InspectionNum + "' "
-		}
-	}
-	datas = svc.PackageResultPrint(acccode, where)
-	return
-}
+//func packageResultprint(param string) (it lissystem.TestOrderDetail, datas []lissystem.TestOrderDetail) {
+//	param = Base64Decode(param)
+//	params := strings.Split(param, ",")
+//	SampleCode := params[1]
+//	PackageId := params[2]
+//	acccode := params[3]
+//	var testinfos []lissystem.TestInfo
+//	var where string
+//	svc := lissystem.GetTestLabInfoService(utils.DBE)
+//	where_testinfo := " SampleCode='" + SampleCode + "' and PackageId=" + PackageId
+//	svc.GetEntitysByWhere(acccode+TestInfoName, where_testinfo, &testinfos)
+//	for i := 0; i < len(testinfos); i++ {
+//		if i == 0 {
+//			where = "a.InspectionNum = '" + testinfos[i].InspectionNum + "' "
+//		} else {
+//			where = where + " or a.InspectionNum = '" + testinfos[i].InspectionNum + "' "
+//		}
+//	}
+//	datas = svc.PackageResultPrint(acccode, where)
+//	return
+//}
 
 //物料入库单打印
 func materialRKprint(param string) (it material.MaterialRKPrintModel, datas []material.MaterialRKPrintModel) {
@@ -988,50 +989,50 @@ func (this *HomeController) Printservice() {
 		it, itema := archivedSampleBarcodeprintbatch(param)
 		cols = AutoColType(&it)
 		item = itema
-	case "testresult":
-		it, itema := testResultprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "testapplication":
-		it, itema := testApplyprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "collectionprinting":
-		it, itema := testCollectionprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "contractprinting":
-		it, itema := testContractprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "positivereport":
-		it, itema := testPositiveReport(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "testtransfer":
-		it, itema := testTransferprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "testtransferbarcode":
-		it, itema := testTransferBarCodeprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "testapplybarcode":
-		it, itema := testApplyBarCodeprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "cellscollectionbarcode":
-		it, itema := cellscollectionBarCodeprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "hospitalresult":
-		it, itema := hospitalResultprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "packageresult":
-		it, itema := packageResultprint(param)
-		cols = AutoColType(&it)
-		item = itema
+		//	case "testresult":
+		//		it, itema := testResultprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "testapplication":
+		//		it, itema := testApplyprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "collectionprinting":
+		//		it, itema := testCollectionprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "contractprinting":
+		//		it, itema := testContractprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "positivereport":
+		//		it, itema := testPositiveReport(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "testtransfer":
+		//		it, itema := testTransferprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "testtransferbarcode":
+		//		it, itema := testTransferBarCodeprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "testapplybarcode":
+		//		it, itema := testApplyBarCodeprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "cellscollectionbarcode":
+		//		it, itema := cellscollectionBarCodeprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "hospitalresult":
+		//		it, itema := hospitalResultprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "packageresult":
+		//		it, itema := packageResultprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
 	case "materialRKprint":
 		it, itema := materialRKprint(param)
 		cols = AutoColType(&it)
@@ -1044,27 +1045,27 @@ func (this *HomeController) Printservice() {
 		it, itema := materialPDprint(param)
 		cols = AutoColType(&it)
 		item = itema
-	case "samplelist":
-		it, itema := sampleListeprint(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "preparedbarcode":
-		fmt.Println("22222222222")
-		it, itema := PreparedBarCode(param)
-		cols = AutoColType(&it)
-		item = itema
-	case "entrustprinting":
-		it, itema := testEntrustprint(param)
-		cols = AutoColType(&it)
-		item = itema
-		var mydata = PrintData{item, cols}
-		multiDatas = append(multiDatas, mydata)
+		//	case "samplelist":
+		//		it, itema := sampleListeprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "preparedbarcode":
+		//		fmt.Println("22222222222")
+		//		it, itema := PreparedBarCode(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//	case "entrustprinting":
+		//		it, itema := testEntrustprint(param)
+		//		cols = AutoColType(&it)
+		//		item = itema
+		//		var mydata = PrintData{item, cols}
+		//		multiDatas = append(multiDatas, mydata)
 
-		its, itemas := testDeliverprint(param)
-		cols = AutoColType(&its)
-		item = itemas
-		mydata = PrintData{item, cols}
-		multiDatas = append(multiDatas, mydata)
+		//		its, itemas := testDeliverprint(param)
+		//		cols = AutoColType(&its)
+		//		item = itemas
+		//		mydata = PrintData{item, cols}
+		//		multiDatas = append(multiDatas, mydata)
 	}
 	var datas []PrintData
 	if len(multiDatas) <= 0 {

+ 2667 - 0
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/manage_new.vue

@@ -0,0 +1,2667 @@
+<style>
+  .input-with-select .el-select .el-input {
+    width: 110px;
+  }
+
+  .input-with-select .el-input-group__append {
+    background-color: #fff;
+  }
+
+</style>
+
+<template>
+  <div>
+    <el-card style="min-height: calc(100vh - 92px);">
+      <div slot="header" style="height: 20px;">
+        <span style="float: left;">
+          <i class="icon icon-table2"></i>
+        </span>
+        <el-breadcrumb class="heading" style="float: left; margin-left: 5px">
+          <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+          <el-breadcrumb-item :to="{ path: '/equipment' }">容器管理</el-breadcrumb-item>
+          <el-breadcrumb-item>样本管理 {{titlename}}</el-breadcrumb-item>
+        </el-breadcrumb>
+        <el-alert v-if="batchitem == '1'"
+          :title="'支持批量存储,多个样本存储时,系统自动根据所选位置为起始位置依次进行存储!本次将批量添加' + batchstorages.length + '个样本'" type="warning" center
+          show-icon style="margin-bottom:5px;min-width: 1150px"></el-alert>
+        <span style="float: right;">
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px"
+            v-if="Apply_flag==false" @click="SaveApply">保存</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px"
+            @click="exportVisible = true">导入</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px"
+            @click="showBoxTemplate()">下载冻存盒导入模板</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px"
+            @click="showEquipemplate()">下载设备模板</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" @click="refreshcbc">
+            刷新容量状态</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" @click="goback">返回
+          </el-button>
+        </span>
+      </div>
+
+      <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
+        <el-radio-button :label="false">展开</el-radio-button>
+        <el-radio-button :label="true">收起</el-radio-button>
+      </el-radio-group>
+      <el-menu :collapse="isCollapse" class="el-menu-vertical-demo" default-active="/" :collapse-transition="false">
+        <template v-for="item in layerList">
+          <!-- <el-menu-item :index="item.Realname" :key="item.Id">
+            <i class="el-icon-menu" style="margin-right: 10px;"></i>
+            <span slot="title">{{ item.Realname }}</span>
+          </el-menu-item> -->
+          <el-submenu v-if="item.Children" :index="item.Realname" :key="item.Id">
+            <template slot="title">
+              <i class="el-icon-setting" style="padding-top: 5px; margin-right: 10px;"></i>
+              <span slot="title">{{ item.Realname }}</span>
+            </template>
+            <template v-for="column in item.Children">
+              <el-menu-item :index="column.Realname" :key="column.Id">
+                <span slot="title">{{ column.Realname }}</span>
+              </el-menu-item>
+              <!-- <el-submenu v-if="sub.children" :index="sub.name" :key="sub.id">
+                <template slot="title">
+                  <i :class="'icon-before icon-'+sub.icon" style="padding-top: 5px; margin-right: 10px;"></i>
+                  <span slot="title">{{ sub.name }}</span>
+                </template>
+                <el-menu-item v-for="sub2 in sub.children" :index="sub2.url" :key="sub2.id">
+                  <span slot="title">{{ sub2.name }}</span>
+                </el-menu-item>
+              </el-submenu> -->
+            </template>
+          </el-submenu> 
+          
+              
+        <!-- <el-submenu index="1">
+          <template slot="title">
+            <i class="el-icon-location"></i>
+            <span slot="title">导航一</span>
+          </template>
+          <el-menu-item-group>
+            <span slot="title">分组一</span>
+            <el-menu-item index="1-1">选项1</el-menu-item>
+            <el-menu-item index="1-2">选项2</el-menu-item>
+          </el-menu-item-group>
+          <el-menu-item-group title="分组2">
+            <el-menu-item index="1-3">选项3</el-menu-item>
+          </el-menu-item-group>
+          <el-submenu index="1-4">
+            <span slot="title">选项4</span>
+            <el-menu-item index="1-4-1">选项1</el-menu-item>
+          </el-submenu>
+        </el-submenu> -->
+        <!-- <el-menu-item index="2">
+          <i class="el-icon-menu"></i>
+          <span slot="title">导航二</span>
+        </el-menu-item>
+        <el-menu-item index="3">
+          <i class="el-icon-setting"></i>
+          <span slot="title">导航三</span>
+        </el-menu-item> -->
+       </template>
+      </el-menu>
+
+
+      <!-- <div style="text-align:center;margin-top:-10px;margin-bottom:3px">
+        <i class="icon icon-stop2" style="color:#EAEAEA"></i>无冻存盒
+        <i class="icon icon-stop2" style="color:#13CE66"></i>空冻存盒
+        <i class="icon icon-stop2" style="color:#FF4949"></i>选中
+        <i class="icon icon-stop2" style="color:#D1EEEE"></i>容量(0-25%)
+        <i class="icon icon-stop2" style="color:#20A0FF"></i>容量(25%-50%)
+        <i class="icon icon-stop2" style="color:#836FFF"></i>容量(50%-75%)
+        <i class="icon icon-stop2" style="color:#000080"></i>容量(75%-100%)
+      </div> -->
+      <!--冰箱-->
+      <!-- <el-row>
+        <el-col :span="13">
+          <div>
+            <el-row v-show="showtsyedanguan">
+              <el-row :gutter="20">
+                <el-col :span="18">
+                  <canvas id="canvascryobiobank97K" width="450" height="450"></canvas>
+                </el-col>
+                <el-col :span="6">
+                  <div class="ulbgcolor" v-for="g in Math.ceil(selectdtedanguan.ColumnNum / 21)"
+                    style="width:50px;float:left;margin-left:1px">
+                    <div v-for="b in selectdtedanguan.ColumnNum">
+                      <div class="hoverdiv" v-if="(b <= g*21) && (b > (g - 1)*21)"
+                        @click="handleclk(b-1, 0, selectdtedanguan.YStation, selectdtedanguan.XStation)" v-bind:style="{ 
+                        backgroundColor: xbox == b && ybox == 1 && 
+                        xshelf == selectdtedanguan.YStation && yshelf == selectdtedanguan.XStation ? COLORARR[2] : 
+                        (selectdtedanguan['A'+b] == -2 ? COLORARR[0] : 
+                        (selectdtedanguan['A'+b] == -1 ? COLORARR[1] : 
+                        (selectdtedanguan['A'+b] > 0 && 
+                        selectdtedanguan['A'+b] <= 25 ? COLORARR[3] : 
+                        (selectdtedanguan['A'+b] > 25 && 
+                        selectdtedanguan['A'+b] <= 50 ? COLORARR[4] : 
+                        (selectdtedanguan['A'+b] > 50 && 
+                        selectdtedanguan['A'+b] <= 75 ? COLORARR[5] : 
+                        (selectdtedanguan['A'+b] > 75 ? COLORARR[6] : 
+                        COLORARR[7])))))) }" style="margin: 1px;width:50px; height:20px;"></div>
+                    </div>
+                  </div>
+                </el-col>
+              </el-row>
+            </el-row>
+            <el-row v-show="showcgshebei">
+              <table cellspacing="0" cellpadding="0">
+                <thead>
+                  <th></th>
+                  <th v-for="ind in colorTableWidth">{{ind}}</th>
+                </thead>
+                <tbody>
+                  <tr v-for=" (xcolorTable,k1) in colorTableHeight">
+                    <td style="text-align:center;font-size:20px;">{{numtoengs[xcolorTable-1]}}</td>
+                    <td v-for="(ycolorTable,k2) in colorTableWidth"
+                      v-bind:class="{ 'tdborder': true, 'tdleftborder': k2 === 0, 'tdtopborder': k1 === 0, 'tdrightborder': k2 === colorTableWidth-1 }">
+                      <div class="ulbgcolor"
+                        v-bind:style="{ width: unitwidth/colorTableWidth + 'px', height: unitheight/colorTableHeight + 'px' }">
+                        <div v-for="(shelfitem, index) in samplelist">
+                          <div v-if="samplelist[index].XStation === k2+1 && samplelist[index].YStation === k1+1">
+                            <div v-for="rowindex in samplelist[index].RowNum">
+                              <div class="hoverdiv" v-for=" colindex in samplelist[index].ColumnNum">
+                                <div v-bind:style="{ 
+                                width: (unitwidth/colorTableWidth/samplelist[index].ColumnNum-2.5) + 'px',
+                                height: (unitheight/colorTableHeight/samplelist[index].RowNum-2.5) + 'px',
+                                backgroundColor: xbox == colindex && ybox == rowindex && 
+                                xshelf == k1+1 && yshelf == k2+1 ? COLORARR[2] : 
+                                (samplelist[index][numtoengs[rowindex-1]+colindex] == -2 ? COLORARR[0] : 
+                                (samplelist[index][numtoengs[rowindex-1]+colindex] == -1 ? COLORARR[1] : 
+                                (samplelist[index][numtoengs[rowindex-1]+colindex] > 0 && 
+                                samplelist[index][numtoengs[rowindex-1]+colindex] <= 25 ? COLORARR[3] : 
+                                (samplelist[index][numtoengs[rowindex-1]+colindex] > 25 && 
+                                samplelist[index][numtoengs[rowindex-1]+colindex] <= 50 ? COLORARR[4] : 
+                                (samplelist[index][numtoengs[rowindex-1]+colindex] > 50 && 
+                                samplelist[index][numtoengs[rowindex-1]+colindex] <= 75 ? COLORARR[5] : 
+                                (samplelist[index][numtoengs[rowindex-1]+colindex] > 75 ? COLORARR[6] : 
+                                COLORARR[7])))))) }" style="margin: 1px"
+                                  @click="handleclk(colindex-1, rowindex-1, k1+1, k2+1)"></div>
+                              </div>
+                            </div>
+                          </div>
+                        </div>
+                      </div>
+                    </td>
+                  </tr>
+                </tbody>
+              </table>
+              <div>
+                <img :src="fridgebottomimg" class="fridge">
+              </div>
+            </el-row>
+          </div>
+        </el-col>
+        <el-col :span="11">
+          <div class="tablebox">
+            <table class="sampletablemanage"
+              v-bind:style="{ width: yedanguanitem == 20 ? '80px' : 10*TableWidth + '%', height: yedanguanitem == 20 ? '70px' : 10*TableHeight + '%' }">
+              <thead>
+                <th></th>
+                <th v-for="ind in TableWidth">{{ind}}</th>
+              </thead>
+              <tbody>
+                <tr class="index" v-for=" yindex in TableHeight">
+                  <td style="width:3px;text-align:center;font-size:20px;">{{numtoengs[yindex-1]}}</td>
+                  <td v-for="xindex in TableWidth" class="visibletd">
+                    <div v-if="getiscontainsdcgimgweiz(boxSample,xindex+'',yindex+'')"
+                      v-for="(sdata, sindex) in boxSample" @click="tableclk(sdata, yindex,xindex)">
+                      <span v-if="sdata.Position.split(';')[0]==xindex&&sdata.Position.split(';')[1]==yindex">
+                        <div v-if="sdata.IState === 5">
+                          <img :src="filehost + '/static/img/sampletypeimg/zhanwei.png'" class="image">
+                        </div>
+                        <div v-if="sdata.IState === 10">
+                          <img :src=" '/img/lock.png'" class="image">
+                        </div>
+                        <span v-for="(type, tindex) in sampletypelist" v-else>
+                          <div v-if="sdata.SampleType == type.value">
+                            <img :src="filehost + type.photo" class="image">
+                          </div>
+                        </span>
+                      </span>
+                    </div>
+                    <div v-if="!getiscontainsdcgimgweiz(boxSample,xindex+'',yindex+'')"
+                      @click="tableclk(null, yindex,xindex)" class="divdcgnull">
+                    </div>
+                    <span v-if="dchxtable == xindex && dchytable == yindex">
+                      <img :src="filehost + '/static/img/sampletypeimg/gou.png'" class="image" style="z-index:4">
+                    </span>
+                  </td>
+                </tr>
+              </tbody>
+            </table>
+          </div>
+        </el-col>
+      </el-row> -->
+    </el-card>
+    <el-card v-if="Apply_flag" class="box-card" style="margin-top: 8px;min-width: 1150px;" id="equiinfocard">
+      <div slot="header">
+        <span>
+          <i class="icon icon-file-text"> </i> 样本管理
+          <span style="float: right;">
+            <el-button @click="editsave()" type="primary" class="el-button--small"
+              v-if="sampleform.type_flag === 'edit'">保存</el-button>
+            <el-button @click="dialogfusuVisible=true" type="primary" class="el-button--small"
+              v-if="sampleform.type_flag === 'edit'">复苏</el-button>
+            <el-button @click="dialogfenzhuangVisible = true" type="primary" class="el-button--small"
+              v-if="sampleform.type_flag === 'edit'">分装</el-button>
+            <el-button type="primary" @click="dialogtiquVisible = true" class="el-button--small"
+              v-if="sampleform.type_flag === 'edit'">提取</el-button>
+            <el-button type="danger" class="el-button--small" v-if="sampleform.type_flag === 'edit'"
+              @click="deletedata()">删除</el-button>
+            <el-button type="primary" class="el-button--small" @click="savesample()"
+              v-if="sampleform.type_flag !== 'edit'">保存</el-button>
+            <el-button type="primary" class="el-button--small" @click="saveandadd(1)"
+              v-if="sampleform.type_flag !== 'edit' && false">保存并新增</el-button>
+            <el-button type="primary" class="el-button--small" v-if="sampleform.type_flag !== 'edit' && false"
+              @click="saveandadd(2)">保存并新增分管</el-button>
+            <el-button type="primary" class="el-button--small" @click="goAnchor('#equishelfcard')">置顶</el-button>
+          </span>
+        </span>
+      </div>
+      <div style="text-align:center;color:blue;margin:-10px 0 10px 0"> {{checkinfomsg}}</div>
+      <el-form ref="samplemanageform" :rules="sampleformrule" :model="sampleform" label-width="130px">
+        <el-row>
+          <el-col :span="8">
+            <el-form-item label="样本条码" prop="BarCode">
+              <el-input v-model="sampleform.BarCode" placeholder="为空默认自动生成" style="width:68%"
+                :disabled="disabledbarcode || contains('1,2', batchitem)"></el-input>
+              <el-button class="btnbox" :disabled="disabledbtnpreopera || contains('1,2', batchitem)" type="primary"
+                style="width:30%;float:right" @click="openpreop()">预录入</el-button>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="样本类型" required prop="SampleTypestr">
+              <el-select v-model="sampleform.SampleTypestr" clearable placeholder="请选择" style="width:100%"
+                @change="choosetype" :disabled="disabledsampletype || batchitem == '1'">
+                <el-option v-for="item in sampletypelist" :label="item.label" :key="item" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="样本编码" required prop="SampleCode">
+              <el-input v-model="sampleform.SampleCode" :disabled="disabledsamplecode || contains('1,2', batchitem)"
+                @blur="blursamplecode" placeholder="样本编码"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="acc != 'sBBo4' && acc != 'ssqOy' && acc != 'saB4v'">
+            <el-form-item label="组织器官">
+              <el-cascader :options="organlist2" style="width:100%" :props="sampleorganprops" change-on-select
+                :show-all-levels="false" v-model="selectedorgan" placeholder="请选择组织器官" @change="chooseorgange"
+                :disabled="disabledsamplingorgan"></el-cascader>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="acc != 'sBBo4' && acc != 'ssqOy' && acc != 'saB4v'">
+            <el-form-item label="取材部位">
+              <el-select v-model="sampleform.SamplingSite" clearable placeholder="取材部位" style="width:100%"
+                :disabled="disabledsamplingsite">
+                <el-option v-for="item in samplequcailist" :label="item.label" :key="item" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="名称">
+              <el-input v-model="sampleform.Name" placeholder="样本名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="接收日期">
+              <el-date-picker style="width: 100%" v-model="sampleform.ReceiveDatedate" type="date" :clearable="false"
+                placeholder="请选择接收日期" :disabled="diaabledreceiveDate" :picker-options="pickerOptions0">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="可用容量" prop="Capacitystr" placeholder="可用容量">
+              <el-input v-model="sampleform.Capacitystr" :disabled="disabledcapacity" placeholder="可用容量"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="容量单位">
+              <el-select v-model="sampleform.Unit" style="width:100%" clearable :disabled="disabledunit">
+                <el-option v-for="item in sampeunitlist" :label="item.Value" :key="item.Value" :value="item.Value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="有效日期">
+              <el-date-picker style="width: 70%" v-model="sampleform.ValidityDatedate" type="date" :clearable="false"
+                :placeholder="sampleform.Isyongjiu ? '永久' : '请选择有效日期'"
+                :disabled="disabledvaliditydate || sampleform.Isyongjiu" :picker-options="pickerOptions0">
+              </el-date-picker>
+              <el-checkbox v-model="sampleform.Isyongjiu" style="float:right" :disabled="diaabledyongjiu">永久
+              </el-checkbox>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="样本内码">
+              <el-input v-model="sampleform.InnerCode" placeholder="样本内码"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="acc != 'sBBo4' && acc != 'ssqOy' && acc != 'saB4v'">
+            <el-form-item label="样本来源">
+              <el-input v-model="sampleform.SourceName" placeholder="样本来源" style="width:68%" :disabled="true">
+              </el-input>
+              <el-button type="primary" :disabled="disabledsourcebutton || contains('1,2', batchitem)"
+                style="width:30%;float:right" @click="dialogFormVisible2 = true" class="btnbox">选择</el-button>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="acc == 'sBBo4' || acc == 'saB4v'">
+            <el-form-item label="样本来源">
+              <el-input v-model="sampleform.SourceName" placeholder="样本来源" style="width:68%" :disabled="true">
+              </el-input>
+              <el-button type="primary" :disabled="disabledsourcebutton || contains('1,2', batchitem)"
+                style="width:30%;float:right" @click="animalSourceVisible = true" class="btnbox">选择</el-button>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="acc == 'ssqOy'">
+            <el-form-item label="样本来源">
+              <el-input v-model="sampleform.SourceName" placeholder="样本来源" style="width:68%" :disabled="true">
+              </el-input>
+              <el-button type="primary" :disabled="disabledsourcebutton || contains('1,2', batchitem)"
+                style="width:30%;float:right" @click="microSourceVisible = true" class="btnbox">选择</el-button>
+            </el-form-item>
+          </el-col>
+          <el-col :span="16">
+            <el-form-item label="备注">
+              <el-input v-model="sampleform.Remark" type="textarea" :rows="1" placeholder="样本备注"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item label="录入人">
+              <el-select ref="reflrrselect" v-model="sampleform.CreateUserId" style="width:100%">
+                <el-option v-for="item in userlist" :label="item.Realname" :key="item.Id" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </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">
+                <i class="el-icon-plus attach-uploader-icon"></i>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8" v-if="acc =='sryms'">
+            <el-form-item label="所属分组">
+              <el-select ref="refGroup" multiple filterable default-first-option v-model="GroupIdOption"
+                placeholder="请选择" style="width: 100%" :disabled="disabledgroup || contains('1,2', batchitem)">
+                <el-option v-for="item in groupList" :key="item.Key" :label="item.Value" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col>
+            <el-form-item label="附件说明">
+              <el-input v-model="sampleform.uploadedremark" type="textarea" :rows="2" placeholder="附件说明"></el-input>
+              <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 style="margin-top:-25px;">
+            <el-form-item>
+              <el-checkbox :disabled="disabledcheckprint" v-model="sampleform.autoprintchecked" class="title">
+                新增保存时打印标签(如若勾选,请确保已经设置过默认打印方案)
+              </el-checkbox>
+            </el-form-item>
+          </el-col>
+
+        </el-row>
+
+        <el-tabs tab-position="top" v-model="Tabs" v-show="typetykzlist.length > 0">
+          <el-tab-pane :label="groupname" :name="groupname" :key="groupname" v-for="groupname in groupnameList">
+            <el-card class="box-card infocard">
+              <el-row>
+                <template v-for="(item, index) in typetykzlist">
+                  <el-col :span="(item.FieldType === '3')? 24:8" :key="index" v-if="item.GroupName === groupname">
+                    <el-form-item :label="item.Name">
+                      <el-input v-model="item.FieldDefault" v-if="item.FieldType === '1'" :placeholder="'请输入'+item.Name"
+                        auto-complete="off"></el-input>
+
+                      <el-select v-model="item.FieldDefault" v-if="item.FieldType === '2'" clearable
+                        :placeholder="'请选择'+item.Name" style="width:100%">
+                        <el-option :label="v" :value="v" :key="v" v-for=" v in item.FieldContent.split(',')">
+                        </el-option>
+                      </el-select>
+
+                      <el-input v-model="item.FieldDefault" v-if="item.FieldType === '3'" :placeholder="'请输入'+item.Name"
+                        type="textarea" :rows=3 auto-complete="off"></el-input>
+
+                      <el-date-picker v-model="item.FieldDefault" v-if="item.FieldType === '4'" type="datetime"
+                        style="width:100%" placeholder="选择日期"></el-date-picker>
+
+                      <el-button plain v-model="item.FieldDefault" v-if="item.FieldType === '5'" type="primary"
+                        size="mini" class="el-button--small" style="margin-left: 8px" @click="getitem(item)">上传图片
+                      </el-button>
+                    </el-form-item>
+                  </el-col>
+                </template>
+              </el-row>
+            </el-card>
+          </el-tab-pane>
+        </el-tabs>
+
+      </el-form>
+    </el-card>
+
+    <el-dialog title="样本批量导入" :visible.sync="exportVisible">
+      <el-upload :action="filehost + '/api/uploads/samplesinput'" :show-file-list="false" :data="exportfileparam"
+        :on-success="handleexportfileSuccess" :before-upload="beforeexportfileUpload">
+        <el-button size="small" type="primary">点击上传导入文件</el-button> <span>{{exportmsg}}</span>
+        <div slot="tip" class="el-upload__tip">只能上传由导入模板录入的xlsx文件,其中模板中带星号(*)的为必填项,不填写将会被忽略</div>
+      </el-upload>
+      <div slot="footer">
+        <el-button type="primary" @click="importData()">确定</el-button>
+        <el-button @click="exportVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="请选择模版" :visible.sync="downloadEquipVisible">
+      <div style="margin: 5px 0;"></div>
+      <el-radio-group v-model="downloadTemplateName" style="margin-left:20px; padding-top: 5px; padding-bottom:5px;">
+        <el-radio v-for="item in downloadTemplates" style="padding-top: 10px; padding-bottom:10px;" :key="item.Name"
+          :label="item.Name">{{item.Name}}</el-radio>
+      </el-radio-group>
+      <div slot="footer">
+        <el-button type="primary" @click="downloadEquip2">确定</el-button>
+        <el-button @click="downloadEquipVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog title="请选择模版" :visible.sync="downloadBoxVisible">
+      <div style="margin: 5px 0;"></div>
+      <el-radio-group v-model="downloadTemplateName" style="margin-left:20px; padding-top: 5px; padding-bottom:5px;">
+        <el-radio v-for="item in downloadTemplates" style="padding-top: 10px; padding-bottom:10px;" :key="item.Name"
+          :label="item.Name">{{item.Name}}</el-radio>
+      </el-radio-group>
+      <div slot="footer">
+        <el-button type="primary" @click="downloadBox2">确定</el-button>
+        <el-button @click="downloadBoxVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+
+    <el-dialog :title="ImageTitle" width="80%" :visible.sync="imageDialog">
+      <el-upload action="" :before-upload="beforeAvatarUpload" :on-preview="handlePictureCardPreview"
+        :http-request="uploadrequest" :on-success="handleAvatarSuccess" :on-remove="handleRemove"
+        :file-list="imagefilelist" list-type="picture">
+        <el-button size="small" type="primary">点击上传</el-button>
+        <div slot="tip" class="el-upload__tip">只能上传jpg/png文件</div>
+      </el-upload>
+    </el-dialog>
+    <el-dialog :visible.sync="dialogVisible">
+      <img width="100%" :src="dialogImageUrl" alt="">
+    </el-dialog>
+
+    <preoperation-dialog @close="custompreoperaDialogCallback" :visible.sync="dialogFormVisible"></preoperation-dialog>
+    <choose-source-dialog @close="customsampsourceDialogCallback" :visible.sync="dialogFormVisible2"></choose-source-dialog>
+    <choose-animal-dialog @close="animalDialogCallback" :visible.sync="animalSourceVisible"></choose-animal-dialog>
+    <choose-micro-dialog @close="microDialogCallback" :visible.sync="microSourceVisible"></choose-micro-dialog>
+    <recoverydialog @close="recoverydialogcallback" :sampleinfo="sampleinfodetail" :visible.sync="dialogfusuVisible"></recoverydialog>
+    <packingdialog @close="recoverydialogcallback" :sampleinfo="sampleinfodetail" :visible.sync="dialogfenzhuangVisible"></packingdialog>
+    <abstractdialog @close="recoverydialogcallback" :sampleinfo="sampleinfodetail" :visible.sync="dialogtiquVisible"></abstractdialog>
+  </div>
+</template>
+
+<script>
+  import axios from 'axios'
+  import store from 'store'
+  import uploadajax from '@/assets/js/uploadajax.js'
+  import PreoperationDialog from '@/components/samples/preoperation'
+  import ChooseSourceDialog from '@/components/samples/choosesource'
+  import ChooseAnimalDialog from '@/components/samples/chooseanimal'
+  import ChooseMicroDialog from '@/components/samples/choosemicro'
+  import recoverydialog from '@/components/samples/recoverydialog'
+  import packingdialog from '@/components/samples/packingdialog'
+  import abstractdialog from '@/components/samples/abstractdialog'
+  import {
+    mapGetters
+  } from 'vuex'
+  export default {
+    name: 'sampleoperation',
+    components: {
+      PreoperationDialog,
+      ChooseSourceDialog,
+      ChooseAnimalDialog,
+      ChooseMicroDialog,
+      recoverydialog,
+      packingdialog,
+      abstractdialog
+    },
+    computed: mapGetters({
+      authUser: 'authUser'
+    }),
+    data() {
+      var checkSampleType = (rule, value, callback) => {
+        let _this = this
+        if (value === '') {
+          callback(new Error('请选择样本类型'))
+          return
+        }
+        if (this.xbox === -1 || this.ybox === -1 || this.yshelf === -1 || this.xshelf === -1) {
+          callback(new Error('冻存盒未选择'))
+        } else {
+          let parmstr = '?t=sampletype&xbox=' + this.xbox + '&ybox=' + this.ybox + '&bingxiangid=' + this.eid +
+            '&xshelf=' + this.yshelf + '&yshelf=' + this.xshelf + '&value=' + value
+          _this.$axios.get('/sampletype/getiscanusedbystation' + parmstr, {})
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                callback()
+              } else {
+                callback(new Error(res.data.message))
+              }
+            })
+            .catch(err => {
+              // handle error
+              callback(new Error('网络异常请重试'))
+              console.error(err)
+            })
+        }
+      }
+      var checkCapacity = (rule, value, callback) => {
+        if (!isNaN(parseFloat(value)) && !isNaN(value)) {
+          if (parseFloat(value) < 0) {
+            callback(new Error('请输入大于0的数字值'))
+          } else {
+            callback()
+          }
+        } else {
+          callback(new Error('请输入正确数字值'))
+        }
+      }
+      var checkSampleCode = (rule, value, callback) => {
+        if (value === '') {
+          callback(new Error('请输入样本编码'))
+          return
+        } else {
+          callback()
+        }
+      }
+      var checkBarCode = (rule, value, callback) => {
+        if (this.sampleform.type_flag === 'add') {
+          if (value === '') {
+            callback()
+            return
+          }
+          let _this = this
+          _this.$axios.get('/sampleoperation/validformdetailbarcoder?param=' + value, {})
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                callback()
+              } else {
+                callback(new Error(res.data.message))
+              }
+            })
+            .catch(err => {
+              // handle error
+              callback(new Error('网络异常请重试'))
+              console.error(err)
+            })
+        } else {
+          callback()
+        }
+      }
+      return {
+        eid: 0, //设备id
+        isCollapse: false,
+        layerList: [],
+        columnList: [],
+        filehost: '',
+        fridgebottomimg: '',
+        titlename: '',
+        equcode: '', // 容器编码
+        downloading: true,
+        fristseach: false,
+        disabledbarcode: false,
+        disabledsamplecode: false,
+        disabledsampletype: false,
+        disabledsamplingorgan: false,
+        disabledvaliditydate: false,
+        disabledsourcebutton: false,
+        disabledcheckprint: false,
+        diaabledreceiveDate: false,
+        diaabledyongjiu: false,
+        disabledsamplingsite: false,
+        disabledcapacity: false,
+        disabledunit: false,
+        disabledbtnpreopera: false,
+        disabledgroup: false,
+        achmentlist: [], // 附件列表
+        sampleform: {
+          BarCode: '', // 样本条码
+          SampleCode: '', // 样本编码
+          SampleTypestr: '', // 样本类型
+          SampleTypeName: '',
+          SamplingOrgan: '', // 组织器官
+          SamplingSite: '', // 取材部位
+          SamplingSiteName: '',
+          Name: '', // 名称
+          ReceiveDatedate: new Date(), // 接收日期
+          Capacitystr: '0', // 可用容量
+          Unit: '', // 单位(容量)
+          ValidityDatedate: '', // 有效日期
+          InnerCode: '', // 样本内码
+          SourceName: '', // 样本来源
+          SourceId: 0,
+          SourceIdCard: '',
+          Remark: '', // 备注
+          Isyongjiu: false, // 是否永久
+          code_default: '',
+          code_codeId: 0,
+          code_lastnum: '',
+          coderule_samplingorgan_flag: 0,
+          coderule_sampletype_flag: 0,
+          eid: '',
+          x_shelf: '',
+          y_shelf: '',
+          x_box: '',
+          y_box: '',
+          min_x: '',
+          min_y: '',
+          autoprintchecked: true,
+          type_flag: 'add', // 标记点预录入或者没点
+          saveandadd: '', // 保存并新增:1;保存新增分管:2
+          PositionStr: '', // 样本位置信息
+          uploadeds: [], // 已上传的附件
+          CreateUserId: 0, // 录入人
+          CreateBy: '', // 录入人
+          uploadedremark: '', // 附件说明
+          businessopdesc: '' // sampleBusiness表OpDesc字段
+        },
+        sampleformrule: {
+          SampleCode: [{
+            validator: checkSampleCode,
+            trigger: 'blur'
+          }],
+          SampleTypestr: [{
+            validator: checkSampleType,
+            trigger: 'change'
+          }],
+          Capacitystr: [{
+            validator: checkCapacity,
+            trigger: 'blur'
+          }],
+          BarCode: [{
+            validator: checkBarCode,
+            trigger: 'blur'
+          }]
+        },
+        pickerOptions0: { //  日期选择
+          disabledDate(time) {
+            return false // time.getTime() < Date.now() - 8.64e7
+          }
+        },
+
+        groupList: [],
+        GroupIdOption: [],
+        GroupId: '',
+        GroupName: '',
+
+        Tabs: '',
+        groupnameList: [], //扩展字段分组列表
+        imageDialog: false,
+        ImageTitle: '',
+        imagefiles: '',
+        imagefilelist: [],
+        imagenewlist: '', //删除图片时使用
+        dialogImageUrl: '',
+        dialogVisible: false,
+
+        //  选项的基础资料
+        sampletypelist: [],
+        sampeunitlist: [],
+        organlist: [],
+        samplequcailist: [],
+        organ: '08',
+        volumeunit: 'ml',
+        date: '',
+        tableColumnWidth: '200',
+        dialogFormVisible: false,
+        // 选择样本来源对话框
+        form2: {},
+        dialogFormVisible2: false,
+        animalSourceVisible: false,
+        microSourceVisible: false,
+        formLabelWidth2: '120px',
+        tableData2: [],
+        tableColumnWidth2: '160',
+        // 冰箱面板
+        unitwidth: 550, // 整个冰箱的尺寸
+        unitheight: 378,
+        dchxtable: -1, // 对勾所在位置
+        dchytable: -1,
+        xshelf: -1, // 选中的冻存架的位置
+        yshelf: -1,
+        xbox: -1, //  样本所在冻存盒内位置
+        ybox: -1,
+        xtable: 4, // 样本所在冻存盒内位置
+        ytable: 4,
+        xcolorTable: 4, //  选中的冻存架的位置
+        ycolorTable: 4,
+        colorTableWidth: 0, //  冰箱的相对尺寸
+        colorTableHeight: 0,
+        TableWidth: 0, // 每个冻存盒的尺寸
+        TableHeight: 0,
+        sampleIndex: 0, //  每个冻存盒所存样本的index
+        visibleClk: false,
+        visibleShelf: false,
+        // 提示与移动用对话框
+        alertVisible: false,
+        move: '',
+        // 冻存架/盒
+        moveVisible: false,
+        addShelfVisible: false,
+        editShelfVisible: false,
+        copyShelfVisible: false,
+        checkedShelves: [],
+        addBoxVisible: false,
+        editBoxVisible: false,
+        copyBoxVisible: false,
+        checkedBoxes: [],
+        labelWidth: '100px',
+        numtoengs: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
+          'U', 'V', 'W', 'X', 'Y', 'Z'
+        ],
+        checkshelvemsg: '',
+        checkinfomsg: '',
+        samplelist: [], // 新增,新的冰箱list和冻存盒list以及冻存盒样本list
+        selectedBox: [],
+        boxSample: [],
+        
+        COLORARR: ['#EAEAEA', '#13CE66', '#FF4949', '#D1EEEE', '#20A0FF', '#836FFF', '#000080'],
+        selectedorgan: [], // 级联所选组织结构
+        sampleorganprops: {
+          value: 'code',
+          label: 'name',
+          children: 'children'
+        },
+        organlist2: [],
+        locationparam: { // 跳转参数
+        },
+        dialogfusuVisible: false, // 复苏弹框是否显示
+        dialogfenzhuangVisible: false, // 分装弹框是否显示
+        dialogtiquVisible: false, // 提取弹框是否显示
+        sampleinfodetail: {}, // 样本信息
+        sampleinfoid: 0, // 所选样本的id
+        sampleinfotype: '', // 所选样本的type
+        code_default: false, // 样本编码是否知道生成
+        typetykzlist: [], // 特有扩展
+        publickzlist: [], // 公共扩展
+        exportVisible: false, // 导入对话框
+        exportfileparam: {}, // 导入文件参数
+        exportfilepath: '', // 导入文件路径
+        exportmsg: '未选择文件', // 导入文件
+        yedanguancanvas: null, // 液氮罐cavans
+        yedanguanctx: null, // 液氮罐ctx
+        showtsyedanguan: false, // 显示特殊液氮罐形式
+        yeshuyedanguanimgid: '', // 特殊液氮罐图片Id
+        showcgshebei: false, // 显示常规形式
+        selectdtedanguan: {
+          ColumnNum: 0
+        }, // 选中的特殊液氮罐的冻存架
+        yedanguanitem: 0, // 液氮罐类型19:贝尔Cryobiobank13K液氮罐;20:贝尔Cryobiobank13K_BloodBag液氮罐
+        yedanguanrongqiarr: [ // 19:贝尔Cryobiobank13K液氮罐,type:1规则图形,2不规则图形
+        ],
+        yedanguanrongqiarr_13kbloodbag: [ // 20:贝尔Cryobiobank13K_BloodBag液氮罐
+        ],
+        waituploads: [], // 等待上传的附件列表
+        userlist: [], // 录入人
+        downloadTemplates: [{
+          Name: "默认模版"
+        }],
+        downloadEquipVisible: false,
+        downloadBoxVisible: false,
+        downloadTemplateName: '',
+        batchitem: '0', // 批量添加类型,1:由交接单存储过来,带有样本类型,样本来源信息;2:有制备存储过来,不带样本类型等信息
+        batchstorages: [], //批量存储的样本
+        Apply_flag: true,
+        acc: ''
+      }
+    },
+    created() {
+      this.eid = this.$route.params.opera
+      this.filehost = process.env.imgserverhost
+      this.acc = this.authUser.Profile.AccCode
+      this.initData()
+      // 判断是否是批量操作传值过来
+      if (this.$route.query.batchitem) {
+        this.batchitem = this.$route.query.batchitem
+        this.sampleform.businessopdesc = this.$route.query.desc
+        if (store.get('batchstorages')) {
+          this.batchstorages = store.get('batchstorages')
+        }
+        if (this.$route.query.apply) {
+          this.Apply_flag = false
+        }
+      }
+     
+      this.getfridgeimg()     
+      this.getsametypetreelist()
+      this.getType()
+      // 获取公共扩展
+      // this.getpublickz()
+      this.getsampetypeunit()
+      // 获取自动生成编码数据
+      this.getautocodedata()
+      this.getisAutoPrint()
+      // 获取录入人
+      this.getuserlist()
+      // 获取分组列表
+      this.getGrouplist()
+    },
+    watch: {
+      '$route'(to, from) {
+        this.location()
+      }
+    },
+    methods: {
+      initData() {
+        let _this = this
+        _this.$axios.get('/shelfset/equipmentdraw/' + _this.eid, {})
+          .then(res => {
+            _this.downloading = false       
+            for(var i = res.data.dimension[0]; i > 0; i --){
+               _this.columnList.unshift({
+              'Id': i,
+              'Realname':"第"+ i + "列"
+              })
+            }
+            for(var n = res.data.dimension[1]; n > 0; n --){
+               _this.layerList.unshift({
+              'Id': n,
+              'Realname':"第"+ n + "层",
+              'Children':_this.columnList
+              })
+            }
+            _this.samplelist = res.data.items   
+            // _this.colorTableHeight = res.data.dimension[1] //列
+            // _this.colorTableWidth = res.data.dimension[0] //层
+            // _this.location()
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      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.waituploads.push({
+                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: '未上传成功!请重新上传!'
+            })
+          })
+      },
+      beforeAvatarUpload(file) {
+        let isLt50m = file.size / 1024 / 1024 / 50 < 1
+        if (!isLt50m) {
+          this.$message.error('上传打印模板大小不能超过 50MB!')
+          return false
+        }
+        return true
+      },
+      // 判断附件是否上传成功
+      attachissuccess() {
+        if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+          for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
+            if (this.$refs.refuploadattach.uploadFiles[i].status !== 'success') {
+              this.$message.error('有附件未成功上传!不能保存数据')
+              return false
+            }
+          }
+        }
+        return true
+      },
+      // 获取上传成功的附件
+      getattachissuccess() {
+        this.sampleform.uploadeds = []
+        if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
+          for (let i = 0; i < this.$refs.refuploadattach.uploadFiles.length; i++) {
+            if (this.$refs.refuploadattach.uploadFiles[i].status === 'success') {
+              for (let j = 0; j < this.waituploads.length; j++) {
+                if (this.waituploads[j].uid === this.$refs.refuploadattach.uploadFiles[i].uid) {
+                  this.sampleform.uploadeds.push({
+                    url: this.waituploads[j].url,
+                    fid: this.waituploads[j].fid,
+                    size: this.$refs.refuploadattach.uploadFiles[i].size,
+                    name: this.$refs.refuploadattach.uploadFiles[i].name
+                  })
+                }
+              }
+            }
+          }
+        }
+      },
+      // 初始化液氮罐canvas并绘制液氮罐背景图
+      drawyedanguancanvasbgimg() {
+        let _this = this
+        _this.yedanguancanvas = document.getElementById('canvascryobiobank97K')
+        _this.yedanguanctx = _this.yedanguancanvas.getContext('2d')
+        _this.yedanguanctx.globalAlpha = 0.5
+        _this.yedanguancanvas.addEventListener('click', function (e) {
+          let p = _this.getEventPosition(e)
+          _this.drawyedanguancavans(p)
+        }, false)
+        _this.drawyedanguancavans(null)
+      },
+      // 绘制特殊形态液氮罐
+      drawyedanguancavans(p) {
+        let _this = this
+        _this.yedanguanctx.clearRect(0, 0, _this.yedanguancanvas.width, _this.yedanguancanvas.height)
+        let canvasimg = document.getElementById(_this.yeshuyedanguanimgid)
+        _this.yedanguanctx.drawImage(canvasimg, 0, 0, _this.yedanguancanvas.width, _this.yedanguancanvas.height)
+        let yedanguandatarrtrmp = []
+        if (_this.yedanguanitem === 20) {
+          yedanguandatarrtrmp = _this.yedanguanrongqiarr_13kbloodbag
+        } else {
+          yedanguandatarrtrmp = _this.yedanguanrongqiarr
+        }
+        yedanguandatarrtrmp.forEach(function (v) {
+          // 绘制颜色快
+          if (v.type === 1) { // 标准四边形
+            _this.yedanguanctx.strokeStyle = 'white'
+            _this.yedanguanctx.beginPath()
+            _this.yedanguanctx.rect(v.x, v.y, v.width, v.height)
+            _this.yedanguanctx.stroke()
+          } else { // 有倾斜的四边形
+            _this.yedanguanctx.strokeStyle = 'white'
+            _this.yedanguanctx.beginPath()
+            _this.yedanguanctx.moveTo(v.x1, v.y1)
+            _this.yedanguanctx.lineTo(v.x2, v.y2)
+            _this.yedanguanctx.lineTo(v.x3, v.y3)
+            _this.yedanguanctx.lineTo(v.x4, v.y4)
+            _this.yedanguanctx.closePath()
+            _this.yedanguanctx.stroke()
+          }
+          // 获取点击点坐标
+          if (p && _this.yedanguanctx.isPointInPath(p.x, p.y)) {
+            _this.selectdtedanguan = {
+              ColumnNum: 0
+            }
+            for (var i = 0; i < _this.samplelist.length; i++) {
+              if (_this.samplelist[i].XStation === v.XStation && _this.samplelist[i].YStation === v.YStation) {
+                _this.selectdtedanguan = _this.samplelist[i]
+                if (v.type === 1) {
+                  _this.yedanguanctx.fillStyle = _this.COLORARR[2]
+                  _this.yedanguanctx.beginPath()
+                  _this.yedanguanctx.rect(v.x, v.y, v.width, v.height)
+                  _this.yedanguanctx.fill()
+                } else {
+                  _this.yedanguanctx.fillStyle = _this.COLORARR[2]
+                  _this.yedanguanctx.beginPath()
+                  _this.yedanguanctx.moveTo(v.x1, v.y1)
+                  _this.yedanguanctx.lineTo(v.x2, v.y2)
+                  _this.yedanguanctx.lineTo(v.x3, v.y3)
+                  _this.yedanguanctx.lineTo(v.x4, v.y4)
+                  _this.yedanguanctx.closePath()
+                  _this.yedanguanctx.fill()
+                }
+                // 排除搜索进来的
+                if (!_this.fristseach) {
+                  _this.handleclk(-1, -1, -1, -1)
+                }
+                break
+              }
+            }
+          }
+        })
+      },
+      // 获取点击canvas的坐标
+      getEventPosition(ev) {
+        let x, y
+        if (ev.layerX || ev.layerX === 0) {
+          x = ev.layerX
+          y = ev.layerY
+        } else if (ev.offsetX || ev.offsetX === 0) { // Opera
+          x = ev.offsetX
+          y = ev.offsetY
+        }
+        return {
+          x: x,
+          y: y
+        }
+      },
+      getautocodedata() {
+        let _this = this
+        // request
+        // 获取冻存架信息
+        _this.$axios.get('/sampleoperation/getautocodedata', {})
+          .then(res => {
+            // response
+            _this.sampleform.code_default = res.data.code_default
+            _this.sampleform.code_codeId = res.data.code_codeId
+            _this.sampleform.code_lastnum = res.data.code_lastnum
+            _this.sampleform.coderule_samplingorgan_flag = res.data.coderule_samplingorgan_flag
+            _this.sampleform.coderule_sampletype_flag = res.data.coderule_sampletype_flag
+            _this.sampleform.SampleCode = res.data.SampleCode
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      // 获取是否默认勾选打印标签
+      getisAutoPrint() {
+        let _this = this
+        _this.$axios.get('/paramset/getisautoprint', {})
+          .then(res => {
+            // response
+            if (res.data === 'true') {
+              _this.sampleform.autoprintchecked = true
+            } else {
+              _this.sampleform.autoprintchecked = false
+            }
+          })
+      },
+      getfridgeimg() {
+        let _this = this
+        // 获取容器信息
+        _this.$axios.get('/equipment/getmodel/' + _this.eid, {})
+          .then(res => {
+            _this.equcode = res.data.Code
+            _this.titlename = `【容器-${res.data.Name}】`
+            // 4:液氮罐,19:贝尔Cryobiobank13K液氮罐;20:贝尔Cryobiobank13K_BloodBag液氮罐
+            if (res.data && (res.data.DItem === 4)) {
+              _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)) {
+              _this.yedanguanitem = res.data.DItem
+              if (res.data.DItem === 19) {
+                _this.yeshuyedanguanimgid = 'cryobiobank97Kimg'
+              } else {
+                _this.yeshuyedanguanimgid = 'cryobiobank97K_bloodbagimg'
+              }
+              // 加载特殊液氮罐
+              _this.drawyedanguancanvasbgimg()
+              _this.showcgshebei = false
+              _this.showtsyedanguan = true
+            } else {
+              _this.showtsyedanguan = false
+              _this.showcgshebei = true
+              _this.fridgebottomimg = _this.filehost + '/static/img/sampletypeimg/bottombx.png'
+            }
+          })
+          .catch({})
+      },
+      getsametypetreelist() {
+        let _this = this
+        // request
+        _this.$axios.get('/sampleorgan/gettreelist', {})
+          .then(res => {
+            _this.organlist2 = window.toolfun_gettreejson(res.data, 'id', 'pId', 'id,name,code')
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      getType() {
+        let _this = this
+        _this.$axios.get('/sampleinput/slist/' + this.eid, {})
+          .then(res => {
+            // response
+            _this.sampletypelist = []
+            for (var i = 0; i < res.data.currentItemCount; i++) {
+              _this.sampletypelist.push({
+                label: res.data.items[i].Name,
+                code: res.data.items[i].Code,
+                photo: res.data.items[i].Photo,
+                value: res.data.items[i].Id + ''
+              })
+            }
+          })
+      },
+      getpublickz() {
+        let _this = this
+        _this.$axios.get('/sampletype/getpublickzzd', {})
+          .then(res => {
+            // response
+            _this.publickzlist = res.data
+          })
+      },
+      getsampetypeunit() {
+        // 获取样本单位
+        let _this = this
+        _this.$axios.get('/sampletype/sunitajax', {})
+          .then(res => {
+            _this.sampeunitlist = res.data
+          })
+      },
+      openpreop() {
+        if (this.dchxtable === -1 || this.dchytable === -1) {
+          this.$message({
+            type: 'warning',
+            message: '请选择存储位置!'
+          })
+          return
+        }
+        if (this.sampleform.type_flag === 'edit') {
+          this.$message({
+            type: 'warning',
+            message: '当前位置已有样本!请选择其他存储位置!'
+          })
+          return
+        }
+        this.dialogFormVisible = true
+        var packnew = {
+          typelist: this.sampletypelist,
+          organlist: this.organlist,
+          cascade: this.organlist2
+        }
+        this.$store.dispatch('sampleNewModel', packnew)
+      },
+      location() {
+        let _this = this
+        // 获取查询样本编码
+        let station = _this.$route.query.station
+        if (station !== undefined && station !== '') {
+          _this.fristseach = true
+          let stationarr = station.split(';')
+          if (stationarr.length === 7) {
+            // 初始化特殊形态的液氮罐
+            if (_this.showtsyedanguan) {
+              let yedanguandatarrtrmp = []
+              if (_this.yedanguanitem === 20) {
+                yedanguandatarrtrmp = _this.yedanguanrongqiarr_13kbloodbag
+              } else {
+                yedanguandatarrtrmp = _this.yedanguanrongqiarr
+              }
+              for (let i = 0; i < yedanguandatarrtrmp.length; i++) {
+                if ((yedanguandatarrtrmp[i].XStation + '') === stationarr[0] && (yedanguandatarrtrmp[i].YStation +
+                    '') === stationarr[1]) {
+                  if (yedanguandatarrtrmp[i].type === 1) {
+                    _this.drawyedanguancavans({
+                      x: yedanguandatarrtrmp[i].x + 1,
+                      y: yedanguandatarrtrmp[i].y + 1
+                    })
+                  } else {
+                    _this.drawyedanguancavans({
+                      x: yedanguandatarrtrmp[i].x1 + 1,
+                      y: yedanguandatarrtrmp[i].y1 + 1
+                    })
+                  }
+                  break
+                }
+              }
+            }
+            _this.handleclk(stationarr[2] - 1, stationarr[3] - 1, stationarr[1], stationarr[0])
+            _this.locationparam = {
+              id: stationarr[6],
+              y: stationarr[5],
+              x: stationarr[4]
+            }
+          }
+        } else {
+          // 初始化特殊形态的液氮罐
+          if (_this.showtsyedanguan) {
+            if (_this.yedanguanitem === 20) {
+              _this.drawyedanguancavans({
+                x: 211,
+                y: 107
+              })
+            } else {
+              _this.drawyedanguancavans({
+                x: 135,
+                y: 46
+              })
+            }
+          }
+        }
+      },
+      goAnchor(selector) {
+        var anchor = this.$el.querySelector(selector)
+        anchor.scrollIntoView()
+      },
+      handleclk(xbox, ybox, xshelf, yshelf) {
+        // 清空状态
+        this.clearsampleform()
+        // 显示选中位置
+        this.checkinfomsg = `所选位置信息:【冻存架位置: 第${xshelf}行, 第${yshelf}列 冻存盒位置: 第${ybox + 1}行, 第${xbox + 1}列】`
+        this.checkshelvemsg = this.checkinfomsg
+        // request
+        let _this = this
+        var inputstr = _this.eid + ',' + yshelf + ',' + xshelf + ',' + (xbox + 1) + ',' + (ybox + 1)
+        _this.$axios.get('/shelfset/boxdraw/' + inputstr, {})
+          .then(res => {
+            // response
+            _this.selectedBox = res.data.Boxshelf
+            _this.boxSample = res.data.Boxsample
+            _this.TableHeight = _this.selectedBox.RowNum
+            _this.TableWidth = _this.selectedBox.ColumnNum
+            // 重置选择的冻存管
+            _this.dchxtable = -1
+            _this.dchytable = -1
+            // 如果是搜索进来的
+            if (_this.fristseach) {
+              _this.tableclk({
+                Id: _this.locationparam.id
+              }, _this.locationparam.y, _this.locationparam.x)
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+        // 修改颜色
+        this.xshelf = xshelf
+        this.yshelf = yshelf
+        this.xbox = xbox + 1
+        this.ybox = ybox + 1
+        this.dchxtable = -1
+        this.dchytable = -1
+      },
+      tableclk(v, x, y) {
+        this.checkinfomsg = this.checkshelvemsg +
+          `冻存管位置:【第${x}行,第${y}列】 (位置编码:${this.equcode}-${this.numtoupchar(this.xshelf)}${this.yshelf}-${this.numtoupchar(this.ybox)}${this.xbox}-${this.numtoupchar(x)}${y})`
+        // 清空状态
+        this.clearsampleform()
+        // 初始化界面
+        if (v != null) {
+          let _this = this
+          _this.sampleform.type_flag = 'edit'
+          _this.disabledsamplecode = true
+          _this.disabledbarcode = true
+          _this.disabledsampletype = true
+          _this.disabledsamplingorgan = true
+          _this.disabledsourcebutton = true
+          _this.disabledcheckprint = true
+          _this.diaabledreceiveDate = true
+          _this.diaabledyongjiu = true
+          _this.disabledsamplingsite = true
+          _this.disabledcapacity = true
+          _this.disabledunit = true
+          _this.disabledvaliditydate = true
+          _this.disabledbtnpreopera = true
+          _this.disabledgroup = true
+          _this.getsampoperainfobyid(v.Id)
+        } else { // 批量添加,如果点击的是空白位置会进入
+          this.setsampleinfobybatchparam()
+        }
+        if (this.Apply_flag) {
+          // 跳转
+          if (!this.fristseach) {
+            this.goAnchor('#equiinfocard')
+          } else {
+            this.fristseach = false
+          }
+        }
+        this.dchxtable = y
+        this.dchytable = x
+        this.xtable = x
+        this.ytable = y
+        // for (var i = 0; i < this.boxSample.length; i++) {
+        //   var pos = this.boxSample[i].Position
+        //   if (this.dchxtable + '' === pos.charAt(0) && this.dchytable + '' === pos.charAt(pos.length - 1)) {
+        //     this.clicksample = true
+        //     break
+        //   } else {
+        //     this.clicksample = false
+        //   }
+        // }
+      },
+      // 组织器官和取材部位的连接
+      chooseorgange(value) {
+        let _this = this
+        this.samplequcailist = []
+        this.getOrgan(value[value.length - 1])
+        // 获取样本编码
+        if (_this.sampleform.type_flag === 'add') {
+          if (_this.sampleform.code_default === 'true' && _this.sampleform.coderule_samplingorgan_flag === 1) {
+            if (_this.sampleform.coderule_sampletype_flag !== 1 || (_this.sampleform.coderule_sampletype_flag === 1 &&
+                _this.sampleform.SampleTypestr !== '')) {
+              let sampletypestr = _this.sampleform.SampleTypestr
+              let sampleselectedorgan = _this.selectedorgan[_this.selectedorgan.length - 1]
+              _this.getautobarcode(sampletypestr, sampleselectedorgan)
+            }
+          }
+        }
+      },
+      getOrgan(code) {
+        let _this = this
+        _this.$axios.get('/samplesite/getsitebyfcode?code=' + code, {})
+          .then(res => {
+            // response
+            for (var i = 0; i < res.data.length; i++) {
+              _this.samplequcailist.push({
+                label: res.data[i].Name,
+                value: res.data[i].Code
+              })
+            }
+            if (_this.sampleform.type_flag === 'add') {
+              if (_this.samplequcailist.length > 0) {
+                _this.sampleform.SamplingSite = _this.samplequcailist[0].value
+              } else {
+                _this.sampleform.SamplingSite = ''
+              }
+            }
+          })
+      },
+      choosetype(v) {
+        // 获取特有扩展
+        let _this = this
+        _this.groupnameList = []
+        _this.typetykzlist = []
+        if (v !== '') {
+          _this.$axios.get('/sampletype/gettykzzdgroup?SampleType=' + v, {})
+            .then(res => {
+              for (var i = 0; i < res.data.length; i++) {
+                if (res.data[i].GroupName != '') {
+                  _this.groupnameList.push(res.data[i].GroupName)
+                }
+              }
+              _this.Tabs = _this.groupnameList[0]
+              _this.getSpecialkz(v)
+              // if(_this.acc =='sBBo4' || _this.acc == 'ssqOy'){
+              let sampletypestr = _this.sampleform.SampleTypestr
+              _this.getautobarcode(sampletypestr)
+              // }  
+            })
+        }
+      },
+      getSpecialkz(v) {
+        // 获取特有扩展
+        let _this = this
+        if (v !== '') {
+          _this.$axios.get('/sampletype/gettykzzd?SampleType=' + v, {})
+            .then(res => {
+              _this.typetykzlist = res.data
+              // 获取样本类型数据
+              _this.getsampetypedata(v)
+            })
+        }
+      },
+      getsampetypedata(v) {
+        // 获取样本类型数据
+        let _this = this
+        _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
+          .then(res => {
+            // response
+            _this.sampleform.Capacitystr = res.data.SampleType.DefaultCapacity + ''
+            if (res.data.VHours === '5000-1-1 23:59:59') {
+              _this.sampleform.Isyongjiu = true
+            } else {
+              _this.sampleform.ValidityDatedate = new Date(res.data.VHours)
+              _this.sampleform.Isyongjiu = false
+            }
+            _this.sampleform.Unit = res.data.SampleType.Unit
+            if (_this.sampleform.code_default === 'true' && _this.sampleform.coderule_sampletype_flag === 1) {
+              if (_this.sampleform.coderule_samplingorgan_flag !== 1 || (_this.sampleform
+                  .coderule_samplingorgan_flag === 1 && _this.selectedorgan.length > 0)) {
+                let sampletypestr = _this.sampleform.SampleTypestr
+                let sampleselectedorgan = ''
+                if (_this.selectedorgan.length > 0) {
+                  sampleselectedorgan = _this.selectedorgan[_this.selectedorgan.length - 1]
+                }
+                _this.getautobarcode(sampletypestr, sampleselectedorgan)
+              }
+            }
+          })
+      },
+
+      gettykzandtovalue(val) {
+        // 获取特有扩展并赋值
+        if (val && val.SampleType > 0) {
+          let _this = this
+          _this.$axios.get('/sampletype/gettykzzd?SampleType=' + val.SampleType, {})
+            .then(res => {
+              // response
+              _this.typetykzlist = res.data
+              // 扩展赋值
+              for (let i = 0; i < this.typetykzlist.length; i++) {
+                this.typetykzlist[i].FieldDefault = val[this.typetykzlist[i].FieldName]
+              }
+            })
+        }
+      },
+
+      getautobarcode(samptype, samporg) {
+        // 获取自动编码
+        let _this = this
+        _this.$axios.get('/sampleoperation/getautobarcode?SampleType=' + samptype + '&fid=' + samporg, {})
+          .then(res => {
+            // response
+            _this.sampleform.code_lastnum = res.data.num
+            _this.sampleform.SampleCode = res.data.barcode
+          })
+      },
+      // 判断是否有冻存管图片位置,依据现在逻辑先调整
+      getiscontainsdcgimgweiz(stations, x, y) {
+        for (var i = 0; i < stations.length; i++) {
+          let dcgwzs = stations[i].Position.split(';')
+          if (dcgwzs.length === 2) {
+            if (dcgwzs[0] === x && dcgwzs[1] === y) {
+              return true
+            }
+          }
+        }
+        return false
+        // get tableclk
+      },
+      completeform() {
+        // 处理position string: euipid,冻存架位置,冻存盒位置,对勾位置,容量
+        this.sampleform.PositionStr = this.eid + ',' + this.yshelf + ',' + this.xshelf + ',' + this.xbox + ',' +
+          this.ybox + ',' + this.dchxtable + ',' + this.dchytable + ','
+        for (var i = 0; i < this.samplelist.length; i++) {
+          if (this.yshelf === this.samplelist[i].XStation && this.xshelf === this.samplelist[i].YStation) {
+            if (this.samplelist[i][this.numtoengs[this.ybox - 1] + this.xbox] === -1) {
+              this.sampleform.PositionStr += 100 / (this.selectedBox.RowNum * this.selectedBox.ColumnNum).toFixed(2)
+            } else {
+              this.sampleform.PositionStr += (this.samplelist[i][this.numtoengs[this.ybox - 1] + this.xbox] + 100 / (
+                this.selectedBox.RowNum * this.selectedBox.ColumnNum)).toFixed(2)
+            }
+            break
+          }
+        }
+        // 样本条码
+        this.sampleform.BarCode = this.sampleform.SampleCode + '-1'
+        // 类型、器官、部位的名称
+        for (var j = 0; j < this.sampletypelist.length; j++) {
+          if (this.sampleform.SampleTypestr === this.sampletypelist[j].value) {
+            this.sampleform.SampleTypeName = this.sampletypelist[j].label
+          }
+        }
+        // for (var k = 0; k < this.option2.length; k++) {
+        //   if (this.sampleform.SamplingSite.substring(0, 3) === this.option2[k].value) {
+        //     this.sampleform.zuzhi = this.option2[k].value
+        //     this.sampleform.zuzhiming = this.option2[k].label
+        //   }
+        // }
+        for (var x = 0; x < this.samplequcailist.length; x++) {
+          if (this.sampleform.SamplingSite === this.samplequcailist[x].value) {
+            this.sampleform.SamplingSiteName = this.samplequcailist[x].label
+          }
+        }
+      },
+      // 选择预录入样本
+      custompreoperaDialogCallback(val) {
+        let _this = this
+        _this.sampleform.type_flag = 'pre_add'
+        _this.disabledsamplecode = true
+        _this.disabledbarcode = true
+        _this.disabledsampletype = true
+        _this.disabledsamplingorgan = true
+        _this.disabledsourcebutton = true
+        _this.disabledcheckprint = true
+        _this.disabledgroup = true
+        this.getsampoperainfobyid(val.Id)
+      },
+      // 获取附件信息
+      getattachment(barcode, samplecode) {
+        let _this = this
+        let params = {
+          samplecode: samplecode,
+          barcode: barcode
+        }
+        this.$axios.get('/sampleoperation/getattachmentbysamplecode', {
+            params
+          })
+          .then(res => {
+            _this.achmentlist = res.data
+          }).catch(() => {})
+      },
+      clickachment(host, fid) {
+        window.open(`http://${host}/${fid}`)
+      },
+      getsampoperainfobyid(id) {
+        let _this = this
+        _this.sampleinfoid = id
+        _this.$axios.get('/sampleoperation/getsamplebyid?SamplesInfoId=' + id, {})
+          .then(res => {
+            // sampleinfodetail
+            // 分装提取复苏使用
+            _this.sampleinfodetail = res.data
+            // response
+            _this.sampleinfotype = res.data.SampleType + ''
+            _this.sampleform.BarCode = res.data.BarCode
+            _this.sampleform.SampleCode = res.data.SampleCode
+            _this.sampleform.SampleTypestr = res.data.SampleType + ''
+            _this.getparentcodebytopcode(res.data.SamplingOrgan)
+            _this.sampleform.SamplingSite = res.data.SamplingSite
+            _this.sampleform.Name = res.data.Name
+            if (res.data.ReceiveDate.substring(0, 3) === '000') {
+              _this.sampleform.ReceiveDatedate = null
+            } else {
+              _this.sampleform.ReceiveDatedate = new Date(res.data.ReceiveDate)
+            }
+            if (res.data.ValidityDate.substring(0, 3) === '000') {
+              _this.sampleform.Isyongjiu = false
+              _this.sampleform.ValidityDatedate = null
+            } else if (res.data.ValidityDate.substring(0, 4) === '5000') {
+              _this.sampleform.Isyongjiu = true
+              _this.sampleform.ValidityDatedate = null
+            } else {
+              _this.sampleform.Isyongjiu = false
+              _this.sampleform.ValidityDatedate = new Date(res.data.ValidityDate)
+            }
+            _this.sampleform.Capacitystr = res.data.Capacity + ''
+            _this.sampleform.Unit = res.data.Unit
+            _this.sampleform.InnerCode = res.data.InnerCode
+            _this.sampleform.Remark = res.data.Remark
+            _this.sampleform.SourceId = res.data.SourceId
+            _this.sampleform.SourceIdCard = res.data.SourceIdCard
+            _this.sampleform.SourceName = res.data.SourceName
+            // 录入人
+            let iscontaincreateuser = false
+            for (var i = 0; i < _this.userlist.length; i++) {
+              if (_this.userlist[i].Id == res.data.CreateUserId) {
+                iscontaincreateuser = true
+                break
+              }
+            }
+            if (!iscontaincreateuser && res.data.CreateBy != '') {
+              _this.userlist.unshift({
+                'Id': res.data.CreateUserId,
+                'Realname': res.data.CreateBy
+              })
+            }
+            _this.sampleform.CreateUserId = res.data.CreateUserId
+            // 给公共扩展信息赋值
+            for (let i = 0; i < _this.publickzlist.length; i++) {
+              _this.publickzlist[i].FieldDefault = res.data[_this.publickzlist[i].FieldName]
+            }
+            //获取所属分组
+            if (_this.acc == 'sryms') {
+              _this.getGroup(res.data.BarCode)
+            }
+            // 获取特有扩展并给特有扩展信息赋值
+            _this.gettykzandtovalue(res.data)
+            //获取附件信息
+            _this.getattachment(res.data.BarCode, res.data.SampleCode)
+          })
+      },
+      getGroup(val) {
+        this.$axios.get('samplesgroup/groupbybarcode/' + val, {})
+          .then(res => {
+            this.GroupIdOption = [];
+            if (res.data.GroupId != "") {
+              let tempArr = res.data.GroupId.split(',');
+              for (let idx in tempArr) {
+                this.GroupIdOption.push(parseInt(tempArr[idx]));
+              }
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      setsampleinfobybatchparam(id) {
+        let _this = this
+        if (_this.batchstorages.length > 0) {
+          let val = _this.batchstorages[0]
+          _this.sampleform.BarCode = val.BarCode
+          _this.sampleform.SampleCode = val.SampleCode
+          _this.sampleform.SampleTypestr = val.SampleTypeId + ''
+          _this.sampleform.Capacitystr = val.SampleSize
+          _this.sampleform.Unit = val.SampleUnit
+          _this.sampleform.SourceId = val.SampleSourceId
+          _this.sampleform.SourceIdCard = val.IdCard
+          _this.sampleform.SourceName = val.Name
+        }
+      },
+      customsampsourceDialogCallback(val) {
+        this.sampleform.SourceId = val.Id
+        this.sampleform.SourceIdCard = val.IdCard
+        this.sampleform.SourceName = val.Name
+      },
+      animalDialogCallback(val) {
+        this.sampleform.SourceId = val.Id
+        this.sampleform.SourceName = val.Name
+      },
+      microDialogCallback(val) {
+        this.sampleform.SourceId = val.Id
+        this.sampleform.SourceName = val.Name
+      },
+      getparentcodebytopcode(v) {
+        let _this = this
+        _this.$axios.get('/sampleorgan/getparentcodebytopcode/' + v, {})
+          .then(res => {
+            _this.selectedorgan = []
+            let pidarr = res.data.split(',')
+            for (var i = pidarr.length - 1; i >= 0; i--) {
+              if (pidarr[i] !== '0') {
+                _this.selectedorgan.push(pidarr[i])
+              }
+            }
+            _this.getOrgan(_this.selectedorgan[_this.selectedorgan.length - 1])
+          })
+      },
+      getkuozhandata() {
+        // 拼接扩展字段
+        let _this = this
+        let jsonstr = ''
+        // 公共扩展
+        for (let i = 0; i < _this.publickzlist.length; i++) {
+          jsonstr += '"' + _this.publickzlist[i].FieldName + '" : "' + _this.publickzlist[i].FieldDefault + '",'
+        }
+        // 特有扩展
+        for (let i = 0; i < _this.typetykzlist.length; i++) {
+          jsonstr += '"' + _this.typetykzlist[i].FieldName + '" : "' + _this.typetykzlist[i].FieldDefault + '",'
+        }
+        jsonstr = '{' + jsonstr.substring(0, jsonstr.length - 1) + '}'
+        return jsonstr
+      },
+      // 保存当前样本(若不存在,添加)
+      savesample(value) {
+        // this.completeform()
+        // 增加上传附件判断
+        if (!this.attachissuccess()) {
+          return
+        }
+        // 获取附件信息
+        this.getattachissuccess()
+        let _this = this
+        this.$refs['samplemanageform'].validate((valid) => {
+          if (valid) {
+            if (this.dchxtable === -1 || this.dchytable === -1) {
+              this.$message({
+                type: 'warning',
+                message: '请选择存储位置!'
+              })
+              return
+            }
+            if (this.dchxtable !== -1 && this.dchytable !== -1) {
+              // 所选器官
+              if (_this.selectedorgan.length > 0) {
+                _this.sampleform.SamplingOrgan = _this.selectedorgan[_this.selectedorgan.length - 1]
+              }
+              // 拼接扩展字段
+              let jsonstr = _this.getkuozhandata()
+              // 转换为json对象
+              let jsonobj = JSON.parse(jsonstr)
+              // 拼接两个对象
+              _this.sampleform.CreateBy = _this.$refs.reflrrselect.selectedLabel
+              let params = _this.sampleform
+              params = Object.assign(params, jsonobj)
+              // 位置冰箱等信息
+              let parweizi = {
+                eid: this.eid,
+                x_shelf: this.yshelf + '',
+                y_shelf: this.xshelf + '',
+                x_box: this.xbox + '',
+                y_box: this.ybox + '',
+                min_x: this.dchxtable + '',
+                min_y: this.dchytable + ''
+              }
+              // 拼接
+              params = Object.assign(params, parweizi)
+              // 时间格式数据拼接
+              if (_this.sampleform.ReceiveDatedate && _this.sampleform.ReceiveDatedate.getTime() > 0) {
+                params = Object.assign(params, {
+                  ReceiveDateint: _this.sampleform.ReceiveDatedate.getTime()
+                })
+              }
+              if (_this.sampleform.ValidityDatedate && _this.sampleform.ValidityDatedate.getTime() > 0) {
+                params = Object.assign(params, {
+                  ValidityDateint: _this.sampleform.ValidityDatedate.getTime()
+                })
+              }
+              if (_this.batchstorages.length > 0) {
+                params = Object.assign(params, {
+                  SampleMainlist: _this.batchstorages
+                })
+              }
+              if (_this.GroupIdOption.length > 0) {
+                _this.GroupId = _this.GroupIdOption.join(',');
+                let tempOfficers = [];
+                for (let idx in this.GroupIdOption) {
+                  let selectId = this.GroupIdOption[idx];
+                  for (let idx2 in this.groupList) {
+                    let item = this.groupList[idx2];
+                    if (item.Id == selectId) {
+                      tempOfficers.push(item.Value);
+                      break;
+                    }
+                  }
+                }
+                _this.GroupName = tempOfficers.join(',');
+              }
+              _this.$axios.post('/sampleoperation?batchitem=' + _this.batchitem + '&groupid=' + _this.GroupId +
+                  '&groupname=' +
+                  _this.GroupName, params)
+                .then(res => {
+                  // response
+                  if (res.data.code === 0) {
+                    this.$message({
+                      type: 'success',
+                      message: res.data.message
+                    })
+                    // _this.clearsampleform()
+                    // _this.clicksample = false
+                    // 保存并新增
+                    // if (value === 1) {
+                    //   _this.sampleform.BarCode = _this.sampleform.BarCode.substring(0, _this.sampleform.BarCode.length - 3) + (parseInt(_this.sampleform.BarCode.charAt(_this.sampleform.BarCode.length - 3)) + 1) + _this.sampleform.BarCode.substring(_this.sampleform.BarCode.length - 2, _this.sampleform.BarCode.length)
+                    // } else { // 保存并新增分管
+                    //   _this.sampleform.BarCode = _this.sampleform.BarCode.substring(0, _this.sampleform.BarCode.length - 1) + (parseInt(_this.sampleform.BarCode.charAt(_this.sampleform.BarCode.length - 1)) + 1)
+                    // }
+                    _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
+                    _this.goAnchor('#equishelfcard')
+                    // 清空上传附件
+                    _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)
+                    // 回到顶部
+                    _this.goAnchor('#equishelfcard')
+                    // 自动打印
+                    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.goAnchor('#equishelfcard')
+                    // 清空上传附件
+                    _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
+                    })
+                  }
+                })
+                .catch(err => {
+                  // handle error
+                  console.error(err)
+                })
+            } else {
+              this.$message({
+                type: 'warning',
+                message: '请选择冻存管位置!'
+              })
+            }
+          }
+        })
+      },
+      editsave() {
+        if (this.sampleform.BarCode === '') {
+          this.$message({
+            type: 'warning',
+            message: '数据有误,请重试!'
+          })
+          return
+        }
+        if (this.sampleform.type_flag !== 'edit') {
+          this.$message({
+            type: 'warning',
+            message: '操作不合法,请重试!'
+          })
+          return
+        }
+        // 增加上传附件判断
+        if (!this.attachissuccess()) {
+          return
+        }
+        // 获取附件信息
+        this.getattachissuccess()
+        let _this = this
+        // 拼接扩展字段
+        let jsonstr = _this.getkuozhandata()
+        // 转换为json对象
+        let jsonobj = JSON.parse(jsonstr)
+        // 拼接两个对象
+        let params = _this.sampleform
+        params = Object.assign(params, jsonobj)
+        _this.$axios.put('/sampleoperation/editsampe?BarCode=' + this.sampleform.BarCode, params)
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              // 清空上传附件
+              _this.$refs.refuploadattach.clearFiles()
+              // 获取附件信息
+              _this.getattachment(_this.sampleform.BarCode, _this.sampleform.SampleCode)
+            } else {
+              this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      SaveApply(value) {
+        let _this = this
+        if (this.dchxtable === -1 || this.dchytable === -1) {
+          this.$message({
+            type: 'warning',
+            message: '请选择存储位置!'
+          })
+          return
+        }
+        if (this.dchxtable !== -1 && this.dchytable !== -1) {
+          // 位置冰箱等信息
+          let params = {
+            eid: this.eid,
+            x_shelf: this.yshelf + '',
+            y_shelf: this.xshelf + '',
+            x_box: this.xbox + '',
+            y_box: this.ybox + '',
+            min_x: this.dchxtable + '',
+            min_y: this.dchytable + ''
+          }
+
+          if (_this.batchstorages.length > 0) {
+            params = Object.assign(params, {
+              SampleMainlist: _this.batchstorages
+            })
+          }
+          _this.$axios.post('/sampleoperation/applyin', params)
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
+                _this.goAnchor('#equishelfcard')
+                //清空缓存数据
+                _this.batchstorages = []
+                store.set('batchstorages', _this.batchstorages)
+                _this.$router.push({
+                  path: '/biobank/sampleRK',
+                  query: {}
+                })
+              } 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.goAnchor('#equishelfcard')
+                //清空缓存数据
+                _this.batchstorages = []
+                store.set('batchstorages', _this.batchstorages)
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          this.$message({
+            type: 'warning',
+            message: '请选择冻存管位置!'
+          })
+        }
+      },
+      blursamplecode() {
+        let _this = this
+        if (_this.sampleform.SampleCode !== '') {
+          _this.$axios.get('/sampleoperation/getsamplebysamplecode?samplecode=' + this.sampleform.SampleCode, {})
+            .then(res => {
+              // response
+              if (res.data.SampleCode !== '') {
+                _this.disabledsamplecode = true
+                _this.disabledsampletype = true
+                _this.disabledsamplingorgan = true
+                _this.disabledsourcebutton = true
+                _this.sampleform.BarCode = ''
+                _this.sampleform.SampleCode = res.data.SampleCode
+                _this.sampleform.SampleTypestr = res.data.SampleType + ''
+                _this.getparentcodebytopcode(res.data.SamplingOrgan)
+                _this.sampleform.SamplingSite = res.data.SamplingSite
+                _this.sampleform.Name = res.data.Name
+                _this.sampleform.SourceId = res.data.SourceId
+                _this.sampleform.SourceIdCard = res.data.SourceIdCard
+                _this.sampleform.SourceName = res.data.SourceName
+                if (res.data.ReceiveDate.substring(0, 3) === '000') {
+                  _this.sampleform.ReceiveDatedate = null
+                } else {
+                  _this.sampleform.ReceiveDatedate = new Date(res.data.ReceiveDate)
+                }
+                _this.geteditsampetypedata(_this.sampleform.SampleTypestr)
+                // 给公共扩展信息赋值
+                for (let i = 0; i < _this.publickzlist.length; i++) {
+                  _this.publickzlist[i].FieldDefault = res.data[_this.publickzlist[i].FieldName]
+                }
+                // 获取特有扩展并给特有扩展信息赋值
+                _this.gettykzandtovalue(res.data)
+              }
+            })
+        }
+      },
+      geteditsampetypedata(v) {
+        // 获取样本类型数据
+        let _this = this
+        _this.$axios.get('/sampletype/sampletypeajax?id=' + v, {})
+          .then(res => {
+            // response
+            _this.sampleform.Capacitystr = res.data.SampleType.DefaultCapacity + ''
+            if (res.data.VHours === '5000-1-1 23:59:59') {
+              _this.sampleform.Isyongjiu = true
+            } else {
+              _this.sampleform.ValidityDatedate = new Date(res.data.VHours)
+              _this.sampleform.Isyongjiu = false
+            }
+          })
+      },
+      saveandadd(value) {
+        this.savesample(value)
+        // 控制坐标
+        // this.teststr = this.teststr.substring(0, this.teststr.length - 3) + (parseInt(this.teststr.charAt(this.teststr.length - 3)) + 1) + this.teststr.substring(this.teststr.length - 2, this.teststr.length)
+        if (this.dchxtable >= this.TableWidth) {
+          if (this.dchytable >= this.TableHeight) {
+            this.$message({
+              type: 'warning',
+              message: '超出冻存盒界限!'
+            })
+          } else {
+            this.dchxtable = 1
+            this.dchytable++
+          }
+        } else {
+          this.dchxtable++
+        }
+      },
+      clearsampleform() {
+        this.disabledbarcode = false
+        this.disabledsamplecode = false
+        this.disabledsampletype = false
+        this.disabledsamplingorgan = false
+        this.disabledvaliditydate = false
+        this.disabledsourcebutton = false
+        this.disabledcheckprint = false
+        this.diaabledreceiveDate = false
+        this.diaabledyongjiu = false
+        this.disabledsamplingsite = false
+        this.disabledcapacity = false
+        this.disabledunit = false
+        this.disabledbtnpreopera = false
+        this.disabledgroup = false
+        this.sampleform.BarCode = ''
+        this.sampleform.SampleCode = ''
+        this.sampleform.SampleTypestr = ''
+        this.sampleform.SampleTypeName = ''
+        this.sampleform.Name = ''
+        this.selectedorgan = []
+        this.sampleform.SamplingSite = ''
+        this.sampleform.ReceiveDatedate = new Date()
+        this.sampleform.ValidityDatedate = ''
+        this.sampleform.Isyongjiu = false
+        this.sampleform.InnerCode = ''
+        this.sampleform.Remark = ''
+        this.sampleform.CreateUserId = this.authUser.Profile.Id
+        this.sampleform.type_flag = 'add'
+        this.sampleinfoid = 0
+        if (this.Apply_flag) {
+          // 清空特有扩展
+          this.sampleform.typetykzlist = []
+          this.$refs['samplemanageform'].resetFields()
+          // 清空上传数据
+          this.$refs.refuploadattach.clearFiles()
+          this.achmentlist = []
+        }
+      },
+      deletedata() {
+        let _this = this
+        if (_this.sampleinfoid > 0) {
+          this.$confirm('此操作将永久删除该样本, 是否继续?', '提示', {
+            confirmButtonText: '确定',
+            cancelButtonText: '取消',
+            type: 'warning'
+          }).then(() => {
+            _this.$axios.delete('sampleinput/' + _this.sampleinfoid + '?sampletype=' + _this.sampleinfotype, null)
+              .then(res => {
+                // response
+                if (res.data.code === 0) {
+                  _this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  // 更新界面
+                  _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
+                  _this.goAnchor('#equishelfcard')
+                } else {
+                  _this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(() => {})
+          }).catch(() => {})
+        }
+      },
+      downloadEquip() {
+        let _this = this
+        _this.$axios.put('/sampleoperation/downloaddata/' + '2_' + this.titlename.substring(1, this.titlename.length -
+            1) + '_' + this.eid + '_' + this.yshelf + '_' + this.xshelf + '_' + this.xbox + '_' + this.ybox, {})
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: '下载成功!'
+              })
+              window.location.href = 'http://' + res.data.message
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+
+      downloadBox() {
+        if (this.xshelf === -1 || this.yshelf === -1 || this.xbox === -1 || this.ybox === -1) {
+          this.$message({
+            type: 'warning',
+            message: '请选择合适位置!'
+          })
+        } else if (this.TableWidth === 0 || this.TableHeight === 0) {
+          this.$message({
+            type: 'warning',
+            message: '请先添加冻存盒!'
+          })
+        } else {
+          let _this = this
+          _this.$axios.put('/sampleoperation/downloaddata/' + '1_' + this.titlename.substring(1, this.titlename.length -
+              1) + '_' + this.eid + '_' + this.yshelf + '_' + this.xshelf + '_' + this.xbox + '_' + this.ybox, {})
+            .then(res => {
+              // response
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: '下载成功!'
+                })
+                window.location.href = 'http://' + res.data.message
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        }
+      },
+
+      showEquipemplate() {
+        let _this = this
+        _this.$axios.get('/sampleoperation/templateNames', {})
+          .then(res => {
+            if (res.data.items && res.data.items.length > 0) {
+              _this.downloadTemplates = res.data.items
+            } else {
+              _this.downloadTemplates = [{
+                Name: "默认模版"
+              }]
+            }
+            _this.downloadTemplateName = _this.downloadTemplates[0].Name
+            this.downloadEquipVisible = true
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+
+      showBoxTemplate() {
+        if (this.xshelf === -1 || this.yshelf === -1 || this.xbox === -1 || this.ybox === -1) {
+          this.$message({
+            type: 'warning',
+            message: '请选择合适位置!'
+          })
+          return
+        } else if (this.TableWidth === 0 || this.TableHeight === 0) {
+          this.$message({
+            type: 'warning',
+            message: '请先添加冻存盒!'
+          })
+          return
+        }
+
+        let _this = this
+        _this.$axios.get('/sampleoperation/templateNames', {})
+          .then(res => {
+            if (res.data.items && res.data.items.length > 0) {
+              _this.downloadTemplates = res.data.items
+            } else {
+              _this.downloadTemplates = [{
+                Name: "默认模版"
+              }]
+            }
+            _this.downloadTemplateName = _this.downloadTemplates[0].Name
+            this.downloadBoxVisible = true
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+
+
+      downloadEquip2() {
+        let _this = this
+        _this.$axios.get('/sampleoperation/downloaddata/' + '2_' + this.titlename.substring(1, this.titlename.length -
+              1) + '_' + this.eid + '_' + this.yshelf + '_' + this.xshelf + '_' + this.xbox + '_' + this.ybox +
+            "?templateName=" + this.downloadTemplateName, {})
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: '下载成功!'
+              })
+              window.location.href = 'http://' + res.data.message
+            }
+            this.downloadEquipVisible = false
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+
+      downloadBox2() {
+        let _this = this
+        _this.$axios.get('/sampleoperation/downloaddata/' + '1_' + this.titlename.substring(1, this.titlename.length -
+              1) + '_' + this.eid + '_' + this.yshelf + '_' + this.xshelf + '_' + this.xbox + '_' + this.ybox +
+            "?templateName=" + this.downloadTemplateName, {})
+          .then(res => {
+            // response
+            if (res.data.code === 0) {
+              this.$message({
+                type: 'success',
+                message: '下载成功!'
+              })
+              window.location.href = 'http://' + res.data.message
+            }
+            this.downloadBoxVisible = false
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+
+      importData() {
+        let _this = this
+        if (_this.exportfilepath === '') {
+          _this.$message({
+            type: 'warning',
+            message: '请先上传导入文件!'
+          })
+          return
+        }
+        _this.$axios.put('/sampleoperation/importdata', {
+            URL: this.exportfilepath
+          })
+          .then(res => {
+            if (res.data.code === 0) {
+              _this.$message({
+                type: 'success',
+                message: res.data.message
+              })
+              _this.exportVisible = false
+              _this.exportfilepath = ''
+              _this.exportmsg = '未选择文件'
+              // 更新界面
+              _this.initData()
+              _this.handleclk(_this.xbox - 1, _this.ybox - 1, _this.xshelf, _this.yshelf)
+            } else {
+              _this.$message({
+                type: 'warning',
+                message: res.data.message
+              })
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+      handleexportfileSuccess(res, file) {
+        this.exportfilepath = res
+      },
+      beforeexportfileUpload(file) {
+        let i = file.name.lastIndexOf('.')
+        let typename = ''
+        if (i > -1) {
+          typename = file.name.substring(i)
+        }
+        let istype = (typename === '.xlsx')
+        let isLt50k = file.size / 1024 / 1024 / 2 < 1
+        if (!istype) {
+          this.$message.error('上传导入文件只能是 xlsx 格式!')
+          return false
+        }
+        if (!isLt50k) {
+          this.$message.error('上传导入文件大小不能超过 2M!')
+          return false
+        }
+        this.exportmsg = '上传文件:' + file.name
+        return true
+      },
+      refreshcbc() {
+        let _this = this
+        _this.downloading = true
+        // request
+        this.$axios.put('/equipment/refresh', {})
+          .then(res => {
+            // response
+            this.$message({
+              type: 'success',
+              message: '刷新冻存盒状态完成!'
+            })
+            _this.downloading = false
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+            _this.downloading = false
+          })
+      },
+      recoverydialogcallback(v) {
+        this.handleclk(this.xbox - 1, this.ybox - 1, this.xshelf, this.yshelf)
+        // 回到顶部
+        this.goAnchor('#equishelfcard')
+      },
+      numtoupchar(num) {
+        return String.fromCharCode(64 + parseInt(num))
+      },
+      goback() {
+        if (this.$route.query.size) {
+          this.$router.push({
+            name: this.$route.query.pname,
+            query: {
+              size: this.$route.query.size,
+              currentPage: this.$route.query.currentPage
+            }
+          })
+        } else {
+          this.$router.go(-1)
+        }
+      },
+      getuserlist() {
+        this.$axios.get('users/list', {})
+          .then(res => {
+            // response
+            if (res.data.items) {
+              this.userlist = res.data.items
+            }
+            this.userlist.unshift({
+              'Id': this.authUser.Profile.Id,
+              'Realname': this.authUser.Profile.Realname
+            })
+            this.sampleform.CreateUserId = this.authUser.Profile.Id
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+      },
+
+      //获取当前上传图片字段
+      getitem(val) {
+        this.imagefiles = ''
+        this.imagefilelist = []
+        this.ImageTitle = val.Name
+        //显示已存储图片
+        if (val.FieldDefault != '') {
+          let imagearr = []
+          imagearr = val.FieldDefault.split('|')
+          for (var i = 0; i < imagearr.length; i++) {
+            if (imagearr[i] !== '') {
+              this.imagefilelist.unshift({
+                'name': 'picture - ' + (i + 1),
+                'url': 'http://' + imagearr[i]
+              })
+            }
+          }
+          this.imagefiles = val.FieldDefault
+        }
+        this.imageDialog = true
+        this.extendId = val.Id
+      },
+
+      beforeAvatarUpload(file) {
+        const isJPG = (file.type.indexOf('image/') === 0)
+        const isLt2M = file.size / 1024 / 1024 < 10
+        if (!isJPG) {
+          this.$message.error('上传影像文件只能是 图片 格式!')
+          return false
+        }
+        if (!isLt2M) {
+          this.$message.error('上传影像图片大小不能超过 1MB!')
+          return false
+        }
+        return true
+      },
+      handlePictureCardPreview(file) {
+        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) {
+            this.animalextends[i].FieldDefault = this.animalextends[i].FieldDefault +
+              `${this.uploadimg.url}/${this.uploadimg.fid}|`
+          }
+        }
+        this.imagefiles = ''
+      },
+      handleRemove(file, fileList) {
+        console.log(this.imagefilelist);
+        for (var i = 0; i < this.imagefilelist.length; i++) {
+          if (this.imagefilelist[i].uid != file.uid) {
+            this.imagenewlist = this.imagenewlist + this.imagefilelist[i].url.substring(7, 42) + `|`
+          }
+        }
+        for (var j = 0; j < this.animalextends.length; j++) {
+          if (this.animalextends[j].Id == this.extendId) {
+            this.animalextends[j].FieldDefault = this.imagenewlist
+          }
+        }
+      },
+
+      getGrouplist() {
+        let _this = this
+        _this.$axios.get('/samplesgroup/grouplist', {})
+          .then(res => {
+            _this.groupList = res.data
+          })
+      },
+      contains(strs, str) {
+        let arrs = strs.split(',')
+        for (let v in arrs) {
+          if (arrs[v] === (str + '')) return true
+        }
+        return false
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss" scoped>
+  .ulbgcolor div {
+    float: left;
+  }
+
+  .hoverdiv:hover {
+    box-shadow: 0 0 4px rgba(0, 0, 0, .4);
+    transform: scale(1.15);
+  }
+
+  .tablebox {
+    .sampletablemanage {
+      margin-left: -60px;
+      border-collapse: collapse;
+
+      td {
+        width: 20px;
+        height: 20px;
+      }
+
+      td:hover {
+        box-shadow: 0 0 5px rgba(0, 0, 0, .4);
+        transform: scale(1.15);
+      }
+
+      .visibletd {
+        border: 2px solid #A2B5CD;
+        width: 20px;
+        height: 20px;
+        text-align: center;
+        background: url(/assets/img/yuan.png);
+        background-size: 100% 100%;
+      }
+    }
+
+    width: 530px;
+    height: 440px;
+    position: relative;
+    display: inline-block;
+    float: left;
+    padding-left: 50px;
+  }
+
+  .exbar {
+    margin: 25px 0px 25px 250px;
+
+    .bar1 {
+      width: 20px;
+      height: 20px;
+      background-color: #EAEAEA;
+      display: inline-block;
+    }
+
+    .bar2 {
+      width: 20px;
+      height: 20px;
+      background-color: #13CE66;
+      display: inline-block;
+    }
+
+    .bar3 {
+      width: 20px;
+      height: 20px;
+      background-color: #FF4949;
+      display: inline-block;
+    }
+
+    .bar4 {
+      width: 20px;
+      height: 20px;
+      background-color: #D1EEEE;
+      display: inline-block;
+    }
+
+    .bar5 {
+      width: 20px;
+      height: 20px;
+      background-color: #20A0FF;
+      display: inline-block;
+    }
+
+    .bar6 {
+      width: 20px;
+      height: 20px;
+      background-color: #1E90FF;
+      display: inline-block;
+    }
+
+    .bar7 {
+      width: 20px;
+      height: 20px;
+      background-color: #000080;
+      display: inline-block;
+    }
+
+    .text0 {
+      width: 60px;
+      height: 20px;
+      display: inline-block;
+    }
+
+    .text1 {
+      width: 110px;
+      height: 20px;
+      display: inline-block;
+    }
+  }
+
+  .image {
+    width: 32px;
+    height: 32px;
+    display: block;
+    position: absolute;
+    padding-left: 5px;
+    margin-top: -17px;
+  }
+
+  .divdcgnull {
+    width: 32px;
+    height: 32px;
+    display: block;
+    position: absolute;
+    padding-left: 5px;
+    margin-top: -17px;
+  }
+
+  .fridge {
+    width: 576px;
+    height: 110px;
+    margin-left: 13px;
+  }
+
+  .worklisticolist {
+    font-size: 14px;
+    margin-bottom: 12px;
+  }
+
+  .worklisticolist i:not(:first-child) {
+    margin-left: 4px;
+  }
+
+  .worklisticolist i {
+    margin-right: 3px;
+  }
+
+  .tdborder {
+    border: 1px solid #A2B5CD;
+  }
+
+  .tdtopborder {
+    border-top: 5px solid #A2B5CD;
+  }
+
+  .tdleftborder {
+    border-left: 5px solid #A2B5CD;
+  }
+
+  .tdrightborder {
+    border-right: 5px solid #A2B5CD;
+  }
+
+</style>
+<style type="text/css">
+  .donorsggextendcard .el-card__header {
+    padding: 5px 10px;
+    font-size: 10px;
+  }
+
+  .donorsggextendcard .el-card__body {
+    padding: 5px;
+    margin: -11px 0;
+  }
+
+  .attach-uploader .el-upload {
+    border: 1px dashed #63B8FF;
+    cursor: pointer;
+    position: relative;
+    overflow: hidden;
+    margin-bottom: -17px;
+  }
+
+  .attach-uploader .el-upload:hover {
+    border-color: #228B22;
+  }
+
+  .attach-uploader-icon {
+    font-size: 25px;
+    color: #63B8FF;
+    width: 50px;
+    height: 50px;
+    line-height: 50px;
+    text-align: center;
+  }
+
+  .attach-uploader-icon:hover {
+    color: #228B22;
+  }
+
+</style>

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/shelfset.vue

@@ -455,8 +455,8 @@
             this.shelfCheckAll = true
             this.shelfVisible = true
             this.disableop = false
-            this.operationform.xshelf = this.xshelf
-            this.operationform.yshelf = this.yshelf
+            this.operationform.xshelf = this.xshelf //列
+            this.operationform.yshelf = this.yshelf //层
             this.operationform.eid = this.equipid + '_' + seed
             this.checkedsampetype = this.option2
             this.operationform.barcode = 'FF201710271534'

+ 1020 - 0
src/dashoo.cn/frontend_web/src/pages/equipment/_opera/shelfset_new.vue

@@ -0,0 +1,1020 @@
+<style>
+  .input-with-select .el-select .el-input {
+    width: 110px;
+  }
+
+  .input-with-select .el-input-group__append {
+    background-color: #fff;
+  }
+
+</style>
+
+<template>
+  <div>
+    <el-card style="min-height: calc(100vh - 92px);">
+      <div slot="header" style="height: 20px;">
+        <span style="float: left;">
+          <i class="icon icon-table2"></i>
+        </span>
+        <el-breadcrumb class="heading" style="float: left; margin-left: 5px">
+          <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+          <el-breadcrumb-item :to="{ path: '/equipment' }">容器管理</el-breadcrumb-item>
+          <el-breadcrumb-item>容器设置 【{{ename}}】</el-breadcrumb-item>
+        </el-breadcrumb>
+        <span style="float: right;">
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="opforequip(0)">冻存架添加</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="opforequip(2)">修改</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="deletedata(0)">删除</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="moveforequip(0)">移动</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="copyforequip(0)">复制到</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 15px"
+            @click="opforequip(1)">冻存盒添加</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="opforequip(3)">修改</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="deletedata(1)">删除</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="moveforequip(1)">移动</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 5px"
+            @click="copyforequip(1)">复制到</el-button>
+          <el-button size="mini" type="primary" class="el-button--small" style="margin-left: 8px" @click="goback">返回
+          </el-button>
+        </span>
+      </div>
+
+      <el-radio-group v-model="isCollapse" style="margin-bottom: 20px;">
+        <el-radio-button :label="false">展开</el-radio-button>
+        <el-radio-button :label="true">收起</el-radio-button>
+      </el-radio-group>
+      <el-menu :collapse="isCollapse" class="el-menu-vertical-demo" default-active="/" :collapse-transition="false"
+        @select="handleSelect">
+        <template v-for="item in layerList">
+          <el-submenu v-if="item.Children" :index="item.Realname" :key="item.Id">
+            <template slot="title">
+              <i class="el-icon-menu" style="margin-right: 10px;"></i>
+              <span slot="title">{{ item.Realname }}</span>
+            </template>
+            <template v-for="column in item.Children">
+              <el-submenu :index="column.Realname" :key="column.Id">
+                <template slot="title">
+                  <i class="el-icon-setting" style="margin-right: 10px;"></i>
+                  <span slot="title">{{ column.Realname }}</span>
+                </template>
+
+                <template v-for="menus in samplelist" v-if="menus.YStation == item.Id && menus.XStation == column.Id">
+                  <el-submenu v-for="layer in menus.XYList" :index="layer.Realname" :key="layer.Id">
+                    <template slot="title">
+                      <span slot="title">{{ layer.Realname }}</span>
+                    </template>
+                    <el-menu-item v-for="location in layer.Children" :index="location.Realname" :key="location.Id">
+                      <i class="el-icon-location" style="margin-right: 10px;"></i>
+                      <span slot="title">{{ location.Realname }}</span>
+                    </el-menu-item>
+                  </el-submenu>
+                </template>
+              </el-submenu>
+            </template>
+          </el-submenu>
+        </template>
+      </el-menu>
+
+    </el-card>
+
+    <!--添加冻存盒用的对话框-->
+    <el-dialog :title="dialogtitle" :visible.sync="boxVisible">
+      <el-form>
+        <el-form-item label="冻存盒位置" :label-width="labelWidth">
+          <el-col :span="10">
+            <el-input-number v-model="operationform.xshelf" :min="1" disabled style="width: 100%"></el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">层</el-col>
+          <el-col :span="10">
+            <el-input-number v-model="operationform.yshelf" :min="1" disabled style="width: 100%"></el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">列</el-col>
+        </el-form-item>
+        <el-form-item label="条形码" required :label-width="labelWidth">
+          <el-input v-model="operationform.barcode"></el-input>
+        </el-form-item>
+        <el-form-item label="冻存盒大小" required :label-width="labelWidth">
+          <el-col :span="10">
+            <el-input-number v-model="operationform.boxxvalue" :min="1" :disabled="disableop2" style="width: 100%">
+            </el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">行</el-col>
+          <el-col :span="10">
+            <el-input-number v-model="operationform.boxyvalue" :min="1" :disabled="disableop2" style="width: 100%">
+            </el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">列</el-col>
+        </el-form-item>
+        <el-form-item label="样本类型" :label-width="labelWidth">
+          <div class="deviceaddsamptype">
+            <el-checkbox-group v-model="checkedsampetype" @change="handlecheckedsampetypeChange">
+              <el-checkbox v-for="v in option" :label="v.value" :key="v.label">{{v.label}}</el-checkbox>
+            </el-checkbox-group>
+          </div>
+          <el-checkbox :indeterminate="issampetypecheckedall" v-model="boxCheckAll" @change="handleCheckAllChange">全选
+          </el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button type="primary" @click="savedata()">确定</el-button>
+        <el-button @click="boxVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+    <!--添加冻存架用的对话框-->
+    <el-dialog :title="dialogtitle" :visible.sync="shelfVisible">
+      <el-form>
+        <el-form-item label="冻存架位置" :label-width="labelWidth">
+          <el-col :span="10">
+            <el-input-number v-model="operationform.yshelf" :min="1" disabled style="width: 90%"></el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">层</el-col>
+          <el-col :span="10">
+            <el-input-number v-model="operationform.xshelf" :min="1" disabled style="width: 100%"></el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">列</el-col>
+        </el-form-item>
+        <el-form-item label="条形码" required :label-width="labelWidth">
+          <el-input v-model="operationform.barcode"></el-input>
+        </el-form-item>
+        <el-form-item label="冻存架大小" :label-width="labelWidth">
+          <el-col :span="10">
+            <el-input-number v-model="operationform.ybox" :min="1" :disabled="disableop" style="width: 100%">
+            </el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">层</el-col>
+          <el-col :span="10">
+            <el-input-number v-model="operationform.xbox" :min="1" :disabled="disableop" style="width: 100%">
+            </el-input-number>
+          </el-col>
+          <el-col :span="2" class="positionblk" style="text-align:center;">列</el-col>
+        </el-form-item>
+        <el-form-item label="样本类型" :label-width="labelWidth">
+          <div class="deviceaddsamptype">
+            <el-checkbox-group v-model="checkedsampetype" @change="handlecheckedsampetypeChange">
+              <el-checkbox v-for="stype in option" :label="stype.value" :key="stype.label">{{stype.label}}</el-checkbox>
+            </el-checkbox-group>
+          </div>
+          <el-checkbox :indeterminate="issampetypecheckedall" v-model="shelfCheckAll" @change="handleCheckAllChange">全选
+          </el-checkbox>
+        </el-form-item>
+      </el-form>
+      <div slot="footer">
+        <el-button type="primary" @click="savedata()">确定</el-button>
+        <el-button @click="shelfVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+    <!--复制对话框-->
+    <el-dialog :title="copydialogtitle" :visible.sync="copyVisible">
+      <div class="deviceaddsamptype">
+        <el-checkbox-group v-model="selectedsb" @change="handlecheckedsampetypeChange">
+          <el-checkbox v-for="stype in sblist" :label="stype.id" :key="stype.id">第{{stype.y}}行, 第{{stype.x}}列
+          </el-checkbox>
+        </el-checkbox-group>
+      </div>
+      <el-checkbox :indeterminate="issbcheckall" v-model="sbCheckAll" @change="handleCheckAllChange">全选</el-checkbox>
+      <el-checkbox v-model="iscopybox" v-if="copydialogtitle == '复制冻存架'">同步复制冻存盒</el-checkbox>
+      <div slot="footer">
+        <el-button type="primary" @click="savecopy()">确定</el-button>
+        <el-button @click="copyVisible = false">取消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+  export default {
+    name: 'shelfset',
+    components: {},
+    data() {
+      return {
+        downloading: true,
+        eid: 0, //设备id
+        isCollapse: false,
+        layerList: [],
+        columnList: [],
+        deepcolumnList: [],
+        deeplayerList: [],
+
+        imghost: '',
+        fridgebottomimg: '',
+        ename: '',
+        option: [], // 样本类型列表
+        option2: [], // 辅助全选框样本类型
+        tableColumnWidth: '200',
+        dialogFormVisible: false,
+        // 冰箱面板
+        unitwidth: 550, // 整个冰箱的尺寸
+        unitheight: 378,
+        dchxtable: -1, // 对勾所在位置
+        dchytable: -1,
+        xidx: -1, // 选中的冻存盒的位置
+        yidx: -1,
+        xcolor: -1, //  选中的冻存架的位置
+        ycolor: -1,
+        xtable: 4, // 样本所在冻存盒内位置
+        ytable: 4,
+        xcolorTable: 4,
+        ycolorTable: 4,
+        xshelf: -1, // 点击空冻存架
+        yshelf: -1,
+        colorTableWidth: 0, //  冰箱的相对尺寸
+        colorTableHeight: 0,
+        TableWidth: 0, // 每个冻存盒的尺寸
+        TableHeight: 0,
+        // 冻存架/盒
+        dialogtitle: '',
+        shelfVisible: false,
+        copyShelfVisible: false,
+        boxVisible: false,
+        copyBoxVisible: false,
+        boxCheckAll: false, // 添加冻存盒
+        checkedsampetype: [],
+        operationform: {
+          xshelf: '',
+          yshelf: '',
+          xbox: '', // 为box的位置或尺寸
+          ybox: '',
+          boxxvalue: 1,
+          boxyvalue: 1,
+          barcode: '',
+          sampletype: '',
+          eid: ''
+        },
+        shelfCheckAll: false, // 添加冻存架
+        labelWidth: '100px',
+        numtoengs: ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
+          'U', 'V', 'W', 'X', 'Y', 'Z'
+        ],
+        samplelist: [], // 新增,新的冰箱list和冻存盒/架list以及冻存盒样本list
+        selectedBox: {},
+        selectedShelf: {},
+        disableop: false,
+        disableop2: false,
+        boxSample: [],
+        COLORARR: ['#EAEAEA', '#13CE66', '#FF4949', '#D1EEEE', '#20A0FF', '#836FFF', '#000080'],
+        ishavedch: true,
+        issampetypecheckedall: true, // 全选框
+        copyVisible: false, // 复制
+        copydialogtitle: '',
+        sblist: [],
+        selectedsb: [],
+        sbCheckAll: false, // 复制全选框
+        issbcheckall: false,
+        sbcheckalllist: [],
+        iscopybox: true // 复制冻存架是是否同步复制冻存盒
+      }
+    },
+    created() {
+      this.eid = this.$route.params.opera
+      this.ename = this.$route.query.name
+      this.imghost = process.env.imgserverhost
+      this.initData()
+
+      this.operationform.eid = this.eid + ''
+
+      this.getSampleType()
+    },
+    watch: {},
+    methods: {
+      initData() {
+        let _this = this
+        _this.$axios.get('/shelfset/equipmentdraw/' + _this.eid, {})
+          .then(res => {
+            for (var i = res.data.dimension[0]; i > 0; i--) {
+              _this.columnList.unshift({
+                'Id': i,
+                'Realname': "第" + i + "列",
+              })
+            }
+            for (var n = res.data.dimension[1]; n > 0; n--) {
+              _this.layerList.unshift({
+                'Id': n,
+                'Realname': "第" + n + "层",
+                'Children': _this.columnList
+              })
+            }
+
+            for (var m = 0; m < res.data.items.length; m++) {
+              _this.deepcolumnList = []
+              _this.deeplayerList = []
+              for (var v = res.data.items[m].ColumnNum; v > 0; v--)
+                _this.deepcolumnList.unshift({
+                  'Id': v,
+                  'Realname': "第" + v + "列",
+                })
+              for (var u = res.data.items[m].RowNum; u > 0; u--) {
+                _this.deeplayerList.unshift({
+                  'Id': u,
+                  'Realname': "第" + u + "层",
+                  'Children': _this.deepcolumnList
+                })
+              }
+              _this.samplelist.unshift({
+                'Id': m,
+                'XStation': res.data.items[m].XStation,
+                'YStation': res.data.items[m].YStation,
+                'ShelfId': res.data.items[m].ShelfId,
+                'XYList': _this.deeplayerList
+              })
+            }
+            _this.downloading = false
+          })
+          .catch(err => {
+            _this.downloading = false
+            console.error(err)
+          })
+      },
+      handleSelect(key, keyPath) {
+        this.operationform.yshelf = keyPath[0].substring(1, 2) //层
+        this.operationform.xshelf = keyPath[1].substring(1, 2) //列
+      },
+      opforequip(seed) {
+        // seed----1:添加冻存盒;0:添加冻存架;2:编辑冻存架;3:编辑冻存盒
+        if (seed === 1) {
+          if (this.xidx === -1 && this.yidx === -1) {
+            this.$message({
+              type: 'warning',
+              message: '请先添加冻存架!'
+            })
+          } else if (this.TableHeight === 0 && this.TableWidth === 0) {
+            this.dialogtitle = '添加冻存盒'
+            this.boxCheckAll = true
+            this.boxVisible = true
+            this.disableop = false
+            this.operationform.xshelf = this.yidx
+            this.operationform.yshelf = this.xidx
+            this.operationform.xbox = this.xcolor
+            this.operationform.ybox = this.ycolor
+            this.operationform.eid = this.eid + '_' + seed
+            this.checkedsampetype = this.option2
+            this.operationform.barcode = 'FF201710271533'
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '所选位置已存在冻存盒!'
+            })
+          }
+        } else if (seed === 0) { //添加冻存架
+          if (this.operationform.yshelf !== -1 && this.operationform.xshelf !== -1) {
+            this.dialogtitle = '添加冻存架'
+            this.shelfCheckAll = true
+            this.shelfVisible = true
+            this.disableop = false
+            this.operationform.eid = this.eid + '_' + seed
+            this.checkedsampetype = this.option2
+            this.operationform.barcode = 'FF201710271534'
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请选择合适位置!'
+            })
+          }
+        } else if (seed === 2) {
+          if (this.xidx !== -1 && this.yidx !== -1) {
+            this.dialogtitle = '编辑冻存架'
+            this.shelfVisible = true
+            this.disableop = true
+            this.operationform.xshelf = this.selectedShelf.XStation
+            this.operationform.yshelf = this.selectedShelf.YStation
+            this.operationform.xbox = this.selectedShelf.ColumnNum
+            this.operationform.ybox = this.selectedShelf.RowNum
+            this.operationform.barcode = this.selectedShelf.BarCode
+            this.operationform.eid = this.eid + '_' + seed
+            this.checkedsampetype = this.selectedShelf.SampleType.split(',')
+            this.shelfCheckAll = this.checkedsampetype.length === this.option.length
+            this.issampetypecheckedall = !this.shelfCheckAll
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请选择合适位置!'
+            })
+          }
+        } else {
+          if (this.ishavedch) {
+            this.dialogtitle = '编辑冻存盒'
+            this.boxVisible = true
+            this.disableop = true
+            this.disableop2 = this.boxSample.length !== 0
+            this.operationform.xshelf = this.yidx
+            this.operationform.yshelf = this.xidx
+            this.operationform.xbox = this.xcolor
+            this.operationform.ybox = this.ycolor
+            this.operationform.boxxvalue = this.selectedBox.RowNum
+            this.operationform.boxyvalue = this.selectedBox.ColumnNum
+            this.operationform.barcode = this.selectedBox.BarCode
+            this.operationform.eid = this.eid + '_' + seed + '_' + this.selectedBox.ShelfId + '_' + this.selectedShelf
+              .XStation + '_' + this.selectedShelf.YStation
+            this.checkedsampetype = this.selectedBox.SampleType.split(',')
+            this.boxCheckAll = this.checkedsampetype.length === this.option.length
+            this.issampetypecheckedall = !this.boxCheckAll
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请先选择冻存盒!'
+            })
+          }
+        }
+      },
+      savedata() {
+        let _this = this
+        if (this.disableop) { // 根据是否disable某些选项来判断为编辑或添加
+          _this.operationform.sampletype = _this.checkedsampetype.join(',')
+          _this.$axios.put('/shelfset/editforequip', _this.operationform)
+            .then(res => {
+              if (res.data.code === 0) {
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+                _this.boxVisible = false
+                _this.shelfVisible = false
+                _this.handleclk(this.xcolor - 1, this.ycolor - 1, this.xidx, this.yidx)
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            })
+            .catch(err => {
+              // handle error
+              console.error(err)
+            })
+        } else {
+          if (this.operationform.barcode !== '' && this.operationform.xbox !== '' && this.operationform.ybox !== '') {
+            _this.operationform.sampletype = _this.checkedsampetype.join(',')
+            _this.$axios.post('/shelfset', _this.operationform)
+              .then(res => {
+                // response
+                if (res.data.code === 0) {
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  _this.boxVisible = false
+                  _this.shelfVisible = false
+                  _this.yshelf = -1
+                  _this.xshelf = -1
+                  _this.initData()
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(err => {
+                // handle error
+                console.error(err)
+              })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请输入必填项!'
+            })
+          }
+        }
+      },
+
+      //   getfridgeimg() {
+      //     let _this = this
+      //     // 获取容器信息
+      //     _this.$axios.get('/equipment/getmodel/' + _this.eid, {})
+      //       .then(res => {
+      //         _this.ename = res.data.Name
+      //         if (res.data && (res.data.DItem === 4)) {
+      //           _this.fridgebottomimg = _this.imghost + '/static/img/sampletypeimg/bottomydg.png'
+      //         } else {
+      //           _this.fridgebottomimg = _this.imghost + '/static/img/sampletypeimg/bottombx.png'
+      //         }
+      //       })
+      //       .catch({})
+      //   },
+      getSampleType() {
+        let _this = this
+        _this.$axios.get('/sampleinput/slist/' + this.eid, {})
+          .then(res => {
+            // response
+            _this.option = []
+            _this.option2 = []
+            for (var i = 0; i < res.data.currentItemCount; i++) {
+              _this.option.push({
+                label: res.data.items[i].Name,
+                code: res.data.items[i].Code,
+                photo: res.data.items[i].Photo,
+                value: res.data.items[i].Id + ''
+              })
+              _this.option2.push(res.data.items[i].Id + '')
+            }
+          })
+      },
+      handleclk(xindex, yindex, xcolorTable, ycolorTable) {
+        // request
+        let _this = this
+        var inputstr = _this.eid + ',' + ycolorTable + ',' + xcolorTable + ',' + (xindex + 1) + ',' + (yindex + 1)
+        // alert(inputstr)
+        _this.$axios.get('/shelfset/boxdraw/' + inputstr, {})
+          .then(res => {
+            // response
+            _this.selectedShelf = res.data.Shelfbox
+            _this.selectedBox = res.data.Boxshelf
+            _this.boxSample = res.data.Boxsample
+            _this.TableHeight = _this.selectedBox.RowNum
+            _this.TableWidth = _this.selectedBox.ColumnNum
+            if (_this.TableWidth === 0) {
+              _this.ishavedch = false
+            } else {
+              _this.ishavedch = true
+            }
+          })
+          .catch(err => {
+            // handle error
+            console.error(err)
+          })
+        // 修改坐标
+        this.xidx = xcolorTable
+        this.yidx = ycolorTable
+        this.xcolor = xindex + 1
+        this.ycolor = yindex + 1
+        this.dchxtable = -1
+        this.dchytable = -1
+      },
+      shelfclk(x, y) {
+        for (var i = 0; i < this.samplelist.length; i++) {
+          if (x === this.samplelist[i].XStation && y === this.samplelist[i].YStation) {
+            this.yshelf = -1
+            this.xshelf = -1
+            return
+          }
+        }
+        this.yshelf = y
+        this.xshelf = x
+        this.xidx = -1
+        this.yidx = -1
+        this.xcolor = -1
+        this.ycolor = -1
+      },
+      // 全选框控制
+      handleCheckAllChange(val) {
+        this.checkedsampetype = val ? this.option2 : []
+        this.selectedsb = val ? this.sbcheckalllist : []
+        this.issampetypecheckedall = false
+        this.issbcheckall = false
+      },
+      handlecheckedsampetypeChange(value) {
+        let checkedCount = value.length
+        this.shelfCheckAll = checkedCount === this.option2.length
+        this.boxCheckAll = checkedCount === this.option2.length
+        this.sbCheckAll = checkedCount === this.sblist.length
+        this.issampetypecheckedall = checkedCount > 0 && checkedCount < this.option2.length
+        this.issbcheckall = checkedCount > 0 && checkedCount < this.sblist.length
+      },
+
+
+      havesample(val) {
+        for (var i = 0; i < this.samplelist.length; i++) {
+          if (this.selectedShelf.Id === this.samplelist[i].ShelfId) {
+            if (val) { // 删除冻存盒
+              if (this.samplelist[i][this.numtoengs[this.ycolor - 1] + this.xcolor] !== -1 &&
+                this.samplelist[i][this.numtoengs[this.ycolor - 1] + this.xcolor] !== -2 &&
+                this.xcolor !== -1 && this.ycolor !== -1) {
+                return true
+              } else {
+                return false
+              }
+            } else { // 删除冻存架
+              // 检查每个方格的颜色值
+              for (var j = 0; j < this.selectedShelf.RowNum; j++) {
+                for (var k = 1; k <= this.selectedShelf.ColumnNum; k++) {
+                  if (this.samplelist[i][this.numtoengs[j] + k] !== -1 &&
+                    this.samplelist[i][this.numtoengs[j] + k] !== -2 && this.xcolor !== -1 && this.ycolor !== -1) {
+                    return true
+                  }
+                }
+              }
+              return false
+            }
+          }
+        }
+      },
+      moveforequip(seed) {
+        // seed: 0---冻存架; 1---冻存盒
+        if (!seed) {
+          if (this.xidx !== -1 && this.yidx !== -1) {
+            window.location.href = '/equipment/devicemove?id=' + this.eid + '&x=' + this.yidx + '&y=' + this.xidx +
+              '&type=' + seed
+          } else if (this.xshelf !== -1 && this.yshelf !== -1) {
+            this.$message({
+              type: 'warning',
+              message: '冻存架为空!'
+            })
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '请选择冻存架!'
+            })
+          }
+        } else {
+          if (this.xcolor === -1 && this.ycolor === -1) {
+            this.$message({
+              type: 'warning',
+              message: '请先添加冻存架!'
+            })
+          } else if (this.selectedBox.RowNum === 0 && this.selectedBox.ColumnNum === 0) {
+            this.$message({
+              type: 'warning',
+              message: '无法移动空冻存盒!'
+            })
+          } else {
+            window.location.href = '/equipment/devicemove?id=' + this.eid + '&x=' + this.xcolor + '&y=' + this.ycolor +
+              '&type=' + seed + '&xshelf=' + this.yidx + '&yshelf=' + this.xidx
+          }
+        }
+      },
+      copyforequip(seed) {
+        // seed: 0---冻存架; 1---冻存盒
+        if (!seed) {
+          if (this.yidx === -1 && this.xidx === -1) {
+            this.$message({
+              type: 'warning',
+              message: '请选择冻存架!'
+            })
+          } else if (this.xshelf !== -1 && this.yshelf !== -1) {
+            this.$message({
+              type: 'warning',
+              message: '请先添加冻存架!'
+            })
+          } else if (this.samplelist.length === this.colorTableHeight * this.colorTableWidth) {
+            this.$message({
+              type: 'warning',
+              message: '冰箱已满!'
+            })
+          } else {
+            this.copyVisible = true
+            this.copydialogtitle = '复制冻存架'
+            var empty;
+            this.sblist = [];
+            this.sbcheckalllist = []
+            for (var i = 1; i <= this.colorTableHeight; i++) {
+              for (var j = 1; j <= this.colorTableWidth; j++) {
+                empty = true
+                for (var k = 0; k < this.samplelist.length; k++) {
+                  if (j === this.samplelist[k].XStation && i === this.samplelist[k].YStation) {
+                    empty = false
+                  }
+                }
+                if (empty) {
+                  this.sblist.push({
+                    id: this.sblist.length,
+                    x: j,
+                    y: i
+                  })
+                  this.sbcheckalllist.push(this.sbcheckalllist.length)
+                }
+              }
+            }
+          }
+        } else {
+          if (this.xshelf !== -1 && this.yshelf !== -1) {
+            this.$message({
+              type: 'warning',
+              message: '请先添加冻存架!'
+            })
+          } else if (this.xcolor === -1 && this.ycolor === -1) {
+            this.$message({
+              type: 'warning',
+              message: '请选择冻存盒!'
+            })
+          } else if (this.selectedBox.RowNum === 0 && this.selectedBox.ColumnNum === 0) {
+            this.$message({
+              type: 'warning',
+              message: '请先添加冻存盒!'
+            })
+          } else {
+            var num = 0;
+            this.sblist = [];
+            this.sbcheckalllist = []
+            for (var l = 0; l < this.samplelist.length; l++) {
+              if (this.selectedShelf.Id === this.samplelist[l].ShelfId) {
+                for (var m = 0; m < this.samplelist[l].RowNum; m++) {
+                  for (var n = 1; n <= this.samplelist[l].ColumnNum; n++) {
+                    if (this.samplelist[l][this.numtoengs[m] + n] !== -2) {
+                      num++
+                    } else {
+                      this.sblist.push({
+                        id: this.sblist.length,
+                        x: n,
+                        y: m + 1
+                      })
+                      this.sbcheckalllist.push(this.sbcheckalllist.length)
+                    }
+                  }
+                }
+                break
+              }
+            }
+            if (num === this.selectedShelf.RowNum * this.selectedShelf.ColumnNum) {
+              this.$message({
+                type: 'warning',
+                message: '冻存架已满!'
+              })
+            } else {
+              this.copyVisible = true
+              this.copydialogtitle = '复制冻存盒'
+            }
+          }
+        }
+      },
+      savecopy() {
+        if (this.copydialogtitle === '复制冻存架') {
+          if (this.selectedsb.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '请选择冻存架!'
+            })
+          } else {
+            var copytostr = ''
+            for (var i = 0; i < this.selectedsb.length; i++) {
+              copytostr += this.sblist[this.selectedsb[i]].x + ';' + this.sblist[this.selectedsb[i]].y + ','
+            }
+            copytostr = copytostr.substring(0, copytostr.length - 1)
+            let _this = this
+            // request
+            _this.$axios.put('/shelfset/shelfcopy/' + this.eid + '_' + copytostr + '_' + this.iscopybox + '_' +
+                this.yidx + '_' + this.xidx, {})
+              .then(res => {
+                // response
+                if (res.data.code === 0) {
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  _this.initData()
+                  _this.selectedsb = []
+                  _this.copyVisible = false
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(err => {
+                // handle error
+                console.error(err)
+              })
+          }
+        } else {
+          if (this.selectedsb.length === 0) {
+            this.$message({
+              type: 'warning',
+              message: '请选择冻存盒!'
+            })
+          } else {
+            var copytostr2 = ''
+            for (var j = 0; j < this.selectedsb.length; j++) {
+              copytostr2 += this.sblist[this.selectedsb[j]].x + ';' + this.sblist[this.selectedsb[j]].y + ','
+            }
+            copytostr2 = copytostr2.substring(0, copytostr2.length - 1)
+            let _this = this
+            // request
+            _this.$axios.put('/shelfset/boxcopy/' + this.eid + '_' + this.yidx + '_' + this.xidx + '_' + this.xcolor +
+                '_' + this.ycolor + '_' + copytostr2, {})
+              .then(res => {
+                // response
+                if (res.data.code === 0) {
+                  this.$message({
+                    type: 'success',
+                    message: res.data.message
+                  })
+                  _this.initData()
+                  _this.selectedsb = []
+                  _this.copyVisible = false
+                } else {
+                  this.$message({
+                    type: 'warning',
+                    message: res.data.message
+                  })
+                }
+              })
+              .catch(err => {
+                // handle error
+                console.error(err)
+              })
+          }
+        }
+      },
+      deletedata(val) {
+        // val--- 0: 删除冻存架;1:删除冻存盒
+        let _this = this
+        if (this.havesample(val)) {
+          this.$message({
+            type: 'warning',
+            message: '含有样本不能删除!'
+          })
+          return
+        }
+        if (val === 0) {
+          if (this.xidx !== -1 && this.yidx !== -1) {
+            _this.$confirm('此操作将永久删除该冻存架, 是否继续?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }).then(() => {
+              _this.$axios.delete('shelfset/deleteforequip/' + val + '_' + _this.selectedShelf.XStation + '_' +
+                  _this.selectedShelf.YStation + '_' + _this.eid, {})
+                .then(res => {
+                  // response
+                  if (res.data.code === 0) {
+                    this.$message({
+                      type: 'success',
+                      message: res.data.message
+                    })
+                    _this.initData()
+                  } else {
+                    this.$message({
+                      type: 'warning',
+                      message: res.data.message
+                    })
+                  }
+                })
+                .catch(err => {
+                  // handle error
+                  console.error(err)
+                })
+            }).catch(() => {})
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '空冻存架不能删除!'
+            })
+          }
+        } else {
+          if (this.TableHeight !== 0 && this.TableWidth !== 0) {
+            _this.$confirm('此操作将永久删除该冻存盒, 是否继续?', '提示', {
+              confirmButtonText: '确定',
+              cancelButtonText: '取消',
+              type: 'warning'
+            }).then(() => {
+              _this.$axios.delete('shelfset/deleteforequip/' + val + '_' + _this.xcolor + '_' + _this.ycolor + '_' +
+                  _this.eid + '_' + _this.yidx + '_' + _this.xidx, {})
+                .then(res => {
+                  // response
+                  if (res.data.code === 0) {
+                    this.$message({
+                      type: 'success',
+                      message: res.data.message
+                    })
+                    _this.initData(_this.eid)
+                    _this.handleclk(this.xcolor - 1, this.ycolor - 1, this.xidx, this.yidx)
+                  } else {
+                    this.$message({
+                      type: 'warning',
+                      message: res.data.message
+                    })
+                  }
+                })
+                .catch(err => {
+                  // handle error
+                  console.error(err)
+                })
+            }).catch(() => {})
+          } else {
+            this.$message({
+              type: 'warning',
+              message: '空冻存盒不能删除!'
+            })
+          }
+        }
+      },
+      goback() {
+        if (this.$route.query.size) {
+          this.$router.push({
+            name: this.$route.query.pname,
+            query: {
+              size: this.$route.query.size,
+              currentPage: this.$route.query.currentPage
+            }
+          })
+          this.$router.go(-1)
+        } else {
+          this.$router.go(-1)
+        }
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss" scoped>
+  .ulbgcolor div {
+    float: left;
+  }
+
+  .hoverdiv:hover {
+    box-shadow: 0 0 4px rgba(0, 0, 0, .4);
+    transform: scale(1.15);
+  }
+
+  .tablebox {
+    .sampletable {
+      border-collapse: collapse;
+
+      td {
+        width: 20px;
+        height: 20px;
+      }
+
+      td:hover {
+        box-shadow: 0 0 5px rgba(0, 0, 0, .4);
+        transform: scale(1.15);
+      }
+
+      .visibletd {
+        border: 2px solid black;
+        width: 20px;
+        height: 20px;
+        text-align: center;
+        background: url(/assets/img/yuan.png);
+        background-size: 100% 100%;
+      }
+    }
+
+    width: 530px;
+    height: 440px;
+    position: relative;
+    display: inline-block;
+    float: left;
+    padding-left: 50px;
+  }
+
+  .image {
+    width: 32px;
+    height: 32px;
+    display: block;
+    position: absolute;
+    padding-left: 8px;
+    margin-top: -17px;
+  }
+
+  .fridge {
+    width: 576px;
+    height: 110px;
+    margin-left: 13px;
+  }
+
+  .worklisticolist {
+    font-size: 14px;
+    margin-bottom: 12px;
+  }
+
+  .worklisticolist i:not(:first-child) {
+    margin-left: 4px;
+  }
+
+  .worklisticolist i {
+    margin-right: 3px;
+  }
+
+  .tdborder {
+    border: 1px solid #B4CDCD;
+  }
+
+  .tdtopborder {
+    border-top: 5px solid #A3A3A3;
+  }
+
+  .tdleftborder {
+    border-left: 5px solid #A3A3A3;
+  }
+
+  .tdrightborder {
+    border-right: 5px solid #A3A3A3;
+  }
+
+  .deviceaddsamptype {
+    margin-top: 2px;
+    margin-left: 1px;
+    border: 1px #CCCCCC solid;
+    overflow: auto;
+    height: 110px;
+    padding: 1px;
+
+    .el-checkbox {
+      margin-left: 4px;
+    }
+  }
+
+  .el-form-item__content .deviceaddsamptype {
+    line-height: 15px;
+  }
+
+</style>

+ 2 - 2
src/dashoo.cn/frontend_web/src/static/js/printUtilities.js

@@ -162,8 +162,8 @@ function PrintReport(repID, param) {
   param = base64encode(param);
   param = param.replace("+", "%2B");
   var href = "bmisrep://rep=" + repID + "&param=" + param;
-  //var url = "localhost:9081"
-  var url= "47.92.238.200:9081"
+  // var url = "localhost:9081"
+  var url = "47.92.238.200:9081"
   href = href + "&host=" + url;
 
   if (typeof preview == "undefined") {