xiaweibo il y a 3 mois
Parent
commit
3d4875528c
14 fichiers modifiés avec 464 ajouts et 256 suppressions
  1. 9 2
      src/components/UploadFiles/UploadFiles.vue
  2. 7 10
      src/views/production-safety/productionSafetySystem/collegeFileManagement/components/collegeFileManagementDetail.vue
  3. 7 10
      src/views/production-safety/productionSafetySystem/doubleSystemManagement/components/doubleSystemManagementDetail.vue
  4. 7 10
      src/views/production-safety/productionSafetySystem/lawManagement/components/lawManagementDetail.vue
  5. 7 10
      src/views/production-safety/productionSafetySystem/safetyStandardizationSystemManagement/components/safetyStandardizationSystemManagementDetail.vue
  6. 45 21
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/configs/tables.ts
  7. 154 98
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/safetySystemConstructionWorkPlanManagement.vue
  8. 45 21
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/configs/tables.ts
  9. 168 56
      src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/safetySystemConstructionWorkPlanManagementDept.vue
  10. 7 10
      src/views/production-safety/productionSafetySystem/safetyTraining/components/safetyTrainingDetail.vue
  11. 2 2
      src/views/production-safety/safetyAssessment/evaluationSystem/components/EvaluationSystemDetail.vue
  12. 2 2
      src/views/production-safety/safetyAssessment/evaluationSystem/evaluationSystem.vue
  13. 2 2
      src/views/production-safety/safetyAssessment/receiptRecord/components/ReceiptRecordDetail.vue
  14. 2 2
      src/views/production-safety/safetyAssessment/receiptRecord/configs/form.ts

+ 9 - 2
src/components/UploadFiles/UploadFiles.vue

@@ -40,7 +40,13 @@
           <img :src="FILE_TYPE_ICON[file.fileType as keyof typeof FILE_TYPE_ICON]" />
           <span class="file-name">{{ file.fileName }}</span>
         </div>
-        <el-icon class="delete-button" @click="removeFile(file.fileId)"><Delete /></el-icon>
+        <el-icon 
+          v-if="!isUploadDisabled"
+          class="delete-button" 
+          @click="removeFile(file.fileId)"
+        >
+          <Delete />
+        </el-icon>
       </div>
     </div>
   </div>
@@ -58,6 +64,7 @@
     fileList?: FileItem[];
     maxSize?: number;
     maxCount?: number;
+    disabled?: boolean;
   }>();
 
   const inputId = `upload-file-${Math.random().toString(36).slice(2, 10)}`;
@@ -79,7 +86,7 @@
   });
 
   const isUploadDisabled = computed(() => {
-    return fileList.value.length >= MAX_COUNT.value;
+    return props.disabled || fileList.value.length >= MAX_COUNT.value;
   });
 
   // 检查文件是否已存在

+ 7 - 10
src/views/production-safety/productionSafetySystem/collegeFileManagement/components/collegeFileManagementDetail.vue

@@ -14,20 +14,18 @@
       </template>
       <template #fileUrl>
         <UploadFiles
-          v-if="!isViewMode"
           label="上传文件"
           :maxCount="1"
           :fileList="uploadFileList"
           @uploadSuccess="handleUploadSuccess"
         />
-        <div v-else-if="ruleFormData.fileUrl" class="file-display">
-          <a :href="ruleFormData.fileUrl" target="_blank" class="file-link">{{ getFileName(ruleFormData.fileUrl) }}</a>
-        </div>
-        <span v-else class="no-file">暂无文件</span>
       </template>
       <template #content>
-        <div v-if="!isViewMode" class="editor-container">
-          <Toolbar style="border-bottom: 1px solid #dcdfe6" :editor="editorRef" />
+        <div class="editor-container">
+          <Toolbar 
+            style="border-bottom: 1px solid #dcdfe6" 
+            :editor="editorRef" 
+          />
           <Editor
             style="height: 400px; overflow-y: auto"
             v-model="ruleFormData.content"
@@ -37,7 +35,6 @@
             @on-change="handleEditorChange"
           />
         </div>
-        <div v-else class="content-display" v-html="ruleFormData.content || '暂无内容'"></div>
       </template>
       <template #status>
         <el-radio-group v-model="ruleFormData.status" :disabled="isViewMode">
@@ -108,10 +105,10 @@
   
   // 富文本编辑器
   const editorRef = shallowRef();
