Browse Source

设备分类 分组 检测计划查询

lining 6 years ago
parent
commit
1aa2920f5e

+ 16 - 0
src/dashoo.cn/backend/api/controllers/lims/customer.go

@@ -88,6 +88,22 @@ func (this *CustomerController) Customerlist() {
 	this.ServeJSON()
 }
 
+// @Title 委托方信息
+// @Description get user by token
+// @Success 200 {object} models.Userblood
+// @router /customerlistbyorg [get]
+func (this *CustomerController) CustomerlistByOrg() {
+	var list []organize.Base_Organize
+	svc := customer2.GetCustomerService(utils.DBE)
+	where := "Id IN (100000952,100000852,100000787,100000506,100000402,100000304)"
+	svc.GetEntities(&list, where)
+	var datainfo DataInfo
+	datainfo.Items = list
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+
+}
+
 // @Title 添加客户原始信息内容
 // @Description 新增客户原始信息内容
 // @Param	body	body	business.device.DeviceChannels	"客户原始信息内容"

+ 39 - 5
src/dashoo.cn/frontend_web/src/pages/lims/checkequipmentlist/index.vue

@@ -52,10 +52,22 @@
                            placeholder="按设备分类查询"
                            @change="ProjectTypeChangeHandler"
                            @clear="ProjectTypeClearHandler">
-                  <el-option v-for="item in projectTypeList"
-                             :key="item.id"
-                             :label="item.FullName"
-                             :value="item.Id"></el-option>
+                  <el-option-group
+                    v-for="group in options"
+                    :key="group.label"
+                    :label="group.label">
+                    <el-option
+                      v-for="item in group.options"
+                      :key="item.Id"
+                      :label="item.FullName"
+                      :value="item.Id">
+                    </el-option>
+                  </el-option-group>
+
+                  <!--<el-option v-for="item in projectTypeList"-->
+                             <!--:key="item.id"-->
+                             <!--:label="item.FullName"-->
+                             <!--:value="item.Id"></el-option>-->
                 </el-select>
               </el-form-item>
 
@@ -422,6 +434,26 @@ export default {
       detectionCycleList: [],
       FileItems: [],
       waituploads: [],
+      options: [{
+        label: '特检',
+        options: [
+          {Id: 179, FullName: '电气接地装置检测'},
+          {Id: 286, FullName: '防雷装置检测'},
+          {Id: 187, FullName: '防雷装置(等电位)检测'},
+          {Id: 181, FullName: '漏电保护器检测'}
+        ]
+      }, {
+        label: '宇信',
+        options: [
+          {Id: 156, FullName: '阻火器检测'},
+          {Id: 183, FullName: '呼吸阀检测'},
+          {Id: 154, FullName: '液压安全阀检测'},
+          {Id: 189, FullName: '空气泡沫产生器检测'},
+          {Id: 141, FullName: '游梁式抽油机检测'},
+          {Id: 173, FullName: '无游梁式抽油机检测'}
+        ]
+      }],
+
       statusValue: '',
       addoredittitle: '添加',
       QueryProjectTypeId: '',
@@ -770,14 +802,16 @@ export default {
       _this.$axios.get('/testtype/testypetreeall', {})
         .then(res => {
           _this.testTypeList = res.data.items
+          console.log(_this.testTypeList, '_this.testTypeList')
           if (!_this.testTypeList) {
             return false
           }
           for (var i = 0; i < _this.testTypeList.length; i++) {
-            if (_this.testTypeList[i].ParentId == 0) {
+            if (_this.testTypeList[i].ParentId === 0) {
               _this.projectTypeList.push(_this.testTypeList[i])
             }
           }
+          console.log(_this.projectTypeList, '_this.projectTypeList')
         })
         .catch(err => {
           // handle error

+ 36 - 5
src/dashoo.cn/frontend_web/src/pages/lims/taskplan/index.vue

@@ -96,7 +96,7 @@
           <el-col :span="12">
             <el-form-item label="委托方名称">
               <el-select size="mini" ref="reflrrselect" style="width:100%" v-model="searchform.CustomerId" clearable>
-                <el-option v-for="item in customerlist" :label="item.CustomerName" :value="item.Id" :key="item.Id"  ></el-option>
+                <el-option v-for="item in customerlist" :label="item.Fullname" :value="item.Id" :key="item.Id"  ></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -111,8 +111,19 @@
           <el-col :span="12">
             <el-form-item label="检测报告">
               <el-select size="mini" ref="reflrrselect" v-model="searchform.ProjectTypeId" style="width:100%" clearable>
-                <el-option v-for="item in projectList" :label="item.FullName" :value="item.Id" :key="item.Id">
-                </el-option>
+                <!--<el-option v-for="item in projectList" :label="item.FullName" :value="item.Id" :key="item.Id">-->
+                <!--</el-option>-->
+                <el-option-group
+                  v-for="group in options"
+                  :key="group.label"
+                  :label="group.label">
+                  <el-option
+                    v-for="item in group.options"
+                    :key="item.Id"
+                    :label="item.FullName"
+                    :value="item.Id">
+                  </el-option>
+                </el-option-group>
               </el-select>
             </el-form-item>
           </el-col>
@@ -169,7 +180,26 @@
         projectList: [],
         //样品名称
         sampleList: [],
-        departmentList: [], //特检站下属部门
+        departmentList: [], // 特检站下属部门
+        options: [{
+          label: '特检',
+          options: [
+            {Id: 179, FullName: '电气接地装置检测'},
+            {Id: 286, FullName: '防雷装置检测'},
+            {Id: 187, FullName: '防雷装置(等电位)检测'},
+            {Id: 181, FullName: '漏电保护器检测'}
+          ]
+        }, {
+          label: '宇信',
+          options: [
+            {Id: 156, FullName: '阻火器检测'},
+            {Id: 183, FullName: '呼吸阀检测'},
+            {Id: 154, FullName: '液压安全阀检测'},
+            {Id: 189, FullName: '空气泡沫产生器检测'},
+            {Id: 141, FullName: '游梁式抽油机检测'},
+            {Id: 173, FullName: '无游梁式抽油机检测'}
+          ]
+        }],
         departmentId: '',
         tjz: false,
         permissionscode: {
@@ -286,9 +316,10 @@
       //委托方名称下拉
       getCustomerlist() {
         let _this = this
-        _this.$axios.get('/customer/customerlist', {})
+        _this.$axios.get('/customer/customerlistbyorg', {})
           .then(res => {
             _this.customerlist = res.data.items
+            console.log(_this.customerlist)
           })
       },