瀏覽代碼

验收移交接口调用

duy 1 年之前
父節點
當前提交
82fd67eff2

+ 16 - 0
src/api/modules/initial/initial.js

@@ -105,4 +105,20 @@ export default {
             params: form,
             params: form,
         }, msg)
         }, msg)
     },
     },
+    //在线验收-专家抽检记录
+    async getUserInspectInfo(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/getUserInspectInfo',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
+    //在线验收-项目抽检统计
+    async projectInspectStat(form, msg = true) {
+        return httpApi({
+            url: '/api/blade-archive/archivesauto/projectInspectStat',
+            method: 'get',
+            params: form,
+        }, msg)
+    },
 }
 }

+ 25 - 27
src/views/transfer/components/conclusion/table-opinion.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
     <HcTable ui="no-border" is-new :index-style="{ width: 60 }" :column="tableColumn" :datas="tableData" :loading="tableLoading">
     <HcTable ui="no-border" is-new :index-style="{ width: 60 }" :column="tableColumn" :datas="tableData" :loading="tableLoading">
-        <template #key3="{ row }">
-            <span class="text-blue text-hover" @click="opinionClick(row)">{{ row.key3 }}</span>
+        <template #opinion="{ row }">
+            <span class="text-blue text-hover" @click="opinionClick(row)">{{ row.opinion }}</span>
         </template>
         </template>
     </HcTable>
     </HcTable>
 </template>
 </template>
@@ -9,7 +9,7 @@
 <script setup>
 <script setup>
 import { onMounted, ref } from 'vue'
 import { onMounted, ref } from 'vue'
 import { getArrValue } from 'js-fast-way'
 import { getArrValue } from 'js-fast-way'
