xiongchao vor 3 Jahren
Ursprung
Commit
33261cb806

+ 17 - 0
src/api/sb/info.js

@@ -308,6 +308,23 @@ export function exportSbInfo (parameter) {
   })
 }
 
+/**
+ * export file
+ * parameter: { }
+ * @param parameter :
+  * @returns {*}
+ */
+export function exportSbInfoMeasure (parameter) {
+  return axios({
+    url: '/sb/infos/export/measure?' + stringify(parameter),
+    method: 'get',
+    headers: {
+      'Content-Type': 'application/json;charset=UTF-8'
+    },
+    responseType: 'blob'
+  })
+}
+
 /**
  * query list func
  * parameter: { }

+ 2 - 0
src/router/generator-platform-routers.js

@@ -79,6 +79,8 @@ const constantRouterComponents = {
   'MeasureSbInfo': () => import('@/views/sb/info/MeasureSbInfo'),
   // 测量设备预警台账
   'MeasureSbInfoWarn': () => import('@/views/sb/info/MeasureSbInfoWarn'),
+  // 测量设备-检定记录
+  'MeasureLog': () => import('@/views/sb/measurelog/MeasureLog'),
   // 特种设备基础信息
   'SpecialSbInfo': () => import('@/views/sb/info/SpecialSbInfo'),
   // 父子设备树

+ 8 - 5
src/utils/dict.js

@@ -86,6 +86,7 @@ DictCache.TYPE = {
   SB_INFO_AUDIT_NODE: 'SB_INFO_AUDIT_NODE', // 设备报废节点
   SB_IS_CHILD: 'SB_IS_CHILD', // 自定义类型
   SB_IS_SHOW: 'SB_IS_SHOW', // 自定义类型
+  SB_IS_FINANCING: 'SB_IS_FINANCING', // 是否固定资产
   PRODUCER_AREA: 'PRODUCER_AREA', // 产地
   PART_LEVEL: 'PART_LEVEL', // 部件等级
   PART_STATUS: 'PART_STATUS', // 部件状态
@@ -530,11 +531,9 @@ DictCache.VALUE = {
   },
 
   SB_USE_TYPE: {
-    NORMAL: 1, // 工程设备
-    CAR: 2, // 车辆
-    OTHER: 3, // 通用设备
-    BGCL: 4, // 办公测量
-    TZSB: 5// 特种设备
+    OTHER: 3, // 一般性生产设备
+    BGCL: 4, // 	计量设备
+    TZSB: 5// 特种设备及附件
   },
   SB_IS_CHILD: {
     IS_CHILD: '1', // 子类
@@ -545,6 +544,10 @@ DictCache.VALUE = {
     NOT_SHOW: '0', // 不显示
     IS_SHOWING: '1' // 显示
   },
+  SB_IS_FINANCING: {
+    NOT: '0', // 否,不是固定资产
+    YES: '1' // 是
+  },
   /**
    * 设备状态
    */

+ 23 - 5
src/views/sb/info/MeasureSbInfo.vue

@@ -166,7 +166,7 @@ import BaseFormMeasureRelation from './modules/BaseFormMeasureRelation'
 import Detail from './modules/DetailMeasureRelation'
 import DownloadModal from '@/views/download/DownloadModal'
 import PreviewModal from '@/views/preview/PreviewModal'
-import { getSbInfoPage, deleteSbInfos, fetchSbInfo, exportSbInfo } from '@/api/sb/info'
+import { getSbInfoPage, deleteSbInfos, fetchSbInfo, exportSbInfoMeasure } from '@/api/sb/info'
 import { queryDept, getDeptsAllByParentId } from '@/api/upms/dept'
 import { fetchSbTypeTree } from '@/api/sb/type'
 import ImportFormAdd from './modules/ImportFormAdd'
@@ -231,12 +231,12 @@ export default {
           width: 120,
           checked: true
         },
