Преглед на файлове

安全检查、履职手册管理界面调整

jiawuxian преди 1 година
родител
ревизия
5a1532c67f

+ 3 - 1
src/api/safetycheck/ruleManager.js

@@ -10,10 +10,12 @@ export function treeData() {
 
 // 查询【请填写功能名称】列表
 export function page(query) {
+  console.info("asdfasd",`"${JSON.stringify(query)}"`) 
   return request({
     url: '/core/safetycheck/ruleItem/page',
     method: 'get',
-    params: query
+    // data: query
+     params:query
   })
 }
 

+ 5 - 2
src/views/question/list/dialog.vue

@@ -207,12 +207,12 @@ export default {
         color: "#000",
         "text-align": "center",
         height: "40px",
-        "min-width": "150px",
+        "width": "150px",
         "word-break": "keep-all",
       },
       content_style: {
         "text-align": "left",
-        "min-width": "300px",
+        "width": "300px",
         "word-break": "break-all",
       },
       // 弹出层标题
@@ -402,6 +402,9 @@ export default {
 };
 </script>
 <style lang="scss" scoped>
+.margin-top{
+    margin-bottom: -21px;
+  }
 .form {
   padding-top: 20px;
 }

+ 3 - 3
src/views/question/reform/dialog.vue

@@ -80,7 +80,7 @@
 
       <el-descriptions
         :column="2"
-        class="contentArea"
+        class="margin-top"
         v-if="data.confirmDissent"
       >
         <el-descriptions-item label="审核结果">{{
@@ -180,12 +180,12 @@ export default {
         color: "#000",
         "text-align": "center",
         height: "40px",
-        "min-width": "150px",
+        "width": "150px",
         "word-break": "keep-all",
       },
       content_style: {
         "text-align": "left",
-        "min-width": "300px",
+        "width": "300px",
         "word-break": "break-all",
       },
       // 弹出层标题

+ 1 - 1
src/views/resumption/plan/dialog.edit.vue

@@ -26,7 +26,7 @@
                   name="planName"
                   placeholder="请输入任务名称"
                   clearable
-                  style="width: 217px"
+                  style="width: 217px;max-height:33px"
                 />
               </el-form-item>
             </el-col>

+ 85 - 77
src/views/resumption/ruleManager/index.vue

@@ -82,14 +82,14 @@
                   @click="onSelect()"
                   >选择</el-button
                 > -->
-                <el-button
+                <!-- <el-button
                   type="primary"
                   :icon="expandAll ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
                   @click="dakai"
                   size="mini"
                   :disabled="rule ? false : true"
                   >{{ expandAll ? "收起所有行" : "展开所有行" }}</el-button
-                >
+                > -->
               </el-col>
               <right-toolbar
                 :showSearch.sync="showSearch"
@@ -100,94 +100,34 @@
           <el-table
             size="small"
             :data="tableData"
+            :span-method="spanMethod"
             border
-            :default-expand-all="expandAll"
             v-if="fresh"
             style="width: 100%"
-            :cell-style="tableCellStyle"
-            :header-cell-style="tableHeaderCellStyle"
+            
             v-loading="loading"
             height="600"
           >
-            <el-table-column type="expand">
-              <template slot-scope="props">
-                <el-table
-                  :data="props.row.pointDtoList"
-                  style="width: 100%"
-                  size="small"
-                  :header-cell-style="pointTableHeaderCellStyle"
-                >
-                  <el-table-column type="index"></el-table-column>
-                  <el-table-column
-                    align="center"
-                    prop="name"
-                    label="履职内容"
-                    v-if="columns[3].visible"
-                  >
-                    <template slot-scope="scope">
-                      <div style="white-space: pre-wrap">
-                        {{ scope.row.name }}
-                      </div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    align="center"
-                    prop="areaName"
-                    label="履职区域"
-                    width="200"
-                    show-overflow-tooltip
-                    v-if="columns[4].visible"
-                  >
-                  </el-table-column>
-                  <el-table-column
-                    prop="checkName"
-                    label="履职点位"
-                    width="200"
-                    show-overflow-tooltip
-                    align="center"
-                  >
-                  </el-table-column>
-                  <!-- <el-table-column prop="dataTypeName" label="数据类型">
-                </el-table-column>
-                <el-table-column prop="degreeRiskName" label="风险等级">
-                </el-table-column> -->
-                </el-table>
-              </template>
-            </el-table-column>
             <el-table-column
               align="center"
               type="index"
-              label="序号"
-              width="80"
+              label="履职项序号"
+              width="120"
               v-if="columns[0].visible"
             >
-              <template slot-scope="scope">
-                {{
-                  arabicToChinese(
-                    (queryParams.pageNum - 1) * queryParams.pageSize +
-                      scope.$index +
-                      1
-                  )
-                }}
+              <template slot-scope="scope">({{
+                  arabicToChinese(scope.row.itemIndex)
+                }})                
               </template>
             </el-table-column>
             <el-table-column
               align="center"
               prop="name"
               label="履职项"
+              width="350"
               v-if="columns[1].visible"
             >
             </el-table-column>
-            <!-- <el-table-column prop="itemDesc" label="标准及要求">
-          </el-table-column> -->
-            <el-table-column
-              align="center"
-              prop="pointNums"
-              label="履职内容数量"
-              width="200"
-              v-if="columns[2].visible"
-            >
-            </el-table-column>
             <el-table-column
               align="center"
               label="操作"
@@ -214,6 +154,31 @@
                 >
               </template>
             </el-table-column>
+            <el-table-column align="center" width="150px" label="履职内容序号" prop="pointIndex"></el-table-column>
+            <el-table-column
+              align="center"
+              prop="pointName"
+              label="履职内容"
+              v-if="columns[3].visible"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="areaName"
+              label="履职区域"
+              width="150"
+              show-overflow-tooltip
+              v-if="columns[4].visible"
+            >
+            </el-table-column>
+            <el-table-column
+              prop="checkName"
+              label="履职点位"
+              width="150"
+              show-overflow-tooltip
+              align="center"
+            >
+            </el-table-column>
           </el-table>
           <pagination
             v-show="total > 0"
@@ -358,11 +323,45 @@ export default {
       }
       this.tableData = [];
       this.loading = true;
-      page(this.queryParams).then((data) => {
-        this.tableData = data.rows;
-        this.total = Number.parseInt(data.total);
-        this.loading = false;
-      });
+      page(this.queryParams)
+        .then((data) => {
+          // debugger
+          this.loading=false;
+          let d = [];
+          let itemIndex = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + 1;
+         
+          for (let item of data.rows) {
+            let { id, name } = item;
+            let first = true;
+            let pointIndex = 1;
+            for (let p of item.pointDtoList) {
+              let { name: pointName, areaName, checkName } = p;
+              let r = {
+                id,
+                name,
+                pointName,
+                areaName,
+                checkName,
+                pointIndex,
+                itemIndex,
+              };
+              pointIndex++;
+
+              if (first) {
+                r.rowSpan = item.pointDtoList.length;
+                first = false;
+              }
+              d.push(r);
+            }
+            itemIndex++;
+          }
+          
+          this.tableData=d;
+          this.total = Number.parseInt(data.total);
+        })
+        .catch(() => {
+          this.loading = false;
+        });
     },
     clicktreenode(data, node) {
       this.tableData = [];
@@ -446,10 +445,19 @@ export default {
     tableHeaderCellStyle() {
       return "border-color:#aaa;";
     },
-    pointTableHeaderCellStyle(){
+    pointTableHeaderCellStyle() {
       // return "background-color:#d7d7d7 !important";
       return "";
-    }
+    },
+    spanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex < 3) {
+        if (row.rowSpan > 0) {
+          return [row.rowSpan, 1];
+        } else {
+          return [0, 0];
+        }
+      }
+    },
   },
 };
 </script>

