Browse Source

fix: 优化组件代码格式,调整样式和注释位置

sunqijun 2 months ago
parent
commit
7186779b42

+ 4 - 4
src/views/production-safety/implement-safety-duty/agree-document-review.vue

@@ -2,9 +2,9 @@
   <div class="safety-platform-container">
     <el-alert v-if="showAlertBar" :title="formData?.rejection" type="warning" />
     <div class="breadcrumb-title">
-        <BreadcrumbBack />
-        {{ formData?.responsibilityName }}
-      </div>
+      <BreadcrumbBack />
+      {{ formData?.responsibilityName }}
+    </div>
     <header class="safety-platform-container__header">
       <div class="breadcrumb-title"> {{ formData?.responsibilityName }} </div>
       <div class="detail-content">
@@ -228,7 +228,7 @@
 <script lang="ts" setup>
   import { onMounted, ref, computed, reactive } from 'vue';
   import { ElMessage } from 'element-plus';
-// @ts-ignore: missing type declarations for CSS side-effect import
+  // @ts-ignore: missing type declarations for CSS side-effect import
   import '@wangeditor/editor/dist/css/style.css';
   import { useRouter, useRoute } from 'vue-router';
   import { downloadFile } from '@/views/disaster/utils';

+ 1 - 1
src/views/production-safety/implement-safety-duty/components/IssueSafetyResponsibility.vue

@@ -261,7 +261,7 @@
       //   const id = departmentOptions.find((d) => d.deptName === '院领导')?.id;
       //   formData.deptId = [id];
       // }
-    //   console.log('departmentOptions:', departmentOptions);
+      //   console.log('departmentOptions:', departmentOptions);
       formData.leader1 = null;
       formData.leader2 = null;
       formData.signPerson = [];

+ 1 - 1
src/views/production-safety/implement-safety-duty/create-responsibility-agree.vue

@@ -88,7 +88,7 @@
   import { onMounted, ref, nextTick, reactive, shallowRef } from 'vue';
   import dayjs from 'dayjs';
   import { ElMessage } from 'element-plus';
-// @ts-ignore: missing type declarations for CSS side-effect import
+  // @ts-ignore: missing type declarations for CSS side-effect import
   import '@wangeditor/editor/dist/css/style.css';
   import { Editor, Toolbar } from '@wangeditor/editor-for-vue';
   import { useRouter, useRoute } from 'vue-router';

+ 0 - 1
src/views/production-safety/implement-safety-duty/non-public-area-responsibilities/view.vue

@@ -61,7 +61,6 @@
             <el-option v-for="item in userOptions" :key="item.value" :label="item.label" :value="item.value" />
           </el-select>
         </el-form-item>
-        
 
         <el-form-item label="安全具体责任人">
           <el-select disabled v-model="formValue.safetySpecificPerson" size="large" style="width: 50%">

+ 2 - 9
src/views/production-safety/implement-safety-duty/responsibility-agree-manage-dept.vue

@@ -123,16 +123,9 @@
                 >
                   确认
                 </el-button>
-                <el-button
-                    v-if="scope.row.status === 3"
-                    type="primary"
-                    link
-                    @click="feedback(scope)"
-                  >
-                    反馈
-                  </el-button>
+                <el-button v-if="scope.row.status === 3" type="primary" link @click="feedback(scope)"> 反馈 </el-button>
                 <!-- <el-dropdown trigger="click"> -->
-                  <!-- <template #dropdown>
+                <!-- <template #dropdown>
                     <el-dropdown-menu>
                       <el-dropdown-item
                         @click="

+ 1 - 1
src/views/production-safety/implement-safety-duty/responsibility-feedback.vue

@@ -225,7 +225,7 @@
 <script lang="ts" setup>
   import { onMounted, ref, computed, reactive } from 'vue';
   import { ElMessage } from 'element-plus';
-// @ts-ignore: missing type declarations for CSS side-effect import
+  // @ts-ignore: missing type declarations for CSS side-effect import
   import '@wangeditor/editor/dist/css/style.css';
   import { useRouter, useRoute } from 'vue-router';
   import { downloadFile } from '@/views/disaster/utils';

+ 1 - 1
src/views/production-safety/implement-safety-duty/responsibility-notice-manage-admin/review.vue

@@ -109,7 +109,7 @@
 <script lang="ts" setup>
   import { onMounted, ref, nextTick, reactive, shallowRef } from 'vue';
   import { ElMessage } from 'element-plus';
-// @ts-ignore: missing type declarations for CSS side-effect import
+  // @ts-ignore: missing type declarations for CSS side-effect import
   import '@wangeditor/editor/dist/css/style.css';
   import { useRouter, useRoute } from 'vue-router';
   import { downloadFile } from '@/views/disaster/utils';

