Ver Fonte

事项清单调整

Luka há 1 dia atrás
pai
commit
8d76f44bdf

+ 169 - 127
src/views/addressBook/components/detail.vue

@@ -1,53 +1,100 @@
 <template>
-    <div class="modal">
-        <el-dialog v-model="dialogVisible" :title="dialogTitle" :width="modalConfig.dialogWidth || '80%'" center
-            @close="handleExcel(ruleFormRef)" :close-on-click-modal="false">
-            <template #header>
+	<div class="modal">
+		<el-dialog
+			v-model="dialogVisible"
+			:title="dialogTitle"
+			:width="modalConfig.dialogWidth || '80%'"
+			center
+			@close="handleExcel(ruleFormRef)"
+			:close-on-click-modal="false"
+		>
+			<template #header>
 				<pageTitle :title="dialogTitle"></pageTitle>
 			</template>
-            <div class="form">
-                <el-form ref="ruleFormRef" :rules="modalConfig.formRules" :model="formData"
-                    :label-width="modalConfig.labelWidth || '100px'" size="large">
-                    <el-row :gutter="12">
-                        <template v-for="item in modalConfig.formItems" :key="item.prop">
-                             <el-col :span="item.span || 12">
-                                <el-form-item :label="item.label" :prop="item.prop">
-                                    <template v-if="item.type === 'input'">
-                                        <el-input :disabled="item.disabled" v-model="formData[item.prop]"
-                                            :placeholder="item.placeholder" />
-                                    </template>
-                                    <template v-if="item.type === 'number'">
-                                        <el-input v-model="formData[item.prop]" type="number" :min="0" :max="999999999999"
-                                            :disabled="item.disabled" :placeholder="item.placeholder"/>
-                                    </template>
-                                    <template v-if="item.type === 'select'">
-                                        <el-select v-model="formData[item.prop]" :placeholder="item.placeholder"
-                                            style="width: 100%" :disabled="item.disabled">
-                                            <template v-for="(val, index) in item.options" :key="index">
-                                                <el-option :value="val.value" :label="val.label" />
-                                            </template>
-                                        </el-select>
-                                    </template>
-                                    <template v-if="item.type === 'date-picker'">
-                                        <el-date-picker :type="item.dateType || 'daterange'" range-separator="-"
-                                            start-placeholder="开始时间" end-placeholder="结束时间" v-model="formData[item.prop]"
-                                            :disabled="item.disabled" />
-                                    </template>
-                                </el-form-item>
-                             </el-col>
-                        </template>
-                    </el-row>
-                </el-form>
-            </div>
-            <template #footer>
-                <span class="dialog-footer">
-                    <el-button @click="handleExcel(ruleFormRef)">取消</el-button>
-                    <el-button type="primary" @click="handleConfirmClick(ruleFormRef)">确定</el-button>
-                    <slot name="button"></slot>
-                </span>
-            </template>
-        </el-dialog>
-    </div>
+			<div class="form">
+				<el-form
+					ref="ruleFormRef"
+					:rules="modalConfig.formRules"
+					label-suffix=":"
+					:model="formData"
+					:label-width="modalConfig.labelWidth || '100px'"
+					size="large"
+				>
+					<el-row :gutter="12">
+						<template v-for="item in modalConfig.formItems" :key="item.prop">
+							<el-col :span="item.span || 8">
+								<el-form-item :label="item.label" :prop="item.prop">
+									<template v-if="item.type === 'input'">
+										<el-input
+											:disabled="item.disabled"
+											v-model="formData[item.prop]"
+											:placeholder="item.placeholder"
+										/>
+									</template>
+									<template v-if="item.type === 'number'">
+										<el-input
+											v-model="formData[item.prop]"
+											type="number"
+											:min="0"
+											:max="999999999999"
+											:disabled="item.disabled"
+											:placeholder="item.placeholder"
+										/>
+									</template>
+									<template v-if="item.type === 'select'">
+										<el-select
+											v-model="formData[item.prop]"
+											:placeholder="item.placeholder"
+											style="width: 100%"
+											:disabled="item.disabled"
+										>
+											<template v-for="(val, index) in item.options" :key="index">
+												<el-option :value="val.value" :label="val.label" />
+											</template>
+										</el-select>
+									</template>
+									<template v-if="item.type === 'date-picker'">
+										<el-date-picker
+											:type="item.dateType || 'daterange'"
+											range-separator="-"
+											start-placeholder="开始时间"
+											end-placeholder="结束时间"
+											v-model="formData[item.prop]"
+											:disabled="item.disabled"
+										/>
+									</template>
+									<template v-if="item.type === 'date'">
+										<el-date-picker
+											type="date"
+											:placeholder="item.placeholder"
+											style="width: 100%"
+											v-model="formData[item.prop]"
+											:disabled="item.disabled"
+										/>
+									</template>
+									<template v-if="item.type === 'textMessage'">
+										<el-radio-group :disabled="item.disabled" v-model="formData[item.prop]">
+											<el-radio value="y">是</el-radio>
+											<el-radio value="n">否</el-radio>
+										</el-radio-group>
+									</template>
+								</el-form-item>
+							</el-col>
+						</template>
+					</el-row>
+				</el-form>
+			</div>
+			<template #footer>
+				<span class="dialog-footer">
+					<el-button @click="handleExcel(ruleFormRef)">返回</el-button>
+					<el-button type="primary" v-show="dialogLook == false" @click="handleConfirmClick(ruleFormRef)"
+						>确定</el-button
+					>
+					<slot name="button"></slot>
+				</span>
+			</template>
+		</el-dialog>
+	</div>
 </template>
 
 <script setup lang="ts" name="modal">
@@ -58,18 +105,18 @@ import { outTypeList } from '@/libs/commonMeth';
 import { template } from 'lodash';
 // 定义props
 interface IProps {
-    modalConfig: {
-        pageName: string;
-        addTitle: string;
-        editTitle: string;
-        detailTitle: string;
-        dialogWidth: string;
-        labelWidth: string;
-        formItems: any[];
-        formRules: object;
-        pageListParams?: object; //新增一个对象,用来传给特殊的列表接口刷新页面(非必传)
-    };
-    otherInfo?: any;
+	modalConfig: {
+		pageName: string;
+		addTitle: string;
+		editTitle: string;
+		detailTitle: string;
+		dialogWidth: string;
+		labelWidth: string;
+		formItems: any[];
+		formRules: object;
+		pageListParams?: object; //新增一个对象,用来传给特殊的列表接口刷新页面(非必传)
+	};
+	otherInfo?: any;
 }
 
 const props = defineProps<IProps>();
@@ -88,99 +135,94 @@ onMounted(async () => {});
 // 定义数据绑定
 const initialForm: any = {};
 for (const item of props.modalConfig.formItems) {
-    initialForm[item.prop] = item.initialValue ?? '';
+	initialForm[item.prop] = item.initialValue ?? '';
 }
 
 let formData = ref(JSON.parse(JSON.stringify(initialForm)));
 
 const dialogTitle = ref();
