Sfoglia il codice sorgente

检测任务-受检单位

lining 6 anni fa
parent
commit
6954b2d647

+ 13 - 18
src/dashoo.cn/backend/api/controllers/casbin/organize.go

@@ -1,7 +1,6 @@
 package casbin
 
 import (
-	"dashoo.cn/backend/api/business/limsbalance"
 	"encoding/json"
 
 	"dashoo.cn/business2/parameter"
@@ -14,6 +13,7 @@ import (
 	. "dashoo.cn/backend/api/controllers"
 	"dashoo.cn/business2/permission"
 	"dashoo.cn/utils"
+	lims_organize "dashoo.cn/business_lims/organize"
 )
 
 // Operations about Users
@@ -474,24 +474,19 @@ func (this *OrganizesController) GetOrgList() {
 	this.ServeJSON()
 }
 
-// @Title 删除组织
-// @Description 删除组织
-// @Param	id		path 	string	true		"需要删除的用户编号"
-// @Success 200 {object} ErrorInfo
-// @Failure 403 :id 为空
-// @router /delete_tmp [delete]
-func (this *OrganizesController) Delete_tmp() {
 
-	id := "100000000"
+// @Title 二级单位列表
+// @Description 设备列表
+// @Success 200 {object} business.device.DeviceChannels
+// @router /unitlist [get]
+func (this *OrganizesController) UnitList() {
+	var unitorg []lims_organize.Base_Organize
 	svc := organize.GetOrganizeService(utils.DBE)
-	ids := svc.GetAllChildById(id)
-	svcl := limsbalance.GetLimsBalanceService(utils.DBE)
-	//where := "DepartmentId IN (" + ids + ")"
-	//err := svcl.DeleteEntityBytbl(BaseUserName, where)
-	whereo := "Id NOT IN (" + ids + ")"
-
-		svcl.DeleteEntityBytbl("Base_Organize", whereo)
-
-
+	where := "Category='unit'"
+	svc.GetEntities(&unitorg, where)
 
+	var datainfo DataInfo
+	datainfo.Items = unitorg
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
 }

+ 2 - 2
src/dashoo.cn/frontend_web/src/pages/lims/tasksentrust/_opera/operation.vue

@@ -1516,12 +1516,12 @@
       // 委托方名称下拉
       getCustomer () {
         let _this = this
-        _this.$axios.get('/customer/customerlist', {})
+        _this.$axios.get('/organizes/unitlist', {})
           .then(res => {
             // response
             _this.customerList = res.data.items
             for (var i = 0; i < res.data.items.length; i++) {
-              if (res.data.items[i].ViceBusiness === '大港油田') {
+              if (res.data.items[i].IsInnerOrganize === 1) {
                 _this.groupOptions[0].options.push(res.data.items[i])
               } else {
                 _this.groupOptions[1].options.push(res.data.items[i])