+ 3 - 2
src/views/safetycheck/plan/dialog.edit.vue

@@ -25,7 +25,7 @@
                   name="planName"
                   placeholder="请输入任务名称"
                   clearable
-                  style="width: 217px"
+                  style="width: 217px;max-height:33px"
                 />
               </el-form-item>
             </el-col>
@@ -136,7 +136,8 @@
                   v-model="formData.roleIds"
                   placeholder="请选择检查人员"
                   multiple   
-                  clearable      
+                  clearable     
+
                   @change="handleRolesChange"
                 >
                   <el-option

+ 81 - 67
src/views/safetycheck/ruleManager/index.vue

@@ -83,14 +83,14 @@
                 @click="onSelect()"
                 >选择</el-button
               > -->
-                <el-button
+                <!-- <el-button
                   type="primary"
                   :icon="expandAll ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
                   @click="dakai"
                   size="mini"
                   :disabled="rule ? false : true"
                   >{{ expandAll ? "收起所有行" : "展开所有行" }}</el-button
-                >
+                > -->
               </el-col>
               <right-toolbar
                 :showSearch.sync="showSearch"
@@ -107,77 +107,29 @@
             style="width: 100%"
             v-loading="loading"
             height="600"
-            :cell-style="tableCellStyle"
-            :header-cell-style="tableHeaderCellStyle"
+            :span-method="spanMethod"
           >
