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
}
)
</script>
<template>

View File

@ -19,21 +19,36 @@
<div class="mt-4">
<el-table :data="pager.lists" @cell-click="handleCurrentChange" row-key="id"
@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="node_name" 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="inspection_basis" show-overflow-tooltip />
<el-table-column label="参考法规" prop="reference_law" show-overflow-tooltip />
<el-table-column label="检查依据" prop="inspection_basis" 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>
</div>
<div class="flex justify-end mt-4">
<pagination v-model="pager" @change="getLists" />
</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>
</div>
<el-dialog v-model="dialogTableVisible" :title="tit" width="800">
<div v-html="htmlContent"></div>
</el-dialog>
</el-card>
</div>
</template>
@ -46,7 +61,8 @@ import { useDictData } from '@/hooks/useDictOptions'
const props = defineProps({
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 multipleSelection = ref([])
const dialogTableVisible = ref(false)
const tit = ref('')
const htmlContent = ref('')
//
const emits = defineEmits(["customEvent"]);
//
const handleCurrentChange = (value: any) => {
if (!props.node_type) return
if (props.multipleChoice) return
emits("customEvent", value);
};

View File

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

View File

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

View File

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

View File

@ -1,6 +1,7 @@
<template>
<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-row>
<el-col :span="8">
@ -59,17 +60,20 @@
</template>
</el-table-column>
<el-table-column label="检查类别" prop="check_type">
<template #default="scope">
<el-input v-model="scope.row.check_type" />
</template>
</el-table-column>
<el-table-column label="检查类容" prop="check_content">
<template #default="{ row }">
<el-input v-model="row.check_content" />
</template>
</el-table-column>
<el-table-column label="是否必检" prop="must_check">
<template #default="{ row }">
<el-select class="flex-1" v-model="row.must_check" clearable placeholder="请选择">
<el-option label="否" :value="parseInt(0)" />

View File

@ -7,8 +7,8 @@
</el-form-item>
<el-form-item label="节点类型" prop="node_type">
<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"
:value="parseInt(item.value)" />
<el-option v-for="(item, index) in dictData.check_item_node_type" :key="index"
:label="item.name" :value="parseInt(item.value)" />
</el-select>
</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_code" show-overflow-tooltip />
<el-table-column label="检查依据" prop="inspection_basis" 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-column label="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-perms="['supervision_work.supervision_check_item/edit']" type="primary" link
@click="handleEdit(row)">
@ -137,4 +140,3 @@ const handleDelete = async (id: number | any[]) => {
getLists()
</script>

View File

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

View File

@ -1,6 +1,7 @@
<template>
<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-row>
<el-col :span="8">
@ -84,20 +85,24 @@
</template>
</el-table-column>
<el-table-column label="问题分类" prop="problem_cate">
<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"
:label="item.name" :value="item.value" />
</el-select>
</template>
</el-table-column>
<el-table-column label="问题说明" prop="check_content">
<template #default="{ row }">
<el-input v-model="row.problem_description" />
</template>
</el-table-column>
<el-table-column label="问题名称" prop="problem_name">
<template #default="{ row }">
<el-input v-model="row.problem_name" />
</template>
@ -174,7 +179,7 @@ const customEvent = (e) => {
}
const customEvent1 = (e) => {
formData.check_item_id = e.id
formData.check_item_name = e.project_name
formData.check_item_name = e.node_name
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
})
}

View File

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

View File

@ -47,6 +47,7 @@
<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="操作" width="120" fixed="right">
<template #default="{ row }">
<el-button v-perms="['supervision_work.supervision_inspection/edit']" type="primary" link
@click="handleEdit(row)">
@ -130,4 +131,3 @@ const handleDelete = async (id: number | any[]) => {
getLists()
</script>

View File

@ -2,11 +2,23 @@
<div>
<el-card class="!border-none mb-4" shadow="never">
<el-form class="mb-[-16px]" :model="queryParams" inline>
<!-- <el-form-item>
<el-form-item label="编号" prop="code">
<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 @click="resetParams">重置</el-button>
</el-form-item> -->
</el-form-item>
</el-form>
</el-card>
<el-card class="!border-none" v-loading="pager.loading" shadow="never">
@ -76,7 +88,8 @@ const showEdit = ref(false)
//
const queryParams = reactive({
code: "",
inspector: "",
})
//

View File

@ -123,7 +123,7 @@
<div v-if="showDialog1">
<el-dialog v-model="showDialog1" title="选择单位工程" width="70%" :title="flag ? '检查表单' : '选择施工单位'">
<supervision_check_item @customEvent="customEvents" :project_id="formData.project_id"
:node_type="flag ? '' : 2">
:node_type="flag ? '' : 2" :multipleChoice="flag">
</supervision_check_item>
</el-dialog>
</div>
@ -378,7 +378,7 @@ const customEvent = (e) => {
const customEvents = (e) => {
if (flag.value) {
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 => {
let lists = res.lists.map(item => ({
check_type: item.check_type,
@ -390,7 +390,7 @@ const customEvents = (e) => {
})
} else {
formData.check_item_id = e.id
formData.check_item_name = e.project_name
formData.check_item_name = e.node_name
}
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 => {
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
})
// if (formData)
formData.company_id == 0 ? formData.company_id = '' : ""
formData.side_station_type = String(formData.side_station_type)
formData.side_station_result = String(formData.side_station_result)

View File

@ -1,6 +1,7 @@
<template>
<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-row>
<el-col :span="8">
@ -31,7 +32,6 @@
</el-col>
<el-col :span="8">
<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
@click="showDialog2 = true" />
</el-form-item>
@ -89,6 +89,7 @@
</template>
</el-table-column>
<el-table-column label="问题分类" prop="problem_cate">
<template #default="scope">
<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"
@ -97,12 +98,14 @@
</template>
</el-table-column>
<el-table-column label="问题说明" prop="check_content">
<template #default="{ row }">
<el-input v-model="row.problem_description" />
</template>
</el-table-column>
<el-table-column label="问题名称" prop="problem_name">
<template #default="{ row }">
<el-input v-model="row.problem_name" />
</template>
@ -194,9 +197,6 @@ const customEvent = (e) => {
formData.project_id = e.id
formData.project_name = e.project_name
showDialog.value = false
// formData.company_id = ''
// formData.company_name = ''
}
const customEvent1 = (e) => {
formData.company_id = e.id
@ -271,7 +271,7 @@ const setFormData = async (data: Record<any, any>) => {
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
})

View File

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