+const dialogLook = ref(false);
 // 新建或者编辑
 async function setDialogVisible(isNew: boolean = true, check: boolean = false) {
-    dialogVisible.value = true;
-    ruleFormRef.value?.resetFields();
-    await nextTick();
-    if (!isNew) {
-        watch(pageDetailInfo, newVal => {
-            formData.value = pageDetailInfo.value;
-        });
+	dialogVisible.value = true;
+	ruleFormRef.value?.resetFields();
+	await nextTick();
+	dialogLook.value = false;
+	if (!isNew) {
+		watch(pageDetailInfo, newVal => {
+			formData.value = pageDetailInfo.value;
+		});
 
-        if (check) {
-            dialogTitle.value = props.modalConfig.detailTitle;
-            systemStore.getDetailType('detail');
-        } else {
-            dialogTitle.value = props.modalConfig.editTitle;
-            systemStore.getDetailType('edit');
-        }
-    } else {
-        props.modalConfig.formItems.map((m: any) => {
-            if (m.numberType === '2') {
-                if (m.prop === initialForm[m.prop]) {
-                    initialForm[m.prop] = (0.0).toFixed(2);
-                }
-            } else if (m.numberType === '1') {
-                if (m.porp === initialForm[m.porp]) {
-                    initialForm[m.prop] = Math.trunc(0);
-                }
-            }
-        });
-        formData.value = JSON.parse(JSON.stringify(initialForm));
-        await nextTick();
-        dialogTitle.value = props.modalConfig.addTitle;
-        systemStore.detailPageEval(initialForm);
-        systemStore.getDetailType('add');
-    }
-    isEdit.value = !isNew;
+		if (check) {
+			dialogTitle.value = props.modalConfig.detailTitle;
+			dialogLook.value = true;
+			systemStore.getDetailType('detail');
+		} else {
+			dialogTitle.value = props.modalConfig.editTitle;
+			systemStore.getDetailType('edit');
+		}
+	} else {
+		props.modalConfig.formItems.map((m: any) => {
+			if (m.numberType === '2') {
+				if (m.prop === initialForm[m.prop]) {
+					initialForm[m.prop] = (0.0).toFixed(2);
+				}
+			} else if (m.numberType === '1') {
+				if (m.porp === initialForm[m.porp]) {
+					initialForm[m.prop] = Math.trunc(0);
+				}
+			}
+		});
+		formData.value = JSON.parse(JSON.stringify(initialForm));
+		await nextTick();
+		dialogTitle.value = props.modalConfig.addTitle;
+		systemStore.detailPageEval(initialForm);
+		systemStore.getDetailType('add');
+	}
+	isEdit.value = !isNew;
 }
 // 点击确定
 function handleConfirmClick(formEl: FormInstance | undefined) {
-    if (!formEl) return;
-    formEl.validate((valid, fields) => {
-        if (valid) {
-            dialogVisible.value = false;
-            let data = { ...formData.value };
-            if (props.otherInfo) {
-                data = { ...data, ...props.otherInfo };
-            }
-            if (!isEdit.value) {
-                systemStore.newPageDataAction(
-                    props.modalConfig.pageName,
-                    data,
-                    props.modalConfig.pageListParams
-                );
-            } else {
-                if (pageOperateType.value === 'edit') {
-                    systemStore.editPageDataAction(
-                        props.modalConfig.pageName,
-                        data,
-                        props.modalConfig.pageListParams
-                    );
-                }
-            }
-        } else {
-            console.log('error submit!', fields);
-        }
-    });
+	if (!formEl) return;
+	formEl.validate((valid, fields) => {
+		if (valid) {
+			dialogVisible.value = false;
+			let data = { ...formData.value };
+			if (props.otherInfo) {
+				data = { ...data, ...props.otherInfo };
+			}
+			if (!isEdit.value) {
+				systemStore.newPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
+			} else {
+				if (pageOperateType.value === 'edit') {
+					systemStore.editPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
+				}
+			}
+		} else {
+			console.log('error submit!', fields);
+		}
+	});
 }
 // 取消
 function handleExcel(formEl: FormInstance | undefined) {
-    dialogVisible.value = false;
-    if (!formEl) return;
-    formEl.resetFields();
+	dialogVisible.value = false;
+	if (!formEl) return;
+	formEl.resetFields();
 }
 
 // 获取详情
 function onPageDetail(urlId: number | [] | string) {
-    systemStore.detailPageDataAction(props.modalConfig.pageName, urlId);
+	systemStore.detailPageDataAction(props.modalConfig.pageName, urlId);
 }
 
 defineExpose({
-    setDialogVisible,
-    onPageDetail,
+	setDialogVisible,
+	onPageDetail,
 });
 </script>
 
 <style scoped lang="scss">
 .form {
-    padding: 10px 30px;
+	padding: 10px 30px;
 }
 </style>

+ 19 - 19
src/views/addressBook/config/content.config.ts

@@ -1,23 +1,23 @@
 const contentConfig = {
-    pageName: 'rentalCompany',
-    header: {
-        title: '行内联络员',
-    },
-    propsList: [
-        { type: 'index', label: '序号' },
-        { type: 'normal', label: '单位名称', prop: 'rentalCompanyCode', fixed: true },
-        { type: 'normal', label: '所属部门', prop: 'rentalCompanyName', width: 140 },
-        { type: 'normal', label: '职务', prop: 'deptName', width: 140 },
-        { type: 'normal', label: '联络人姓名', prop: 'energyElectricName', width: 140 },
-        { type: 'normal', label: '联系方式', prop: 'energyElectricNameMin', width: 140 },
-        { type: 'normal', label: '固定电话', prop: 'energyGasName', width: 140 },
-        { type: 'normal', label: '短信接收人', prop: 'energyGasNameMin', width: 140 },
-        { type: 'normal', label: '传真号', prop: 'energyWaterName', width: 140 },
-        { type: 'normal', label: '微信号', prop: 'energyWaterName', width: 140 },
-        { type: 'normal', label: '电子邮箱', prop: 'energyWaterNameMin', width: 140 },
-        { type: 'normal', label: '通讯录状态', prop: 'createTime', width: 180 },
-        { type: 'handler', label: '操作', slotName: 'operate', width: 180 },
-    ],
+	pageName: 'rentalCompany',
+	header: {
+		title: '行内联络员',
+	},
+	propsList: [
+		{ type: 'index', label: '序号' },
+		{ type: 'normal', label: '单位名称', prop: 'contactDeptName', fixed: true },
+		{ type: 'normal', label: '所属部门', prop: 'relName', width: 140 },
+		{ type: 'normal', label: '职务', prop: 'dutyName', width: 140 },
+		{ type: 'normal', label: '联络人姓名', prop: 'userName', width: 140 },
+		{ type: 'normal', label: '联系方式', prop: 'mobilePhone', width: 140 },
+		{ type: 'normal', label: '固定电话', prop: 'telephone', width: 140 },
+		{ type: 'normal', label: '短信接收人', prop: 'msgReceiver', width: 140 },
+		{ type: 'normal', label: '传真号', prop: 'faxNum', width: 140 },
+		{ type: 'normal', label: '微信号', prop: 'wx', width: 140 },
+		{ type: 'normal', label: '电子邮箱', prop: 'email', width: 140 },
+		{ type: 'normal', label: '通讯录状态', prop: 'status', width: 180 },
+		{ type: 'handler', label: '操作', slotName: 'operate', width: 180 },
+	],
 };
 
 export default contentConfig;

+ 19 - 19
src/views/addressBook/config/content.nonIndustry.config.ts