+ 38 - 29
src/views/production-safety/implement-safety-duty/sign-agree-dept.vue

@@ -197,7 +197,15 @@
   <PreviewOnline ref="previewOnlineRef" />
   <el-dialog v-model="dialogVisible" title="下一节点签署人" width="500">
     <el-form-item :label="currentLabel">
-      <el-select v-model="signerId" placeholder="请选择" size="large"  style="width: 100%" filterable remote :remote-method="remoteMethod">
+      <el-select
+        v-model="signerId"
+        placeholder="请选择"
+        size="large"
+        style="width: 100%"
+        filterable
+        remote
+        :remote-method="remoteMethod"
+      >
         <el-option v-for="item in userOptions" :key="item.value" :label="item.label" :value="item.value" />
       </el-select>
     </el-form-item>
@@ -336,13 +344,13 @@
             return;
           }
 
-// if (signerId.value) {
-//             // handleSubmitSign(firstSignItem).then(() => {
-//             //   handleSafetyResponsibilityDeptSaveSign(signerId.value, nextLevel, nextOrder);
-//             // });
-//           } else
+          // if (signerId.value) {
+          //             // handleSubmitSign(firstSignItem).then(() => {
+          //             //   handleSafetyResponsibilityDeptSaveSign(signerId.value, nextLevel, nextOrder);
+          //             // });
+          //           } else
 
-           if (currentLevel === 2 && currentDepartmentKey.value === 'D') {
+          if (currentLevel === 2 && currentDepartmentKey.value === 'D') {
             handleSubmitSign(firstSignItem);
           } else if (currentLevel === 3 && currentDepartmentKey.value === 'C') {
             handleSubmitSign(firstSignItem);
@@ -407,7 +415,7 @@
         submiting.value = false;
       });
   };
-// 下一节点签署人 保存
+  // 下一节点签署人 保存
   const handleDialogConfirm = async () => {
     const fullAttachment = formData.signRecords.every((item) => item.attachment || item.attachment?.length > 0);
     const signList = formData.signRecords.filter((item) => item.signFlag && item.signStatus === 0);
@@ -419,26 +427,27 @@
     const nextLevel = Math.min(currentLevel + 1, 3);
     const nextOrder = currentOrder + 1;
     if (signerId.value) {
-        const params = {
-            sign:{
-                signStatus: 0,
-                signLevel: nextLevel,
-                contractId: route.query.id,
-                signOrder: nextOrder,
-            },
-            signerId: signerId.value || null,
-            ids: [route.query.id],
-            attachment: JSON.stringify(firstSignItem?.attachment),
-        };
-        safetyResponsibilityDeptBatchSign(params).then(()=>{
-            ElMessage.success('责任书签署成功');
-            router.push({
-                name: 'responsibilityAgreeManageDept',
-            });
-            
-        }).finally(() => {
-        submiting.value = false;
-      });
+      const params = {
+        sign: {
+          signStatus: 0,
+          signLevel: nextLevel,
+          contractId: route.query.id,
+          signOrder: nextOrder,
+        },
+        signerId: signerId.value || null,
+        ids: [route.query.id],
+        attachment: JSON.stringify(firstSignItem?.attachment),
+      };
+      safetyResponsibilityDeptBatchSign(params)
+        .then(() => {
+          ElMessage.success('责任书签署成功');
+          router.push({
+            name: 'responsibilityAgreeManageDept',
+          });
+        })
+        .finally(() => {
+          submiting.value = false;
+        });
       dialogVisible.value = false;
     } else {
       ElMessage.warning('请选择签署人');
@@ -571,7 +580,7 @@
     border-right: 1px solid rgb(220, 223, 230);
     background-color: rgb(245, 247, 250);
   }
-  .back{
+  .back {
     display: flex;
     align-items: center;
     gap: 16px;

+ 2 - 2
src/views/production-safety/implement-safety-duty/view-recipients.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="safety-platform-container">
-      <div class="breadcrumb-title back"> <BreadcrumbBack /> {{ $route.meta.title }} </div>
+    <div class="breadcrumb-title back"> <BreadcrumbBack /> {{ $route.meta.title }} </div>
     <header class="safety-platform-container__header">
       <div class="detail-content">
         <span>类别名称:{{ detailData?.departmentName }} </span>
@@ -350,7 +350,7 @@
     display: flex;
     justify-content: flex-end;
   }
-    .back{
+  .back {
     display: flex;
     align-items: center;
     gap: 16px;