-            <el-table-column align="center" type="expand">
-              <template slot-scope="props">
-                <el-table
-                  :data="props.row.pointDtoList"
-                  border
-                  style="width: 100%"
-                  size="small"
-                  :header-cell-style="pointTableHeaderCellStyle"
-                >
-                  <el-table-column type="index" />
-                  <el-table-column
-                    align="center"
-                    prop="name"
-                    label="检查内容"
-                    v-if="columns[3].visible"
-                  >
-                    <template slot-scope="scope">
-                      <div style="white-space: pre-wrap">
-                        {{ scope.row.name }}
-                      </div>
-                    </template>
-                  </el-table-column>
-                  <el-table-column
-                    align="center"
-                    prop="areaName"
-                    label="检查区域"
-                    width="200"
-                    show-overflow-tooltip
-                    v-if="columns[4].visible"
-                  >
-                  </el-table-column>
-                </el-table>
-              </template>
-            </el-table-column>
             <el-table-column
               align="center"
               type="index"
-              label="序号"
-              width="80"
+              label="履职项序号"
+              width="120"
               v-if="columns[0].visible"
             >
-              <template slot-scope="scope">
-                {{
-                  arabicToChinese(
-                    (queryParams.pageNum - 1) * queryParams.pageSize +
-                      scope.$index +
-                      1
-                  )
-                }}
+              <template slot-scope="scope"
+                >({{ arabicToChinese(scope.row.itemIndex) }})
               </template>
             </el-table-column>
             <el-table-column
               align="center"
               prop="name"
-              label="检查项"
+              label="履职项"
+              width="350"
               v-if="columns[1].visible"
             >
             </el-table-column>
             <el-table-column
               align="center"
-              prop="pointNums"
-              label="检查内容数量"
-              width="200"
-              v-if="columns[2].visible"
-            >
-            </el-table-column>
-            <el-table-column
-              align="center"
               label="操作"
               width="200"
               v-if="rule && rule.orgId == orgId && rule.status == 0"
@@ -202,6 +154,28 @@
                 >
               </template>
             </el-table-column>
+            <el-table-column
+              align="center"
+              width="150px"
+              label="履职内容序号"
+              prop="pointIndex"
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              prop="pointName"
+              label="履职内容"
+              v-if="columns[3].visible"
+            >
+            </el-table-column>
+            <el-table-column
+              align="center"
+              prop="areaName"
+              label="履职区域"
+              width="150"
+              show-overflow-tooltip
+              v-if="columns[4].visible"
+            >
+            </el-table-column>           
           </el-table>
           <pagination
             v-show="total > 0"
@@ -341,14 +315,45 @@ export default {
         this.$message.warning("请先选择一个手册");
         return;
       }
-      this.loading = true;
-      this.tableData = [];
-      const data = await page(this.queryParams).then((data) => {
-        this.tableData = data.rows;
-        this.total = Number.parseInt(data.total);
-        this.expandAll = false;
-        this.loading = false;
-      });
+      page(this.queryParams)
+        .then((data) => {
+          // debugger
+          this.loading=false;
+          let d = [];
+          let itemIndex = (this.queryParams.pageNum - 1) * this.queryParams.pageSize + 1;
+         
+          for (let item of data.rows) {
+            let { id, name } = item;
+            let first = true;
+            let pointIndex = 1;
+            for (let p of item.pointDtoList) {
+              let { name: pointName, areaName, checkName } = p;
+              let r = {
+                id,
+                name,
+                pointName,
+                areaName,
+                checkName,
+                pointIndex,
+                itemIndex,
+              };
+              pointIndex++;
+
+              if (first) {
+                r.rowSpan = item.pointDtoList.length;
+                first = false;
+              }
+              d.push(r);
+            }
+            itemIndex++;
+          }
+          
+          this.tableData=d;
+          this.total = Number.parseInt(data.total);
+        })
+        .catch(() => {
+          this.loading = false;
+        });
     },
     clicktreenode(data, node) {
       this.tableData = [];
@@ -429,10 +434,19 @@ export default {
     tableHeaderCellStyle() {
       return "border-color:#aaa;";
     },
-    pointTableHeaderCellStyle(){
+    pointTableHeaderCellStyle() {
       // return "background-color:#d7d7d7 !important";
       return "";
-    }
+    },
+    spanMethod({ row, column, rowIndex, columnIndex }) {
+      if (columnIndex < 3) {
+        if (row.rowSpan > 0) {
+          return [row.rowSpan, 1];
+        } else {
+          return [0, 0];
+        }
+      }
+    },
   },
 };
 </script>