@@ -1,23 +1,23 @@
 const contentConfig = {
-    pageName: 'rentalCompany',
-    header: {
-        title: '行外联络员',
-    },
-    propsList: [
-        { type: 'index', label: '序号' },
-        { type: 'normal', label: '单位名称', prop: 'rentalCompanyCode', fixed: true },
-        { type: 'normal', label: '所属部门', prop: 'rentalCompanyName', width: 140 },
-        { type: 'normal', label: '职务', prop: 'deptName', width: 140 },
-        { type: 'normal', label: '联络人姓名', prop: 'energyElectricName', width: 140 },
-        { type: 'normal', label: '联系方式', prop: 'energyElectricNameMin', width: 140 },
-        { type: 'normal', label: '固定电话', prop: 'energyGasName', width: 140 },
-        { type: 'normal', label: '短信接收人', prop: 'energyGasNameMin', width: 140 },
-        { type: 'normal', label: '传真号', prop: 'energyWaterName', width: 140 },
-        { type: 'normal', label: '微信号', prop: 'energyWaterName', width: 140 },
-        { type: 'normal', label: '电子邮箱', prop: 'energyWaterNameMin', width: 140 },
-        { type: 'normal', label: '通讯录状态', prop: 'createTime', width: 180 },
-        { type: 'handler', label: '操作', slotName: 'operate', width: 180 },
-    ],
+	pageName: 'rentalCompany',
+	header: {
+		title: '行外联络员',
+	},
+	propsList: [
+		{ type: 'index', label: '序号' },
+		{ type: 'normal', label: '单位名称', prop: 'contactDeptName', fixed: true },
+		{ type: 'normal', label: '所属部门', prop: 'relName', width: 140 },
+		{ type: 'normal', label: '职务', prop: 'dutyName', width: 140 },
+		{ type: 'normal', label: '联络人姓名', prop: 'userName', width: 140 },
+		{ type: 'normal', label: '联系方式', prop: 'mobilePhone', width: 140 },
+		{ type: 'normal', label: '固定电话', prop: 'telephone', width: 140 },
+		{ type: 'normal', label: '短信接收人', prop: 'msgReceiver', width: 140 },
+		{ type: 'normal', label: '传真号', prop: 'faxNum', width: 140 },
+		{ type: 'normal', label: '微信号', prop: 'wx', width: 140 },
+		{ type: 'normal', label: '电子邮箱', prop: 'email', width: 140 },
+		{ type: 'normal', label: '通讯录状态', prop: 'status', width: 180 },
+		{ type: 'handler', label: '操作', slotName: 'operate', width: 180 },
+	],
 };
 
 export default contentConfig;

+ 95 - 72
src/views/addressBook/config/detail.config.ts

@@ -1,76 +1,99 @@
 const modalConfig = {
-    pageName: 'rentalCompany',
-    addTitle: '新增行业内违法信息通报通讯录',
-    editTitle: '编辑行业内违法信息通报通讯录',
-    detailTitle: '查看行业内违法信息通报通讯录',
-    labelWidth: '150px',
-    formRules: {
-        rentalCompanyCode: [{ required: true, message: '请选择单位名称', trigger: 'change' }],
-        rentalCompanyName: [{ required: true, message: '请输入联络人名称', trigger: 'change' }],
-        deptId: [{ required: true, message: '请选择关联部门', trigger: 'change' }],
-        calculationFormulaName: [{ required: true, message: '请输入费用计算公式', trigger: 'change' }],
-    },
-    formItems: [
-        {
-            label: '单位名称',
-            prop: 'rentalCompanyCode',
-            type: 'select',
-            placeholder: '请选择单位名称',
-        },
-        {
-            label: '联络人名称',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入联络人名称',
-        },
-        {
-            label: '所属部门',
-            prop: 'rentalCompanyCode',
-            type: 'select',
-            placeholder: '请选择所属部门',
-        },
-        {
-            label: '所属职务',
-            prop: 'rentalCompanyCode',
-            type: 'select',
-            placeholder: '请选择所属职务',
-        },
-        {
-            label: '微信号',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入微信号',
-        },
-        {
-            label: '联系电话',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入联系电话',
-        },
-        {
-            label: '固定电话',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入固定电话',
-        },
-        {
-            label: '传真号',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入传真号',
-        },
-        {
-            label: '电子邮箱',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入电子邮箱',
-        },
-        {
-            label: '短信接收人',
-            prop: 'textMessage',
-            type: 'textMessage',
-        },
-    ],
+	pageName: 'contactPerson',
+	addTitle: '新增行业内违法信息通报通讯录',
+	editTitle: '编辑行业内违法信息通报通讯录',
+	detailTitle: '查看行业内违法信息通报通讯录',
+	labelWidth: '150px',
+	formRules: {
+		contactDeptName: [{ required: true, message: '请选择单位名称', trigger: 'change' }],
+		userName: [{ required: true, message: '请输入联络人名称', trigger: 'change' }],
+		updaterDeptId: [{ required: true, message: '请选择所属部门', trigger: 'change' }],
+		dutyName: [{ required: true, message: '请选择所属职位', trigger: 'change' }],
+		mobilePhone: [{ required: true, message: '请输入联络电话', trigger: 'change' }],
+		msgReceiver: [{ required: true, message: '请选择短信接收人', trigger: 'change' }],
+	},
+	formItems: [
+		{
+			label: '创建人员',
+			prop: 'createBy',
+			type: 'input',
+			disabled: true,
+			placeholder: '请输入创建人员',
+		},
+		{
+			label: '创建人员单位名称',
+			prop: 'contactId',
+			type: 'input',
+			disabled: true,
+			placeholder: '请输入创建人员单位名称',
+		},
+		{
+			label: '创建时间',
+			prop: 'createTime',
+			type: 'input',
+			disabled: true,
+			placeholder: '请输入创建时间',
+		},
+		{
+			label: '单位名称',
+			prop: 'contactDeptName',
+			type: 'select',
+			placeholder: '请选择单位名称',
+		},
+		{
+			label: '联络人名称',
+			prop: 'userName',
+			type: 'input',
+			placeholder: '请输入联络人名称',
+		},
+		{
+			label: '所属部门',
+			prop: 'relName',
+			type: 'select',
+			placeholder: '请选择所属部门',
+		},
+		{
+			label: '所属职务',
+			prop: 'dutyName',
+			type: 'select',
+			placeholder: '请选择所属职务',
+		},
+		{
+			label: '微信号',
+			prop: 'wx',
+			type: 'input',
+			placeholder: '请输入微信号',
+		},
+		{
+			label: '联系电话',
+			prop: 'mobilePhone',
+			type: 'input',
+			placeholder: '请输入联系电话',
+		},
+		{
+			label: '固定电话',
+			prop: 'telephone',
+			type: 'input',
+			placeholder: '请输入固定电话',
+		},
+		{
+			label: '传真号',
+			prop: 'faxNum',
+			type: 'input',
+			placeholder: '请输入传真号',
+		},
+		{
+			label: '电子邮箱',
+			prop: 'email',
+			type: 'input',
+			placeholder: '请输入电子邮箱',
+		},
+		{
+			label: '短信接收人',
+			prop: 'msgReceiver',
+			type: 'textMessage',
+		},
+	],
 };
 
 export default modalConfig;

+ 89 - 67
src/views/addressBook/config/detail.nonIndustry.config.ts

