3 次代碼提交 4e22360bfd ... 8bf951c51d

作者 SHA1 備註 提交日期
  Liuzhenyu 8bf951c51d 上传组件优化 1 月之前
  zm 4b02e1c407 修复bug 1 月之前
  zm 3c866ff3c6 通报信息查询:不予通报逻辑处理 1 月之前

+ 0 - 170
src/components/FileUpload/index copy.vue

@@ -1,170 +0,0 @@
-<template>
-  <el-upload
-    ref="uploadRef"
-    class="upload-demo"
-    :action="uploadUrl"
-    :headers="headers"
-    :data="extraData"
-    :multiple="multiple"
-    :limit="limit"
-    :accept="accept"
-    :show-file-list="showFileList"
-    :before-upload="beforeUpload"
-    :on-success="handleSuccess"
-    :on-error="handleError"
-    :on-exceed="handleExceed"
-    :on-change="handleChange"
-    :auto-upload="autoUpload"
-    :disabled="disabled"
-  >
-    <el-button :type="buttonType" :icon="buttonIcon" :size="buttonSize" :loading="loading">
-      {{ buttonText }}
-    </el-button>
-    <template #tip v-if="showTip">
-      <div class="el-upload__tip">
-        {{ tipText || `请上传${accept ? accept.replace(/\*/g, '') : ''}格式文件,且不超过${fileSize}MB` }}
-      </div>
-    </template>
-  </el-upload>
-</template>
-
-<script setup lang="ts">
-import { ref } from 'vue'
-import { ElMessage } from 'element-plus'
-import type { UploadInstance, UploadProps, UploadRawFile } from 'element-plus'
-
-interface Props {
-  uploadUrl: string // 上传地址(必填)
-  headers?: Record<string, string> // 请求头
-  extraData?: Record<string, any> // 额外参数
-  multiple?: boolean // 是否支持多选文件
-  limit?: number // 最大允许上传个数
-  accept?: string // 接受上传的文件类型
-  fileSize?: number // 文件大小限制(MB)
-  showFileList?: boolean // 是否显示已上传文件列表
-  autoUpload?: boolean // 是否自动上传
-  disabled?: boolean // 是否禁用
-  buttonText?: string // 按钮文字
-  buttonType?: string // 按钮类型
-  buttonIcon?: string // 按钮图标
-  buttonSize?: string // 按钮尺寸
-  showTip?: boolean // 是否显示提示文字
-  tipText?: string // 自定义提示文字
-  isHandleSuccess?: boolean // 是否处理成功回调
-  isHandleError?: boolean // 是否处理错误回调
-}
-
-const props = withDefaults(defineProps<Props>(), {
-	uploadUrl: '/file/upload',
-  multiple: false,
-  limit: 1,
-  fileSize: 10,
-  showFileList: false,
-  autoUpload: true,
-  disabled: false,
-  buttonText: '上传文件',
-  buttonType: 'primary',
-  buttonSize: 'default',
-  showTip: true,
-  isHandleSuccess: true,
-  isHandleError: true
-})
-
-const emit = defineEmits(['success', 'error', 'change', 'exceed'])
-
-const uploadRef = ref<UploadInstance>()
-const loading = ref(false)
-
-// 上传前校验
-const beforeUpload: UploadProps['beforeUpload'] = (rawFile: UploadRawFile) => {
-  if (props.accept) {
-    const fileType = rawFile.type
-    const acceptTypes = props.accept.split(',')
-    const isValidType = acceptTypes.some(type => {
-      if (type.startsWith('.')) {
-        return rawFile.name.toLowerCase().endsWith(type.toLowerCase())
-      }
-      return fileType.includes(type.replace(/\*/g, ''))
-    })
-    
-    if (!isValidType) {
-      ElMessage.error(`只能上传${props.accept}格式的文件!`)
-      return false
-    }
-  }
-
-  if (props.fileSize) {
-    const isLtSize = rawFile.size / 1024 / 1024 < props.fileSize
-    if (!isLtSize) {
-      ElMessage.error(`文件大小不能超过${props.fileSize}MB!`)
-      return false
-    }
-  }
-  
-  return true
-}
-
-// 文件上传成功
-const handleSuccess: UploadProps['onSuccess'] = (response, uploadFile, uploadFiles) => {
-  loading.value = false
-  if (props.isHandleSuccess) {
-    ElMessage.success('上传成功')
-  }
-  emit('success', { response, uploadFile, uploadFiles })
-}
-
-// 文件上传失败
-const handleError: UploadProps['onError'] = (error, uploadFile, uploadFiles) => {
-  loading.value = false
-  if (props.isHandleError) {
-    ElMessage.error('上传失败')
-  }
-  emit('error', { error, uploadFile, uploadFiles })
-}
-
-// 文件状态改变
-const handleChange: UploadProps['onChange'] = (uploadFile, uploadFiles) => {
-  loading.value = true
-  emit('change', { uploadFile, uploadFiles })
-}
-
-// 文件超出个数限制
-const handleExceed: UploadProps['onExceed'] = (files, uploadFiles) => {
-  ElMessage.warning(`最多只能上传${props.limit}个文件`)
-  emit('exceed', { files, uploadFiles })
-}
-
-// 手动上传
-const submitUpload = () => {
-  uploadRef.value?.submit()
-}
-
-// 清空已上传文件列表
-const clearFiles = () => {
-  uploadRef.value?.clearFiles()
-}
-
-// 手动触发文件选择
-const handleClick = () => {
-  uploadRef.value?.$el.querySelector('.el-upload__input')?.click()
-}
-
-// 暴露方法给父组件
-defineExpose({
-  submitUpload,
-  clearFiles,
-  handleClick
-})
-</script>
-
-<style scoped>
-.upload-demo {
-  display: inline-block;
-}
-
-.el-upload__tip {
-  margin-top: 8px;
-  font-size: 12px;
-  color: var(--el-text-color-secondary);
-}
-</style>

