Bläddra i källkod

惠州三院需求设备档案卡关联检验系统校准确认表

shenqilong 1 år sedan
förälder
incheckning
195682872c

+ 12 - 0
src/api/platform/device/device.js

@@ -113,3 +113,15 @@ export function queryRepairRecord (data) {
         data: data
     })
 }
+/**
+ * 检验系统校准确认记录表列表(分页条件查询)数据
+ * @param {*} data
+ * @returns
+ */
+export function calibrateResultRecord (data) {
+    return request({
+        url: BUSINESS_BASE_URL() + '/equipment/calibrateResultRecord/query',
+        method: 'post',
+        data: data
+    })
+}

+ 177 - 0
src/views/component/device/ConfirmationRecord.vue

@@ -0,0 +1,177 @@
+<!-- 校准记录 -->
+<template>
+    <div v-loading="loading" class="table">
+        <el-table :data="listData">
+            <el-table-column
+                width="50"
+                type="selection"
+            />
+            <el-table-column
+                prop=""
+                label="序号"
+                width="50"
+                type="index"
+                :index="showIndex"
+            />
+
+            <el-table-column prop="bianHao" label="设备编号" width="120" />
+            <el-table-column prop="sheBeiMingChen" label="设备名称" width="200" />
+            <el-table-column prop="xiaoZhunRiQi" label="校准日期" width="140" />
+            <el-table-column prop="yanZhengRiQi" label="验证日期" width="140" />
+            <el-table-column prop="yanZhengJieGuo" label="验证结果" width="140" />
+            <el-table-column prop="queRenJieLun" label="确认结论" width="200" />
+
+            <!-- <el-table-column prop="fuJian" label="校准附件" width="260">
+                <template slot-scope="{row}">
+                    <ibps-attachment
+                        v-model="row.fuJian"
+                        :download="true"
+                        multiple
+                        accept="*"
+                        :readonly="true"
+                    />
+                </template>
+            </el-table-column>
+            <el-table-column prop="xiangMu" label="验证附件" width="260">
+                <template slot-scope="{row}">
+                    <ibps-attachment
+                        v-model="row.xiangMu"
+                        :download="true"
+                        multiple
+                        accept="*"
+                        :readonly="true"
+                    />
+                </template>
+            </el-table-column> -->
+            <el-table-column prop="" label="操作" width="140">
+                <template slot-scope="{row}">
+                    <el-button size="mini" type="text" icon="el-icon-view" @click="look(row)">查阅</el-button>
+                    <el-button size="mini" type="text" icon="ibps-icon-table" @click="goLookForm(row)">表单</el-button>
+                </template>
+            </el-table-column>
+        </el-table>
+        <el-pagination
+            style="margin-top: 5px; padding-bottom: 10px"
+            :current-page="requestPage.pageNo"
+            :page-sizes="[10, 20,30, 50]"
+            :page-size="requestPage.limit"
+            layout="prev,pager,next,jumper,sizes,->,total"
+            :total="total"
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+        />
+        <el-dialog
+            :close-on-click-modal="false"
+            :close-on-press-escape="false"
+            :top="'3vh'"
+            :width="'90%'"
+            class="js-custom-dialog"
+            append-to-body
+            :fullscreen="false"
+            :visible.sync="iframeVisible"
+        >
+            <iframe :src="srcUrl" :height="'100%'" :width="'100%'" frameborder="0" scrolling="no" />
+        </el-dialog>
+        <data-template-formrender-dialog
+            :visible="DialogVisible"
+            form-key="jyxtxzjgyzhqrjlb"
+            :pk-value="pkValue"
+            :readonly="true"
+            @close="visible => DialogVisible = visible"
+        />
+    </div>
+</template>
+
+<script>
+import DataTemplateFormrenderDialog from '@/business/platform/data/templaterender/form/dialog.vue'
+import IbpsAttachment from '@/business/platform/file/attachment/selector'
+import ibpsUserSelector from '@/business/platform/org/selector'
+import { calibrateResultRecord } from '@/api/platform/device/device'
+export default {
+    components: {
+        ibpsUserSelector, IbpsAttachment, DataTemplateFormrenderDialog
+    },
+    props: {
+        params: {
+            type: Object,
+            default: () => {}
+        }
+    },
+    data () {
+        return {
+            DialogVisible: false,
+            iframeVisible: false,
+            pkValue: '',
+            srcUrl: '',
+            listData: [],
+            loading: false,
+            total: 0,
+            requestPage: {
+                limit: 10,
+                pageNo: 1
+            }
+        }
+    },
+    async mounted () {
+        this.getData()
+    },
+    methods: {
+        // 查阅
+        look (row) {
+            this.pkValue = row.id
+            this.DialogVisible = true
+        },
+        // 查看表单
+        goLookForm (row) {
+            const first = this.$store.getters.level.first
+            this.srcUrl = this.$reportPath.replace('show', 'pdf') + '设备校准和计量溯源性/检验系统校准结果验证和确认记录表.rpx&id_=' + row.id + '&org_=' + first
+            console.log(this.srcUrl)
+
+            this.iframeVisible = true
+        },
+        async getData () {
+            console.log(this.params)
+
+            this.loading = true
+            const { data: { dataResult, pageResult }} = await calibrateResultRecord({
+                requestPage: this.requestPage,
+                parameters: [
+                    { key: 'Q^ming_cheng_^S', value: this.params.id },
+                    { key: 'Q^shi_fou_guo_shen_^S', value: '已完成' }
+                ],
+                sorts: [
+                    { field: 'bian_zhi_shi_jian', order: 'desc' }
+                ]
+            })
+            this.listData = dataResult
+            this.total = pageResult.totalCount
+            this.loading = false
+        },
+        // 当前页码改变
+        handleCurrentChange (val) {
+            this.requestPage.pageNo = val
+            this.getData()
+        },
+        // 页码选择器改变
+        handleSizeChange (val) {
+            this.requestPage.limit = val
+            this.requestPage.pageNo = 1
+            this.getData()
+        },
+        // 分页连续序号
+        showIndex (index) {
+            return index + 1 + (this.requestPage.pageNo - 1) * this.requestPage.limit
+        }
+    }
+}
+</script>
+
+<style lang="scss" scoped>
+.table{
+    .button{
+        margin-bottom: 5px;
+        display: flex;
+        justify-content: flex-end;
+    }
+}
+</style>

