Przeglądaj źródła

Merge branch 'master' of http://39.105.126.192:3000/yylc_sh/web_sh_audit

Bella 2 lat temu
rodzic
commit
96568a4cbe

+ 3 - 5
src/components/common/BottomForm/CreateTaskForm.vue

@@ -136,9 +136,6 @@ export default {
       },
       streetOfOwnership_str: "",
       taskType_str: "",
-      // 关联下拉框
-      pageSize: 10,
-      page: 1
     };
   },
   created() {
@@ -150,6 +147,7 @@ export default {
   },
   mounted() {
     // 申请任务事件监听
+    this.$bus.$off("sqrw");
     this.$bus.$on("sqrw", () => {
       this.changeShowBottomMenusStatus();
     });
@@ -207,8 +205,8 @@ export default {
       let params = new FormData();
       params.append("columnId", "60");
       params.append("states", "2,3");
-      params.append("pageSize", this.pageSize);
-      params.append("page", this.currentPage - 1);
+      params.append("pageSize", 999);
+      params.append("page", 0);
       let sortparam = [{ field: "c_create_date", orderByType: 2 }];
       params.append("orderBy", JSON.stringify(sortparam));
       this.$Post(this.urlsCollection.selectContentList, params).then(

+ 2 - 0
src/components/common/BottomForm/CustomModelDialog.vue

@@ -83,11 +83,13 @@ export default {
   created() {},
   mounted() {
     // 监听自定义模型
+    this.$bus.$off("customModelEvent");
     this.$bus.$on("customModelEvent", () => {
       this.customModelEvent();
     });
 
     // 监听模型修改事件
+    this.$bus.$off("updateModel");
     this.$bus.$on("updateModel", (node) => {
       console.log("监听模型中");
       console.log(node, "节点数据");

+ 76 - 72
src/components/common/BottomForm/MyMission.vue

@@ -35,7 +35,7 @@
       <el-form-item label="审计状态">
         <el-select size="mini" v-model="formInline.auditStatus" placeholder="审计状态" clearable>
           <el-option label="已审核" value="2,3"></el-option>
-          <el-option label="未审核" value="1"></el-option>
+          <el-option label="未审核" value="0,1"></el-option>
         </el-select>
       </el-form-item>
       <el-form-item style="float: right">
@@ -54,7 +54,11 @@
       <el-table-column type="index" width="50"> </el-table-column>
       <!-- <el-table-column prop="c_task_id" label="任务编号"> </el-table-column> -->
       <el-table-column prop="c_task_name" label="任务名称"> </el-table-column>
-      <el-table-column prop="c_create_time" label="创建时间"> </el-table-column>
+      <el-table-column prop="c_create_time" label="创建时间">
+        <template slot-scope="scope">
+          {{ $dayjs(scope.row.c_create_time).format("YYYY-MM-DD HH:mm:ss") }}
+        </template>
+      </el-table-column>
       <el-table-column prop="state" label="状态">
         <template slot-scope="scope">
           <el-tag :type="scope.row.state >= 2 ? 'success' : 'info'" disable-transitions>{{
@@ -91,7 +95,7 @@ export default {
   components: { Pagination },
   data() {
     return {
-      tableInitLoading: true,
+      tableInitLoading: false,
       // 我的任务弹窗显示状态
       dialogVisible: false,
       //   查询条件
@@ -127,8 +131,9 @@ export default {
       tableData: []
     };
   },
-  mounted() {
+  created() {
     // 我的任务事件监听
+    this.$bus.$off("wdrw");
     this.$bus.$on("wdrw", () => {
       this.changeShowBottomMenusStatus();
     });
@@ -159,7 +164,7 @@ export default {
       let params = new FormData();
       params.append("columnId", "60");
       params.append("states", "2,3");
-      params.append("pageSize", 20);
+      params.append("pageSize", 999);
       params.append("page", 0);
       let sortparam = [{ field: "c_create_date", orderByType: 2 }];
       params.append("orderBy", JSON.stringify(sortparam));
@@ -202,66 +207,66 @@ export default {
     onSubmit() {
       if (!this.tableInitLoading) {
         this.tableInitLoading = true;
-      }
-      let params = new FormData();
-      params.append("columnId", "61");
-      params.append("pageSize", this.paginationData.pageSize);
-      params.append("page", this.paginationData.currentPage - 1);
-      let searchParam = [];
-      let param = {
-        field: "c_user_id",
-        searchType: "2",
-        content: {
-          value: localStorage.getItem("USER_ID")
-        }
-      };
-      searchParam.push(param);
-      if (this.formInline.taskType) {
-        let param1 = {
-          field: "c_task_type",
-          searchType: "1",
-          content: {
-            value: this.formInline.taskType
-          }
-        };
-        searchParam.push(param1);
-      }
-      if (this.formInline.associatedItems) {
-        let param1 = {
-          field: "c_associated_item_ids",
+        let params = new FormData();
+        params.append("columnId", "61");
+        params.append("pageSize", this.paginationData.pageSize);
+        params.append("page", this.paginationData.currentPage - 1);
+        let searchParam = [];
+        let param = {
+          field: "c_user_id",
           searchType: "2",
           content: {
-            value: this.formInline.associatedItems
+            value: localStorage.getItem("USER_ID")
           }
         };
-        searchParam.push(param1);
-      }
-      if (this.formInline.auditStatus) {
-        params.append("states", this.formInline.auditStatus);
-      } else {
-        params.append("states", "1,2,3");
-      }
-      params.append("search", JSON.stringify(searchParam));
-      let sortparam = [{ field: "c_create_time", orderByType: 2 }];
-      params.append("orderBy", JSON.stringify(sortparam));
-      this.$Post(this.urlsCollection.selectContentList, params).then(
-        res => {
-          if (res.code === 200 && res.content.data.length > 0) {
-            this.tableData = res.content.data;
-            this.tableInitLoading = false;
-            this.paginationData.total = res.content.count;
-          } else {
+        searchParam.push(param);
+        if (this.formInline.taskType) {
+          let param1 = {
+            field: "c_task_type",
+            searchType: "1",
+            content: {
+              value: this.formInline.taskType
+            }
+          };
+          searchParam.push(param1);
+        }
+        if (this.formInline.associatedItems) {
+          let param1 = {
+            field: "c_associated_item_ids",
+            searchType: "2",
+            content: {
+              value: this.formInline.associatedItems
+            }
+          };
+          searchParam.push(param1);
+        }
+        if (this.formInline.auditStatus) {
+          params.append("states", this.formInline.auditStatus);
+        } else {
+          params.append("states", "0,1,2,3");
+        }
+        params.append("search", JSON.stringify(searchParam));
+        let sortparam = [{ field: "c_create_time", orderByType: 2 }];
+        params.append("orderBy", JSON.stringify(sortparam));
+        this.$Post(this.urlsCollection.selectContentList, params).then(
+          res => {
+            if (res.code === 200 && res.content.data.length > 0) {
+              this.tableData = res.content.data;
+              this.tableInitLoading = false;
+              this.paginationData.total = res.content.count;
+            } else {
+              this.tableData = [];
+              this.tableInitLoading = false;
+              this.$message.error(res.message);
+            }
+          },
+          error => {
             this.tableData = [];
             this.tableInitLoading = false;
-            this.$message.error(res.message);
+            this.$message.error(error);
           }
-        },
-        error => {
-          this.tableData = [];
-          this.tableInitLoading = false;
-          this.$message.error(error);
-        }
-      );
+        );
+      }
     },
     // 查询条件重置
     resetForm() {
@@ -279,20 +284,19 @@ export default {
     // 当用户点击svg底座时,切换底部菜单显示隐藏状态。
     changeShowBottomMenusStatus() {
       // 打开弹窗
-      this.dialogVisible = true;
-      if (this.$ifMenu("3", "")) {
-        this.selectSelectDataMap = {
-          projectType: [],
-          associatedItems: [],
-          associatedItemsOptions: []
-        };
-        // 首先获取数据字典中的下拉框数据
-        this.selectSelectData("0", "c_task_type", "projectType");
-        this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
-        // 请求所有项目数据
-        this.getAllPorjects();
-        this.onSubmit();
-        this.$emit("changeShowBottomMenusStatus", false);
+      if (!this.dialogVisible) {
+        this.dialogVisible = true;
+        if (this.$ifMenu("3", "")) {
+          if (this.selectSelectDataMap.projectType.length === 0) {
+            // 首先获取数据字典中的下拉框数据
+            this.selectSelectData("0", "c_task_type", "projectType");
+            this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
+            // 请求所有项目数据
+            this.getAllPorjects();
+          }
+          this.onSubmit();
+          this.$emit("changeShowBottomMenusStatus", false);
+        }
       }
     },
     // 数据字典查询

+ 1 - 0
src/components/common/BottomForm/ReportOutput.vue

@@ -37,6 +37,7 @@ export default {
   },
   mounted() {
     // 报告输出事件监听
+    this.$bus.$off("ReportOutput");
     this.$bus.$on("ReportOutput", () => {
       this.changeShowBottomMenusStatus();
     });

+ 1 - 0
src/components/common/BottomForm/SameScreenComparison.vue

@@ -217,6 +217,7 @@ export default {
   },
   mounted() {
     // 同屏对比事件监听
+    this.$bus.$off("tpdb");
     this.$bus.$on("tpdb", () => {
       this.changeShowBottomMenusStatus();
     });

+ 1 - 0
src/components/common/BottomForm/UploadingData.vue

@@ -55,6 +55,7 @@ export default {
   },
   mounted() {
     // 上传数据事件监听
+    this.$bus.$off("scsj");
     this.$bus.$on("scsj", () => {
       this.changeShowBottomMenusStatus();
     });

+ 19 - 15
src/components/common/BottomMenus.vue

@@ -3,15 +3,15 @@
     <!-- 底部菜单动态SVG底座 -->
     <BottomMenuSvg id="svgBox" @changeShowBottomMenusStatus="changeShowBottomMenusStatus()" />
     <!-- 申请任务弹窗 -->
-    <CreateTaskForm @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
+    <CreateTaskForm ref="sqrw" @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
     <!-- 我的任务弹窗 -->
-    <MyMission @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
+    <MyMission ref="wdrw" @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
     <!-- 同屏对比弹窗 -->
-    <SameScreenComparison @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
+    <SameScreenComparison ref="tpdb" @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
     <!-- 上传数据弹窗 -->
-    <UploadingData @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
+    <UploadingData ref="scsj" @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
     <!-- 报告输出弹窗 -->
-    <ReportOutput @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
+    <ReportOutput ref="ReportOutput" @changeShowBottomMenusStatus="changeShowBottomMenusStatus" />
     <!-- 自定义模型 -->
     <CustomModelDialog />
     <!-- 底部菜单主体 -->
@@ -37,7 +37,7 @@
           <!-- 遍历渲染每个模块下的子菜单,也是menus数组中subMenu数组 -->
           <div
             class="colBtuMenu"
-            @click="changeBottomMenu(item.index, subItem.index, subItem.clickEmit)"
+            @click="changeBottomMenu(item.index, subItem)"
             v-for="(subItem, subIndex) in item.subMenu"
             :key="subIndex"
           >
@@ -95,8 +95,8 @@ export default {
           width: "164px",
           title: "任务申请",
           subMenu: [
-            { index: 0, title: "申请任务", bgImage: "sqrw", clickEmit: "sqrw" },
-            { index: 1, title: "我的任务", bgImage: "wdrw", clickEmit: "wdrw" }
+            { index: 0, title: "申请任务", bgImage: "sqrw", clickRef: "sqrw" },
+            { index: 1, title: "我的任务", bgImage: "wdrw", clickRef: "wdrw" }
           ]
         },
         {
@@ -116,14 +116,14 @@ export default {
               bgImage: "bjyd",
               clickEmit: "labelCaseEvent"
             },
-            { index: 2, title: "同屏对比", bgImage: "tpdb", clickEmit: "tpdb" },
+            { index: 2, title: "同屏对比", bgImage: "tpdb", clickRef: "tpdb" },
             {
               index: 3,
               title: "卷帘对比",
               bgImage: "jldb",
               clickEmit: "JLControl"
             },
-            { index: 4, title: "上传数据", bgImage: "scsj", clickEmit: "scsj" },
+            { index: 4, title: "上传数据", bgImage: "scsj", clickRef: "scsj" },
             {
               index: 5,
               title: "自定义模型",
@@ -136,7 +136,7 @@ export default {
           index: 2,
           width: "94px",
           title: "疑点报告",
-          subMenu: [{ index: 0, title: "报告输出", bgImage: "bgsc", clickEmit: "ReportOutput" }]
+          subMenu: [{ index: 0, title: "报告输出", bgImage: "bgsc", clickRef: "ReportOutput" }]
         },
         {
           index: 3,
@@ -168,15 +168,19 @@ export default {
       }
     },
     // 根据菜单父级index和子菜单index,更新全局变量。
-    changeBottomMenu(index, subIndex, clickEvent) {
+    changeBottomMenu(index, item) {
       // 该逻辑可能会舍弃
       this.$store.commit("changeBottomMenu", {
         index: index,
-        subIndex: subIndex
+        subIndex: item.index
       });
-      if (clickEvent) {
+      if (item.clickEmit) {
         // 调用全局事件总线中的指定事件
-        this.$bus.$emit(clickEvent);
+        this.$bus.$emit(item.clickEmit);
+      }
+      if (item.clickRef) {
+        // 调用全局事件总线中的指定事件
+        this.$refs[item.clickRef].changeShowBottomMenusStatus();
       }
     },
     // 根据菜单参数bgImage,菜单父级index和子菜单index,判断全局变量已选中底部菜单的index对比,返回不同状态下的icon图标地址。

+ 79 - 10
src/components/common/StepsMyBox.vue

@@ -9,23 +9,23 @@
       <!-- 左侧项目明细 -->
       <div class="StepsMyBox_main_left">
         <div class="StepsMyBox_main_left_main">
-          <div class="StepsMyBox_main_left_main_title">2018年张江镇基本农田审计项目</div>
+          <div class="StepsMyBox_main_left_main_title">{{ clickData.c_project_name ? clickData.c_project_name : "--" }}</div>
           <div class="StepsMyBox_main_left_main_info">基本信息</div>
           <div class="StepsMyBox_main_left_main_info">
-            <div>年份:</div>
-            <div>2018-05-12</div>
+            <div>创建日期:</div>
+            <div>{{ clickData.c_create_date ? $dayjs(clickData.c_create_date).format("YYYY-MM-DD") : "--" }}</div>
           </div>
           <div class="StepsMyBox_main_left_main_info">
             <div>项目类型:</div>
-            <div>土地资源</div>
+            <div>{{ clickData.c_task_type_str ? clickData.c_task_type_str : "" }}</div>
           </div>
           <div class="StepsMyBox_main_left_main_info">
             <div>涉及街镇:</div>
-            <div>张江镇、川沙镇</div>
+            <div>{{ clickData.c_owning_street_town_str ? clickData.c_owning_street_town_str : "" }}</div>
           </div>
           <div class="StepsMyBox_main_left_main_info">
             <div>参与人员:</div>
-            <div>5个</div>
+            <div>{{ countUser }}个</div>
           </div>
           <div class="StepsMyBox_main_left_main_info">
             <div>追踪问题:</div>
@@ -112,12 +112,15 @@ export default {
       stepsIndex: 1,
       // 是否显示在线文档预览
       fileView: false,
+      // 该项目关联任务列表
+      tableData: [],
+      // 参与人员
+      countUser: 0,
       // 步骤条列表
       stepsList: [
-        { title: "立项", info: { text: "2018-05-12 2018年张江基本农田审计项目通过立项" } },
+        { title: "立项", info: { text: "--" } },
         {
           title: "通知",
-          // info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "/upload/20221031/20221031100727BCH5OSMr.jpg" }
           info: { text: "2018年张江基本农田审计项目审计通知书.pdf", filePath: "./static/word/test.pdf" }
         },
         {
@@ -164,9 +167,30 @@ export default {
       ]
     };
   },
-  props: {},
+  props: ["clickData"],
   mounted() {},
-  watch: {},
+  watch: {
+    clickData: {
+      handler(newValue, oldValue) {
+        if (newValue != oldValue) {
+          this.$nextTick(() => {
+            // 获取项目基本信息
+            this.stepsList[0].info.text =
+              this.$dayjs(this.clickData.check_time).format("YYYY-MM-DD") +
+              ": " +
+              this.clickData.c_project_name +
+              "(通过立项!)";
+            // 获取项目关联任务信息
+            this.getAllTasks();
+            // 获取项目流程数据
+            // console.log("全流程管理详情", newValue, oldValue);
+          });
+        }
+      },
+      deep: true,
+      immediate: false
+    }
+  },
   methods: {
     // 流程管理【实施】节点,根据id查看详情
     getInfoById(id) {
@@ -188,6 +212,51 @@ export default {
         this.fileView = true;
         this.$refs.filePreview.showView(this.stepsList[this.stepsIndex - 1].info.filePath);
       }
+    },
+
+    // 查询事件
+    getAllTasks() {
+      let params = new FormData();
+      this.countUser = 0;
+      params.append("columnId", "61");
+      params.append("states", "2,3");
+      params.append("pageSize", 999);
+      params.append("page", 0);
+      let searchParam = [];
+      if (this.clickData.id) {
+        let param1 = {
+          field: "c_associated_item_ids",
+          searchType: "2",
+          content: {
+            value: this.clickData.id
+          }
+        };
+        searchParam.push(param1);
+      }
+      params.append("search", JSON.stringify(searchParam));
+      this.$Post(this.urlsCollection.selectContentList, params).then(
+        res => {
+          if (res.code === 200 && res.content.data.length > 0) {
+            this.tableData = res.content.data;
+            if (this.tableData.length > 0) {
+              let usersList = [];
+              this.tableData.forEach(item => {
+                if (usersList.indexOf(item.author_id) < 0) {
+                  usersList.push(item.author_id);
+                  this.countUser++;
+                }
+              });
+            }
+          } else {
+            this.tableData = [];
+            this.countUser = 0;
+          }
+        },
+        error => {
+          this.tableData = [];
+          this.countUser = 0;
+        }
+      );
     }
   }
 };

+ 19 - 15
src/components/common/WholeProcessManagement.vue

@@ -44,16 +44,8 @@
       <el-table-column type="index" width="50"> </el-table-column>
       <el-table-column prop="c_project_id" label="项目编号"> </el-table-column>
       <el-table-column prop="c_project_name" label="项目名称"> </el-table-column>
-      <el-table-column prop="c_task_type" label="项目类型">
-        <template slot-scope="scope">
-          {{ getSelectByIndex("projectType", scope.row.c_task_type) }}
-        </template>
-      </el-table-column>
-      <el-table-column prop="c_owning_street_town" label="所属街镇">
-        <template slot-scope="scope">
-          {{ getSelectByIndex("associatedItems", scope.row.c_owning_street_town) }}
-        </template>
-      </el-table-column>
+      <el-table-column prop="c_task_type_str" label="项目类型"> </el-table-column>
+      <el-table-column prop="c_owning_street_town_str" label="所属街镇"> </el-table-column>
       <el-table-column prop="c_create_date" label="创建时间">
         <template slot-scope="scope">
           {{ $dayjs(scope.row.c_create_date).format("YYYY-MM-DD HH:mm:ss") }}
@@ -65,7 +57,12 @@
       <Pagination :paginationData="paginationData" />
     </div>
     <!-- 全流程管理流程组件 -->
-    <StepsMyBox id="stepsBox" v-show="StepsMyBoxShowState" @hideStepsMyBoxState="StepsMyBoxShowState = false" />
+    <StepsMyBox
+      id="stepsBox"
+      :clickData="clickData"
+      v-show="StepsMyBoxShowState"
+      @hideStepsMyBoxState="StepsMyBoxShowState = false"
+    />
   </div>
 </template>
 <script>
@@ -97,9 +94,9 @@ export default {
       // 我的任务form表单
       tableData: [],
       paginationData: {
-        pageSize: 5,
+        pageSize: 10,
         currentPage: 1,
-        pageSizes: [5, 10, 20, 50],
+        pageSizes: [10, 20, 50],
         total: 0,
         currentChange: val => {
           this.handleCurrentChange(val);
@@ -107,7 +104,8 @@ export default {
         handleSizeChange: val => {
           this.handleSizeChange(val);
         }
-      }
+      },
+      clickData: {}
     };
   },
   props: {},
@@ -208,6 +206,12 @@ export default {
         res => {
           if (res.code === 200 && res.content.data.length > 0) {
             this.tableData = res.content.data;
+            if (this.tableData.length > 0) {
+              this.tableData.forEach(item => {
+                item.c_task_type_str = this.getSelectByIndex("projectType", item.c_task_type);
+                item.c_owning_street_town_str = this.getSelectByIndex("associatedItems", item.c_owning_street_town);
+              });
+            }
             this.tableInitLoading = false;
             this.paginationData.total = res.content.count;
           } else {
@@ -244,7 +248,7 @@ export default {
     // 查看
     ToView(index) {
       this.StepsMyBoxShowState = true;
-      console.log("选中的历史项目的index:", index);
+      this.clickData = this.tableData[index];
     }
   }
 };

+ 1 - 0
src/components/layout/MenuCard.vue

@@ -152,6 +152,7 @@ export default {
         }
       }
       // 当容器创建完成时,监听窗口改变大小时间
+      this.$bus.$off("windowOnresize");
       this.$bus.$on("windowOnresize", this.windowOnresize);
     });
   },

+ 3 - 0
src/components/map/MapHolder.vue

@@ -33,13 +33,16 @@ export default {
   },
   mounted() {
     // 监听全局事件总线中的卷帘对比事件(JLControl)
+    this.$bus.$off("JLControl");
     this.$bus.$on("JLControl", () => {
       this.JLControl();
     });
     // 监听全局事件总线中的卷帘对比重绘事件(reJLControl)
+    this.$bus.$off("reJLControl");
     this.$bus.$on("reJLControl", () => {
       this.reJLControl();
     });
+    this.$bus.$off("caseAuditEvent");
     this.$bus.$on("caseAuditEvent", () => {
       this.caseAuditEvent();
     });