-        {
+/*        {
           title: '设备旧号',
           dataIndex: 'zbh',
           width: 120,
           checked: true
-        },
+        },*/
         {
           title: '测量设备编号',
           dataIndex: 'cardNo',
@@ -249,6 +249,24 @@ export default {
           width: 200,
           dataIndex: 'name'
         },
+        {
+          title: '设备型号',
+          checked: true,
+          width: 200,
+          dataIndex: 'model'
+        },
+        {
+          title: '使用位置',
+          checked: true,
+          width: 200,
+          dataIndex: 'cph'
+        },
+        {
+          title: '使用部门',
+          checked: true,
+          width: 200,
+          dataIndex: 'saveUserName'
+        },
         {
           title: '设备类型',
           checked: true,
@@ -352,7 +370,7 @@ export default {
           ...parameter,
           ...this.queryParam,
           dataScope: {
-            sortBy: 'desc',
+            sortBy: 'asc',
             sortName: 'no'
           }
         }
@@ -514,7 +532,7 @@ export default {
       const parameter = {
         ...this.queryParam
       }
-      exportSbInfo(parameter).then(file => {
+      exportSbInfoMeasure(parameter).then(file => {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)
       })
     },

+ 22 - 3
src/views/sb/info/MeasureSbInfoWarn.vue

@@ -192,11 +192,30 @@ export default {
           dataIndex: 'no',
           checked: true
         },
-   /*     {
-          title: '规格型号',
+        {
+          title: '设备型号',
           checked: true,
+          width: 200,
           dataIndex: 'model'
-        },*/
+        },
+        {
+          title: '使用位置',
+          checked: true,
+          width: 200,
+          dataIndex: 'cph'
+        },
+        {
+          title: '存放位置',
+          checked: true,
+          width: 200,
+          dataIndex: 'positionId'
+        },
+        {
+          title: '使用部门',
+          checked: true,
+          width: 200,
+          dataIndex: 'saveUserName'
+        },
         {
           title: '设备类型',
           checked: true,

+ 12 - 1
src/views/sb/info/SbInfo.vue

@@ -293,7 +293,18 @@ export default {
             return this.BaseTool.Object.getField(this.useTypeMap, text)
           }
         },
-
+        {
+          title: '使用位置',
+          checked: true,
+          width: 200,
+          dataIndex: 'cph'
+        },
+        {
+          title: '使用部门',
+          checked: true,
+          width: 200,
+          dataIndex: 'saveUserName'
+        },
         {
           title: '生产商',
           dataIndex: 'producerName',

+ 21 - 0
src/views/sb/info/modules/BaseForm.vue

@@ -60,6 +60,24 @@
           </a-form-item>
         </a-col>
       </a-row>
+      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="是否固定资产"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['isFinancing', { rules: [{required: true, message: '是否显示不能为空'}]}]" placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in isFinancingMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
       <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
@@ -908,6 +926,7 @@ export default {
       statusMap: {},
       isChildMap: {},
       isShowMap: {},
+      isFinancingMap: {},
       userList: {},
       unitMap: {},
       sbInfoSelectType: null,
@@ -946,6 +965,7 @@ export default {
     this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
     this.isChildMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_CHILD)
     this.isShowMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_SHOW)
+    this.isFinancingMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_FINANCING)
   },
   methods: {
     base (record, type) {
@@ -1050,6 +1070,7 @@ export default {
           'parentSbName',
           'isChild',
           'isShow',
+          'isFinancing',
           'financingNo',
           'financingNoTwo',
           'financingNoThird',

+ 53 - 8
src/views/sb/info/modules/BaseFormMeasureRelation.vue

@@ -56,45 +56,68 @@
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="型号"
+            label="生产厂商"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
               disabled
+              v-decorator="['producerName']" />
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="型号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
               v-decorator="['model']" />
           </a-form-item>
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="系列号(出厂编号)"
+            label="出厂编号"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              disabled
               v-decorator="['zzh']" />
           </a-form-item>
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="使用人"
+            label="使用部门"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['saveUser']" placeholder="请选择">
+              <a-select-option
+                v-for="({userId, realName}) in userList"
+                :key="userId"
+                :label="realName"
+                :value="userId">{{ realName }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="使用位置"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              disabled
-              v-decorator="['saveUserName']" />
+              v-decorator="['cph']" />
           </a-form-item>
         </a-col>
         <a-col :lg="12" :md="24" :sm="24">
           <a-form-item
-            label="使用地点"
+            label="存放位置"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              disabled
               v-decorator="['positionId']" />
           </a-form-item>
         </a-col>
@@ -110,6 +133,24 @@
           </a-form-item>
         </a-col>
       </a-row>
+      <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
+        <a-col :lg="12" :md="24" :sm="24">
+          <a-form-item
+            label="是否固定资产"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-select v-decorator="['isFinancing', { rules: [{required: true, message: '是否显示不能为空'}]}]" placeholder="请选择">
+              <a-select-option
+                v-for="(label,value) in isFinancingMap"
+                :key="value"
+                :label="label"
+                :value="parseInt(value)">{{ label }}
+              </a-select-option>
+            </a-select>
+          </a-form-item>
+        </a-col>
+      </a-row>
       <title-divider v-show="useType == 5" title="特种信息" width="90px"></title-divider>
       <div v-show="useType == 5" >
         <a-row class="form-row" :gutter="BaseTool.Constant.row.gutter">
@@ -497,6 +538,7 @@ export default {
       colorMap: {},
       useTypeMap: {},
       statusMap: {},
+      isFinancingMap: {},
       userList: {},
       unitMap: {},
       sbInfoSelectType: null,
@@ -531,6 +573,7 @@ export default {
     this.unitMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBINFO_UNIT)
     this.sourceTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SBTYPE_SOURCETYPE)
     this.useTypeMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_USE_TYPE)
+    this.isFinancingMap = this.DictCache.getLabelByValueMapByType(this.DictCache.TYPE.SB_IS_FINANCING)
   },
   methods: {
     base (record) {
@@ -649,10 +692,12 @@ export default {
           'parentSbName',
           'isChild',
           'isShow',
+          'isFinancing',
           'financingNo',
           'name',
           'model',
           'positionId',
+          'cph',
           'producerName',
           'saveUserName',
           'zzh',

+ 1 - 1
src/views/sb/info/modules/DetailMeasureRelation.vue

@@ -39,7 +39,7 @@
         <detail-list-item term="测量设备编号">{{ model.cardNo }}</detail-list-item>
         <detail-list-item term="准确度等级">{{ model.fdjxh }}</detail-list-item>
         <detail-list-item term="检定日期">{{ model.checkDate }}</detail-list-item>
-        <detail-list-item term="检定周期">{{ model.checkPeriod }}月</detail-list-item>
+        <detail-list-item term="检定周期">{{ model.checkPeriod }}月</detail-list-item>
         <detail-list-item term="检定有效期">{{ model.nextCheckDate }}</detail-list-item>
         <detail-list-item term="检定单位">{{ model.dph }}</detail-list-item>
         <detail-list-item term="检定人">{{ model.zaiz }}</detail-list-item>

+ 40 - 45
src/views/sb/measurelog/MeasureLog.vue

@@ -3,9 +3,27 @@
     <div class="table-page-search-wrapper">
       <a-form layout="inline">
         <a-row :gutter="48">
-          <a-col :md="8" :sm="24">
-            <a-form-item label="工作名称">
-              <a-input v-model="queryParam.keyword" placeholder="请输入工作名称"/>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="关键字">
+              <a-input v-model="queryParam.keyword" placeholder="设备名称/设备编号/测量设备编号"/>
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="起始日期">
+              <a-date-picker
+                v-model="queryParam.searchStartTime"
+                style="width: 100%"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+              />
+            </a-form-item>
+          </a-col>
+          <a-col :md="6" :sm="24">
+            <a-form-item label="结束日期">
+              <a-date-picker
+                v-model="queryParam.searchEndTime"
+                style="width: 100%"
+                :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+              />
             </a-form-item>
           </a-col>
           <a-col :md="8 || 24" :sm="24">
@@ -104,19 +122,11 @@ export default {
     Detail
   },
   props: {
-    /**
-     * 检查类型: 1-点检 2-巡检
-     */
-    checkType: {
-      type: Number,
-      default: 1
-    }
   },
   data () {
     return {
       // 查询参数
       queryParam: {
-        type: this.checkType
       },
       // 表头
       columns: [
@@ -128,51 +138,32 @@ export default {
           }
         },
         {
-          title: '名称',
-          dataIndex: 'name'
+          title: '设备编号',
+          dataIndex: 'sbNo'
         },
-        // {
-        //  title: '编码',
-        // dataIndex: 'no'
-        // },
         {
-          title: '部位',
-          dataIndex: 'part'
+          title: '设备名称',
+          dataIndex: 'sbName'
         },
         {
-          title: '内容',
-          dataIndex: 'requirement'
+          title: '设备型号',
+          dataIndex: 'sbModel'
         },
         {
-          title: '计划周期',
-          dataIndex: 'period',
-          customRender: (text, record, index) => {
-            return text + this.BaseTool.Table.getMapText(this.periodTypeMap, record.periodType)
-          }
+          title: '测量编号',
+          dataIndex: 'cardNo'
         },
         {
-          title: '动作类型',
-          dataIndex: 'actionType',
-          customRender: (text, record, index) => {
-            return this.BaseTool.Table.getMapText(this.actionTypeMap, record.actionType)
-          }
+          title: '检定日期',
+          dataIndex: 'lastDate'
         },
         {
-          title: '备注',
-          dataIndex: 'remark'
-        },
-        {
-          title: '是否启用',
-          dataIndex: 'enable',
-          scopedSlots: { customRender: 'enable' }
-        },
-        {
-          title: '创建人名称',
-          dataIndex: 'createdUserName'
+          title: '检定人',
+          dataIndex: 'name'
         },
         {
-          title: '创建时间',
-          dataIndex: 'createdTime'
+          title: '备注',
+          dataIndex: 'requirement'
         },
         {
           title: '操作',
@@ -293,6 +284,8 @@ export default {
       })
     },
     handleOk () {
+      this.queryParam.searchStartTime = this.queryParam.searchStartTime ? this.queryParam.searchStartTime.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
+      this.queryParam.searchEndTime = this.queryParam.searchEndTime ? this.queryParam.searchEndTime.format(this.BaseTool.Date.PICKER_NORM_DATE_PATTERN) : null
       this.$refs.table.refresh()
     },
     onSelectChange (selectedRowKeys, selectedRows) {
@@ -305,7 +298,9 @@ export default {
     },
     doExport () {
       const parameter = {
-        ...this.queryParam
+        ...this.queryParam,
+        searchStartTime: this.queryParam.searchStartTime,
+        searchEndTime: this.queryParam.searchEndTime
       }
       exportCheckStandard(parameter).then(file => {
         this.BaseTool.UPLOAD.downLoadExportExcel(file)

+ 96 - 34
src/views/sb/measurelog/modules/BaseForm.vue

@@ -11,45 +11,98 @@
       <a-form-item v-show="false">
         <a-input v-decorator="['id']" type="hidden"/>
         <a-input v-decorator="['sbId']" type="hidden"/>
-        <a-input v-decorator="['part']" type="hidden"/>
       </a-form-item>
 
       <row-list :col="2">
         <row-item>
           <a-form-item
-            label="检定单号"
+            label="检定设备"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
-              v-decorator="['no', {rules: [{required: false, message: '检定单号不能为空'}]}]"/>
+              style="width: 70%"
+              v-decorator="['sbName', {rules: [{required: false, message: '检定设备不能为空'}]}]"/>
+            <a-button type="primary" style="width: 30%" @click="handleSbSelect">选择</a-button>
           </a-form-item>
         </row-item>
         <row-item>
           <a-form-item
-            label="检定日期"
+            label="设备编号"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
-            <a-date-picker
-              style="width: 100%"
-              :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
-              v-decorator="['lastDate', {rules: [{required: false, message: '检定日期不能为空'}]}]" />
+            <a-input
+              disabled
+              v-decorator="['sbNo']"/>
           </a-form-item>
         </row-item>
-<!--        <row-item>
+        <row-item>
           <a-form-item
-            label="检查部位"
+            label="设备型号"
             :labelCol="BaseTool.Constant.labelCol"
             :wrapperCol="BaseTool.Constant.wrapperCol"
           >
             <a-input
               disabled
-              style="width: 80%"
-              v-decorator="['partName', {rules: [{required: false, message: '检查部位不能为空'}]}]"/>
-            <a-button type="primary" style="width: 20%" @click="handlePartSelect">选择</a-button>
+              v-decorator="['sbModel']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="上次检定日期"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              disabled
+              v-decorator="['checkDate']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="检定有效期"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              disabled
+              v-decorator="['nextCheckDate']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="检定周期"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              suffix='月'
+              v-decorator="['checkPeriod']"/>
+          </a-form-item>
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="检定单号"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-input
+              v-decorator="['no', {rules: [{required: true, message: '检定单号不能为空'}]}]"/>
           </a-form-item>
-        </row-item>-->
+        </row-item>
+        <row-item>
+          <a-form-item
+            label="检定日期"
+            :labelCol="BaseTool.Constant.labelCol"
+            :wrapperCol="BaseTool.Constant.wrapperCol"
+          >
+            <a-date-picker
+              style="width: 100%"
+              :format="BaseTool.Date.PICKER_NORM_DATE_PATTERN"
+              v-decorator="['lastDate', {rules: [{required: true, message: '检定日期不能为空'}]}]" />
+          </a-form-item>
+        </row-item>
         <row-item>
           <a-form-item
             label="检定人"
@@ -279,7 +332,7 @@
     <template slot="footer">
       <a-button :loading="confirmLoading" type="primary" @click="save()">保存</a-button>
     </template>
-    <part-info-select-modal ref="partInfoSelectModal" @selected="handlePartSelected"/>
+    <sb-info-select-modal ref="sbInfoSelectModal" @selected="handleSbSelectd"/>
   </a-modal>
 </template>
 
@@ -290,7 +343,7 @@ import { addCheckStandard, updateCheckStandard } from '@/api/sb/measurelog'
 import BaseTool from '../../../../utils/tool'
 import { queryUser } from '@/api/upms/user'
 import { uploadUrl } from '@/api/upms/file'
-import PartInfoSelectModal from '@/views/part/info/modules/PartInfoSelectModal'
+import SbInfoSelectModal from '@/views/sb/info/modules/SbInfoSelectModal'
 import Vue from 'vue'
 import { ACCESS_TOKEN } from '@/store/mutation-types'
 
@@ -299,7 +352,7 @@ export default {
   components: {
     STable,
     Ellipsis,
-    PartInfoSelectModal
+    SbInfoSelectModal
   },
   data () {
     return {
@@ -447,8 +500,12 @@ export default {
           'no',
           'type',
           'period',
-          'part',
-          'partName',
+          'sbName',
+          'sbModel',
+          'sbNo',
+          'checkDate',
+          'nextCheckDate',
+          'checkPeriod',
           'checkUserId',
           'periodType',
           'actionType',
@@ -597,21 +654,6 @@ export default {
       console.log(newParam, 'newparam')
       return newParam
     },
-    handlePartSelect () {
-      const sbId = this.form.getFieldValue('sbId')
-      this.$refs.partInfoSelectModal.base({ sbId })
-    },
-    handlePartSelected (keys, rows) {
-      const [ key ] = keys
-      const [ row ] = rows
-      const { form: { setFieldsValue } } = this
-      this.$nextTick(() => {
-        setFieldsValue(Object.assign({
-          'part': key,
-          'partName': row.name
-        }))
-      })
-    },
     handleCheckImgChange (info) {
       this.defaultCheckImgList = info.fileList
       this.checkImgList = this.setFileList(info, 31)
@@ -631,6 +673,26 @@ export default {
         this.$message.error('上传失败')
         return null
       }
+    },
+    handleSbSelect () {
+      this.$refs.sbInfoSelectModal.base({}, { useType: this.DictCache.VALUE.SB_USE_TYPE.BGCL })
+    },
+    handleSbSelectd (keys, rows) {
+      const [ key ] = keys
+      const [ row ] = rows
+      const { form: { setFieldsValue } } = this
+      // 日期处理
+      this.$nextTick(() => {
+        setFieldsValue(Object.assign({
+          'sbId': key,
+          'sbName': row.name,
+          'sbNo': row.no,
+          'sbModel': row.model,
+          'checkDate': row.checkDate,
+          'checkPeriod': row.checkPeriod,
+          'nextCheckDate': row.nextCheckDate
+        }))
+      })
     }
   }
 }

+ 15 - 6
src/views/sb/measurelog/modules/Detail.vue

@@ -13,15 +13,21 @@
       <detail-list-item term="创建时间">{{ model.createdTime }}</detail-list-item>
     </detail-list>
     <detail-list title="" :col="1">
-      <detail-list-item term="备注">{{ model.remark }}</detail-list-item>
+      <detail-list-item term="备注">{{ model.requirement }}</detail-list-item>
     </detail-list>
-    <detail-list title="标准图片" :col="8">
-      <detail-list-item v-for="item in model.checkImgList" term="">
-        <img :src="BaseTool.Constant.FILE_URL + item.url" width="200px" height="200px"/>
+    <title-divider title="检定图片" width="90px"></title-divider>
+    <detail-list title="" :col="1">
+      <detail-list-item term="" v-if="model.checkImgList != null && model.checkImgList.length > 0">
+        <viewer :images="model.checkImgList" @inited="inited" ref="viewer" :index="1" >
+          <img v-for="item in model.checkImgList" :src="item.url" :key="item.id" class="image">
+        </viewer>
+      </detail-list-item>
+      <detail-list-item term="" v-if="model.checkImgList == null || model.checkImgList.length === 0">
+        暂无
       </detail-list-item>
     </detail-list>
     <detail-list title="" :col="8">
-      <detail-list-item term="文件">
+      <detail-list-item term="检定文件">
         <a-upload
           :multiple="true"
           :fileList="BaseTool.UPLOAD.transImg(model.checkFileList)"
@@ -156,8 +162,11 @@ export default {
     handleCancel () {
       this.visible = false
       this.confirmLoading = false
-    }
+    },
+    inited (viewer) {
+      this.$viewer = viewer
 
+    }
   }
 }
 </script>