Selaa lähdekoodia

试验材料进场、插入设计值/频率字段更改

iZaiZaiA 2 vuotta sitten
vanhempi
commit
b1b03213ee

+ 34 - 0
src/styles/tentative/material/approach.scss

@@ -0,0 +1,34 @@
+.hc-new-switch-tab-box {
+    position: relative;
+    display: flex;
+    justify-content: center;
+    margin-bottom: 24px;
+}
+.hc-switch-tab-content {
+    position: relative;
+    height: calc(100% - 64px);
+    display: flex;
+    justify-content: center;
+    border: 1px solid #e9e9e9;
+    border-radius: 4px;
+    .hc-no-table-form {
+        position: relative;
+        height: 100%;
+        display: flex;
+        justify-content: center;
+        align-items: center;
+        .table-form-no {
+            position: relative;
+            text-align: center;
+            img {
+                width: 200px;
+            }
+            .desc {
+                text-align: center;
+                font-size: 16px;
+                color: #aaa;
+                margin-bottom: 24px;
+            }
+        }
+    }
+}

+ 7 - 4
src/views/data-fill/components/ListItem.vue

@@ -93,7 +93,7 @@
         <el-alert title="填写完设计值和频率,系统自动计算实测值" type="warning" :closable="false"/>
         <el-form ref="formIDVFRef" :model="formIDVFModel" label-width="auto" size="large">
             <div class="form-item-div text-center mb-3">
-                <el-radio-group size="large" v-model="formIDVFModel.radio">
+                <el-radio-group size="large" v-model="formIDVFModel.type">
                     <el-radio :label="1">公路工程</el-radio>
                     <el-radio :label="2" class="ml-4">水利水电</el-radio>
                 </el-radio-group>
@@ -101,11 +101,14 @@
             <el-form-item label="设计值">
                 <el-input v-model="formIDVFModel.design" placeholder="请输入设计值"/>
             </el-form-item>
-            <el-form-item label="频率">
+            <el-form-item label="频率" v-if="formIDVFModel.type === 1">
                 <el-input v-model="formIDVFModel.size" placeholder="请输入频率"/>
             </el-form-item>
+            <el-form-item label="容量" v-if="formIDVFModel.type === 2">
+                <el-input v-model="formIDVFModel.capacity" placeholder="请输入容量"/>
+            </el-form-item>
             <el-form-item label="合格点数">
-                <el-input v-model="formIDVFModel.size1" placeholder="请填写合格点数(不填写则默认全部合格)"/>
+                <el-input v-model="formIDVFModel.fail" placeholder="请填写合格点数(不填写则默认全部合格)"/>
             </el-form-item>
         </el-form>
     </HcDialog>
@@ -556,7 +559,7 @@ const handleMenuSelect = ({key}) => {
 //插入设计值
 const IDVFModal = ref(false)
 const formIDVFRef = ref(null)
-const formIDVFModel = ref({design: '', size: '', dev: '', key: '', pkId: ''})
+const formIDVFModel = ref({type: '', design: '', size: '', dev: '', key: '', capacity: '', fail: '', pkId: ''})
 
 //插入特殊字符
 const specialModal = ref(false)

+ 38 - 8
src/views/tentative/material/approach.vue

@@ -64,7 +64,7 @@
                         <el-button type="primary" size="small" plain @click="viewAttachmentModalClick(row)">附件</el-button>
                     </HcTooltip>
                     <HcTooltip keys="tentative_material_approach_sampling">
-                        <el-button type="primary" size="small" plain>取样记录</el-button>
+                        <el-button type="primary" size="small" plain @click="samplingRecordModalClick(row)">取样记录</el-button>
                     </HcTooltip>
                 </template>
             </HcTable>
@@ -173,11 +173,27 @@
 
         <!--查看附件-->
         <HcDialog :show="viewAttachmentModal" title="查看附件" widths="70rem" :footer="false" isTable @close="viewAttachmentModalClose">
-            <div>
+            <div class="hc-new-switch-tab-box">
                 <HcNewSwitch :datas="tabTypeTab" :keys="tabTypeKey" @change="tabTypeChange"/>
             </div>
+            <div class="hc-switch-tab-content">
+                <div class="h-full w-full">
+                    <iframe allow="display-capture" width='100%' height='100%' frameborder='1' :src="attachmentPdfUrl" v-if="attachmentPdfUrl"/>
+                    <div class="hc-no-table-form" v-else>
+                        <div class="table-form-no">
+                            <img :src="notableform" alt=""/>
+                            <div class="desc">暂无 PDF 数据,请上传</div>
+
+                            <HcDragUpload/>
+                        </div>
+                    </div>
+                </div>
+            </div>
+        </HcDialog>
 
-            123456
+        <!--取样记录-->
+        <HcDialog :show="samplingRecordModal" title="取样记录" widths="60%" :footer="false" isTable @close="samplingRecordModalClose">
+            <HcTable :column="samplingTableColumn" :datas="samplingTableData" :loading="samplingTableLoading"></HcTable>
         </HcDialog>
 
     </div>
@@ -188,6 +204,7 @@ import {ref,watch,onMounted} from "vue";
 import {useRouter, useRoute} from 'vue-router'
 import {useAppStore} from "~src/store";
 import HcDragUpload from "./components/HcDragUpload.vue"
+import notableform from '~src/assets/view/notableform.svg';
 
 //初始变量
 const router = useRouter()
@@ -366,12 +383,14 @@ const viewAttachmentModalClick = (row) => {
     viewAttachmentModal.value = true
 }
 
+const attachmentPdfUrl = ref('')
+
 //类型tab数据和相关处理
-const tabTypeKey = ref('mark')
+const tabTypeKey = ref('tab1')
 const tabTypeTab = ref([
-    {key:'mark',  name: '生产合格证'},
-    {key:'query', name: '厂家质检报告'},
-    {key:'query1', name: '其他文件'},
+    {key:'tab1',  name: '生产合格证'},
+    {key:'tab2', name: '厂家质检报告'},
+    {key:'tab3', name: '其他文件'},
 ]);
 const tabTypeChange = (item) => {
     tabTypeKey.value = item?.key
@@ -382,8 +401,19 @@ const viewAttachmentModalClose = () => {
     viewAttachmentModal.value = false
 }
 
+
+//取样记录
+const samplingRecordModal = ref(false)
+const samplingRecordModalClick = (row) => {
+    samplingRecordModal.value = true
+}
+
+//关闭查看附件
+const samplingRecordModalClose = () => {
+    samplingRecordModal.value = false
+}
 </script>
 
 <style lang="scss" scoped>
-
+@import "../../../styles/tentative/material/approach.scss";
 </style>