Commit e1ca3828 authored by wei's avatar wei
Browse files

Merge branch 'develop' into dev-lv

parents 357cbd89 046e8203
Loading
Loading
Loading
Loading
+1 −6
Original line number Original line Diff line number Diff line
<template>
<template>
  <div style="width:100%">
  <div style="width:100%">
    <LHeader :text="text"></LHeader>
    <!-- 搜索 -->
    <!-- 搜索 -->
    <div class="content-wrap">
    <div class="content-wrap">
      <!-- <div class="search-wrap">
      <!-- <div class="search-wrap">
@@ -70,7 +69,6 @@
</template>
</template>


<script>
<script>
import LHeader from "@/components/header.vue";
import { getFun, postFun } from "@/service/table";
import { getFun, postFun } from "@/service/table";
import { getUserInfo } from "@/utils/userInfo";
import { getUserInfo } from "@/utils/userInfo";
import { debounce } from "@/utils/common.js";
import { debounce } from "@/utils/common.js";
@@ -78,9 +76,6 @@ import { Toast } from "vant";


export default {
export default {
  name: "select-people",
  name: "select-people",
  components: {
    LHeader
  },
  created() {
  created() {
    this.getInsideUser(getUserInfo().secondaryUnit);
    this.getInsideUser(getUserInfo().secondaryUnit);
  },
  },
@@ -106,7 +101,7 @@ export default {
      this.resultName = this.allDeptList.find(
      this.resultName = this.allDeptList.find(
        item => item.deptId == this.result
        item => item.deptId == this.result
      ).deptName;
      ).deptName;
      this.$emit("changeDept", this.result);
      this.$emit("changeDept", this.result, this.resultName);
    },
    },
    // 查询内部人员
    // 查询内部人员
    getInsideUser(id, val) {
    getInsideUser(id, val) {
+17 −5
Original line number Original line Diff line number Diff line
@@ -86,8 +86,8 @@
      <van-field
      <van-field
        required
        required
        clickable
        clickable
        name="deptId"
        name="deptName"
        :value="form.deptId"
        :value="form.deptName"
        label="评估小组选择"
        label="评估小组选择"
        placeholder="请选择"
        placeholder="请选择"
        @click="selectDept()"
        @click="selectDept()"
@@ -196,6 +196,7 @@
        <div style="display:flex;margin-top: 44px;">
        <div style="display:flex;margin-top: 44px;">
          <van-checkbox-group
          <van-checkbox-group
            v-model="riskList"
            v-model="riskList"
            ref="checkboxGroup"
            style="width: 100%;font-size: 18px;"
            style="width: 100%;font-size: 18px;"
          >
          >
            <van-checkbox
            <van-checkbox
@@ -207,6 +208,10 @@
              >{{ item[filedName] }}</van-checkbox
              >{{ item[filedName] }}</van-checkbox
            >
            >
          </van-checkbox-group>
          </van-checkbox-group>
          <div>
            <van-button type="primary" @click="checkAll">全选</van-button>
            <van-button type="info" @click="toggleAll">反选</van-button>
          </div>
        </div>
        </div>
      </van-popup>
      </van-popup>


@@ -361,6 +366,12 @@ export default {
    // this.getList();
    // this.getList();
  },
  },
  methods: {
  methods: {
    checkAll() {
      this.$refs.checkboxGroup.toggleAll(true);
    },
    toggleAll() {
      this.$refs.checkboxGroup.toggleAll();
    },
    // 确定时间的方法
    // 确定时间的方法
    onConTime(date) {
    onConTime(date) {
      console.log(
      console.log(
@@ -393,7 +404,7 @@ export default {
        loadingType: "spinner",
        loadingType: "spinner",
        duration: 0
        duration: 0
      });
      });
      getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => {
      getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
        if (res.code == 200) {
        if (res.code == 200) {
          this.columnsTrouble = res.data;
          this.columnsTrouble = res.data;
          // 对数据进行赋值
          // 对数据进行赋值
@@ -429,9 +440,10 @@ export default {
    selectDept() {
    selectDept() {
      this.projectDept = true;
      this.projectDept = true;
    },
    },
    changeDept(id) {
    changeDept(id, name) {
      console.log(id);
      console.log(id);
      this.form.deptId = id;
      this.form.deptId = id;
      this.form.deptName = name;
    },
    },
    closeDept() {
    closeDept() {
      console.log(this.form.deptId);
      console.log(this.form.deptId);
@@ -453,7 +465,7 @@ export default {
        loadingType: "spinner",
        loadingType: "spinner",
        duration: 0
        duration: 0
      });
      });
      getFun(`/risk/plan/user/list/${this.form.projectId}`).then(res => {
      getFun(`/risk/plan/user/list/${this.form.deptId}`).then(res => {
        if (res.code == 200) {
        if (res.code == 200) {
          this.riskModelList = res.data;
          this.riskModelList = res.data;
          // 对数据进行赋值
          // 对数据进行赋值
+251 −72
Original line number Original line Diff line number Diff line
@@ -33,46 +33,127 @@
          </div>
          </div>
        </van-grid-item>
        </van-grid-item>
      </van-grid>
      </van-grid>
      <van-steps :active="phase" active-icon="success" active-color="#38f" style="margin: 0.26rem 0;">
      <van-steps
        <van-step name="1">任务发起</van-step>
        :active="status"
        <van-step name="2">风险评估</van-step>
        active-icon="success"
        <van-step name="3">评估审核</van-step>
        active-color="#38f"
        <van-step name="4">项目完成</van-step>
        style="margin: 0.26rem 0;"
      >
        <van-step>任务发起</van-step>
        <van-step>风险评估</van-step>
        <van-step>评估审核</van-step>
        <van-step>项目完成</van-step>
      </van-steps>
      </van-steps>
      <van-tabs v-model="active" color="#2980f7" animated :sticky="true" offset-top="2.93rem">
      <van-tabs
        v-model="active"
        color="#2980f7"
        animated
        :sticky="true"
        offset-top="2.93rem"
      >
        <van-tab title="任务详情">
        <van-tab title="任务详情">
          <van-form :scroll-to-error="true" :show-error="false" validate-trigger="onSubmit">
          <van-form
            <van-field readonly name="createUserName" :value="form.createUserName" label="创建人员" input-align="right"
            :scroll-to-error="true"
              :rules="[{ required: true, message: '创建人员不能为空' }]" />
            :show-error="false"
            <van-field readonly name="createDeptName" :value="form.createDeptName" label="创建单位" input-align="right"
            validate-trigger="onSubmit"
              :rules="[{ required: true, message: '创建单位不能为空' }]" />
          >
            <van-field readonly name="projectName" :value="form.projectName" label="任务名称" input-align="right"
            <van-field
              :rules="[{ required: true, message: '任务名称不能为空' }]" />
              readonly
              name="createUserName"
              :value="form.createUserName"
              label="创建人员"
              input-align="right"
              :rules="[{ required: true, message: '创建人员不能为空' }]"
            />
            <van-field
              readonly
              name="createDeptName"
              :value="form.createDeptName"
              label="创建单位"
              input-align="right"
              :rules="[{ required: true, message: '创建单位不能为空' }]"
            />
            <van-field
              readonly
              name="projectName"
              :value="form.projectName"
              label="任务名称"
              input-align="right"
              :rules="[{ required: true, message: '任务名称不能为空' }]"
            />


            <van-field readonly name="projectName" :value="form.projectName" label="关联项目" input-align="right"
            <van-field
              :rules="[{ required: true, message: '关联项目不能为空' }]" />
              readonly
              name="projectName"
              :value="form.projectName"
              label="关联项目"
              input-align="right"
              :rules="[{ required: true, message: '关联项目不能为空' }]"
            />


            <van-field readonly name="buildingNames" :value="form.buildingNames" label="评估楼栋" input-align="right"
            <van-field
              :rules="[{ required: true, message: '评估楼栋不能为空' }]" />
              readonly
              name="buildingNames"
              :value="form.buildingNames"
              label="评估楼栋"
              input-align="right"
              :rules="[{ required: true, message: '评估楼栋不能为空' }]"
            />


            <van-field readonly name="deptName" :value="form.deptName" label="评估小组选择" input-align="right"
            <van-field
              :rules="[{ required: true, message: '评估小组不能为空' }]" />
              readonly
              name="deptName"
              :value="form.deptName"
              label="评估小组选择"
              input-align="right"
              :rules="[{ required: true, message: '评估小组不能为空' }]"
            />


            <van-field readonly name="leaderUserName" :value="form.leaderUserName" label="评估小组组长" input-align="right"
            <van-field
              :rules="[{ required: true, message: '评估小组组长不能为空' }]" />
              readonly
              name="leaderUserName"
              :value="form.leaderUserName"
              label="评估小组组长"
              input-align="right"
              :rules="[{ required: true, message: '评估小组组长不能为空' }]"
            />


            <van-field clickable name="workUserNames" :value="form.workUserNames" label="评估成员" input-align="right"
            <van-field
              :rules="[{ required: true, message: '评估成员不能为空' }]" />
              clickable
              name="workUserNames"
              :value="form.workUserNames"
              label="评估成员"
              input-align="right"
              :rules="[{ required: true, message: '评估成员不能为空' }]"
            />


            <van-field v-model="form.startTime" readonly name="location" label="任务开始时间" input-align="right" :formatter="() => {
            <van-field
              v-model="form.startTime"
              readonly
              name="location"
              label="任务开始时间"
              input-align="right"
              :formatter="
                () => {
                  return timestampToTimes(form.startTime);
                  return timestampToTimes(form.startTime);
                }
                }
              " :rules="[{ required: true, message: '任务开始时间不能为空' }]" />
              "
              :rules="[{ required: true, message: '任务开始时间不能为空' }]"
            />


            <van-field v-model="form.endTime" readonly name="location" label="任务结束时间" :formatter="() => {
            <van-field
              v-model="form.endTime"
              readonly
              name="location"
              label="任务结束时间"
              :formatter="
                () => {
                  return timestampToTimes(form.endTime);
                  return timestampToTimes(form.endTime);
                }
                }
              " input-align="right" :rules="[{ required: true, message: '任务结束时间不能为空' }]" />
              "
              input-align="right"
              :rules="[{ required: true, message: '任务结束时间不能为空' }]"
            />
          </van-form>
          </van-form>
        </van-tab>
        </van-tab>
        <van-tab title="风险清单">
        <van-tab title="风险清单">
@@ -84,8 +165,16 @@
            </van-dropdown-menu>
            </van-dropdown-menu>
          </van-sticky>
          </van-sticky>
          <div style="overflow-y: auto;">
          <div style="overflow-y: auto;">
            <van-cell-group inset v-for="(item, index) in riskList" :key="index">
            <van-cell-group
              <van-row type="flex" justify="space-between" style="margin-top:10px;">
              inset
              v-for="(item, index) in riskList"
              :key="index"
            >
              <van-row
                type="flex"
                justify="space-between"
                style="margin-top:10px;"
              >
                <van-col span="22" @click="toRiskDetail(item)">
                <van-col span="22" @click="toRiskDetail(item)">
                  <van-col span="5">
                  <van-col span="5">
                    <van-image width="46" height="46" :src="item.avatar" />
                    <van-image width="46" height="46" :src="item.avatar" />
@@ -105,12 +194,15 @@
              </van-row>
              </van-row>
            </van-cell-group>
            </van-cell-group>
          </div>
          </div>

        </van-tab>
        </van-tab>
        <van-tab title="审核记录">
        <van-tab title="审核记录">
          <div class="journal-wrap">
          <div class="journal-wrap">
            <van-cell-group inset>
            <van-cell-group inset>
              <van-steps direction="vertical" :active="99999" v-if="riskLogList.length > 0">
              <van-steps
                direction="vertical"
                :active="99999"
                v-if="riskLogList.length > 0"
              >
                <van-step v-for="(item, index) in riskLogList" :key="index">
                <van-step v-for="(item, index) in riskLogList" :key="index">
                  <div class="step-wrap">
                  <div class="step-wrap">
                    <van-row>
                    <van-row>
@@ -121,15 +213,21 @@
                      </van-col>
                      </van-col>
                    </van-row>
                    </van-row>
                    <van-row>
                    <van-row>
                      <van-col span="7"><span class="field-title">操作人:</span></van-col>
                      <van-col span="7"
                        ><span class="field-title">操作人:</span></van-col
                      >
                      <van-col span="17">{{ item.approvalUserName }}</van-col>
                      <van-col span="17">{{ item.approvalUserName }}</van-col>
                    </van-row>
                    </van-row>
                    <van-row>
                    <van-row>
                      <van-col span="7"><span class="field-title">审批结果:</span></van-col>
                      <van-col span="7"
                        ><span class="field-title">审批结果:</span></van-col
                      >
                      <van-col span="17">{{ item.taskName }}</van-col>
                      <van-col span="17">{{ item.taskName }}</van-col>
                    </van-row>
                    </van-row>
                    <van-row>
                    <van-row>
                      <van-col span="7"><span class="field-title">岗位:</span></van-col>
                      <van-col span="7"
                        ><span class="field-title">岗位:</span></van-col
                      >
                      <van-col span="17">{{ item.taskResult }}</van-col>
                      <van-col span="17">{{ item.taskResult }}</van-col>
                    </van-row>
                    </van-row>
                    <!-- <van-row>
                    <!-- <van-row>
@@ -148,13 +246,15 @@
          </div>
          </div>
        </van-tab>
        </van-tab>
        <van-tab title="风险评估报告">
        <van-tab title="风险评估报告">
          <div style="height: 1.5rem;
          <div
            style="height: 1.5rem;
           background-color: #fff;
           background-color: #fff;
           border-bottom: 1px solid #97999a;
           border-bottom: 1px solid #97999a;
           display: flex;
           display: flex;
           justify-content: space-between;
           justify-content: space-between;
           line-height: 1.5rem;
           line-height: 1.5rem;
           ">
           "
          >
            <div><van-icon name="column" size="26px" /></div>
            <div><van-icon name="column" size="26px" /></div>
            <div style="flex-grow:1;line-height: 0.6rem">
            <div style="flex-grow:1;line-height: 0.6rem">
              <div>风险评估报告.PDF</div>
              <div>风险评估报告.PDF</div>
@@ -164,13 +264,15 @@
              <van-icon name="arrow" size="26px" />
              <van-icon name="arrow" size="26px" />
            </div>
            </div>
          </div>
          </div>
          <div style="height: 1.5rem;
          <div
            style="height: 1.5rem;
           background-color: #fff;
           background-color: #fff;
           border-bottom: 1px solid #97999a;
           border-bottom: 1px solid #97999a;
           display: flex;
           display: flex;
           justify-content: space-between;
           justify-content: space-between;
           line-height: 1.5rem;
           line-height: 1.5rem;
           ">
           "
          >
            <div><van-icon name="column" size="26px" /></div>
            <div><van-icon name="column" size="26px" /></div>
            <div style="flex-grow:1;line-height: 0.6rem">
            <div style="flex-grow:1;line-height: 0.6rem">
              <div>风险评估报告.PDF</div>
              <div>风险评估报告.PDF</div>
@@ -183,7 +285,9 @@
        </van-tab>
        </van-tab>
      </van-tabs>
      </van-tabs>
    </div>
    </div>
    <div style="display: flex;
    <div
      v-show="pathAuth == 'riskAssess' && (status == 0 || status == 1)"
      style="display: flex;
        justify-content: space-around;
        justify-content: space-around;
        background-color: #fff;
        background-color: #fff;
        border-top: 1px solid #e3e3e3;
        border-top: 1px solid #e3e3e3;
@@ -191,8 +295,12 @@
        width: 100%;
        width: 100%;
        text-align: center;
        text-align: center;
        position: fixed;
        position: fixed;
        bottom: 0;">
        bottom: 0;"
      <div @click="performTasks" style="color: #4bced0;font-size: 14px;font-weight: 600;">
    >
      <div
        @click="performTasks"
        style="color: #4bced0;font-size: 14px;font-weight: 600;"
      >
        <div style="font-size: 22px;"><van-icon name="plus" /></div>
        <div style="font-size: 22px;"><van-icon name="plus" /></div>
        <div>执行任务</div>
        <div>执行任务</div>
      </div>
      </div>
@@ -201,6 +309,35 @@
          <div>任务完成</div>
          <div>任务完成</div>
        </div> -->
        </div> -->
    </div>
    </div>
    <div
      v-show="pathAuth == 'riskManage' && status == 0"
      style="display: flex;
        justify-content: space-around;
        background-color: #fff;
        border-top: 1px solid #e3e3e3;
        height: 1.5rem;
        width: 100%;
        text-align: center;
        position: fixed;
        bottom: 0;"
    >
      <div
        @click="editTask"
        style="color: #4bced0;font-size: 14px;font-weight: 600;"
      >
        <div style="font-size: 22px;">
          <van-icon name="edit" />
        </div>
        <div>修改任务</div>
      </div>
      <div
        @click="delTask"
        style="color: #ec808d;font-size: 14px;font-weight: 600;"
      >
        <div style="font-size: 22px;"><van-icon name="cross" /></div>
        <div>删除任务</div>
      </div>
    </div>
  </div>
  </div>
</template>
</template>


@@ -223,42 +360,50 @@ export default {
      Loop: "", // 定时器
      Loop: "", // 定时器
      showIndex: null, // 是否显示遮罩层,
      showIndex: null, // 是否显示遮罩层,
      active: 0,
      active: 0,
      phase: 1,
      status: 0,
      pathAuth: "",
      form: {},
      form: {},
      tabs: [],
      tabs: [],
      riskList: [],
      riskList: [],
      value1: 0,
      value1: 0,
      value2: 'a',
      value2: "a",
      value3: '1',
      value3: "1",
      option1: [
      option1: [
        { text: '楼栋', value: 0 },
        { text: "楼栋", value: 0 },
        { text: '全部', value: 1 },
        { text: "全部", value: 1 }
      ],
      ],
      option2: [
      option2: [
        { text: '楼层', value: 'a' },
        { text: "楼层", value: "a" },
        { text: '全部', value: 'b' },
        { text: "全部", value: "b" }
      ],
      ],
      option3: [
      option3: [
        { text: '房间', value: '1' },
        { text: "房间", value: "1" },
        { text: '全部', value: '2' },
        { text: "全部", value: "2" }
      ],
      ]
    };
    };
  },
  },
  created() {
  created() {
    var planId = this.$route.params.id || sessionStorage.getItem("planId");
    var planId = this.$route.params.id || sessionStorage.getItem("planId");
    var buildingId =
    var buildingId =
      this.$route.params.buildingId || sessionStorage.getItem("buildingId");
      this.$route.params.buildingId || sessionStorage.getItem("buildingId");

    this.postList(planId, buildingId);
    this.postList(planId, buildingId);
    this.getRiskTaskList(planId, buildingId)
    this.getRiskTaskList(planId, buildingId);
  },
  },
  methods: {
  methods: {
    timestampToTimes(time) {
    timestampToTimes(time) {
      return timestampToTime(new Date(time), "DT2", true);
      return timestampToTime(new Date(time), "DT2", true);
    },
    },
    performTasks() {
    performTasks() {
      sessionStorage.setItem('buildingId', this.messageList.riskBuildingListDtos[0].buildingId)
      sessionStorage.setItem(
      sessionStorage.setItem('planId', this.messageList.id)
        "buildingId",
      sessionStorage.setItem('buildingName', this.messageList.riskBuildingListDtos[0].buildingName)
        this.messageList.riskBuildingListDtos[0].buildingId
      );
      sessionStorage.setItem("planId", this.messageList.id);
      sessionStorage.setItem(
        "buildingName",
        this.messageList.riskBuildingListDtos[0].buildingName
      );
      this.$router.push({
      this.$router.push({
        name: "riskInherent",
        name: "riskInherent",
        params: {
        params: {
@@ -268,6 +413,14 @@ export default {
        }
        }
      });
      });
    },
    },
    //修改任务
    editTask() {
      //TODO 修改任务
    },
    //删除任务
    delTask() {
      //TODO 删除任务
    },
    handadd() {
    handadd() {
      this.$router.push({
      this.$router.push({
        name: "riskAdd",
        name: "riskAdd",
@@ -278,10 +431,12 @@ export default {
    },
    },
    //风险清单列表
    //风险清单列表
    getRiskTaskList(planId, buildingId) {
    getRiskTaskList(planId, buildingId) {
      if (buildingId) {
        getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => {
        getFun(`/risk/plan/inherent/list/${planId}/${buildingId}`).then(res => {
        console.log(res.data, 'lll')
          console.log(res.data, "lll");
        this.riskList = res.data
          this.riskList = res.data;
      })
        });
      }
    },
    },
    postList(id, buildingId) {
    postList(id, buildingId) {
      console.log(buildingId, "123");
      console.log(buildingId, "123");
@@ -300,6 +455,30 @@ export default {
          console.log(this.messageList);
          console.log(this.messageList);
          this.form = this.messageList.detailsDto;
          this.form = this.messageList.detailsDto;
          this.riskLogList = this.messageList.approveListDtos;
          this.riskLogList = this.messageList.approveListDtos;
          console.log(this.messageList.statusKey, 111);
          switch (this.messageList.statusKey) {
            case "CREATE_TASK":
            case "WAIT_START":
            case "WAIT_RETURN":
              this.status = 0;
              break;
            case "CREATE_TASK":
            case "WAIT_LEADER_RETURN":
            case "PROJECT_REPORT":
              this.status = 1;
              break;
            case "WAIT_APPROVE":
            case "FINISH":
              this.status = 2;
              break;
            case "REVOKE":
            case "FINISH":
              this.status = 3;
              break;
            default:
              this.status = 0;
              break;
          }
        })
        })
        .catch(() => {
        .catch(() => {
          this.$toast.clear();
          this.$toast.clear();
@@ -322,7 +501,7 @@ export default {
      this.$router.push({
      this.$router.push({
        name: "risk-big-detail",
        name: "risk-big-detail",
        params: {
        params: {
          id: data.businessId || data.id,
          id: data.businessId || data.id
        }
        }
      });
      });
      this.showIndex = null;
      this.showIndex = null;
@@ -347,17 +526,17 @@ export default {
          floorId: 18,
          floorId: 18,
          isView: true
          isView: true
        }
        }
      })
      });
    },
    },
    //风险清单列表点击
    //风险清单列表点击
    toRiskDetail(item) {
    toRiskDetail(item) {
      console.log(item,'LLLL')
      console.log(item, "LLLL");
      this.$router.push({
      this.$router.push({
        name: "taskDetail",
        name: "taskDetail",
        params: {
        params: {
          id: item.id
          id: item.id
        }
        }
        })
      });
    }
    }
  }
  }
};
};
+0 −11
Original line number Original line Diff line number Diff line
@@ -281,17 +281,6 @@ export default {
      sessionStorage.setItem("buildingId", item.buildingId);
      sessionStorage.setItem("buildingId", item.buildingId);
      this.showIndex = false;
      this.showIndex = false;
    },
    },

    // 详情
    goDetail(data) {
      this.$router.push({
        name: "riskBigDetail",
        params: {
          id: data.businessId || data.id
        }
      });
      this.showIndex = false;
    },
    // 确认
    // 确认
    goConfirm(data) {
    goConfirm(data) {
      this.$router.push({
      this.$router.push({
+320 −301

File changed.

Preview size limit exceeded, changes collapsed.