-  const editorConfig = {
+  const editorConfig = computed(() => ({
     placeholder: '请输入文档内容',
     MENU_CONF: {},
-  };
+  }));
 
   const handleEditorCreated = (editor: any) => {
     editorRef.value = editor;

+ 7 - 10
src/views/production-safety/productionSafetySystem/doubleSystemManagement/components/doubleSystemManagementDetail.vue

@@ -14,20 +14,18 @@
       </template>
       <template #fileUrl>
         <UploadFiles
-          v-if="!isViewMode"
           label="上传文件"
           :maxCount="1"
           :fileList="uploadFileList"
           @uploadSuccess="handleUploadSuccess"
         />
-        <div v-else-if="ruleFormData.fileUrl" class="file-display">
-          <a :href="ruleFormData.fileUrl" target="_blank" class="file-link">{{ getFileName(ruleFormData.fileUrl) }}</a>
-        </div>
-        <span v-else class="no-file">暂无文件</span>
       </template>
       <template #content>
-        <div v-if="!isViewMode" class="editor-container">
-          <Toolbar style="border-bottom: 1px solid #dcdfe6" :editor="editorRef" />
+        <div class="editor-container">
+          <Toolbar 
+            style="border-bottom: 1px solid #dcdfe6" 
+            :editor="editorRef" 
+          />
           <Editor
             style="height: 400px; overflow-y: auto"
             v-model="ruleFormData.content"
@@ -37,7 +35,6 @@
             @on-change="handleEditorChange"
           />
         </div>
-        <div v-else class="content-display" v-html="ruleFormData.content || '暂无内容'"></div>
       </template>
       <template #status>
         <el-radio-group v-model="ruleFormData.status" :disabled="isViewMode">
@@ -108,10 +105,10 @@
   
   // 富文本编辑器
   const editorRef = shallowRef();
-  const editorConfig = {
+  const editorConfig = computed(() => ({
     placeholder: '请输入文档内容',
     MENU_CONF: {},
-  };
+  }));
 
   const handleEditorCreated = (editor: any) => {
     editorRef.value = editor;

+ 7 - 10
src/views/production-safety/productionSafetySystem/lawManagement/components/lawManagementDetail.vue

@@ -14,20 +14,18 @@
       </template>
       <template #fileUrl>
         <UploadFiles
-          v-if="!isViewMode"
           label="上传文件"
           :maxCount="1"
           :fileList="uploadFileList"
           @uploadSuccess="handleUploadSuccess"
         />
-        <div v-else-if="ruleFormData.fileUrl" class="file-display">
-          <a :href="ruleFormData.fileUrl" target="_blank" class="file-link">{{ getFileName(ruleFormData.fileUrl) }}</a>
-        </div>
-        <span v-else class="no-file">暂无文件</span>
       </template>
       <template #content>
-        <div v-if="!isViewMode" class="editor-container">
-          <Toolbar style="border-bottom: 1px solid #dcdfe6" :editor="editorRef" />
+        <div class="editor-container">
+          <Toolbar 
+            style="border-bottom: 1px solid #dcdfe6" 
+            :editor="editorRef" 
+          />
           <Editor
             style="height: 400px; overflow-y: auto"
             v-model="ruleFormData.content"
@@ -37,7 +35,6 @@
             @on-change="handleEditorChange"
           />
         </div>
-        <div v-else class="content-display" v-html="ruleFormData.content || '暂无内容'"></div>
       </template>
       <template #status>
         <el-radio-group v-model="ruleFormData.status" :disabled="isViewMode">
@@ -108,10 +105,10 @@
   
   // 富文本编辑器
   const editorRef = shallowRef();
-  const editorConfig = {
+  const editorConfig = computed(() => ({
     placeholder: '请输入文档内容',
     MENU_CONF: {},
-  };
+  }));
 
   const handleEditorCreated = (editor: any) => {
     editorRef.value = editor;

+ 7 - 10
src/views/production-safety/productionSafetySystem/safetyStandardizationSystemManagement/components/safetyStandardizationSystemManagementDetail.vue

@@ -14,20 +14,18 @@
       </template>
       <template #fileUrl>
         <UploadFiles
-          v-if="!isViewMode"
           label="上传文件"
           :maxCount="1"
           :fileList="uploadFileList"
           @uploadSuccess="handleUploadSuccess"
         />
-        <div v-else-if="ruleFormData.fileUrl" class="file-display">
-          <a :href="ruleFormData.fileUrl" target="_blank" class="file-link">{{ getFileName(ruleFormData.fileUrl) }}</a>
-        </div>
-        <span v-else class="no-file">暂无文件</span>
       </template>
       <template #content>
-        <div v-if="!isViewMode" class="editor-container">
-          <Toolbar style="border-bottom: 1px solid #dcdfe6" :editor="editorRef" />
+        <div class="editor-container">
+          <Toolbar 
+            style="border-bottom: 1px solid #dcdfe6" 
+            :editor="editorRef" 
+          />
           <Editor
             style="height: 400px; overflow-y: auto"
             v-model="ruleFormData.content"
@@ -37,7 +35,6 @@
             @on-change="handleEditorChange"
           />
         </div>
-        <div v-else class="content-display" v-html="ruleFormData.content || '暂无内容'"></div>
       </template>
       <template #status>
         <el-radio-group v-model="ruleFormData.status" :disabled="isViewMode">
@@ -116,10 +113,10 @@
   
   // 富文本编辑器
   const editorRef = shallowRef();
-  const editorConfig = {
+  const editorConfig = computed(() => ({
     placeholder: '请输入文档内容',
     MENU_CONF: {},
-  };
+  }));
 
   const handleEditorCreated = (editor: any) => {
     editorRef.value = editor;

+ 45 - 21
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/configs/tables.ts

@@ -7,7 +7,23 @@ export const TABLE_OPTIONS = {
   maxHeight: 'calc(70vh - 150px)',
 };
 
-export const INVENTORY_TABLE_COLUMNS: TableColumnProps[] = [
+// 状态选项
+export const WORK_PLAN_STATUS_OPTIONS = [
+  { label: '未下发', value: 0 },
+  { label: '进行中', value: 1 },
+  { label: '已完成', value: 2 },
+  { label: '已作废', value: 3 },
+];
+
+// 状态标签映射
+export const WORK_PLAN_STATUS_LABEL: Record<string, string> = {
+  '0': '未下发',
+  '1': '进行中',
+  '2': '已完成',
+  '3': '已作废',
+};
+
+export const WORK_PLAN_TABLE_COLUMNS: TableColumnProps[] = [
   {
     label: '编号',
     type: 'index',
@@ -15,48 +31,56 @@ export const INVENTORY_TABLE_COLUMNS: TableColumnProps[] = [
     width: '80px',
   },
   {
-    label: '物品名称',
-    prop: 'itemName',
+    label: '工作内容',
+    prop: 'workContent',
     align: 'left',
-    minWidth: '120px',
+    minWidth: '150px',
+    showOverflowTooltip: true,
+  },
+  {
+    label: '状态',
+    prop: 'status',
+    slot: 'status',
+    align: 'center',
+    minWidth: '100px',
   },
   {
-    label: '入库日期',
-    prop: 'warehouseDate',
+    label: '分类名称',
+    prop: 'classifyName',
     align: 'left',
     minWidth: '120px',
   },
   {
-    label: '物品数量',
-    prop: 'itemQuantity',
-    align: 'center',
-    minWidth: '120px',
+    label: '培训计划名称',
+    prop: 'trainingPlanName',
+    align: 'left',
+    minWidth: '150px',
+    showOverflowTooltip: true,
   },
   {
-    label: '经办人',
-    prop: 'handler',
+    label: '责任部门',
+    prop: 'responsibleDept',
     align: 'left',
     minWidth: '120px',
   },
   {
-    label: '备注',
-    prop: 'remarks',
+    label: '配合部门',
+    prop: 'cooperateDept',
     align: 'left',
-    minWidth: '150px',
+    minWidth: '120px',
   },
   {
-    label: '状态',
-    prop: 'status',
-    slot: 'status',
-    align: 'center',
-    minWidth: '100px',
+    label: '计划完成时间',
+    prop: 'planCompleteTime',
+    align: 'left',
+    minWidth: '160px',
   },
   {
     label: '操作',
     prop: 'action',
     slot: 'action',
     fixed: 'right',
-    width: '180px',
+    width: '280px',
     align: 'left',
   },
 ];

+ 154 - 98
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagement/safetySystemConstructionWorkPlanManagement.vue

@@ -1,7 +1,7 @@
 <template>
   <div class="safety-platform-container">
     <header class="safety-platform-container__header">
-      <div class="breadcrumb-title"> 物品库存管理 </div>
+      <div class="breadcrumb-title"> 安全体系建设工作计划管理(管理员) </div>
     </header>
     <main class="safety-platform-container__main">
       <div class="search-table-container">
@@ -10,21 +10,15 @@
             <el-button type="primary" class="search-table-container--button" @click="handleCreate">
               添加
             </el-button>
-            <el-button plain class="search-table-container--button" @click="handleImport">
-              导入
-            </el-button>
-            <el-button plain class="search-table-container--button" @click="handleDownload">
-              导出
-            </el-button>
           </div>
 
           <div class="act-search">
             <section class="select-box">
               <div class="select-box--item">
-                <span>物品名称:</span>
+                <span>工作内容/计划名称:</span>
                 <el-input
-                  v-model="tableQuery.queryParam.stuffName"
-                  placeholder="搜索物品名称"
+                  v-model="tableQuery.queryParam.keyword"
+                  placeholder="搜索工作内容或计划名称"
                   class="act-search-input"
                 />
               </div>
@@ -35,10 +29,42 @@
                   placeholder="请选择状态"
                   clearable
                 >
-                  <el-option label="启用" :value="true" />
-                  <el-option label="禁用" :value="false" />
+                  <el-option
+                    v-for="item in WORK_PLAN_STATUS_OPTIONS"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </div>
+              <div class="select-box--item">
+                <span>分类名称:</span>
+                <el-select
+                  v-model="tableQuery.queryParam.classifyName"
+                  placeholder="请选择分类名称"
+                  filterable
+                  clearable
+                >
+                  <el-option
+                    v-for="item in classifyNameOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </div>
+              <div>
+                <span>计划日期范围:</span>
+                <el-date-picker
+                  v-model="dateRange"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                />
+              </div>
             </section>
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
@@ -57,36 +83,59 @@
           >
             <template #status="scope">
               <span>
-                {{ scope.row.statusName || (scope.row.status === true || scope.row.status === 'true' ? '启用' : scope.row.status === false || scope.row.status === 'false' ? '禁用' : '-') }}
+                {{ WORK_PLAN_STATUS_LABEL[String(scope.row.status)] || '-' }}
               </span>
             </template>
             <template #action="scope">
               <div class="action-container--div" style="justify-content: left">
-                <ActionButton text="编辑" @click="handleEdit(scope.row.id)" />
-                <ActionButton
-                  text="删除"
-                  :popconfirm="{
-                    title: '确定要删除?',
-                  }"
-                  @confirm="handleDelete(scope.row.id)"
-                />
-                <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                <!-- 未下发(0):编辑、删除、查看发送对象、下发 -->
+                <template v-if="Number(scope.row.status) === 0">
+                  <ActionButton text="编辑" @click="handleEdit(scope.row.id)" />
+                  <ActionButton
+                    text="删除"
+                    :popconfirm="{
+                      title: '确定要删除?',
+                    }"
+                    @confirm="handleDelete(scope.row.id)"
+                  />
+                  <ActionButton text="查看发送对象" @click="handleViewRecipients(scope.row.id)" />
+                  <ActionButton text="下发" @click="handleIssue(scope.row.id)" />
+                </template>
+
+                <!-- 进行中(1)/待反馈:查看 -->
+                <template v-else-if="Number(scope.row.status) === 1">
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                </template>
+
+                <!-- 已完成(2):删除、查看 -->
+                <template v-else-if="Number(scope.row.status) === 2">
+                  <ActionButton
+                    text="删除"
+                    :popconfirm="{
+                      title: '确定要删除?',
+                    }"
+                    @confirm="handleDelete(scope.row.id)"
+                  />
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                </template>
+
+                <!-- 已作废(3):删除、查看 -->
+                <template v-else-if="Number(scope.row.status) === 3">
+                  <ActionButton
+                    text="删除"
+                    :popconfirm="{
+                      title: '确定要删除?',
+                    }"
+                    @confirm="handleDelete(scope.row.id)"
+                  />
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                </template>
               </div>
             </template>
           </BasicTable>
         </div>
       </div>
     </main>
-    <BatchImport
-      v-if="batchImportVisible"
-      :visible="batchImportVisible"
-      :import-api-url="importApiUrl"
-      :template-url="templateUrl"
-      template-name="下载模板"
-      :show-template="false"
-      @close="batchImportVisible = false"
-      @update="handleUpdate"
-    />
   </div>
 </template>
 
@@ -96,31 +145,39 @@
   import BasicTable from '@/components/BasicTable.vue';
   import useTableConfig from '@/hooks/useTableConfigHook';
   import ActionButton from '@/components/ActionButton.vue';
-  import { TABLE_OPTIONS, INVENTORY_TABLE_COLUMNS } from './configs/tables';
+  import { TABLE_OPTIONS, WORK_PLAN_TABLE_COLUMNS, WORK_PLAN_STATUS_OPTIONS, WORK_PLAN_STATUS_LABEL } from './configs/tables';
   import { useRouter } from 'vue-router';
   import type { QueryPageRequest } from '@/types/basic-query';
-  import { queryInventoryManage, deleteInventory, exportInventory } from '@/api/inventory';
-  import { downloadByData } from '@/utils/file/download';
-  import BatchImport from '@/components/batch-import/BatchImport.vue';
-  import { useGlobSetting } from '@/hooks/setting';
-  import urlJoin from 'url-join';
+  // TODO: 替换为实际的工作计划管理API
+  // import { queryWorkPlanPage, deleteWorkPlan, issueWorkPlan } from '@/api/workPlan';
 
   const router = useRouter();
 
   // 表格
   const basicTableRef = ref<InstanceType<typeof BasicTable>>();
 
-  const { tableConfig, pagination } = useTableConfig(INVENTORY_TABLE_COLUMNS, TABLE_OPTIONS);
+  const { tableConfig, pagination } = useTableConfig(WORK_PLAN_TABLE_COLUMNS, TABLE_OPTIONS);
 
   const tableData = ref<any[]>([]);
 
+  // 日期范围
+  const dateRange = ref<[string, string] | null>(null);
+
+  // 分类名称选项(TODO: 从接口获取或使用字典)
+  const classifyNameOptions = ref<Array<{ label: string; value: string }>>([
+    // { label: '分类1', value: '分类1' },
+    // { label: '分类2', value: '分类2' },
+  ]);
+
   const tableQuery = reactive<QueryPageRequest<any>>({
     pageNumber: pagination.pageNumber,
     pageSize: pagination.pageSize,
     queryParam: {
-      stuffName: '', // 物品名称
-      status: true, // 状态,默认启用
-      ids: [], // 选择数据的ID
+      keyword: '', // 工作内容/计划名称
+      status: undefined, // 状态
+      classifyName: '', // 分类名称
+      planStartTime: '', // 计划开始时间
+      planEndTime: '', // 计划结束时间
     },
   });
 
@@ -136,27 +193,31 @@
     getTableData();
   };
 
-
   async function getTableData() {
     tableConfig.loading = true;
     try {
-      const res = await queryInventoryManage(tableQuery);
-      if (res) {
-        // 映射返回数据字段到表格字段
-        tableData.value = res.records.map((item) => ({
-          id: item.id,
-          itemName: item.stuffName, // 物品名称
-          warehouseDate: item.inStoreTime, // 入库日期
-          itemQuantity: item.stuffQty, // 物品数量
-          handler: item.createdUserName, // 经办人
-          remarks: item.remark, // 备注
-          status: item.status, // 状态:true-启用,false-禁用
-          statusName: item.statusName, // 状态名称
-        }));
-        pagination.total = res.totalRow;
-      }
+      // TODO: 替换为实际的工作计划管理API调用
+      // const res = await queryWorkPlanPage(tableQuery);
+      // if (res) {
+      //   tableData.value = res.records.map((item) => ({
+      //     id: item.id,
+      //     workContent: item.workContent || item.planName, // 工作内容
+      //     status: item.status, // 状态
+      //     classifyName: item.classifyName, // 分类名称
+      //     trainingPlanName: item.trainingPlanName, // 培训计划名称
+      //     responsibleDept: item.responsibleDept, // 责任部门
+      //     cooperateDept: item.cooperateDept, // 配合部门
+      //     planCompleteTime: item.planCompleteTime, // 计划完成时间
+      //   }));
+      //   pagination.total = res.totalRow;
+      // }
+      
+      // 临时数据,用于测试
+      tableData.value = [];
+      pagination.total = 0;
     } catch (e) {
-      console.error('获取物品库存列表失败:', e);
+      console.error('获取工作计划列表失败:', e);
+      ElMessage.error('获取工作计划列表失败');
       tableData.value = [];
       pagination.total = 0;
     } finally {
@@ -165,52 +226,29 @@
   }
 
   const handleSearch = () => {
+    // 处理日期范围
+    if (dateRange.value && dateRange.value.length === 2) {
+      tableQuery.queryParam.planStartTime = dateRange.value[0];
+      tableQuery.queryParam.planEndTime = dateRange.value[1];
+    } else {
+      tableQuery.queryParam.planStartTime = '';
+      tableQuery.queryParam.planEndTime = '';
+    }
     pagination.pageNumber = 1;
     tableQuery.pageNumber = 1;
     getTableData();
   };
 
   const handleReset = () => {
-    tableQuery.queryParam.stuffName = '';
-    tableQuery.queryParam.status = true; // 重置为默认启用状态
-    tableQuery.queryParam.ids = [];
+    tableQuery.queryParam.keyword = '';
+    tableQuery.queryParam.status = undefined;
+    tableQuery.queryParam.classifyName = '';
+    tableQuery.queryParam.planStartTime = '';
+    tableQuery.queryParam.planEndTime = '';
+    dateRange.value = null;
     handleSearch();
   };
 
-  // 批量导入
-  const batchImportVisible = ref(false);
-  const { urlPrefix } = useGlobSetting();
-  const importApiUrl = ref(urlJoin(urlPrefix, '/inventory/importInventory'));
-  const templateUrl = ref('./skyeye-file-upload/sfysecurity/TEMPLATE/import-inventory-template.xlsx');
-
-  const handleImport = () => {
-    batchImportVisible.value = true;
-  };
-
-  const handleUpdate = () => {
-    batchImportVisible.value = false;
-    getTableData();
-  };
-
-  const handleDownload = async () => {
-    try {
-      const exportParams = {
-        stuffName: tableQuery.queryParam.stuffName || undefined,
-        status: tableQuery.queryParam.status,
-        ids: tableQuery.queryParam.ids.length > 0 ? tableQuery.queryParam.ids : undefined,
-      };
-      const response = await exportInventory(exportParams);
-      if (response) {
-        const fileName = `物品库存管理_${new Date().toISOString().split('T')[0]}.xlsx`;
-        downloadByData(response, fileName);
-        ElMessage.success('导出成功');
-      }
-    } catch (e) {
-      console.error('导出物品库存失败:', e);
-      ElMessage.error('导出失败,请重试');
-    }
-  };
-
   const handleCreate = () => {
     router.push({
       name: 'SafetySystemConstructionWorkPlanManagementItem',
@@ -232,7 +270,8 @@
 
   const handleDelete = async (id: number) => {
     try {
-      await deleteInventory(id);
+      // TODO: 替换为实际的工作计划删除API
+      // await deleteWorkPlan(id);
       ElMessage.success('删除成功');
       getTableData();
     } catch (e) {
@@ -251,6 +290,23 @@
     });
   };
 
+  const handleViewRecipients = (id: number) => {
+    // TODO: 实现查看发送对象功能
+    ElMessage.info('查看发送对象功能待实现');
+  };
+
+  const handleIssue = async (id: number) => {
+    try {
+      // TODO: 替换为实际的工作计划下发API
+      // await issueWorkPlan(id);
+      ElMessage.success('下发成功');
+      getTableData();
+    } catch (e) {
+      console.error('下发工作计划失败:', e);
+      ElMessage.error('下发失败,请重试');
+    }
+  };
+
   onMounted(() => {
     getTableData();
   });
@@ -261,4 +317,4 @@
   @use '@/styles/page-main-layout.scss' as *;
   @use '@/styles/basic-table-action.scss' as *;
   @use '@/views/traffic/violation/style/act-search-table.scss' as *;
-</style>
+</style>

+ 45 - 21
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/configs/tables.ts

@@ -7,7 +7,23 @@ export const TABLE_OPTIONS = {
   maxHeight: 'calc(70vh - 150px)',
 };
 
-export const INVENTORY_TABLE_COLUMNS: TableColumnProps[] = [
+// 状态选项
+export const WORK_PLAN_STATUS_OPTIONS = [
+  { label: '未下发', value: 0 },
+  { label: '进行中', value: 1 },
+  { label: '已完成', value: 2 },
+  { label: '已作废', value: 3 },
+];
+
+// 状态标签映射
+export const WORK_PLAN_STATUS_LABEL: Record<string, string> = {
+  '0': '未下发',
+  '1': '进行中',
+  '2': '已完成',
+  '3': '已作废',
+};
+
+export const WORK_PLAN_TABLE_COLUMNS: TableColumnProps[] = [
   {
     label: '编号',
     type: 'index',
@@ -15,48 +31,56 @@ export const INVENTORY_TABLE_COLUMNS: TableColumnProps[] = [
     width: '80px',
   },
   {
-    label: '物品名称',
-    prop: 'itemName',
+    label: '工作内容',
+    prop: 'workContent',
     align: 'left',
-    minWidth: '120px',
+    minWidth: '150px',
+    showOverflowTooltip: true,
+  },
+  {
+    label: '状态',
+    prop: 'status',
+    slot: 'status',
+    align: 'center',
+    minWidth: '100px',
   },
   {
-    label: '入库日期',
-    prop: 'warehouseDate',
+    label: '分类名称',
+    prop: 'classifyName',
     align: 'left',
     minWidth: '120px',
   },
   {
-    label: '物品数量',
-    prop: 'itemQuantity',
-    align: 'center',
-    minWidth: '120px',
+    label: '培训计划名称',
+    prop: 'trainingPlanName',
+    align: 'left',
+    minWidth: '150px',
+    showOverflowTooltip: true,
   },
   {
-    label: '经办人',
-    prop: 'handler',
+    label: '责任部门',
+    prop: 'responsibleDept',
     align: 'left',
     minWidth: '120px',
   },
   {
-    label: '备注',
-    prop: 'remarks',
+    label: '配合部门',
+    prop: 'cooperateDept',
     align: 'left',
-    minWidth: '150px',
+    minWidth: '120px',
   },
   {
-    label: '状态',
-    prop: 'status',
-    slot: 'status',
-    align: 'center',
-    minWidth: '100px',
+    label: '计划完成时间',
+    prop: 'planCompleteTime',
+    align: 'left',
+    minWidth: '160px',
   },
   {
     label: '操作',
     prop: 'action',
     slot: 'action',
     fixed: 'right',
-    width: '180px',
+    width: '280px',
     align: 'left',
   },
 ];

+ 168 - 56
src/views/production-safety/productionSafetySystem/safetySystemConstructionWorkPlanManagementDept/safetySystemConstructionWorkPlanManagementDept.vue

@@ -1,24 +1,18 @@
 <template>
   <div class="safety-platform-container">
     <header class="safety-platform-container__header">
-      <div class="breadcrumb-title"> 物品库存管理 </div>
+      <div class="breadcrumb-title"> 安全体系建设工作计划管理(部门) </div>
     </header>
     <main class="safety-platform-container__main">
       <div class="search-table-container">
         <header>
-          <div style="position: relative">
-            <el-button plain class="search-table-container--button" @click="handleDownload">
-              导出
-            </el-button>
-          </div>
-
           <div class="act-search">
             <section class="select-box">
               <div class="select-box--item">
-                <span>物品名称:</span>
+                <span>工作内容/计划名称:</span>
                 <el-input
-                  v-model="tableQuery.queryParam.stuffName"
-                  placeholder="搜索物品名称"
+                  v-model="tableQuery.queryParam.keyword"
+                  placeholder="搜索工作内容或计划名称"
                   class="act-search-input"
                 />
               </div>
@@ -29,10 +23,42 @@
                   placeholder="请选择状态"
                   clearable
                 >
-                  <el-option label="启用" :value="true" />
-                  <el-option label="禁用" :value="false" />
+                  <el-option
+                    v-for="item in WORK_PLAN_STATUS_OPTIONS"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
                 </el-select>
               </div>
+              <div class="select-box--item">
+                <span>分类名称:</span>
+                <el-select
+                  v-model="tableQuery.queryParam.classifyName"
+                  placeholder="请选择分类名称"
+                  filterable
+                  clearable
+                >
+                  <el-option
+                    v-for="item in classifyNameOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  />
+                </el-select>
+              </div>
+              <div>
+                <span>计划日期范围:</span>
+                <el-date-picker
+                  v-model="dateRange"
+                  type="daterange"
+                  range-separator="至"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期"
+                  value-format="YYYY-MM-DD"
+                  format="YYYY-MM-DD"
+                />
+              </div>
             </section>
             <section class="search-btn">
               <el-button type="primary" @click="handleSearch">查询</el-button>
@@ -51,12 +77,53 @@
           >
             <template #status="scope">
               <span>
-                {{ scope.row.statusName || (scope.row.status === true || scope.row.status === 'true' ? '启用' : scope.row.status === false || scope.row.status === 'false' ? '禁用' : '-') }}
+                {{ WORK_PLAN_STATUS_LABEL[String(scope.row.status)] || '-' }}
               </span>
             </template>
             <template #action="scope">
               <div class="action-container--div" style="justify-content: left">
-                <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                <!-- 未下发(0):编辑、删除、查看发送对象、下发 -->
+                <template v-if="Number(scope.row.status) === 0">
+                  <ActionButton text="编辑" @click="handleEdit(scope.row.id)" />
+                  <ActionButton
+                    text="删除"
+                    :popconfirm="{
+                      title: '确定要删除?',
+                    }"
+                    @confirm="handleDelete(scope.row.id)"
+                  />
+                  <ActionButton text="查看发送对象" @click="handleViewRecipients(scope.row.id)" />
+                  <ActionButton text="下发" @click="handleIssue(scope.row.id)" />
+                </template>
+
+                <!-- 进行中(1)/待反馈:查看 -->
+                <template v-else-if="Number(scope.row.status) === 1">
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                </template>
+
+                <!-- 已完成(2):删除、查看 -->
+                <template v-else-if="Number(scope.row.status) === 2">
+                  <ActionButton
+                    text="删除"
+                    :popconfirm="{
+                      title: '确定要删除?',
+                    }"
+                    @confirm="handleDelete(scope.row.id)"
+                  />
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                </template>
+
+                <!-- 已作废(3):删除、查看 -->
+                <template v-else-if="Number(scope.row.status) === 3">
+                  <ActionButton
+                    text="删除"
+                    :popconfirm="{
+                      title: '确定要删除?',
+                    }"
+                    @confirm="handleDelete(scope.row.id)"
+                  />
+                  <ActionButton text="查看" @click="handleView(scope.row.id)" />
+                </template>
               </div>
             </template>
           </BasicTable>
@@ -72,28 +139,39 @@
   import BasicTable from '@/components/BasicTable.vue';
   import useTableConfig from '@/hooks/useTableConfigHook';
   import ActionButton from '@/components/ActionButton.vue';
-  import { TABLE_OPTIONS, INVENTORY_TABLE_COLUMNS } from './configs/tables';
+  import { TABLE_OPTIONS, WORK_PLAN_TABLE_COLUMNS, WORK_PLAN_STATUS_OPTIONS, WORK_PLAN_STATUS_LABEL } from './configs/tables';
   import { useRouter } from 'vue-router';
   import type { QueryPageRequest } from '@/types/basic-query';
-  import { queryInventoryManage, exportInventory } from '@/api/inventory';
-  import { downloadByData } from '@/utils/file/download';
+  // TODO: 替换为实际的工作计划管理API
+  // import { queryWorkPlanDeptPage, deleteWorkPlan, issueWorkPlan } from '@/api/workPlan';
 
   const router = useRouter();
 
   // 表格
   const basicTableRef = ref<InstanceType<typeof BasicTable>>();
 
-  const { tableConfig, pagination } = useTableConfig(INVENTORY_TABLE_COLUMNS, TABLE_OPTIONS);
+  const { tableConfig, pagination } = useTableConfig(WORK_PLAN_TABLE_COLUMNS, TABLE_OPTIONS);
 
   const tableData = ref<any[]>([]);
 
+  // 日期范围
+  const dateRange = ref<[string, string] | null>(null);
+
+  // 分类名称选项(TODO: 从接口获取或使用字典)
+  const classifyNameOptions = ref<Array<{ label: string; value: string }>>([
+    // { label: '分类1', value: '分类1' },
+    // { label: '分类2', value: '分类2' },
+  ]);
+
   const tableQuery = reactive<QueryPageRequest<any>>({
     pageNumber: pagination.pageNumber,
     pageSize: pagination.pageSize,
     queryParam: {
-      stuffName: '', // 物品名称
-      status: true, // 状态,默认启用
-      ids: [], // 选择数据的ID
+      keyword: '', // 工作内容/计划名称
+      status: undefined, // 状态
+      classifyName: '', // 分类名称
+      planStartTime: '', // 计划开始时间
+      planEndTime: '', // 计划结束时间
     },
   });
 
@@ -109,27 +187,31 @@
     getTableData();
   };
 
-
   async function getTableData() {
     tableConfig.loading = true;
     try {
-      const res = await queryInventoryManage(tableQuery);
-      if (res) {
-        // 映射返回数据字段到表格字段
-        tableData.value = res.records.map((item) => ({
-          id: item.id,
-          itemName: item.stuffName, // 物品名称
-          warehouseDate: item.inStoreTime, // 入库日期
-          itemQuantity: item.stuffQty, // 物品数量
-          handler: item.createdUserName, // 经办人
-          remarks: item.remark, // 备注
-          status: item.status, // 状态:true-启用,false-禁用
-          statusName: item.statusName, // 状态名称
-        }));
-        pagination.total = res.totalRow;
-      }
+      // TODO: 替换为实际的工作计划管理API调用
+      // const res = await queryWorkPlanDeptPage(tableQuery);
+      // if (res) {
+      //   tableData.value = res.records.map((item) => ({
+      //     id: item.id,
+      //     workContent: item.workContent || item.planName, // 工作内容
+      //     status: item.status, // 状态
+      //     classifyName: item.classifyName, // 分类名称
+      //     trainingPlanName: item.trainingPlanName, // 培训计划名称
+      //     responsibleDept: item.responsibleDept, // 责任部门
+      //     cooperateDept: item.cooperateDept, // 配合部门
+      //     planCompleteTime: item.planCompleteTime, // 计划完成时间
+      //   }));
+      //   pagination.total = res.totalRow;
+      // }
+      
+      // 临时数据,用于测试
+      tableData.value = [];
+      pagination.total = 0;
     } catch (e) {
-      console.error('获取物品库存列表失败:', e);
+      console.error('获取工作计划列表失败:', e);
+      ElMessage.error('获取工作计划列表失败');
       tableData.value = [];
       pagination.total = 0;
     } finally {
@@ -138,35 +220,48 @@
   }
 
   const handleSearch = () => {
+    // 处理日期范围
+    if (dateRange.value && dateRange.value.length === 2) {
+      tableQuery.queryParam.planStartTime = dateRange.value[0];
+      tableQuery.queryParam.planEndTime = dateRange.value[1];
+    } else {
+      tableQuery.queryParam.planStartTime = '';
+      tableQuery.queryParam.planEndTime = '';
+    }
     pagination.pageNumber = 1;
     tableQuery.pageNumber = 1;
     getTableData();
   };
 
   const handleReset = () => {
-    tableQuery.queryParam.stuffName = '';
-    tableQuery.queryParam.status = true; // 重置为默认启用状态
-    tableQuery.queryParam.ids = [];
+    tableQuery.queryParam.keyword = '';
+    tableQuery.queryParam.status = undefined;
+    tableQuery.queryParam.classifyName = '';
+    tableQuery.queryParam.planStartTime = '';
+    tableQuery.queryParam.planEndTime = '';
+    dateRange.value = null;
     handleSearch();
   };
 
+  const handleEdit = (id: number) => {
+    router.push({
+      name: 'SafetySystemConstructionWorkPlanManagementDeptItem',
+      query: {
+        id,
+        operate: 'work-plan-dept-edit',
+      },
+    });
+  };
 
-  const handleDownload = async () => {
+  const handleDelete = async (id: number) => {
     try {
-      const exportParams = {
-        stuffName: tableQuery.queryParam.stuffName || undefined,
-        status: tableQuery.queryParam.status,
-        ids: tableQuery.queryParam.ids.length > 0 ? tableQuery.queryParam.ids : undefined,
-      };
-      const response = await exportInventory(exportParams);
-      if (response) {
-        const fileName = `物品库存管理_${new Date().toISOString().split('T')[0]}.xlsx`;
-        downloadByData(response, fileName);
-        ElMessage.success('导出成功');
-      }
+      // TODO: 替换为实际的工作计划删除API
+      // await deleteWorkPlan(id);
+      ElMessage.success('删除成功');
+      getTableData();
     } catch (e) {
-      console.error('导出物品库存失败:', e);
-      ElMessage.error('导出失败,请重试');
+      console.error('删除工作计划失败:', e);
+      ElMessage.error('删除失败,请重试');
     }
   };
 
@@ -180,6 +275,23 @@
     });
   };
 
+  const handleViewRecipients = (id: number) => {
+    // TODO: 实现查看发送对象功能
+    ElMessage.info('查看发送对象功能待实现');
+  };
+
+  const handleIssue = async (id: number) => {
+    try {
+      // TODO: 替换为实际的工作计划下发API
+      // await issueWorkPlan(id);
+      ElMessage.success('下发成功');
+      getTableData();
+    } catch (e) {
+      console.error('下发工作计划失败:', e);
+      ElMessage.error('下发失败,请重试');
+    }
+  };
+
   onMounted(() => {
     getTableData();
   });
@@ -190,4 +302,4 @@
   @use '@/styles/page-main-layout.scss' as *;
   @use '@/styles/basic-table-action.scss' as *;
   @use '@/views/traffic/violation/style/act-search-table.scss' as *;
-</style>
+</style>

+ 7 - 10
src/views/production-safety/productionSafetySystem/safetyTraining/components/safetyTrainingDetail.vue

@@ -14,20 +14,18 @@
       </template>
       <template #fileUrl>
         <UploadFiles
-          v-if="!isViewMode"
           label="上传文件"
           :maxCount="1"
           :fileList="uploadFileList"
           @uploadSuccess="handleUploadSuccess"
         />
-        <div v-else-if="ruleFormData.fileUrl" class="file-display">
-          <a :href="ruleFormData.fileUrl" target="_blank" class="file-link">{{ getFileName(ruleFormData.fileUrl) }}</a>
-        </div>
-        <span v-else class="no-file">暂无文件</span>
       </template>
       <template #content>
-        <div v-if="!isViewMode" class="editor-container">
-          <Toolbar style="border-bottom: 1px solid #dcdfe6" :editor="editorRef" />
+        <div class="editor-container">
+          <Toolbar 
+            style="border-bottom: 1px solid #dcdfe6" 
+            :editor="editorRef" 
+          />
           <Editor
             style="height: 400px; overflow-y: auto"
             v-model="ruleFormData.content"
@@ -37,7 +35,6 @@
             @on-change="handleEditorChange"
           />
         </div>
-        <div v-else class="content-display" v-html="ruleFormData.content || '暂无内容'"></div>
       </template>
       <template #status>
         <el-radio-group v-model="ruleFormData.status" :disabled="isViewMode">
@@ -115,10 +112,10 @@
 
   // 富文本编辑器
   const editorRef = shallowRef();
-  const editorConfig = {
+  const editorConfig = computed(() => ({
     placeholder: '请输入文档内容',
     MENU_CONF: {},
-  };
+  }));
 
   const handleEditorCreated = (editor: any) => {
     editorRef.value = editor;

+ 2 - 2
src/views/production-safety/safetyAssessment/evaluationSystem/components/EvaluationSystemDetail.vue

@@ -171,7 +171,7 @@
   import type { FileItem } from '@/components/UploadFiles/types';
   import { useUserInfoHook } from '@/hooks/useUserInfoHook';
   import { formatAttachmentList } from '@/components/UploadFiles/utils';
-  import { getUserList } from '@/api/system/user-operate';
+  import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
 
   const props = defineProps<{
     id?: number;
@@ -210,7 +210,7 @@
   const reviewUserList = ref<UserLisItem[]>([]);
   const getReviewUserList = async () => {
     try {
-      const res = await getUserList({
+      const res = await queryAvailableUserList({
         pageNumber: 1,
         pageSize: 9999,
         queryParam: {}, // 不传递 deptId 参数

+ 2 - 2
src/views/production-safety/safetyAssessment/evaluationSystem/evaluationSystem.vue

@@ -306,7 +306,7 @@
   import type { DeptTree } from '@/types/dept/type';
   import { queryUserGroupPage } from '@/api/system/person-group';
   import type { PersonGroupListItem } from '@/types/person-group/type';
-  import { getUserList } from '@/api/system/user-operate';
+  import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
   import type { UserLisItem } from '@/api/system/user-operate';
 
   const router = useRouter();
@@ -377,7 +377,7 @@
   // 获取部门自评审核人用户列表
   const getDeptSelfApproveUserList = async () => {
     try {
-      const res = await getUserList({
+      const res = await queryAvailableUserList({
         pageNumber: 1,
         pageSize: 9999,
         queryParam: {}, // 不传递 deptId 参数

+ 2 - 2
src/views/production-safety/safetyAssessment/receiptRecord/components/ReceiptRecordDetail.vue

@@ -88,7 +88,7 @@
   import type { InventoryItem } from '@/api/inventory';
   import { getAllDepartments } from '@/api/auth/dept';
   import type { DeptTree } from '@/types/dept/type';
-  import { getUserList } from '@/api/system/user-operate';
+  import { queryAvailableUserList } from '@/api/production-safety/responsibility-implementation';
   import type { UserLisItem } from '@/api/system/user-operate';
 
   const router = useRouter();
@@ -145,7 +145,7 @@
   const recipientUserList = ref<UserLisItem[]>([]);
   const getRecipientUserList = async (deptId: number) => {
     try {
-      const res = await getUserList({
+      const res = await queryAvailableUserList({
         pageNumber: 1,
         pageSize: 9999,
         queryParam: {

+ 2 - 2
src/views/production-safety/safetyAssessment/receiptRecord/configs/form.ts

@@ -50,7 +50,7 @@ export const RECEIPT_RECORD_FORM_CONFIG: FormConfig[] = [
   {
     prop: 'recipient',
     label: '领取人:',
-    slot: 'recipient', // 使用用户列表接口(getUserList + el-select)
+    slot: 'recipient', // 使用用户列表接口(queryAvailableUserList + el-select)
     componentProps: {
       placeholder: '请选择领取人',
     },
@@ -64,7 +64,7 @@ export const RECEIPT_RECORD_FORM_DATA = {
   receiptNumber: '',
   deptId: null as number | null, // 部门ID(部门级联,与应急预案制定部门同源)
   department: '', // 部门名称,提交给接口的 deptName
-  recipientUserId: null as number | null, // 领取人用户ID(通过getUserList接口获取)
+  recipientUserId: null as number | null, // 领取人用户ID(通过queryAvailableUserList接口获取)
   recipient: '', // 领取人姓名,提交给接口的 userName
   pimId: 0, // 物品库存ID(用于提交时使用,兼容旧数据)
 };