Bläddra i källkod

Merge branch 'master' of http://152.136.206.27:3000/dongjh/ems_client

dongjh 1 år sedan
förälder
incheckning
7abb7f5490

+ 27 - 0
src/views/module_ems/cmmsInspectContent/CmmsInspectContentList.vue

@@ -4,6 +4,33 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="巡检内容名称">
+              <a-input placeholder="请输入巡检内容名称" v-model="queryParam.contentname"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="设备id">
+              <a-input placeholder="请输入设备id" v-model="queryParam.equipmentid"></a-input>
+            </a-form-item>
+          </a-col>
+          <template v-if="toggleSearchStatus">
+            <a-col :xl="6" :lg="7" :md="8" :sm="24">
+              <a-form-item label="状态:启用:0、禁用:1">
+                <a-input placeholder="请输入状态:启用:0、禁用:1" v-model="queryParam.status"></a-input>
+              </a-form-item>
+            </a-col>
+          </template>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
         </a-row>
       </a-form>
     </div>

+ 9 - 0
src/views/module_ems/cmmsInspectContent/modules/CmmsInspectContentForm.vue

@@ -65,6 +65,15 @@
         },
         confirmLoading: false,
         validatorRules: {
+           contentname: [
+              { required: true, message: '请输入巡检内容名称!'},
+           ],
+           equipmentid: [
+              { required: true, message: '请输入设备id!'},
+           ],
+           status: [
+              { required: true, message: '请输入状态:启用:0、禁用:1!'},
+           ],
         },
         url: {
           add: "/cmmsInspectContent/cmmsInspectContent/add",

+ 49 - 24
src/views/module_ems/cmmsInspectItem/CmmsInspectItemList.vue

@@ -4,6 +4,26 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline" @keyup.enter.native="searchQuery">
         <a-row :gutter="24">
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="名称">
+              <a-input placeholder="请输入名称" v-model="queryParam.itemname"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <a-form-item label="设备类型ID(设备定义)">
+              <a-input placeholder="请输入设备类型ID(设备定义)" v-model="queryParam.equipdefid"></a-input>
+            </a-form-item>
+          </a-col>
+          <a-col :xl="6" :lg="7" :md="8" :sm="24">
+            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
+              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
+              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
+              <a @click="handleToggleSearch" style="margin-left: 8px">
+                {{ toggleSearchStatus ? '收起' : '展开' }}
+                <a-icon :type="toggleSearchStatus ? 'up' : 'down'"/>
+              </a>
+            </span>
+          </a-col>
         </a-row>
       </a-form>
     </div>
@@ -112,7 +132,7 @@
         // 表头
         columns: [
           {
-            title: '#',
+            title: '序号',
             dataIndex: '',
             key:'rowIndex',
             width:60,
@@ -122,11 +142,6 @@
             }
           },
           {
-            title:'备注',
-            align:"center",
-            dataIndex: 'remark'
-          },
-          {
             title:'巡检项编号',
             align:"center",
             dataIndex: 'itemcode'
@@ -137,29 +152,34 @@
             dataIndex: 'itemname'
           },
           {
-            title:'设备类型ID(设备定义)',
+            title:'设备类型',
             align:"center",
             dataIndex: 'equipdefid'
           },
+          // {
+          //   title:'条件(字典中定义)',
+          //   align:"center",
+          //   dataIndex: 'conditions'
+          // },
+          // {
+          //   title:'参考值',
+          //   align:"center",
+          //   dataIndex: 'refervalue'
+          // },
+          // {
+          //   title:'标签(多个用逗号隔开)',
+          //   align:"center",
+          //   dataIndex: 'tag'
+          // },
           {
-            title:'条件(字典中定义)',
+            title:'巡检标准',
             align:"center",
-            dataIndex: 'conditions'
+            dataIndex: 'inspectionstandards'
           },
           {
-            title:'参考值',
+            title:'巡检项类型',
             align:"center",
-            dataIndex: 'refervalue'
-          },
-          {
-            title:'标签(多个用逗号隔开)',
-            align:"center",
-            dataIndex: 'tag'
-          },
-          {
-            title:'所属部门',
-            align:"center",
-            dataIndex: 'sysOrgCode'
+            dataIndex: 'classification'
           },
           {
             title: '操作',
@@ -168,7 +188,12 @@
             fixed:"right",
             width:147,
             scopedSlots: { customRender: 'action' }
-          }
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
         ],
         url: {
           list: "/cmmsInspectItem/cmmsInspectItem/list",
@@ -195,7 +220,6 @@
       },
       getSuperFieldList(){
         let fieldList=[];
-        fieldList.push({type:'string',value:'id',text:'巡检项ID',dictCode:''})
         fieldList.push({type:'string',value:'remark',text:'备注',dictCode:''})
         fieldList.push({type:'string',value:'itemcode',text:'巡检项编号',dictCode:''})
         fieldList.push({type:'string',value:'itemname',text:'名称',dictCode:''})
@@ -203,7 +227,8 @@
         fieldList.push({type:'string',value:'conditions',text:'条件(字典中定义)',dictCode:''})
         fieldList.push({type:'string',value:'refervalue',text:'参考值',dictCode:''})
         fieldList.push({type:'string',value:'tag',text:'标签(多个用逗号隔开)',dictCode:''})
-        fieldList.push({type:'string',value:'sysOrgCode',text:'所属部门',dictCode:''})
+        fieldList.push({type:'string',value:'inspectionstandards',text:'巡检标准',dictCode:''})
+        fieldList.push({type:'string',value:'classification',text:'分类:0环境1设备2其他',dictCode:''})
         this.superFieldList = fieldList
       }
     }

+ 37 - 20
src/views/module_ems/cmmsInspectItem/modules/CmmsInspectItemForm.vue

