Explorar o código

1、超期提醒联调。2、事项清单查询列表变为dialog

Liuzhenyu hai 1 mes
pai
achega
4e22360bfd

+ 2 - 1
.env.development

@@ -16,7 +16,8 @@ VITE_APP_TOKEN =  6617e72a5a7e41eb6c30aa4fa3000022
 
 # 开发接口地址
 # VITE_APP_API_URL = "http://libai1024.gnway.cc:80"
-VITE_APP_API_URL = "http://106.75.213.212:7070"
+# VITE_APP_API_URL = "http://106.75.213.212:7070"
+VITE_APP_API_URL = "http://192.168.101.73:7070"
 
 # 是否在打包时开启压缩,支持 gzip 和 brotli
 VITE_BUILD_COMPRESS = gzip

+ 1 - 1
src/api/notificationInfoManage/globalParam.ts

@@ -12,7 +12,7 @@ export function addOverdueReminderApi(data) {
 // 获取超期提醒
 export function getOverdueReminderApi() {
     return request({
-        url: 'business/or',
+        url: 'business/or/gets',
         method: 'get',
     })
 }

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

@@ -0,0 +1,170 @@
+<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>

+ 1 - 1
src/components/FileUpload/index.vue

@@ -165,7 +165,7 @@ function handleUploadError(err: any) {
 // 上传成功回调
 function handleUploadSuccess(res: any, file: any) {
 	if (res.code === 200) {
-		uploadList.value.push({ name: res.fileName, url: res.fileName });
+		uploadList.value.push({ name: res.name, url: res.url });
 		uploadedSuccessfully();
 		emit('handleSuccess', res);
 		ElMessage.success(res.msg || '上传成功');

+ 9 - 7
src/components/notificationDetailsParts/operationLog.vue

@@ -7,14 +7,14 @@
 				</template>
 				<el-table :data="tableData" style="width: 100%" :span-method="objectSpanMethod" border>
 					<el-table-column fixed type="index" label="序号" width="80" />
-					<el-table-column prop="receivingUnit" label="接收单位" width="200" />
+					<el-table-column prop="deptName" label="接收单位" width="200" />
 					<el-table-column prop="operationTime" label="操作时间" width="200" />
 					<el-table-column prop="notificationLink" label="通报环节" width="200">
 						<template #default="scope">
 							{{ getStatusLabel(notificationLink, scope.row.notificationLink) || '' }}
 						</template>
 					</el-table-column>
-					<el-table-column prop="par" label="发布/接收单位" width="200" />
+					<el-table-column prop="parName" label="发布/接收单位" width="200" />
 					<el-table-column prop="operationRecord" label="操作记录" width="200">
 						<template #default="scope">
 							{{ getStatusLabel(operationRecord, scope.row.operationRecord) || '' }}
@@ -27,10 +27,14 @@
 					</el-table-column>
 					<el-table-column prop="todm" label="处置措施类型" width="200">
 						<template #default="scope">
-							{{ getStatusLabel(todm, scope.row.todm) || '' }}
+							{{ getStatusLabel(bj_todm, scope.row.todm) || '' }}
+						</template>
+					</el-table-column>
+					<el-table-column prop="takeMeasures" label="采取措施" width="200">
+						<template #default="scope">
+							{{ getStatusLabel(takeMeasures, scope.row.takeMeasures) || '' }}
 						</template>
 					</el-table-column>
-					<el-table-column prop="takeMeasures" label="采取措施" width="200" />
 					<el-table-column prop="doom" label="其他措施说明" width="200" />
 					<el-table-column prop="rarp" label="发布/接收人员" width="200" />
 					<el-table-column prop="opinions" label="处置意见" width="200" />
@@ -49,6 +53,7 @@
 import { ref, onMounted } from 'vue';
 import { useRoute } from 'vue-router';
 import { outTypeList, getStatusLabel } from '@/libs/commonMeth';
+import { bj_todm, takeMeasures } from '@/plugins/dictData';
 
 // 通报环节
 const notificationLink = outTypeList('bj_notification_link');
@@ -56,9 +61,6 @@ const notificationLink = outTypeList('bj_notification_link');
 const notificationStatus = outTypeList('bj_notification_status');
 // 操作记录
 const operationRecord = outTypeList('bj_operation_record');
-// 处置措施类型
-const todm = outTypeList('bj_todm');
-
 const route = useRoute();
 const activeNames = ref(['1']);
 

+ 3 - 1
src/components/notificationDetailsParts/publishUnitInformation.vue

@@ -52,7 +52,9 @@ watch(
 );
 
 onMounted(() => {
-	formData.releasedUnit = user.dept.deptName;
+	formData.releasedUnit = user.deptId;
+	formData.releasedUnitName = user.dept.deptName;
+	formData.releasedDate = formatCurrentDate();
 })
 
 defineExpose({

+ 2 - 2
src/components/notificationDetailsParts/receivingUnitDealOpinion.vue

@@ -16,7 +16,7 @@
           class="form-container"
         >
           <!-- 处置措施类型(只读) -->
-          <el-form-item label="处置措施类型">
+          <el-form-item v-if="formData.todm" label="处置措施类型">
             接收处理
             <!-- {{ getStatusLabel(bj_todm, formData.todm) }} -->
           </el-form-item>
@@ -78,7 +78,7 @@
           
           <!-- 信息处理接收单位(只读) -->
           <el-form-item label="信息处理接收单位">
-            <div>{{ formData.operationTime }}</div>
+            <div>{{ formData.parName }}</div>
           </el-form-item>
           
           <!-- 附件查看(只读) -->

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

@@ -177,7 +177,7 @@
 					<el-row :gutter="24">
 						<el-col :span="24">
 							<el-form-item label="安全管理建议附件">
-								<FileUpload v-model="item.smraFilePath" />
+								<FileUpload @handleSuccess="onUploadSuccess" v-model="item.smraFilePath" />
 							</el-form-item>
 						</el-col>
 					</el-row>
@@ -298,6 +298,10 @@ onMounted(async() => {
 	unitOptions.value = deptStore.deptData;
 });
 
+const onUploadSuccess = (file) => {
+	console.log(file);
+}
+
 // 监听路由变化
 watch(
 	() => route.query.type,

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

@@ -8,7 +8,7 @@
 			v-loading="treeLoading"
 		>
 			<div class="sensitive-words flex">
-				<TreeSelect class="mr20" ref="treeSelectdRef" @treeCheck="getTreeCheck"></TreeSelect>
+				<TreeSelect class="mr20 tree-select" ref="treeSelectdRef" @treeCheck="getTreeCheck"></TreeSelect>
 				<div class="table-box">
 					<pageSearch
 						ref="searchTableRef"
@@ -327,6 +327,10 @@ searchItem();
 	margin: 20px;
 	height: calc(100vh - 20vh);
 	margin-top: 0;
+
+	.tree-select {
+		flex: 1;
+	}
 }
 
 .status {
@@ -348,6 +352,7 @@ searchItem();
 	width: 75%;
 	display: flex;
 	flex-direction: column;
+	flex: 3;
 }
 
 :deep .el-tabs__item.is-active {

+ 2 - 2
src/views/notificationInfoManage/myPublish/config/content.config.ts

@@ -7,8 +7,8 @@ const contentConfig = {
 		{ type: 'index', label: '序号', fixed: true  },
 		{ type: 'normal', label: '违法事件编号', prop: 'violationNumber', width: 140  },
 		{ type: 'normal', label: '发布单位', prop: 'releasedUnit', width: 140 },
-		{ type: 'normal', label: '船舶名称', prop: 'vesselName', width: 140 },
-		{ type: 'normal', label: '通报事项类别', prop: 'notificationMattersType', width: 120 },
+		{ type: 'normal', label: '船舶名称', prop: 'chineseVesselName', width: 140 },
+		{ type: 'normal', label: '通报事项类别', prop: 'conmStr', width: 120 },
 		{ type: 'normal', label: '通报事项', prop: 'notificationMatters' },
 		{ type: 'custom', label: '接收单位', slotName: 'names', width: 220 },
 		{ type: 'normal', label: '通报状整体状态', prop: 'releaseStatusStr', width: 220 },

+ 12 - 4
src/views/notificationInfoManage/myReceptionDisposal/index.vue

@@ -58,6 +58,8 @@ import { getStatusLabel } from '@/libs/commonMeth';
 // <!-- operationRecord: 4, 接收-->
 // <!-- operationRecord: 5, 处置完成-->
 // <!-- operationRecord: 6, 退回-->
+// <!-- operationRecord: 7, 接受退回-->
+// <!-- operationRecord: 8, 重新发布-->
 
 // 常量定义
 const OPERATION_RECORD = {
@@ -156,11 +158,17 @@ const operationActions: Record<string, OperationAction> = {
 // 按钮显示条件
 const shouldShowButton = (type: string, row: TableRow): boolean => {
   const conditions = {
-    '1': () => row.operationRecord === OPERATION_RECORD.PUBLISHED && row.wfir === FEEDBACK_STATUS.REQUIRED,
+    '1': () => (row.operationRecord === OPERATION_RECORD.PUBLISHED
+    || row.operationRecord === OPERATION_RECORD.REPUBLISH) &&
+     row.conm === FEEDBACK_STATUS.NOT_REQUIRED,
     '2': () => row.operationRecord === OPERATION_RECORD.DISPOSAL,
-    '3': () => row.operationRecord === (OPERATION_RECORD.PROCESSING || OPERATION_RECORD.RECEIVE_RETURN),
-    '4': () => row.operationRecord === OPERATION_RECORD.PUBLISHED && row.wfir === FEEDBACK_STATUS.NOT_REQUIRED,
-    '5': () => row.operationRecord === OPERATION_RECORD.PUBLISHED,
+    '3': () => row.operationRecord === (OPERATION_RECORD.PROCESSING ||
+    OPERATION_RECORD.RECEIVE_RETURN),
+    '4': () => (row.operationRecord === OPERATION_RECORD.PUBLISHED
+      || row.operationRecord === OPERATION_RECORD.REPUBLISH)
+      && row.conm === FEEDBACK_STATUS.REQUIRED,
+    '5': () => row.operationRecord === OPERATION_RECORD.PUBLISHED 
+    || row.operationRecord === OPERATION_RECORD.REPUBLISH,
     '6': () => row.operationRecord === OPERATION_RECORD.RETURNED,
     '7': () => row.operationRecord === OPERATION_RECORD.RETURNED,
     '8': () => row.operationRecord === OPERATION_RECORD.RETURNED

+ 2 - 2
src/views/notificationInfoManage/noticeInfoInquiry/config/content.config.ts

@@ -7,10 +7,10 @@ const contentConfig = {
 		{ type: 'index', label: '序号', fixed: true },
 		{ type: 'normal', label: '违法事件编号', prop: 'violationNumber', width: 140 },
 		{ type: 'normal', label: '发布单位', prop: 'releasedUnitStr', width: 140 },
-		{ type: 'normal', label: '船舶名称', prop: 'vesselName', width: 140 },
+		{ type: 'normal', label: '船舶名称', prop: 'chineseVesselName', width: 140 },
 		{ type: 'normal', label: '通报事项类别', prop: 'conmStr', width: 120 },
 		{ type: 'normal', label: '通报事项', prop: 'notificationMatters' },
-		{ type: 'normal', label: '接收单位', prop: 'receivingUnit', width: 220 },
+		{ type: 'normal', label: '接收单位', prop: 'names', width: 220 },
 		{ type: 'normal', label: '整体通报状态', prop: 'releaseStatusStr', width: 220 },
 		{ type: 'normal', label: '采取措施', prop: 'takeMeasuresStr', width: 220 },
 		{ type: 'normal', label: '是否需要反馈', prop: 'wfirStr', width: 220 },

+ 2 - 2
src/views/notificationInfoManage/superiorLeadersReview/config/content.config.ts

@@ -7,10 +7,10 @@ const contentConfig = {
 		{ type: 'index', label: '序号', fixed: true },
 		{ type: 'normal', label: '违法事件编号', prop: 'violationNumber', width: 140 },
 		{ type: 'normal', label: '发布单位', prop: 'releasedUnitStr', width: 140 },
-		{ type: 'normal', label: '船舶名称', prop: 'vesselName', width: 140 },
+		{ type: 'normal', label: '船舶名称', prop: 'chineseVesselName', width: 140 },
 		{ type: 'normal', label: '通报事项类别', prop: 'conmStr', width: 120 },
 		{ type: 'normal', label: '通报事项', prop: 'notificationMatters' },
-		{ type: 'normal', label: '接收单位', prop: 'receivingUnit', width: 220 },
+		{ type: 'normal', label: '接收单位', prop: 'names', width: 220 },
 		{ type: 'normal', label: '整体通报状态', prop: 'releaseStatusStr', width: 220 },
 		{ type: 'normal', label: '是否需要反馈', prop: 'wfirStr', width: 220 },
 		{ type: 'normal', label: '发布日期', prop: 'releasedDate', width: 140 },

+ 2 - 2
src/views/notificationInfoManage/viewHistoricalData/config/content.config.ts

@@ -7,10 +7,10 @@ const contentConfig = {
 		{ type: 'index', label: '序号', fixed: true },
 		{ type: 'normal', label: '违法事件编号', prop: 'violationNumber', width: 140 },
 		{ type: 'normal', label: '发布单位', prop: 'releasedUnitStr', width: 140 },
-		{ type: 'normal', label: '船舶名称', prop: 'vesselName', width: 140 },
+		{ type: 'normal', label: '船舶名称', prop: 'chineseVesselName', width: 140 },
 		{ type: 'normal', label: '通报事项类别', prop: 'conmStr', width: 120 },
 		{ type: 'normal', label: '通报事项', prop: 'notificationMatters' },
-		{ type: 'normal', label: '接收单位', prop: 'receivingUnit', width: 220 },
+		{ type: 'normal', label: '接收单位', prop: 'names', width: 220 },
 		{ type: 'normal', label: '联络人电话', prop: 'callSign', width: 220 },
 		{ type: 'normal', label: '通报状态', prop: 'notificationStatusStr', width: 220 },
 		{ type: 'normal', label: '超期状态', prop: 'overdueStatusStr', width: 220 },