Selaa lähdekoodia

联调通讯录和清单

Liuzhenyu 1 päivä sitten
vanhempi
commit
750c906f77

+ 11 - 11
src/components/notificationDetailsParts/questionInformation.vue

@@ -3,8 +3,7 @@
 		<!-- 折叠面板 -->
 		<el-collapse v-model="activeNames" class="collapse-panel">
 			<el-collapse-item title="涉事主体基本信息" name="1" :border="false">
-				<div v-if="!isShowAdd && !addType">
-					<!-- 表单核心:通过 isEditable 控制禁用 -->
+				<div v-if="!isShowAdd && formData.otherSubjects === '0'">
 					<el-form
 						ref="ruleFormRef"
 						:model="formData"
@@ -15,11 +14,9 @@
 					>
 					<el-row :gutter="24">
 						<el-col :span="8">
-							<!-- TODO 未知船名字段待确认 -->
-							<el-form-item label="未知船名" prop="test1">
-								<el-checkbox :disabled="!isEditable" v-model="formData.test1">未知船名</el-checkbox>
+							<el-form-item label="未知船名" prop="csnu">
+								<el-checkbox :disabled="!isEditable" v-model="formData.csnu">未知船名</el-checkbox>
 							</el-form-item>
-
 						</el-col>
 					</el-row>
 						<!-- 第一行:中文船名、英文船名、船舶识别号 -->
@@ -234,7 +231,7 @@
 						</el-row>
 					</el-form>
 				</div>
-				<div v-if="!isShowAdd && addType">
+				<div v-if="!isShowAdd && formData.otherSubjects === '2'">
 					<el-form
 						ref="ruleFormRef"
 						:model="formData"