@@ -3,44 +3,49 @@
     <j-form-container :disabled="formDisabled">
       <a-form-model ref="form" :model="model" :rules="validatorRules" slot="detail">
         <a-row>
-          <a-col :span="24">
-            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
-              <a-input v-model="model.remark" placeholder="请输入备注"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
+          <!-- <a-col :span="24">
             <a-form-model-item label="巡检项编号" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemcode">
               <a-input v-model="model.itemcode" placeholder="请输入巡检项编号"  ></a-input>
             </a-form-model-item>
-          </a-col>
+          </a-col> -->
           <a-col :span="24">
             <a-form-model-item label="名称" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="itemname">
               <a-input v-model="model.itemname" placeholder="请输入名称"  ></a-input>
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="设备类型ID(设备定义)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipdefid">
-              <a-input v-model="model.equipdefid" placeholder="请输入设备类型ID(设备定义)"  ></a-input>
-            </a-form-model-item>
-          </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="条件(字典中定义)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="conditions">
-              <a-input v-model="model.conditions" placeholder="请输入条件(字典中定义)"  ></a-input>
+            <a-form-model-item label="巡检项类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="classification">
+              <j-dict-select-tag type="list" v-model="model.classification" dictCode="inspect_item_type" placeholder="请选择巡检类型" />
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
-            <a-form-model-item label="参考值" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="refervalue">
-              <a-input v-model="model.refervalue" placeholder="请输入参考值"  ></a-input>
+          <a-col :span="24" v-if="model.classification === '1'">
+            <a-form-model-item label="设备类型" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipdefid">
+              <!-- <a-input v-model="model.equipdefid" placeholder="请选择设备类型"  ></a-input> -->
+              <j-tree-select
+                ref="treeSelect"
+                placeholder="请选择设备类型"
+                v-model="model.equipdefid"
+                dict="ems_tpm_equipment_tree,name,id"
+                pidField="parentid"
+                pidValue="0"
+                hasChildField="has_child"
+                >
+              </j-tree-select>
             </a-form-model-item>
           </a-col>
-          <a-col :span="24">
+          <!-- <a-col :span="24">
             <a-form-model-item label="标签(多个用逗号隔开)" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="tag">
               <a-input v-model="model.tag" placeholder="请输入标签(多个用逗号隔开)"  ></a-input>
             </a-form-model-item>
+          </a-col> -->
+          <a-col :span="24">
+            <a-form-model-item label="巡检标准" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="inspectionstandards">
+              <a-input v-model="model.inspectionstandards" placeholder="请输入巡检标准"></a-input>
+            </a-form-model-item>
           </a-col>
           <a-col :span="24">
-            <a-form-model-item label="所属部门" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="sysOrgCode">
-              <a-input v-model="model.sysOrgCode" placeholder="请输入所属部门"  ></a-input>
+            <a-form-model-item label="备注" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="remark">
+              <a-input v-model="model.remark" placeholder="请输入备注"></a-input>
             </a-form-model-item>
           </a-col>
         </a-row>
@@ -80,6 +85,18 @@
         },
         confirmLoading: false,
         validatorRules: {
+           itemname: [
+              { required: true, message: '请输入巡检项名称!'},
+           ],
+           equipdefid: [
+              { required: true, message: '请选择设备!'},
+           ],
+           inspectionstandards: [
+              { required: true, message: '请输入巡检标准!'},
+           ],
+           classification: [
+              { required: true, message: '请选择巡检项类型!'},
+           ],
         },
         url: {
           add: "/cmmsInspectItem/cmmsInspectItem/add",

+ 2 - 2
src/views/module_ems/cmmsSpotcheckContent/CmmsSpotcheckContentList.vue

@@ -157,7 +157,7 @@
           deleteBatch: "/cmmsSpotcheckContent/cmmsSpotcheckContent/deleteBatch",
           exportXlsUrl: "/cmmsSpotcheckContent/cmmsSpotcheckContent/exportXls",
           importExcelUrl: "cmmsSpotcheckContent/cmmsSpotcheckContent/importExcel",
-          
+
         },
         dictOptions:{},
         superFieldList:[],
@@ -178,7 +178,7 @@
         let fieldList=[];
         fieldList.push({type:'string',value:'contentcode',text:'点检内容编号',dictCode:''})
         fieldList.push({type:'string',value:'contentname',text:'点检内容名称',dictCode:''})
-        fieldList.push({type:'sel_search',value:'equipmentid',text:'设备id',dictTable:"ems_tpm_equipment_tree", dictText:'name', dictCode:'id'})
+        fieldList.push({type:'sel_search',value:'equipmentid',text:'设备id',dictTable:"ems_tpm_equipment", dictText:'equipmentname', dictCode:'id'})
         fieldList.push({type:'string',value:'status',text:'状态:启用:0、禁用:1',dictCode:'spotcheck_content_status'})
         this.superFieldList = fieldList
       }

+ 2 - 2
src/views/module_ems/cmmsSpotcheckContent/modules/CmmsSpotcheckContentForm.vue

@@ -15,7 +15,7 @@
           </a-col>
           <a-col :span="24">
             <a-form-model-item label="设备id" :labelCol="labelCol" :wrapperCol="wrapperCol" prop="equipmentid">
-              <j-search-select-tag v-model="model.equipmentid" dict="ems_tpm_equipment_tree,name,id"  />
+              <j-search-select-tag v-model="model.equipmentid" dict="ems_tpm_equipment,equipmentname,id"  />
             </a-form-model-item>
           </a-col>
           <a-col :span="24">
@@ -111,7 +111,7 @@
               that.confirmLoading = false;
             })
           }
-         
+
         })
       },
     }