+ 346 - 201
src/components/FileUpload/index.vue

@@ -1,54 +1,79 @@
 <template>
-	<div class="upload-file">
-		<el-upload
-			ref="fileUpload"
-			multiple
-			:action="uploadFileUrl"
-			:before-upload="handleBeforeUpload"
-			:file-list="fileList"
-			:limit="limit"
-			:on-error="handleUploadError"
-			:on-exceed="handleExceed"
-			:on-success="handleUploadSuccess"
-			:show-file-list="false"
-			:headers="headers"
-			class="upload-file-uploader"
-		>
-			<!-- 上传按钮 -->
-			<el-button type="primary">{{ btnText }}</el-button>
-		</el-upload>
-		<!-- 上传提示 -->
-		<div v-if="showTip" class="el-upload__tip">
-			请上传
-			<template v-if="fileSize">
-				大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b>
-			</template>
-			<template v-if="fileType">
-				格式为 <b style="color: #f56c6c">{{ fileType.join('/') }}</b>
-			</template>
-			的文件
-		</div>
-		<!-- 文件列表 -->
-		<!-- <transition-group
-            class="upload-file-list el-upload-list el-upload-list--text"
-            name="el-fade-in-linear"
-            tag="ul"
-            v-if="showFileList"
+  <div class="upload-file" :class="{ 'is-disabled': disabled }">
+    <!-- 上传区域 -->
+    <template v-if="!disabled">
+      <div class="upload-area">
+        <el-upload
+          ref="fileUpload"
+          multiple
+          :action="uploadFileUrl"
+          :before-upload="handleBeforeUpload"
+          :file-list="fileList"
+          :limit="limit"
+          :on-error="handleUploadError"
+          :on-exceed="handleExceed"
+          :on-success="handleUploadSuccess"
+          :on-change="handleFileChange"
+          :show-file-list="false"
+          :headers="headers"
+          :disabled="disabled"
+          class="upload-file-uploader"
         >
