Ver código fonte

数据填报

Hwf 1 semana atrás
pai
commit
9f4b67507e

+ 1 - 58
src/views/dataFilling/dossierDetail.vue

@@ -174,64 +174,7 @@ const hotSettings = reactive({
   licenseKey: 'non-commercial-and-evaluation', // 隐藏版权文字
   colWidths: 129, // 默认单元格宽度
   rowHeights: 28, // 默认单元格高度
-  wordWrap: true, // 单元格文字是否换行展示
-  contextMenu: {
-    // 自定义右键菜单
-    items: {
-      'row_above': {
-        name: '向上插一行'
-      },
-      'row_below': {
-        name: '向下插一行'
-      },
-      'col_left': {
-        name: '向左插一列'
-      },
-      'col_right': {
-        name: '向右插一列'
-      },
-      'hsep1': '---------', // 分隔线
-      'remove_row': {
-        name: '删除当前行'
-      },
-      'remove_col': {
-        name: '删除当前列'
-      },
-      'clear_column': {
-        name: '清空当前列'
-      },
-      'hsep2': '---------', // 必须和上次的变量名不一样
-      'undo': {
-        name: '撤销'
-      },
-      'cut': {
-        name: '剪切'
-      },
-      'copy': {
-        name: '复制'
-      },
-      // 'alignment': {
-      //   name: '对齐'
-      // },
-      // 'hsep3': '---------',
-      // 'commentsAddEdit': {
-      //   // 必须开启 comments: true
-      //   name: '添加备注'
-      // },
-      // 'commentsRemove': {
-      //   // 必须开启 comments: true
-      //   name: '删除备注'
-      // },
-      // 'freeze_column': {
-      //   // 必须开启 manualColumnFreeze: true
-      //   name: '固定列'
-      // },
-      // 'unfreeze_column': {
-      //   // 必须开启 manualColumnFreeze: true
-      //   name: '取消固定列'
-      // }
-    }
-  }
+  wordWrap: true // 单元格文字是否换行展示
 });
 </script>
 

+ 10 - 2
src/views/dataFilling/tableDetails.vue

@@ -136,7 +136,6 @@
 <script setup lang="ts">
 import * as XLSX from 'xlsx';
 import { fillingAdd, fillingChange, fillingList, fillingRelease } from '@/api/dataFilling/fillingManage';
-import { useRouter } from 'vue-router';
 import { HotTable } from '@handsontable/vue3';
 import { getPhoneList } from '@/api/informationissue/informationissue';
 import informantSelect from './informantSelect.vue';
@@ -206,6 +205,9 @@ const fetchReportDetails = (reportId) => {
   return fillingList(reportId).then((res: any) => {
     reportInfo.value = res.report_info;
     hotSettings.readOnly = reportInfo.value.issued_status === 2;
+    if (reportInfo.value.issued_status === 2) {
+      hotSettings.contextMenu = false;
+    }
     reportInfo.value.user_filling_status = res.report_info.user_filling_status;
     personNum.value = reportInfo.value.user_ids.length; //统计需要填报的总人数
     let headers = [];
@@ -217,7 +219,6 @@ const fetchReportDetails = (reportId) => {
     const result = res.table_data.map(row =>
       headers.map(header => row[header])
     );
-    debugger
     hotData.value = result;
     nextTick(() => {
       showTable.value = true;
@@ -496,6 +497,13 @@ const handleDialogClose = () => {
   color: #67c23a;
   font-weight: bold;
 }
+.app-container {
+  :deep(.custom-disabled) {
+    .el-input__wrapper {
+      background-color: #ffffff !important;
+    }
+  }
+}
 .custom-disabled {
   :deep(.el-input.is-disabled) {
     .el-input__wrapper {