yanghao преди 2 дни
родител
ревизия
8aae559e32

+ 1 - 1
.env.local

@@ -4,7 +4,7 @@ NODE_ENV=development
 VITE_DEV=true
 
 # 请求路径  http://192.168.188.200:48080  https://iot.deepoil.cc  http://172.26.0.56:48080
-VITE_BASE_URL='http://172.21.0.198:58080'
+VITE_BASE_URL='http://172.26.0.56:48080'
 
 # 文件上传类型:server - 后端上传, client - 前端直连上传,仅支持 S3 服务
 VITE_UPLOAD_TYPE=server

+ 1 - 1
src/router/modules/remaining.ts

@@ -2310,7 +2310,7 @@ const remainingRouter: AppRouteRecordRaw[] = [
       {
         path: 'month_report/detail/:id',
         component: () => import('@/views/pms/qhse/monthlyReport/MonthlyReport.vue'),
-        name: 'MonthlyReportEdit',
+        name: 'MonthlyReportInfo',
         meta: {
           noCache: true,
           canto: true,

+ 39 - 20
src/views/pms/qhse/monthlyReport/MonthlyReport.vue

@@ -17,17 +17,9 @@
         <el-row :gutter="16">
           <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
             <el-form-item label="部门名称" prop="deptId">
-              <!-- <el-input
-                v-model="deptName"
-                placeholder="请选择部门"
-                readonly
-                @click="openDeptSelect">
-                <template #suffix>
-                  <Icon icon="ep:search" class="cursor-pointer" />
-                </template>
-              </el-input> -->
               <el-tree-select
                 clearable
+                disabled
                 v-model="formData.deptId"
                 :data="deptList2"
                 :props="defaultProps"
@@ -39,7 +31,7 @@
           </el-col>
           <el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
             <el-form-item label="月报标题" prop="title">
-              <el-input v-model="formData.title" placeholder="请输入月报标题" />
+              <el-input disabled v-model="formData.title" placeholder="请输入月报标题" />
             </el-form-item>
           </el-col>
         </el-row>
@@ -51,6 +43,7 @@
                 type="month"
                 placeholder="选择年月"
                 format="YYYY-MM"
+                disabled
                 value-format="YYYY-MM"
                 style="width: 100%" />
             </el-form-item>
@@ -72,6 +65,7 @@
               <el-input-number
                 v-model="formData.employee"
                 :min="0"
+                disabled
                 :precision="0"
                 controls-position="right"
                 style="width: 100%" />
@@ -83,6 +77,7 @@
                 v-model="formData.subcontractors"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -93,6 +88,7 @@
                 v-model="formData.drivingMileage"
                 :min="0"
                 :precision="2"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -103,6 +99,7 @@
                 v-model="formData.totalManHours"
                 :min="0"
                 :precision="2"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -125,6 +122,7 @@
                 v-model="formData.withoutAccident"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -135,6 +133,7 @@
                 v-model="formData.fatality"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -144,6 +143,7 @@
               <el-input-number
                 v-model="formData.injury"
                 :min="0"
+                disabled
                 :precision="0"
                 controls-position="right"
                 style="width: 100%" />
@@ -155,6 +155,7 @@
                 v-model="formData.restrictedCase"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -166,6 +167,7 @@
               <el-input-number
                 v-model="formData.medicalCase"
                 :min="0"
+                disabled
                 :precision="0"
                 controls-position="right"
                 style="width: 100%" />
@@ -177,6 +179,7 @@
                 v-model="formData.firstAidCase"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -187,6 +190,7 @@
                 v-model="formData.vehicleAccident"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -196,6 +200,7 @@
               <el-input-number
                 v-model="formData.nearMiss"
                 :min="0"
+                disabled
                 :precision="0"
                 controls-position="right"
                 style="width: 100%" />
@@ -209,6 +214,7 @@
                 v-model="formData.spill"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -219,6 +225,7 @@
                 v-model="formData.lifeSavingRules"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -241,6 +248,7 @@
                 v-model="formData.toolboxTalk"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -251,6 +259,7 @@
                 v-model="formData.committeeMeeting"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -261,6 +270,7 @@
                 v-model="formData.monthlyMeeting"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -271,6 +281,7 @@
                 v-model="formData.companyHazard"
                 :min="0"
                 :precision="0"
+                disabled
                 controls-position="right"
                 style="width: 100%" />
             </el-form-item>
@@ -282,6 +293,7 @@
               <el-input-number
                 v-model="formData.qhseInspection"
                 :min="0"
+                disabled
                 :precision="0"
                 controls-position="right"
                 style="width: 100%" />
@@ -329,6 +341,7 @@
                 :min="0"
                 :precision="0"
                 controls-position="right"
+                disabled
                 style="width: 100%" />
             </el-form-item>
           </el-col>
@@ -339,6 +352,7 @@
                 :min="0"
                 :precision="0"
                 controls-position="right"
+                disabled
                 style="width: 100%" />
             </el-form-item>
           </el-col>
@@ -349,6 +363,7 @@
                 :min="0"
                 :precision="0"
                 controls-position="right"
+                disabled
                 style="width: 100%" />
             </el-form-item>
           </el-col>
@@ -359,6 +374,7 @@
                 :min="0"
                 :precision="2"
                 controls-position="right"
+                disabled
                 style="width: 100%" />
             </el-form-item>
           </el-col>
@@ -381,6 +397,7 @@
                 :min="0"
                 :precision="2"
                 controls-position="right"
+                disabled
                 style="width: 100%" />
             </el-form-item>
           </el-col>
@@ -391,6 +408,7 @@
                 :min="0"
                 :precision="2"
                 controls-position="right"
+                disabled
                 style="width: 100%" />
             </el-form-item>
           </el-col>
@@ -399,6 +417,7 @@
               <el-input-number
                 v-model="formData.electricityConsumption"
                 :min="0"
+                disabled
                 :precision="2"
                 controls-position="right"
                 style="width: 100%" />
@@ -409,6 +428,7 @@
               <el-input-number
                 v-model="formData.naturalGasConsumption"
                 :min="0"
+                disabled
                 :precision="2"
                 controls-position="right"
                 style="width: 100%" />
@@ -432,6 +452,7 @@
                 v-model="dutyPersonName"
                 placeholder="请选择填报人"
                 readonly
+                disabled
                 @click="openUserSelect">
                 <template #suffix>
                   <Icon icon="ep:search" class="cursor-pointer" />
@@ -447,6 +468,7 @@
                 v-model="formData.remark"
                 type="textarea"
                 :rows="4"
+                disabled
                 placeholder="请输入备注信息" />
             </el-form-item>
           </el-col>
@@ -455,8 +477,7 @@
 
       <!-- 操作按钮 -->
       <div class="form-actions">
-        <el-button @click="handleCancel">取消</el-button>
-        <el-button type="primary" @click="handleSubmit" :loading="submitLoading"> 提交 </el-button>
+        <el-button type="primary" @click="back"> 返回 </el-button>
       </div>
     </el-form>
 
@@ -478,8 +499,10 @@ import UserSelectForm from '@/components/UserSelectForm/index.vue'
 import { handleTree, defaultProps } from '@/utils/tree'
 import * as DeptApi from '@/api/system/dept'
 const deptList2 = ref<Tree[]>([]) // 树形结构
+import { useTagsViewStore } from '@/store/modules/tagsView'
+const { delView } = useTagsViewStore()
 
-defineOptions({ name: 'MonthlyReport' })
+defineOptions({ name: 'MonthlyReportInfo' })
 
 const router = useRouter()
 const route = useRoute()
@@ -548,11 +571,6 @@ const deptSelectFormRef = ref()
 // 用户选择弹窗引用
 const userSelectFormRef = ref()
 
-/** 打开部门选择 */
-const openDeptSelect = () => {
-  deptSelectFormRef.value?.open()
-}
-
 /** 部门选择确认 */
 const handleDeptConfirm = async (deptList: any[]) => {
   if (deptList && deptList.length > 0) {
@@ -598,8 +616,9 @@ const handleSubmit = async () => {
 }
 
 /** 取消 */
-const handleCancel = () => {
-  router.back()
+const back = () => {
+  delView(unref(router.currentRoute))
+  router.push({ name: 'QhseMonthlyReport', params: {} })
 }
 
 onMounted(async () => {

+ 4 - 9
src/views/pms/qhse/monthlyReport/MonthlyReportAdd.vue

@@ -478,6 +478,8 @@ import UserSelectForm from '@/components/UserSelectForm/index.vue'
 import { handleTree, defaultProps } from '@/utils/tree'
 import * as DeptApi from '@/api/system/dept'
 const deptList2 = ref<Tree[]>([]) // 树形结构
+import { useTagsViewStore } from '@/store/modules/tagsView'
+const { delView } = useTagsViewStore()
 
 defineOptions({ name: 'MonthlyReportAdd' })
 
@@ -542,17 +544,9 @@ const deptName = ref('')
 // 填报人名称显示
 const dutyPersonName = ref('')
 
-// 部门选择弹窗引用
-const deptSelectFormRef = ref()
-
 // 用户选择弹窗引用
 const userSelectFormRef = ref()
 
-/** 打开部门选择 */
-const openDeptSelect = () => {
-  deptSelectFormRef.value?.open()
-}
-
 /** 部门选择确认 */
 const handleDeptConfirm = async (deptList: any[]) => {
   if (deptList && deptList.length > 0) {
@@ -599,7 +593,8 @@ const handleSubmit = async () => {
 
 /** 取消 */
 const handleCancel = () => {
-  router.back()
+  delView(unref(router.currentRoute))
+  router.push({ name: 'QhseMonthlyReport', params: {} })
 }
 
 onMounted(async () => {

+ 1 - 1
src/views/pms/qhse/monthlyReport/index.vue

@@ -44,7 +44,7 @@
           style="width: 100%"
           :header-cell-style="{ background: '#f5f7fa', color: '#333' }"
           :cell-style="{ padding: '12px 8px' }"
-          height="52.7vh">
+          height="70.8vh">
           <zm-table-column
             prop="title"
             label="月报标题"