This commit is contained in:
zmj 2024-03-07 13:55:32 +08:00
parent 070e343c51
commit 965da74937
16 changed files with 209 additions and 123 deletions

View File

@ -47,6 +47,9 @@ watch(
immediate: true immediate: true
} }
) )
</script> </script>
<template> <template>

View File

@ -19,21 +19,36 @@
<div class="mt-4"> <div class="mt-4">
<el-table :data="pager.lists" @cell-click="handleCurrentChange" row-key="id" <el-table :data="pager.lists" @cell-click="handleCurrentChange" row-key="id"
@selection-change="handleSelectionChange"> @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" v-if="!node_type" /> <el-table-column type="selection" width="55" v-if="multipleChoice" />
<el-table-column label="项目名称" prop="project_name" show-overflow-tooltip /> <el-table-column label="项目名称" prop="project_name" show-overflow-tooltip />
<el-table-column label="节点名称" prop="node_name" show-overflow-tooltip /> <el-table-column label="节点名称" prop="node_name" show-overflow-tooltip />
<el-table-column label="节点类型" prop="node_type_text" show-overflow-tooltip /> <el-table-column label="节点类型" prop="node_type_text" show-overflow-tooltip />
<el-table-column label="节点编号" prop="node_code" show-overflow-tooltip /> <el-table-column label="节点编号" prop="node_code" show-overflow-tooltip />
<el-table-column label="检查依据" prop="inspection_basis" show-overflow-tooltip /> <el-table-column label="检查依据" prop="inspection_basis" show-overflow-tooltip>
<el-table-column label="参考法规" prop="reference_law" show-overflow-tooltip />
<template #default="{ row }">
<el-link type="primary"
@click="htmlContent = row.inspection_basis, dialogTableVisible = true, tit = '检查依据'">查看</el-link>
</template>
</el-table-column>
<el-table-column label="参考法规" prop="reference_law" show-overflow-tooltip>
<template #default="{ row }">
<el-link type="primary"
@click="htmlContent = row.reference_law, dialogTableVisible = true, tit = '参考法规'">查看</el-link>
</template>
</el-table-column>
</el-table> </el-table>
</div> </div>
<div class="flex justify-end mt-4"> <div class="flex justify-end mt-4">
<pagination v-model="pager" @change="getLists" /> <pagination v-model="pager" @change="getLists" />
</div> </div>
<div class="flex justify-end mt-4" v-if="!node_type"> <div class="flex justify-end mt-4" v-if="multipleChoice">
<el-button type="primary" @click="confirm">确定</el-button> <el-button type="primary" @click="confirm">确定</el-button>
</div> </div>
<el-dialog v-model="dialogTableVisible" :title="tit" width="800">
<div v-html="htmlContent"></div>
</el-dialog>
</el-card> </el-card>
</div> </div>
</template> </template>
@ -46,7 +61,8 @@ import { useDictData } from '@/hooks/useDictOptions'
const props = defineProps({ const props = defineProps({
project_id: Number, project_id: Number,
node_type: Number node_type: Number,
multipleChoice: Boolean
}) })
// //
// //
@ -58,13 +74,16 @@ const queryParams = reactive({
}) })
const { dictData } = useDictData('check_item_node_type') const { dictData } = useDictData('check_item_node_type')
const multipleSelection = ref([]) const multipleSelection = ref([])
const dialogTableVisible = ref(false)
const tit = ref('')
const htmlContent = ref('')
// //
const emits = defineEmits(["customEvent"]); const emits = defineEmits(["customEvent"]);
// //
const handleCurrentChange = (value: any) => { const handleCurrentChange = (value: any) => {
if (!props.node_type) return if (props.multipleChoice) return
emits("customEvent", value); emits("customEvent", value);
}; };

View File