-            <li
-                v-for="(file, index) in fileList"
-                :key="file.uid"
-                class="el-upload-list__item ele-upload-list__item-content"
-            >
-                <el-link :href="`${baseUrl}${file.url}`" :underline="false" target="_blank">
-                    <span class="el-icon-document"> {{ getFileName(file.name) }} </span>
-                </el-link>
-                <div class="ele-upload-list__item-content-action">
-                    <el-link :underline="false" type="danger" @click="handleDelete(index)">删除</el-link>
-                </div>
-            </li>
-        </transition-group> -->
-	</div>
+          <el-button type="primary" :disabled="disabled" class="upload-btn">
+            <i class="el-icon-upload"></i>
+            {{ btnText }}
+          </el-button>
+        </el-upload>
+        
+        <div v-if="showTip" class="upload-tip">
+          请上传
+          <template v-if="fileSize">
+            大小不超过 <b class="highlight">{{ fileSize }}MB</b>
+          </template>
+          <template v-if="fileType">
+            格式为 <b class="highlight">{{ fileType.join('、') }}</b>
+          </template>
+          的文件
+        </div>
+      </div>
+    </template>
+    
+    <!-- 文件列表 -->
+    <transition-group
+      class="file-list"
+      name="file-fade"
+      tag="ul"
+      v-if="showFileList && fileList.length > 0"
+    >
+      <li
+        v-for="(file, index) in fileList"
+        :key="file.uid"
+        class="file-item"
+      >
+        <el-link 
+          :href="file.url" 
+          :underline="false" 
+          target="_blank"
+          class="file-link"
+        >
+          <i class="el-icon-document file-icon"></i>
+          <span class="file-name">
+            {{ file.originalFilename || file.name }}
+          </span>
+        </el-link>
+        <el-link
+          v-if="!disabled"
+          :underline="false"
+          type="danger"
+          class="delete-btn"
+          @click="handleDelete(index)"
+        >
+          <i class="el-icon-delete"></i>
+          删除
+        </el-link>
+      </li>
+    </transition-group>
+  </div>
 </template>
 
 <script setup lang="ts">
@@ -57,190 +82,310 @@ import { ElMessage } from 'element-plus';
 import { getCurrentInstance, ComponentInternalInstance, ref, computed, watch } from 'vue';
 
 const props = defineProps({
-	modelValue: [String, Object, Array] as any,
-	// 数量限制
-	limit: {
-		type: Number,
-		default: 5,
-	},
-	// 大小限制(MB)
-	fileSize: {
-		type: Number,
-		default: 5,
-	},
-	// 文件类型, 例如['png', 'jpg', 'jpeg']
-	fileType: {
-		type: Array as () => Array<any>,
-		default: () => ['doc', 'xls', 'ppt', 'txt', 'pdf'],
-	},
-	// 是否显示提示
-	isShowTip: {
-		type: Boolean,
-		default: true,
-	},
-	action: {
-		type: String,
-		default: '/file/upload',
-	},
-	// 按钮文字
-	btnText: {
-		type: String,
-		default: '点击上传文件',
-	},
-	// 文件列表是否显示
-	showFileList: {
-		type: Boolean,
-		default: true,
-	},
+  modelValue: {
+    type: [String, Object, Array],
+    default: ''
+  },
+  limit: {
+    type: Number,
+    default: 5,
+  },
+  fileSize: {
+    type: Number,
+    default: 5,
+  },
+  fileType: {
+    type: Array as () => Array<any>,
+    default: () => ['doc', 'xls', 'ppt', 'txt', 'pdf'],
+  },
+  isShowTip: {
+    type: Boolean,
+    default: true,
+  },
+  action: {
+    type: String,
+    default: '/file/upload',
+  },
+  btnText: {
+    type: String,
+    default: '点击上传文件',
+  },
+  showFileList: {
+    type: Boolean,
+    default: true,
+  },
+  disabled: {
+    type: Boolean,
+    default: false
+  }
 });
+
 const { proxy } = getCurrentInstance() as ComponentInternalInstance;
 const emit = defineEmits(['update:modelValue', 'handleSuccess']);
 const number = ref(0);
 const uploadList = ref<any[]>([]);
-const baseUrl = import.meta.env.VITE_APP_BASE_API;
-const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + props.action); // 上传文件服务器地址
+const uploadFileUrl = ref(import.meta.env.VITE_APP_BASE_API + props.action);
 const headers = ref({ Authorization: 'Bearer ' + getToken() });
 const fileList = ref<any[]>([]);
 const showTip = computed(() => props.isShowTip && (props.fileType || props.fileSize));
 
