ZaiZai 1 năm trước cách đây
mục cha
commit
727b33f60f

+ 1 - 1
src/views/tentative/acquisition/data.vue

@@ -206,7 +206,7 @@ const tableColumn = ref([
             { key: 'key22', name: '3' },
         ],
     },
-    { key: 'key23', name: '是否合格', width: 100, align: 'center' },
+    { key: 'key23', name: '试验结果是否合格', width: 100, align: 'center' },
     { key: 'key24', name: '数据状态', width: 100, align: 'center' },
 ])
 const tableData = ref([

+ 5 - 5
src/views/tentative/detect/collapse-form/src/index.vue

@@ -11,7 +11,7 @@
                                 <el-link v-else type="primary" @click.stop="previewClick(item)">本 表 预 览</el-link>
                             </HcTooltip>
                         </div -->
-                        <div class="text-lg truncate item-title">{{ item.nodeName }}</div>
+                        <div class="item-title truncate text-lg">{{ item.nodeName }}</div>
                         <div class="hc-extra-text-box">
                             <HcTooltip v-if="item.isCopyTab === 1" keys="wbs_del_table">
                                 <el-link type="danger" :disabled="item.isBussShow === 2 || tableFormDelLoading" @click.stop="delClick(item, index)">删除本表</el-link>
@@ -73,7 +73,7 @@
                         </el-tooltip>
                     </div>
                     <div class="data-fill-table-action">
-                        <div class="text-orange tip-action" @click="actionTipModal = true">
+                        <div class="tip-action text-orange" @click="actionTipModal = true">
                             <HcIcon fill name="information" ui="text-2xl" />
                         </div>
                         <div class="link-action">
@@ -135,14 +135,14 @@
     <!-- 操作提示 -->
     <hc-new-dialog v-model="actionTipModal" :footer="false" title="操作提示" widths="38rem" @close="actionTipModalClose">
         <div class="data-fill-table-tip-box">
-            <div class="text-gray-400 tip-item">1、灰色框代表可通过系统识别计算,公式自动引用,可通过公式计算少量数据,(表头数据及简单),也可只填写白色框数据</div>
-            <div class="text-gray-400 tip-item">
+            <div class="tip-item text-gray-400">1、灰色框代表可通过系统识别计算,公式自动引用,可通过公式计算少量数据,(表头数据及简单),也可只填写白色框数据</div>
+            <div class="tip-item text-gray-400">
                 2、先点击一下表单任一区域,再键盘按住 ⌘/ctrl +
                 点击,选择输入框,变为绿色边框,选中成功。选择完毕后,键盘按 ⌘/ctrl + c 复制所选中的数据,
                 再其它表内,或同一张表内,再次按住 ⌘/ctrl + 点击,选择输入框。键盘按 ⌘/ctrl + v
                 依次粘贴所选的数据。(目前仅支持输入框和文本框的操作)
             </div>
-            <div class="text-orange-500 tip-item">3、完善资料填写后记得一定要保存哦</div>
+            <div class="tip-item text-orange-500">3、完善资料填写后记得一定要保存哦</div>
         </div>
     </hc-new-dialog>
 </template>

+ 32 - 5
src/views/tentative/detect/components/ListItem.vue

@@ -12,8 +12,9 @@
                                     <el-link v-else type="primary" @click.stop="previewClick(item)">本 表 预 览</el-link>
                                 </HcTooltip>
                             </div -->
-                            <div class="text-lg truncate item-title">{{ item.nodeName }}</div>
+                            <div class="item-title truncate text-lg">{{ item.nodeName }}</div>
                             <div class="hc-extra-text-box">
+                                <el-link type="primary" @click.stop="linkAcquisitionClick">关联设备数据</el-link>
                                 <HcTooltip v-if="item.isCopyTab === 1" keys="wbs_del_table">
                                     <el-link type="danger" :disabled="item.isBussShow === 2 || delClickLoading" @click.stop="delClick(item, index)">删除本表</el-link>
                                 </HcTooltip>
@@ -70,7 +71,7 @@
                             </el-tooltip>
                         </div>
                         <div class="data-fill-table-action">
-                            <div class="text-orange tip-action" @click="actionTipModal = true">
+                            <div class="tip-action text-orange" @click="actionTipModal = true">
                                 <HcIcon fill name="information" ui="text-2xl" />
                             </div>
                             <div v-loading="downloadLoading" class="link-action">
@@ -207,15 +208,24 @@
     <!-- 操作提示 -->
     <hc-new-dialog v-model="actionTipModal" :footer="false" title="操作提示" widths="38rem" @close="actionTipModalClose">
         <div class="data-fill-table-tip-box">
-            <div class="text-gray-400 tip-item">
+            <div class="tip-item text-gray-400">
                 1、灰色框代表可通过系统识别计算,公式自动引用,可通过公式计算少量数据,(表头数据及简单),也可只填写白色框数据
             </div>
-            <div class="text-gray-400 tip-item">
+            <div class="tip-item text-gray-400">
                 2、系统支持键盘中,shift + tab键向上一个填报框切换,tab向下一个填报框切换。暂不支持上下按键切换输入框
             </div>
-            <div class="text-orange-500 tip-item">3、完善资料填写后记得一定要保存哦</div>
+            <div class="tip-item text-orange-500">3、完善资料填写后记得一定要保存哦</div>
         </div>
     </hc-new-dialog>
+
+    <!-- 关联设备数据 -->
+    <hc-new-dialog v-model="isLinkAcquisition" is-footer-center is-table title="关联设备数据" widths="80%" @close="linksAcquisitionClose">
+        <LinkAcquisition />
+        <template #footer>
+            <el-button @click="linksAcquisitionClose">取消</el-button>
+            <el-button hc-btn type="primary" @click="linksAcquisitionClick">确定</el-button>
+        </template>
+    </hc-new-dialog>
 </template>
 
 <script setup>
@@ -224,6 +234,7 @@ import { useAppStore } from '~src/store'
 import { useRoute } from 'vue-router'
 import wbsApi from '~api/data-fill/wbs'
 import HcUpload from './HcUpload.vue'
+import LinkAcquisition from './linkAcquisition.vue'
 import HTableForm from '~src/plugins/HTableForm'
 import dataApi from '~api/tentative/detect/test'
 import dataApi1 from '~api/tentative/parameter/container'
@@ -1678,6 +1689,22 @@ const actionTipModalClose = () => {
     actionTipModal.value = false
 }
 
+//关联设备数据
+const isLinkAcquisition = ref(false)
+const linkAcquisitionClick = () => {
+  isLinkAcquisition.value = true
+}
+
+//确定
+const linksAcquisitionClick = () => {
+  linksAcquisitionClose()
+}
+
+//关闭关联
+const linksAcquisitionClose = () => {
+  isLinkAcquisition.value = false
+}
+
 // 暴露出去
 defineExpose({
     setFormChart,

+ 132 - 0
src/views/tentative/detect/components/linkAcquisition.vue

@@ -0,0 +1,132 @@
+<template>
+    <hc-body split :options="bodySplitOptions" class="hc-tentative-acquisition-data">
+        <template #left>
+            <hc-card scrollbar>
+                <template #header>
+                    <span class="text-18px">数据采集分类</span>
+                </template>
+                <el-menu unique-opened>
+                    <template v-for="(item, index) in menuData" :key="index">
+                        <el-sub-menu :index="item.key">
+                            <template #title>
+                                <span>{{ item.name }}</span>
+                            </template>
+                            <template v-for="(items, indexs) in item.children" :key="indexs">
+                                <el-menu-item :index="items.key">{{ items.name }}</el-menu-item>
+                            </template>
+                        </el-sub-menu>
+                    </template>
+                </el-menu>
+            </hc-card>
+        </template>
+        <hc-card>
+            <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }">
+                <template #key23="{ row }">
+                    <span v-if="row.key23 === 1" class="text-green">合格</span>
+                    <span v-else class="text-red">不合格</span>
+                </template>
+                <template #key24="{ row }">
+                    <el-link v-if="row.key24 === 3" type="primary">选择</el-link>
+                    <el-link v-if="row.key24 === 2" type="info">选择</el-link>
+                    <el-link v-if="row.key24 === 1" type="warning">取消选择</el-link>
+                </template>
+            </hc-table>
+            <template #action>
+                <hc-pages :pages="searchForm" @change="pageChange" />
+            </template>
+        </hc-card>
+    </hc-body>
+</template>
+
+<script setup>
+import { onActivated, onDeactivated, ref } from 'vue'
+
+//渲染完成
+onActivated(() => {
+
+})
+
+//分割配置
+const bodySplitOptions = {
+  sizes: [16, 84],
+  minSize: 240,
+}
+
+//搜索表单
+const searchForm = ref({ current: 1, size: 20, total: 0 })
+
+//分类数据
+const menuData = ref([
+  {
+    key: '1',
+    name: '压力机',
+    children: [
+      { key: '1-1', name: '水泥xxx1' },
+      { key: '1-2', name: '水泥xxx2' },
+      { key: '1-3', name: '水泥xxx3' },
+    ],
+  },
+  {
+    key: '2',
+    name: '万能机',
+    children: [
+      { key: '2-1', name: '钢筋xxx1' },
+      { key: '2-2', name: '钢筋xxx2' },
+      { key: '2-3', name: '钢筋xxx3' },
+    ],
+  },
+])
+
+//分页被点击
+const pageChange = ({ current, size }) => {
+  searchForm.value.current = current
+  searchForm.value.size = size
+  getTableData()
+}
+
+//表格数据
+const tableColumn = ref([
+  { key: 'key1', name: '工程部位' },
+  { key: 'key2', name: '设备名称' },
+  { key: 'key3', name: '设备采集编号' },
+  { key: 'key4', name: '试验日期' },
+  { key: 'key5', name: '样品编号' },
+  { key: 'key6', name: '试验类型' },
+  { key: 'key7', name: '承压面积(mm2)' },
+  { key: 'key8', name: '试件尺寸(mm)' },
+  { key: 'key9', name: '设计强度(MPa)' },
+  { key: 'key10', name: '龄期(d)' },
+  { key: 'key11', name: '荷载1(KN)' },
+  { key: 'key12', name: '荷载1(KN)' },
+  { key: 'key13', name: '荷载2(KN)' },
+  { key: 'key14', name: '荷载3(KN)' },
+  { key: 'key15', name: '荷载4(KN)' },
+  { key: 'key16', name: '荷载5(KN)' },
+  { key: 'key17', name: '荷载6(KN)' },
+  { key: 'key18', name: '其余荷载(KN)' },
+  { key: 'key19', name: '强度代表值(MPa)' },
+  {
+    name: '最大力总延伸(%)',
+    children: [
+      { key: 'key20', name: '1' },
+      { key: 'key21', name: '2' },
+      { key: 'key22', name: '3' },
+    ],
+  },
+  { key: 'key23', name: '试验结果是否合格', width: 100, align: 'center' },
+  { key: 'key24', name: '操作', width: 100, align: 'center' },
+])
+const tableData = ref([
+  { key23: 1, key24:1 }, { key23: 2, key24:2 }, { key23: 3, key24:3 },
+])
+
+//获取表格数据
+const tableLoading = ref(false)
+const getTableData = async () => {
+
+}
+</script>
+
+<style lang="scss">
+@import "~src/styles/tentative/acquisition/data";
+</style>

+ 88 - 0
src/views/tentative/detect/components/linkAssociation.vue

@@ -0,0 +1,88 @@
+<template>
+    <hc-body split :project-nmae="projectInfo?.projectName" padding="10px">
+        <template #tree>
+            <TestTree
+                :auto-expand-keys="treeAutoExpandKeys" :project-id="projectId" :tenant-id="userInfo?.tenant_id"
+                :wbs-temp-id="projectInfo?.referenceWbsTemplateIdTrial" :wbs-type="2" @node-tap="wbsElTreeClick"
+            />
+        </template>
+        <hc-new-card>
+            <hc-table :column="tableColumn" :datas="tableData" :loading="tableLoading" :index-style="{ width: 60 }">
+                <template #key4="{ row }">
+                    <el-tag v-if="row.key4 === 1" type="success" effect="dark">已通过</el-tag>
+                    <el-tag v-if="row.key4 === 2" type="danger" effect="dark">已废除</el-tag>
+                </template>
+                <template #action="{ row }">
+                    <el-link type="primary">选择</el-link>
+                    <el-link type="warning">取消选择</el-link>
+                </template>
+            </hc-table>
+            <template #action>
+                <hc-pages :pages="searchForm" @change="pageChange" />
+            </template>
+        </hc-new-card>
+    </hc-body>
+</template>
+
+<script setup>
+import { onActivated, onDeactivated, ref } from 'vue'
+import { useAppStore } from '~src/store'
+import { getStoreValue, setStoreValue } from '~src/utils/storage'
+import TestTree from '~src/views/tentative/material/components/TestTree.vue'
+
+//变量
+const useAppState = useAppStore()
+const userInfo = ref(useAppState.getUserInfo)
+const projectId = ref(useAppState.getProjectId)
+const contractId = ref(useAppState.getContractId)
+const projectInfo = ref(useAppState.getProjectInfo)
+
+//渲染完成
+onActivated(() => {
+
+})
+
+//搜索表单
+const searchForm = ref({ current: 1, size: 20, total: 0 })
+
+//自动展开缓存
+const treeAutoExpandKeys = ref(getStoreValue('testTreeExpandKeys') || [])
+
+//树被点击
+const nodeDataInfo = ref({})
+const wbsElTreeClick = ({ data, keys }) => {
+  nodeDataInfo.value = data
+  //缓存自动展开
+  treeAutoExpandKeys.value = keys
+  setStoreValue('testTreeExpandKeys', keys)
+}
+
+//分页被点击
+const pageChange = ({ current, size }) => {
+  searchForm.value.current = current
+  searchForm.value.size = size
+  getTableData()
+}
+
+//表格数据
+const tableData = ref([
+  { key4:1 }, { key4:2 },
+])
+const tableColumn = ref([
+  { key: 'key1', name: '委托单位' },
+  { key: 'key2', name: '委托单编号' },
+  { key: 'key3', name: '委托单名称' },
+  { key: 'key4', name: '委托单状态', width: 120, align: 'center' },
+  { key: 'action', name: '操作', width: 120, align: 'center' },
+])
+
+//获取数据
+const tableLoading = ref(false)
+const getTableData = async () => {
+
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 856 - 817
src/views/tentative/detect/test-form.vue


+ 188 - 3
src/views/tentative/detect/test.vue

@@ -175,7 +175,8 @@
                         <HcTooltip keys="tentative_detect_test_annex">
                             <el-link type="primary" @click="viewAttachmentModalClick(row)">附件</el-link>
                         </HcTooltip>
-                        <HcTooltip keys="tentative_detect_test_info">
+                        <el-link v-if="authBtnTabKey === '3'" type="primary" @click="relatedSearchClick(row)">关联查阅</el-link>
+                        <HcTooltip v-else keys="tentative_detect_test_info">
                             <el-link type="primary" @click="samplingRecordModalClick(row)">样品信息</el-link>
                         </HcTooltip>
                     </template>
@@ -223,9 +224,49 @@
                 :loading="samplingTableLoading" is-new
             />
         </hc-new-dialog>
+
+        <!-- 关联查阅 -->
+        <hc-dialog v-model="isRelatedSearch" :footer="false" is-table title="关联查阅" widths="80%" :padding="false" @close="relatedSearchModalClose">
+            <div class="hc-related-search-box relative mt-10px">
+                <hc-card-item title="样品信息">
+                    <template #extra>
+                        <el-button type="primary" size="small" @click="rowDispose">样品处理</el-button>
+                    </template>
+                    <hc-table :column="relatedColumn1" :datas="relatedData1" :is-index="false" />
+                </hc-card-item>
+                <hc-card-item title="委托单信息" class="mt-14px">
+                    <hc-table :column="relatedColumn2" :datas="relatedData2" :is-index="false" />
+                </hc-card-item>
+                <hc-card-item title="设备采集信息" class="mt-14px">
+                    <hc-table :column="relatedColumn3" :datas="relatedData3" :is-index="false" />
+                </hc-card-item>
+            </div>
+        </hc-dialog>
+
+        <!-- 样品处理 -->
+        <hc-new-dialog v-model="disposeModal" is-footer-center title="样品处理" widths="40rem" @close="disposeClose">
+            <el-form ref="formRef" :model="formModel" :rules="formRules" label-position="left" label-width="auto">
+                <el-form-item label="处理方式:" prop="key1">
+                    <el-radio-group v-model="formModel.key1">
+                        <el-radio :value="1">处理</el-radio>
+                        <el-radio :value="2">留样</el-radio>
+                    </el-radio-group>
+                </el-form-item>
+                <el-form-item v-if="formModel.key1 === 1" label="处理原因:" prop="key2">
+                    <el-input v-model="formModel.key2" type="textarea" :rows="5" resize="none" />
+                </el-form-item>
+                <el-form-item v-if="formModel.key1 === 2" label="留样时间:" prop="startTime">
+                    <hc-date-picker :dates="betweenTime1" clearable @change="betweenTimeUpdate1" />
+                </el-form-item>
+            </el-form>
+            <template #footer>
+                <el-button @click="disposeClose">取消</el-button>
+                <el-button hc-btn type="primary" @click="disposeSave">确定</el-button>
+            </template>
+        </hc-new-dialog>
+
         <!-- 批量上报审批 -->
         <HcReportModal
-
             :classify-type="authBtnTabKey"
             :addition="reportAddition" :contract-id="contractId" :ids="reportIds"
             :project-id="projectId" :show="showReportModal" :task-name="reportTaskName"
@@ -369,14 +410,21 @@ const authBtnTabKey = ref('1')
 const authBtnTabdata = ref([
     { key: '1', name: '施工质检' },
     { key: '2', name: '监理抽检' },
+    { key: '3', name: '业主抽检' },
 ])
 const authBtnTabClick = (item) => {
-    if (item.key !== authBtnTabKey.value) {
+    if (item.key !== authBtnTabKey.value && item.key < 3) {
         authBtnTabKey.value = item.key
         searchForm.value.type = item.key
         searchForm.value.current = 1
         getTableData()
     }
+    if (item.key === '3') {
+        authBtnTabKey.value = item.key
+        searchForm.value.type = item.key
+        searchForm.value.current = 1
+        tableData.value = [{}]
+    }
 }
 //contractType,  1施工,2监理
 const setContractType = (contractType) => {
@@ -922,6 +970,129 @@ const onmousedown = () => {
         document.onmouseup = null
     }
 }
+
+//关联查阅
+const isRelatedSearch = ref(false)
+const relatedSearchClick = (row) => {
+    isRelatedSearch.value = true
+}
+
+//样品信息
+const relatedColumn1 = [
+    { key: 'key1', name: '取样名称' },
+    { key: 'key2', name: '取样日期' },
+    { key: 'key3', name: '取样编号' },
+    { key: 'key4', name: '规格型号' },
+    { key: 'key5', name: '试样数量' },
+    { key: 'key6', name: '计算单位' },
+    { key: 'key7', name: '拟用部位' },
+    { key: 'key8', name: '代表数量' },
+    { key: 'key9', name: '取样人' },
+    { key: 'key10', name: '入库时间' },
+    { key: 'key11', name: '试验时间' },
+    { key: 'key12', name: '样品处理' },
+    { key: 'key13', name: '时间(或处理原因)' },
+]
+const relatedData1 = ref([])
+
+//委托单信息
+const relatedColumn2 = [
+    { key: 'key1', name: '委托单位' },
+    { key: 'key2', name: '委托单编号' },
+    { key: 'key3', name: '委托名称' },
+    { key: 'key4', name: '委托状态' },
+]
+const relatedData2 = ref([])
+
+//设备采集信息
+const relatedColumn3 = [
+    { key: 'key1', name: '工程部位' },
+    { key: 'key2', name: '设备名称' },
+    { key: 'key3', name: '设备采集编号' },
+    { key: 'key4', name: '试验日期' },
+    { key: 'key5', name: '样品编号' },
+    { key: 'key6', name: '试验类型' },
+    { key: 'key7', name: '承压面积(mm2)' },
+    { key: 'key8', name: '试件尺寸(mm)' },
+    { key: 'key9', name: '设计强度(MPa)' },
+    { key: 'key10', name: '龄期(d)' },
+    { key: 'key11', name: '荷载1(KN)' },
+    { key: 'key12', name: '荷载1(KN)' },
+    { key: 'key13', name: '荷载2(KN)' },
+    { key: 'key14', name: '荷载3(KN)' },
+    { key: 'key15', name: '荷载4(KN)' },
+    { key: 'key16', name: '荷载5(KN)' },
+    { key: 'key17', name: '荷载6(KN)' },
+    { key: 'key18', name: '其余荷载(KN)' },
+    { key: 'key19', name: '强度代表值(MPa)' },
+    {
+        name: '最大力总延伸(%)',
+        children: [
+            { key: 'key20', name: '1' },
+            { key: 'key21', name: '2' },
+            { key: 'key22', name: '3' },
+        ],
+    },
+    { key: 'key23', name: '试验结果是否合格', width: 100, align: 'center' },
+]
+const relatedData3 = ref([])
+
+//关闭关联查阅
+const relatedSearchModalClose = () => {
+    isRelatedSearch.value = false
+}
+
+//表单数据
+const formRef = ref(null)
+const formModel = ref({})
+const formRules = {
+    key1: {
+        required: true,
+        trigger: 'blur',
+        message: '请选择处理方式',
+    },
+    key2: {
+        required: true,
+        trigger: 'blur',
+        message: '请填写处理原因',
+    },
+    startTime: {
+        required: true,
+        trigger: 'blur',
+        message: '请选择留样时间',
+    },
+}
+
+//样品处理
+const disposeModal = ref(false)
+const rowDispose = () => {
+    formModel.value = { key1: 1 }
+    disposeModal.value = true
+}
+
+//日期时间被选择
+const betweenTime1 = ref(null)
+const betweenTimeUpdate1 = ({ arr }) => {
+    betweenTime1.value = arr
+    if (arr.length > 0) {
+        formModel.value.startTime = arr[0]
+        formModel.value.endTime = arr[1]
+    } else {
+        formModel.value.startTime = ''
+        formModel.value.endTime = ''
+    }
+}
+
+//确定提交
+const disposeSave = async () => {
+    disposeClose()
+}
+
+//关闭弹窗
+const disposeClose = () => {
+    disposeModal.value = false
+    formModel.value = {}
+}
 </script>
 
 <style lang="scss" scoped>
@@ -955,3 +1126,17 @@ const onmousedown = () => {
     }
 }
 </style>
+
+<style lang="scss">
+.hc-related-search-box .hc-card-item-box {
+    background: #f5f5f5;
+    .hc-card-item-header {
+        color: #101010;
+        padding-bottom: 14px;
+        border-bottom: 1px solid #d6d6d6;
+    }
+    .hc-card-item-header .item-header {
+        font-size: 16px;
+    }
+}
+</style>

Một số tệp đã không được hiển thị bởi vì quá nhiều tập tin thay đổi trong này khác