@@ -396,7 +393,7 @@ const activeNames = ref(['1']);
 const drawerVisible = ref(false);
 const isShowAdd = ref(true);
 const initFormData = {
-	test1: false,
+	csnu: false,
 	chineseVesselName: '',
 	englishVesselName: '',
 	vesselIdenNumber: '',
@@ -414,6 +411,7 @@ const initFormData = {
 	oro: '',
 	tnforo: '',
 	sid: '',
+	otherSubjects: '',
 }
 // 表单数据
 const formData = reactive({ ...initFormData } as any);
@@ -428,7 +426,7 @@ const formRules = computed<FormRules>(() => {
 		oPhoneNumbers: [{ pattern: /^1[3-9]\d{9}$/, message: '请输入有效的手机号码', trigger: 'blur' }],
   };
 
-  if (formData.test1) {
+  if (formData.csnu) {
     return {
       ...baseRules,
       vesselType: [],
@@ -456,7 +454,7 @@ const formRules = computed<FormRules>(() => {
   };
 });
 
-watch(() => formData.test1, () => {
+watch(() => formData.csnu, () => {
   ruleFormRef.value?.clearValidate();
 });
 
@@ -529,7 +527,7 @@ const fetchInformation = () => {
 	formData.oro = props.formData.oro
 	formData.tnforo = props.formData.tnforo
 	formData.sid = props.formData.sid
-  // Object.assign(formData, props.formData);
+	formData.otherSubjects = props.formData.otherSubjects
   isShowAdd.value = false;
 };
 
@@ -569,12 +567,14 @@ const handleSelectShip = (data: any) => {
 const onAddVessels = () => {
 	drawerVisible.value = true;
 	addType.value = 0;
+	formData.otherSubjects = '0';
 };
 
 const onAddOtherVessels = () => {
 	isShowAdd.value = false;
 	addType.value = 1;
 	onRest()
+	formData.otherSubjects = '2';
 }
 
 // 暴露方法给父组件

+ 43 - 9
src/components/notificationDetailsParts/waterSafetyInformation.vue

@@ -77,17 +77,16 @@
 					</el-row>
 
 					<!-- 通报依据 -->
-					 	<!--  TODO 字段待确认 -->
 					<el-row :gutter="24">
 						<el-col :span="24">
-							<el-form-item label="通报依据" prop="test2" required>
+							<el-form-item label="通报依据" prop="notificationBasis" required>
 								<el-input
 									v-if="isEditable"
-									v-model="item.test2"
+									v-model="item.notificationBasis"
 									placeholder="请输入通报依据"
 									show-word-limit
 								/>
-								<div v-else>{{ item.test2 || '-' }}</div>
+								<div v-else>{{ item.notificationBasis || '-' }}</div>
 							</el-form-item>
 						</el-col>
 					</el-row>
@@ -148,13 +147,24 @@
 					<el-row :gutter="24" class="industry-row">
 						<el-col :span="24">
 							<el-form-item label="行业外接收单位名称" prop="oirun">
-								<el-input
-									v-if="isEditable"
+								<el-select
 									v-model="item.oirun"
+									v-if="isEditable"
 									placeholder="请输入行业外接收单位名称 如:XXX1海警机构,XXX2海警机构,XX公安机关"
-									maxlength="200"
 									:disabled="!isEditable"
-								/>
+									allow-create
+									default-first-option
+									multiple
+									@change="handleSelectChange"
+									@visible-change="handleVisibleChange"
+									>
+									<el-option
+										v-for="item in industryType"
+										:key="item.value"
+										:label="item.label"
+										:value="item.value"
+									/>
+								</el-select>
 								<div v-else>{{ item.oirun || '-' }}</div>
 							</el-form-item>
 						</el-col>
@@ -318,7 +328,7 @@ const formRules = reactive<FormRules>({
 		{ max: 200, message: '长度不能超过200个字符', trigger: 'blur' },
 	],
 	needFeedback: [{ required: true, message: '请选择是否需要反馈', trigger: 'change' }],
-	test2: [{ required: true, message: '请填写通报依据', trigger: 'change' }],
+	notificationBasis: [{ required: true, message: '请填写通报依据', trigger: 'change' }],
 });
 
 // 抽屉控制
@@ -353,6 +363,30 @@ const onUploadSuccess = (file) => {
 	console.log(file);
 }
 
+// 搜索关键词(内部状态)
+const searchKeyword = ref('');
+
+// 监听下拉框显示/隐藏,重置搜索关键词
+const handleVisibleChange = (visible: boolean) => {
+  if (!visible) searchKeyword.value = '';
+};
+
+// 处理选择变化(包括创建新选项)
+const handleSelectChange = (values: string[]) => {
+  // 检查是否有新创建的选项(假设自定义选项value以'custom-'开头)
+  const newCustomValues = values.filter(v => v.startsWith('custom-'));
+  
+  newCustomValues.forEach(customValue => {
+    const label = customValue.replace('custom-', '');
+    // 添加到选项列表
+    industryType.value.push({
+      value: customValue,
+      label: label,
+    });
+    ElMessage.success(`已添加新选项:${label}`);
+  });
+};
+
 // 监听路由变化
 watch(
 	() => route.query.type,

+ 2 - 1
src/plugins/dictData.ts

@@ -12,7 +12,7 @@ export const notificationStatus = outTypeList('bj_notification_status'); // 通
 export const isFeedback = outTypeList('bj_is_feedback'); // 是否需要反馈
 export const overdueStatus = outTypeList('bj_overdue_status'); // 超期状态
 export const takeMeasures = outTypeList('bj_take_measures'); // 采取措施
-export const bj_category_onm = outTypeList('bj_category_onm'); // 通报事项类别
+export const bj_category_onm = outTypeList('bj_category_onm'); //通报事项清单发布状态
 export const bj_notify_os = outTypeList('bj_notify_os'); // 通报整体状态
 export const bj_todm = outTypeList('bj_todm'); // 处置措施类型
 export const bj_tracking_status = outTypeList('bj_tracking_status'); // 重点跟踪状态
@@ -22,3 +22,4 @@ export const bj_inspection_conclusion = outTypeList('bj_inspection_conclusion');
 export const bj_status = outTypeList('bj_status'); // 状态
 export const bj_international_domestic = outTypeList('bj_international_domestic'); // 国际/国内
 export const bj_illegal_information = outTypeList('bj_illegal_information'); // 违法信息
+export const bj_nl_released_status = outTypeList('bj_nl_released_status'); //通报事项清单发布状态

+ 18 - 8
src/views/notificationInfoManage/contactsmanage/components/detail.vue

@@ -146,6 +146,15 @@
                     </el-form-item>
                 </el-col>
             </el-row>
+            <el-row :gutter="24" v-if="route.query.industryType === '1'">
+                <el-col :span="8">
+                    <el-form-item label="短信接收人" prop="msgRecipient">
+                        <el-radio-group v-model="formData.msgRecipient" :disabled="isEdit">
+                            <el-radio v-for="item in bj_msg_recipient" :key="item.value" :label="item.value">{{ item.label }}</el-radio>
+                        </el-radio-group>
+                    </el-form-item>
+                </el-col>
+            </el-row>
         </el-form>
 
 		<!-- 底部按钮区 -->
@@ -167,11 +176,12 @@ import { useRoute, useRouter } from 'vue-router';
 import { dayjs, FormInstance, FormRules } from 'element-plus';
 import { TreeOptions } from '@/types/global';
 import useDeptStore from '@/store/modules/dept';
-import { outTypeList } from '@/libs/commonMeth';
+import { outTypeList, asyncOutTypeList } from '@/libs/commonMeth';
 import useSystemStore from '@/store/main';
 import { fetchNotificationMattersDetail } from '@/api/notificationInfoManage/mattersmanage';
 import { fetchContactDetail } from '@/api/notificationInfoManage/contactsmanage';
 import Cookies from 'js-cookie';
+const bj_msg_recipient = asyncOutTypeList('bj_msg_recipient'); //短信接收人
 
 const route = useRoute();
 const router = useRouter();
@@ -195,16 +205,16 @@ const formData = ref({
     fixedTelephone: '',
     faxNumber: '',
     email: '',
-    msgRecipient: '',
+    msgRecipient: '2',
 })
 
 const formRules = reactive<FormRules>({
-    unitName: [{ required: true, message: '请选择单位名称', trigger: 'change' }],
-    contactName: [{ required: true, message: '请输入联络人名称', trigger: 'change' }],
-    belongsDept: [{ required: true, message: '请选择所属部门', trigger: 'change' }],
-    position: [{ required: true, message: '请选择所属职位', trigger: 'change' }],
+    unitName: [{ required: route.query.industryType === '1' ? true : false, message: '请选择单位名称', trigger: 'change' }],
+    contactName: [{ required: route.query.industryType === '1' ? true : false, trigger: 'change' }],
+    belongsDept: [{ required: route.query.industryType === '1' ? true : false, message: '请选择所属部门', trigger: 'change' }],
+    position: [{ required: route.query.industryType === '1' ? true : false, message: '请选择所属职位', trigger: 'change' }],
     contactNumber: [
-        { required: true, message: '输入正确的联系电话', trigger: 'change' },
+        { required: route.query.industryType === '1' ? true : false, message: '输入正确的联系电话', trigger: 'change' },
         {
             validator: (_, val, cb) => {
                 const digits = (val || '').replace(/\D/g, '');
@@ -217,7 +227,7 @@ const formRules = reactive<FormRules>({
             trigger: 'blur',
         },
     ],
-    msgRecipient: [{ required: true, message: '请选择短信接收人', trigger: 'change' }],
+    msgRecipient: [{ required: route.query.industryType === '1' ? true : false, message: '请选择短信接收人', trigger: 'change' }],
     wxNumber: [
         { required: false, message: '请输入正确的微信号', trigger: 'change' },
         {

+ 2 - 2
src/views/notificationInfoManage/contactsmanage/components/treeSelect.vue

@@ -137,8 +137,8 @@ defineExpose({ handleReset });
 .tree-wrapper {
 	border: 1px solid #e4e7ed;
 	border-radius: 4px;
-	min-height: 300px;
-	overflow-y: auto;
+	max-height: 500px;
+	overflow: auto;
 	padding: 10px 0;
 }
 

+ 1 - 1
src/views/notificationInfoManage/contactsmanage/config/content.config.ts

@@ -9,7 +9,7 @@ const contentConfig = {
 	propsList: [
 		{ type: 'index', label: '序号', fixed: true },
 		{ type: 'normal', label: '单位名称', sortable: true, prop: 'unitNameStr', width: 150 },
-		{ type: 'normal', label: '所属部门', sortable: true, prop: 'belongsDeptStr', width: 140 },
+		{ type: 'normal', label: '所属部门', sortable: true, prop: 'belongsDept', width: 140 },
 		{ type: 'normal', label: '职务', prop: 'position', sortable: true, width: 140 },
 		{ type: 'normal', label: '联络人姓名', prop: 'contactName', width: 140 },
 		{ type: 'normal', label: '联系方式', prop: 'contactNumber', width: 140 },

+ 1 - 5
src/views/notificationInfoManage/contactsmanage/config/detail.nonIndustry.config.ts

@@ -5,12 +5,8 @@ const modalConfig = {
 	detailTitle: '个人基本信息',
 	labelWidth: '150px',
 	formRules: {
-		unitName: [{ required: true, message: '请选择单位名称', trigger: 'change' }],
-		contactName: [{ required: true, message: '请输入联络人名称', trigger: 'change' }],
-		belongsDept: [{ required: true, message: '请选择所属部门', trigger: 'change' }],
-		position: [{ required: true, message: '请选择所属职位', trigger: 'change' }],
 		contactNumber: [
-			{ required: true, message: '输入正确的联系电话', trigger: 'change' },
+			{ required: false, message: '输入正确的联系电话', trigger: 'change' },
 			{
 				validator: (_, val, cb) => {
 					const digits = (val || '').replace(/\D/g, '');

+ 27 - 14
src/views/notificationInfoManage/mattersmanage/components/detail.vue

@@ -15,11 +15,19 @@
 				<el-row :gutter="24">
 					<el-col :span="8">
 							<el-form-item label="发布单位" prop="publishingUnit">
-                  <el-input
-                    v-model="formData.publishingUnit"
-                    :disabled="true"
-                  />
-              </el-form-item>
+								<el-tree-select
+									v-model="formData.publishingUnit"
+									:data="dept"
+									:props="{
+										value: 'strId',
+										label: 'label',
+										children: 'children'
+									}"
+									:disabled="true"
+									style="width: 100%"
+									:placeholder="''"
+								/>
+								</el-form-item>
 					</el-col>
 					<el-col :span="8">
 							<el-form-item label="创建日期" prop="addDate">
@@ -77,7 +85,7 @@
                   style="width: 100%"
                   :disabled="isEdit"
                 >
-                  <template v-for="(val, index) in bj_notification_type" :key="index">
+                  <template v-for="(val, index) in bj_category_onm" :key="index">
                     <el-option :value="val.value" :label="val.label" />
                   </template>
                 </el-select>
@@ -131,11 +139,12 @@
 				</el-row>
 				<el-row :gutter="24">
 					<el-col :span="24">
-							<el-form-item label="发出单位" prop="deliveryUnit">
+							<el-form-item label="发出单位" prop="dataDictIds">
                 <el-select
-                  v-model="formData.deliveryUnit"
+                  v-model="formData.dataDictIds"
                   placeholder="请选择发出单位"
                   :disabled="isEdit"
+									multiple
                   style="width: 100%"
                 >
                   <template v-for="(val, index) in bj_lssuing_unit" :key="index">
@@ -177,11 +186,13 @@ import { addMyPublishApi, fetchReleaseDetail } from '@/api/notificationInfoManag
 import { dayjs, FormInstance, FormRules } from 'element-plus';
 import { TreeOptions } from '@/types/global';
 import useDeptStore from '@/store/modules/dept';
-import { outTypeList, asyncOutTypeList } from '@/libs/commonMeth';
-import { categoryOnm, bj_notification_type, bj_lssuing_unit } from '@/plugins/dictData';
+import { bj_notification_type, bj_lssuing_unit, bj_category_onm, bj_nl_released_status } from '@/plugins/dictData';
 import useSystemStore from '@/store/main';
 import { fetchNotificationMattersDetail } from '@/api/notificationInfoManage/mattersmanage';
 import Cookies from 'js-cookie';
+import cache from '@/plugins/cache';
+import { placeholder } from 'jodit/types/plugins/placeholder/placeholder';
+
 
 // --- 路由与Store ---
 const route = useRoute();
@@ -191,14 +202,12 @@ const systemStore = useSystemStore();
 
 const user = JSON.parse(Cookies.get('user')!);
 
-const bj_nl_released_status = asyncOutTypeList('bj_nl_released_status'); //通报事项清单发布状态
-
 const pageTitle = ref(''); // 页面标题
 const isEdit = ref(false); // 是否为编辑模式
 const ruleFormRef = ref<FormInstance>();
 
 const formData = ref({
-  publishingUnit: user.dept.deptName,
+  dataDictIds: [],
   addDate: dayjs().format('YYYY-MM-DD'),
   addName: user.createBy,
   releaseStatus: '',
@@ -209,6 +218,7 @@ const formData = ref({
   notificationBasis: '',
   deliveryUnit: '',
   receivingUnit: '',
+	publishingUnit: '',
 })
 
 const formRules = reactive<FormRules>({
@@ -221,8 +231,11 @@ const formRules = reactive<FormRules>({
 
 const treeData = ref<TreeOptions[]>();
 const deptStore = useDeptStore();
-
+const dept = ref();
 onMounted(async () => {
+	dept.value = cache.local.getJSON('dept');
+	console.log(dept.value);
+	
 	const { type, id } = route.query;
 	if (id) {
 		await onFetchDetail(id)

+ 1 - 1
src/views/notificationInfoManage/mattersmanage/config/content.config.ts

@@ -18,7 +18,7 @@ const contentConfig = {
 		{ type: 'normal', label: '通报事项', prop: 'notificationMatters', sortable: true, width: 140 },
 		{ type: 'normal', label: '通报标准或具体行为列举', prop: 'notificationStandards', width: 180 },
 		{ type: 'normal', label: '通报依据', prop: 'notificationBasis', width: 90 },
-		{ type: 'custom', label: '发出单位', prop: 'deliveryUnit', slotName: 'deliveryUnit', width: 220 },
+		{ type: 'normal', label: '发出单位', prop: 'deliveryUnitNames', width: 220 },
 		{ type: 'normal', label: '接收单位', prop: 'receivingUnit', width: 220 },
 		{ type: 'custom', label: '发布状态', prop: 'releaseStatus', slotName: 'releaseStatus', width: 140 },
 		{ type: 'normal', label: '创建日期', prop: 'addDate', width: 140 },

+ 1 - 9
src/views/notificationInfoManage/mattersmanage/index.vue

@@ -18,12 +18,6 @@
 				<el-button type="primary" @click="handleAdd()">新增</el-button>
 			</template>
 
-			<!-- 发出单位 -->
-			<template #deliveryUnit="scope">
-				<template :index="index" v-for="(item, index) in bj_lssuing_unit">
-					<template :index="index" v-if="item.value == scope.row.deliveryUnit">{{ item.label }}</template>
-				</template>
-			</template>
 			<!-- 通报类型 -->
 			<template #notificationType="scope">
 				<template :index="index" v-for="(item, index) in bj_notification_type">
@@ -78,14 +72,12 @@ import pageContent from '@/components/components/pageContent.vue';
 import searchConfig from './config/search.config';
 import pageSearch from '@/components/components/pageSearch.vue';
 import { changeInventoryStatus } from '@/api/notificationInfoManage/mattersmanage';
-import { categoryOnm, bj_notification_type, bj_lssuing_unit } from '@/plugins/dictData';
+import { categoryOnm, bj_notification_type, bj_lssuing_unit, bj_category_onm, bj_nl_released_status } from '@/plugins/dictData';
 import useDeptStore from '@/store/modules/dept';
 import useSystemStore from '@/store/main';
 import { outTypeList } from '@/libs/commonMeth';
 import { TreeOptions } from '@/types/global';
 
-const bj_nl_released_status = outTypeList('bj_nl_released_status'); //通报事项清单发布状态
-
 // 使用pinia数据
 const systemStore = useSystemStore();
 

+ 1 - 1
src/views/notificationInfoManage/myPublish/index.vue

@@ -225,7 +225,7 @@ function handleDelete(value: any) {
 
 // 筛选-状态赋值
 async function searchItem() {
-	searchConfig.formItems.forEach(item => {
+	searchConfig.formItems.forEach((item: any) => {
 			if (item.prop === 'notificationMattersType') {
 					item.options = categoryOnm
 			}