@@ -1,71 +1,93 @@
 const modalConfig = {
-    pageName: 'rentalCompany',
-    addTitle: '新增行业外违法信息通报通讯录',
-    editTitle: '编辑行业外违法信息通报通讯录',
-    detailTitle: '查看行业外违法信息通报通讯录',
-    labelWidth: '150px',
-    formRules: {
-        rentalCompanyCode: [{ required: true, message: '请选择单位名称', trigger: 'change' }],
-        rentalCompanyName: [{ required: true, message: '请输入联络人名称', trigger: 'change' }],
-        deptId: [{ required: true, message: '请选择关联部门', trigger: 'change' }],
-        calculationFormulaName: [{ required: true, message: '请输入费用计算公式', trigger: 'change' }],
-    },
-    formItems: [
-        {
-            label: '单位名称',
-            prop: 'rentalCompanyCode',
-            type: 'select',
-            placeholder: '请选择单位名称',
-        },
-        {
-            label: '联络人名称',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入联络人名称',
-        },
-        {
-            label: '所属部门',
-            prop: 'rentalCompanyCode',
-            type: 'select',
-            placeholder: '请选择所属部门',
-        },
-        {
-            label: '所属职务',
-            prop: 'rentalCompanyCode',
-            type: 'select',
-            placeholder: '请选择所属职务',
-        },
-        {
-            label: '微信号',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入微信号',
-        },
-        {
-            label: '联系电话',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入联系电话',
-        },
-        {
-            label: '固定电话',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入固定电话',
-        },
-        {
-            label: '传真号',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入传真号',
-        },
-        {
-            label: '电子邮箱',
-            prop: 'rentalCompanyName',
-            type: 'input',
-            placeholder: '请输入电子邮箱',
-        },
-    ],
+	pageName: 'rentalCompany',
+	addTitle: '新增行业外违法信息通报通讯录',
+	editTitle: '编辑行业外违法信息通报通讯录',
+	detailTitle: '查看行业外违法信息通报通讯录',
+	labelWidth: '150px',
+	formRules: {
+		contactDeptName: [{ required: true, message: '请选择单位名称', trigger: 'change' }],
+		userName: [{ required: true, message: '请输入联络人名称', trigger: 'change' }],
+		updaterDeptId: [{ required: true, message: '请选择所属部门', trigger: 'change' }],
+		dutyName: [{ required: true, message: '请选择所属职位', trigger: 'change' }],
+		mobilePhone: [{ required: true, message: '请输入联络电话', trigger: 'change' }],
+	},
+	formItems: [
+		{
+			label: '创建人员',
+			prop: 'createBy',
+			type: 'input',
+			disabled: true,
+			placeholder: '请输入创建人员',
+		},
+		{
+			label: '创建人员单位名称',
+			prop: 'contactId',
+			type: 'input',
+			disabled: true,
+			placeholder: '请输入创建人员单位名称',
+		},
+		{
+			label: '创建时间',
+			prop: 'createTime',
+			type: 'input',
+			disabled: true,
+			placeholder: '请输入创建时间',
+		},
+		{
+			label: '单位名称',
+			prop: 'contactDeptName',
+			type: 'select',
+			placeholder: '请选择单位名称',
+		},
+		{
+			label: '联络人名称',
+			prop: 'userName',
+			type: 'input',
+			placeholder: '请输入联络人名称',
+		},
+		{
+			label: '所属部门',
+			prop: 'relName',
+			type: 'select',
+			placeholder: '请选择所属部门',
+		},
+		{
+			label: '所属职务',
+			prop: 'dutyName',
+			type: 'select',
+			placeholder: '请选择所属职务',
+		},
+		{
+			label: '微信号',
+			prop: 'wx',
+			type: 'input',
+			placeholder: '请输入微信号',
+		},
+		{
+			label: '联系电话',
+			prop: 'mobilePhone',
+			type: 'input',
+			placeholder: '请输入联系电话',
+		},
+		{
+			label: '固定电话',
+			prop: 'telephone',
+			type: 'input',
+			placeholder: '请输入固定电话',
+		},
+		{
+			label: '传真号',
+			prop: 'faxNum',
+			type: 'input',
+			placeholder: '请输入传真号',
+		},
+		{
+			label: '电子邮箱',
+			prop: 'email',
+			type: 'input',
+			placeholder: '请输入电子邮箱',
+		},
+	],
 };
 
 export default modalConfig;

+ 41 - 42
src/views/addressBook/config/search.config.ts

@@ -1,49 +1,48 @@
 interface Inew {
-    label: string;
-    value: string;
+	label: string;
+	value: string;
 }
 
 const searchConfig = {
-    pageName: 'rentalCompany',
-    formItems: [
-        {
-            label: '姓名',
-            prop: 'rentalCompanyCode',
-            type: 'input',
-            placeholder: '请输入姓名',
-        },
-        {
-            label: '部门',
-            prop: 'unitLevel',
-            type: 'select',
-            options: [] as Array<Inew>,
-            multiple: true,
-            placeholder: '请选择部门',
-        },
-        {
-            label: '联系电话',
-            prop: 'rentalCompanyCode',
-            type: 'input',
-            placeholder: '请输入联系电话',
-        },
-        {
-            label: '短信接收人',
-            prop: 'person',
-            type: 'select',
-            options: [] as Array<Inew>,
-            multiple: true,
-            placeholder: '请选择短信接收人',
-        },
-        {
-            label: '通讯录状态',
-            prop: 'status',
-            type: 'select',
-            options: [] as Array<Inew>,
-            multiple: true,
-            placeholder: '请选择通讯录状态',
-        },
-   
-    ],
+	pageName: 'rentalCompany',
+	formItems: [
+		{
+			label: '姓名',
+			prop: 'rentalCompanyCode',
+			type: 'input',
+			placeholder: '请输入姓名',
+		},
+		{
+			label: '部门',
+			prop: 'unitLevel',
+			type: 'select',
+			options: [] as Array<Inew>,
+			multiple: true,
+			placeholder: '请选择部门',
+		},
+		{
+			label: '联系电话',
+			prop: 'rentalCompanyCode',
+			type: 'input',
+			placeholder: '请输入联系电话',
+		},
+		{
+			label: '短信接收人',
+			prop: 'person',
+			type: 'select',
+			options: [] as Array<Inew>,
+			multiple: true,
+			placeholder: '请选择短信接收人',
+		},
+		{
+			label: '通讯录状态',
+			prop: 'status',
+			type: 'select',
+			options: [] as Array<Inew>,
+			multiple: true,
+			placeholder: '请选择通讯录状态',
+		},
+	],
 };
 
 export default searchConfig;

+ 33 - 42
src/views/addressBook/config/search.nonIndustry.config.ts

@@ -1,49 +1,40 @@
 interface Inew {
-    label: string;
-    value: string;
+	label: string;
+	value: string;
 }
 
 const searchConfig = {
-    pageName: 'rentalCompany',
-    formItems: [
-        {
-            label: '姓名',
-            prop: 'rentalCompanyCode',
-            type: 'input',
-            placeholder: '请输入姓名',
-        },
-        {
-            label: '部门',
-            prop: 'unitLevel',
-            type: 'select',
-            options: [] as Array<Inew>,
-            multiple: true,
-            placeholder: '请选择部门',
-        },
-        {
-            label: '联系电话',
-            prop: 'rentalCompanyCode',
-            type: 'input',
-            placeholder: '请输入联系电话',
-        },
-        {
-            label: '短信接收人',
-            prop: 'person',
-            type: 'select',
-            options: [] as Array<Inew>,
-            multiple: true,
-            placeholder: '请选择短信接收人',
-        },
-        {
-            label: '通讯录状态',
-            prop: 'status',
-            type: 'select',
-            options: [] as Array<Inew>,
-            multiple: true,
-            placeholder: '请选择通讯录状态',
-        },
-   
-    ],
+	pageName: 'rentalCompany',
+	formItems: [
+		{
+			label: '姓名',
+			prop: 'rentalCompanyCode',
+			type: 'input',
+			placeholder: '请输入姓名',
+		},
+		{
+			label: '部门',
+			prop: 'unitLevel',
+			type: 'select',
+			options: [] as Array<Inew>,
+			multiple: true,
+			placeholder: '请选择部门',
+		},
+		{
+			label: '联系电话',
+			prop: 'rentalCompanyCode',
+			type: 'input',
+			placeholder: '请输入联系电话',
+		},
+		{
+			label: '通讯录状态',
+			prop: 'status',
+			type: 'select',
+			options: [] as Array<Inew>,
+			multiple: true,
+			placeholder: '请选择通讯录状态',
+		},
+	],
 };
 
 export default searchConfig;

+ 96 - 87
src/views/leasingCompany/index.vue

@@ -1,67 +1,76 @@
 <template>
-    <div class="sensitive-words">
-        <pageSearch ref="searchTableRef" :searchConfig="searchConfig" />
+	<div class="sensitive-words">
+		<pageSearch ref="searchTableRef" :searchConfig="searchConfig" />
 
-        <pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
-            <template #button>
-                <el-button type="primary" @click="handleAdd()"
-                    v-hasPermi="['business:rentalCompany:add']">新增</el-button>
-            </template>
-            <!-- 水 -->
-            <template #water="scope">
-                <div class="flex">
-                    <!-- <div class="mr5">
+		<pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
+			<template #button>
+				<el-button type="primary" @click="handleAdd()" v-hasPermi="['business:rentalCompany:add']"
+					>新增</el-button
+				>
+			</template>
+			<!-- 水 -->
+			<template #water="scope">
+				<div class="flex">
+					<!-- <div class="mr5">
                         谷值:<span>{{ scope.row.energyList[0].peakUnitPrice }}</span>
                     </div>
                     <div class="mr5">
                         峰值:<span>{{ scope.row.energyList[0].valleyValueUnitPrice }}</span>
                     </div> -->
