lining před 6 roky
rodič
revize
e09cd05d6f

+ 1 - 1
src/dashoo.cn/backend/api/controllers/lims/limsentrust.go

@@ -774,7 +774,7 @@ func (this *LimsEnturstController) Ignore() {
 // @router /getstyle [get]
 func (this *LimsEnturstController) GetStyle() {
 	//特检站部门总ID
-	DepartmentId := "100000150"
+	DepartmentId := "100001215"
 	organizeSvc := organize.GetOrganizeService(utils.DBE)
 	departList := organizeSvc.GetChildByTopId(DepartmentId)
 

+ 58 - 12
src/dashoo.cn/backend/api/controllers/lims/limsreportelecground.go

@@ -2,18 +2,20 @@ package lims
 
 import (
 	"dashoo.cn/backend/api/business/instrument"
+	"dashoo.cn/backend/api/business/limscustomerposition"
 	"dashoo.cn/backend/api/business/limsdataentry"
+	"dashoo.cn/backend/api/business/organize"
 	"encoding/json"
+	"strconv"
 	"strings"
 	"time"
 
-	"dashoo.cn/business2/items"
-	"dashoo.cn/business2/userRole"
 	"dashoo.cn/backend/api/business/baseUser"
 	svccustomer "dashoo.cn/backend/api/business/customer"
-	"dashoo.cn/backend/api/business/limscustomerposition"
 	"dashoo.cn/backend/api/business/limsreportelecground"
 	. "dashoo.cn/backend/api/controllers"
+	"dashoo.cn/business2/items"
+	"dashoo.cn/business2/userRole"
 	"dashoo.cn/utils"
 )
 
@@ -213,19 +215,45 @@ func (this *LimsReportElecGroundController) GetDictList() {
 // @Success 200 {object} map[string]interface{}
 // @router /allgradeinfo/:id [get]
 func (this *LimsReportElecGroundController) GetAllGradeInfo() {
+	dictList := make(map[string]interface{})
 	customerId := this.Ctx.Input.Param(":id") //委托单位Id
-	list := make(map[string]interface{})
-
-	svc := limsreportelecground.GetLimsReportElecGroundService(utils.DBE)
-	where := "CustomerId = " + customerId //where条件
-
-	var dictCustomer []limscustomerposition.LimsCustomerPosition
+	var customer []svccustomer.Customer
+	svc := organize.GetOrganizeService(utils.DBE)
+	where := "Id=" + customerId
+	svc.GetEntitysByWhere(this.User.AccCode + CustomerName,where, &customer)
+
+	// 三级单位==受检单位
+	var thrunits []organize.Base_Organize
+	if customer != nil && len(customer) > 0 {
+		thrunits = svc.GetAllThirdChildByTopId(customer[0].DepartmentId, "")
+	}
 
-	svc.GetEntitysByWhere(this.User.AccCode+LimsCustomerpositionName, where, &dictCustomer)
-	list["AllGradeInfo"] = &dictCustomer
+	thrunitIds := ""
+	for _,org := range thrunits {
+		thrunitIds += strconv.Itoa(org.Id) + ","
+	}
+	thrunitIds = strings.Trim(thrunitIds, ",")
 
+	var positionCheck []limscustomerposition.LimsCustomerPosition
+	if thrunitIds != "" {
+		where := "ThrUnitId in (" + thrunitIds + ") and ParentId = 0"
+		svc.GetEntitysByWhere(this.User.AccCode+LimsCustomerpositionName, where, &positionCheck)
+	}
+	dictList["ThiUnits"] = thrunits
+	dictList["PositionCheck"] = positionCheck
+
+	//list := make(map[string]interface{})
+	//
+	//svc := limsreportelecground.GetLimsReportElecGroundService(utils.DBE)
+	//where := "CustomerId = " + customerId //where条件
+	//
+	//var dictCustomer []limscustomerposition.LimsCustomerPosition
+	//
+	//svc.GetEntitysByWhere(this.User.AccCode+LimsCustomerpositionName, where, &dictCustomer)
+	//list["AllGradeInfo"] = &dictCustomer
+	//
 	var datainfo DataInfo
-	datainfo.Items = list
+	datainfo.Items = dictList
 	this.Data["json"] = &datainfo
 	this.ServeJSON()
 }
@@ -467,4 +495,22 @@ func (this *LimsReportElecGroundController) AddRunRecord() {
 			svc.InsertEntityBytbl(this.User.AccCode+InstrumenRunRecordName, &runrecord)
 		}
 	}
+}
+
+// @Title 根据检测地点Id获取安装位置
+// @Description get user by token
+// @Success 200 {object} map[string]interface{}
+// @router /getdistrict/:id [get]
+func (this *LimsReportElecGroundController) GetDistrict() {
+	pId := this.Ctx.Input.Param(":id")
+
+	svc := limsreportelecground.GetLimsReportElecGroundService(utils.DBE)
+	var positionCheck []limscustomerposition.LimsCustomerPosition
+	where := "ParentId = " + pId
+	svc.GetEntitysByWhere(this.User.AccCode+LimsCustomerpositionName, where, &positionCheck)
+
+	var datainfo DataInfo
+	datainfo.Items = positionCheck
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
 }

+ 79 - 62
src/dashoo.cn/frontend_web/src/pages/lims/reportelecground/subdata/datalist.vue

@@ -51,7 +51,7 @@
                   <el-form-item prop="TestDepartId" label="受检单位" :rules="{ required: true, message: '受检单位不能为空!'}">
                     <el-select ref="selectTestDepart" v-model="formData.TestDepartId" filterable placeholder="请选择" style="width: 100%" @change="TestDepartChange"
                                :filter-method="TestDepartFilter" :disabled="DataStatus != 0 && DataStatus != 5&& DataStatus!=3">
-                      <el-option v-for="item in TestDepartOptions" :key="item.Id" :label="item.PositionName" :value="item.Id">
+                      <el-option v-for="item in TestDepartOptions" :key="item.Id" :label="item.Fullname" :value="item.Id">
                       </el-option>
                     </el-select>
                   </el-form-item>
@@ -59,23 +59,23 @@
                 <el-col :span="8">
                   <el-form-item prop="PositionCheckId" label="检测地点" :rules="{ required: true, message: '检测地点不能为空!'}">
                     <el-select ref="selectPositionCheck" v-model="formData.PositionCheckId" filterable placeholder="请选择"
-                               style="width: 70%" @change="changePositionCheck" :filter-method="positionCheckFilter"
+                               style="width: 100%" @change="changePositionCheck" :filter-method="positionCheckFilter"
                                :disabled="DataStatus != 0 && DataStatus != 5&& DataStatus!=3">
                       <el-option v-for="item in PositionCheckOptions" :key="item.Id" :label="item.PositionName" :value="item.Id">
                       </el-option>
                     </el-select>
-                    <template>
-                      <el-popover
-                        placement="left"
-                        title="添加检测地点"
-                        width="200"
-                        trigger="click">
-                        <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                        <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                        <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>
-                        </el-button>
-                      </el-popover>
-                    </template>
+                    <!--<template>-->
+                      <!--<el-popover-->
+                        <!--placement="left"-->
+                        <!--title="添加检测地点"-->
+                        <!--width="200"-->
+                        <!--trigger="click">-->
+                        <!--<el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>-->
+                        <!--<el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>-->
+                        <!--<el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>-->
+                        <!--</el-button>-->
+                      <!--</el-popover>-->
+                    <!--</template>-->
                   </el-form-item>
                 </el-col>
                 <el-col :span="24">
@@ -604,10 +604,10 @@
           if (valid) {
             this.formData.Instrument1 = this.CGRMeterOptions.join(',')
             this.formData.Instrument2 = this.GRMeterOptions.join(',')
-            /*if (this.formData.Instrument1 === '' || this.formData.Instrument2 === '') {
+            /* if (this.formData.Instrument1 === '' || this.formData.Instrument2 === '') {
               this.$message.warning('检测依据不能为空!')
               return
-            }*/
+            } */
             this.formData.PositionCheckId = parseInt(this.formData.PositionCheckId)
             this.formData.TestDepartId = parseInt(this.formData.TestDepartId)
             this.formData.TestDepart = this.$refs.selectTestDepart.selectedLabel + ''
@@ -840,8 +840,6 @@
           this.GRMeterOptions = res.data.Instrument2.split(',')
           if (res.data.TestDepartId === 0) {
             this.formData.TestDepartId = ''
-          } else {
-            this.setPositionCheckOptions(res.data.TestDepartId)
           }
           if (res.data.PositionCheckId === 0) {
             this.formData.PositionCheckId = ''
@@ -890,56 +888,74 @@
       },
       // 更改受检单位触发检测地点和分布区域的改变
       TestDepartChange (Id) {
-        // 更新检测地点
+        console.log(Id)
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
-        this.formData.PositionCheckId = ''
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
-        // 检测地点、安装地点 都默认为第一个
-        if (this.PositionCheckOptions.length > 0) {
-          this.formData.PositionCheckId = this.PositionCheckOptions[0].Id
-        }
-        this.TestDepartOptions = this.TestDepartOptionsBackUp
+        console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp==')
+        console.log(this.PositionCheckOptions, 'this.PositionCheckOptions==')
+        // ===========lnd
+        // // 更新检测地点
+        // this.PositionCheckOptions = []
+        // this.PositionCheckOptionsBackUp = []
+        // this.formData.PositionCheckId = ''
+        // for (let j = 0; j < this.AllGradeInfo.length; j++) {
+        //   if (this.AllGradeInfo[j].ParentId === Id) {
+        //     this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        //   }
+        // }
+        // Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
+        // // 检测地点、安装地点 都默认为第一个
+        // if (this.PositionCheckOptions.length > 0) {
+        //   this.formData.PositionCheckId = this.PositionCheckOptions[0].Id
+        // }
+        // this.TestDepartOptions = this.TestDepartOptionsBackUp
+        // ===========lnd
       },
       // 根据委托单位Id获取所有级联信息
       getAllGrade (customerId) {
         this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          this.TestDepartOptions = []
-          this.TestDepartOptionsBackUp = []
-          if (!this.formData.TestDepartId) {
-            this.formData.TestDepartId = ''
-          }
-          if (!this.formData.PositionCheckId) {
-            this.formData.PositionCheckId = ''
-          }
-          this.PositionCheckOptions = []
-          if (this.AllGradeInfo === null) {
-            return
-          }
-          // 受检单位
-          for (let i = 0; i < this.AllGradeInfo.length; i++) {
-            if (this.AllGradeInfo[i].ParentId === 0) {
-              this.TestDepartOptionsBackUp.push(this.AllGradeInfo[i])
-            }
-          }
-          Object.assign(this.TestDepartOptions, this.TestDepartOptionsBackUp)
-          // 检测地点
-          if (this.TestDepartOptions.length > 0) {
-            for (let i = 0; i < this.TestDepartOptions.length; i++) {
-              for (let j = 0; j < this.AllGradeInfo.length; j++) {
-                if (this.AllGradeInfo[j].ParentId === this.TestDepartOptions[i].Id) {
-                  this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
-                }
-              }
-            }
-          }
-          Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
+          console.log(res.data)
+          this.TestDepartOptions = res.data.items['ThiUnits']
+          this.PositionCheckOptions = res.data.items['PositionCheck']
+          Object.assign(this.PositionCheckOptionsBackUp, this.PositionCheckOptions)
+          console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp')
+          // ========ln
+          // this.AllGradeInfo = res.data.items['AllGradeInfo']
+          // this.TestDepartOptions = []
+          // this.TestDepartOptionsBackUp = []
+          // if (!this.formData.TestDepartId) {
+          //   this.formData.TestDepartId = ''
+          // }
+          // if (!this.formData.PositionCheckId) {
+          //   this.formData.PositionCheckId = ''
+          // }
+          // this.PositionCheckOptions = []
+          // if (this.AllGradeInfo === null) {
+          //   return
+          // }
+          // // 受检单位
+          // for (let i = 0; i < this.AllGradeInfo.length; i++) {
+          //   if (this.AllGradeInfo[i].ParentId === 0) {
+          //     this.TestDepartOptionsBackUp.push(this.AllGradeInfo[i])
+          //   }
+          // }
+          // Object.assign(this.TestDepartOptions, this.TestDepartOptionsBackUp)
+          // // 检测地点
+          // if (this.TestDepartOptions.length > 0) {
+          //   for (let i = 0; i < this.TestDepartOptions.length; i++) {
+          //     for (let j = 0; j < this.AllGradeInfo.length; j++) {
+          //       if (this.AllGradeInfo[j].ParentId === this.TestDepartOptions[i].Id) {
+          //         this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+          //       }
+          //     }
+          //   }
+          // }
+          // Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
+          // ========ln
           this.getDataEntry()
         }).catch(err => {
           console.error(err)
@@ -1008,12 +1024,13 @@
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)
         })
       },
