guoshilong
2022-09-22 1f055395e53198dd6b6e45bda18b2cc919c8d3db
任务计划提交修改
3 files modified
20 ■■■■ changed files
src/components/OpenLayersMap/index.vue 1 ●●●● patch | view | raw | blame | history
src/views/taskinfo/taskinfo.vue 3 ●●●● patch | view | raw | blame | history
src/views/taskinfo/taskinfoPlan.vue 16 ●●●● patch | view | raw | blame | history
src/components/OpenLayersMap/index.vue
@@ -113,6 +113,7 @@
    },
    // 添加线路
    addLineDraw(toData) {
      console.log(toData,'11111111')
      // toData = 'LINESTRING(115.90505364627936 28.740342332731327,115.9119724729309 28.74040302419318,115.90766337913915 28.73566909016844)'
      if (toData) {
        // 将数据库点坐标数据转换
src/views/taskinfo/taskinfo.vue
@@ -166,7 +166,8 @@
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
            this.form.routeRange = '\'' + this.form.routeRange + '\''
            console.log( this.form.routeRange,123456)
            // this.form.routeRange = '\'' + this.form.routeRange + '\''
          });
        } else {
          const date = new Date()
src/views/taskinfo/taskinfoPlan.vue
@@ -18,6 +18,9 @@
               @size-change="sizeChange"
               @refresh-change="refreshChange"
               @on-load="onLoad">
      <template slot="routeRangeForm">
        <open-layers-map ref="OpenLayersMap" @toData="toData" :routeRange="form.routeRange"></open-layers-map>
      </template>
      <template slot="menuLeft">
        <el-button type="danger"
                   size="small"
@@ -69,9 +72,10 @@
  import option from "@/const/taskinfo/taskinfoPlan";
  import {mapGetters} from "vuex";
  import TaskplanUser from "@/views/taskinfo/taskplanUser";
  import OpenLayersMap from "@/components/OpenLayersMap/index";
  export default {
    components: {TaskplanUser},
    components: {TaskplanUser,OpenLayersMap},
    data() {
      return {
        isSetPlanUser:false,
@@ -176,6 +180,9 @@
        if (["edit", "view"].includes(type)) {
          getDetail(this.form.id).then(res => {
            this.form = res.data.data;
            console.log( this.form.routeRange,123456)
            // this.form.routeRange = '\'' + this.form.routeRange + '\''
          });
        } else {
          this.form.status = 2
@@ -216,6 +223,7 @@
          this.data = data.records;
          this.loading = false;
          this.selectionClear();
          console.log(this.data)
        });
      },
      isChangeStatus(id,status) {
@@ -230,11 +238,15 @@
      },
      goToTaskplanUser(planId) {
        // this.$router.push({ path: "/taskinfo/taskplanUser", query: {planId:planId} });
        this.$refs.taskplanUser.getUserList();
        this.setPlanUser()
      },
      setPlanUser() {
        this.isSetPlanUser = !this.isSetPlanUser
      }
      },
      toData(toData) {
        this.form.routeRange = toData
      },
    }
  };
</script>