Bläddra i källkod

feat: 添加“添加”按钮并修改部门名称为申请部门名称

sunqijun 2 månader sedan
förälder
incheckning
d44a344a7b

+ 8 - 5
src/views/production-safety/risk-identification-and-control/construction-safety-manage/audit.vue

@@ -5,6 +5,9 @@
     </header>
 
     <main class="safety-platform-container__main">
+        <div style="margin-bottom:20px">
+            <el-button type="primary" @click="$router.push({ name: 'constructionSafetyManageAdd' })">添加 </el-button>
+        </div>
       <div class="search-form">
         <el-form :inline="true">
           <el-form-item label="项目名称">
@@ -18,7 +21,7 @@
               <el-option :value="3" label="已完成" />
             </el-select>
           </el-form-item>
-          <el-form-item label="部门名称">
+          <el-form-item label="申请部门名称">
             <el-cascader
               v-model="queryParams.queryParam.departmentId"
               style="width: 170px"
@@ -26,7 +29,7 @@
               :options="firstLevelDepts"
               :props="cascaderProp"
               :show-all-levels="false"
-              placeholder="部门名称"
+              placeholder="申请部门名称"
               filterable
               @change="handleChangeDept"
             />
@@ -41,7 +44,7 @@
         </el-form>
 
         <div>
-          <el-button type="primary" @click="$router.push({ name: 'constructionSafetyManageAdd' })">添加 </el-button>
+          
           <el-button type="primary" @click="queryTableList">查询</el-button>
           <el-button @click="handleRestParams">重置</el-button>
         </div>
@@ -223,8 +226,8 @@
   const handleChangeDept = () => {
     const deptInfo = cascaderRef.value?.getCheckedNodes();
     if (deptInfo?.[0]) {
-      queryParams.queryParam.department = deptInfo[0].label;
-      queryParams.queryParam.departmentId = deptInfo[0].pathValues;
+      queryParams.queryParam.department = deptInfo[0].value;
+      queryParams.queryParam.departmentId = deptInfo[0].value;
     }
   };
 

+ 11 - 6
src/views/production-safety/risk-identification-and-control/construction-safety-manage/list.vue

@@ -4,6 +4,9 @@
       <div class="breadcrumb-title"> 施工作业安全管理 </div>
     </header>
     <main class="safety-platform-container__main">
+        <div style="margin-bottom:20px">
+            <el-button type="primary" @click="$router.push({ name: 'constructionSafetyManageAdd' })">添加 </el-button>
+        </div>
       <div class="search-form">
         <el-form :inline="true">
           <el-form-item label="项目名称">
@@ -17,7 +20,7 @@
               <el-option :value="3" label="已完成" />
             </el-select>
           </el-form-item>
-          <el-form-item label="部门名称">
+          <el-form-item label="申请部门名称">
             <el-cascader
               v-model="queryParams.queryParam.departmentId"
               style="width: 170px"
@@ -25,7 +28,7 @@
               :options="firstLevelDepts"
               :props="cascaderProp"
               :show-all-levels="false"
-              placeholder="部门名称"
+              placeholder="申请部门名称"
               filterable
               @change="handleChangeDept"
             />
@@ -40,7 +43,7 @@
         </el-form>
 
         <div>
-          <el-button type="primary" @click="$router.push({ name: 'constructionSafetyManageAdd' })">添加 </el-button>
+          
           <el-button type="primary" @click="queryTableList">查询</el-button>
           <el-button @click="handleRestParams">重置</el-button>
         </div>
@@ -65,6 +68,7 @@
               >
               <el-button
                 type="primary"
+                v-if="scope.row.status === 1"
                 link
                 @click="$router.push({ name: 'constructionSafetyManageEdit', query: { id: scope.row.id } })"
                 >编辑</el-button
@@ -78,13 +82,14 @@
 
               <el-popconfirm title="确定要删除吗?" @confirm="handleConfirmDeleteRow(scope)">
                 <template #reference>
-                  <el-button type="primary" link>删除</el-button>
+                  <el-button type="primary" v-if="scope.row.status === 1" link>删除</el-button>
                 </template>
               </el-popconfirm>
               <!-- <el-button type="primary" link>审批</el-button> -->
               <el-button
                 type="primary"
                 link
+                v-if="scope.row.status === 3"
                 @click="$router.push({ name: 'constructionSafetyManageMonitor', query: { id: scope.row.id } })"
                 >视频监控</el-button
               >
@@ -228,8 +233,8 @@
   const handleChangeDept = () => {
     const deptInfo = cascaderRef.value?.getCheckedNodes();
     if (deptInfo?.[0]) {
-      queryParams.queryParam.department = deptInfo[0].label;
-      queryParams.queryParam.departmentId = deptInfo[0].pathValues;
+      queryParams.queryParam.department = deptInfo[0].value;
+      queryParams.queryParam.departmentId = deptInfo[0].value;
     }
   };
 

+ 4 - 1
src/views/production-safety/risk-identification-and-control/hazard-approval-manage/list.vue

@@ -4,6 +4,9 @@
       <div class="breadcrumb-title"> 危险作业审批管理 </div>
     </header>
     <main class="safety-platform-container__main">
+        <div style="margin-bottom:20px">
+            <el-button type="primary" @click="$router.push({ name: 'hazardApprovalManageAdd' })">添加 </el-button>
+        </div>
       <div class="search-form">
         <el-form :inline="true">
           <el-form-item label="申请单位名称">
@@ -40,7 +43,7 @@
         </el-form>
 
         <div>
-          <el-button type="primary" @click="$router.push({ name: 'hazardApprovalManageAdd' })">添加 </el-button>
+          
           <el-button type="primary" @click="queryTableList">查询</el-button>
           <el-button @click="handleRestParams">重置</el-button>
         </div>