add
This commit is contained in:
parent
eaa590066a
commit
64c8269476
@ -1,8 +1,8 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="detail-popup">
|
<div class="detail-popup">
|
||||||
<popup ref="popupRef" :async="true" width="80%" @close="handleClose" :showFootBtn="false">
|
<popup ref="popupRef" :async="true" :width="width" @close="handleClose" :showFootBtn="false">
|
||||||
<el-form ref="formRef" :model="formData" label-width="100px">
|
<el-form ref="formRef" :model="formData" label-width="100px">
|
||||||
<el-descriptions :column="3" :title="detailConfig?.title || '详情'" border>
|
<el-descriptions :column="column" :title="detailConfig?.title || '详情'" border>
|
||||||
<el-descriptions-item :label="item.label" label-align="left" align="left"
|
<el-descriptions-item :label="item.label" label-align="left" align="left"
|
||||||
v-for="(item, index) in detailConfig?.config.filter(item => !item.column)" :key="index">
|
v-for="(item, index) in detailConfig?.config.filter(item => !item.column)" :key="index">
|
||||||
{{ formData[item.value] }}
|
{{ formData[item.value] }}
|
||||||
@ -23,11 +23,11 @@
|
|||||||
</el-descriptions-item>
|
</el-descriptions-item>
|
||||||
</el-descriptions>
|
</el-descriptions>
|
||||||
</el-form>
|
</el-form>
|
||||||
<el-card class="mt-5">
|
<el-card class="mt-5" v-if="detailConfig?.table">
|
||||||
<template #header>
|
<template #header>
|
||||||
{{ detailConfig.table.title }}列表
|
{{ detailConfig.table.title }}列表
|
||||||
</template>
|
</template>
|
||||||
<el-table :data="tableLists" v-if="detailConfig?.table">
|
<el-table :data="tableLists">
|
||||||
<el-table-column :label="item.label" :prop="item.value" show-overflow-tooltip
|
<el-table-column :label="item.label" :prop="item.value" show-overflow-tooltip
|
||||||
v-for="(item, index) in detailConfig.table.tableConfig" :key="index" />
|
v-for="(item, index) in detailConfig.table.tableConfig" :key="index" />
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -46,6 +46,15 @@ const props = defineProps({
|
|||||||
detailConfig: {
|
detailConfig: {
|
||||||
type: Object,
|
type: Object,
|
||||||
require: true
|
require: true
|
||||||
|
},
|
||||||
|
column: {
|
||||||
|
type: Number,
|
||||||
|
default: 3
|
||||||
|
},
|
||||||
|
width: {
|
||||||
|
type: String,
|
||||||
|
default: '80vw'
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
})
|
})
|
||||||
|
@ -67,7 +67,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" />
|
<detailPage v-if="showDetail" ref="detailRef" @close="showEdit = false" :detailConfig="detailConfig"
|
||||||
|
:column="2" />
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules" :disabled="mode == 'detail'">
|
||||||
<el-form-item label="项目名称" prop="project_id">
|
<el-form-item label="项目名称" prop="project_id">
|
||||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||||
@click="showDialog = true" />
|
@click="showDialog = true" />
|
||||||
@ -48,7 +48,7 @@ const showDialog = ref(false)
|
|||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '工程监理--第一次工地会议'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
|
@ -53,6 +53,10 @@
|
|||||||
type="danger" link @click="handleDelete(row.id)">
|
type="danger" link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_const_prepare.supervision_commencement_report/detail']"
|
||||||
|
type="primary" link @click="handleEdit(row, 'detail')">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -109,10 +113,10 @@ const handleAdd = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any, mode = 'add') => {
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open(mode)
|
||||||
editRef.value?.setFormData(data)
|
editRef.value?.setFormData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules" :disabled="mode == 'detail'">
|
||||||
<el-form-item label="项目名称" prop="project_id">
|
<el-form-item label="项目名称" prop="project_id">
|
||||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||||
@click="showDialog = true" />
|
@click="showDialog = true" />
|
||||||
@ -123,6 +123,7 @@ const handleSubmit = async () => {
|
|||||||
//打开弹窗
|
//打开弹窗
|
||||||
const open = (type = 'add') => {
|
const open = (type = 'add') => {
|
||||||
mode.value = type
|
mode.value = type
|
||||||
|
console.log(mode.value, "value")
|
||||||
popupRef.value?.open()
|
popupRef.value?.open()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -40,6 +40,10 @@
|
|||||||
type="danger" link @click="handleDelete(row.id)">
|
type="danger" link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_prepare.supervision_contract_disclosure/detail']"
|
||||||
|
type="primary" link @click="handleEdit(row, 'detail')">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -96,11 +100,11 @@ const handleAdd = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any, mode = 'edit') => {
|
||||||
let res = await apiSupervisionContractDisclosureDetail({ id: data.id })
|
let res = await apiSupervisionContractDisclosureDetail({ id: data.id })
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open(mode)
|
||||||
editRef.value?.setFormData(res)
|
editRef.value?.setFormData(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -111,5 +115,8 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
53
src/views/supervision_monitoring_equipment/detail.js
Normal file
53
src/views/supervision_monitoring_equipment/detail.js
Normal file
@ -0,0 +1,53 @@
|
|||||||
|
import { apiSupervisionMonitoringEquipmentDetailLists } from '@/api/supervision_monitoring_equipment_detail'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const detailConfig = {
|
||||||
|
title: "工程监理--监控设备信息",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "监控设备名称",
|
||||||
|
value: "device_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "设备类型",
|
||||||
|
value: "device_type"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "设备序列号",
|
||||||
|
value: "device_sn"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "编号",
|
||||||
|
value: "number"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
table: {
|
||||||
|
title: "设备",
|
||||||
|
tableConfig: [
|
||||||
|
{
|
||||||
|
label: "设备名称",
|
||||||
|
value: 'name',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否显示",
|
||||||
|
value: 'is_show'
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
query: 'device_id',
|
||||||
|
fetchFun: apiSupervisionMonitoringEquipmentDetailLists,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -72,6 +72,10 @@
|
|||||||
type="danger" link @click="handleDelete(row.id)">
|
type="danger" link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_project.supervision_monitoring_equipment/detail']"
|
||||||
|
type="danger" link @click="handleDetail(row.id)">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -81,20 +85,25 @@
|
|||||||
</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"
|
||||||
|
width="60vw" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script lang="ts" setup name="supervisionMonitoringEquipmentLists">
|
<script lang="ts" setup name="supervisionMonitoringEquipmentLists">
|
||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionMonitoringEquipmentLists, apiSupervisionMonitoringEquipmentDelete } from '@/api/supervision_monitoring_equipment'
|
import { apiSupervisionMonitoringEquipmentLists, apiSupervisionMonitoringEquipmentDelete, apiSupervisionMonitoringEquipmentDetail } from '@/api/supervision_monitoring_equipment'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
import detailConfig from './detail'
|
||||||
|
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
@ -145,5 +154,13 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
const handleDetail = async (id: any) => {
|
||||||
|
let res = await apiSupervisionMonitoringEquipmentDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value?.open()
|
||||||
|
detailRef.value?.setFormData(res)
|
||||||
|
}
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
69
src/views/supervision_participating_units/detail.js
Normal file
69
src/views/supervision_participating_units/detail.js
Normal file
@ -0,0 +1,69 @@
|
|||||||
|
import {
|
||||||
|
apiSupervisionParticipatingUnitsContactsLists,
|
||||||
|
} from "@/api/supervision_participating_units_contacts";
|
||||||
|
|
||||||
|
|
||||||
|
const detailConfig = {
|
||||||
|
title: "工程监理--参建单位",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "单位名称",
|
||||||
|
value: "unit_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "单位类别",
|
||||||
|
value: "unit_type"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "资质等级",
|
||||||
|
value: "qualification_grade"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "联系电话",
|
||||||
|
value: "telephone"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "责任范围",
|
||||||
|
value: "duty"
|
||||||
|
},
|
||||||
|
],
|
||||||
|
table: {
|
||||||
|
title: "联系人",
|
||||||
|
tableConfig: [
|
||||||
|
{
|
||||||
|
label: "姓名",
|
||||||
|
value: 'name',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "职务",
|
||||||
|
value: 'duties'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "办公电话",
|
||||||
|
value: 'telephone',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "手机号码",
|
||||||
|
value: 'mobile',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "电子邮箱",
|
||||||
|
value: 'email',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "传真",
|
||||||
|
value: 'fax',
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
query: 'unit_id',
|
||||||
|
fetchFun: apiSupervisionParticipatingUnitsContactsLists,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -12,7 +12,8 @@
|
|||||||
<el-input class="w-[280px]" v-model="queryParams.unit_name" clearable placeholder="请输入单位名称" />
|
<el-input class="w-[280px]" v-model="queryParams.unit_name" clearable placeholder="请输入单位名称" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="资质等级" prop="qualification_grade">
|
<el-form-item label="资质等级" prop="qualification_grade">
|
||||||
<el-input class="w-[280px]" v-model="queryParams.qualification_grade" clearable placeholder="请输入资质等级" />
|
<el-input class="w-[280px]" v-model="queryParams.qualification_grade" clearable
|
||||||
|
placeholder="请输入资质等级" />
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
<el-button type="primary" @click="resetPage">查询</el-button>
|
<el-button type="primary" @click="resetPage">查询</el-button>
|
||||||
@ -43,14 +44,18 @@
|
|||||||
<el-table-column label="责任范围" prop="duty" show-overflow-tooltip />
|
<el-table-column label="责任范围" prop="duty" show-overflow-tooltip />
|
||||||
<el-table-column label="操作" width="120" fixed="right">
|
<el-table-column label="操作" width="120" fixed="right">
|
||||||
<template #default="{ row }">
|
<template #default="{ row }">
|
||||||
<el-button v-perms="['supervision_project.supervision_participating_units/edit']" type="primary"
|
<el-button v-perms="['supervision_project.supervision_participating_units/edit']"
|
||||||
link @click="handleEdit(row)">
|
type="primary" link @click="handleEdit(row)">
|
||||||
编辑
|
编辑
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button v-perms="['supervision_project.supervision_participating_units/delete']"
|
<el-button v-perms="['supervision_project.supervision_participating_units/delete']"
|
||||||
type="danger" link @click="handleDelete(row.id)">
|
type="danger" link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_project.supervision_participating_units/detail']"
|
||||||
|
type="danger" link @click="handleDetail(row.id)">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -60,6 +65,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" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -67,13 +74,15 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionParticipatingUnitsLists, apiSupervisionParticipatingUnitsDelete, apiSupervisionParticipatingUnitsDetail } from '@/api/supervision_participating_units'
|
import { apiSupervisionParticipatingUnitsLists, apiSupervisionParticipatingUnitsDelete, apiSupervisionParticipatingUnitsDetail } from '@/api/supervision_participating_units'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
import detailConfig from './detail'
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
@ -124,7 +133,14 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
const handleDetail = async (id: any) => {
|
||||||
|
let res = await apiSupervisionParticipatingUnitsDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value?.open()
|
||||||
|
detailRef.value?.setFormData(res)
|
||||||
|
}
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
66
src/views/supervision_planning/detail.js
Normal file
66
src/views/supervision_planning/detail.js
Normal file
@ -0,0 +1,66 @@
|
|||||||
|
import { apiSupervisionMonitoringEquipmentDetailLists } from '@/api/supervision_monitoring_equipment_detail'
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
const detailConfig = {
|
||||||
|
title: "工程监理--监理规划",
|
||||||
|
config: [
|
||||||
|
{
|
||||||
|
label: "项目名称",
|
||||||
|
value: "project_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "专项审批类型",
|
||||||
|
value: "approval_type"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "评审人员",
|
||||||
|
value: "approval_user"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "方案名称",
|
||||||
|
value: "scheme_name"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "创建人",
|
||||||
|
value: "create_user"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "创建时间",
|
||||||
|
value: "create_time"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "评审内容",
|
||||||
|
value: "approval_content"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "备注",
|
||||||
|
value: "remark",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "附件",
|
||||||
|
value: "annex",
|
||||||
|
column: 1
|
||||||
|
},
|
||||||
|
],
|
||||||
|
table: {
|
||||||
|
title: "设备",
|
||||||
|
tableConfig: [
|
||||||
|
{
|
||||||
|
label: "设备名称",
|
||||||
|
value: 'name',
|
||||||
|
|
||||||
|
},
|
||||||
|
{
|
||||||
|
label: "是否显示",
|
||||||
|
value: 'is_show_text'
|
||||||
|
},
|
||||||
|
|
||||||
|
],
|
||||||
|
query: 'device_id',
|
||||||
|
fetchFun: apiSupervisionMonitoringEquipmentDetailLists,
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
export default detailConfig;
|
@ -58,15 +58,6 @@ const popupRef = shallowRef<InstanceType<typeof Popup>>()
|
|||||||
const mode = ref('add')
|
const mode = ref('add')
|
||||||
const showDialog = ref(false)
|
const showDialog = ref(false)
|
||||||
|
|
||||||
|
|
||||||
const handleAvatarSuccess_four = (response: any) => {
|
|
||||||
// @ts-ignore
|
|
||||||
response.code != 0 ? formData.annex.push({ uri: response.data.uri, name: response.data.name }) : ElMessage.error(response.msg);
|
|
||||||
};
|
|
||||||
|
|
||||||
// 删除上传的文件
|
|
||||||
const delFileFn = (index: number) => { formData.annex.splice(index, 1) }
|
|
||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑工程监理--监理规划' : '新增工程监理--监理规划'
|
return mode.value == 'edit' ? '编辑工程监理--监理规划' : '新增工程监理--监理规划'
|
||||||
|
@ -71,6 +71,10 @@
|
|||||||
@click="handleDelete(row.id)">
|
@click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_prepare.supervision_planning/detail']" type="primary" link
|
||||||
|
@click="handleDetail(row.id)">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -80,6 +84,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"
|
||||||
|
width="60vw" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
@ -87,13 +93,16 @@
|
|||||||
import { usePaging } from '@/hooks/usePaging'
|
import { usePaging } from '@/hooks/usePaging'
|
||||||
import { useDictData } from '@/hooks/useDictOptions'
|
import { useDictData } from '@/hooks/useDictOptions'
|
||||||
import { apiSupervisionPlanningLists, apiSupervisionPlanningDelete, apiSupervisionPlanningDetail } from '@/api/supervision_planning'
|
import { apiSupervisionPlanningLists, apiSupervisionPlanningDelete, apiSupervisionPlanningDetail } from '@/api/supervision_planning'
|
||||||
import { timeFormat } from '@/utils/util'
|
|
||||||
import feedback from '@/utils/feedback'
|
import feedback from '@/utils/feedback'
|
||||||
import EditPopup from './edit.vue'
|
import EditPopup from './edit.vue'
|
||||||
|
import detailConfig from './detail'
|
||||||
|
|
||||||
|
|
||||||
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
const editRef = shallowRef<InstanceType<typeof EditPopup>>()
|
||||||
|
const detailRef = ref('')
|
||||||
// 是否显示编辑框
|
// 是否显示编辑框
|
||||||
const showEdit = ref(false)
|
const showEdit = ref(false)
|
||||||
|
const showDetail = ref(false)
|
||||||
|
|
||||||
|
|
||||||
// 查询条件
|
// 查询条件
|
||||||
@ -145,5 +154,15 @@ const handleDelete = async (id: number | any[]) => {
|
|||||||
getLists()
|
getLists()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 详情
|
||||||
|
const handleDetail = async (id: any) => {
|
||||||
|
let res = await apiSupervisionPlanningDetail({ id })
|
||||||
|
showDetail.value = true
|
||||||
|
await nextTick()
|
||||||
|
detailRef.value?.open()
|
||||||
|
detailRef.value?.setFormData(res)
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
getLists()
|
getLists()
|
||||||
</script>
|
</script>
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules" :disabled="mode == 'detail'">
|
||||||
<el-form-item label="项目名称" prop="project_id">
|
<el-form-item label="项目名称" prop="project_id">
|
||||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||||
@click="showDialog = true" />
|
@click="showDialog = true" />
|
||||||
@ -49,7 +49,7 @@ const showDialog = ref(false)
|
|||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '工程监理--第一次工地会议'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
|
@ -51,6 +51,10 @@
|
|||||||
link @click="handleDelete(row.id)">
|
link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_const_prepare.supervision_rules/detail']" type="primary"
|
||||||
|
link @click="handleEdit(row, 'detail')">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -107,10 +111,10 @@ const handleAdd = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any, mode = 'add') => {
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open(mode)
|
||||||
editRef.value?.setFormData(data)
|
editRef.value?.setFormData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<div class="edit-popup">
|
<div class="edit-popup">
|
||||||
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
<popup ref="popupRef" :title="popupTitle" :async="true" width="550px" @confirm="handleSubmit"
|
||||||
@close="handleClose">
|
@close="handleClose">
|
||||||
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
|
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules" :disabled="mode == 'detail'">
|
||||||
<el-form-item label="项目名称" prop="project_name">
|
<el-form-item label="项目名称" prop="project_name">
|
||||||
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
<el-input v-model="formData.project_name" clearable placeholder="点击选择项目" readonly
|
||||||
@click="showDialog = true" />
|
@click="showDialog = true" />
|
||||||
@ -49,7 +49,7 @@ const showDialog = ref(false)
|
|||||||
|
|
||||||
// 弹窗标题
|
// 弹窗标题
|
||||||
const popupTitle = computed(() => {
|
const popupTitle = computed(() => {
|
||||||
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '新增工程监理--第一次工地会议'
|
return mode.value == 'edit' ? '编辑工程监理--第一次工地会议' : '工程监理--第一次工地会议'
|
||||||
})
|
})
|
||||||
|
|
||||||
// 表单数据
|
// 表单数据
|
||||||
|
@ -53,6 +53,10 @@
|
|||||||
type="danger" link @click="handleDelete(row.id)">
|
type="danger" link @click="handleDelete(row.id)">
|
||||||
删除
|
删除
|
||||||
</el-button>
|
</el-button>
|
||||||
|
<el-button v-perms="['supervision_const_prepare.supervision_rules_disclosure/detail']"
|
||||||
|
type="primary" link @click="handleEdit(row, 'detail')">
|
||||||
|
详情
|
||||||
|
</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
@ -109,10 +113,10 @@ const handleAdd = async () => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 编辑
|
// 编辑
|
||||||
const handleEdit = async (data: any) => {
|
const handleEdit = async (data: any, mode = 'detail') => {
|
||||||
showEdit.value = true
|
showEdit.value = true
|
||||||
await nextTick()
|
await nextTick()
|
||||||
editRef.value?.open('edit')
|
editRef.value?.open(mode)
|
||||||
editRef.value?.setFormData(data)
|
editRef.value?.setFormData(data)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user