-                    <div>
-                        平段单价:<span>{{ scope.row.energyList[0].averageUnitPrice }}</span>
-                    </div>
-                </div>
-            </template>
-            <!-- 电 -->
-            <template #electric="scope">
-                <div class="flex">
-                    <!-- <div class="mr5">
+					<div>
+						平段单价:<span>{{ scope.row.energyList[0].averageUnitPrice }}</span>
+					</div>
+				</div>
+			</template>
+			<!-- 电 -->
+			<template #electric="scope">
+				<div class="flex">
+					<!-- <div class="mr5">
                         谷值:<span>{{ scope.row.energyList[1].peakUnitPrice }}</span>
                     </div>
                     <div class="mr5">
                         峰值:<span>{{ scope.row.energyList[1].valleyValueUnitPrice }}</span>
                     </div> -->
-                    <div>
-                        平段单价:<span>{{ scope.row.energyList[1].averageUnitPrice }}</span>
-                    </div>
-                </div>
-            </template>
-            <!-- 燃气 -->
-            <template #coal="scope">
-                <div class="flex">
-                    <!-- <div class="mr5">
+					<div>
+						平段单价:<span>{{ scope.row.energyList[1].averageUnitPrice }}</span>
+					</div>
+				</div>
+			</template>
+			<!-- 燃气 -->
+			<template #coal="scope">
+				<div class="flex">
+					<!-- <div class="mr5">
                         谷值:<span>{{ scope.row.energyList[2].peakUnitPrice }}</span>
                     </div>
                     <div class="mr5">
                         峰值:<span>{{ scope.row.energyList[2].valleyValueUnitPrice }}</span>
                     </div> -->
-                    <div>
-                        平段单价:<span>{{ scope.row.energyList[2].averageUnitPrice }}</span>
-                    </div>
-                </div>
-            </template>
-            <template #operate="scope">
-                <el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)"
-                    v-hasPermi="['business:rentalCompany:edit']">
-                    编辑
-                </el-button>
-                <el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"
-                    v-hasPermi="['business:rentalCompany:remove']">
-                    删除
-                </el-button>
-            </template>
-        </pageContent>
-        <pageDetail :modalConfig="detailConfig" ref="modalRef"> </pageDetail>
-    </div>
+					<div>
+						平段单价:<span>{{ scope.row.energyList[2].averageUnitPrice }}</span>
+					</div>
+				</div>
+			</template>
+			<template #operate="scope">
+				<el-button
+					type="primary"
+					link
+					@click="handleEdit(scope.row.rentalCompanyId)"
+					v-hasPermi="['business:rentalCompany:edit']"
+				>
+					编辑
+				</el-button>
+				<el-button
+					type="primary"
+					link
+					@click="handleDelete(scope.row.rentalCompanyId)"
+					v-hasPermi="['business:rentalCompany:remove']"
+				>
+					删除
+				</el-button>
+			</template>
+		</pageContent>
+		<pageDetail :modalConfig="detailConfig" ref="modalRef"> </pageDetail>
+	</div>
 </template>
 
 <script setup lang="ts">
@@ -87,74 +96,74 @@ const tableListRef = ref();
 // 操作弹框
 import usePageModal from '@/components/components/hooks/usePageDetails';
 const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick, handlePageDetail } =
-    usePageModal();
+	usePageModal();
 
 const handleEdit = async (id: string) => {
-    await handlePageDetail(id);
-    await handleEditDataClick();
+	await handlePageDetail(id);
+	await handleEditDataClick();
 };
 
 // 新增按钮
 const handleAdd = () => {
-    handleNewDataClick();
+	handleNewDataClick();
 };
 const searchTableRef = ref();
 const onClickDeleta = async (row: any) => {
-    ElMessageBox.confirm('确认删除此条数据吗?', '删除', {
-        confirmButtonText: '确认',
-        cancelButtonText: '取消',
-        type: 'warning',
-    }).then(() => {
-        // 删除后的回调
-    });
+	ElMessageBox.confirm('确认删除此条数据吗?', '删除', {
+		confirmButtonText: '确认',
+		cancelButtonText: '取消',
+		type: 'warning',
+	}).then(() => {
+		// 删除后的回调
+	});
 };
 // 删除按钮
 function handleDelete(value: any) {
-    ElMessageBox.confirm('是否删除这条数据?', '删除提示', {
-        confirmButtonText: '确定',
-        cancelButtonText: '取消',
-        type: 'warning',
-    })
-        .then(() => {
-            systemStore.deletePageDataAction(contentConfig.pageName, value);
-        })
-        .catch(() => {
-            ElMessage({
-                type: 'info',
-                message: '取消删除',
-            });
-        });
+	ElMessageBox.confirm('是否删除这条数据?', '删除提示', {
+		confirmButtonText: '确定',
+		cancelButtonText: '取消',
+		type: 'warning',
+	})
+		.then(() => {
+			systemStore.deletePageDataAction(contentConfig.pageName, value);
+		})
+		.catch(() => {
+			ElMessage({
+				type: 'info',
+				message: '取消删除',
+			});
+		});
 }
 
 // 筛选-状态赋值
 async function searchItem() {
-    searchConfig.formItems.forEach(item => {
-        if (item.prop === 'status') {
-            // item.options = searchList.value;
-        }
-    });
+	searchConfig.formItems.forEach(item => {
+		if (item.prop === 'status') {
+			// item.options = searchList.value;
+		}
+	});
 }
 searchItem();
 </script>
 
 <style scoped lang="scss">
 .sensitive-words {
-    margin: 20px;
-    // background-color: #fff;
+	margin: 20px;
+	// background-color: #fff;
 }
 
 .status {
-    cursor: pointer;
-    position: relative;
+	cursor: pointer;
+	position: relative;
 
-    .status-tip {
-        position: absolute;
-        top: 2px;
-        left: 60px;
-    }
+	.status-tip {
+		position: absolute;
+		top: 2px;
+		left: 60px;
+	}
 }
 
 .dialog-tip {
-    text-align: center;
+	text-align: center;
 }
 </style>

+ 178 - 200
src/views/notificationListManage/components/detail.vue

@@ -1,123 +1,101 @@
 <template>
 	<div class="modal">
-		<el-dialog v-model="props.isVisible" width="70%" left :close-on-click-modal="false" @close="onCancel">
+		<el-dialog
+			v-model="dialogVisible"
+			:title="dialogTitle"
+			:width="modalConfig.dialogWidth || '80%'"
+			center
+			@close="handleExcel(ruleFormRef)"
+			:close-on-click-modal="false"
+		>
 			<template #header>
-				<pageTitle :title="props.title"></pageTitle>
+				<pageTitle :title="dialogTitle"></pageTitle>
 			</template>
 			<div class="form">
 				<el-form
 					ref="ruleFormRef"
+					:rules="modalConfig.formRules"
 					label-suffix=":"
-					:rules="formRules"
 					:model="formData"
-					label-width="140px"
+					:label-width="modalConfig.labelWidth || '100px'"
 					size="large"
 				>
