yuhan il y a 1 an
Parent
commit
2b5721fbc2

+ 1 - 1
src/views/module_tpm/equipment/EquipmentList.vue

@@ -166,7 +166,7 @@
   import { JeecgListMixin } from '@/mixins/JeecgListMixin'
   import {filterMultiDictText} from '@/components/dict/JDictSelectUtil'
   import EquipmentModal from './modules/EquipmentModal.vue'
-  import EquipmentDetail from './modules/EquipmentDetail.vue'
+  import EquipmentDetail from './modulesDetail/EquipmentDetail.vue'
 
   export default {
     name: 'EquipmentList',

+ 130 - 0
src/views/module_tpm/equipment/modulesDetail/EqCmmsInspectLog.vue

@@ -0,0 +1,130 @@
+<template>
+  <div>
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      class="j-table-force-nowrap"
+      @change="handleTableChange">
+      <span slot="status"  slot-scope="text">
+        <span v-if="text === '0'">待处理</span>
+        <span v-if="text === '1'">处理中</span>
+        <span v-if="text === '2'">已完成</span>
+      </span>
+    </a-table>
+  </div>
+</template>
+
+<script>
+  import { httpAction, getAction } from '@/api/manage'
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: 'InspectItemList',
+    mixins:[JeecgListMixin, mixinDevice],
+    props: {
+      id: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        // 表头
+        columns: [
+          // {
+          //   title: '序号',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'创建日期',
+            align:"center",
+            dataIndex: 'createTime',
+          },
+          // {
+          //   title:'负责人',
+          //   align:"center",
+          //   dataIndex: 'chargeruser'
+          // },
+          {
+            title:'所属巡检工单',
+            align:"center",
+            dataIndex: 'inspectname'
+          },
+          {
+            title:'处理状态',
+            align:"center",
+            dataIndex: 'status',
+            scopedSlots: { customRender: 'status' }
+          },
+        ],
+        url: {
+          list: "/cmmsInspect/cmmsInspect/queryInspectByEqId",
+          // equipmentId
+          // delete: "/cmmsInspectItem/cmmsInspectItem/delete",
+          // deleteBatch: "/cmmsInspectItem/cmmsInspectItem/deleteBatch",
+          // exportXlsUrl: "/cmmsInspectItem/cmmsInspectItem/exportXls",
+          // importExcelUrl: "cmmsInspectItem/cmmsInspectItem/importExcel",
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    },
+    computed: {
+    },
+    methods: {
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        params.equipmentid = this.id
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          // this.dataSource = res;
+          if (res.success) {
+            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.records||res.result;
+            if(res.result.total)
+            {
+              this.ipagination.total = res.result.total;
+            }else{
+              this.ipagination.total = 0;
+            }
+            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          }else{
+            this.$message.warning(res.message)
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
+      initDictConfig(){
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 116 - 0
src/views/module_tpm/equipment/modulesDetail/EqCmmsRepairLog.vue

@@ -0,0 +1,116 @@
+<template>
+  <div>
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      class="j-table-force-nowrap"
+      @change="handleTableChange">
+    </a-table>
+  </div>
+</template>
+
+<script>
+
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: 'InspectItemList',
+    mixins:[JeecgListMixin, mixinDevice],
+    props: {
+      id: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        // 表头
+        columns: [
+          // {
+          //   title: '序号',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'送检编号',
+            align:"center",
+            dataIndex: 'sjcode',
+            scopedSlots: { customRender: 'sjcode' }
+          },
+          {
+            title:'送检负责人',
+            align:"center",
+            dataIndex: 'verificatePerson_dictText'
+          },
+          {
+            title:'检定方式',
+            align:"center",
+            dataIndex: 'verificateMethod_dictText'
+          },
+          {
+            title:'检定单位',
+            align:"center",
+            dataIndex: 'verificateClientId_dictText'
+          },
+          {
+            title:'送检设备数量',
+            align:"center",
+            dataIndex: 'totalNum'
+          },
+          {
+            title:'返回设备数量',
+            align:"center",
+            dataIndex: 'returnNum'
+          },
+          {
+            title:'备注',
+            align:"center",
+            dataIndex: 'remark'
+          },
+          {
+            title:'送检工单状态',
+            align:"center",
+            dataIndex: 'submissionGdstatus_dictText',
+            scopedSlots: { customRender: 'submissionGdstatus_dictText' }
+          },
+        ],
+        url: {
+          list: "/cmmsSubmissionEquipment/cmmsSubmissionEquipment/jclistByEquipmentId",
+          // equipmentId
+          // delete: "/cmmsInspectItem/cmmsInspectItem/delete",
+          // deleteBatch: "/cmmsInspectItem/cmmsInspectItem/deleteBatch",
+          // exportXlsUrl: "/cmmsInspectItem/cmmsInspectItem/exportXls",
+          // importExcelUrl: "cmmsInspectItem/cmmsInspectItem/importExcel",
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+      this.queryParam.equipmentId = this.id
+    },
+    computed: {
+    },
+    methods: {
+      initDictConfig(){
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 40 - 0
src/views/module_tpm/equipment/modulesDetail/EqCmmsSpotcheckLog.vue

@@ -0,0 +1,40 @@
+<template>
+  <div>
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="logData"
+      class="equipment-cmms-table">
+
+      <span slot="status" slot-scope="text, record">
+        <a-tag v-if="record.status === '0'" color="orange">{{ text }}</a-tag>
+        <a-tag v-if="record.status === '1' || record.priority === '2'" color="blue">{{ text }}</a-tag>
+        <a-tag v-if="record.status === '3'">{{ text }}</a-tag>
+      </span>
+
+    </a-table>
+  </div>
+</template>
+
+<script>
+export default {
+  name: '',
+  data () {
+    return {
+    }
+  },
+  created () {
+  },
+  mounted () {
+  },
+  methods: {
+  }
+}
+</script>
+
+<style lang="less" scoped>
+</style>

+ 151 - 0
src/views/module_tpm/equipment/modulesDetail/EqCmmsSubmissionLog.vue

@@ -0,0 +1,151 @@
+<template>
+  <div>
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      class="j-table-force-nowrap"
+      @change="handleTableChange">
+      <span slot="submissionResult"  slot-scope="text">
+        <span v-if="text === '0'">未开始</span>
+        <span v-if="text === '1'">进行中</span>
+        <span v-if="text === '2'">已完成</span>
+      </span>
+    </a-table>
+  </div>
+</template>
+
+<script>
+  import { httpAction, getAction } from '@/api/manage'
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: 'InspectItemList',
+    mixins:[JeecgListMixin, mixinDevice],
+    props: {
+      id: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        // 表头
+        columns: [
+          // {
+          //   title: '序号',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          // {
+          //   title:'送检编号',
+          //   align:"center",
+          //   dataIndex: 'sjcode',
+          //   scopedSlots: { customRender: 'sjcode' }
+          // },
+          // {
+          //   title:'送检负责人',
+          //   align:"center",
+          //   dataIndex: 'verificatePerson_dictText'
+          // },
+          // {
+          //   title:'检定方式',
+          //   align:"center",
+          //   dataIndex: 'verificateMethod_dictText'
+          // },
+          // {
+          //   title:'检定单位',
+          //   align:"center",
+          //   dataIndex: 'verificateClientId_dictText'
+          // },
+          // {
+          //   title:'送检设备数量',
+          //   align:"center",
+          //   dataIndex: 'totalNum'
+          // },
+          // {
+          //   title:'返回设备数量',
+          //   align:"center",
+          //   dataIndex: 'returnNum'
+          // },
+          {
+            title:'送检时间',
+            align:"center",
+            dataIndex: 'submissionDate'
+          },
+          {
+            title:'送检结果',
+            align:"center",
+            dataIndex: 'submissionResult',
+            scopedSlots: { customRender: 'submissionResult' }
+          },
+        ],
+        url: {
+          list: "/cmmsSubmissionEquipment/cmmsSubmissionEquipment/jclistByEquipmentId",
+          // equipmentId
+          // delete: "/cmmsInspectItem/cmmsInspectItem/delete",
+          // deleteBatch: "/cmmsInspectItem/cmmsInspectItem/deleteBatch",
+          // exportXlsUrl: "/cmmsInspectItem/cmmsInspectItem/exportXls",
+          // importExcelUrl: "cmmsInspectItem/cmmsInspectItem/importExcel",
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    },
+    computed: {
+    },
+    methods: {
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        params.equipmentId = this.id
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          this.dataSource = res;
+          // if (res.success) {
+          //   //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          //   this.dataSource = res;
+          //   if(res.result.total)
+          //   {
+          //     this.ipagination.total = res.result.total;
+          //   }else{
+          //     this.ipagination.total = 0;
+          //   }
+          //   //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          // }else{
+          //   this.$message.warning(res.message)
+          // }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
+      initDictConfig(){
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 129 - 0
src/views/module_tpm/equipment/modulesDetail/EqCmmsUpkeepLog.vue

@@ -0,0 +1,129 @@
+<template>
+  <div>
+    <a-table
+      ref="table"
+      size="middle"
+      :scroll="{x:true}"
+      bordered
+      rowKey="id"
+      :columns="columns"
+      :dataSource="dataSource"
+      :pagination="ipagination"
+      :loading="loading"
+      class="j-table-force-nowrap"
+      @change="handleTableChange">
+    </a-table>
+  </div>
+</template>
+
+<script>
+  import { httpAction, getAction } from '@/api/manage'
+  import '@/assets/less/TableExpand.less'
+  import { mixinDevice } from '@/utils/mixin'
+  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
+
+  export default {
+    name: 'InspectItemList',
+    mixins:[JeecgListMixin, mixinDevice],
+    props: {
+      id: {
+        type: String,
+        default: ''
+      }
+    },
+    data () {
+      return {
+        // 表头
+        columns: [
+          // {
+          //   title: '序号',
+          //   dataIndex: '',
+          //   key:'rowIndex',
+          //   width:60,
+          //   align:"center",
+          //   customRender:function (t,r,index) {
+          //     return parseInt(index)+1;
+          //   }
+          // },
+          {
+            title:'创建日期',
+            align:"center",
+            dataIndex: 'createTime',
+          },
+          {
+            title:'负责人',
+            align:"center",
+            dataIndex: 'chargeruser'
+          },
+          {
+            title:'处理状态',
+            align:"center",
+            dataIndex: 'status_dictText'
+          },
+          {
+            title:'处理意见',
+            align:"center",
+            dataIndex: 'opinion'
+          },
+          {
+            title:'所属保养工单',
+            align:"center",
+            dataIndex: 'upkeepname'
+          },
+        ],
+        url: {
+          list: "/cmmsUpkeep/cmmsUpkeep/selectEquipUpkeepDetailByEqid",
+          // equipmentId
+          // delete: "/cmmsInspectItem/cmmsInspectItem/delete",
+          // deleteBatch: "/cmmsInspectItem/cmmsInspectItem/deleteBatch",
+          // exportXlsUrl: "/cmmsInspectItem/cmmsInspectItem/exportXls",
+          // importExcelUrl: "cmmsInspectItem/cmmsInspectItem/importExcel",
+        },
+        dictOptions:{},
+        superFieldList:[],
+      }
+    },
+    created() {
+    },
+    computed: {
+    },
+    methods: {
+      loadData(arg) {
+        if(!this.url.list){
+          this.$message.error("请设置url.list属性!")
+          return
+        }
+        //加载数据 若传入参数1则加载第一页的内容
+        if (arg === 1) {
+          this.ipagination.current = 1;
+        }
+        var params = this.getQueryParams();//查询条件
+        params.equipmentid = this.id
+        this.loading = true;
+        getAction(this.url.list, params).then((res) => {
+          // this.dataSource = res;
+          if (res.success) {
+            //update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+            this.dataSource = res.result.records||res.result;
+            if(res.result.total)
+            {
+              this.ipagination.total = res.result.total;
+            }else{
+              this.ipagination.total = 0;
+            }
+            //update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+          }else{
+            this.$message.warning(res.message)
+          }
+        }).finally(() => {
+          this.loading = false
+        })
+      },
+      initDictConfig(){
+      },
+    }
+  }
+</script>
+<style scoped>
+  @import '~@assets/less/common.less';
+</style>

+ 38 - 34
src/views/module_tpm/equipment/modules/EquipmentDetail.vue

@@ -13,28 +13,28 @@
         <!-- 基础信息详情 -->
         <div class="base-info-container">
           <a-descriptions title="" layout="vertical" bordered size="middle" :column="2" class="equiment-info">
-            <a-descriptions-item label="设备编号" :span="2">
+            <a-descriptions-item label="设备编号">
               {{detailData.equipmentcode}}
             </a-descriptions-item>
-            <a-descriptions-item label="设备名称" :span="2">
+            <a-descriptions-item label="设备名称">
               {{detailData.equipmentname}}
             </a-descriptions-item>
-            <a-descriptions-item label="设备分类" :span="2">
+            <a-descriptions-item label="设备分类">
               {{detailData.equipmenttreeid_dictText}}
             </a-descriptions-item>
-            <a-descriptions-item label="规格型号" :span="2">
+            <a-descriptions-item label="规格型号">
               {{detailData.spec}}
             </a-descriptions-item>
             <a-descriptions-item label="安装地点" :span="2">
               {{detailData.address}}
             </a-descriptions-item>
-            <a-descriptions-item label="区域" :span="2">
+            <a-descriptions-item label="区域">
               {{detailData.spaceid_dictText}}
             </a-descriptions-item>
-            <a-descriptions-item label="周期" :span="2">
+            <a-descriptions-item label="周期">
               {{detailData.equipmentCycle}}
             </a-descriptions-item>
-            <a-descriptions-item label="周期单位" :span="2">
+            <a-descriptions-item label="周期单位">
               {{detailData.cycleUnit_dictText}}
             </a-descriptions-item>
             <a-descriptions-item label="出厂编号">
@@ -61,31 +61,21 @@
           </a-descriptions>
         </div>
         <!-- 巡检详情 -->
-        <a-tabs default-active-key="1" @change="callback" class="equipment-cmms-tabs">
-          <a-tab-pane key="1" tab="Tab 1">
-            <a-table
-              ref="table"
-              size="middle"
-              :scroll="{x:true}"
-              bordered
-              rowKey="id"
-              :columns="columns"
-              :dataSource="logData"
-              class="equipment-cmms-table">
-
-              <span slot="status" slot-scope="text, record">
-                <a-tag v-if="record.status === '0'" color="orange">{{ text }}</a-tag>
-                <a-tag v-if="record.status === '1' || record.priority === '2'" color="blue">{{ text }}</a-tag>
-                <a-tag v-if="record.status === '3'">{{ text }}</a-tag>
-              </span>
-
-            </a-table>
+        <a-tabs default-active-key="submission" @change="callback" class="equipment-cmms-tabs">
+          <!-- <a-tab-pane key="repair" tab="维修记录">
+            <eq-cmms-repair-log></eq-cmms-repair-log>
+          </a-tab-pane> -->
+          <a-tab-pane key="submission" tab="送检记录">
+            <eq-cmms-submission-log :id="detailData.id"></eq-cmms-submission-log>
           </a-tab-pane>
-          <a-tab-pane key="2" tab="Tab 2" force-render>
-            Content of Tab Pane 2
+          <!-- <a-tab-pane key="spotcheck" tab="点检记录" force-render>
+            <eq-cmms-spotcheck-log></eq-cmms-spotcheck-log>
+          </a-tab-pane> -->
+          <a-tab-pane key="inspect" tab="巡检记录">
+            <eq-cmms-inspect-log :id="detailData.id"></eq-cmms-inspect-log>
           </a-tab-pane>
-          <a-tab-pane key="3" tab="Tab 3">
-            Content of Tab Pane 3
+          <a-tab-pane key="upkeep" tab="保养记录">
+            <eq-cmms-upkeep-log :id="detailData.id"></eq-cmms-upkeep-log>
           </a-tab-pane>
         </a-tabs>
         
@@ -97,7 +87,19 @@
 
 <script>
   import { httpAction, getAction } from '@/api/manage'
+  import EqCmmsInspectLog from './EqCmmsInspectLog.vue'
+  import EqCmmsRepairLog from './EqCmmsRepairLog.vue'
+  import EqCmmsSubmissionLog from './EqCmmsSubmissionLog.vue'
+  import EqCmmsSpotcheckLog from './EqCmmsSpotcheckLog.vue'
+  import EqCmmsUpkeepLog from './EqCmmsUpkeepLog.vue'
   export default {
+    components: { 
+      EqCmmsInspectLog,
+      EqCmmsRepairLog,
+      EqCmmsSubmissionLog,
+      EqCmmsSpotcheckLog,
+      EqCmmsUpkeepLog
+    },
     name: 'RepairManageDetail',
     data () {
       return {
@@ -142,6 +144,8 @@
         ],
       }
     },
+    created(){
+    },
     methods: {
       detail (record) {
         console.log(record)
@@ -197,16 +201,16 @@
       }
     }
     .equipment-cmms-tabs{
-      
-    }
-    .equipment-cmms-table{
       width: calc(50% - 6px);
       height: calc(100vh - 55px - 40px);
-      overflow: auto;
       background-color: #fff;
       padding: 12px;
       border-radius: 4px;
       margin-left: 6px;
+      
+    }
+    .equipment-cmms-table{
+      overflow: auto;
     }
   }
 </style>