@ -7,10 +7,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="图标宽度" prop="num"> <el-form-item label="图标宽度" prop="num">
<el-input v-model="chartWitdth" clearable type="number" @blur="" /> <el-input v-model="chartWitdth" clearable type="number" @blur="chartResize" />
</el-form-item> </el-form-item>
<el-form-item label="图标高度" prop="project"> <el-form-item label="图标高度" prop="project">
<el-input v-model="chartHeight" clearable type="number" @blur="" /> <el-input v-model="chartHeight" clearable type="number" @blur="chartResize" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -31,8 +31,8 @@ var option: any;
var myChart: any var myChart: any
const showChart = ref(true) const showChart = ref(true)
const chartWitdth = ref(800) const chartWitdth = ref(500)
const chartHeight = ref(500) const chartHeight = ref(800)
const chartType = ref(3) const chartType = ref(3)
const chartTypeList = reactive([ const chartTypeList = reactive([
{ {
@ -53,8 +53,12 @@ const chartTypeList = reactive([
}, },
]) ])
// //
let option1 = { let option1 = {
tooltip: {
trigger: 'item',
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
@ -65,9 +69,10 @@ let option1 = {
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
} }
] ],
}; };
// //
@ -111,13 +116,16 @@ let option4 = {
{ value: 20, name: 'Order' }, { value: 20, name: 'Order' },
{ value: 80, name: 'Click' }, { value: 80, name: 'Click' },
{ value: 100, name: 'Show' } { value: 100, name: 'Show' }
] ],
} }
] ]
}; };
// 线 // 线
let option2 = { let option2 = {
tooltip: {
trigger: 'item'
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
@ -128,16 +136,19 @@ let option2 = {
series: [ series: [
{ {
data: [150, 230, 224, 218, 135, 147, 260], data: [150, 230, 224, 218, 135, 147, 260],
type: 'line' type: 'line',
} }
] ]
}; };
// //
let option3 = { let option3 = {
tooltip: {
trigger: 'item'
},
legend: { legend: {
orient: 'vertical', orient: 'vertical',
left: 'left' left: 'left',
}, },
series: [ series: [
{ {
@ -157,13 +168,28 @@ let option3 = {
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
} }
} },
} }
] ]
}; };
option = option3 option = option3
const getData = async () => {
let res = await apistatisticsprojectInitiation()
// // option = option1
// // option = option2
// option = option3
initChart()
}
const initChart = () => {
myChart = echarts.init(chartDom);
myChart.setOption(option, true);
}
const changeChartType = (e: any) => { const changeChartType = (e: any) => {
switch (e) { switch (e) {
case 1: case 1:
@ -180,24 +206,13 @@ const changeChartType = (e: any) => {
break; break;
} }
initChart() initChart()
} }
const chartResize = () => {
myChart.resize()
const getData = async () => {
let res = await apistatisticsprojectInitiation()
// // option = option1
// // option = option2
// option = option3
initChart()
} }
const initChart = () => {
myChart = echarts.init(chartDom);
myChart.setOption(option);
}
onMounted(() => { onMounted(() => {
chartDom = document.getElementById('main'); chartDom = document.getElementById('main');
@ -207,6 +222,7 @@ onMounted(() => {
</script> </script>
<style> <style>
.tit { .tit {
margin: 10px 0; margin: 10px 0;
@ -214,4 +230,3 @@ onMounted(() => {
font-size: 20px; font-size: 20px;
} }
</style> </style>

View File

@ -7,10 +7,10 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="图标宽度" prop="num"> <el-form-item label="图标宽度" prop="num">
<el-input v-model="chartWitdth" clearable type="number" @blur="" /> <el-input v-model="chartWitdth" clearable type="number" @blur="chartResize" />
</el-form-item> </el-form-item>
<el-form-item label="图标高度" prop="project"> <el-form-item label="图标高度" prop="project">
<el-input v-model="chartHeight" clearable type="number" @blur="" /> <el-input v-model="chartHeight" clearable type="number" @blur="chartResize" />
</el-form-item> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
@ -31,8 +31,8 @@ var option: any;
var myChart: any var myChart: any
const showChart = ref(true) const showChart = ref(true)
const chartWitdth = ref(800) const chartWitdth = ref(500)
const chartHeight = ref(500) const chartHeight = ref(800)
const chartType = ref(3) const chartType = ref(3)
const chartTypeList = reactive([ const chartTypeList = reactive([
{ {
@ -53,8 +53,12 @@ const chartTypeList = reactive([
}, },
]) ])
// //
let option1 = { let option1 = {
tooltip: {
trigger: 'item',
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
@ -65,9 +69,10 @@ let option1 = {
series: [ series: [
{ {
data: [120, 200, 150, 80, 70, 110, 130], data: [120, 200, 150, 80, 70, 110, 130],
type: 'bar' type: 'bar',
} }
] ],
}; };
// //
@ -111,13 +116,16 @@ let option4 = {
{ value: 20, name: 'Order' }, { value: 20, name: 'Order' },
{ value: 80, name: 'Click' }, { value: 80, name: 'Click' },
{ value: 100, name: 'Show' } { value: 100, name: 'Show' }
] ],
} }
] ]
}; };
// 线 // 线
let option2 = { let option2 = {
tooltip: {
trigger: 'item'
},
xAxis: { xAxis: {
type: 'category', type: 'category',
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
@ -128,16 +136,19 @@ let option2 = {
series: [ series: [
{ {
data: [150, 230, 224, 218, 135, 147, 260], data: [150, 230, 224, 218, 135, 147, 260],
type: 'line' type: 'line',
} }
] ]
}; };
// //
let option3 = { let option3 = {
tooltip: {
trigger: 'item'
},
legend: { legend: {
orient: 'vertical', orient: 'vertical',
left: 'left' left: 'left',
}, },
series: [ series: [
{ {
@ -157,13 +168,28 @@ let option3 = {
shadowOffsetX: 0, shadowOffsetX: 0,
shadowColor: 'rgba(0, 0, 0, 0.5)' shadowColor: 'rgba(0, 0, 0, 0.5)'
} }
} },
} }
] ]
}; };
option = option3 option = option3
const getData = async () => {
let res = await apistatisticsprojectInitiation()
// // option = option1
// // option = option2
// option = option3
initChart()
}
const initChart = () => {
myChart = echarts.init(chartDom);
myChart.setOption(option, true);
}
const changeChartType = (e: any) => { const changeChartType = (e: any) => {
switch (e) { switch (e) {
case 1: case 1:
@ -180,24 +206,13 @@ const changeChartType = (e: any) => {
break; break;
} }
initChart() initChart()
} }
const chartResize = () => {
myChart.resize()
const getData = async () => {
let res = await apistatisticsprojectInitiation()
// // option = option1
// // option = option2
// option = option3
initChart()
} }
const initChart = () => {
myChart = echarts.init(chartDom);
myChart.setOption(option);
}
onMounted(() => { onMounted(() => {
chartDom = document.getElementById('main'); chartDom = document.getElementById('main');
@ -205,8 +220,8 @@ onMounted(() => {
}) })
</script> </script>
<style> <style>
.tit { .tit {
margin: 10px 0; margin: 10px 0;
@ -214,4 +229,3 @@ onMounted(() => {
font-size: 20px; font-size: 20px;
} }
</style> </style>

View File

@ -1,7 +1,7 @@
<template> <template>
<div class="edit-popup"> <div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose"> <popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules"> <el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -23,10 +23,9 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位工程" prop="check_item_id"> <el-form-item label="单位工程" prop="check_item_name">
<el-input v-model="formData.check_item_name" clearable placeholder="点击选择单位工程" readonly <el-input v-model="formData.check_item_name" clearable placeholder="点击选择单位工程" readonly
@click="showDialog1 = true, flag = false" /> @click="showDialog1 = true, flag = false" />
</el-form-item> </el-form-item>
@ -38,29 +37,26 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="验收位置" prop="accept_position"> <el-form-item label="验收位置" prop="accept_position">
<el-input v-model="formData.accept_position" clearable placeholder="请输入施工人数" type="number" /> <el-input v-model="formData.accept_position" clearable placeholder="请输入施工人数"
type="number" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="验收时间" prop="accept_time" label-width="120px"> <el-form-item label="验收时间" prop="accept_time" label-width="120px">
<el-date-picker class="flex-1 !flex" v-model="formData.accept_time" clearable type="datetime" <el-date-picker class="flex-1 !flex" v-model="formData.accept_time" clearable
value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择验收时间"> type="datetime" value-format="YYYY-MM-DD HH:mm:ss" placeholder="选择验收时间">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="施工单位" prop="company_name"> <el-form-item label="施工单位" prop="company_name">
<el-input v-model="formData.company_name" clearable placeholder="点击选择施工单位" readonly <el-input v-model="formData.company_name" clearable placeholder="点击选择施工单位" readonly
@click="showDialog2 = true" /> @click="showDialog2 = true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="验收结果" prop="accept_result"> <el-form-item label="验收结果" prop="accept_result">
<el-select v-model="formData.accept_result" clearable placeholder="请选择" class="flex-1"> <el-select v-model="formData.accept_result" clearable placeholder="请选择" class="flex-1">
@ -75,8 +71,7 @@
@click="showDialog1 = true, flag = true" /> @click="showDialog1 = true, flag = true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row>
<el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="备注" prop="remark"> <el-form-item label="备注" prop="remark">
<el-input v-model="formData.remark" clearable placeholder="请输入创建人" /> <el-input v-model="formData.remark" clearable placeholder="请输入创建人" />
@ -95,7 +90,7 @@
<div v-if="showDialog1"> <div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'"> <el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'">
<supervision_check_item @customEvent="customEvents" :project_id="formData.project_id" <supervision_check_item @customEvent="customEvents" :project_id="formData.project_id"
:node_type="flag ? '' : 2"> :node_type="flag ? '' : 2" :multipleChoice="flag">
</supervision_check_item> </supervision_check_item>
</el-dialog> </el-dialog>
</div> </div>
@ -118,21 +113,25 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查类别" prop="check_type"> <el-table-column label="检查类别" prop="check_type">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.check_type" /> <el-input v-model="scope.row.check_type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题" prop="check_problem"> <el-table-column label="问题" prop="check_problem">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.check_problem" /> <el-input v-model="scope.row.check_problem" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查类容" prop="check_content"> <el-table-column label="检查类容" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.check_content" /> <el-input v-model="row.check_content" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否必检" prop="must_check"> <el-table-column label="是否必检" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择"> <el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择">
<el-option label="否" :value="parseInt(0)" /> <el-option label="否" :value="parseInt(0)" />
@ -141,6 +140,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查结果" prop="must_check"> <el-table-column label="检查结果" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-select class="flex-1" v-model="row.check_result" clearable placeholder="请选择"> <el-select class="flex-1" v-model="row.check_result" clearable placeholder="请选择">
<el-option label="合格" :value="parseInt(0)" /> <el-option label="合格" :value="parseInt(0)" />
@ -155,12 +155,14 @@
<div style="margin-bottom: 30px;"> <div style="margin-bottom: 30px;">
<el-table :data="formData.accept_check_problem"> <el-table :data="formData.accept_check_problem">
<el-table-column label="序号" width="150px"> <el-table-column label="序号" width="150px">
<template #default="{ row }"> <template #default="{ row }">
<el-button @click="handleAdd1()">+</el-button> <el-button @click="handleAdd1()">+</el-button>
<el-button @click="handleDelete1(row)">-</el-button> <el-button @click="handleDelete1(row)">-</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题分类" prop="problem_cate"> <el-table-column label="问题分类" prop="problem_cate">
<template #default="scope"> <template #default="scope">
<el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类"> <el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类">
<el-option v-for="( item, index ) in dictData.problem_cate" :key="index" <el-option v-for="( item, index ) in dictData.problem_cate" :key="index"
@ -169,12 +171,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题说明" prop="check_content"> <el-table-column label="问题说明" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_description" /> <el-input v-model="row.problem_description" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题名称" prop="must_check"> <el-table-column label="问题名称" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_name" /> <el-input v-model="row.problem_name" />
</template> </template>
@ -420,7 +424,7 @@ const setFormData = async (data: Record<any, any>) => {
apisupervision_accept_result({ accept_id: formData.id }).then(res => { apisupervision_accept_result({ accept_id: formData.id }).then(res => {
formData.accept_check_result = res.lists formData.accept_check_result = res.lists
}) })
apisupervision_problem({ data_id: formData.id }).then(res => { apisupervision_problem({ data_id: formData.id, data_type: 3 }).then(res => {
formData.accept_check_problem = res.lists formData.accept_check_problem = res.lists
}) })
} }
@ -463,4 +467,3 @@ defineExpose({
getDetail getDetail
}) })
</script> </script>

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="edit-popup"> <div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit" @close="handleClose"> <popup ref="popupRef" :title="popupTitle" :async="true" width="60vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules"> <el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -59,17 +60,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查类别" prop="check_type"> <el-table-column label="检查类别" prop="check_type">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.check_type" /> <el-input v-model="scope.row.check_type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查类容" prop="check_content"> <el-table-column label="检查类容" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.check_content" /> <el-input v-model="row.check_content" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否必检" prop="must_check"> <el-table-column label="是否必检" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择"> <el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择">
<el-option label="否" :value="parseInt(0)" /> <el-option label="否" :value="parseInt(0)" />

View File

@ -7,8 +7,8 @@
</el-form-item> </el-form-item>
<el-form-item label="节点类型" prop="node_type"> <el-form-item label="节点类型" prop="node_type">
<el-select class="flex-1" v-model="queryParams.node_type" clearable placeholder="请选择节点类型"> <el-select class="flex-1" v-model="queryParams.node_type" clearable placeholder="请选择节点类型">
<el-option v-for="(item, index) in dictData.check_item_node_type" :key="index" :label="item.name" <el-option v-for="(item, index) in dictData.check_item_node_type" :key="index"
:value="parseInt(item.value)" /> :label="item.name" :value="parseInt(item.value)" />
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item> <el-form-item>
@ -36,18 +36,21 @@
<el-table-column label="节点类型" prop="node_type_text" show-overflow-tooltip /> <el-table-column label="节点类型" prop="node_type_text" show-overflow-tooltip />
<el-table-column label="节点编号" prop="node_code" show-overflow-tooltip /> <el-table-column label="节点编号" prop="node_code" show-overflow-tooltip />
<el-table-column label="检查依据" prop="inspection_basis" show-overflow-tooltip> <el-table-column label="检查依据" prop="inspection_basis" show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<el-link type="primary" <el-link type="primary"
@click="htmlContent = row.inspection_basis, dialogTableVisible = true, tit = '检查依据'">查看</el-link> @click="htmlContent = row.inspection_basis, dialogTableVisible = true, tit = '检查依据'">查看</el-link>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="参考法规" prop="reference_law" show-overflow-tooltip> <el-table-column label="参考法规" prop="reference_law" show-overflow-tooltip>
<template #default="{ row }"> <template #default="{ row }">
<el-link type="primary" <el-link type="primary"
@click="htmlContent = row.reference_law, dialogTableVisible = true, tit = '参考法规'">查看</el-link> @click="htmlContent = row.reference_law, dialogTableVisible = true, tit = '参考法规'">查看</el-link>
</template> </template>
</el-table-column> </el-table-column>
<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_work.supervision_check_item/edit']" type="primary" link <el-button v-perms="['supervision_work.supervision_check_item/edit']" type="primary" link
@click="handleEdit(row)"> @click="handleEdit(row)">
@ -137,4 +140,3 @@ const handleDelete = async (id: number | any[]) => {
getLists() getLists()
</script> </script>

View File

@ -101,7 +101,7 @@ const formData = reactive({
}) })
const customEvent = (e) => { const customEvent = (e) => {
formData.project_id = e.id formData.project_id = e.id
formData.project_name = e.node_name formData.project_name = e.project_name
showDialog.value = false showDialog.value = false
} }
const customEvents = (e) => { const customEvents = (e) => {

View File

@ -340,7 +340,7 @@ const setFormData = async (data: Record<any, any>) => {
apisupervision_device_entry_detail({ device_entry_id: formData.id }).then(res => { apisupervision_device_entry_detail({ device_entry_id: formData.id }).then(res => {
formData.entry_detail = res.lists formData.entry_detail = res.lists
}) })
apisupervision_problem({ data_id: formData.id }).then(res => { apisupervision_problem({ data_id: formData.id, data_type: 4 }).then(res => {
formData.entry_problem = res.lists formData.entry_problem = res.lists
}) })

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="edit-popup"> <div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose"> <popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules"> <el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -84,20 +85,24 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题分类" prop="problem_cate"> <el-table-column label="问题分类" prop="problem_cate">
<template #default="scope"> <template #default="scope">
<el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类"> <el-select class="flex-1" v-model="scope.row.problem_cate" clearable
placeholder="请输入问题分类">
<el-option v-for="( item, index ) in dictData.problem_cate" :key="index" <el-option v-for="( item, index ) in dictData.problem_cate" :key="index"
:label="item.name" :value="item.value" /> :label="item.name" :value="item.value" />
</el-select> </el-select>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题说明" prop="check_content"> <el-table-column label="问题说明" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_description" /> <el-input v-model="row.problem_description" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题名称" prop="problem_name"> <el-table-column label="问题名称" prop="problem_name">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_name" /> <el-input v-model="row.problem_name" />
</template> </template>
@ -174,7 +179,7 @@ const customEvent = (e) => {
} }
const customEvent1 = (e) => { const customEvent1 = (e) => {
formData.check_item_id = e.id formData.check_item_id = e.id
formData.check_item_name = e.project_name formData.check_item_name = e.node_name
showDialog2.value = false showDialog2.value = false
} }
@ -257,7 +262,7 @@ const setFormData = async (data: Record<any, any>) => {
} }
} }
apisupervision_problem({ data_id: formData.id }).then(res => { apisupervision_problem({ data_id: formData.id, data_type: 8 }).then(res => {
formData.problem = res.lists formData.problem = res.lists
}) })
} }

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="edit-popup"> <div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose"> <popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules"> <el-form ref="formRef" :model="formData" label-width="120px" :rules="formRules">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -16,16 +17,17 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="巡视类型" prop="inspection_type"> <el-form-item label="巡视类型" prop="inspection_type">
<el-select class="flex-1" v-model="formData.inspection_type" clearable placeholder="请输入巡视类型"> <el-select class="flex-1" v-model="formData.inspection_type" clearable
<el-option v-for="(item, index) in dictData.inspection_type" :key="index" :label="item.name" placeholder="请输入巡视类型">
:value="item.value" /> <el-option v-for="(item, index) in dictData.inspection_type" :key="index"
:label="item.name" :value="item.value" />
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位工程" prop="check_item_id"> <el-form-item label="单位工程" prop="check_item_name">
<el-input v-model="formData.check_item_name" clearable placeholder="点击选择单位工程" readonly <el-input v-model="formData.check_item_name" clearable placeholder="点击选择单位工程" readonly
@click="showDialog1 = true, flag = false" /> @click="showDialog1 = true, flag = false" />
</el-form-item> </el-form-item>
@ -95,18 +97,18 @@
</el-form-item> </el-form-item>
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="检查表单选择" prop="check_item_detail_ids"> <el-form-item label="检查表单选择" prop="check_item_detail_name">
<el-input v-model="formData.check_item_detail_name" clearable placeholder="点击选择" <el-input v-model="formData.check_item_detail_name" clearable placeholder="点击选择"
@click="showDialog1 = true, flag = true" /> @click="showDialog1 = true, flag = true" />
</el-form-item> </el-form-item>
</el-col> </el-col>
</el-row> </el-row>
<el-row> <el-row>
<el-col :span="8"> <!-- <el-col :span="8">
<el-form-item label="创建人" prop="create_user"> <el-form-item label="创建人" prop="create_user">
<el-input v-model="formData.create_user" clearable placeholder="请输入创建人" /> <el-input v-model="formData.create_user" clearable placeholder="请输入创建人" />
</el-form-item> </el-form-item>
</el-col> </el-col> -->
<el-col :span="8"> <el-col :span="8">
<el-form-item label="附件" prop="annex"> <el-form-item label="附件" prop="annex">
<annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four" <annexUpload :annex="formData.annex" @handleAvatarSuccess="handleAvatarSuccess_four"
@ -120,7 +122,7 @@
<div v-if="showDialog1"> <div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'"> <el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'">
<supervision_check_item @customEvent="customEvents" :project_id="formData.project_id" <supervision_check_item @customEvent="customEvents" :project_id="formData.project_id"
:node_type="flag ? '' : 2"> :node_type="flag ? '' : 2" :multipleChoice="flag">
</supervision_check_item> </supervision_check_item>
</el-dialog> </el-dialog>
</div> </div>
@ -143,17 +145,20 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查类别" prop="check_type"> <el-table-column label="检查类别" prop="check_type">
<template #default="scope"> <template #default="scope">
<el-input v-model="scope.row.check_type" /> <el-input v-model="scope.row.check_type" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查类容" prop="check_content"> <el-table-column label="检查类容" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.check_content" /> <el-input v-model="row.check_content" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="是否必检" prop="must_check"> <el-table-column label="是否必检" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择"> <el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择">
<el-option label="否" :value="parseInt(0)" /> <el-option label="否" :value="parseInt(0)" />
@ -162,6 +167,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="检查结果" prop="must_check"> <el-table-column label="检查结果" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-select class="flex-1" v-model="row.check_result" clearable placeholder="请选择"> <el-select class="flex-1" v-model="row.check_result" clearable placeholder="请选择">
<el-option label="合格" :value="parseInt(0)" /> <el-option label="合格" :value="parseInt(0)" />
@ -176,12 +182,14 @@
<div style="margin-bottom: 30px;"> <div style="margin-bottom: 30px;">
<el-table :data="formData.inspection_problem"> <el-table :data="formData.inspection_problem">
<el-table-column label="序号" width="150px"> <el-table-column label="序号" width="150px">
<template #default="{ row }"> <template #default="{ row }">
<el-button @click="handleAdd1()">+</el-button> <el-button @click="handleAdd1()">+</el-button>
<el-button @click="handleDelete1(row)">-</el-button> <el-button @click="handleDelete1(row)">-</el-button>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题分类" prop="problem_cate"> <el-table-column label="问题分类" prop="problem_cate">
<template #default="scope"> <template #default="scope">
<el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类"> <el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类">
<el-option v-for="( item, index ) in dictData.problem_cate" :key="index" <el-option v-for="( item, index ) in dictData.problem_cate" :key="index"
@ -190,12 +198,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题说明" prop="check_content"> <el-table-column label="问题说明" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_description" /> <el-input v-model="row.problem_description" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题名称" prop="must_check"> <el-table-column label="问题名称" prop="must_check">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_name" /> <el-input v-model="row.problem_name" />
</template> </template>
@ -343,7 +353,7 @@ const customEvent = (e) => {
const customEvents = (e) => { const customEvents = (e) => {
if (flag.value) { if (flag.value) {
formData.check_item_detail_ids = e.map(item => item.id) formData.check_item_detail_ids = e.map(item => item.id)
formData.check_item_detail_name = e.map(item => item.project_name) formData.check_item_detail_name = e.map(item => item.node_name)
apisupervision_check_item_detailLists({ node_ids: formData.check_item_detail_ids.join(',') }).then(res => { apisupervision_check_item_detailLists({ node_ids: formData.check_item_detail_ids.join(',') }).then(res => {
let lists = res.lists.map(item => ({ let lists = res.lists.map(item => ({
check_type: item.check_type, check_type: item.check_type,
@ -355,7 +365,7 @@ const customEvents = (e) => {
}) })
} else { } else {
formData.check_item_id = e.id formData.check_item_id = e.id
formData.check_item_name = e.project_name formData.check_item_name = e.node_name
} }
showDialog1.value = false showDialog1.value = false
} }
@ -461,7 +471,7 @@ const setFormData = async (data: Record<any, any>) => {
apisupervision_inspection_result({ inspection_id: formData.id }).then(res => { apisupervision_inspection_result({ inspection_id: formData.id }).then(res => {
formData.inspection_result = res.lists formData.inspection_result = res.lists
}) })
apisupervision_problem({ data_id: formData.id }).then(res => { apisupervision_problem({ data_id: formData.id, data_type: 1 }).then(res => {
formData.inspection_problem = res.lists formData.inspection_problem = res.lists
}) })
} }

View File

@ -47,6 +47,7 @@
<el-table-column label="关注人" prop="follow_user" show-overflow-tooltip /> <el-table-column label="关注人" prop="follow_user" show-overflow-tooltip />
<el-table-column label="检查表单选择" prop="check_item_detail_ids" show-overflow-tooltip /> <el-table-column label="检查表单选择" prop="check_item_detail_ids" 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_work.supervision_inspection/edit']" type="primary" link <el-button v-perms="['supervision_work.supervision_inspection/edit']" type="primary" link
@click="handleEdit(row)"> @click="handleEdit(row)">
@ -130,4 +131,3 @@ const handleDelete = async (id: number | any[]) => {
getLists() getLists()
</script> </script>

View File

@ -2,11 +2,23 @@
<div> <div>
<el-card class="!border-none mb-4" shadow="never"> <el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline> <el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="编号" prop="code">
<!-- <el-form-item> <el-input class="w-[280px]" v-model="queryParams.code" clearable placeholder="请输入编号" />
</el-form-item>
<el-form-item label="送检人" prop="check_user">
<el-input class="w-[280px]" v-model="queryParams.inspector" clearable placeholder="请输入操作人" />
</el-form-item>
<!-- <el-form-item label="检验结果" prop="check_result">
<el-select v-model="queryParams.check_result">
<el-option label="未检验" value="0"></el-option>
<el-option label="符合标准" value="1"></el-option>
<el-option label="不符合标准" value="2"></el-option>
</el-select>
</el-form-item> -->
<el-form-item>
<el-button type="primary" @click="resetPage">查询</el-button> <el-button type="primary" @click="resetPage">查询</el-button>
<el-button @click="resetParams">重置</el-button> <el-button @click="resetParams">重置</el-button>
</el-form-item> --> </el-form-item>
</el-form> </el-form>
</el-card> </el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never"> <el-card class="!border-none" v-loading="pager.loading" shadow="never">
@ -76,7 +88,8 @@ const showEdit = ref(false)
// //
const queryParams = reactive({ const queryParams = reactive({
code: "",
inspector: "",
}) })
// //

View File

@ -123,7 +123,7 @@
<div v-if="showDialog1"> <div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'"> <el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'">
<supervision_check_item @customEvent="customEvents" :project_id="formData.project_id" <supervision_check_item @customEvent="customEvents" :project_id="formData.project_id"
:node_type="flag ? '' : 2"> :node_type="flag ? '' : 2" :multipleChoice="flag">
</supervision_check_item> </supervision_check_item>
</el-dialog> </el-dialog>
</div> </div>
@ -378,7 +378,7 @@ const customEvent = (e) => {
const customEvents = (e) => { const customEvents = (e) => {
if (flag.value) { if (flag.value) {
formData.check_item_detail_ids = e.map(item => item.id) formData.check_item_detail_ids = e.map(item => item.id)
formData.check_item_detail_name = e.map(item => item.project_name) formData.check_item_detail_name = e.map(item => item.node_name)
apisupervision_check_item_detailLists({ node_ids: formData.check_item_detail_ids.join(',') }).then(res => { apisupervision_check_item_detailLists({ node_ids: formData.check_item_detail_ids.join(',') }).then(res => {
let lists = res.lists.map(item => ({ let lists = res.lists.map(item => ({
check_type: item.check_type, check_type: item.check_type,
@ -390,7 +390,7 @@ const customEvents = (e) => {
}) })
} else { } else {
formData.check_item_id = e.id formData.check_item_id = e.id
formData.check_item_name = e.project_name formData.check_item_name = e.node_name
} }
showDialog1.value = false showDialog1.value = false
} }
@ -488,10 +488,9 @@ const setFormData = async (data: Record<any, any>) => {
apisupervision_side_station_result({ side_station_id: formData.id }).then(res => { apisupervision_side_station_result({ side_station_id: formData.id }).then(res => {
formData.side_result = res.lists formData.side_result = res.lists
}) })
apisupervision_problem({ data_id: formData.id }).then(res => { apisupervision_problem({ data_id: formData.id, data_type: 2 }).then(res => {
formData.side_problem = res.lists formData.side_problem = res.lists
}) })
// if (formData)
formData.company_id == 0 ? formData.company_id = '' : "" formData.company_id == 0 ? formData.company_id = '' : ""
formData.side_station_type = String(formData.side_station_type) formData.side_station_type = String(formData.side_station_type)
formData.side_station_result = String(formData.side_station_result) formData.side_station_result = String(formData.side_station_result)

View File

@ -1,6 +1,7 @@
<template> <template>
<div class="edit-popup"> <div class="edit-popup">
<popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit" @close="handleClose"> <popup ref="popupRef" :title="popupTitle" :async="true" width="80vw" @confirm="handleSubmit"
@close="handleClose">
<el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules"> <el-form ref="formRef" :model="formData" label-width="90px" :rules="formRules">
<el-row> <el-row>
<el-col :span="8"> <el-col :span="8">
@ -31,7 +32,6 @@
</el-col> </el-col>
<el-col :span="8"> <el-col :span="8">
<el-form-item label="单位名称" prop="company_id"> <el-form-item label="单位名称" prop="company_id">
<!-- <el-input v-model="formData.company_id" clearable placeholder="请输入单位名称" /> -->
<el-input v-model="formData.company_name" clearable placeholder="点击选择采购单位" readonly <el-input v-model="formData.company_name" clearable placeholder="点击选择采购单位" readonly
@click="showDialog2 = true" /> @click="showDialog2 = true" />
</el-form-item> </el-form-item>
@ -89,6 +89,7 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题分类" prop="problem_cate"> <el-table-column label="问题分类" prop="problem_cate">
<template #default="scope"> <template #default="scope">
<el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类"> <el-select class="flex-1" v-model="scope.row.problem_cate" clearable placeholder="请输入问题分类">
<el-option v-for="( item, index ) in dictData.problem_cate" :key="index" <el-option v-for="( item, index ) in dictData.problem_cate" :key="index"
@ -97,12 +98,14 @@
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题说明" prop="check_content"> <el-table-column label="问题说明" prop="check_content">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_description" /> <el-input v-model="row.problem_description" />
</template> </template>
</el-table-column> </el-table-column>
<el-table-column label="问题名称" prop="problem_name"> <el-table-column label="问题名称" prop="problem_name">
<template #default="{ row }"> <template #default="{ row }">
<el-input v-model="row.problem_name" /> <el-input v-model="row.problem_name" />
</template> </template>
@ -194,9 +197,6 @@ const customEvent = (e) => {
formData.project_id = e.id formData.project_id = e.id
formData.project_name = e.project_name formData.project_name = e.project_name
showDialog.value = false showDialog.value = false
// formData.company_id = ''
// formData.company_name = ''
} }
const customEvent1 = (e) => { const customEvent1 = (e) => {
formData.company_id = e.id formData.company_id = e.id
@ -271,7 +271,7 @@ const setFormData = async (data: Record<any, any>) => {
formData[key] = data[key] formData[key] = data[key]
} }
} }
apisupervision_problem({ data_id: formData.id }).then(res => { apisupervision_problem({ data_id: formData.id, data_type: 6 }).then(res => {
formData.problem = res.lists formData.problem = res.lists
}) })

View File

@ -2,9 +2,6 @@
<div> <div>
<el-card class="!border-none mb-4" shadow="never"> <el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline> <el-form class="mb-[-16px]" :model="queryParams" inline>
<el-form-item label="项目id" prop="project_id">
<el-input class="w-[280px]" v-model="queryParams.project_id" clearable placeholder="请输入项目id" />
</el-form-item>
<el-form-item label="试验类型" prop="test_type"> <el-form-item label="试验类型" prop="test_type">
<el-input class="w-[280px]" v-model="queryParams.test_type" clearable placeholder="请输入试验类型" /> <el-input class="w-[280px]" v-model="queryParams.test_type" clearable placeholder="请输入试验类型" />
</el-form-item> </el-form-item>
@ -17,9 +14,11 @@
<el-form-item label="试验部位" prop="test_site"> <el-form-item label="试验部位" prop="test_site">
<el-input class="w-[280px]" v-model="queryParams.test_site" clearable placeholder="请输入试验部位" /> <el-input class="w-[280px]" v-model="queryParams.test_site" clearable placeholder="请输入试验部位" />
</el-form-item> </el-form-item>
<el-form-item label="试验结果 0-符合标准 1-不符合标准" prop="test_result"> <el-form-item label="试验结果" prop="test_result">
<el-input class="w-[280px]" v-model="queryParams.test_result" clearable <el-select v-model="queryParams.test_result">
placeholder="请输入试验结果 0-符合标准 1-不符合标准" /> <el-option label="符合标准" value="0"></el-option>
<el-option label="不符合标准" value="1"></el-option>
</el-select>
</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>
@ -53,13 +52,14 @@
<el-table-column label="试验结果" prop="test_result_text" show-overflow-tooltip /> <el-table-column label="试验结果" prop="test_result_text" show-overflow-tooltip />
<el-table-column label="备注" prop="remark" show-overflow-tooltip /> <el-table-column label="备注" prop="remark" 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_work.supervision_test_blocks_specimens/edit']" type="primary" <el-button v-perms="['supervision_work.supervision_test_blocks_specimens/edit']"
link @click="handleEdit(row)"> type="primary" link @click="handleEdit(row)">
编辑 编辑
</el-button> </el-button>
<el-button v-perms="['supervision_work.supervision_test_blocks_specimens/delete']" type="danger" <el-button v-perms="['supervision_work.supervision_test_blocks_specimens/delete']"
link @click="handleDelete(row.id)"> type="danger" link @click="handleDelete(row.id)">
删除 删除
</el-button> </el-button>
</template> </template>
@ -138,4 +138,3 @@ const handleDelete = async (id: number | any[]) => {
getLists() getLists()
</script> </script>