瀏覽代碼

web端:完善业务
1、发到手机逻辑调整(修改DMS模型)。
2、核查结果,页面框架开发。

DESKTOP-6LTVLN7\Liumouren 2 年之前
父節點
當前提交
f15338a9c5

+ 3 - 0
src/assets/global.css

@@ -356,3 +356,6 @@ body iframe {
 .el-dropdown {
   color: #ffffff !important;
 }
+.el-icon-arrow-right {
+  color: #fff;
+}

+ 62 - 22
src/components/common/BottomForm/PutPhone.vue

@@ -44,23 +44,25 @@
       </el-form-item> -->
       <el-form-item label="选择疑点" prop="c_doubtful_points">
         <el-cascader
-          v-model="c_doubtful_pointsList"
+          v-model="createTaskForm.c_doubtful_points"
           :disabled="legendTreeOptionsLoading"
           :options="legendTreeOptions"
-          placeholder="请选择关联任务,动态生成"
+          filterable
+          :placeholder="legendTreeOptionsLoading ? '请先选择关联任务' : ''"
           :props="cascaderProps"
+          collapse-tags
           clearable
         ></el-cascader>
       </el-form-item>
       <!-- <el-form-item label="截止时间" prop="c_end_time">
         <el-date-picker v-model="createTaskForm.c_end_time" type="date" placeholder="请选择截止日期"> </el-date-picker>
       </el-form-item> -->
-      <el-form-item label="任务描述" prop="c_task_description">
+      <el-form-item label="任务描述" prop="content">
         <el-input
           type="textarea"
           :autosize="{ minRows: 4, maxRows: 6 }"
           placeholder="请描述任务"
-          v-model="createTaskForm.c_task_description"
+          v-model="createTaskForm.content"
           width="100%"
         ></el-input>
       </el-form-item>
@@ -92,25 +94,24 @@ export default {
       legendTreeOptionsLoading: true,
       legendTreeOptions: [],
       cascaderProps: {
-        multiple: true
+        multiple: true,
+        expandTrigger: "hover"
       },
       defaultProps: {
         children: "children",
         label: "label"
       },
-      c_doubtful_pointsList: [],
       // 新建任务form表单
       createTaskForm: {
         title: "",
-        content: "申请任务",
+        content: "",
         c_task_id: "", // 任务id
         c_task_name: "", // 任务名称
-        c_associated_item_ids: "", // 关联项目ids
+        c_associated_item_ids: "", // 关联任务ids
         c_create_time: "", // 当前时间时间戳
-        c_task_description: "", // 任务描述
         c_user_id: "", // 用户id
         c_area_code: "", // 所属街道行政区划编码
-        c_doubtful_points: "", // 疑点信息
+        c_doubtful_points: [], // 疑点信息
         c_end_time: "", // 截止时间
         c_task_type: "" // 任务类型(所有图层中的某图层栏目名)
       },
@@ -134,7 +135,12 @@ export default {
         },
         c_associated_item_ids: {
           required: true,
-          message: "请选择关联项目",
+          message: "请选择关联任务",
+          trigger: "change"
+        },
+        c_doubtful_points: {
+          required: true,
+          message: "请选择疑点信息",
           trigger: "change"
         },
         c_area_code: {
@@ -147,7 +153,7 @@ export default {
           message: "请选择结束时间",
           trigger: "change"
         },
-        c_task_description: [
+        content: [
           { required: false, message: "请输入任务描述", trigger: "blur" },
           {
             min: 1,
@@ -163,6 +169,8 @@ export default {
         associatedItems: [],
         associatedItemsOptions: []
       },
+      // 关联任务暂存《id,T》
+      associatedItemsOptionsDataIdByItem: {},
       streetOfOwnership_str: "",
       taskType_str: ""
     };
@@ -171,7 +179,7 @@ export default {
     // 首先获取数据字典中的下拉框数据
     this.selectSelectData("0", "c_task_type", "projectType");
     this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
-    // 请求所有项目数据
+    // 请求所有任务数据
     this.getAllPorjects();
   },
   mounted() {
@@ -180,7 +188,6 @@ export default {
     this.$bus.$on("putPhone", () => {
       this.changeShowBottomMenusStatus();
     });
-    this.createTaskForm.c_task_name = "任务-" + this.$dayjs().format("YYYYMMDDHHmmss");
   },
   destroy() {
     // 当容器销毁时,需要停止监听该事件
@@ -188,9 +195,9 @@ export default {
   },
   props: [],
   methods: {
-    // 用户切换关联项目
+    // 用户切换关联任务
     changePorject(value) {
-      // 根据项目id得到所属街道和项目类型
+      // 根据任务id得到所属街道和任务类型
       this.selectSelectDataMap.associatedItemsOptions.forEach(item => {
         if (item.value == value) {
           this.createTaskForm.c_area_code = item.c_area_code;
@@ -209,7 +216,7 @@ export default {
           this.c_area_code_str = item.name;
         }
       });
-
+      this.createTaskForm.c_doubtful_points = [];
       this.$bus.$emit("openMyTask", [this.createTaskForm.c_task_type, this.createTaskForm.c_area_code]);
     },
     // 数据字典查询
@@ -229,7 +236,7 @@ export default {
         }
       );
     },
-    // 请求获取所有关联项目数据
+    // 请求获取所有关联任务数据
     getAllPorjects() {
       if (!this.initLoading) {
         this.initLoading = true;
@@ -246,6 +253,7 @@ export default {
           if (res.code === 200 && res.content.data.length > 0) {
             let associatedItemsOptionsData = res.content.data;
             associatedItemsOptionsData.filter(item => {
+              this.associatedItemsOptionsDataIdByItem[item.id] = item;
               this.selectSelectDataMap.associatedItemsOptions.push({
                 label: item.c_task_name,
                 value: item.id,
@@ -279,6 +287,7 @@ export default {
     },
     // 当用户点击svg底座时,切换底部菜单显示隐藏状态。
     changeShowBottomMenusStatus() {
+      this.createTaskForm.c_task_name = "任务-" + this.$dayjs().format("YYYYMMDDHHmmss");
       // 打开弹窗
       this.dialogVisible = true;
       this.$emit("changeShowBottomMenusStatus", false);
@@ -307,10 +316,41 @@ export default {
       // 表单校验
       this.$refs[formName].validate(valid => {
         if (valid) {
-          if (this.c_doubtful_pointsList.length > 0) {
-            this.c_doubtful_pointsList.forEach(item => {
+          if (this.createTaskForm.c_doubtful_points.length > 0) {
+            let changeMyTaskItem = this.associatedItemsOptionsDataIdByItem[this.createTaskForm.c_associated_item_ids];
+            let content_ = {
+              id: changeMyTaskItem.id,
+              title: changeMyTaskItem.title,
+              content: changeMyTaskItem.content
+            };
+            for (let key in changeMyTaskItem) {
+              if (key.indexOf("c_") == 0) {
+                if (typeof changeMyTaskItem[key] == "object") {
+                  content_[key] = JSON.stringify(changeMyTaskItem[key]);
+                } else {
+                  content_[key] = changeMyTaskItem[key];
+                }
+              }
+            }
+            content_["c_app_tag"] = true;
+            content_["c_app_state"] = 0;
+            content_["c_app_title"] = this.createTaskForm.c_task_name;
+            content_["c_app_content"] = this.createTaskForm.content;
+            // 修改当前模型图层数据,并重新进行叠置
+            let modifyParams = new FormData();
+            modifyParams = {
+              columnId: changeMyTaskItem.column_id,
+              modelId: changeMyTaskItem.model_id,
+              content: JSON.stringify(content_)
+            };
+            this.$Post(this.urlsCollection.updateContent, modifyParams).then(res => {
+              if (res.code !== 200) {
+                this.$message.error("任务修改失败!请联系开发人员修复!");
+              }
+            });
+            this.createTaskForm.c_doubtful_points.forEach(item => {
               this.createTaskForm.c_doubtful_points = item[1];
-              this.createTaskForm.c_task_id = this.$CryptoJS.buildGuid();
+              this.createTaskForm.c_task_id = this.createTaskForm.c_associated_item_ids;
               this.createTaskForm.c_user_id = localStorage.getItem("USER_ID");
               this.createTaskForm.c_create_time = parseInt(new Date().getTime() / 1000) * 1000;
               this.createTaskForm.title = this.createTaskForm.c_task_name;
@@ -375,13 +415,13 @@ export default {
             let childrens = res.content.data.map(item => {
               if (item.c_content) {
                 let conetentJson = JSON.parse(item.c_content);
-                // console.log(conetentJson.id, conetentJson.properties["图斑编号"]);
                 return {
                   label: conetentJson.id,
                   value: item.c_content
                 };
               }
             });
+
             this.legendTreeOptions.push({
               value: columnId,
               label: label,

+ 278 - 0
src/components/common/BottomForm/VerificationResult.vue

@@ -0,0 +1,278 @@
+<template>
+  <!-- 核查结果弹窗 -->
+  <el-dialog
+    :visible.sync="dialogVisible"
+    :show-close="false"
+    width="1000px"
+    :before-close="handleClose"
+    v-loading="initLoading"
+  >
+    <template slot="title">
+      <div class="dialogTitle">
+        <div class="dialogTitleIcon"></div>
+        现场核查事项清单
+      </div>
+    </template>
+    <el-table
+      :data="tableData"
+      style="width: 100%; margin-bottom: 20px"
+      height="600px"
+      row-key="id"
+      border
+      default-expand-all
+      :tree-props="{ children: 'children', hasChildren: 'hasChildren' }"
+    >
+      <el-table-column label="现场核查事项" prop="name" sortable> </el-table-column>
+      <el-table-column label="现场核查人员" prop="name" sortable> </el-table-column>
+      <el-table-column label="疑点定位" prop="address"> </el-table-column>
+      <el-table-column label="创建时间" prop="date" sortable> </el-table-column>
+      <el-table-column align="right">
+        <template slot="header">
+          <el-input v-model="search" size="mini" placeholder="输入关键字搜索" />
+        </template>
+        <template slot-scope="scope">
+          <el-button size="mini" @click="handleEdit(scope.$index, scope.row)">Edit</el-button>
+          <el-button size="mini" type="danger" @click="handleDelete(scope.$index, scope.row)">Delete</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+  </el-dialog>
+</template>
+
+<script>
+/**
+ * 底部菜单(核查手机)组件
+ * @author: LiuMengxiang
+ * @Date: 2023年04月04日
+ */
+export default {
+  name: "verificationResult",
+  components: {},
+  data() {
+    return {
+      initLoading: true,
+      submitLoading: false,
+      selectLoading: false,
+      // 申请任务弹窗显示状态
+      dialogVisible: false,
+      legendTree: [],
+      legendTreeOptionsLoading: true,
+      legendTreeOptions: [],
+      // 新建任务form表单
+      search: "",
+      tableData: [
+        {
+          id: 1,
+          date: "2016-05-02",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1518 弄"
+        },
+        {
+          id: 2,
+          date: "2016-05-04",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1517 弄"
+        },
+        {
+          id: 3,
+          date: "2016-05-01",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1519 弄",
+          children: [
+            {
+              id: 31,
+              date: "2016-05-01",
+              name: "王小虎",
+              address: "上海市普陀区金沙江路 1519 弄"
+            },
+            {
+              id: 32,
+              date: "2016-05-01",
+              name: "王小虎",
+              address: "上海市普陀区金沙江路 1519 弄"
+            }
+          ]
+        },
+        {
+          id: 4,
+          date: "2016-05-03",
+          name: "王小虎",
+          address: "上海市普陀区金沙江路 1516 弄"
+        }
+      ],
+      // 数据字典暂存对象
+      selectSelectDataMap: {
+        projectType: [],
+        associatedItems: [],
+        associatedItemsOptions: []
+      },
+      streetOfOwnership_str: "",
+      taskType_str: ""
+    };
+  },
+  created() {
+    // 首先获取数据字典中的下拉框数据
+    this.selectSelectData("0", "c_task_type", "projectType");
+    this.selectSelectData("0", "浦东新区行政区划", "associatedItems");
+    // 请求所有项目数据
+    this.getAllPorjects();
+  },
+  mounted() {
+    // 申请任务事件监听
+    this.$bus.$off("verificationResult");
+    this.$bus.$on("verificationResult", () => {
+      this.changeShowBottomMenusStatus();
+    });
+  },
+  destroy() {
+    // 当容器销毁时,需要停止监听该事件
+    this.$bus.$off("verificationResult");
+  },
+  props: [],
+  methods: {
+    handleEdit(index, row) {
+      console.log(index, row);
+    },
+    handleDelete(index, row) {
+      console.log(index, row);
+    },
+    // 用户切换关联项目
+    changePorject(value) {
+      // 根据项目id得到所属街道和项目类型
+      this.selectSelectDataMap.associatedItemsOptions.forEach(item => {
+        if (item.value == value) {
+          this.createTaskForm.c_area_code = item.c_area_code;
+          this.createTaskForm.c_task_type = item.c_task_type;
+        }
+      });
+      // 所属街道遍历渲染
+      this.selectSelectDataMap.projectType.forEach(item => {
+        if (item.index == this.createTaskForm.c_task_type) {
+          this.c_task_type_str = item.name;
+        }
+      });
+      // 任务类型遍历渲染
+      this.selectSelectDataMap.associatedItems.forEach(item => {
+        if (item.index == this.createTaskForm.c_area_code) {
+          this.c_area_code_str = item.name;
+        }
+      });
+
+      this.$bus.$emit("openMyTask", [this.createTaskForm.c_task_type, this.createTaskForm.c_area_code]);
+    },
+    // 数据字典查询
+    selectSelectData(type, cName, keyName) {
+      let params = new FormData();
+      params.append("type", type);
+      params.append("cName", cName);
+      this.$Post(this.urlsCollection.selectByCNameAType, params).then(
+        res => {
+          if (res.code === 200 && res.content.length > 0) {
+            this.selectSelectDataMap[keyName] = res.content;
+          }
+        },
+        error => {
+          this.$message.error(error);
+          console.log(error);
+        }
+      );
+    },
+    // 请求获取所有关联项目数据
+    getAllPorjects() {
+      if (!this.initLoading) {
+        this.initLoading = true;
+      }
+      let params = new FormData();
+      params.append("columnId", "48");
+      params.append("states", "2,3");
+      params.append("pageSize", 999);
+      params.append("page", 0);
+      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) {
+            let associatedItemsOptionsData = res.content.data;
+            associatedItemsOptionsData.filter(item => {
+              this.selectSelectDataMap.associatedItemsOptions.push({
+                label: item.c_task_name,
+                value: item.id,
+                c_area_code: item.c_area_code,
+                c_task_type: item.c_task_type
+              });
+            });
+            this.initLoading = false;
+          } else {
+            this.initLoading = false;
+            this.$message.error(res.message);
+          }
+        },
+        error => {
+          this.initLoading = false;
+          this.$message.error(error);
+        }
+      );
+    },
+    // 当用户点击svg底座时,切换底部菜单显示隐藏状态。
+    changeShowBottomMenusStatus() {
+      // 打开弹窗
+      this.dialogVisible = true;
+      this.$emit("changeShowBottomMenusStatus", false);
+    },
+    // 弹窗关闭询问
+    handleClose() {
+      if (this.dialogVisible) {
+        this.$confirm("确认关闭?")
+          .then(_ => {
+            this.clearDialogVisible("createTaskForm");
+          })
+          .catch(_ => {});
+      }
+    },
+    // 申请任务取消
+    clearDialogVisible(formName) {
+      // 关闭弹窗
+      this.dialogVisible = false;
+      // 重置表单
+      this.$refs[formName].resetFields();
+      // 修改父级菜单变量(弹窗显示状态和显示底部菜单)
+      this.$emit("changeShowBottomMenusStatus", true);
+    },
+    getLegendData(columnId, label) {
+      let layerParams = new FormData();
+      layerParams = {
+        columnId: columnId,
+        states: "0,1,2,3",
+        pageSize: 10,
+        page: 0
+      };
+      this.$Post(this.urlsCollection.selectContentList, layerParams).then(
+        res => {
+          if (res.code === 200 && res.content.data.length > 0) {
+            // 初始化时将请求到的疑点数据中是否疑点全部改为未标记,疑点,非疑点三种状态
+            let childrens = res.content.data.map(item => {
+              if (item.c_content) {
+                let conetentJson = JSON.parse(item.c_content);
+                // console.log(conetentJson.id, conetentJson.properties["图斑编号"]);
+                return {
+                  label: conetentJson.id,
+                  value: item.c_content
+                };
+              }
+            });
+            this.legendTreeOptions.push({
+              value: columnId,
+              label: label,
+              children: childrens
+            });
+          }
+        },
+        error => {
+          this.$message.error("请求错误!");
+        }
+      );
+    }
+  },
+  watch: {}
+};
+</script>

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

@@ -20,6 +20,8 @@
     <CustomModelDialog />
     <!-- 发到手机弹窗 -->
     <PutPhone ref="putPhone" />
+    <!-- 核查结果弹窗 -->
+    <VerificationResult ref="verificationResult" />
     <!-- 底部菜单主体 -->
     <div
       id="menusBox"
@@ -80,6 +82,7 @@ import UploadingDataShp from "./BottomForm/UploadingDataShp.vue";
 import CustomModelDialog from "./BottomForm/CustomModelDialog.vue";
 import ReportOutput from "./BottomForm/ReportOutput.vue";
 import PutPhone from "./BottomForm/PutPhone.vue";
+import VerificationResult from "./BottomForm/VerificationResult.vue";
 export default {
   name: "BottomMenus",
   components: {
@@ -91,6 +94,7 @@ export default {
     UploadingDataShp,
     CustomModelDialog,
     ReportOutput,
+    VerificationResult,
     PutPhone
   },
   data() {
@@ -163,13 +167,14 @@ export default {
               index: 0,
               title: "报告输出",
               bgImage: "bgsc",
-              clickRef: "ReportOutput"
+              clickEmit: "notFound",
+              clickRef: "putPhone"
             }
           ]
         },
         {
           index: 3,
-          width: "94px",
+          width: "164px",
           title: "现场勘查",
           subMenu: [
             {
@@ -177,6 +182,13 @@ export default {
               title: "发到手机",
               bgImage: "fdsj",
               clickEmit: "putPhone"
+            },
+            {
+              index: 1,
+              title: "核查结果",
+              bgImage: "wdrw",
+              clickEmit: "notFound"
+              // verificationResult
             }
           ]
         }
@@ -423,6 +435,7 @@ export default {
           background-repeat: no-repeat;
           background-size: 100% 100%;
         }
+
         .BtuMenu {
           display: block;
         }

+ 4 - 6
src/views/ComprehensiveAnalysis.vue

@@ -1822,7 +1822,6 @@ export default {
 
     // 节点change事件
     handleCheckChange(data, checked) {
-      console.log(data, checked);
       if (data.mainType && data.mainType !== "我的模型") {
         if (checked) {
           this.showRightBox = true;
@@ -2531,10 +2530,10 @@ export default {
       margin: 6px;
     }
     & > div:nth-child(3) {
-      font-size: 20px;
+      font-size: 25px;
       letter-spacing: 2px;
       font-weight: bold;
-      font-family: pingfangSC;
+      font-family: zhihun181;
     }
   }
   &-rightjuanlianInfo .mapTitle {
@@ -2566,10 +2565,10 @@ export default {
       margin: 6px;
     }
     & > div:nth-child(3) {
-      font-size: 20px;
+      font-size: 25px;
       letter-spacing: 2px;
       font-weight: bold;
-      font-family: pingfangSC;
+      font-family: zhihun181;
     }
   }
   .unMapTitlective {
@@ -2577,7 +2576,6 @@ export default {
   }
   .mapTitlective {
     background-image: linear-gradient(0deg, #33eeff, #ffffff);
-    text-shadow: 0 0 5px #fff;
     background-clip: text;
     color: transparent;
   }