-					<el-row>
-						<el-col :span="6">
-							<el-form-item label="发布单位" prop="release_unit">
-								<el-input :disabled="true" v-model="formData.release_unit" placeholder="请输入发布单位" />
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
-							<el-form-item label="创建日期" prop="createDate">
-								<el-input :disabled="true" v-model="formData.createDate" placeholder="请输入创建日期" />
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
-							<el-form-item label="创建人员" prop="creater">
-								<el-input :disabled="true" v-model="formData.creater" placeholder="请输入创建人员" />
-							</el-form-item>
-						</el-col>
-						<el-col :span="6">
-							<el-form-item label="发布状态" prop="send_status">
-								<el-select
-									v-model="formData.send_status"
-									placeholder="请选择发布状态"
-									style="width: 100%"
-									:disabled="true"
-								>
-									<template v-for="(val, index) in sendStatusOptions" :key="index">
-										<el-option :value="val.value" :label="val.label" />
+					<el-row :gutter="12">
+						<template v-for="item in modalConfig.formItems" :key="item.prop">
+							<el-col :span="item.span || 24">
+								<el-form-item :label="item.label" :prop="item.prop">
+									<template v-if="item.type === 'input'">
+										<el-input
+											:disabled="item.disabled"
+											v-model="formData[item.prop]"
+											:placeholder="item.placeholder"
+										/>
 									</template>
-								</el-select> </el-form-item
-						></el-col>
-					</el-row>
-					<el-row>
-						<el-col :span="8">
-							<el-form-item label="通报类型" prop="report_type">
-								<el-select v-model="formData.report_type" placeholder="请选择通报类型" style="width: 100%">
-									<template v-for="(val, index) in reportTypeOptions" :key="index">
-										<el-option :value="val.value" :label="val.label" />
+									<template v-if="item.type === 'textarea'">
+										<el-input
+											:disabled="item.disabled"
+											type="textarea"
+											v-model="formData[item.prop]"
+											show-word-limit
+											autosize
+											:maxlength="item.maxlength || 200"
+											:placeholder="item.placeholder"
+										/>
+									</template>
+									<template v-if="item.type === 'number'">
+										<el-input
+											v-model="formData[item.prop]"
+											type="number"
+											:min="0"
+											:max="999999999999"
+											:disabled="item.disabled"
+											:placeholder="item.placeholder"
+										/>
+									</template>
+									<template v-if="item.type === 'select'">
+										<el-select
+											v-model="formData[item.prop]"
+											:placeholder="item.placeholder"
+											style="width: 100%"
+											:disabled="item.disabled"
+										>
+											<template v-for="(val, index) in item.options" :key="index">
+												<el-option :value="val.value" :label="val.label" />
+											</template>
+										</el-select>
 									</template>
-								</el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="通报事件类别" prop="report_event_type">
-								<el-select
-									v-model="formData.report_event_type"
-									placeholder="请选择通报事件类别"
-									style="width: 100%"
-								>
-									<template v-for="(val, index) in reportEventTypeOptions" :key="index">
-										<el-option :value="val.value" :label="val.label" />
+									<template v-if="item.type === 'date-picker'">
+										<el-date-picker
+											:type="item.dateType || 'daterange'"
+											range-separator="-"
+											start-placeholder="开始时间"
+											end-placeholder="结束时间"
+											v-model="formData[item.prop]"
+											:disabled="item.disabled"
+										/>
 									</template>
-								</el-select>
-							</el-form-item>
-						</el-col>
-						<el-col :span="8">
-							<el-form-item label="事项编号" prop="event_code">
-								<el-input v-model="formData.event_code" placeholder="请输入事项编号" />
-							</el-form-item>
-						</el-col>
+									<template v-if="item.type === 'date'">
+										<el-date-picker
+											type="date"
+											:placeholder="item.placeholder"
+											style="width: 100%"
+											v-model="formData[item.prop]"
+											:disabled="item.disabled"
+										/>
+									</template>
+								</el-form-item>
+							</el-col>
+						</template>
 					</el-row>
-					<el-form-item label="通报事项" prop="report_event">
-						<el-input
-							v-model="formData.report_event"
-							maxlength="200"
-							show-word-limit
-							type="textarea"
-							placeholder="请输入通报事项,内容200字以内"
-						/>
-					</el-form-item>
-					<el-form-item label="通报标准或具体行为列举" prop="report_standard">
-						<el-input
-							v-model="formData.report_standard"
-							maxlength="1000"
-							show-word-limit
-							type="textarea"
-							autosize
-							placeholder="请输入通报标准或具体行为列举,内容200字以内"
-						/>
-					</el-form-item>
-					<el-form-item label="通报依据" prop="report_base">
-						<el-input
-							v-model="formData.report_base"
-							maxlength="200"
-							show-word-limit
-							autosize
-							type="textarea"
-							placeholder="请输入通报依据,内容200字以内"
-						/>
-					</el-form-item>
-					<el-form-item label="发出单位" prop="send_unit">
-						<el-select v-model="formData.send_unit" placeholder="请选择发出单位" style="width: 100%">
-							<template v-for="(val, index) in sendUnitOptions" :key="index">
-								<el-option :value="val.value" :label="val.label" />
-							</template>
-						</el-select>
-					</el-form-item>
-					<el-form-item label="接收单位" prop="receive_unit">
-						<el-input v-model="formData.receive_unit" placeholder="请输入择接收单位" />
-					</el-form-item>
 				</el-form>
 			</div>
 			<template #footer>
 				<span class="dialog-footer">
-					<el-button type="primary" @click="handleConfirmClick(ruleFormRef)">保存</el-button>
-					<el-button type="primary" @click="handleConfirmClick(ruleFormRef)">提交</el-button>
-					<el-button @click="onCancel()">返回</el-button>
+					<el-button @click="handleExcel(ruleFormRef)">返回</el-button>
+					<el-button type="primary" v-show="dialogLook == false" @click="handleConfirmClick(ruleFormRef)"
+						>确定</el-button
+					>
+					<slot name="button"></slot>
 				</span>
 			</template>
 		</el-dialog>
@@ -127,129 +105,129 @@
 <script setup lang="ts" name="modal">
 import { reactive, ref } from 'vue';
 import type { FormInstance } from 'element-plus';
-import pageTitle from '@/components/components/pageTitle.vue';
 import useSystemStore from '@/store/main';
+import { outTypeList } from '@/libs/commonMeth';
+import { template } from 'lodash';
+// 定义props
+interface IProps {
+	modalConfig: {
+		pageName: string;
+		addTitle: string;
+		editTitle: string;
+		detailTitle: string;
+		dialogWidth: string;
+		labelWidth: string;
+		formItems: any[];
+		formRules: object;
+		pageListParams?: object; //新增一个对象,用来传给特殊的列表接口刷新页面(非必传)
+	};
+	otherInfo?: any;
+}
 
-const props = defineProps({
-	isVisible: {
-		type: Boolean,
-		default: false,
-	},
-	title: {
-		type: String,
-		default: '',
-	},
-});
-type Emit = {
-	(e: 'update:isVisible', isVisible: boolean): void;
-};
-const emit = defineEmits<Emit>();
+const props = defineProps<IProps>();
+
+const dialogVisible = ref(false);
+const isEdit = ref(false);
 
-const formData = reactive<any>({
-	release_unit: '交通运输部海事局',
-	createDate: '2025-07-28',
-	type: 'mobile',
-	creater: '张三',
-	send_status: 'inner',
-	report_type: '',
-	report_event_type: '',
-	event_code: '',
-	report_event: '',
-	report_standard: '',
-	report_base: '',
-	send_unit: '',
-	receive_unit: '',
-});
 const ruleFormRef = ref<FormInstance>();
 
 const systemStore = useSystemStore();
 
-const onCancel = () => {
-	resetForm();
-	emit('update:isVisible', false);
-};
+const { pageDetailInfo, pageOperateType } = storeToRefs(systemStore);
 
-const resetForm = () => {
-	if (!ruleFormRef.value) return;
-	ruleFormRef.value.resetFields();
-};
+onMounted(async () => {});
+
+// 定义数据绑定
+const initialForm: any = {};
+for (const item of props.modalConfig.formItems) {
+	initialForm[item.prop] = item.initialValue ?? '';
+}
 