+ 5 - 2
src/views/component/device/deviceDialog.vue

@@ -767,6 +767,7 @@
 
                                 <el-tab-pane v-for="item in tabItems" :key="item.name" :label="item.label" :name="item.name" :disabled="item.isKeepAlive&&!isEdit">
                                     <template v-if="item.isKeepAlive">
+
                                         <!-- 使用 v-if 配合 keep-alive 实现按需加载 -->
                                         <keep-alive>
                                             <component :is="item.component" v-if="activeName===item.name" :params="form" />
@@ -795,12 +796,13 @@ import ScrappedRecord from './scrappedRecord.vue'
 import MaintenanceRecord from './maintenanceRecord.vue'
 import RepairRecord from './repairRecord.vue'
 import CalibrationCheckRecord from './calibrationCheckRecord.vue'
+import ConfirmationRecord from './ConfirmationRecord.vue'
 import IbpsAttachment from '@/business/platform/file/attachment/selector'
 import SelectType from '@/views/component/selectType.vue'
 import { getImage } from '@/api/platform/file/attachment'
 export default {
     components: {
-        ibpsUserSelector, Maintenance, MoreDevices, ScrappedRecord, MaintenanceRecord, RepairRecord, CalibrationCheckRecord, IbpsAttachment, SelectType,
+        ibpsUserSelector, Maintenance, MoreDevices, ScrappedRecord, MaintenanceRecord, RepairRecord, CalibrationCheckRecord, ConfirmationRecord, IbpsAttachment, SelectType,
         IbpsCustomDialog: () => import('@/business/platform/data/templaterender/custom-dialog'),
         IbpsImage: () => import('@/business/platform/file/image')
     },
@@ -847,7 +849,8 @@ export default {
                 { label: '使用与维护记录', name: 'four', component: 'MaintenanceRecord', isKeepAlive: true },
                 { label: '校准记录', name: 'five', component: 'CalibrationCheckRecord', isKeepAlive: true },
                 { label: '维修记录', name: 'six', component: 'RepairRecord', isKeepAlive: true },
-                { label: '停用、报废记录', name: 'seven', component: 'ScrappedRecord', isKeepAlive: true }
+                { label: '停用、报废记录', name: 'seven', component: 'ScrappedRecord', isKeepAlive: true },
+                { label: '检验系统校准确认记录', name: 'eight', component: 'ConfirmationRecord', isKeepAlive: true }
             ],
             filter: [{
                 descVal: '1',