+      // 编辑
       EditEntity (row) {
         this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
         this.$refs['DataoperaCompoment'].dialogVisible = true

+ 38 - 71
src/dashoo.cn/frontend_web/src/pages/lims/reportelecground/subdata/dataopera.vue

@@ -21,24 +21,24 @@
               </el-col>
               <el-col :span="8">
                 <el-form-item prop="DistrictId" label="分布区域" :rules="{ required: true, message: '分布区域不能为空!'}">
-                  <el-select ref="selectDistrict" v-model="formData.DistrictId" filterable placeholder="请选择" style="width: 65%" :filter-method="DistrictFilter">
+                  <el-select ref="selectDistrict" v-model="formData.DistrictId" filterable placeholder="请选择" style="width: 100%" :filter-method="DistrictFilter">
                     <el-option-group v-for="group in groupOptions" :key="group.label" :label="group.label">
                       <el-option v-for="item in group.options" :key="item.Id" :label="item.PositionName" :value="item.Id">
                       </el-option>
                     </el-option-group>
                   </el-select>
-                  <template>
-                  <el-popover
-                    placement="left"
-                    title="添加分布位置"
-                    width="150px"
-                    trigger="click">
-                    <el-input ref="inputDistrict" v-model="District" size="small" style="width: 70%"></el-input>
-                    <el-button size="small" style="width: 30%; text-align: center" @click="addDistrict">保存</el-button>
-                    <el-button slot="reference"><i class="el-icon-plus"></i>
-                    </el-button>
-                  </el-popover>
-                </template>
+                  <!--<template>-->
+                  <!--<el-popover-->
+                    <!--placement="left"-->
+                    <!--title="添加分布位置"-->
+                    <!--width="150px"-->
+                    <!--trigger="click">-->
+                    <!--<el-input ref="inputDistrict" v-model="District" size="small" style="width: 70%"></el-input>-->
+                    <!--<el-button size="small" style="width: 30%; text-align: center" @click="addDistrict">保存</el-button>-->
+                    <!--<el-button slot="reference"><i class="el-icon-plus"></i>-->
+                    <!--</el-button>-->
+                  <!--</el-popover>-->
+                <!--</template>-->
                 </el-form-item>
               </el-col>
 
@@ -231,6 +231,7 @@
       }
     },
     created () {
+      console.log("132")
       this.getDictOptions()
       if (this.serviceId > 0) {
         this.formData.Id = this.serviceId
@@ -240,7 +241,7 @@
         this.formData.EId = this.EId
         this.formData.TaskBalanceId = this.TaskBalanceId
         this.formData.DataEntryId = this.DataEntryId
-        this.getEntrustInfo(this.EId)
+        // this.getEntrustInfo(this.EId)
       }
       // 初始值备份
       Object.assign(this.historyData, this.formData)
@@ -392,25 +393,6 @@
         Object.assign(this.groupOptions2, this.groupOptions[1].options)
       },
 