-const formRules = {
-	report_type: [{ required: true, message: '请选择通报类型', trigger: 'select' }],
-	report_event_type: [{ required: true, message: '请选择通报类型', trigger: 'select' }],
-	report_event: [{ required: true, message: '请输入通报事项', trigger: 'change' }],
-	report_base: [{ required: true, message: '请输入通报依据', trigger: 'change' }],
-	send_unit: [{ required: true, message: '请选择发出单位', trigger: 'select' }],
-	receive_unit: [{ required: true, message: '请选择接收单位', trigger: 'change' }],
-	report_standard: [{ required: true, message: '请选择通报标准或具体行为列举', trigger: 'select' }],
-};
+let formData = ref(JSON.parse(JSON.stringify(initialForm)));
 
-// 通报类型
-const reportTypeOptions = [
-	{
-		label: '内部',
-		value: 'inner',
-	},
-	{
-		label: '外部',
-		value: 'outer',
-	},
-];
-// 通报事项类别
-const reportEventTypeOptions = [
-	{
-		label: '信息告知类',
-		value: 'msg',
-	},
-	{
-		label: '协助处理类',
-		value: 'assist',
-	},
-];
-// 发布状态
-const sendStatusOptions = [
-	{
-		label: '待发布',
-		value: 'inner',
-	},
-	{
-		label: '已发布',
-		value: 'outer',
-	},
-	{
-		label: '已结案',
-		value: 'outer',
-	},
-];
-// 发出单位
-const sendUnitOptions = [
-	{
-		label: '上海海事',
-		value: 'msg',
-	},
-	{
-		label: '广州海事',
-		value: 'assist',
-	},
-];
+const dialogTitle = ref();
+const dialogLook = ref(false);
+// 新建或者编辑
+async function setDialogVisible(isNew: boolean = true, check: boolean = false) {
+	dialogVisible.value = true;
+	ruleFormRef.value?.resetFields();
+	await nextTick();
+	dialogLook.value = false;
+	if (!isNew) {
+		watch(pageDetailInfo, newVal => {
+			formData.value = pageDetailInfo.value;
+		});
 
+		if (check) {
+			dialogTitle.value = props.modalConfig.detailTitle;
+			dialogLook.value = true;
+			systemStore.getDetailType('detail');
+		} else {
+			dialogTitle.value = props.modalConfig.editTitle;
+			systemStore.getDetailType('edit');
+		}
+	} else {
+		props.modalConfig.formItems.map((m: any) => {
+			if (m.numberType === '2') {
+				if (m.prop === initialForm[m.prop]) {
+					initialForm[m.prop] = (0.0).toFixed(2);
+				}
+			} else if (m.numberType === '1') {
+				if (m.porp === initialForm[m.porp]) {
+					initialForm[m.prop] = Math.trunc(0);
+				}
+			}
+		});
+		formData.value = JSON.parse(JSON.stringify(initialForm));
+		await nextTick();
+		dialogTitle.value = props.modalConfig.addTitle;
+		systemStore.detailPageEval(initialForm);
+		systemStore.getDetailType('add');
+	}
+	isEdit.value = !isNew;
+}
 // 点击确定
 function handleConfirmClick(formEl: FormInstance | undefined) {
 	if (!formEl) return;
 	formEl.validate((valid, fields) => {
 		if (valid) {
+			dialogVisible.value = false;
+			let data = { ...formData.value };
+			if (props.otherInfo) {
+				data = { ...data, ...props.otherInfo };
+			}
+			if (!isEdit.value) {
+				systemStore.newPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
+			} else {
+				if (pageOperateType.value === 'edit') {
+					systemStore.editPageDataAction(props.modalConfig.pageName, data, props.modalConfig.pageListParams);
+				}
+			}
 		} else {
 			console.log('error submit!', fields);
 		}
 	});
 }
+// 取消
+function handleExcel(formEl: FormInstance | undefined) {
+	dialogVisible.value = false;
+	if (!formEl) return;
+	formEl.resetFields();
+}
+
+// 获取详情
+function onPageDetail(urlId: number | [] | string) {
+	systemStore.detailPageDataAction(props.modalConfig.pageName, urlId);
+}
+
+defineExpose({
+	setDialogVisible,
+	onPageDetail,
+});
 </script>
 
-<style>
+<style scoped lang="scss">
 .form {
 	padding: 10px 30px;
 }
-.form .el-input__wrapper {
-	width: 100% !important;
-}
 </style>

+ 11 - 11
src/views/notificationListManage/config/content.config.ts

@@ -5,17 +5,17 @@ const contentConfig = {
 	},
 	propsList: [
 		{ type: 'index', label: '事项编号' },
-		{ type: 'normal', label: '发布单位', prop: 'release_unit', fixed: true },
-		{ type: 'normal', label: '通报类型', prop: 'report_type', width: 140 },
-		{ type: 'normal', label: '通报事项类别', prop: 'report_event_type', width: 140 },
-		{ type: 'normal', label: '通报事项', prop: 'report_event', width: 80 },
-		{ type: 'normal', label: '通报标准', prop: 'report_standard', width: 90 },
-		{ type: 'normal', label: '通报依据', prop: 'report_base', width: 90 },
-		{ type: 'custom', label: '发出单位', prop: 'send_unit', width: 220 },
-		{ type: 'custom', label: '接收单位', prop: 'receive_unit', width: 220 },
-		{ type: 'normal', label: '发布状态', prop: 'send_status', width: 140 },
-		{ type: 'normal', label: '创建日期', prop: 'create_date', width: 140 },
-		{ type: 'normal', label: '创建人员', prop: '创建人员', width: 140 },
+		{ type: 'normal', label: '发布单位', prop: 'releaseDeptName', fixed: true },
+		{ type: 'normal', label: '通报类型', prop: 'reportType', width: 140 },
+		{ type: 'normal', label: '通报事项类别', prop: 'reportMattersType', width: 140 },
+		{ type: 'normal', label: '通报事项', prop: 'mattersContent', width: 80 },
+		{ type: 'normal', label: '通报标准', prop: 'reportStandard', width: 90 },
+		{ type: 'normal', label: '通报依据', prop: 'reportBasis', width: 90 },
+		{ type: 'custom', label: '发出单位', prop: 'sendDeptName', width: 220 },
+		{ type: 'custom', label: '接收单位', prop: 'receiveDeptName', width: 220 },
+		{ type: 'normal', label: '发布状态', prop: 'reportStatus', width: 140 },
+		{ type: 'normal', label: '创建日期', prop: 'createTime', width: 140 },
+		{ type: 'normal', label: '创建人员', prop: 'creator', width: 140 },
 		{ type: 'handler', label: '操作', slotName: 'operate', width: 180 },
 	],
 };

+ 152 - 0
src/views/notificationListManage/config/detail.config.ts