+// 初始化文件列表
+const initFileList = (val: any) => {
+  try {
+    if (typeof val === 'string' && val) {
+      return JSON.parse(val);
+    } else if (Array.isArray(val)) {
+      return [...val];
+    }
+    return [];
+  } catch (e) {
+    console.error('文件列表数据解析失败', e);
+    return [];
+  }
+};
+
 watch(
-	() => props.modelValue,
-	val => {
-		if (val) {
-			let temp = 1;
-			// 首先将值转为数组
-			const list = Array.isArray(val) ? val : props.modelValue!.split(',');
-			// 然后将数组转为对象数组
-			fileList.value = list.map((item: any) => {
-				if (typeof item === 'string') {
-					item = { name: item, url: item };
-				}
-				item.uid = item.uid || new Date().getTime() + temp++;
-				return item;
-			});
-		} else {
-			fileList.value = [];
-			return [];
-		}
-	},
-	{ deep: true, immediate: true }
+  () => props.modelValue,
+  (val) => {
+    fileList.value = initFileList(val);
+  },
+  { immediate: true }
 );
 
-// 上传前校检格式和大小
+const handleFileChange = (file: any) => {
+  // 文件变化处理
+};
+
 function handleBeforeUpload(file: any) {
-	// 校检文件类型
-	if (props.fileType.length) {
-		const fileName = file.name.split('.');
-		const fileExt = fileName[fileName.length - 1];
-		const isTypeOk = props.fileType.indexOf(fileExt) >= 0;
-		if (!isTypeOk) {
-			proxy!.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join('/')}格式文件!`);
-			return false;
-		}
-	}
-	// 校检文件大小
-	if (props.fileSize) {
-		const isLt = file.size / 1024 / 1024 < props.fileSize;
-		if (!isLt) {
-			proxy!.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
-			return false;
-		}
-	}
-	proxy!.$modal.loading('正在上传文件,请稍候...');
-	number.value++;
-	return true;
-}
-
-// 文件个数超出
+  if (props.disabled) return false;
+
+  // 文件类型校验
+  if (props.fileType.length) {
+    const fileExt = file.name.split('.').pop().toLowerCase();
+    if (!props.fileType.map(t => t.toLowerCase()).includes(fileExt)) {
+      proxy!.$modal.msgError(`文件格式不正确, 请上传${props.fileType.join('/')}格式文件!`);
+      return false;
+    }
+  }
+
+  // 文件大小校验
+  if (props.fileSize && file.size / 1024 / 1024 >= props.fileSize) {
+    proxy!.$modal.msgError(`上传文件大小不能超过 ${props.fileSize} MB!`);
+    return false;
+  }
+
+  proxy!.$modal.loading('正在上传文件,请稍候...');
+  number.value++;
+  return true;
+}
+
 function handleExceed() {
-	proxy!.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`);
+  proxy!.$modal.msgError(`上传文件数量不能超过 ${props.limit} 个!`);
 }
 
-// 上传失败
-function handleUploadError(err: any) {
-	proxy!.$modal.msgError('上传文件失败');
-	proxy!.$modal.closeLoading();
+function handleUploadError() {
+  proxy!.$modal.msgError('上传文件失败');
+  proxy!.$modal.closeLoading();
 }
 
-// 上传成功回调
 function handleUploadSuccess(res: any, file: any) {
-	if (res.code === 200) {
-		uploadList.value.push({ name: res.name, url: res.url });
-		uploadedSuccessfully();
-		emit('handleSuccess', res);
-		ElMessage.success(res.msg || '上传成功');
-	} else {
-		number.value--;
-		proxy!.$modal.closeLoading();
-		proxy!.$modal.msgError(res.msg);
-		(proxy!.$refs.fileUpload as any).handleRemove(file);
-		uploadedSuccessfully();
-	}
-}
-// 清空列表
+  if (res.code === 200) {
+    uploadList.value.push({
+      name: res.data.name,
+      originalFilename: res.data.originalFilename || file.name,
+      url: res.data.url,
+      uid: file.uid
+    });
+
+    uploadedSuccessfully();
+    emit('handleSuccess', res);
+    ElMessage.success(res.msg || '上传成功');
+  } else {
+    number.value--;
+    proxy!.$modal.closeLoading();
+    proxy!.$modal.msgError(res.msg);
+    (proxy!.$refs.fileUpload as any).handleRemove(file);
+    uploadedSuccessfully();
+  }
+}
+
 function clearList() {
-	(proxy!.$refs.fileUpload as any).clearFiles();
+  fileList.value = [];
+  (proxy!.$refs.fileUpload as any).clearFiles();
+  emit('update:modelValue', '');
 }