-      // 更改检测地点触发分布区域改变
-      PositionCheckChange (Id) {
-        // 更新分布区域
-        this.DistrictOptions = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.DistrictOptions.push(this.AllGradeInfo[j])
-          }
-        }
-        this.CopyDistrictOptions = []
-        Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
-        this.setChosen()
-        if (this.groupOptions[0].options.length > 0) {
-          this.formData.DistrictId = this.groupOptions[0].options[0].Id
-        } else if (this.groupOptions[1].options.length > 0) {
-          this.formData.DistrictId = this.groupOptions[1].options[0].Id
-        }
-      },
-
       initDatas () {
         if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
@@ -434,50 +416,32 @@
           console.error(err)
         })
       },
-      getDataEntry () {
-        this.groupOptions[0].options = []
-        this.groupOptions[1].options = []
-        let _this = this
-        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
-          _this.formData.PositionCheckId = res.data.PositionCheckId
-          _this.PositionCheckChange(res.data.PositionCheckId)
-        }).catch(error => {
-          console.log(error)
-        })
-      },
-      // 根据委托单位Id获取所有级联信息
-      getAllGrade (customerId) {
-        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          if (this.AllGradeInfo === null) {
-            return
-          }
-          this.getDataEntry()
-          // this.DistrictOptions = []
-          // // 分布区域
-          // for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          //   if (this.AllGradeInfo[j].ParentId === parseInt(this.PositionCheckId)) {
-          //     this.DistrictOptions.push(this.AllGradeInfo[j])
-          //   }
-          // }
-          // this.CopyDistrictOptions = []
-          // Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
-          // this.setChosen()
-        }).catch(err => {
-          console.error(err)
-        })
-      },
-
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.formData.EntrustCorp = res.data.CustomerId
-          // 获取级联所有信息
-          this.getAllGrade(this.formData.EntrustCorp)
+
+          // 获取分布区域
+          this.getDistrict()
         }).catch(err => {
           // handle error
           console.error(err)
         })
       },
+      getDistrict () {
+        this.$axios.get('/limsreportelecground/getdistrict/' + this.PositionCheckId).then(res => {
+          // this.groupOptions[0].options = res.data.items
+          this.DistrictOptions = res.data.items
+          Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
+          this.setChosen()
+          if (this.groupOptions[0].options.length > 0) {
+            this.formData.DistrictId = this.groupOptions[0].options[0].Id
+          } else if (this.groupOptions[1].options.length > 0) {
+            this.formData.DistrictId = this.groupOptions[1].options[0].Id
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
       positionSelectNext () {
         if (this.groupOptions[0].options.length > 0) {
           this.formData.DistrictId = this.groupOptions[0].options[0].Id
@@ -499,7 +463,8 @@
         this.saveEntity()
       },
       resetFormData (PId) {
-        // this.PositionCheckId = PId
+        console.log(PId, 'PId')
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0
@@ -512,11 +477,13 @@
         this.getEntrustInfo(this.EId)
       },
 
-      subListEditEntity (entityId) {
+      subListEditEntity (entityId, pId) {
         this.serviceId = entityId
         this.formData.Id = this.serviceId
         this.saveBtnName = '修改' // 修改
         this.continueInsertChecked = false
+        this.PositionCheckId = pId
+        this.getDistrict()
         this.initDatas()
       },
 

+ 12 - 115
src/dashoo.cn/frontend_web/src/pages/lims/reportequipotent/subdata/datalist.vue

@@ -501,88 +501,6 @@
             console.error(err)
           })
       },
-      getAllGrade (customerId) {
-        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          this.TestDepartOptions = []
-          this.PositionCheckOptions = []
-          this.DistrictOptions = []
-          // 受检单位
-          for (let i = 0; i < this.AllGradeInfo.length; i++) {
-            if (this.AllGradeInfo[i].ParentId === 0) {
-              this.TestDepartOptions.push(this.AllGradeInfo[i])
-            }
-          }
-          // 检测地点
-          for (let i = 0; i < this.TestDepartOptions.length; i++) {
-            for (let j = 0; j < this.AllGradeInfo.length; j++) {
-              if (this.AllGradeInfo[j].ParentId === this.TestDepartOptions[i].Id) {
-                this.PositionCheckOptions.push(this.AllGradeInfo[j])
-              }
-            }
-          }
-
-          // 分布区域
-          for (let i = 0; i < this.PositionCheckOptions.length; i++) {
-            for (let j = 0; j < this.AllGradeInfo.length; j++) {
-              if (this.AllGradeInfo[j].ParentId === this.PositionCheckOptions[i].Id) {
-                this.DistrictOptions.push(this.AllGradeInfo[j])
-              }
-            }
-          }
-          this.setChosen()
-        }).catch(err => {
-          console.error(err)
-        })
-      },
-      districtChange (row) {
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].Id === row.DistrictId) {
-            row.District = this.AllGradeInfo[j].PositionName
-          }
-        }
-      },
-      districtClick (val, row) {
-        if (val) {
-          this.DistrictOptions = []
-          for (let j = 0; j < this.AllGradeInfo.length; j++) {
-            if (this.AllGradeInfo[j].ParentId === row.PositionCheckId) {
-              this.DistrictOptions.push(this.AllGradeInfo[j])
-            }
-          }
-          Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
-          this.setChosen()
-        }
-      },
-      PositionCheckChange (row) {
-        row.DistrictId = ''
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].Id === row.PositionCheckId) {
-            row.PositionCheck = this.AllGradeInfo[j].PositionName
-          }
-        }
-      },
-      PositionCheckclick (val, row) {
-        if (val) {
-          this.PositionCheckOptions = []
-          for (let j = 0; j < this.AllGradeInfo.length; j++) {
-            if (this.AllGradeInfo[j].ParentId === row.TestDepartId) {
-              this.PositionCheckOptions.push(this.AllGradeInfo[j])
-            }
-          }
-        }
-        // this.setChosen()
-      },
-      TestDepartChange (row) {
-        // 受检单位
-        row.PositionCheckId = ''
-        row.PositionId = ''
-        for (let i = 0; i < this.AllGradeInfo.length; i++) {
-          if (this.AllGradeInfo[i].Id === row.TestDepartId) {
-            row.TestDepart = this.AllGradeInfo[i].PositionName
-          }
-        }
-      },
       dbTableRow (row) {
         if (this.entityList.length === 1) {
           this.updateTableRow(row)
@@ -619,35 +537,6 @@
           console.error(err)
         })
       },
-      // saveTableRow (row) {
-      //   api.updateEntity(row.Id, row, this.$axios).then(res => {
-      //     if (res.data.code === 0) {
-      //       // 保存成功后,初始化数据,变成修改
-      //       this.$message({
-      //         type: 'success',
-      //         message: res.data.message
-      //       })
-      //     } else {
-      //       this.$message({
-      //         type: 'warning',
-      //         message: res.data.message
-      //       })
-      //     }
-      //   }).catch(err => {
-      //     console.error(err)
-      //   })
-      // },
-      getEntrustInfo () {
-        var EId = this.EId
-        entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
-          var CustomerId = res.data.CustomerId
-          // 获取级联所有信息
-          this.getAllGrade(CustomerId)
-        }).catch(err => {
-          // handle error
-          console.error(err)
-        })
-      },
       initDatas () {
         // 分页及列表条件
         let params = {
@@ -668,7 +557,6 @@
           if (res.data.startIndex) {
             this.MaxOrderNo = res.data.startIndex
           }
-          this.getEntrustInfo()
         }).catch(err => {
           console.error(err)
         })
