lin.liu 1 долоо хоног өмнө
parent
commit
c5c493d247

+ 4 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/request/checkrecord/ReqCreateCheckRecord.java

@@ -66,4 +66,8 @@ public class ReqCreateCheckRecord {
 	 * 是否直接提交(提交到网格管理员/暂存) EYesOrNo
 	 */
 	private Integer isSubmit;
+	/**
+	 * 备注
+	 */
+	private String remark;
 }

+ 12 - 0
secure-producting-business/src/main/java/com/customs/cq/datacenter/business/entity/response/check/ResCheckRecordItem.java

@@ -20,4 +20,16 @@ public class ResCheckRecordItem {
      * 检查结果 ECheckResult
      */
     private Integer checkResult;
+    /**
+     * 隐患描述
+     */
+    private String dangerDescription;
+    /**
+     * 整改措施
+     */
+    private String rectifyPlan;
+    /**
+     * 整改期限
+     */
+    private Long rectifyDeadline;
 }

+ 0 - 9
secure-producting-vue/src/api/form/DangerCheckRecord.js

@@ -26,15 +26,6 @@ export function submit(data) {
   })
 }
 
-// 编辑[隐患检查记录]
-export function modify(data) {
-  return request({
-    url: '/checkRecord/modify',
-    method: 'post',
-    data: data
-  })
-}
-
 // 我的隐患检查
 export function listMine(data) {
   return request({

+ 77 - 7
secure-producting-vue/src/views/check/DangerCheckRecordMine.vue

@@ -182,7 +182,7 @@
       >
         <template #default="scope">
           <el-button
-            v-if="scope.row.status === 20"
+            v-if="scope.row.status != 0"
             link
             type="primary"
             @click="handleDetail(scope.row)"
@@ -220,6 +220,40 @@
       @pagination="getList"
     />
 
+    <!-- 提交检查单/检查单详情模态框 -->
+    <el-dialog
+      :title="titleSubmit"
+      v-model="showSubmitCheck"
+      width="900px"
+      append-to-body
+    >
+      <!-- 设置对话框内容高度 -->
+      <div style="height:70vh;">
+        <el-scrollbar>
+          <submit-danger-check
+            ref="refSubmitCheck"
+            v-if="showSubmitCheck"
+            :checkRecordId="submitItem.id"
+            :checkFormNo="submitItem.checkFormNo"
+            :isSubmit="isSubmit"
+            :showDetail="showDetail"
+            @closeCallback="submitCallBack"
+          ></submit-danger-check>
+        </el-scrollbar>
+      </div>
+      <template #footer>
+      <div class="dialog-footer">
+        <el-button
+          v-if="!showDetail"
+          :loading="loadingSubmitCheck"
+          type="primary"
+          @click="submitCheck"
+        >提 交</el-button>
+        <el-button @click="showSubmitCheck = false">取 消</el-button>
+      </div>
+      </template>
+    </el-dialog>
+
     <!-- 撤回申请模态框 -->
     <el-dialog
       :title="titleRevoke"
@@ -258,9 +292,10 @@ import { listAllGridCategory } from "@/api/grid/GridCategory";
 import { listAllDangerCategory } from "@/api/danger/DangerCategory";
 import { listEnumValue } from "@/api/system/base"
 import {
-  submit, detail, modify, listMine, listAdminMine
+  submit, detail, listMine, listAdminMine, revoke
 } from "@/api/form/DangerCheckRecord";
 import { parseTime } from "@/utils/ruoyi"
+import SubmitDangerCheck from '@/views/grid/components/SubmitDangerCheck';
 
 const { proxy } = getCurrentInstance();
 
@@ -273,6 +308,14 @@ const checkFormStatusList = ref([]);
 const dataList = ref([]);
 
 
+const showSubmitCheck = ref(false);
+const submitItem = ref({});
+const loadingSubmitCheck = ref(false);
+const titleSubmit = ref('');
+const showDetail = ref(false);
+const isSubmit = ref(true);
+
+
 
 const titleRevoke = ref('');
 const showRevoke = ref(false);
@@ -294,9 +337,6 @@ const dateRangeCheckTime = ref([]);
 const ids = ref([]);
 const single = ref(true);
 const multiple = ref(true);
-const title = ref("");
-const cancelModifyTxt = ref("取 消");
-const isDetail = ref(false);
 
 const queryParams = ref({
   page: 1,
@@ -354,6 +394,36 @@ function handleSelectionChange(selection) {
 
 /** 详情按钮 */
 function handleDetail(row) {
+  submitItem.value = row;
+  isSubmit.value = false;
+  showSubmitCheck.value = true;
+  showDetail.value = true;
+  titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;
+}
+
+
+
+/** 指定网格-填报 */
+function handleDoForm(row) {
+  if (row.checkFormId === 0) {
+    proxy.$modal.msgError("当前网格没有配置检查表!");
+    return;
+  }
+  submitItem.value = row;
+  isSubmit.value = true;
+  showSubmitCheck.value = true;
+  showDetail.value = false;
+  titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;
+}
+
+function submitCheck() {
+  // 调用子组件的函数
+  proxy.$refs.refSubmitCheck.submitCheck();
+}
+
+function submitCallBack() {
+  showSubmitCheck.value = false;
+  getList();
 }
 
 
@@ -374,7 +444,7 @@ function revokeSubmit() {
     if (valid) {
       loadingRevoke.value = true;
       revoke(formRevoke.value).then((response) => {
-        getListPerson();
+        getList();
       })
       .finally(() => {
         showRevoke.value = false;
@@ -391,7 +461,7 @@ function onSubmitAdmin(id) {
   proxy.$modal.confirm('确认要提交到网格管理员吗?')
   .then(() => {
     submitAdmin(id).then((response) => {
-      getListPerson();
+      getList();
     })
     .finally(() => {
       //createLoading.value = false;

+ 6 - 3
secure-producting-vue/src/views/grid/components/MyGridAndCheck.vue

@@ -14,7 +14,7 @@
         <el-table-column label="操作" width="145">
           <template #default="scope">
             <el-button
-              v-if="scope.row.status === 20"
+              v-if="scope.row.status != 0"
               link
               type="info"
               icon="View"
@@ -46,7 +46,7 @@
       </el-table>
     </el-card>
 
-    <!-- 提交检查模态框 -->
+    <!-- 提交检查单/检查单详情模态框 -->
     <el-dialog
       :title="titleSubmit"
       v-model="showSubmitCheck"
@@ -61,6 +61,7 @@
             v-if="showSubmitCheck"
             :checkRecordId="submitItem.id"
             :checkFormNo="submitItem.checkFormNo"
+            :isSubmit="isSubmit"
             :showDetail="showDetail"
             @closeCallback="submitCallBack"
           ></submit-danger-check>
@@ -115,7 +116,6 @@
 import { listMine } from '@/api/grid/GridIndex';
 import { submitAdmin, revoke } from '@/api/form/DangerCheckRecord';
 import SubmitDangerCheck from '@/views/grid/components/SubmitDangerCheck';
-import { ref } from 'vue';
 
 const { proxy } = getCurrentInstance();
 
@@ -125,6 +125,7 @@ const submitItem = ref({});
 const loadingSubmitCheck = ref(false);
 const titleSubmit = ref('');
 const showDetail = ref(false);
+const isSubmit = ref(true);
 
 
 const titleRevoke = ref('');
@@ -153,6 +154,7 @@ function getListPerson() {
 
 /** 隐患检查单-填报详情 */
 function handleDetail(row) {
+  isSubmit.value = true;
   submitItem.value = row;
   showSubmitCheck.value = true;
   showDetail.value = true;
@@ -191,6 +193,7 @@ function handleDoForm(row) {
     return;
   }
   submitItem.value = row;
+  isSubmit.value = true;
   showSubmitCheck.value = true;
   showDetail.value = false;
   titleSubmit.value = '隐患检查单 - ' + row.checkFormNo;

+ 12 - 5
secure-producting-vue/src/views/grid/components/SubmitDangerCheck.vue

@@ -113,6 +113,7 @@
         ref="refFormCheckItemRectify"
         :model="formCheckItemRectify"
         :rules="rulesCheckItemRectify"
+        :disabled="props.showDetail"
         label-width="85px"
       >
         <el-form-item label="检查项" prop="itemName">
@@ -137,9 +138,10 @@
       <template #footer>
         <div class="dialog-footer">
           <el-button
+            v-if="!props.showDetail"
             type="primary"
             @click="submitCheckItemRectify"
-          >提 交</el-button>
+          >保 存</el-button>
           <el-button @click="dialogCheckItemRectify = false">取 消</el-button>
         </div>
       </template>
@@ -182,6 +184,11 @@ const props = defineProps({
         type: String,
         default: '',
     },
+    // 是否是填报
+    isSubmit: {
+      type: Boolean,
+      default: false
+    },
     // 是否是查看详情
     showDetail: {
       type: Boolean,
@@ -349,10 +356,10 @@ function getFormDetail() {
       let value = {...item};
       //value.itemName = '';
       //value.itemDescription = '';
-      value.checkResult = undefined;
-      value.isRectify = 0;
-      value.rectifyPlan = '';
-      value.rectifyDeadline = 0;
+      value.isRectify = (item.rectifyPlan && item.rectifyPlan != null && item.rectifyPlan != '') ? 1 : 0;
+      if (props.isSubmit) {
+        value.checkResult = undefined;
+      }
       formSubmit.value.listItem.push(value);
     }
   });