@@ -0,0 +1,152 @@
+const modalConfig = {
+	pageName: 'rentalCompany',
+	addTitle: '新建违法信息通报事项清单信息',
+	editTitle: '编辑违法信息通报事项清单信息',
+	detailTitle: '查看违法信息通报事项清单信息',
+	labelWidth: '140px',
+	dialogWidth: '70%',
+	formRules: {
+		reportType: [{ required: true, message: '请选择通报类型', trigger: 'select' }],
+		reportMattersType: [{ required: true, message: '请选择通报类型', trigger: 'select' }],
+		mattersContent: [{ required: true, message: '请输入通报事项', trigger: 'change' }],
+		reportBasis: [{ required: true, message: '请输入通报依据', trigger: 'change' }],
+		sendDeptIds: [{ required: true, message: '请选择发出单位', trigger: 'select' }],
+		receiveDeptName: [{ required: true, message: '请选择接收单位', trigger: 'change' }],
+		reportStandard: [{ required: true, message: '请选择通报标准或具体行为列举', trigger: 'select' }],
+	},
+	formItems: [
+		{
+			label: '发布单位',
+			prop: 'releaseDeptName',
+			type: 'input',
+			span: 6,
+			placeholder: '请输入发布单位',
+		},
+		{
+			label: '创建日期',
+			prop: 'createTime',
+			type: 'date',
+			span: 6,
+			placeholder: '请选择创建日期',
+		},
+		{
+			label: '创建人员',
+			prop: 'createBy',
+			type: 'input',
+			span: 6,
+			placeholder: '请输入创建人员',
+		},
+		{
+			label: '发布状态',
+			prop: 'reportStatus',
+			span: 6,
+			type: 'select',
+			options: [
+				{
+					label: '待发布',
+					value: 'inner',
+				},
+				{
+					label: '已发布',
+					value: 'outer',
+				},
+				{
+					label: '已结案',
+					value: 'outer',
+				},
+			],
+			placeholder: '请选择发布状态',
+		},
+		{
+			label: '通报类型',
+			prop: 'reportType',
+			span: 8,
+			type: 'select',
+			options: [
+				{
+					label: '内部',
+					value: 'inner',
+				},
+				{
+					label: '外部',
+					value: 'outer',
+				},
+			],
+			placeholder: '请选择通报类型',
+		},
+		{
+			label: '通报事项类别',
+			prop: 'reportMattersType',
+			type: 'select',
+			options: [
+				{
+					label: '信息告知类',
+					value: 'msg',
+				},
+				{
+					label: '协助处理类',
+					value: 'assist',
+				},
+			],
+			span: 8,
+			placeholder: '请选择通报事项类别',
+		},
+		{
+			label: '事项编号',
+			prop: 'mattersListCode',
+			type: 'input',
+			span: 8,
+			placeholder: '请输入事项编号',
+		},
+		{
+			label: '通报事项',
+			prop: 'mattersContent',
+			type: 'textarea',
+			span: 24,
+			maxlength: 200,
+			placeholder: '根据要求,请输入通报内容,内容200字以内。',
+		},
+		{
+			label: '通报标准或具体行为列举',
+			prop: 'reportStandard',
+			type: 'textarea',
+			maxlength: 1000,
+			span: 24,
+			placeholder: '请输入通报标准或具体行为列举,内容1000字以内',
+		},
+		{
+			label: '通报依据',
+			prop: 'reportBasis',
+			type: 'textarea',
+			maxlength: 200,
+			span: 24,
+			placeholder: '根据要求,请输入通报依据,内容200字以内。',
+		},
+		{
+			label: '发出单位',
+			prop: 'sendDeptIds',
+			type: 'select',
+			options: [
+				{
+					label: '上海海事',
+					value: 'msg',
+				},
+				{
+					label: '广州海事',
+					value: 'assist',
+				},
+			],
+			span: 24,
+			placeholder: '请选择发出单位',
+		},
+		{
+			label: '接收单位',
+			prop: 'receiveDeptName',
+			type: 'input',
+			span: 24,
+			placeholder: ' 请输入接收单位',
+		},
+	],
+};
+
+export default modalConfig;

+ 9 - 9
src/views/notificationListManage/config/search.config.ts

@@ -8,7 +8,7 @@ const searchConfig = {
 	formItems: [
 		{
 			label: '发出单位',
-			prop: 'send_unit',
+			prop: 'sendDeptIds',
 			type: 'select',
 			multiple: true,
 			options: [
@@ -29,7 +29,7 @@ const searchConfig = {
 		},
 		{
 			label: '通报类型',
-			prop: 'report_type',
+			prop: 'reportType',
 			type: 'select',
 			multiple: true,
 			options: [
@@ -50,7 +50,7 @@ const searchConfig = {
 		},
 		{
 			label: '通报事项类别',
-			prop: 'report_event_type',
+			prop: 'reportMattersType',
 			type: 'select',
 			multiple: true,
 			options: [
@@ -71,19 +71,19 @@ const searchConfig = {
 		},
 		{
 			label: '通报事项',
-			prop: 'report_event',
+			prop: 'mattersContent',
 			type: 'input',
 			placeholder: '请输入通报事项',
 		},
 		{
 			label: '通报依据',
-			prop: 'report_base',
+			prop: 'reportBasis',
 			type: 'input',
 			placeholder: '请输入通报依据',
 		},
 		{
 			label: '接收单位',
-			prop: 'receive_unit',
+			prop: 'receiveDeptName',
 			type: 'select',
 			multiple: true,
 			options: [
@@ -104,7 +104,7 @@ const searchConfig = {
 		},
 		{
 			label: '发布状态',
-			prop: 'send_status',
+			prop: 'reportStatus',
 			type: 'select',
 			multiple: true,
 			options: [
@@ -125,13 +125,13 @@ const searchConfig = {
 		},
 		{
 			label: '创建时间',
-			prop: 'createDate',
+			prop: 'createTime',
 			type: 'date-picker',
 			placeholder: '请选择创建时间',
 		},
 		{
 			label: '创建人员',
-			prop: 'creater',
+			prop: 'createBy',
 			type: 'select',
 			multiple: true,
 			options: [

+ 9 - 20
src/views/notificationListManage/index.vue

@@ -4,21 +4,17 @@
 
 		<pageContent ref="tableListRef" :total="total" :contentConfig="contentConfig" :pageList="tableData">
 			<template #button>
-				<el-button type="primary" @click="handleAdd('')">新增</el-button>
+				<el-button type="primary" @click="handleAdd()">新增</el-button>
 			</template>
 			<template #operate="scope">
 				<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)"> 查看 </el-button>
 				<el-button type="primary" link @click="handleEdit(scope.row.rentalCompanyId)"> 编辑 </el-button>
 				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 删除 </el-button>
 				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 启用 </el-button>
+				<el-button type="primary" link @click="handleDelete(scope.row.rentalCompanyId)"> 废止 </el-button>
 			</template>
 		</pageContent>
-		<pageDetail
-			v-model:isVisible="detailConfig.dialogVisible"
-			:title="detailConfig.dialogTitle"
-			:type="detailConfig.type"
-		>
-		</pageDetail>
+		<pageDetail :modalConfig="detailConfig" ref="modalRef"> </pageDetail>
 	</div>
 </template>
 
@@ -27,10 +23,12 @@ import contentConfig from './config/content.config';
 import pageContent from '@/components/components/pageContent.vue';
 import searchConfig from './config/search.config';
 import pageSearch from '@/components/components/pageSearch.vue';
+import detailConfig from './config/detail.config';
 import pageDetail from './components/detail.vue';
 import useSystemStore from '@/store/main';
 // 使用pinia数据
 const systemStore = useSystemStore();
+const { pageDetailInfo } = storeToRefs(systemStore);
 
 const total = ref(0);
 const pageSize = ref([10, 20, 30]);
@@ -39,7 +37,8 @@ const tableListRef = ref();
 
 // 操作弹框
 import usePageModal from '@/components/components/hooks/usePageDetails';
-const { handleEditDataClick, handlePageDetail } = usePageModal();
+const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick, handlePageDetail } =
+	usePageModal();
 
 const handleEdit = async (id: string) => {
 	await handlePageDetail(id);
@@ -47,20 +46,10 @@ const handleEdit = async (id: string) => {
 };
 
 // 新增按钮
-const detailConfig = reactive({
-	dialogVisible: false,
-	dialogTitle: '',
-	id: '',
-	type: 'add',
-});
-const handleAdd = (id: any) => {
-	detailConfig.type = 'add';
-	detailConfig.dialogTitle = '违法信息通报事项清单信息';
-	detailConfig.id = id;
-	detailConfig.dialogVisible = true;
+const handleAdd = () => {
+	handleNewDataClick();
 };
 const searchTableRef = ref();
-
 // 删除按钮
 function handleDelete(value: any) {
 	ElMessageBox.confirm('是否删除这条数据?', '删除提示', {