@@ -742,15 +630,24 @@
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)
         })
       },
       EditEntity (row) {
-        this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
-        this.$refs['DataoperaCompoment'].dialogVisible = true
+        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
+          if (!res.data.TestDepartId || res.data.TestDepartId === '' ||
+            !res.data.PositionCheckId || res.data.PositionCheckId === '') {
+            this.$message.warning('受检单位、检测地点不能为空!')
+            return
+          }
+          this.$refs['DataoperaCompoment'].subListEditEntity(row.Id, res.data.PositionCheckId)
+          this.$refs['DataoperaCompoment'].dialogVisible = true
+        }).catch(error => {
+          console.log(error)
+        })
       },
       // EditEntity (row) {
       //   this.$emit('edit-entity', row.Id)

+ 28 - 63
src/dashoo.cn/frontend_web/src/pages/lims/reportequipotent/subdata/datamain.vue

@@ -26,7 +26,7 @@
                 <el-option
                   v-for="item in TestDepartOptions"
                   :key="item.Id"
-                  :label="item.PositionName"
+                  :label="item.Fullname"
                   :value="item.Id">
                 </el-option>
               </el-select>
@@ -44,18 +44,18 @@
                   :value="item.Id">
                 </el-option>
               </el-select>
-              <template>
-                <el-popover
-                  placement="left"
-                  title="添加检测地点"
-                  width="200"
-                  trigger="click">
-                  <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                  <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>
-                  </el-button>
-                </el-popover>
-              </template>
+              <!--<template>-->
+                <!--<el-popover-->
+                  <!--placement="left"-->
+                  <!--title="添加检测地点"-->
+                  <!--width="200"-->
+                  <!--trigger="click">-->
+                  <!--<el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>-->
+                  <!--<el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>-->
+                  <!--<el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>-->
+                  <!--</el-button>-->
+                <!--</el-popover>-->
+              <!--</template>-->
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -216,31 +216,25 @@
       },
       InspecCorpChange (Id) {
         // 更新检测地点
+        console.log(Id)
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
         this.formData.PositionCheckId = ''
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
-        // 检测地点、安装地点 都默认为第一个
-        if (this.PositionCheckOptions.length > 0) {
-          this.formData.PositionCheckId = this.PositionCheckOptions[0].Id
-        }
-        this.TestDepartOptions = this.TestDepartOptionsBackUp
+        console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp==')
+        console.log(this.PositionCheckOptions, 'this.PositionCheckOptions==')
       },
       setPositionCheckOptions (Id) {
         // 更新检测地点
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
       },
       getDictOptions () {
         api.getDictList(this.$axios).then(res => {
@@ -251,41 +245,12 @@
         })
       },
       getAllGrade (customerId) {
-        this.$axios.get('/limsreportequipotent/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          this.TestDepartOptions = []
-          this.TestDepartOptionsBackUp = []
-          this.PositionCheckOptions = []
-          this.PositionCheckOptionsBackUp = []
-          if (!this.formData.TestDepartId) {
-            this.formData.TestDepartId = ''
-          }
-          if (!this.formData.PositionCheckId) {
-            this.formData.PositionCheckId = ''
-          }
-          if (this.AllGradeInfo === null) {
-            this.formData.TestDepartId = ''
-            this.formData.PositionCheckId = ''
-            return
-          }
-          // 受检单位
-          for (let i = 0; i < this.AllGradeInfo.length; i++) {
-            if (this.AllGradeInfo[i].ParentId === 0) {
-              this.TestDepartOptionsBackUp.push(this.AllGradeInfo[i])
-            }
-          }
-          Object.assign(this.TestDepartOptions, this.TestDepartOptionsBackUp)
-          // 检测地点
-          if (this.TestDepartOptions.length > 0) {
-            for (let i = 0; i < this.TestDepartOptions.length; i++) {
-              for (let j = 0; j < this.AllGradeInfo.length; j++) {
-                if (this.AllGradeInfo[j].ParentId === this.TestDepartOptions[i].Id) {
-                  this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
-                }
-              }
-            }
-          }
-          Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          console.log(res.data)
+          this.TestDepartOptions = res.data.items['ThiUnits']
+          this.PositionCheckOptions = res.data.items['PositionCheck']
+          Object.assign(this.PositionCheckOptionsBackUp, this.PositionCheckOptions)
+          console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp')
           this.getDataEntry(this.DataEntryId)
         }).catch(err => {
           console.error(err)

+ 20 - 66
src/dashoo.cn/frontend_web/src/pages/lims/reportequipotent/subdata/dataopera.vue

@@ -220,7 +220,7 @@
         this.formData.EId = this.EId
         this.formData.TaskBalanceId = this.TaskBalanceId
         this.formData.DataEntryId = this.DataEntryId
-        this.getEntrustInfo(this.EId)
+        // this.getEntrustInfo(this.EId)
       }
       // 初始值备份
       Object.assign(this.historyData, this.formData)
@@ -307,30 +307,6 @@
             })
         }
       },
-      // changeDistrict (val) {
-      //   let params = {
-      //     CustomerId: this.formData.EntrustCorp,
-      //     ParentId: this.formData.PositionCheckId,
-      //     PositionName: val
-      //   }
-      //   if (!this.in_array_position(val, this.DistrictOptions)) {
-      //     this.$axios.post('/limsdataentry/addDistrict', params)
-      //       .then(res => {
-      //         if (res.data.code === 0) {
-      //           this.groupOptions[0].options.push(res.data.item)
-      //           this.DistrictOptions.push(res.data.item)
-      //           let _this = this
-      //           setTimeout(function () {
-      //             _this.formData.DistrictId = res.data.item.Id
-      //           }, 200)
-      //         }
-      //       })
-      //       .catch(err => {
-      //         // handle error
-      //         console.error(err)
-      //       })
-      //   }
-      // },
       setGroupOptions () {
         let arr = this.groupOptions[0].options
         for (var i = 0; i < arr.length; i++) {
@@ -369,25 +345,6 @@
         Object.assign(this.groupOptions2, this.groupOptions[1].options)
       },
 
-      // 更改检测地点触发分布区域改变
-      PositionCheckChange (Id) {
-        // 更新分布区域
-        this.DistrictOptions = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.DistrictOptions.push(this.AllGradeInfo[j])
-          }
-        }
-        this.CopyDistrictOptions = []
-        Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
-        // 已经选择的
-        this.setChosen()
-        if (this.groupOptions[0].options.length > 0) {
-          this.formData.DistrictId = this.groupOptions[0].options[0].Id
-        } else if (this.groupOptions[1].options.length > 0) {
-          this.formData.DistrictId = this.groupOptions[1].options[0].Id
-        }
-      },
       initDatas () {
         if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
@@ -418,25 +375,18 @@
           console.error(err)
         })
       },
