Browse Source

菜单选中状态BUG修复,全流程管理页面优化。

DESKTOP-6LTVLN7\Liumouren 2 years ago
parent
commit
02c5a8c977

+ 6 - 0
src/assets/global.css

@@ -271,4 +271,10 @@ th {
 }
 .docx-wrapper .docx{
     width: 100% !important;
+}
+
+/* iframe标签自动隐藏:主要用于同屏对比中打印时新建的标签 */
+body iframe{
+  position: fixed;
+  z-index: -1;
 }

+ 6 - 7
src/components/common/StepsMyBox.vue

@@ -54,7 +54,6 @@
           <!-- 流程明细文字描述 -->
           <div>{{ stepsList[stepsIndex - 1].info.text }}</div>
           <!-- 流程明细文件预览(通知和报告会用到文件预览) -->
-          <!-- <div ref="fileView" v-show="fileView"></div> -->
           <FilePreView ref="filePreview" v-show="fileView" />
           <!-- 流程明细-实施列表 -->
           <div v-if="stepsList[stepsIndex - 1].info.infos">
@@ -125,9 +124,9 @@ export default {
           title: "实施",
           info: {
             infos: [
-              { title: "用户A 完成张江镇xxx片区的审计", id: "001" },
-              { title: "用户B 完成张江镇xxx片区的审计", id: "002" },
-              { title: "用户C 完成张江镇xxx片区的审计", id: "003" }
+              { title: "用户A 完成张江镇xxx片区的审计", id: "1" },
+              { title: "用户B 完成张江镇xxx片区的审计", id: "2" },
+              { title: "用户C 完成张江镇xxx片区的审计", id: "3" }
             ]
           }
         },
@@ -141,19 +140,19 @@ export default {
           info: {
             tableData: [
               {
-                id: "001",
+                id: "1",
                 desc: "xxxxx问题",
                 status: "已完成",
                 endTime: "2023-01-12"
               },
               {
-                id: "001",
+                id: "2",
                 desc: "xxxxx问题",
                 status: "未开始",
                 endTime: "2023-01-12"
               },
               {
-                id: "001",
+                id: "3",
                 desc: "xxxxx问题",
                 status: "已完成",
                 endTime: "2023-01-12"

+ 16 - 12
src/components/common/WholeProcessManagement.vue

@@ -59,12 +59,7 @@
         <el-button @click="resetForm()">重置</el-button>
       </el-form-item>
     </el-form>
-    <el-table
-      :data="tableData"
-      style="width: calc(100% - 20px); padding: 0 10px"
-      height="calc(80vh - 400px)"
-      stripe
-    >
+    <el-table :data="tableData" style="width: calc(100% - 20px);padding:0 10px;" height="calc(80vh - 400px)" stripe :row-class-name="tableRowClassName" @row-click="rowClick">
       <el-table-column type="index" width="50"> </el-table-column>
       <el-table-column prop="taskId" label="任务编号"> </el-table-column>
       <el-table-column prop="taskName" label="任务名称"> </el-table-column>
@@ -79,7 +74,7 @@
         </template>
       </el-table-column>
       <el-table-column prop="taskType" label="任务类型"> </el-table-column>
-      <el-table-column fixed="right" label="操作">
+      <!-- <el-table-column fixed="right" label="操作">
         <template slot-scope="scope">
           <el-button
             size="mini"
@@ -88,7 +83,7 @@
             >查看</el-button
           >
         </template>
-      </el-table-column>
+      </el-table-column> -->
     </el-table>
     <div id="WholeProcessManagement-footer">
       <Pagination :paginationData="paginationData" />
@@ -261,12 +256,21 @@ export default {
       };
       this.onSubmit();
     },
+    // 给每一行row的数据对象里添加index属性
+    tableRowClassName({ row,rowIndex }) {
+      row.index = rowIndex;
+    },
+    // 用户单击某行时触发操作
+    rowClick(row,column,event){
+      // console.log(row,column,event);
+      this.ToView(row.index)
+    },
     // 查看
-    ToView(index, rows) {
+    ToView(index) {
       this.StepsMyBoxShowState = true;
-      console.log(rows, index);
-    },
-  },
+      console.log("选中的历史项目的index:",index);
+    }
+  }
 };
 </script>
 <style lang="less" scoped>

+ 2 - 2
src/components/layout/MenuCard.vue

@@ -2,7 +2,7 @@
   <!-- 外边框 -->
   <div
     ref="menuCard"
-    :class="$ifLeftMenu(menuData.index != undefined ? menuData.index : '') ? 'menuMainBoxA' : 'menuMainBox'"
+    :class="$ifLeftMenu(menuData.title != undefined? menuData.title : '') ? 'menuMainBoxA' : 'menuMainBox'"
     :style="{
       width: menuData.boxWidth ? menuData.boxWidth + 'px' : '410px',
       height: menuData.boxHeight ? menuData.boxHeight + 'px' : 'auto',
@@ -18,7 +18,7 @@
         <!-- 左侧箭头图标 -->
         <div class="menuMainBox_top_left_iconS" v-if="menuData.type !== 'imageMenu'"></div>
         <div class="menuMainBox_top_left_iconR" v-if="menuData.type === 'imageMenu'">
-          <div class="menuMainBox_top_left_iconR_active" v-if="$ifLeftMenu(menuData.index != undefined ? menuData.index : '')"></div>
+          <div class="menuMainBox_top_left_iconR_active" v-if="$ifLeftMenu(menuData.index != undefined ? menuData.title : '')"></div>
         </div>
         <!-- 标题 -->
         <div class="menuMainBox_top_left_title">{{ menuData.title }}</div>

+ 2 - 2
src/main.js

@@ -31,8 +31,8 @@ Vue.prototype.$ifMenu = (menuIndex, subMenuIndex) => {
   }
 };
 // 根据左侧菜单选中暂存index,与传入的菜单index对比,返回状态(主要使用于MenuCard组件type为imageMenu的元素,《疑点分析》下的子菜单)
-Vue.prototype.$ifLeftMenu = (leftMenuIndex) => {
-  return store.state.leftMenuIndex == leftMenuIndex;
+Vue.prototype.$ifLeftMenu = (leftMenuTitle) => {
+  return store.state.leftMenuTitle == leftMenuTitle;
 };
 new Vue({
   router,

+ 1 - 1
src/store/index.js

@@ -11,7 +11,7 @@ export default new Vuex.Store({
     navSelect: window.localStorage.getItem("navSelect")
       ? JSON.parse(window.localStorage.getItem("navSelect"))
       : { index: "1", name: "首页", subIndex: "" },
-    // 左侧菜单选中菜单index(主要用于元素判断是否显示)
+    // 左侧菜单选中菜单title(主要用于疑点筛查点击某个子菜单时,跳转到综合分析页面综合分析页面自动选中操作。以及元素判断是否显示)
     leftMenuTitle: "",
     // 底部菜单选中菜单index,subIndex(主要用于元素判断是否高亮)
     bottomMenuIndexs: { index: -1, subIndex: -1 },