-// 删除文件
-function handleDelete(index: any) {
-	fileList.value.splice(index, 1);
-	emit('update:modelValue', listToString(fileList.value));
+
+function handleDelete(index: number) {
+  if (props.disabled) return;
+  fileList.value.splice(index, 1);
+  emit('update:modelValue', JSON.stringify(fileList.value));
 }
 
-// 上传结束处理
 function uploadedSuccessfully() {
-	if (number.value > 0 && uploadList.value.length === number.value) {
-		fileList.value = fileList.value.filter(f => f.url !== undefined).concat(uploadList.value);
-		uploadList.value = [];
-		number.value = 0;
-		emit('update:modelValue', listToString(fileList.value));
-		proxy!.$modal.closeLoading();
-	}
-}
-
-// 获取文件名称
-function getFileName(name: any) {
-	if (name.lastIndexOf('/') > -1) {
-		return name.slice(name.lastIndexOf('/') + 1);
-	} else {
-		return '';
-	}
-}
-
-// 对象转成指定字符串分隔
-function listToString(list: any, separator?: any) {
-	let strs = '';
-	separator = separator || ',';
-	for (let i in list) {
-		if (list[i].url) {
-			strs += list[i].url + separator;
-		}
-	}
-	return strs !== '' ? strs.substr(0, strs.length - 1) : '';
+  if (number.value > 0 && uploadList.value.length === number.value) {
+    fileList.value = [...fileList.value.filter(f => f.url), ...uploadList.value];
+    uploadList.value = [];
+    number.value = 0;
+    emit('update:modelValue', JSON.stringify(fileList.value));
+    proxy!.$modal.closeLoading();
+  }
 }
 
 defineExpose({
-	handleClea: clearList,
+  clearList,
 });
 </script>
 
 <style scoped lang="scss">
-.upload-file-uploader {
-	margin-bottom: 5px;
+.upload-file {
+  font-family: 'Helvetica Neue', Helvetica, 'PingFang SC', 'Hiragino Sans GB', Arial, sans-serif;
+  
+  &.is-disabled {
+    .file-item {
+      padding-right: 15px;
+      
+      &:hover {
+        background-color: transparent;
+      }
+    }
+  }
 }
-.upload-file-list .el-upload-list__item {
-	border: 1px solid #e4e7ed;
-	line-height: 2;
-	margin-bottom: 10px;
-	position: relative;
+
+.upload-area {
+  margin-bottom: 16px;
+}
+
+.upload-btn {
+  padding: 10px 16px;
+  font-size: 14px;
+  border-radius: 4px;
+  transition: all 0.3s;
+  
+  &:hover {
+    transform: translateY(-1px);
+    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
+  }
+  
+  .el-icon-upload {
+    margin-right: 6px;
+  }
 }
-.upload-file-list .ele-upload-list__item-content {
-	display: flex;
-	justify-content: space-between;
-	align-items: center;
-	color: inherit;
+
+.upload-tip {
+  margin-top: 8px;
+  font-size: 12px;
+  color: #909399;
+  line-height: 1.5;
+  
+  .highlight {
+    color: #f56c6c;
+    font-weight: normal;
+  }
 }
-.ele-upload-list__item-content-action .el-link {
-	margin-right: 10px;
+
+.file-list {
+  margin: 0;
+  padding: 0;
+  list-style: none;
+}
+
+.file-item {
+  display: flex;
+  align-items: center;
+  padding: 10px 15px;
+  margin-bottom: 8px;
+  border-radius: 6px;
+  background-color: #f8f9fa;
+  transition: all 0.3s ease;
+  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
+  
+  &:hover {
+    background-color: #f0f2f5;
+    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
+    
+    .delete-btn {
+      opacity: 1;
+    }
+  }
+}
+
+.file-link {
+  flex: 1;
+  display: flex;
+  align-items: center;
+  color: #606266;
+  text-decoration: none;
+  overflow: hidden;
+  transition: color 0.2s;
+  
+  &:hover {
+    color: #409eff;
+  }
+}
+
+.file-icon {
+  margin-right: 10px;
+  font-size: 18px;
+  color: #67c23a;
+  flex-shrink: 0;
+}
+
+.file-name {
+  flex: 1;
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+  font-size: 14px;
+}
+
+.delete-btn {
+  opacity: 0;
+  transition: all 0.3s;
+  font-size: 13px;
+  margin-left: 10px;
+  padding: 4px 8px;
+  border-radius: 4px;
+  
+  .el-icon-delete {
+    margin-right: 4px;
+  }
+  
+  &:hover {
+    color: #f56c6c !important;
+    background-color: rgba(245, 108, 108, 0.1);
+  }
+}
+
+/* 过渡动画 */
+.file-fade-enter-active,
+.file-fade-leave-active {
+  transition: all 0.3s ease;
+}
+
+.file-fade-enter-from,
+.file-fade-leave-to {
+  opacity: 0;
+  transform: translateX(-10px);
+}
+
+/* 响应式调整 */
+@media (max-width: 768px) {
+  .upload-btn {
+    width: 100%;
+  }
+  
+  .file-item {
+    padding: 8px 12px;
+  }
+  
+  .file-icon {
+    font-size: 16px;
+    margin-right: 8px;
+  }
+  
+  .delete-btn {
+    opacity: 1;
+    font-size: 12px;
+  }
 }
-</style>
+</style>

+ 14 - 5
src/components/notificationDetailsParts/waterSafetyInformation.vue

@@ -140,18 +140,24 @@
 					</el-row>
 					<el-row :gutter="24">
 						<el-col :span="8">
-							<el-form-item label="查看附件" prop="smr">
-								<FileUpload v-model="item.smr" />
+							<el-form-item label="行政处罚决定" prop="apdFilePath">
+								<FileUpload
+									v-model="item.apdFilePath"
+									:limit="1"
+									:disabled="!isEditable" />
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="通报事项的相关证据" prop="ertnmFilePath">
-								<FileUpload v-model="item.ertnmFilePath" />
+								<FileUpload
+									v-model="item.ertnmFilePath"
+									:limit="1"
+									:disabled="!isEditable" />
 							</el-form-item>
 						</el-col>
 						<el-col :span="8">
 							<el-form-item label="通报事项的其他材料" prop="omfnmFilePath">
-								<FileUpload v-model="item.omfnmFilePath" />
+								<FileUpload v-model="item.omfnmFilePath" :limit="1" :disabled="!isEditable" />
 							</el-form-item>
 						</el-col>
 					</el-row>
@@ -177,7 +183,10 @@
 					<el-row :gutter="24">
 						<el-col :span="24">
 							<el-form-item label="安全管理建议附件">
-								<FileUpload @handleSuccess="onUploadSuccess" v-model="item.smraFilePath" />
+								<FileUpload
+									:limit="1"
+									v-model="item.smraFilePath"
+									:disabled="!isEditable" />
 							</el-form-item>
 						</el-col>
 					</el-row>

+ 18 - 6
src/views/notificationInfoInquiry/administrativePenalty/index.vue

@@ -76,11 +76,14 @@
                 <el-button type="primary" @click="handleExport()">导出</el-button>
             </template>
             <template #operate="scope">
-                <el-button v-if="notifiShow" type="primary" plain @click="handleCheck(scope.row.releasedId)"> 查看
+                <el-button v-if="scope.row.releasedId !== relId" type="primary" plain
+                    @click="handleCheck(scope.row.releasedId)"> 查看
                 </el-button>
-                <el-button v-if="notifiShow" type="primary" plain @click="handlePublish(scope.row.releasedId)"> 发布通报
+                <el-button v-if="scope.row.releasedId !== relId" type="primary" plain
+                    @click="handlePublish(scope.row.releasedId)"> 发布通报
                 </el-button>
-                <el-button v-if="notifiShow" type="primary" @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
+                <el-button v-if="scope.row.releasedId !== relId" type="primary"
+                    @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
                     不予通报
                 </el-button>
             </template>
@@ -152,7 +155,7 @@ const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick,
 const handleCheck = async (id?: string) => {
     router.push({
         path: '/notificationInfoInquiry/administrativePenaltyDetail',
-        query: { type: 'detail' },
+        query: { id: id },
     });
 };
 
@@ -165,7 +168,7 @@ const onMessageChange = (scope, newVal) => {
 };
 // 通报发布
 const handlePublish = releasedId => {
-    ElMessage.success('小编在努力开发中。。。');
+    // ElMessage.success('小编在努力开发中。。。');
     // return;
     router.push({
         path: '/notificationInfoManage/detailPublish',
@@ -175,9 +178,14 @@ const handlePublish = releasedId => {
     });
 };
 const searchTableRef = ref();
+const redId = ref();
+const relId = ref();
+const relList: any = ref([]);
 // 状态按钮
 function handleStatus(value: string, status: string, str: string) {
     dialogVisible.value = true;
+    redId.value = value;
+
     // ElMessage.success('小编在努力开发中。。。');
     // return;
     // ElMessageBox.confirm(`是否${str}这条数据?`, '状态提示', {
@@ -236,11 +244,15 @@ const submitForm = async (formEl: FormInstance | undefined) => {
     await formEl.validate((valid, fields) => {
         if (valid) {
             dialogVisible.value = false;
-            notifiShow.value = false;
             ElMessage({
                 message: '操作成功!',
                 type: 'success',
             })
+            relId.value = redId.value;
+            notifiShow.value = false;
+
+            relList.value.push(relId.value);
+            console.log(relList.value, 'xxxx');
             formEl.resetFields()
         } else {
         }

+ 18 - 8
src/views/notificationInfoInquiry/securityCheck/index.vue

@@ -74,13 +74,18 @@
                 <el-button type="primary" @click="handleExport()">导出</el-button>
             </template>
             <template #operate="scope">
-                <el-button v-if="notifiShow" type="primary" plain @click="handleCheck(scope.row.releasedId)"> 查看
-                </el-button>
-                <el-button v-if="notifiShow" type="primary" plain @click="handlePublish(scope.row.releasedId)"> 发布通报
-                </el-button>
-                <el-button v-if="notifiShow" type="primary" @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
-                    不予通报
-                </el-button>
+                <div>
+                    <el-button v-if="scope.row.releasedId !== relId" type="primary" plain
+                        @click="handleCheck(scope.row.releasedId)"> 查看
+                    </el-button>
+                    <el-button v-if="scope.row.releasedId !== relId" type="primary" plain
+                        @click="handlePublish(scope.row.releasedId)"> 发布通报
+                    </el-button>
+                    <el-button v-if="scope.row.releasedId !== relId" type="primary"
+                        @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
+                        不予通报
+                    </el-button>
+                </div>
             </template>
         </pageContent>
         <el-dialog v-model="dialogVisible" title="不予通报信息填写" width="500" :before-close="handleClose">
@@ -166,9 +171,13 @@ const handlePublish = releasedId => {
 };
 const searchTableRef = ref();
 const dialogVisible = ref(false)
+const redId = ref();
+const relId = ref();
 // 状态按钮
 function handleStatus(value: string, status: string, str: string) {
     dialogVisible.value = true;
+    redId.value = value;
+
     // ElMessage.success('小编在努力开发中。。。');
     // return;
     // ElMessageBox.confirm(`是否${str}这条数据?`, '状态提示', {
@@ -226,11 +235,12 @@ const submitForm = async (formEl: FormInstance | undefined) => {
     await formEl.validate((valid, fields) => {
         if (valid) {
             dialogVisible.value = false;
-            notifiShow.value = false;
             ElMessage({
                 message: '操作成功!',
                 type: 'success',
             })
+            notifiShow.value = false;
+            relId.value = redId.value;
             formEl.resetFields()
         } else {
         }

+ 13 - 5
src/views/notificationInfoInquiry/shipRegistration/index.vue

@@ -60,11 +60,15 @@
                 <el-button type="primary" @click="handleExport()">导出</el-button>
             </template>
             <template #operate="scope">
-                <el-button v-if="notifiShow" type="primary" plain @click="handleCheck(scope.row.releasedId)"> 查看
+                <el-button v-if="scope.row.releasedId !== relId" type="primary" plain
+                    @click="handleCheck(scope.row.releasedId)"> 查看
                 </el-button>
-                <el-button v-if="notifiShow" type="primary" plain @click="handlePublish(scope.row.releasedId)"> 发布通报
+                <el-button v-if="scope.row.releasedId !== relId" type="primary" plain
+                    @click="handlePublish(scope.row.releasedId)">
+                    发布通报
                 </el-button>
-                <el-button v-if="notifiShow" type="primary" @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
+                <el-button v-if="scope.row.releasedId !== relId" type="primary"
+                    @click="handleStatus(scope.row.releasedId, '2', '不予通报')">
                     不予通报
                 </el-button>
             </template>
@@ -120,7 +124,7 @@ const { modalRef, handleNewDataClick, handleEditDataClick, handleCheckDataClick,
 const handleCheck = async (id?: string) => {
     router.push({
         path: '/notificationInfoInquiry/shipRegistrationDetail',
-        query: { type: 'detail' },
+        query: { id: id },
     });
 };
 const handleExport = () => {
@@ -142,9 +146,12 @@ const handlePublish = releasedId => {
     });
 };
 const searchTableRef = ref();
+const redId = ref();
+const relId = ref();
 // 状态按钮
 function handleStatus(value: string, status: string, str: string) {
     dialogVisible.value = true;
+    redId.value = value;
     // ElMessage.success('小编在努力开发中。。。');
     // return;
     // ElMessageBox.confirm(`是否${str}这条数据?`, '状态提示', {
@@ -203,11 +210,12 @@ const submitForm = async (formEl: FormInstance | undefined) => {
     await formEl.validate((valid, fields) => {
         if (valid) {
             dialogVisible.value = false;
-            notifiShow.value = false;
             ElMessage({
                 message: '操作成功!',
                 type: 'success',
             })
+            relId.value = redId.value;
+            notifiShow.value = false;
             formEl.resetFields()
         } else {
         }

+ 1 - 0
src/views/notificationInfoManage/contactsmanage/components/treeSelect.vue

@@ -75,6 +75,7 @@ const handleCheckChange = (data: TreeOptions, checked: boolean, indeterminate: b
 	// });
 	// 以上参数按照项目需求取值,正常情况下只会用到 allCheckedKeys
 	const allCheckedKeys = treeRef.value?.getCheckedKeys(false) || [];
+	
 	// console.log('所有勾选的节点ID:', allCheckedKeys);
 	if (tabsItem.value) {
 		emit('treeCheck', allCheckedKeys);

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

@@ -17,7 +17,7 @@ const contentConfig = {
 		{ type: 'custom', label: '短信接收人', slotName: 'msgRecipient', prop: 'msgRecipient', width: 140 },
 		{ type: 'normal', label: '传真号', prop: 'faxNumber', width: 140 },
 		{ type: 'normal', label: '微信号', prop: 'wxNumber', width: 140 },
-		{ type: 'normal', label: '电子邮箱', prop: 'email', width: 140 },
+		{ type: 'normal', label: '电子邮箱', prop: 'email' },
 		{ type: 'custom', label: '通讯录状态', slotName: 'abStatus', prop: 'abStatus', width: 180 },
 		{ type: 'handler', label: '操作', slotName: 'operate', width: 180, fixed: 'right' },
 	],

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

@@ -349,7 +349,7 @@ searchItem();
 }
 
 .table-box {
-	width: 75%;
+	width: 55%;
 	display: flex;
 	flex-direction: column;
 	flex: 3;

+ 1 - 1
src/views/notificationInfoManage/myPublish/components/detail.vue

@@ -11,7 +11,7 @@
 		<!-- 水上交通安全通报信息 -->
 		<WaterSafetyInformation ref="waterSafetyRef" :formData="formData" />
 		<!-- 操作记录 -->
-		<OperationLog :formData="formData?.middleLogList" v-if="route.query.type !== 'add'" />
+		<OperationLog :formData="formData?.middleLogList" v-if="route.query.type === 'detail'" />
 		<!-- 底部按钮区 -->
 		<div class="form-actions">
 			<slot name="btn">