-      getDataEntry () {
-        this.groupOptions[0].options = []
-        this.groupOptions[1].options = []
-        let _this = this
-        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
-          _this.formData.PositionCheckId = res.data.PositionCheckId
-          _this.PositionCheckChange(res.data.PositionCheckId)
-        }).catch(error => {
-          console.log(error)
-        })
-      },
-      // 根据委托单位Id获取所有级联信息
-      getAllGrade (customerId) {
-        this.$axios.get('/limsreportequipotent/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          if (this.AllGradeInfo === null) {
-            return
+
+      getDistrict () {
+        this.$axios.get('/limsreportelecground/getdistrict/' + this.PositionCheckId).then(res => {
+          // this.groupOptions[0].options = res.data.items
+          this.DistrictOptions = res.data.items
+          Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
+          this.setChosen()
+          if (this.groupOptions[0].options.length > 0) {
+            this.formData.PositionId = this.groupOptions[0].options[0].Id
+          } else if (this.groupOptions[1].options.length > 0) {
+            this.formData.PositionId = this.groupOptions[1].options[0].Id
           }
-          this.getDataEntry()
         }).catch(err => {
           console.error(err)
         })
@@ -444,8 +394,8 @@
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.formData.EntrustCorp = res.data.CustomerId
-          // 获取级联所有信息
-          this.getAllGrade(this.formData.EntrustCorp)
+          // 获取分布区域
+          this.getDistrict()
         }).catch(err => {
           // handle error
           console.error(err)
@@ -471,7 +421,9 @@
         this.saveBtnName = '新增'
         this.saveEntity()
       },
-      resetFormData () {
+      resetFormData (PId) {
+        console.log(PId, 'PId')
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0
@@ -484,11 +436,13 @@
         this.getEntrustInfo(this.EId)
       },
 
-      subListEditEntity (entityId) {
+      subListEditEntity (entityId, pId) {
         this.serviceId = entityId
         this.formData.Id = this.serviceId
         this.saveBtnName = '修改' // 修改
         this.continueInsertChecked = false
+        this.PositionCheckId = pId
+        this.getDistrict()
         this.initDatas()
       },
 

+ 13 - 4
src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/datalist.vue

@@ -702,7 +702,7 @@
         api.getList('', params, this.$axios).then(res => {
           this.entityList = res.data.items
           this.currentItemCount = res.data.currentItemCount
-          this.getEntrustInfo(this.EId)
+          // this.getEntrustInfo(this.EId)
           if (res.data.startIndex) {
             this.MaxOrderNo = res.data.startIndex
           }
@@ -783,15 +783,24 @@
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)
         })
       },
       EditEntity (row) {
-        this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
-        this.$refs['DataoperaCompoment'].dialogVisible = true
+        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
+          if (!res.data.TestDepartId || res.data.TestDepartId === '' ||
+            !res.data.PositionCheckId || res.data.PositionCheckId === '') {
+            this.$message.warning('受检单位、检测地点不能为空!')
+            return
+          }
+          this.$refs['DataoperaCompoment'].subListEditEntity(row.Id, res.data.PositionCheckId)
+          this.$refs['DataoperaCompoment'].dialogVisible = true
+        }).catch(error => {
+          console.log(error)
+        })
       },
       /* EditEntity (row) {
         this.$emit('edit-entity', row.Id)

+ 27 - 61
src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/datamain.vue

@@ -27,7 +27,7 @@
                 <el-option
                   v-for="item in TestDepartOptions"
                   :key="item.Id"
-                  :label="item.PositionName"
+                  :label="item.Fullname"
                   :value="item.Id">
                 </el-option>
               </el-select>
@@ -46,18 +46,18 @@
                   :value="item.Id">
                 </el-option>
               </el-select>
-              <template>
-                <el-popover
-                  placement="left"
-                  title="添加检测地点"
-                  width="200"
-                  trigger="click">
-                  <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                  <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>
-                  </el-button>
-                </el-popover>
-              </template>
+              <!--<template>-->
+                <!--<el-popover-->
+                  <!--placement="left"-->
+                  <!--title="添加检测地点"-->
+                  <!--width="200"-->
+                  <!--trigger="click">-->
+                  <!--<el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>-->
+                  <!--<el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>-->
+                  <!--<el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>-->
+                  <!--</el-button>-->
+                <!--</el-popover>-->
+              <!--</template>-->
             </el-form-item>
           </el-col>
           <el-col :span="24">
@@ -205,31 +205,25 @@
       },
       InspecCorpChange (Id) {
         // 更新检测地点
+        console.log(Id)
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
         this.formData.PositionCheckId = ''
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
-        // 检测地点、安装地点 都默认为第一个
-        if (this.PositionCheckOptions.length > 0) {
-          this.formData.PositionCheckId = this.PositionCheckOptions[0].Id
-        }
-        this.TestDepartOptions = this.TestDepartOptionsBackUp
+        console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp==')
+        console.log(this.PositionCheckOptions, 'this.PositionCheckOptions==')
       },
       setPositionCheckOptions (Id) {
         // 更新检测地点
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
       },
       getDictOptions () {
         api.getDictList(this.$axios).then(res => {
@@ -259,39 +253,11 @@
       },
       getAllGrade (customerId) {
         this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          this.TestDepartOptions = []
-          this.TestDepartOptionsBackUp = []
-          this.PositionCheckOptionsBackUp = []
-          if (!this.formData.TestDepartId) {
-            this.formData.TestDepartId = ''
-          }
-          if (!this.formData.PositionCheckId) {
-            this.formData.PositionCheckId = ''
-          }
-          if (this.AllGradeInfo === null) {
-            this.formData.TestDepartId = ''
-            this.formData.PositionCheckId = ''
-            return
-          }
-          // 受检单位
-          for (let i = 0; i < this.AllGradeInfo.length; i++) {
-            if (this.AllGradeInfo[i].ParentId === 0) {
-              this.TestDepartOptionsBackUp.push(this.AllGradeInfo[i])
-              Object.assign(this.TestDepartOptions, this.TestDepartOptionsBackUp)
-            }
-          }
-          // 检测地点
-          if (this.TestDepartOptions.length > 0) {
-            for (let i = 0; i < this.TestDepartOptions.length; i++) {
-              for (let j = 0; j < this.AllGradeInfo.length; j++) {
-                if (this.AllGradeInfo[j].ParentId === this.TestDepartOptions[i].Id) {
-                  this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
-                  Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
-                }
-              }
-            }
-          }
+          console.log(res.data)
+          this.TestDepartOptions = res.data.items['ThiUnits']
+          this.PositionCheckOptions = res.data.items['PositionCheck']
+          Object.assign(this.PositionCheckOptionsBackUp, this.PositionCheckOptions)
+          console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp')
           this.getDataEntry(this.DataEntryId)
         }).catch(err => {
           console.error(err)

+ 37 - 91
src/dashoo.cn/frontend_web/src/pages/lims/reportleakprotect/subdata/dataopera.vue

@@ -47,18 +47,18 @@
                     </el-option>
                   </el-option-group>
                 </el-select>
-                <template>
-                  <el-popover
-                    placement="left"
-                    title="添加安装位置"
-                    width="200"
-                    trigger="click">
-                    <el-input ref="inputPosition" v-model="Position" size="small" style="width: 70%"></el-input>
-                    <el-button size="small" style="width: 30%; text-align: center" @click="addPosition">保存</el-button>
-                    <el-button slot="reference"><i class="el-icon-plus"></i>
-                    </el-button>
-                  </el-popover>
-                </template>
+                <!--<template>-->
+                  <!--<el-popover-->
+                    <!--placement="left"-->
+                    <!--title="添加安装位置"-->
+                    <!--width="200"-->
+                    <!--trigger="click">-->
+                    <!--<el-input ref="inputPosition" v-model="Position" size="small" style="width: 70%"></el-input>-->
+                    <!--<el-button size="small" style="width: 30%; text-align: center" @click="addPosition">保存</el-button>-->
+                    <!--<el-button slot="reference"><i class="el-icon-plus"></i>-->
+                    <!--</el-button>-->
+                  <!--</el-popover>-->
+                <!--</template>-->
               </el-form-item>
             </el-col>
 
@@ -272,6 +272,7 @@
         MainProductsNoOptions: [],
         StatusOptions: [],
         RemainElectricOptions: [],
+        DistrictOptions: [],
         CopyDistrictOptions: [],
         MainProductsList: [],
         PhaseOptions: [
@@ -299,7 +300,7 @@
         this.formData.EId = this.EId
         this.formData.TaskBalanceId = this.TaskBalanceId
         this.formData.DataEntryId = this.DataEntryId
-        this.getEntrustInfo(this.EId)
+        // this.getEntrustInfo(this.EId)
       }
       // 初始值备份
       Object.assign(this.historyData, this.formData)
@@ -443,6 +444,7 @@
         if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
             this.formData = res.data
+            console.log(this.formData, 'this.formData')
             this.MainProductsNoOptions = res.data.MainProductsNo.split('、')
             // 获取所有等级信息
             // this.getAllGrade(this.formData.EntrustCorp)
@@ -510,93 +512,33 @@
           console.log(e)
         }
       },
-      // 根据委托单位Id获取所有级联信息
-      getAllGrade (customerId) {
-        // 替换api的方式:api.getAllGradeInfo(customerId,this.$axios).then(...)
-        this.$axios.get('/limsreportleakprotect/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          if (this.AllGradeInfo === null) {
-            return
+
+      getDistrict () {
+        this.$axios.get('/limsreportelecground/getdistrict/' + this.PositionCheckId).then(res => {
+          // this.groupOptions[0].options = res.data.items
+          this.DistrictOptions = res.data.items
+          Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
+          this.setChosen()
+          if (this.groupOptions[0].options.length > 0) {
+            this.formData.PositionId = this.groupOptions[0].options[0].Id
+          } else if (this.groupOptions[1].options.length > 0) {
+            this.formData.PositionId = this.groupOptions[1].options[0].Id
           }
-          // // 受检单位
-          // this.InspecCorpOptions = []
-          // for (let i = 0; i < this.AllGradeInfo.length; i++) {
-          //   if (this.AllGradeInfo[i].ParentId === 0) {
-          //     this.InspecCorpOptions.push(this.AllGradeInfo[i])
-          //   }
-          // }
-          //
-          // // 检测地点
-          // this.PositionCheckOptions = []
-          // if (this.InspecCorpOptions) {
-          //   for (let i = 0; i < this.InspecCorpOptions.length; i++) {
-          //     for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          //       if (this.AllGradeInfo[j].ParentId === this.InspecCorpOptions[i].Id) {
-          //         this.PositionCheckOptions.push(this.AllGradeInfo[j])
-          //       }
-          //     }
-          //   }
-          // }
-          // // 安装地点
-          // this.PositionOptions = []
-          // if (this.PositionCheckOptions) {
-          //   for (let i = 0; i < this.PositionCheckOptions.length; i++) {
-          //     for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          //       if (this.AllGradeInfo[j].ParentId === this.PositionCheckOptions[i].Id) {
-          //         this.PositionOptions.push(this.AllGradeInfo[j])
-          //       }
-          //     }
-          //   }
-          //   this.CopyDistrictOptions = []
-          //   Object.assign(this.CopyDistrictOptions, this.PositionOptions)
-          //   // 已经选择的
-          //   // this.setChosen()
-          // }
-          this.getDataEntry()
         }).catch(err => {
           console.error(err)
         })
       },
-      PositionCheckChange (Id) {
-        // 更新分布区域
-        this.PositionOptions = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionOptions.push(this.AllGradeInfo[j])
-          }
-        }
-        this.CopyDistrictOptions = []
-        Object.assign(this.CopyDistrictOptions, this.PositionOptions)
-        // 已经选择的
-        this.setChosen()
-        // 分布区域默认为第一个
-        // if (this.DistrictOptions.length > 0) {
-        //   this.formData.DistrictId = this.DistrictOptions[0].Id
-        // }
-        if (this.groupOptions[0].options.length > 0) {
-          this.formData.PositionId = this.groupOptions[0].options[0].Id
-        } else if (this.groupOptions[1].options.length > 0) {
-          this.formData.PositiontId = this.groupOptions[1].options[0].Id
-        }
-      },
-      getDataEntry () {
-        this.groupOptions[0].options = []
-        this.groupOptions[1].options = []
-        let _this = this
-        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
-          _this.formData.PositionCheckId = res.data.PositionCheckId
-          _this.PositionCheckChange(res.data.PositionCheckId)
-        }).catch(error => {
-          console.log(error)
-        })
-      },
       // 获取委托单位id号
       getEntrustInfo (EId) {
         let _this = this
         entrustApi.getEntrustInfo(EId, _this.$axios).then(function (res) {
           _this.formData.EntrustCorp = res.data.CustomerId
+
+          // 获取分布区域
+          _this.getDistrict()
+
           // 获取级联所有信息
-          _this.getAllGrade(_this.formData.EntrustCorp)
+          // _this.getAllGrade(_this.formData.EntrustCorp)
         }).catch(err => {
           console.error(err)
         })
@@ -621,7 +563,9 @@
         this.saveBtnName = '新增'
         this.saveEntity()
       },
-      resetFormData () {
+      resetFormData (PId) {
+        console.log(PId, 'PId')
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0
@@ -634,11 +578,13 @@
         this.getEntrustInfo(this.EId)
       },
 
-      subListEditEntity (entityId) {
+      subListEditEntity (entityId, pId) {
         this.serviceId = entityId
         this.formData.Id = this.serviceId
         this.saveBtnName = '修改' // 修改
         this.continueInsertChecked = false
+        this.PositionCheckId = pId
+        this.getDistrict()
         this.initDatas()
       },
 

+ 13 - 4
src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/datareview.vue

@@ -540,21 +540,30 @@
         this.initDatas()
       },
       addDataEntity () {
-        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
+        this.$axios.get('/limsdataentry/getdataentry/' + this.queryParams.DataEntryId).then(res => {
           if (res.data.TestDepartId === '' || res.data.PositionCheckId === '') {
             this.$message.warning('受检单位、检测地点不能为空!')
             return
           }
           // 刷新子列表
-          this.$refs['DataoperaCompoment'].resetFormData()
+          this.$refs['DataoperaCompoment'].resetFormData(res.data.PositionCheckId)
           this.$refs['DataoperaCompoment'].dialogVisible = true
         }).catch(error => {
           console.log(error)
         })
       },
       EditEntity (row) {
-        this.$refs['DataoperaCompoment'].subListEditEntity(row.Id)
-        this.$refs['DataoperaCompoment'].dialogVisible = true
+        this.$axios.get('/limsdataentry/getdataentry/' + this.queryParams.DataEntryId).then(res => {
+          if (!res.data.TestDepartId || res.data.TestDepartId === '' ||
+            !res.data.PositionCheckId || res.data.PositionCheckId === '') {
+            this.$message.warning('受检单位、检测地点不能为空!')
+            return
+          }
+          this.$refs['DataoperaCompoment'].subListEditEntity(row.Id, res.data.PositionCheckId)
+          this.$refs['DataoperaCompoment'].dialogVisible = true
+        }).catch(error => {
+          console.log(error)
+        })
       },
       changeDistrict () {
         var arr = this.groupOptions[0].options

+ 29 - 62
src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/subdata/datamain.vue

@@ -26,7 +26,7 @@
                 <el-option
                   v-for="item in TestDepartOptions"
                   :key="item.Id"
-                  :label="item.PositionName"
+                  :label="item.Fullname"
                   :value="item.Id">
                 </el-option>
               </el-select>
@@ -35,7 +35,7 @@
 
           <el-col :span="8">
             <el-form-item prop="PositionCheckId" label="检测地点" :rules="{ required: true, message: '检测地点不能为空!'}">
-              <el-select ref="selectPositionCheck" v-model="formData.PositionCheckId" filterable placeholder="请选择" style="width: 70%"
+              <el-select ref="selectPositionCheck" v-model="formData.PositionCheckId" filterable placeholder="请选择" style="width: 100%"
                          :filter-method="positionCheckFilter" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3">
                 <el-option
                   v-for="item in PositionCheckOptions"
@@ -44,18 +44,18 @@
                   :value="item.Id">
                 </el-option>
               </el-select>
-              <template>
-                <el-popover
-                  placement="left"
-                  title="添加检测地点"
-                  width="200"
-                  trigger="click">
-                  <el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>
-                  <el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>
-                  <el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>
-                  </el-button>
-                </el-popover>
-              </template>
+              <!--<template>-->
+                <!--<el-popover-->
+                  <!--placement="left"-->
+                  <!--title="添加检测地点"-->
+                  <!--width="200"-->
+                  <!--trigger="click">-->
+                  <!--<el-input ref="inputPositionCheck" v-model="PositionCheck" size="small" style="width: 70%"></el-input>-->
+                  <!--<el-button size="small" style="width: 30%; text-align: center" @click="addPositionCheck">保存</el-button>-->
+                  <!--<el-button slot="reference" :disabled="DataStatus != 0 && DataStatus != 5 && DataStatus != 3"><i class="el-icon-plus"></i>-->
+                  <!--</el-button>-->
+                <!--</el-popover>-->
+              <!--</template>-->
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -189,20 +189,16 @@
       },
       InspecCorpChange (Id) {
         // 更新检测地点
+        console.log(Id)
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
         this.formData.PositionCheckId = ''
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
-        // 检测地点、安装地点 都默认为第一个
-        if (this.PositionCheckOptions.length > 0) {
-          this.formData.PositionCheckId = this.PositionCheckOptions[0].Id
-        }
-        this.TestDepartOptions = this.TestDepartOptionsBackUp
+        console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp==')
+        console.log(this.PositionCheckOptions, 'this.PositionCheckOptions==')
       },
       getDictOptions () {
         api.getDictList(this.$axios).then(res => {
@@ -215,39 +211,12 @@
         })
       },
       getAllGrade (customerId) {
-        this.$axios.get('/limsreportlightprotect/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          this.TestDepartOptions = []
-          this.TestDepartOptionsBackUp = []
-          this.PositionCheckOptionsBackUp = []
-          if (!this.formData.TestDepartId) {
-            this.formData.TestDepartId = ''
-          }
-          if (!this.formData.PositionCheckId) {
-            this.formData.PositionCheckId = ''
-          }
-          if (this.AllGradeInfo === null) {
-            this.formData.TestDepartId = ''
-            this.formData.PositionCheckId = ''
-            return
-          }
-          // 受检单位
-          for (let i = 0; i < this.AllGradeInfo.length; i++) {
-            if (this.AllGradeInfo[i].ParentId === 0) {
-              this.TestDepartOptionsBackUp.push(this.AllGradeInfo[i])
-            }
-          }
-          Object.assign(this.TestDepartOptions, this.TestDepartOptionsBackUp)
-          // 检测地点
-          if (this.TestDepartOptions.length > 0) {
-            for (let i = 0; i < this.TestDepartOptions.length; i++) {
-              for (let j = 0; j < this.AllGradeInfo.length; j++) {
-                if (this.AllGradeInfo[j].ParentId === this.TestDepartOptions[i].Id) {
-                  this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
-                }
-              }
-            }
-          }
+        this.$axios.get('/limsreportelecground/allgradeinfo/' + customerId).then(res => {
+          console.log(res.data)
+          this.TestDepartOptions = res.data.items['ThiUnits']
+          this.PositionCheckOptions = res.data.items['PositionCheck']
+          Object.assign(this.PositionCheckOptionsBackUp, this.PositionCheckOptions)
+          console.log(this.PositionCheckOptionsBackUp, 'this.PositionCheckOptionsBackUp')
           this.getDataEntry(this.DataEntryId)
         }).catch(err => {
           console.error(err)
@@ -265,13 +234,11 @@
       setPositionCheckOptions (Id) {
         // 更新检测地点
         this.PositionCheckOptions = []
-        this.PositionCheckOptionsBackUp = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.PositionCheckOptionsBackUp.push(this.AllGradeInfo[j])
+        for (let j = 0; j < this.PositionCheckOptionsBackUp.length; j++) {
+          if (this.PositionCheckOptionsBackUp[j].ThrUnitId === Id) {
+            this.PositionCheckOptions.push(this.PositionCheckOptionsBackUp[j])
           }
         }
-        Object.assign(this.PositionCheckOptions, this.PositionCheckOptionsBackUp)
       },
       getDataEntry () {
         this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {

+ 31 - 82
src/dashoo.cn/frontend_web/src/pages/lims/reportlightprotect/subdata/dataopera.vue

@@ -29,18 +29,18 @@
                     </el-option>
                   </el-option-group>
                 </el-select>
-                <template>
-                  <el-popover
-                    placement="left"
-                    title="添加分布位置"
-                    width="150px"
-                    trigger="click">
-                    <el-input ref="inputDistrict" v-model="District" size="small" style="width: 70%"></el-input>
-                    <el-button size="small" style="width: 30%; text-align: center" @click="addDistrict">保存</el-button>
-                    <el-button slot="reference"><i class="el-icon-plus"></i>
-                    </el-button>
-                  </el-popover>
-                </template>
+                <!--<template>-->
+                  <!--<el-popover-->
+                    <!--placement="left"-->
+                    <!--title="添加分布位置"-->
+                    <!--width="150px"-->
+                    <!--trigger="click">-->
+                    <!--<el-input ref="inputDistrict" v-model="District" size="small" style="width: 70%"></el-input>-->
+                    <!--<el-button size="small" style="width: 30%; text-align: center" @click="addDistrict">保存</el-button>-->
+                    <!--<el-button slot="reference"><i class="el-icon-plus"></i>-->
+                    <!--</el-button>-->
+                  <!--</el-popover>-->
+                <!--</template>-->
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -286,7 +286,7 @@
           this.formData.EId = this.EId
           this.formData.TaskBalanceId = this.TaskBalanceId
           this.formData.DataEntryId = this.DataEntryId
-          this.getEntrustInfo(this.EId)
+          // this.getEntrustInfo(this.EId)
         }
         // 初始值备份
         Object.assign(this.historyData, this.formData)
@@ -351,30 +351,6 @@
             })
         }
       },
-      // changeDistrict (val) {
-      //   let params = {
-      //     CustomerId: this.formData.EntrustCorp,
-      //     ParentId: this.formData.PositionCheckId,
-      //     PositionName: val
-      //   }
-      //   if (!this.in_array_position(val, this.DistrictOptions)) {
-      //     this.$axios.post('/limsreportlightprotect/addDistrict', params)
-      //       .then(res => {
-      //         if (res.data.code === 0) {
-      //           this.groupOptions[0].options.push(res.data.item)
-      //           this.DistrictOptions.push(res.data.item)
-      //           let _this = this
-      //           setTimeout(function () {
-      //             _this.formData.DistrictId = res.data.item.Id
-      //           }, 200)
-      //         }
-      //       })
-      //       .catch(err => {
-      //         // handle error
-      //         console.error(err)
-      //       })
-      //   }
-      // },
 
       setChosen () {
         try {
@@ -401,29 +377,6 @@
           console.log(e)
         }
       },
-      // 更改检测地点触发分布区域改变
-      PositionCheckChange (Id) {
-        // 更新分布区域
-        this.DistrictOptions = []
-        for (let j = 0; j < this.AllGradeInfo.length; j++) {
-          if (this.AllGradeInfo[j].ParentId === Id) {
-            this.DistrictOptions.push(this.AllGradeInfo[j])
-          }
-        }
-        this.CopyDistrictOptions = []
-        Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
-        // 已经选择的
-        this.setChosen()
-        // 分布区域默认为第一个
-        // if (this.DistrictOptions.length > 0) {
-        //   this.formData.DistrictId = this.DistrictOptions[0].Id
-        // }
-        if (this.groupOptions[0].options.length > 0) {
-          this.formData.DistrictId = this.groupOptions[0].options[0].Id
-        } else if (this.groupOptions[1].options.length > 0) {
-          this.formData.DistrictId = this.groupOptions[1].options[0].Id
-        }
-      },
       initDatas () {
         if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
@@ -462,34 +415,26 @@
         })
       },
 
-      // 根据委托单位Id获取所有级联信息
-      getAllGrade (customerId) {
-        this.$axios.get('/limsreportlightprotect/allgradeinfo/' + customerId).then(res => {
-          this.AllGradeInfo = res.data.items['AllGradeInfo']
-          if (this.AllGradeInfo === null) {
-            return
+      getDistrict () {
+        this.$axios.get('/limsreportelecground/getdistrict/' + this.PositionCheckId).then(res => {
+          // this.groupOptions[0].options = res.data.items
+          this.DistrictOptions = res.data.items
+          Object.assign(this.CopyDistrictOptions, this.DistrictOptions)
+          this.setChosen()
+          if (this.groupOptions[0].options.length > 0) {
+            this.formData.DistrictId = this.groupOptions[0].options[0].Id
+          } else if (this.groupOptions[1].options.length > 0) {
+            this.formData.DistrictId = this.groupOptions[1].options[0].Id
           }
-          this.getDataEntry()
         }).catch(err => {
           console.error(err)
         })
       },
-      getDataEntry () {
-        this.groupOptions[0].options = []
-        this.groupOptions[1].options = []
-        let _this = this
-        this.$axios.get('/limsdataentry/getdataentry/' + this.DataEntryId).then(res => {
-          _this.formData.PositionCheckId = res.data.PositionCheckId
-          _this.PositionCheckChange(res.data.PositionCheckId)
-        }).catch(error => {
-          console.log(error)
-        })
-      },
       getEntrustInfo (EId) {
         entrustApi.getEntrustInfo(EId, this.$axios).then(res => {
           this.formData.EntrustCorp = res.data.CustomerId
-          // 获取级联所有信息
-          this.getAllGrade(this.formData.EntrustCorp)
+          // 获取分布区域
+          this.getDistrict()
         }).catch(err => {
           // handle error
           console.error(err)
@@ -515,7 +460,9 @@
         this.saveBtnName = '新增'
         this.saveEntity()
       },
-      resetFormData () {
+      resetFormData (PId) {
+        console.log(PId, 'PId')
+        this.PositionCheckId = PId
         Object.assign(this.formData, this.historyData)
         this.saveBtnName = '新增'
         this.formData.Id = 0
@@ -528,11 +475,13 @@
         this.getEntrustInfo(this.formData.EId)
       },
 
-      subListEditEntity (entityId) {
+      subListEditEntity (entityId, pId) {
         this.serviceId = entityId
         this.formData.Id = this.serviceId
         this.saveBtnName = '修改' // 修改
         this.continueInsertChecked = false
+        this.PositionCheckId = pId
+        this.getDistrict()
         this.initDatas()
       },
       setGroupOptions () {

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

@@ -429,16 +429,14 @@
       })
     },
     name: 'limsentrustdetail',
-    data() {
+    data () {
       return {
-        //ln
         typevalue: [],
         EntrustSampleId: '',
-        //ln
         currentPage: 1,
         size: 10,
         currentItemCount: 0,
-        pagetitle: '', //界面标题
+        pagetitle: '', // 界面标题
         ServiceId: '',
         Id: '',
         // 列表排序
@@ -447,9 +445,9 @@
           Prop: ''
         },
         equipmentEntityList: [],
-        //样本单位
+        // 样本单位
         sampeunitlist: [],
-        //委托方名称
+        // 委托方名称
         customerList: [],
         groupOptions: [{
           label: '大港油田',
@@ -460,13 +458,13 @@
         }],
         addressList: [],
         CusAddList: [],
-        projectTypeList: [], //检测报告大项
-        sampleTypeList: [], //检测项目小项,样品名称列表
+        projectTypeList: [], // 检测报告大项
+        sampleTypeList: [], // 检测项目小项,样品名称列表
         sampleTypeTreeList: [],
         selectedorg: [],
-        //详情
+        // 详情
         testdetails: [],
-        //检测类型
+        // 检测类型
         testtypes: [],
 
         orgtreeprops: {
@@ -475,9 +473,9 @@
           children: 'children'
         },
         sampleTypeOrigList: [],
-        testTypeList: [], //检测类型
-        entypeList: [], //委托类型
-        departmentList: [], //特检站下属部门
+        testTypeList: [], // 检测类型
+        entypeList: [], // 委托类型
+        departmentList: [], // 特检站下属部门
         departmentId: '',
         templatecode: '',
         tjz: false,
@@ -516,7 +514,7 @@
           ISreveive: 0,
           ReveiveNum: 0.0,
           DataTemplateId: 0,
-          DataTemplateName: '',
+          DataTemplateName: ''
         },
         TestSampleNum: 0,
         rulesmainForm: {
@@ -542,9 +540,9 @@
           }],
           SampleNum: [{
             type: 'number',
-            message: "样品数量必须为数值",
-            trigger: "blur",
-          }],
+            message: '样品数量必须为数值',
+            trigger: 'blur'
+          }]
         },
         status_flag: false,
         deliverShow: false,
@@ -575,14 +573,14 @@
           ISprepare: 0,
           PrepareNum: 0,
           ISreveive: 0,
-          ReveiveNum: 10.,
+          ReveiveNum: 10,
           Remark: ''
         },
         rulesdeliverForm: {
           SampleNum: [{
             type: 'number',
-            message: "样品数量必须为数值",
-            trigger: "blur",
+            message: '样品数量必须为数值',
+            trigger: 'blur',
           }],
           SampleCode: [{
             required: true,
@@ -671,8 +669,8 @@
         rulesTransport: {
           Sender: [{
             required: true,
-            message: "请填写发件人",
-            trigger: "blur",
+            message: '请填写发件人',
+            trigger: 'blur',
           }],
         },
         //分配信息弹窗
@@ -704,13 +702,13 @@
         },
       }
     },
-    created() {
+    created () {
       this.ServiceId = this.$route.params.opera
       this.departmentId = this.authUser.Profile.DepartmentId
       // request
-      if (this.ServiceId == 'addentrust') {
+      if (this.ServiceId === 'addentrust') {
         this.pagetitle = '新增检测任务'
-        this.mainForm.EntrustTypeId = 329 //委托检测
+        this.mainForm.EntrustTypeId = 329 // 委托检测
         // this.getEntrustNo()
         // this.testcodec()
       } else if (this.ServiceId != '0') {
@@ -719,17 +717,17 @@
         this.getSampleNum()
         this.getSampleList()
       }
-      //获取委托类型
+      // 获取委托类型
       this.getEntypeList()
       this.getsamplesnumlist()
       this.getCustomer()
       this.getProjectType()
       this.getSampleTypeOrigList()
-      //this.getpartuserlist()
+      // this.getpartuserlist()
       this.getDictList()
-      //判断组织结构
+      // 判断组织结构
       this.getOrganizeListById()
-      this.getPermissions() //权限
+      this.getPermissions() // 权限
     },
     methods: {
       initDeviceList () {
@@ -751,9 +749,9 @@
 
       // 列表排序功能
       orderby(column) {
-        if (column.order == 'ascending') {
+        if (column.order === 'ascending') {
           this.Column.Order = 'asc'
-        } else if (column.order == 'descending') {
+        } else if (column.order === 'descending') {
           this.Column.Order = 'desc'
         }
         this.Column.Prop = column.prop
@@ -773,7 +771,7 @@
       //验证单号是否唯一
       trueEntrustNo() {
         let _this = this
-        if (_this.ServiceId == 'addentrust') {
+        if (_this.ServiceId === 'addentrust') {
           _this.$axios.get("/limsentrust/entrustmakesure?EntrustNo=" + _this.mainForm.EntrustNo, {})
             .then(function (response) {
               _this.entrustTotal = response.data.items
@@ -822,7 +820,7 @@
       },
       //保存数据
       saveEntity() {
-        if (this.ServiceId == 'addentrust' || this.ServiceId <= '0') {
+        if (this.ServiceId === 'addentrust' || this.ServiceId <= '0') {
           this.addEntrust()
         } else {
           this.editEntrust()
@@ -965,7 +963,7 @@
       //任务分配
       balance() {
         this.balanceForm.ConUserId = this.OfficerList.join(',');
-        if (!this.balanceForm.ConUserId || this.balanceForm.ConUserId == '') {
+        if (!this.balanceForm.ConUserId || this.balanceForm.ConUserId === '') {
           this.$message({
             type: 'warning',
             message: '请先选择负责人。'
@@ -1452,9 +1450,9 @@
             _this.deliverForm.DeliverNo = response.data.items + ''
           })
       },
-      //判断组织结构确定流程
-      getOrganizeListById() {
-        let _this = this;
+      // 判断组织结构确定流程
+      getOrganizeListById () {
+        let _this = this
         _this.$axios.get('/limsentrust/getstyle')
           .then(
             function (response) {