add
This commit is contained in:
parent
c352b14f64
commit
c7d91dc682
@ -24,15 +24,28 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-card class="mt-5" v-if="detailConfig?.table">
|
<div v-if="detailConfig?.table">
|
||||||
<template #header>
|
<el-card class="mt-5" v-if="!Array.isArray(detailConfig?.table)">
|
||||||
{{ detailConfig.table.title }}列表
|
<template #header>
|
||||||
</template>
|
{{ detailConfig.table.title }}列表
|
||||||
<el-table :data="tableLists">
|
</template>
|
||||||
<el-table-column :label="item.label" :prop="item.value" show-overflow-tooltip
|
<el-table :data="tableLists">
|
||||||
v-for="(item, index) in detailConfig.table.tableConfig" :key="index" />
|
<el-table-column :label="item.label" :prop="item.value" show-overflow-tooltip
|
||||||
</el-table>
|
v-for="(item, index) in detailConfig.table.tableConfig" :key="index" />
|
||||||
</el-card>
|
</el-table>
|
||||||
|
</el-card>
|
||||||
|
<el-card class="mt-5" v-else>
|
||||||
|
<!-- <template #header>
|
||||||
|
{{ detailConfig.table.title }}列表
|
||||||
|
</template>
|
||||||
|
<el-table :data="tableLists">
|
||||||
|
<el-table-column :label="item.label" :prop="item.value" show-overflow-tooltip
|
||||||
|
v-for="(item, index) in detailConfig.table.tableConfig" :key="index" />
|
||||||
|
</el-table> -->
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</popup>
|
</popup>
|
||||||
</div>
|
</div>
|
||||||
@ -42,7 +55,7 @@
|
|||||||
|
|
||||||
import Popup from '@/components/popup/index.vue'
|
import Popup from '@/components/popup/index.vue'
|
||||||
import { defineProps, ref, defineExpose } from "vue"
|
import { defineProps, ref, defineExpose } from "vue"
|
||||||
|
import { cloneDeep } from 'lodash-es'
|
||||||
const props = defineProps({
|
const props = defineProps({
|
||||||
detailConfig: {
|
detailConfig: {
|
||||||
type: Object,
|
type: Object,
|
||||||
@ -71,9 +84,17 @@ const formData = ref({})
|
|||||||
// 获取详情
|
// 获取详情
|
||||||
const setFormData = async (data: Record<any, any>) => {
|
const setFormData = async (data: Record<any, any>) => {
|
||||||
formData.value = data
|
formData.value = data
|
||||||
|
|
||||||
if (props.detailConfig?.table) {
|
if (props.detailConfig?.table) {
|
||||||
let res = await props.detailConfig.table.fetchFun({ [props.detailConfig.table.query]: formData.value.id })
|
let query = cloneDeep(props.detailConfig.table.query)
|
||||||
|
if (typeof (props.detailConfig.table.query) === 'object') {
|
||||||
|
for (let key in query) {
|
||||||
|
query[key] ||= data.id
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
query = { [query]: data.id }
|
||||||
|
}
|
||||||
|
|
||||||
|
let res = await props.detailConfig.table.fetchFun({ ...query })
|
||||||
tableLists.value = res.lists
|
tableLists.value = res.lists
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -89,6 +110,7 @@ const open = () => {
|
|||||||
// 关闭回调
|
// 关闭回调
|
||||||
const handleClose = () => {
|
const handleClose = () => {
|
||||||
emit('close')
|
emit('close')
|
||||||
|
console.log("gianni1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -14,7 +14,7 @@ const detailConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "单位类别",
|
label: "单位类别",
|
||||||
value: "type"
|
value: "type_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "资质等级",
|
label: "资质等级",
|
||||||
|
@ -54,7 +54,7 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['manage_basic.manage_project/detail']" type="danger" link
|
<el-button v-perms="['manage_basic.manage_project/detail']" link
|
||||||
@click="handleDetail(row.id)">
|
@click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -7,11 +7,11 @@ const detailConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "性质",
|
label: "性质",
|
||||||
value: "nature"
|
value: "nature_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "行业",
|
label: "行业",
|
||||||
value: "industry"
|
value: "industry_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "建设单位",
|
label: "建设单位",
|
||||||
@ -19,7 +19,7 @@ const detailConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "建设区域",
|
label: "建设区域",
|
||||||
value: "build_area"
|
value: "build_area_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "项目地址",
|
label: "项目地址",
|
||||||
@ -27,7 +27,7 @@ const detailConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "项目级别",
|
label: "项目级别",
|
||||||
value: "project_level"
|
value: "project_level_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "总投资(万元)",
|
label: "总投资(万元)",
|
||||||
@ -35,7 +35,7 @@ const detailConfig = {
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "工程状态",
|
label: "工程状态",
|
||||||
value: "engineering_status"
|
value: "engineering_status_text"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
label: "合同服务内容",
|
label: "合同服务内容",
|
||||||
|
@ -101,7 +101,7 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['manage_basic.manage_project/detail']" type="danger" link
|
<el-button v-perms="['manage_basic.manage_project/detail']" link
|
||||||
@click="handleDetail(row.id)">
|
@click="handleDetail(row.id)">
|
||||||
详情
|
详情
|
||||||
</el-button>
|
</el-button>
|
||||||
|
@ -112,10 +112,7 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionAcceptLists, apiSupervisionAcceptDelete, apiSupervisionAcceptDetail, apisupervision_accept } from '@/api/supervision_accept'
|
import { apiSupervisionAcceptLists, apiSupervisionAcceptDelete, apiSupervisionAcceptDetail, apisupervision_accept } from '@/api/supervision_accept'
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
|
@ -64,12 +64,8 @@
|
|||||||
<script lang="ts" setup name="supervisionCommencementReportLists">
|
<script lang="ts" setup name="supervisionCommencementReportLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
<<<<<<< HEAD
|
|
||||||
import { apiSupervisionCommencementReportLists, apiSupervisionCommencementReportDelete, apiSupervisionCommencementReportDetail } from '@/api/supervision_commencement_report'
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
import { apiSupervisionCommencementReportLists, apiSupervisionCommencementReportDelete } from '@/api/supervision_commencement_report'
|
import { apiSupervisionCommencementReportLists, apiSupervisionCommencementReportDelete } from '@/api/supervision_commencement_report'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import detailConfig from './detail'
|
import detailConfig from './detail'
|
||||||
|
@ -66,10 +66,7 @@ import { usePaging } from '@/hooks/usePaging'
|
|||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
import { apiSupervisionDesignDisclosureLists, apiSupervisionDesignDisclosureDelete, apiSupervisionDesignDisclosureDetail } from '@/api/supervision_design_disclosure'
|
import { apiSupervisionDesignDisclosureLists, apiSupervisionDesignDisclosureDelete, apiSupervisionDesignDisclosureDetail } from '@/api/supervision_design_disclosure'
|
||||||
<<<<<<< HEAD
|
|
||||||
import detailConfig from './detail'
|
import detailConfig from './detail'
|
||||||
=======
|
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
|
||||||
|
@ -81,10 +81,7 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionInspectionLists, apiSupervisionInspectionDelete, apiSupervisionInspectionDetail } from '@/api/supervision_inspection'
|
import { apiSupervisionInspectionLists, apiSupervisionInspectionDelete, apiSupervisionInspectionDetail } from '@/api/supervision_inspection'
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
|
@ -105,12 +105,8 @@
|
|||||||
<script lang="ts" setup name="supervisionMaterialEquipmentInfoLists">
|
<script lang="ts" setup name="supervisionMaterialEquipmentInfoLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
<<<<<<< HEAD
|
|
||||||
import { apiSupervisionMaterialEquipmentInfoLists, apiSupervisionMaterialEquipmentInfoDelete, apiSupervisionMaterialEquipmentInfoDetail } from '@/api/supervision_material_equipment_info'
|
|
||||||
=======
|
|
||||||
import { apiSupervisionMaterialEquipmentInfoLists, apiSupervisionMaterialEquipmentInfoDelete } from '@/api/supervision_material_equipment_info'
|
import { apiSupervisionMaterialEquipmentInfoLists, apiSupervisionMaterialEquipmentInfoDelete } from '@/api/supervision_material_equipment_info'
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import detailConfig from './detail'
|
import detailConfig from './detail'
|
||||||
|
@ -44,23 +44,6 @@ const detailConfig = {
|
|||||||
column: 1
|
column: 1
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
table: {
|
|
||||||
title: "设备",
|
|
||||||
tableConfig: [
|
|
||||||
{
|
|
||||||
label: "设备名称",
|
|
||||||
value: 'name',
|
|
||||||
|
|
||||||
},
|
|
||||||
{
|
|
||||||
label: "是否显示",
|
|
||||||
value: 'is_show_text'
|
|
||||||
},
|
|
||||||
|
|
||||||
],
|
|
||||||
query: 'device_id',
|
|
||||||
fetchFun: apiSupervisionMonitoringEquipmentDetailLists,
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
export default detailConfig;
|
export default detailConfig;
|
@ -87,8 +87,8 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" :column="2"
|
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig"
|
||||||
width="60vw" />
|
:column="2" width="60vw" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
|
@ -63,13 +63,8 @@
|
|||||||
<script lang="ts" setup name="supervisionRulesLists">
|
<script lang="ts" setup name="supervisionRulesLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
<<<<<<< HEAD
|
|
||||||
import { apiSupervisionRulesLists, apiSupervisionRulesDelete, apiSupervisionRulesDetail } from '@/api/supervision_rules'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
import { apiSupervisionRulesLists, apiSupervisionRulesDelete } from '@/api/supervision_rules'
|
import { apiSupervisionRulesLists, apiSupervisionRulesDelete } from '@/api/supervision_rules'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import detailConfig from './detail'
|
import detailConfig from './detail'
|
||||||
|
@ -64,13 +64,8 @@
|
|||||||
<script lang="ts" setup name="supervisionRulesDisclosureLists">
|
<script lang="ts" setup name="supervisionRulesDisclosureLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
<<<<<<< HEAD
|
|
||||||
import { apiSupervisionRulesDisclosureLists, apiSupervisionRulesDisclosureDelete, apiSupervisionRulesDisclosureDetail } from '@/api/supervision_rules_disclosure'
|
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
import { apiSupervisionRulesDisclosureLists, apiSupervisionRulesDisclosureDelete } from '@/api/supervision_rules_disclosure'
|
import { apiSupervisionRulesDisclosureLists, apiSupervisionRulesDisclosureDelete } from '@/api/supervision_rules_disclosure'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import detailConfig from './detail'
|
import detailConfig from './detail'
|
||||||
|
@ -80,10 +80,7 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionSideStationLists, apiSupervisionSideStationDelete, apiSupervisionSideStationDetail } from '@/api/supervision_side_station'
|
import { apiSupervisionSideStationLists, apiSupervisionSideStationDelete, apiSupervisionSideStationDetail } from '@/api/supervision_side_station'
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import DetailPopup from './detail.vue'
|
import DetailPopup from './detail.vue'
|
||||||
|
@ -79,7 +79,7 @@ const detailConfig = {
|
|||||||
|
|
||||||
],
|
],
|
||||||
fetchFun: apisupervision_problem,
|
fetchFun: apisupervision_problem,
|
||||||
query: 'data_id'
|
query: { 'data_id': '', data_type: 6 }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -95,14 +95,14 @@
|
|||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
<edit-popup v-if="showEdit" ref="editRef" :dict-data="dictData" @success="getLists" @close="showEdit = false" />
|
||||||
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showDetail = false" :detailConfig="detailConfig" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="supervisionTestBlocksSpecimensLists">
|
<script lang="ts" setup name="supervisionTestBlocksSpecimensLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionTestBlocksSpecimensLists, apiSupervisionTestBlocksSpecimensDelete } from '@/api/supervision_test_blocks_specimens'
|
import { apiSupervisionTestBlocksSpecimensLists, apiSupervisionTestBlocksSpecimensDelete, apiSupervisionTestBlocksSpecimensDetail } from '@/api/supervision_test_blocks_specimens'
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
@ -97,11 +97,8 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionWitnessSamplingLists, apiSupervisionWitnessSamplingDelete, apiSupervisionWitnessSamplingDetail } from '@/api/supervision_witness_sampling'
|
import { apiSupervisionWitnessSamplingLists, apiSupervisionWitnessSamplingDelete, apiSupervisionWitnessSamplingDetail } from '@/api/supervision_witness_sampling'
|
||||||
<<<<<<< HEAD
|
|
||||||
=======
|
|
||||||
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
import { apiSupervisionProjectSearch } from '@/api/supervision_project'
|
||||||
import { apiSupervisionMaterialEntrySearch } from '@/api/supervision_material_entry'
|
import { apiSupervisionMaterialEntrySearch } from '@/api/supervision_material_entry'
|
||||||
>>>>>>> 346a5866d2c73a11f9e463e241a4b2183785356f
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
import { useRouter } from 'vue-router'
|
import { useRouter } from 'vue-router'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user