提交 6e229ea7 authored 作者: 张耀丹's avatar 张耀丹

不是一住两公,传递dcjdPsfs

上级 f6ebdab7
......@@ -10,6 +10,7 @@ enum Api {
zjzmb = '/dklc/zjzmb', // 专家组模板
chrymb = '/dklc/chrymb', // 参会人员模板
scchry = '/dklc/scchry', // 上传 专家组-参会人员
getZjyjHis = '/dklc/getZjyjHis', // 读取评审信息历史
}
export const getZjyj = (params) => {
return defHttp.get({ url: Api.getZjyj, params });
......@@ -40,3 +41,9 @@ export const getChrymbtUrl = Api.chrymb;
* 导入api
*/
export const getScchryUrl = Api.scchry;
/**
* 读取评审信息历史
*/
export const getZjyjHis = (params) => {
return defHttp.get({ url: Api.getZjyjHis, params });
};
......@@ -17,7 +17,7 @@
<div v-for="(tip, index) in tipArr" :key="index">{{ tip }}</div>
</div>
</a-upload>
<a-button v-if="fileList.length && isUploading === false" class="ml-2" @click="toBatchDownload">下载</a-button>
<a-button v-if="fileList.length && isUploading === false && showDownloadBtn" class="ml-2" @click="toBatchDownload" type="primary">下载</a-button>
</div>
</template>
......@@ -65,6 +65,8 @@ const props = defineProps({
mover: propTypes.bool.def(true),
// 是否显示下载按钮
download: propTypes.bool.def(true),
// 是否显示下载按钮
showDownloadBtn: propTypes.bool.def(true),
// 删除时是否显示确认框
removeConfirm: propTypes.bool.def(false),
beforeUpload: propTypes.func,
......
<template>
<a-table :columns="histroycolumns" :data-source="localData" :pagination="false" bordered size="middle">
<!--操作栏-->
<template #action="{ index }">
<a-button type="link" @click="toDetail">查看</a-button>
</template>
</a-table>
</template>
<script lang="ts" setup>
import { getZjyjHis } from '@/api/dkgl.api';
import { ref, watch } from 'vue';
import { histroycolumns } from '../data';
const props = defineProps({
wrdkid: {
type: String,
},
});
const localData = ref([]);
getHistory();
async function getHistory() {
localData.value = await getZjyjHis({
wrdkid: props.wrdkid,
pgtype: '',
scjdbm: 'S2',
});
}
function toDetail(index) {}
</script>
<template>
<BasicForm @register="registerForm" />
</template>
<script lang="ts" name="dkgl-fxpg-MaterialUpload" setup>
//引入依赖
import { useForm, BasicForm, FormSchema } from '/@/components/Form';
import { watch, nextTick, defineEmits } from 'vue';
import { useRouter } from 'vue-router';
const emit = defineEmits(['changePsfs']);
const router = useRouter();
const props = defineProps({
data: {
type: Object,
},
});
//自定义表单字段
const formSchemas: FormSchema[] = [
{
label: '评审方式',
field: 'dcjdPsfs',
component: 'Select',
required: true,
ifShow: router.currentRoute.value.query.isnyd2yzlg === '1',
componentProps: () => {
return {
options: [
{ label: '专家评审', value: 1 },
{ label: '其他评审方式', value: 2 },
],
onChange: (e) => {
emit('changePsfs', e);
},
};
},
},
{
label: '第几次评审',
field: 'pscs',
component: 'Input',
required: true,
componentProps: {
disabled: true,
},
},
{
label: '会议时间',
field: 'hysj',
component: 'DatePicker',
required: true,
componentProps: {
showTime: false,
valueFormat: 'YYYY-MM-DD',
},
},
{
label: '会议地点',
field: 'hydd',
component: 'Input',
required: true,
},
{
label: '会议组织方',
field: 'hyzzf',
component: 'Input',
required: true,
},
{
label: '报告是否通过',
field: 'tgjg',
component: 'Select',
required: true,
componentProps: ({ formActionType, formModel }) => {
return {
options: [
{ label: '通过,无需修改', value: 1 },
{ label: '通过但需修改', value: 2 },
{ label: '未通过', value: 0 },
],
onChange: async (e) => {
const { updateSchema, validate } = formActionType;
let options = await changeTgjg(e);
updateSchema([
{
field: 'shjg',
componentProps: {
options,
},
},
]);
if (e === 0) {
formModel.shjg = 0;
} else {
// 删除-清空,1或2-用户自己选择
formModel.shjg = null;
}
await validate(['tgjg', 'shjg']);
},
};
},
},
{
label: '报告结论',
field: 'shjg',
component: 'Select',
required: true,
componentProps: {
options: [],
},
},
{
label: '评审文件',
field: 'shfj',
component: 'JUpload',
required: true,
colProps: { span: 24 },
componentProps: {
maxCount: 1,
tipArr: ['(提示:提交的文件包括但不限于:申请表、参会人员签到表、评审报告等,压缩为一个文件上传)'],
showDownloadBtn: false,
},
},
{
label: '专家意见',
field: 'zjyj',
component: 'InputTextArea',
required: true,
colProps: { span: 24 },
componentProps: {
placeholder: '请输入专家意见(最少10个字)',
},
},
];
/**
* BasicForm绑定注册;
*/
const [registerForm, { setFieldsValue, resetFields, validate, clearValidate, updateSchema }] = useForm({
//注册表单列
schemas: formSchemas,
//不显示查询和重置按钮
showActionButtonGroup: false,
//默认row行配置,当 layout 为 horizontal 生效
rowProps: { gutter: 24, justify: 'start', align: 'middle' },
//全局col列占比(每列显示多少位),和schemas中的colProps属性一致
baseColProps: { span: 12 },
//使用labelCol的样式参数来控制标题宽度
labelCol: { style: { width: '150px' } },
});
watch(
() => props?.data,
async (val: any) => {
if (val) {
await nextTick();
await setFieldsValue({
...props.data,
});
let options = await changeTgjg(props.data.tgjg);
updateSchema([
{
field: 'shjg',
componentProps: {
options,
},
},
]);
await clearValidate();
} else {
await nextTick();
await resetFields();
}
},
{ deep: true, immediate: true }
);
async function changeTgjg(val) {
let options = [];
if (val === 1 || val === 2) {
options = [{ label: '未超过,且无需进一步补充调查', value: 1 }, { label: '土壤污染物超过风险管控标准', value: 2 }];
} else if (val === 0) {
options = [{ label: '无法得出结论,需要进一步补充调查', value: 0 }];
} else {
options = [];
}
return options;
}
defineExpose({
validate,
});
</script>
......@@ -157,3 +157,39 @@ export const searchFormSchema: FormSchema[] = [
component: 'Input',
},
];
// 历次评审信息
export const histroycolumns: BasicColumn[] = [
{
title: '第几次评审',
dataIndex: 'pscs',
},
{
title: '会议时间',
dataIndex: 'hysj',
},
{
title: '处理时间',
dataIndex: 'tsamp',
},
{
title: '会议地点',
dataIndex: 'hydd',
},
{
title: '会议组织方',
dataIndex: 'hyzzf',
},
{
title: '报告是否通过',
dataIndex: 'tgjg',
},
{
title: '操作',
dataIndex: 'action',
align: 'center',
fixed: 'right',
width: 100,
slots: { customRender: 'action' },
},
];
......@@ -9,6 +9,7 @@
</a-page-header>
<a-collapse v-model:activeKey="activeKey" :bordered="false" class="collapse-bg">
<a-collapse-panel key="1" header="评审信息">
<!-- 与地块调查有不同之处 -->
<MaterialUpload ref="MaterialUploadRef" :data="data" @change-psfs="changePsfs" />
</a-collapse-panel>
<a-collapse-panel key="2">
......@@ -23,7 +24,7 @@
</a-upload>
<a-button type="primary" @click.stop="handleInfo('panel', 'add')" class="ml-2">添加</a-button>
</template>
<PanelInfo ref="PanelInfoRef" :data="data.zjz" :psfs="psfs" />
<PanelInfo ref="PanelInfoRef" :data="data?.zjz" :psfs="psfs" />
</a-collapse-panel>
<a-collapse-panel key="3">
<template #header>
......@@ -37,16 +38,21 @@
</a-upload>
<a-button type="primary" @click.stop="handleInfo('participant', 'add')" class="ml-2">添加</a-button>
</template>
<ParticipantInfo ref="ParticipantInfoRef" :data="data.chry" :psfs="psfs" />
<ParticipantInfo ref="ParticipantInfoRef" :data="data?.chry" :psfs="psfs" />
</a-collapse-panel>
</a-collapse>
<div class="m-4">
<a-divider orientation="left">历次评审信息</a-divider>
<HistoryInfo :wrdkid="wrdkid" />
</div>
</div>
</template>
<script lang="ts" name="dkgl-fxpg-modal-ReviewMaterialUpload" setup>
import { getZjyj, updateZjcy, submitZjyj, getZjzmbUrl, getChrymbtUrl, getScchryUrl } from '@/api/dkgl.api';
import MaterialUpload from '@/views/dkgl/investigate/components/MaterialUpload.vue'; // 地块调查的组件
import PanelInfo from '@/views/dkgl/investigate/components/PanelInfo.vue'; // 地块调查的组件
import ParticipantInfo from '@/views/dkgl/investigate/components/ParticipantInfo.vue'; // 地块调查的组件
import { getZjyj, updateZjcy, submitZjyj, getZjzmbUrl, getChrymbtUrl, getScchryUrl, getZjyjHis } from '@/api/dkgl.api';
import MaterialUpload from '../components/MaterialUpload.vue'; // 新组件
import PanelInfo from '@/views/dkgl/investigate/components/PanelInfo.vue'; // 完全一样(地块调查的组件)
import ParticipantInfo from '@/views/dkgl/investigate/components/ParticipantInfo.vue'; //完全一样(地块调查的组件)
import HistoryInfo from '../components/HistoryInfo.vue'; // 新组件
import { useMessage } from '/@/hooks/web/useMessage';
import { isMobile, checkPhone, checkEmail } from '/@/utils/validate';
import { useMethods } from '/@/hooks/system/useMethods';
......@@ -120,6 +126,10 @@
p.wrdkid = data.value.wrdkid;
p.zjyjid = data.value.zjyjid;
p.scjdbm = data.value.scjdbm;
if (!(router.currentRoute.value.query.isnyd2yzlg === '1')) {
// 不是一住两公,手动赋值,是的话,能最直接获取到表单的值
p.dcjdPsfs = 1;
}
console.log('参数', p);
// 专家组信息、参会人员信息-必填
if (psfs.value === 1) {
......
<template>
<BasicForm @register="registerForm" />
</template>
<script lang="ts" setup>
<script lang="ts" name="dkgl-investigate-MaterialUpload" setup>
//引入依赖
import { useForm, BasicForm, FormSchema } from '/@/components/Form';
import { watch, nextTick, defineEmits } from 'vue';
......@@ -108,6 +108,23 @@
options: [],
},
},
{
label: '是否依据土壤法纳入建设用地土壤污染风险管控与修复名录',
field: 'sfwdfgkmldk',
component: 'Select',
required: true,
componentProps: {
placeholder: '请选择是否纳入',
options: [
{ label: '是', value: 1 },
{ label: '否', value: 0 },
],
},
ifShow: ({ values }) => {
// 风险不可接受,需要采取风险管控、修复措施
return values.shjg === 0;
},
},
{
label: '评审文件',
field: 'shfj',
......@@ -117,6 +134,7 @@
componentProps: {
maxCount: 1,
tipArr: ['(提示:提交的文件包括但不限于:申请表、参会人员签到表、评审报告等,压缩为一个文件上传)'],
showDownloadBtn: false,
},
},
{
......@@ -173,9 +191,9 @@
async function changeTgjg(val) {
let options = [];
if (val === 1 || val === 2) {
options = [{ label: '未超过,且无需进一步补充调查', value: 1 }, { label: '土壤污染物超过风险管控标准', value: 2 }];
options = [{ label: '风险不可接受,需要采取风险管控、修复措施', value: 0 }, { label: '风险可接受,且不需要进一步补充调查,不需要采取风险管控、修复措施', value: 1 }];
} else if (val === 0) {
options = [{ label: '无法得出结论,需要进一步补充调查', value: 0 }];
options = [{ label: '风险不确定,需要进一步补充调查,并再次进行风险评估和评审', value: 2 }];
} else {
options = [];
}
......
......@@ -24,7 +24,7 @@
</a-upload>
<a-button type="primary" @click.stop="handleInfo('panel', 'add')" class="ml-2">添加</a-button>
</template>
<PanelInfo ref="PanelInfoRef" :data="data.zjz" :psfs="psfs" />
<PanelInfo ref="PanelInfoRef" :data="data?.zjz" :psfs="psfs" />
</a-collapse-panel>
<a-collapse-panel key="3">
<template #header>
......@@ -39,7 +39,7 @@
</a-upload>
<a-button type="primary" @click.stop="handleInfo('participant', 'add')" class="ml-2">添加</a-button>
</template>
<ParticipantInfo ref="ParticipantInfoRef" :data="data.chry" :psfs="psfs" />
<ParticipantInfo ref="ParticipantInfoRef" :data="data?.chry" :psfs="psfs" />
</a-collapse-panel>
</a-collapse>
</div>
......@@ -119,11 +119,14 @@ async function toSaveOrSubmit(type) {
} else {
p.chry = data.value.chry;
}
console.log(p, 'p')
p.wrdkid = data.value.wrdkid;
p.zjyjid = data.value.zjyjid;
p.scjdbm = data.value.scjdbm;
if (!(router.currentRoute.value.query.isnyd2yzlg === '1')) {
// 不是一住两公,手动赋值,是的话,能最直接获取到表单的值
p.dcjdPsfs = 1;
}
console.log('参数', p);
// 专家组信息、参会人员信息-必填
if (psfs.value === 1) {
if (!p.zjz?.length) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论