-
+import initialgApi from '~api/initial/initial'
 
 
 //参数
 //参数
 const props = defineProps({
 const props = defineProps({
@@ -31,38 +31,36 @@ const contractId = ref(props.contractId)
 
 
 //渲染完成
 //渲染完成
 onMounted(() => {
 onMounted(() => {
-
+    getTableData()
 })
 })
 
 
 //表格数据
 //表格数据
 const tableColumn = ref([
 const tableColumn = ref([
-    { key:'key1', name: '专家', width: 80 },
-    { key:'key2', name: '抽检所属', width: 100 },
-    { key:'key3', name: '抽检意见' },
-])
-const tableData = ref([
-    {
-        id: 1,
-        key1: '张三',
-        key2: '施工',
-        key3: '这是专家抽检意见XXXXX',
-    },
-    {
-        id: 2,
-        key1: '张三',
-        key2: '业主',
-        key3: '这是专家抽检意见XXXXX',
-    },
-    {
-        id: 3,
-        key1: '李四',
-        key2: '业主',
-        key3: '这是专家抽检意见XXXXX',
-    },
+    { key:'expertName', name: '专家', width: 80 },
+    { key:'unitName', name: '抽检所属', width: 100 },
+    { key:'opinion', name: '抽检意见' },
 ])
 ])
+const tableData = ref([])
 
 
 const tableLoading = ref(false)
 const tableLoading = ref(false)
+const getTableData = async () => {
+        tableLoading.value = true
+        const { error, code, data } = await initialgApi.getUserInspectInfo({
+            current:1,
+            size:10000,
+            projectId: projectId.value,
+        })
+        tableLoading.value = false
+        if (!error && code === 200) {
+            tableData.value = getArrValue(data['records'])
+        
+        } else {
+            tableData.value = []
+     
+        }
+    
 
 
+}
 //编辑
 //编辑
 const editClick = (row) => {
 const editClick = (row) => {
     row.isEdit = true
     row.isEdit = true

+ 52 - 31
src/views/transfer/components/conclusion/table-stats.vue

@@ -1,37 +1,37 @@
 <template>
 <template>
     <div class="hc-table-stats-ref-box">
     <div class="hc-table-stats-ref-box">
-        <el-table :data="tableData" border v-loading="isLoading" :span-method="objectSpanMethod" height="100%">
+        <el-table v-loading="isLoading" :data="tableData" border :span-method="objectSpanMethod" height="100%">
             <el-table-column class-name="hc-table-stats-column" align="center" width="90" :resizable="false">
             <el-table-column class-name="hc-table-stats-column" align="center" width="90" :resizable="false">
                 <template #header>
                 <template #header>
                     <div>分组</div>
                     <div>分组</div>
                 </template>
                 </template>
-                <template #default="{row}">
+                <template #default="{ row }">
                     <div>{{ row.name }}</div>
                     <div>{{ row.name }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
             <el-table-column label="总案卷(卷)" align="center">
             <el-table-column label="总案卷(卷)" align="center">
-                <template #default="{row}">
-                    <div class="num">{{ row.num1 }}</div>
+                <template #default="{ row }">
+                    <div class="num">{{ row.total }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
             <el-table-column label="已抽检(卷)" align="center">
             <el-table-column label="已抽检(卷)" align="center">
-                <template #default="{row}">
-                    <div class="num text-orange">{{ row.num2 }}</div>
+                <template #default="{ row }">
+                    <div class="num text-orange">{{ row.endInspect }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
             <el-table-column label="需整改(卷)" align="center">
             <el-table-column label="需整改(卷)" align="center">
-                <template #default="{row}">
-                    <div class="num text-red">{{ row.num5 }}</div>
+                <template #default="{ row }">
+                    <div class="num text-red">{{ row.needUpdate }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
             <el-table-column label="抽检率" align="center">
             <el-table-column label="抽检率" align="center">
-                <template #default="{row}">
-                    <div class="num text-green">{{ row.num3 }}</div>
+                <template #default="{ row }">
+                    <div class="num text-green">{{ row.inspectRatio }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
             <el-table-column label="总抽检率" align="center">
             <el-table-column label="总抽检率" align="center">
-                <template #default="{row}">
-                    <div class="num xl text-blue">{{ row.num4 }}</div>
+                <template #default="{ row }">
+                    <div class="num xl text-blue">{{ `${totalInspectRatio}%` }}</div>
                 </template>
                 </template>
             </el-table-column>
             </el-table-column>
         </el-table>
         </el-table>
@@ -39,52 +39,73 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import {ref, onMounted} from "vue";
-import {getArrValue} from "js-fast-way"
+import { onMounted, ref } from 'vue'
+import { getArrValue } from 'js-fast-way'
+import initialgApi from '~api/initial/initial'
 
 
 //参数
 //参数
 const props = defineProps({
 const props = defineProps({
     projectId: {
     projectId: {
-        type: [String,Number],
-        default: ''
+        type: [String, Number],
+        default: '',
     },
     },
     contractId: {
     contractId: {
-        type: [String,Number],
-        default: ''
-    }
+        type: [String, Number],
+        default: '',
+    },
 })
 })
-
+const eimt = defineEmits('changeTips')
 //变量
 //变量
-const projectId = ref(props.projectId);
-const contractId = ref(props.contractId);
+const projectId = ref(props.projectId)
+const totalInspectRatio = ref('')
+const tips = ref('')
 
 
 //渲染完成
 //渲染完成
 onMounted(() => {
 onMounted(() => {
-
+    getTableData()
 })
 })
 
 
 //表格数据
 //表格数据
 const isLoading = ref(false)
 const isLoading = ref(false)
 const tableData = ref([
 const tableData = ref([
-    {name: '业主组', num1: 1786, num2: 210, num5: 2, num3: '12%', num4: '54%'},
-    {name: '监理组', num1: 899, num2: 145, num5: 1, num3: '12%', num4: '54%'},
-    {name: '施工组', num1: 3123, num2: 432, num5: 0, num3: '12%', num4: '54%'},
-    {name: '声像组', num1: 226, num2: 11, num5: 0, num3: '12%', num4: '54%'},
-    {name: '竣工图组', num1: 145, num2: 76, num5: 0, num3: '12%', num4: '54%'},
+    { name: '业主组', num1: 1786, num2: 210, num5: 2, num3: '12%', num4: '54%' },
+    { name: '监理组', num1: 899, num2: 145, num5: 1, num3: '12%', num4: '54%' },
+    { name: '施工组', num1: 3123, num2: 432, num5: 0, num3: '12%', num4: '54%' },
+    { name: '声像组', num1: 226, num2: 11, num5: 0, num3: '12%', num4: '54%' },
+    { name: '竣工图组', num1: 145, num2: 76, num5: 0, num3: '12%', num4: '54%' },
 ])
 ])
+const getTableData = async () => {
+        isLoading.value = true
+        const { error, code, data } = await initialgApi.projectInspectStat({
+         
+            projectId: projectId.value,
+        })
+        isLoading.value = false
+        if (!error && code === 200) {
+            tableData.value = getArrValue(data['list'])
+            totalInspectRatio.value = data['totalInspectRatio']
+            tips.value = data['tips']
+            eimt('changeTips', tips.value)
+         
+        } else {
+            tableData.value = []
+         
+        }
+    
 
 
+}
 //处理合并
 //处理合并
-const objectSpanMethod = ({rowIndex, columnIndex}) => {
+const objectSpanMethod = ({ rowIndex, columnIndex }) => {
     if (columnIndex === 5) {
     if (columnIndex === 5) {
         if (rowIndex === 0) {
         if (rowIndex === 0) {
             return {
             return {
                 rowspan: 5,
                 rowspan: 5,
-                colspan: 1
+                colspan: 1,
             }
             }
         } else {
         } else {
             return {
             return {
                 rowspan: 0,
                 rowspan: 0,
-                colspan: 0
+                colspan: 0,
             }
             }
         }
         }
     }
     }

+ 40 - 27
src/views/transfer/components/examination/table-opinion.vue

@@ -1,11 +1,11 @@
 <template>
 <template>
     <HcTable ui="no-border" is-new :index-style="{ width: 60 }" :column="tableColumn" :datas="tableData" :loading="tableLoading">
     <HcTable ui="no-border" is-new :index-style="{ width: 60 }" :column="tableColumn" :datas="tableData" :loading="tableLoading">
-        <template #key2="{ row }">
-            <span class="text-blue text-hover">{{ row.key2 }}</span>
+        <template #archiveName="{ row }">
+            <span class="text-blue text-hover">{{ row.archiveName }}</span>
         </template>
         </template>
-        <template #key3="{ row }">
-            <el-input v-if="row.isEdit" v-model="row.key3" placeholder="请输入抽检意见" />
-            <span v-else>{{ row.key3 }}</span>
+        <template #opinion="{ row }">
+            <el-input v-if="row.isEdit" v-model="row.opinion" placeholder="请输入抽检意见" />
+            <span v-else>{{ row.opinion }}</span>
         </template>
         </template>
         <template #action="{ row }">
         <template #action="{ row }">
             <el-button v-if="row.isEdit" type="success" size="small" @click="saveClick(row)">
             <el-button v-if="row.isEdit" type="success" size="small" @click="saveClick(row)">
@@ -22,9 +22,9 @@
 </template>
 </template>
 
 
 <script setup>
 <script setup>
-import { onMounted, ref } from 'vue'
+import { onMounted, ref, watch } from 'vue'
 import { getArrValue } from 'js-fast-way'
 import { getArrValue } from 'js-fast-way'
-
+import initialgApi from '~api/initial/initial'
 
 
 //参数
 //参数
 const props = defineProps({
 const props = defineProps({
@@ -36,39 +36,52 @@ const props = defineProps({
         type: [String, Number],
         type: [String, Number],
         default: '',
         default: '',
     },
     },
+    searchLogForm:{
+        type:Object,
+    },
 })
 })
 
 
 //变量
 //变量
 const projectId = ref(props.projectId)
 const projectId = ref(props.projectId)
-const contractId = ref(props.contractId)
+const searchLogForm = ref(props.searchLogForm)
 
 
 //渲染完成
 //渲染完成
 onMounted(() => {
 onMounted(() => {
-
+    getTableData()
+})
+//监听
+watch(() => [
+    props.searchLogForm,
+    props.projectId,
+], ([SearchLogForm, ProjectId]) => {
+    searchLogForm.value = SearchLogForm
+    projectId.value = ProjectId
 })
 })
-
 //表格数据
 //表格数据
 const tableColumn = ref([
 const tableColumn = ref([
-    { key:'key1', name: '抽检所属', width: 180 },
-    { key:'key2', name: '案卷题名' },
-    { key:'key3', name: '抽检意见' },
+    { key:'unitName', name: '抽检所属', width: 180 },
+    { key:'archiveName', name: '案卷题名' },
+    { key:'opinion', name: '抽检意见' },
     { key:'action', name: '操作', width: 140, align: 'center' },
     { key:'action', name: '操作', width: 140, align: 'center' },
 ])
 ])
-const tableData = ref([
-    {
-        id: 1,
-        key1: '施工',
-        key2: '安康至来凤国家高速公路....',
-        key3: '这是专家抽检意见xxxxx',
-    },
-    {
-        id: 2,
-        key1: '业主',
-        key2: '安康至来凤国家高速公路....',
-        key3: '这是专家抽检意见xxxxx',
-    },
-])
+const tableData = ref([])
+const getTableData = async () => {
+        tableLoading.value = true
+        const { error, code, data } = await initialgApi.getUserInspectInfo({
+            ...searchLogForm.value,
+            projectId: projectId.value,
+        })
+        tableLoading.value = false
+        if (!error && code === 200) {
+            tableData.value = getArrValue(data['records'])
+            searchLogForm.value.total = data['total'] || 0
+        } else {
+            tableData.value = []
+            searchLogForm.value.total = 0
+        }
+    
 
 
+}
 const tableLoading = ref(false)
 const tableLoading = ref(false)
 
 
 //编辑
 //编辑

+ 1 - 1
src/views/transfer/preliminary-examination.vue

@@ -89,7 +89,7 @@
 
 
         <!-- 抽检记录 -->
         <!-- 抽检记录 -->
         <hc-new-dialog v-model="isLogModal" is-slot-footer is-table widths="70%" title="抽检记录" @close="isLogModalClose">
         <hc-new-dialog v-model="isLogModal" is-slot-footer is-table widths="70%" title="抽检记录" @close="isLogModalClose">
-            <TableOpinion :contract-id="contractId" :project-id="projectId" />
+            <TableOpinion :contract-id="contractId" :project-id="projectId" :search-log-form="searchLogForm" />
             <template #footer>
             <template #footer>
                 <HcPages :pages="searchLogForm" @change="pageLogChange" />
                 <HcPages :pages="searchLogForm" @change="pageLogChange" />
             </template>
             </template>

+ 7 - 2
src/views/transfer/writing-conclusion.vue

@@ -24,9 +24,9 @@
                 <el-container id="hc_table_container" class="hc-table-container">
                 <el-container id="hc_table_container" class="hc-table-container">
                     <HcCardItem id="hc_table_data" title="抽检统计:">
                     <HcCardItem id="hc_table_data" title="抽检统计:">
                         <template #extra>
                         <template #extra>
-                            <span class="text-red">预警提示:抽检率未达到验收要求,目前至抽检了4.5%</span>
+                            <span class="text-red">{{ tips }}</span>
                         </template>
                         </template>
-                        <TableStats :contract-id="contractId" :project-id="projectId" />
+                        <TableStats :contract-id="contractId" :project-id="projectId" @changeTips="changeTips" />
                     </HcCardItem>
                     </HcCardItem>
                     <HcCardItem id="hc_table_score" title="专家验收评分表:">
                     <HcCardItem id="hc_table_score" title="专家验收评分表:">
                         <template #header>
                         <template #header>
@@ -154,6 +154,11 @@ const toBackClick = () => {
         name: 'transfer-initial-expert',
         name: 'transfer-initial-expert',
     })
     })
 }
 }
+//预警提示
+const tips = ref('预警提示:抽检率未达到验收要求,目前至抽检了4.5%')
+const changeTips = (val)=>{
+    tips.value = val
+}
 </script>
 </script>
 
 
 <style lang="scss" scoped>
 <style lang="scss" scoped>